diff options
author | Inki Dae <inki.dae@samsung.com> | 2024-02-28 09:56:02 +0900 |
---|---|---|
committer | Kwanghoon Son <k.son@samsung.com> | 2024-03-06 11:20:30 +0900 |
commit | 3ce481d7bb370acb430c7a221556397623ad0a28 (patch) | |
tree | 50b4465b857dea460f5d9724832e8c80ccc08072 | |
parent | f1b4ced15ef758931f5a62aada7386fb617eea3d (diff) | |
download | mediavision-3ce481d7bb370acb430c7a221556397623ad0a28.tar.gz mediavision-3ce481d7bb370acb430c7a221556397623ad0a28.tar.bz2 mediavision-3ce481d7bb370acb430c7a221556397623ad0a28.zip |
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 <inki.dae@samsung.com>
-rw-r--r-- | mv_machine_learning/common/include/MvMlConfig.h | 4 |
1 files 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: |