kp enum
class kp.ApiReturnCode(value)
Return code of PLUS APIs.
-
Attributes
-
KP_SUCCESS :
int
, default=0 -
KP_ERROR_USB_IO_N1 :
int
, default=-1 -
KP_ERROR_USB_INVALID_PARAM_N2 :
int
, default=-2 -
KP_ERROR_USB_ACCESS_N3 :
int
, default=-3 -
KP_ERROR_USB_NO_DEVICE_N4 :
int
, default=-4 -
KP_ERROR_USB_NOT_FOUND_N5 :
int
, default=-5 -
KP_ERROR_USB_BUSY_N6 :
int
, default=-6 -
KP_ERROR_USB_TIMEOUT_N7 :
int
, default=-7 -
KP_ERROR_USB_OVERFLOW_N8 :
int
, default=-8 -
KP_ERROR_USB_PIPE_N9 :
int
, default=-9 -
KP_ERROR_USB_INTERRUPTED_N10 :
int
, default=-10 -
KP_ERROR_USB_NO_MEM_N11 :
int
, default=-11 -
KP_ERROR_USB_NOT_SUPPORTED_N12 :
int
, default=-12 -
KP_ERROR_USB_OTHER_N99 :
int
, default=-99 -
KP_ERROR_WDI_BEGIN :
int
, default=-200 -
KP_ERROR_WDI_IO_N1 :
int
, default=-201 -
KP_ERROR_WDI_INVALID_PARAM_N2 :
int
, default=-202 -
KP_ERROR_WDI_ACCESS_N3 :
int
, default=-203 -
KP_ERROR_WDI_NO_DEVICE_N4 :
int
, default=-204 -
KP_ERROR_WDI_NOT_FOUND_N5 :
int
, default=-205 -
KP_ERROR_WDI_BUSY_N6 :
int
, default=-206 -
KP_ERROR_WDI_TIMEOUT_N7 :
int
, default=-207 -
KP_ERROR_WDI_OVERFLOW_N8 :
int
, default=-208 -
KP_ERROR_WDI_PENDING_INSTALLATION_N9 :
int
, default=-209 -
KP_ERROR_WDI_INTERRUPTED_N10 :
int
, default=-210 -
KP_ERROR_WDI_RESOURCE_N11 :
int
, default=-211 -
KP_ERROR_WDI_NOT_SUPPORTED_N12 :
int
, default=-212 -
KP_ERROR_WDI_EXISTS_N13 :
int
, default=-213 -
KP_ERROR_WDI_USER_CANCEL_N14 :
int
, default=-214 -
KP_ERROR_WDI_NEEDS_ADMIN_N15 :
int
, default=-215 -
KP_ERROR_WDI_WOW64_N16 :
int
, default=-216 -
KP_ERROR_WDI_INF_SYNTAX_N17 :
int
, default=-217 -
KP_ERROR_WDI_CAT_MISSING_N18 :
int
, default=-218 -
KP_ERROR_WDI_UNSIGNED_N19 :
int
, default=-219 -
KP_ERROR_WDI_OTHER_N99 :
int
, default=-299 -
KP_ERROR_DEVICE_NOT_EXIST_10 :
int
, default=10 -
KP_ERROR_DEVICE_INCORRECT_RESPONSE_11 :
int
, default=11 -
KP_ERROR_INVALID_PARAM_12 :
int
, default=12 -
KP_ERROR_SEND_DESC_FAIL_13 :
int
, default=13 -
KP_ERROR_SEND_DATA_FAIL_14 :
int
, default=14 -
KP_ERROR_SEND_DATA_TOO_LARGE_15 :
int
, default=15 -
KP_ERROR_RECV_DESC_FAIL_16 :
int
, default=16 -
KP_ERROR_RECV_DATA_FAIL_17 :
int
, default=17 -
KP_ERROR_RECV_DATA_TOO_LARGE_18 :
int
, default=18 -
KP_ERROR_FW_UPDATE_FAILED_19 :
int
, default=19 -
KP_ERROR_FILE_OPEN_FAILED_20 :
int
, default=20 -
KP_ERROR_INVALID_MODEL_21 :
int
, default=21 -
KP_ERROR_IMAGE_RESOLUTION_TOO_SMALL_22 :
int
, default=22 -
KP_ERROR_IMAGE_ODD_WIDTH_23 :
int
, default=23 -
KP_ERROR_INVALID_FIRMWARE_24 :
int
, default=24 -
KP_ERROR_RESET_FAILED_25 :
int
, default=25 -
KP_ERROR_DEVICES_NUMBER_26 :
int
, default=26 -
KP_ERROR_CONFIGURE_DEVICE_27 :
int
, default=27 -
KP_ERROR_CONNECT_FAILED_28 :
int
, default=28 -
KP_ERROR_DEVICE_GROUP_MIX_PRODUCT_29 :
int
, default=29 -
KP_ERROR_RECEIVE_INCORRECT_HEADER_STAMP_30 :
int
, default=30 -
KP_ERROR_RECEIVE_SIZE_MISMATCH_31 :
int
, default=31 -
KP_ERROR_RECEIVE_JOB_ID_MISMATCH_32 :
int
, default=32 -
KP_ERROR_INVALID_CUSTOMIZED_JOB_ID_33 :
int
, default=33 -
KP_ERROR_FW_LOAD_FAILED_34 :
int
, default=34 -
KP_ERROR_MODEL_NOT_LOADED_35 :
int
, default=35 -
KP_ERROR_INVALID_CHECKPOINT_DATA_36 :
int
, default=36 -
KP_DBG_CHECKPOINT_END_37 :
int
, default=37 -
KP_ERROR_INVALID_HOST_38 :
int
, default=38 -
KP_ERROR_MEMORY_FREE_FAILURE_39 :
int
, default=39 -
KP_ERROR_USB_BOOT_LOAD_SECOND_MODEL_40 :
int
, default=40 -
KP_ERROR_CHECK_FW_VERSION_FAILED_41 :
int
, default=41 -
KP_ERROR_OTHER_99 :
int
, default=99 -
KP_FW_ERROR_UNKNOWN_APP :
int
, default=100 -
KP_FW_INFERENCE_ERROR_101 :
int
, default=101 -
KP_FW_DDR_MALLOC_FAILED_102 :
int
, default=102 -
KP_FW_INFERENCE_TIMEOUT_103 :
int
, default=103 -
KP_FW_LOAD_MODEL_FAILED_104 :
int
, default=104 -
KP_FW_CONFIG_POST_PROC_ERROR_MALLOC_FAILED_105 :
int
, default=105 -
KP_FW_CONFIG_POST_PROC_ERROR_NO_SPACE_106 :
int
, default=106 -
KP_FW_IMAGE_SIZE_NOT_MATCH_MODEL_INPUT_107 :
int
, default=107 -
KP_FW_NOT_SUPPORT_PREPROCESSING_108 :
int
, default=108 -
KP_FW_GET_MODEL_INFO_FAILED_109 :
int
, default=109 -
KP_FW_WRONG_INPUT_BUFFER_COUNT_110 :
int
, default=110 -
KP_FW_INVALID_PRE_PROC_MODEL_INPUT_SIZE_111 :
int
, default=111 -
KP_FW_INVALID_INPUT_CROP_PARAM_112 :
int
, default=112 -
KP_FW_NCPU_ERR_BEGIN :
int
, default=200 -
KP_FW_NCPU_INVALID_IMAGE_201 :
int
, default=201 -
KP_FW_EFUSE_CAN_NOT_BURN_300 :
int
, default=300 -
KP_FW_EFUSE_PROTECTED_301 :
int
, default=301 -
KP_FW_EFUSE_OTHER_302 :
int
, default=302
-
class kp.ChannelOrdering(value)
enum for feature map channels ordering.
-
Attributes
class kp.FixedPointDType(value)
enum for fixed-point data type.
-
Attributes
class kp.ImageFormat(value)
enum for image format supported for inference.
-
Attributes
-
KP_IMAGE_FORMAT_UNKNOWN :
int
, default=0x0Unknown format.
-
KP_IMAGE_FORMAT_RGB565 :
int
, default=0x60RGB565 16bits.
-
KP_IMAGE_FORMAT_RGBA8888 :
int
, default=0x0DRGBA8888 32bits.
-
KP_IMAGE_FORMAT_YUYV :
int
, default=0x2FYUYV 16bits.
-
KP_IMAGE_FORMAT_YCBCR422_CRY1CBY0 :
int
, default=0x30YCbCr422 16bit (order: CrY1CbY0).
-
KP_IMAGE_FORMAT_YCBCR422_CBY1CRY0 :
int
, default=0x31YCbCr422 16bit (order: CbY1CrY0).
-
KP_IMAGE_FORMAT_YCBCR422_Y1CRY0CB :
int
, default=0x32YCbCr422 16bit (order: Y1CrY0Cb).
-
KP_IMAGE_FORMAT_YCBCR422_Y1CBY0CR :
int
, default=0x33YCbCr422 16bit (order: Y1CbY0Cr).
-
KP_IMAGE_FORMAT_YCBCR422_CRY0CBY1 :
int
, default=0x34YCbCr422 16bit (order: CrY0CbY1).
-
KP_IMAGE_FORMAT_YCBCR422_CBY0CRY1 :
int
, default=0x35YCbCr422 16bit (order: CbY0CrY1).
-
KP_IMAGE_FORMAT_YCBCR422_Y0CRY1CB :
int
, default=0x36YCbCr422 16bit (order: Y0CrY1Cb).
-
KP_IMAGE_FORMAT_YCBCR422_Y0CBY1CR :
int
, default=0x37YCbCr422 16bit (order: Y0CbY1Cr).
-
KP_IMAGE_FORMAT_RAW8 :
int
, default=0x20RAW 8bits (Grayscale).
-
class kp.ModelTargetChip(value)
enum for model target chip.
-
Attributes
class kp.ModelTensorDataLayout(value)
enum for npu raw data layout format for tensors.
-
Attributes
-
KP_MODEL_TENSOR_DATA_LAYOUT_UNKNOWN :
int
, default=0Unknown NPU data layout.
-
KP_MODEL_TENSOR_DATA_LAYOUT_4W4C8B :
int
, default=1Layout - width: 4 bits, channel: 4 bits, depth: 8 bits.
-
KP_MODEL_TENSOR_DATA_LAYOUT_1W16C8B :
int
, default=2Layout - width: 1 bits, channel: 16 bits, depth: 8 bits.
-
KP_MODEL_TENSOR_DATA_LAYOUT_16W1C8B :
int
, default=3Layout - width: 16 bits, channel: 4 bits, depth: 8 bits.
-
KP_MODEL_TENSOR_DATA_LAYOUT_8W1C16B :
int
, default=4Layout - width: 8 bits, channel: 1 bits, depth: 16 bits.
-
class kp.NormalizeMode(value)
enum for normalization mode.
-
Attributes
-
KP_NORMALIZE_DISABLE :
int
, default=0xFFDisable normalize.
-
KP_NORMALIZE_KNERON :
int
, default=0x1RGB/256 - 0.5, refer to the toolchain manual.
-
KP_NORMALIZE_TENSOR_FLOW :
int
, default=0x2RGB/127.5 - 1.0, refer to the toolchain manual.
-
KP_NORMALIZE_YOLO :
int
, default=0x3RGB/255.0, refer to the toolchain manual.
-
KP_NORMALIZE_CUSTOMIZED_DEFAULT :
int
, default=0x4Customized, default, refer to the toolchain manual.
-
KP_NORMALIZE_CUSTOMIZED_SUB128 :
int
, default=0x5Customized, subtract 128, refer to the toolchain manual.
-
KP_NORMALIZE_CUSTOMIZED_DIV2 :
int
, default=0x6Customized, divide by 2, refer to the toolchain manual.
-
KP_NORMALIZE_CUSTOMIZED_SUB128_DIV2 :
int
, default=0x7Customized, subtract 128 and divide by 2, refer to the toolchain manual.
-
class kp.PaddingMode(value)
enum for padding mode.
-
Attributes
class kp.ProductId(value)
enum for USB PID(Product ID).
-
Attributes
class kp.ResetMode(value)
enum for reset mode.
-
Attributes
-
KP_RESET_REBOOT :
int
, default=0Higheset level to reset Kneron device. Kneron device would disconnect after this reset.
-
KP_RESET_INFERENCE :
int
, default=1Soft reset - reset inference FIFO queue.
-
KP_RESET_SHUTDOWN :
int
, default=2Shut down Kneron device. For KL520, only useful if HW circuit supports (ex. 96 bord), dongle is not supported. For KL720, this function is not supported.
-
class kp.ResizeMode(value)
enum for resize mode.
-
Attributes
class kp.UsbSpeed(value)
enum for USB speed mode.
-
Attributes