return MEDIA_VISION_ERROR_OUT_OF_MEMORY;
}
- // Load configuration file.
- int ret = mBackend->LoadConfigFile();
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- return MEDIA_VISION_ERROR_INVALID_OPERATION;
+ int ret = MEDIA_VISION_ERROR_NONE;
+
+ // Load configuration file if a given backend type is mlapi.
+ if (config.backend_type == MV_INFERENCE_BACKEND_MLAPI) {
+ ret = mBackend->LoadConfigFile();
+ if (ret != INFERENCE_ENGINE_ERROR_NONE) {
+ return MEDIA_VISION_ERROR_INVALID_OPERATION;
+ }
}
// Bind a backend library.