namespace machine_learning
{
LandmarkDetectionConfig::LandmarkDetectionConfig()
-{
- _parser = make_unique<LandmarkDetectionParser>();
-}
-
-void LandmarkDetectionConfig::setTaskType(LandmarkDetectionTaskType task_type)
-{
- _task_type = task_type;
-}
+{}
void LandmarkDetectionConfig::setBackendType(int backend_type)
{
_targetDeviceType = device_type;
}
-LandmarkDetectionTaskType LandmarkDetectionConfig::getTaskType() const
-{
- return _task_type;
-}
-
const std::string &LandmarkDetectionConfig::getDefaultModelName() const
{
return _defaultModelName;
{
if (!model_file.empty())
_modelFilePath = _modelDefaultPath + model_file;
- if (meta_file.empty())
+ if (!meta_file.empty())
_modelMetaFilePath = _modelDefaultPath + meta_file;
- if (label_file.empty())
+ if (!label_file.empty())
_modelLabelFilePath = _modelDefaultPath + label_file;
}
_modelMetaFilePath = _modelDefaultPath + _modelMetaFilePath;
LOGI("meta file path = %s", _modelMetaFilePath.c_str());
- _parser->load(_modelMetaFilePath);
-
ret = config->getDoubleAttribute(MV_LANDMARK_DETECTION_CONFIDENCE_THRESHOLD, &_confidence_threshold);
if (ret != MEDIA_VISION_ERROR_NONE)
LOGW("threshold value doesn't exist.");
LOGI("label file path = %s", _modelLabelFilePath.c_str());
}
+void LandmarkDetectionConfig::loadMetaFile(LandmarkDetectionTaskType task_type)
+{
+ _parser = make_unique<LandmarkDetectionParser>();
+ _parser->setTaskType(static_cast<int>(task_type));
+ _parser->load(_modelMetaFilePath);
+}
+
}
}
\ No newline at end of file