2 * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __LANDMARK_DETECTION_CONFIG_H__
18 #define __LANDMARK_DETECTION_CONFIG_H__
20 #include <mv_common.h>
21 #include "mv_private.h"
22 #include "EngineConfig.h"
24 #include "MetaParser.h"
25 #include "landmark_detection_type.h"
29 namespace machine_learning
31 class LandmarkDetectionConfig
34 std::unique_ptr<MetaParser> _parser;
35 std::string _defaultModelName;
36 std::string _modelFilePath;
37 std::string _modelMetaFilePath;
38 std::string _modelDefaultPath;
39 std::string _modelLabelFilePath;
41 int _targetDeviceType {};
42 double _confidence_threshold {};
45 LandmarkDetectionConfig();
46 virtual ~LandmarkDetectionConfig() = default;
48 void setUserModel(const std::string &model_file, const std::string &meta_file, const std::string &label_file);
49 void parseConfigFile(const std::string &configFilePath);
51 void setBackendType(int backend_type);
52 void setTargetDeviceType(int device_type);
53 const std::string &getDefaultModelName() const;
54 const std::string &getModelFilePath() const;
55 const std::string &getLabelFilePath() const;
56 MetaMap &getInputMetaMap() const;
57 MetaMap &getOutputMetaMap() const;
58 double getConfidenceThreshold() const;
59 int getBackendType() const;
60 int getTargetDeviceType() const;
61 void loadMetaFile(LandmarkDetectionTaskType task_type);