goto _ERROR_;
}
- if (!IsJsonFile(std::string(modelMetaFilePath))) {
- ret = MEDIA_VISION_ERROR_INVALID_PATH;
- LOGE("Model meta file should be json");
- goto _ERROR_;
- }
-
ret = mv_engine_config_get_double_attribute(
engine_config, MV_INFERENCE_MODEL_MEAN_VALUE, &modelMeanValue);
if (ret != MEDIA_VISION_ERROR_NONE) {
std::string(modelWeightFilePath),
std::string(modelUserFilePath));
+ if (std::string(modelMetaFilePath).empty()) {
+ LOGW("Skip ParseMetadata and run without Metadata");
+ goto _ERROR_;
+ }
+
+ if (!IsJsonFile(std::string(modelMetaFilePath))) {
+ ret = MEDIA_VISION_ERROR_INVALID_PATH;
+ LOGE("Model meta file should be json");
+ goto _ERROR_;
+ }
+
ret = pInfer->ParseMetadata(std::string(modelMetaFilePath));
if (ret != MEDIA_VISION_ERROR_NONE) {
LOGE("Fail to ParseMetadata");