kp enum
class kp.ApiReturnCode(value)
Return code of PLUS APIs.
-
Attributes
KP_SUCCESS :
int
, default=0KP_ERROR_USB_IO_N1 :
int
, default=-1KP_ERROR_USB_INVALID_PARAM_N2 :
int
, default=-2KP_ERROR_USB_ACCESS_N3 :
int
, default=-3KP_ERROR_USB_NO_DEVICE_N4 :
int
, default=-4KP_ERROR_USB_NOT_FOUND_N5 :
int
, default=-5KP_ERROR_USB_BUSY_N6 :
int
, default=-6KP_ERROR_USB_TIMEOUT_N7 :
int
, default=-7KP_ERROR_USB_OVERFLOW_N8 :
int
, default=-8KP_ERROR_USB_PIPE_N9 :
int
, default=-9KP_ERROR_USB_INTERRUPTED_N10 :
int
, default=-10KP_ERROR_USB_NO_MEM_N11 :
int
, default=-11KP_ERROR_USB_NOT_SUPPORTED_N12 :
int
, default=-12KP_ERROR_USB_OTHER_N99 :
int
, default=-99KP_ERROR_WDI_BEGIN :
int
, default=-200KP_ERROR_WDI_IO_N1 :
int
, default=-201KP_ERROR_WDI_INVALID_PARAM_N2 :
int
, default=-202KP_ERROR_WDI_ACCESS_N3 :
int
, default=-203KP_ERROR_WDI_NO_DEVICE_N4 :
int
, default=-204KP_ERROR_WDI_NOT_FOUND_N5 :
int
, default=-205KP_ERROR_WDI_BUSY_N6 :
int
, default=-206KP_ERROR_WDI_TIMEOUT_N7 :
int
, default=-207KP_ERROR_WDI_OVERFLOW_N8 :
int
, default=-208KP_ERROR_WDI_PENDING_INSTALLATION_N9 :
int
, default=-209KP_ERROR_WDI_INTERRUPTED_N10 :
int
, default=-210KP_ERROR_WDI_RESOURCE_N11 :
int
, default=-211KP_ERROR_WDI_NOT_SUPPORTED_N12 :
int
, default=-212KP_ERROR_WDI_EXISTS_N13 :
int
, default=-213KP_ERROR_WDI_USER_CANCEL_N14 :
int
, default=-214KP_ERROR_WDI_NEEDS_ADMIN_N15 :
int
, default=-215KP_ERROR_WDI_WOW64_N16 :
int
, default=-216KP_ERROR_WDI_INF_SYNTAX_N17 :
int
, default=-217KP_ERROR_WDI_CAT_MISSING_N18 :
int
, default=-218KP_ERROR_WDI_UNSIGNED_N19 :
int
, default=-219KP_ERROR_WDI_OTHER_N99 :
int
, default=-299KP_ERROR_DEVICE_NOT_EXIST_10 :
int
, default=10KP_ERROR_DEVICE_INCORRECT_RESPONSE_11 :
int
, default=11KP_ERROR_INVALID_PARAM_12 :
int
, default=12KP_ERROR_SEND_DESC_FAIL_13 :
int
, default=13KP_ERROR_SEND_DATA_FAIL_14 :
int
, default=14KP_ERROR_SEND_DATA_TOO_LARGE_15 :
int
, default=15KP_ERROR_RECV_DESC_FAIL_16 :
int
, default=16KP_ERROR_RECV_DATA_FAIL_17 :
int
, default=17KP_ERROR_RECV_DATA_TOO_LARGE_18 :
int
, default=18KP_ERROR_FW_UPDATE_FAILED_19 :
int
, default=19KP_ERROR_FILE_OPEN_FAILED_20 :
int
, default=20KP_ERROR_INVALID_MODEL_21 :
int
, default=21KP_ERROR_IMAGE_RESOLUTION_TOO_SMALL_22 :
int
, default=22KP_ERROR_IMAGE_ODD_WIDTH_23 :
int
, default=23KP_ERROR_INVALID_FIRMWARE_24 :
int
, default=24KP_ERROR_RESET_FAILED_25 :
int
, default=25KP_ERROR_DEVICES_NUMBER_26 :
int
, default=26KP_ERROR_CONFIGURE_DEVICE_27 :
int
, default=27KP_ERROR_CONNECT_FAILED_28 :
int
, default=28KP_ERROR_DEVICE_GROUP_MIX_PRODUCT_29 :
int
, default=29KP_ERROR_RECEIVE_INCORRECT_HEADER_STAMP_30 :
int
, default=30KP_ERROR_RECEIVE_SIZE_MISMATCH_31 :
int
, default=31KP_ERROR_RECEIVE_JOB_ID_MISMATCH_32 :
int
, default=32KP_ERROR_INVALID_CUSTOMIZED_JOB_ID_33 :
int
, default=33KP_ERROR_FW_LOAD_FAILED_34 :
int
, default=34KP_ERROR_MODEL_NOT_LOADED_35 :
int
, default=35KP_ERROR_INVALID_CHECKPOINT_DATA_36 :
int
, default=36KP_DBG_CHECKPOINT_END_37 :
int
, default=37KP_ERROR_INVALID_HOST_38 :
int
, default=38KP_ERROR_OTHER_99 :
int
, default=99KP_FW_ERROR_UNKNOWN_APP :
int
, default=100KP_FW_INFERENCE_ERROR_101 :
int
, default=101KP_FW_DDR_MALLOC_FAILED_102 :
int
, default=102KP_FW_INFERENCE_TIMEOUT_103 :
int
, default=103KP_FW_LOAD_MODEL_FAILED_104 :
int
, default=104KP_FW_CONFIG_POST_PROC_ERROR_MALLOC_FAILED_105 :
int
, default=105KP_FW_CONFIG_POST_PROC_ERROR_NO_SPACE_106 :
int
, default=106KP_FW_IMAGE_SIZE_NOT_MATCH_MODEL_INPUT_107 :
int
, default=107KP_FW_NOT_SUPPORT_PREPROCESSING_108 :
int
, default=108KP_FW_NCPU_ERR_BEGIN :
int
, default=200KP_FW_NCPU_INVALID_IMAGE_201 :
int
, default=201KP_FW_EFUSE_CAN_NOT_BURN_300 :
int
, default=300KP_FW_EFUSE_PROTECTED_301 :
int
, default=301KP_FW_EFUSE_OTHER_302 :
int
, default=302
class kp.ChannelOrdering(value)
enum for feature map channels ordering.
-
Attributes
KP_CHANNEL_ORDERING_HCW :
int
, default=0KL520 default, height/channel/width in order.
KP_CHANNEL_ORDERING_CHW :
int
, default=1KL720 default, channel/height/width in order.
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.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
KP_PADDING_DISABLE :
int
, default=0x1Disable padding in pre-process.
KP_PADDING_CORNER :
int
, default=0x2Enable corner padding (padding right and bottom) in pre-process.
KP_PADDING_SYMMETRIC :
int
, default=0x3Enable symmetric padding (padding right, left, top and bottom) in pre-process.
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.
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
KP_RESIZE_DISABLE :
int
, default=0x1Disable resize in pre-process.
KP_RESIZE_ENABLE :
int
, default=0x2Enable resize in pre-process.
class kp.UsbSpeed(value)
enum for USB speed mode.
-
Attributes
KP_USB_SPEED_UNKNOWN :
int
, default=0unknown speed.
KP_USB_SPEED_LOW :
int
, default=1Low speed.
KP_USB_SPEED_FULL :
int
, default=2Full speed.
KP_USB_SPEED_HIGH :
int
, default=3High speed.
KP_USB_SPEED_SUPER :
int
, default=4Super speed.