From 3ce481d7bb370acb430c7a221556397623ad0a28 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Wed, 28 Feb 2024 09:56:02 +0900 Subject: mv_machine_learning: initialize backend type correctly [Issue type] : bug fix Initialize _backendType member variable correctly with MV_INFERENCE_BACKEND_NONE. This patch fixes a issue that loading default backend type from meta config file is skipped if user doesn't call mv_task_name_set_engine(). See below parseConfigFile function code in MvMlConfig.cpp, if (_backendType == MV_INFERENCE_BACKEND_NONE) { ret = config->getIntegerAttribute(MV_BACKEND_TYPE, &_backendType); if (ret != MEDIA_VISION_ERROR_NONE) throw InvalidOperation("Fail to get backend engine type."); } Change-Id: I1ae23b9893893e63bea36b40f6d9c75e940cc497 Signed-off-by: Inki Dae --- mv_machine_learning/common/include/MvMlConfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mv_machine_learning/common/include/MvMlConfig.h b/mv_machine_learning/common/include/MvMlConfig.h index c8e038a9..6778a7e1 100644 --- a/mv_machine_learning/common/include/MvMlConfig.h +++ b/mv_machine_learning/common/include/MvMlConfig.h @@ -38,8 +38,8 @@ private: std::string _modelLabelFilePath; std::string _pluginFileName; bool _usePlugin {}; - int _backendType {}; - int _targetDeviceType {}; + int _backendType { MV_INFERENCE_BACKEND_NONE }; + int _targetDeviceType { MV_INFERENCE_TARGET_DEVICE_NONE }; double _confidence_threshold {}; public: -- cgit v1.2.3