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 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.
- 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
- If this is true, NCPU will execute the pre-process. The customized post-process must be registered via kdpio_pre_processing_register().
- The pre-process are including color space converion, resolution scaling, normalization, ... etc.
- If this is false, NCPU does not execute the pre-process. The size, channel, format, ... of the input image should be exactly the same as the requirement of the model.
- 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.