When SCPU activates NCPU to run models, kmdw_inference_app_config_t, which contains configurations of NCPU, is required to pass to NCPU.
kmdw_inference_app_config_t contains following configurable options:
- The buffer address of the image.
- The width of the image.
- The height of the image.
- The channel count of the image.
- This is used for image resize in pre-process.
- Please refer to kp_resize_mode_t.
- This is used for image padding in pre-process.
- Please refer to kp_padding_mode_t.
- This is used for color space conversion in pre-process.
- Please refer to kp_image_format_t.
- This is used for data normalization in pre-process.
- Please refer to kp_normalize_mode_t.
- If this is true, NCPU will NOT execute the pre-process. The size, channel, format, ... of the input image must be exactly the same as the requirement of the model.
- If this is true, image_width, image_height, image_channel, image_resize, image_padding, image_format, and image_norm will be ignored.
- If this is true, image_buf_size must be provided correctly.
- The size of image buffer.
- This is only used when bypass_pre_proc is true.
- The ID of the target model to be inferenced in NCPU.
- Whether crop a partial area of the image to be inferenced.
- If this is true, crop_area must be set properly.
- The cropping area of the image to be inferrenced.
- If this is true, NCPU does not execute the post-process. The post-process may need to be execute at the software on the host server.
- If this is false, NCPU will execute the post-process. The customized post-process must be registered via kdpio_post_processing_register().
- This is only available when single model is adapted and the post-process is executed in NCPU.
- When one inference is in the post-process, the next inference will be start parallelly.
- After one inference is fully finished, the callback function set to result_callback will be invoked.
- The callback function for parallel mode
- This only works for parallel mode to carry it back to user callback function.
- The buffer address where NCPU put the inference result.
- It will be passed to result_callback under parallel mode.
- The pad_value for the pre-processing in NCPU.
- The user define data for the pre-processing in NCPU.