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_FIFOQ_INPUT_BUFF_COUNT_NOT_ENOUGH_42 :
int
, default=42 -
KP_ERROR_FIFOQ_SETTING_FAILED_43 :
int
, default=43 -
KP_ERROR_UNSUPPORTED_DEVICE_44 :
int
, default=44 -
KP_ERROR_IMAGE_INVALID_HEIGHT_45 :
int
, default=45 -
KP_ERROR_ADJUST_DDR_HEAP_FAILED_46 :
int
, default=46 -
KP_ERROR_DEVICE_NOT_ACCESSIBLE_47 :
int
, default=47 -
KP_ERROR_INVALID_INPUT_NODE_DATA_NUMBER_48 :
int
, default=48 -
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_ERROR_FILE_OPEN_FAILED_113 :
int
, default=113 -
KP_FW_ERROR_FILE_STATE_FAILED_114 :
int
, default=114 -
KP_FW_ERROR_FILE_READ_FAILED_115 :
int
, default=115 -
KP_FW_ERROR_FILE_WRITE_FAILED_116 :
int
, default=116 -
KP_FW_ERROR_FILE_CHMOD_FAILED_117 :
int
, default=117 -
KP_FW_ERROR_FILE_FAILED_OTHER_118 :
int
, default=118 -
KP_FW_ERROR_INVALID_BOOT_CONFIG_119 :
int
, default=119 -
KP_FW_ERROR_LOADER_ERROR_120 :
int
, default=120 -
KP_FW_ERROR_POSIX_SPAWN_FAILED_121 :
int
, default=121 -
KP_FW_ERROR_USB_SEND_FAILED_122 :
int
, default=122 -
KP_FW_ERROR_USB_RECEIVE_FAILED_123 :
int
, default=123 -
KP_FW_ERROR_HANDLE_NOT_READY_124 :
int
, default=124 -
KP_FW_FIFOQ_ACCESS_FAILED_125 :
int
, default=125 -
KP_FW_FIFOQ_NOT_READY_126 :
int
, default=126 -
KP_FW_ERROR_FILE_SEEK_FAILED_127 :
int
, default=127 -
KP_FW_ERROR_FILE_FLUSH_FAILED_128 :
int
, default=128 -
KP_FW_ERROR_FILE_SYNC_FAILED_129 :
int
, default=129 -
KP_FW_ERROR_FILE_CLOSE_FAILED_130 :
int
, default=130 -
KP_FW_ERROR_MODEL_EXIST_CPU_NODE_131 :
int
, default=131 -
KP_FW_ERROR_MODEL_EXIST_CONST_INPUT_NODE_132 :
int
, default=132 -
KP_FW_ERROR_GET_MSG_QUEUE_FAILED_133 :
int
, default=133 -
KP_FW_ERROR_SEND_MSG_QUEUE_FAILED_134 :
int
, default=134 -
KP_FW_ERROR_RECV_MSG_QUEUE_FAILED_135 :
int
, default=135 -
KP_FW_NCPU_ERR_BEGIN :
int
, default=200 -
KP_FW_NCPU_INVALID_IMAGE_201 :
int
, default=201 -
KP_FW_NCPU_INPROC_FAILED_202 :
int
, default=202 -
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 -
KP_FW_APP_MASK_FDFR_ENROLL_WITH_MASKED_FACE_10000 :
int
, default=10000 -
KP_FW_APP_SEG_INSUFFICIENT_RESULT_BUFFER_SIZE_10001 :
int
, default=10001
-
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).
-
KP_IMAGE_FORMAT_YUV420 :
int
, default=0x70YUV420 12bits (planar)
-
class kp.ModelTargetChip(value)
enum for model target chip.
-
Attributes
-
KP_MODEL_TARGET_CHIP_UNKNOWN :
int
, default=0Model for unknown chip.
-
KP_MODEL_TARGET_CHIP_KL520 :
int
, default=1Model for KL520.
-
KP_MODEL_TARGET_CHIP_KL720 :
int
, default=2Model for KL720.
-
KP_MODEL_TARGET_CHIP_KL530 :
int
, default=3Model for KL530.
-
KP_MODEL_TARGET_CHIP_KL730 :
int
, default=4Model for KL730.
-
KP_MODEL_TARGET_CHIP_KL630 :
int
, default=5Model for KL630.
-
KP_MODEL_TARGET_CHIP_KL540 :
int
, default=6Model for KL540.
-
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
-
KP_DEVICE_KL520 :
int
, default=0x100Product ID of KL520.
-
KP_DEVICE_KL720 :
int
, default=0x720Product ID of KL720.
-
KP_DEVICE_KL720_LEGACY :
int
, default=0x200Legacy Product ID of KL720.
-
KP_DEVICE_KL530 :
int
, default=0x530Product ID of KL530.
-
KP_DEVICE_KL730 :
int
, default=0x732Product ID of KL730.
-
KP_DEVICE_KL630 :
int
, default=0x630Product ID of KL630.
-
KP_DEVICE_KL540 :
int
, default=0x540Product ID of KL540.
-
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