Tensor type.
S stands for Signed, U for Unsigned, and F for Floating-point, followed by a number that stands for the number of bits.
HB_DNN_IMG_TYPE_NV12 and HB_DNN_IMG_TYPE_NV12_SEPARATE both represent NV12 data, but there are differences in storage.
HB_DNN_IMG_TYPE_NV12 stores Y data and UV data in a piece of memory. When you are ready to input, just put the data in hbDNNTensor.sysMem[0].
HB_DNN_IMG_TYPE_NV12_SEPARATE stores Y data and UV data separately, Y data is stored in hbDNNTensor.sysMem[0], and UV data is stored in hbDNNTensor.sysMem[1].
Member
| Member Name | Description |
|---|---|
HB_DNN_IMG_TYPE_Y | Tensor type: Image with Y channel only. |
HB_DNN_IMG_TYPE_NV12 | Tensor type: An NV12 Image. |
HB_DNN_IMG_TYPE_NV12_SEPARATE | Tensor type: Image with Y & UV channels as input. |
HB_DNN_IMG_TYPE_YUV444 | Tensor type: Image with YUV444 as input. J6 is deprecated. |
HB_DNN_IMG_TYPE_RGB | Tensor type: Image with RGB as input. J6 is deprecated |
HB_DNN_IMG_TYPE_BGR | Tensor type: Image with BGR as input. J6 is deprecated |
HB_DNN_TENSOR_TYPE_S4 | Tensor type: Signed 4 bit. |
HB_DNN_TENSOR_TYPE_U4 | Tensor type: Unsigned 4 bit. |
HB_DNN_TENSOR_TYPE_S8 | Tensor type: Signed 8 bit. |
HB_DNN_TENSOR_TYPE_U8 | Tensor type: Unsigned 8 bit. |
HB_DNN_TENSOR_TYPE_F16 | Tensor type: 16 bit floating-point. |
HB_DNN_TENSOR_TYPE_S16 | Tensor type: Signed 16 bit. |
HB_DNN_TENSOR_TYPE_U16 | Tensor type: Unsigned 16 bit. |
HB_DNN_TENSOR_TYPE_F32 | Tensor type: 32 bit floating-point. |
HB_DNN_TENSOR_TYPE_S32 | Tensor type: Signed 32 bit. |
HB_DNN_TENSOR_TYPE_U32 | Tensor type: Unsigned 32 bit. |
HB_DNN_TENSOR_TYPE_F64 | Tensor type: 64 bit floating-point. |
HB_DNN_TENSOR_TYPE_S64 | Tensor type: Signed 64 bit. |
HB_DNN_TENSOR_TYPE_U64 | Tensor type: Unsigned 64 bit. |
HB_DNN_TENSOR_TYPE_BOOL8 | Tensor type: Bool 8bit。 |
HB_DNN_TENSOR_TYPE_MAX | Maximum tensor type number. |