return err;
}
+int engine_config_hosted_tflite_cpu(mv_engine_config_h handle,
+ const char *tf_weight,
+ const char *meta_file)
+{
+ RET_IF_FAIL(mv_engine_config_set_string_attribute(
+ handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, tf_weight));
+ RET_IF_FAIL(mv_engine_config_set_int_attribute(
+ handle, MV_INFERENCE_BACKEND_TYPE, MV_INFERENCE_BACKEND_TFLITE));
+ RET_IF_FAIL(mv_engine_config_set_int_attribute(
+ handle, MV_INFERENCE_TARGET_TYPE, MV_INFERENCE_TARGET_CPU));
+ if (meta_file != NULL)
+ RET_IF_FAIL(mv_engine_config_set_string_attribute(
+ handle, MV_INFERENCE_MODEL_META_FILE_PATH, meta_file));
+ return MEDIA_VISION_ERROR_NONE;
+}
+
+int engine_config_user_hosted_tflite_cpu(mv_engine_config_h handle,
+ const char *tf_weight,
+ const char *user_file,
+ const char *meta_file)
+{
+ RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, tf_weight, meta_file));
+ RET_IF_FAIL(mv_engine_config_set_string_attribute(
+ handle, MV_INFERENCE_MODEL_USER_FILE_PATH, user_file));
+ return MEDIA_VISION_ERROR_NONE;
+}
+
int perform_configure_set_model_config_path(mv_engine_config_h engine_cfg)
{
int err = MEDIA_VISION_ERROR_NONE;
"TFLite_Detection_PostProcess:2",
"TFLite_Detection_PostProcess:3" };
- RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, FD_TFLITE_WEIGHT_PATH));
+ RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, FD_TFLITE_WEIGHT_PATH, NULL));
RET_IF_FAIL(mv_engine_config_set_int_attribute(
handle, MV_INFERENCE_INPUT_DATA_TYPE, MV_INFERENCE_DATA_FLOAT32));
RET_IF_FAIL(mv_engine_config_set_double_attribute(
return err;
}
-int engine_config_hosted_tflite_cpu(mv_engine_config_h handle,
- const char *tf_weight,
- const char *meta_file)
-{
- RET_IF_FAIL(mv_engine_config_set_string_attribute(
- handle, MV_INFERENCE_MODEL_WEIGHT_FILE_PATH, tf_weight));
- RET_IF_FAIL(mv_engine_config_set_int_attribute(
- handle, MV_INFERENCE_BACKEND_TYPE, MV_INFERENCE_BACKEND_TFLITE));
- RET_IF_FAIL(mv_engine_config_set_int_attribute(
- handle, MV_INFERENCE_TARGET_TYPE, MV_INFERENCE_TARGET_CPU));
- if (meta_file != NULL)
- RET_IF_FAIL(mv_engine_config_set_string_attribute(
- handle, MV_INFERENCE_MODEL_META_FILE_PATH, meta_file));
- return MEDIA_VISION_ERROR_NONE;
-}
-
-int engine_config_user_hosted_tflite_cpu(mv_engine_config_h handle,
- const char *tf_weight,
- const char *user_file,
- const char *meta_file)
-{
- RET_IF_FAIL(engine_config_hosted_tflite_cpu(handle, tf_weight, meta_file));
- RET_IF_FAIL(mv_engine_config_set_string_attribute(
- handle, MV_INFERENCE_MODEL_USER_FILE_PATH, user_file));
- return MEDIA_VISION_ERROR_NONE;
-}
-
int perform_armnn_cpm_config(mv_engine_config_h handle)
{
const char *inputNodeName = "image";