target_include_directories(${PROJECT_NAME} PUBLIC ${${PROJECT_NAME}_DEP_INCLUDE_DIRS})
install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
install(
- FILES ${PROJECT_SOURCE_DIR}/include/machine_learning_exception.h
- ${PROJECT_SOURCE_DIR}/include/machine_learning_config.h
- ${PROJECT_SOURCE_DIR}/include/MachineLearningType.h
- ${PROJECT_SOURCE_DIR}/meta/include/machine_learning_preprocess.h
+ FILES ${PROJECT_SOURCE_DIR}/include/MvMlException.h
+ ${PROJECT_SOURCE_DIR}/include/MvMlConfig.h
+ ${PROJECT_SOURCE_DIR}/include/mv_ml_types.h
+ ${PROJECT_SOURCE_DIR}/meta/include/MvMlPreprocess.h
DESTINATION include/media
)
\ No newline at end of file
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#ifdef LOG_TAG
#undef LOG_TAG
#define __CONTEXT_H__
#include <map>
-#include "itask.h"
+#include "ITask.h"
namespace mediavision
{
#ifndef __ITASK_H__
#define __ITASK_H__
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
#include <string>
namespace mediavision
* limitations under the License.
*/
-#ifndef __MACHINE_LEARNING_CONFIG_H__
-#define __MACHINE_LEARNING_CONFIG_H__
+#ifndef __MV_ML_CONFIG_H__
+#define __MV_ML_CONFIG_H__
#include <mv_common.h>
#include "mv_private.h"
{
namespace machine_learning
{
-class MachineLearningConfig
+class Config
{
private:
std::unique_ptr<MetaParser> _parser;
double _confidence_threshold {};
public:
- MachineLearningConfig();
- virtual ~MachineLearningConfig() = default;
+ Config();
+ virtual ~Config() = default;
void setUserModel(const std::string &model_file, const std::string &meta_file, const std::string &label_file);
void parseConfigFile(const std::string &configFilePath);
* limitations under the License.
*/
-#ifndef __MACHINE_LEARNING_EXCEPTION_H__
-#define __MACHINE_LEARNING_EXCEPTION_H__
+#ifndef __MV_ML_EXCEPTION_H__
+#define __MV_ML_EXCEPTION_H__
#include <exception>
#include <string>
}; // MachineLearning
}; // Mediavision
-#endif // __MACHINE_LEARNING_EXCEPTION_H__
+#endif // __MV_ML_EXCEPTION_H__
* limitations under the License.
*/
-#ifndef __MV_MACHINE_LEARNING_COMMON_H__
-#define __MV_MACHINE_LEARNING_COMMON_H__
+#ifndef __COMMON_H__
+#define __COMMON_H__
#include <string>
#include <vector>
* limitations under the License.
*/
-#ifndef __MACHINE_LEARNING_KEY_H__
-#define __MACHINE_LEARNING_KEY_H__
+#ifndef __KEYS_H__
+#define __KEYS_H__
/**
* @brief Defines #MV_MODEL_DEFAULT_PATH
*/
#define MV_USE_PLUGIN "USE_PLUGIN"
-#endif /* __MACHINE_LEARNING_KEY_H__ */
+#endif /* __KEYS_H__ */
* limitations under the License.
*/
-#ifndef __MACHINE_LEARNING_TYPE_H__
-#define __MACHINE_LEARNING_TYPE_H__
+#ifndef __MV_ML_TYPE_H__
+#define __MV_ML_TYPE_H__
#include <mv_common.h>
#include <mv_inference_type.h>
* limitations under the License.
*/
-#ifndef __MACHINE_LEARNING_NATIVE_H__
-#define __MACHINE_LEARNING_NATIVE_H__
+#ifndef __NATIVE_CAPI_H__
+#define __NATIVE_CAPI_H__
#include <memory>
#include <string>
-#include "context.h"
-#include "itask.h"
+#include "Context.h"
+#include "ITask.h"
#include "mv_private.h"
-
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
* limitations under the License.
*/
-#ifndef __MACHINE_LEARNING_PREPROCESS_H__
-#define __MACHINE_LEARNING_PREPROCESS_H__
+#ifndef __MV_ML_PREPROCESS_H__
+#define __MV_ML_PREPROCESS_H__
#include <string>
#include <map>
#include <opencv2/imgproc.hpp>
/**
- * @file machine_learning_preprocess.h
+ * @file MvMlPreprocess.h
* @brief This file contains the Preprocess class definition which
* provides Preprocess before running inference.
*/
} /* machine_learning */
} /* mediavision */
-#endif /* __MACHINE_LEARNING_PREPROCESS_H__ */
+#endif /* __MV_ML_PREPROCESS_H__ */
#include <json-glib/json-glib.h>
#include <inference_engine_type.h>
#include <dlog.h>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "mv_inference_type.h"
#include "types.h"
#include <fstream>
#include <algorithm>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "MetaParser.h"
-#include "common.h"
+#include "meta_common.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
#include <queue>
#include <algorithm>
#include "mv_private.h"
-#include "machine_learning_preprocess.h"
-#include "machine_learning_exception.h"
+#include "MvMlPreprocess.h"
+#include "MvMlException.h"
constexpr int colorConvertTable[][12] = {
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
#include <string>
#include <queue>
#include <algorithm>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "PostprocessParser.h"
-#include "common.h"
+#include "meta_common.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "machine_learning_config.h"
-#include "machine_learning_key.h"
+#include "MvMlException.h"
+#include "MvMlConfig.h"
+#include "keys.h"
using namespace std;
using namespace MediaVision::Common;
{
namespace machine_learning
{
-MachineLearningConfig::MachineLearningConfig()
+Config::Config()
{}
-void MachineLearningConfig::setBackendType(int backend_type)
+void Config::setBackendType(int backend_type)
{
_backendType = backend_type;
}
-void MachineLearningConfig::setTargetDeviceType(int device_type)
+void Config::setTargetDeviceType(int device_type)
{
_targetDeviceType = device_type;
}
-const std::string &MachineLearningConfig::getDefaultModelName() const
+const std::string &Config::getDefaultModelName() const
{
return _defaultModelName;
}
-const std::string &MachineLearningConfig::getModelFilePath() const
+const std::string &Config::getModelFilePath() const
{
return _modelFilePath;
}
-const std::string &MachineLearningConfig::getLabelFilePath() const
+const std::string &Config::getLabelFilePath() const
{
return _modelLabelFilePath;
}
-const std::string &MachineLearningConfig::getPluginFileName() const
+const std::string &Config::getPluginFileName() const
{
return _pluginFileName;
}
-MetaMap &MachineLearningConfig::getInputMetaMap() const
+MetaMap &Config::getInputMetaMap() const
{
return _parser->getInputMetaMap();
}
-MetaMap &MachineLearningConfig::getOutputMetaMap() const
+MetaMap &Config::getOutputMetaMap() const
{
return _parser->getOutputMetaMap();
}
-double MachineLearningConfig::getConfidenceThreshold() const
+double Config::getConfidenceThreshold() const
{
return _confidence_threshold;
}
-int MachineLearningConfig::getBackendType() const
+int Config::getBackendType() const
{
return _backendType;
}
-int MachineLearningConfig::getTargetDeviceType() const
+int Config::getTargetDeviceType() const
{
return _targetDeviceType;
}
-bool MachineLearningConfig::isPluginUsed() const
+bool Config::isPluginUsed() const
{
return _usePlugin;
}
-void MachineLearningConfig::setUserModel(const string &model_file, const string &meta_file, const string &label_file)
+void Config::setUserModel(const string &model_file, const string &meta_file, const string &label_file)
{
if (!model_file.empty())
_modelFilePath = _modelDefaultPath + model_file;
return (!fileName.substr(fileName.find_last_of(".") + 1).compare("json"));
}
-void MachineLearningConfig::parseConfigFile(const std::string &configFilePath)
+void Config::parseConfigFile(const std::string &configFilePath)
{
auto config = make_unique<EngineConfig>(MV_CONFIG_PATH + configFilePath);
LOGW("threshold value doesn't exist.");
}
-void MachineLearningConfig::parsePluginConfigFile(const std::string &pluginConfigFilePath)
+void Config::parsePluginConfigFile(const std::string &pluginConfigFilePath)
{
auto config = make_unique<EngineConfig>(MV_CONFIG_PATH + pluginConfigFilePath);
throw InvalidOperation("Fail to get use_plugin value");
}
-void MachineLearningConfig::loadMetaFile(unique_ptr<MetaParser> parser)
+void Config::loadMetaFile(unique_ptr<MetaParser> parser)
{
_parser = move(parser);
_parser->load(_modelMetaFilePath);
#include "mv_private.h"
-#include "MachineLearningNative.h"
-#include "machine_learning_exception.h"
+#include "native_capi.h"
+#include "MvMlException.h"
using namespace std;
using namespace mediavision::common;
#include "training_engine_error.h"
#include "training_engine_common_impl.h"
#include "inference_engine_common_impl.h"
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
#include "Inference.h"
-#include "label_manager.h"
-#include "feature_vector_manager.h"
-#include "data_set_manager.h"
-#include "simple_shot.h"
+#include "LabelManager.h"
+#include "FeatureVectorManager.h"
+#include "DataSetManager.h"
+#include "SimpleShot.h"
namespace mediavision
{
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "face_recognition.h"
+#include "ITask.h"
+#include "FaceRecognition.h"
namespace mediavision
{
#include <string>
-#include "feature_vector_manager.h"
-#include "data_set_manager.h"
+#include "FeatureVectorManager.h"
+#include "DataSetManager.h"
class FaceRecognitionDSM : public DataSetManager
{
#include <string.h>
#include <vector>
-#include "feature_vector_manager.h"
+#include "FeatureVectorManager.h"
#include "file_util.h"
class FaceRecognitionFVM : public FeatureVectorManager
#include "EngineConfig.h"
#include "inference_engine_common_impl.h"
#include "Inference.h"
-#include "facenet_parser.h"
+#include "FacenetParser.h"
#include "face_recognition_type.h"
-#include "machine_learning_preprocess.h"
-#include "MachineLearningType.h"
+#include "MvMlPreprocess.h"
+#include "mv_ml_types.h"
namespace mediavision
{
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "MachineLearningType.h"
-#include "facenet.h"
+#include "ITask.h"
+#include "mv_ml_types.h"
+#include "Facenet.h"
namespace mediavision
{
#define __SIMPLE_SHOT_H__
#include <mv_inference_type.h>
-#include "training_model.h"
+#include "TrainingModel.h"
class SimpleShot : public TrainingModel
{
#include <mv_common.h>
#include <mv_private.h>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "TensorBuffer.h"
-#include "face_recognition.h"
-#include "face_recognition_fvm.h"
-#include "face_recognition_dsm.h"
+#include "FaceRecognition.h"
+#include "FaceRecognitionFVM.h"
+#include "FaceRecognitionDSM.h"
#include "file_util.h"
using namespace std;
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "face_recognition_adapter.h"
+#include "MvMlException.h"
+#include "FaceRecognitionAdapter.h"
#include "face_recognition_type.h"
#include <app_common.h>
#include <mv_private.h>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "face_recognition_dsm.h"
+#include "MvMlException.h"
+#include "FaceRecognitionDSM.h"
#define MAX_FEATURE_VECTOR_CNT 5
#define MAX_FEATURE_SIZE 1024
#include <fstream>
#include <unistd.h>
-#include "machine_learning_exception.h"
-#include "face_recognition_fvm.h"
+#include "MvMlException.h"
+#include "FaceRecognitionFVM.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
#include <memory>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "facenet.h"
+#include "MvMlException.h"
+#include "Facenet.h"
#include "face_recognition_type.h"
using namespace std;
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "facenet_adapter.h"
+#include "MvMlException.h"
+#include "FacenetAdapter.h"
using namespace std;
using namespace MediaVision::Common;
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "facenet_parser.h"
+#include "MvMlException.h"
+#include "FacenetParser.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "context.h"
-#include "machine_learning_exception.h"
-#include "face_recognition_adapter.h"
-#include "facenet_adapter.h"
-#include "MachineLearningNative.h"
+#include "Context.h"
+#include "MvMlException.h"
+#include "FaceRecognitionAdapter.h"
+#include "FacenetAdapter.h"
+#include "native_capi.h"
#include "mv_face_recognition.h"
#include "mv_face_recognition_internal.h"
#include <sys/stat.h>
-#include "machine_learning_exception.h"
-#include "simple_shot.h"
-#include "data_set_manager.h"
-#include "feature_vector_manager.h"
+#include "MvMlException.h"
+#include "SimpleShot.h"
+#include "DataSetManager.h"
+#include "FeatureVectorManager.h"
#include "file_util.h"
using namespace std;
#include "Inference.h"
#include "image_classification_type.h"
#include "MetaParser.h"
-#include "machine_learning_config.h"
+#include "MvMlConfig.h"
#include "ImageClassificationParser.h"
-#include "machine_learning_preprocess.h"
-#include "async_manager.h"
-#include "iimage_classification.h"
+#include "MvMlPreprocess.h"
+#include "AsyncManager.h"
+#include "IImageClassification.h"
namespace mediavision
{
protected:
std::unique_ptr<mediavision::inference::Inference> _inference;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
Preprocess _preprocess;
std::vector<std::string> _labels;
std::vector<std::string> _valid_backends;
virtual ImageClassificationResult &result() = 0;
public:
- explicit ImageClassification(std::shared_ptr<MachineLearningConfig> config);
+ explicit ImageClassification(std::shared_ptr<Config> config);
virtual ~ImageClassification() = default;
void preDestroy();
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "machine_learning_config.h"
-#include "image_classification_default.h"
-#include "iimage_classification.h"
+#include "ITask.h"
+#include "MvMlConfig.h"
+#include "ImageClassificationDefault.h"
+#include "IImageClassification.h"
namespace mediavision
{
{
private:
std::unique_ptr<IImageClassification> _image_classification;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "image_classification.json";
void create();
#include <mv_common.h>
#include "mv_private.h"
-#include "image_classification.h"
+#include "ImageClassification.h"
#include <mv_inference_type.h>
#include "EngineConfig.h"
ImageClassificationResult _result;
public:
- ImageClassificationDefault(std::shared_ptr<MachineLearningConfig> config);
+ ImageClassificationDefault(std::shared_ptr<Config> config);
~ImageClassificationDefault();
ImageClassificationResult &result() override;
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
#include <memory>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "mv_machine_learning_common.h"
+#include "MvMlException.h"
+#include "common.h"
#include "mv_image_classification_config.h"
-#include "image_classification.h"
+#include "ImageClassification.h"
using namespace std;
using namespace mediavision::inference;
{
namespace machine_learning
{
-template<typename T>
-ImageClassification<T>::ImageClassification(std::shared_ptr<MachineLearningConfig> config) : _config(config)
+template<typename T> ImageClassification<T>::ImageClassification(std::shared_ptr<Config> config) : _config(config)
{
_inference = make_unique<Inference>();
}
#include <string>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "mv_image_classification_config.h"
-#include "image_classification_adapter.h"
+#include "ImageClassificationAdapter.h"
using namespace std;
using namespace MediaVision::Common;
{
ImageClassificationAdapter::ImageClassificationAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
_config->parseConfigFile(_config_file_name);
create();
#include <map>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "image_classification_default.h"
+#include "MvMlException.h"
+#include "ImageClassificationDefault.h"
#include "Postprocess.h"
using namespace std;
namespace machine_learning
{
template<typename T>
-ImageClassificationDefault<T>::ImageClassificationDefault(shared_ptr<MachineLearningConfig> config)
+ImageClassificationDefault<T>::ImageClassificationDefault(shared_ptr<Config> config)
: ImageClassification<T>(config), _result()
{}
* limitations under the License.
*/
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "ImageClassificationParser.h"
using namespace std;
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_image_classification_internal.h"
-#include "image_classification_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "ImageClassificationAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "image_classification_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include/media
FILES_MATCHING
- PATTERN "iimage_segmentation.h"
+ PATTERN "IImageSegmentation.h"
PATTERN "image_segmentation_type.h"
)
\ No newline at end of file
#include "Inference.h"
#include "image_segmentation_type.h"
#include "MetaParser.h"
-#include "machine_learning_config.h"
-#include "image_segmentation_parser.h"
-#include "machine_learning_preprocess.h"
-#include "iimage_segmentation.h"
-#include "async_manager.h"
+#include "MvMlConfig.h"
+#include "ImageSegmentationParser.h"
+#include "MvMlPreprocess.h"
+#include "IImageSegmentation.h"
+#include "AsyncManager.h"
namespace mediavision
{
protected:
std::unique_ptr<mediavision::inference::Inference> _inference;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
std::vector<std::string> _labels;
std::vector<std::string> _valid_backends;
std::vector<std::string> _valid_devices;
virtual ImageSegmentationResult &result() = 0;
public:
- explicit ImageSegmentation(std::shared_ptr<MachineLearningConfig> config);
+ explicit ImageSegmentation(std::shared_ptr<Config> config);
virtual ~ImageSegmentation() = default;
void preDestroy() override;
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "image_segmentation.h"
-#include "iimage_segmentation.h"
+#include "ITask.h"
+#include "ImageSegmentation.h"
+#include "IImageSegmentation.h"
namespace mediavision
{
{
private:
std::unique_ptr<IImageSegmentation> _selfie_segmentation;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "selfie_segmentation.json";
const std::string _plugin_config_file_name = "selfie_segmentation_plugin.json";
#include <opencv2/imgproc.hpp>
#include "image_segmentation_type.h"
-#include "iimage_segmentation.h"
+#include "IImageSegmentation.h"
namespace mediavision
{
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
#include <map>
#include <memory>
-#include "machine_learning_exception.h"
-#include "mv_machine_learning_common.h"
+#include "MvMlException.h"
+#include "common.h"
#include "mv_image_segmentation_config.h"
-#include "image_segmentation.h"
+#include "ImageSegmentation.h"
using namespace std;
using namespace mediavision::inference;
{
namespace machine_learning
{
-template<typename T> ImageSegmentation<T>::ImageSegmentation(shared_ptr<MachineLearningConfig> config) : _config(config)
+template<typename T> ImageSegmentation<T>::ImageSegmentation(shared_ptr<Config> config) : _config(config)
{
_inference = make_unique<Inference>();
}
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "selfie_segmentation_adapter.h"
-#include "image_segmentation_external.h"
+#include "MvMlException.h"
+#include "ImageSegmentationAdapter.h"
+#include "ImageSegmentationExternal.h"
#include "mv_image_segmentation_config.h"
using namespace std;
{
ImageSegmentationAdapter::ImageSegmentationAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
// If the model type needs external plugin then bypass to load the meta file and just create the external plugin.
// In this case, external plugin will use its own meta file approach regardless of Mediavision's one.
#include "mv_private.h"
-#include "machine_learning_exception.h"
-#include "image_segmentation_external.h"
+#include "MvMlException.h"
+#include "ImageSegmentationExternal.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
*/
#include <memory>
-#include "machine_learning_exception.h"
-#include "image_segmentation_parser.h"
+#include "MvMlException.h"
+#include "ImageSegmentationParser.h"
#include "image_segmentation_type.h"
using namespace std;
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_selfie_segmentation_type.h"
#include "mv_selfie_segmentation_internal.h"
-#include "selfie_segmentation_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "ImageSegmentationAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "image_segmentation_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "machine_learning_config.h"
-#include "fld_tweak_cnn.h"
-#include "ilandmark_detection.h"
+#include "ITask.h"
+#include "MvMlConfig.h"
+#include "FldTweakCnn.h"
+#include "ILandmarkDetection.h"
namespace mediavision
{
{
private:
std::unique_ptr<ILandmarkDetection> _landmark_detection;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "facial_landmark.json";
void create(const std::string &model_name);
#include <mv_common.h>
#include "mv_private.h"
-#include "landmark_detection.h"
+#include "LandmarkDetection.h"
#include <mv_inference_type.h>
namespace mediavision
LandmarkDetectionResult _result;
public:
- FldTweakCnn(LandmarkDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ FldTweakCnn(LandmarkDetectionTaskType task_type, std::shared_ptr<Config> config);
~FldTweakCnn();
LandmarkDetectionResult &result() override;
#include "landmark_detection_type.h"
#include "MetaParser.h"
#include "LandmarkDetectionParser.h"
-#include "machine_learning_config.h"
-#include "machine_learning_preprocess.h"
-#include "async_manager.h"
-#include "ilandmark_detection.h"
+#include "MvMlConfig.h"
+#include "MvMlPreprocess.h"
+#include "AsyncManager.h"
+#include "ILandmarkDetection.h"
namespace mediavision
{
protected:
std::unique_ptr<mediavision::inference::Inference> _inference;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
std::vector<std::string> _labels;
std::vector<std::string> _valid_backends;
std::vector<std::string> _valid_devices;
virtual LandmarkDetectionResult &result() = 0;
public:
- LandmarkDetection(LandmarkDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ LandmarkDetection(LandmarkDetectionTaskType task_type, std::shared_ptr<Config> config);
virtual ~LandmarkDetection() = default;
void preDestroy();
LandmarkDetectionTaskType getTaskType();
#include <mv_common.h>
#include "mv_private.h"
-#include "landmark_detection.h"
+#include "LandmarkDetection.h"
#include <mv_inference_type.h>
namespace mediavision
LandmarkDetectionResult _result;
public:
- PldCpm(LandmarkDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ PldCpm(LandmarkDetectionTaskType task_type, std::shared_ptr<Config> config);
~PldCpm();
LandmarkDetectionResult &result() override;
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "machine_learning_config.h"
-#include "pld_cpm.h"
-#include "ilandmark_detection.h"
+#include "ITask.h"
+#include "MvMlConfig.h"
+#include "PldCpm.h"
+#include "ILandmarkDetection.h"
namespace mediavision
{
{
private:
std::unique_ptr<ILandmarkDetection> _landmark_detection;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "pose_landmark.json";
void create(const std::string &model_name);
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "facial_landmark_adapter.h"
+#include "MvMlException.h"
+#include "FacialLandmarkAdapter.h"
#include "mv_landmark_detection_config.h"
using namespace std;
{
FacialLandmarkAdapter::FacialLandmarkAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
_config->parseConfigFile(_config_file_name);
create(_config->getDefaultModelName());
#include <map>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "fld_tweak_cnn.h"
+#include "MvMlException.h"
+#include "FldTweakCnn.h"
#include "Postprocess.h"
using namespace std;
namespace machine_learning
{
template<typename T>
-FldTweakCnn<T>::FldTweakCnn(LandmarkDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config)
+FldTweakCnn<T>::FldTweakCnn(LandmarkDetectionTaskType task_type, std::shared_ptr<Config> config)
: LandmarkDetection<T>(task_type, config), _result()
{}
#include <memory>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "mv_machine_learning_common.h"
-#include "landmark_detection.h"
+#include "MvMlException.h"
+#include "common.h"
+#include "LandmarkDetection.h"
using namespace std;
using namespace mediavision::inference;
namespace machine_learning
{
template<typename T>
-LandmarkDetection<T>::LandmarkDetection(LandmarkDetectionTaskType task_type, shared_ptr<MachineLearningConfig> config)
+LandmarkDetection<T>::LandmarkDetection(LandmarkDetectionTaskType task_type, shared_ptr<Config> config)
: _task_type(task_type), _config(config)
{
_inference = make_unique<Inference>();
*/
#include <memory>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "LandmarkDetectionParser.h"
#include "landmark_detection_type.h"
#include <map>
#include <algorithm>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "mv_landmark_detection_config.h"
-#include "pld_cpm.h"
+#include "PldCpm.h"
#include "Postprocess.h"
using namespace std;
namespace machine_learning
{
template<typename T>
-PldCpm<T>::PldCpm(LandmarkDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config)
+PldCpm<T>::PldCpm(LandmarkDetectionTaskType task_type, std::shared_ptr<Config> config)
: LandmarkDetection<T>(task_type, config), _result()
{}
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "pose_landmark_adapter.h"
+#include "MvMlException.h"
+#include "PoseLandmarkAdapter.h"
#include "mv_landmark_detection_config.h"
using namespace std;
{
PoseLandmarkAdapter::PoseLandmarkAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
_config->parseConfigFile(_config_file_name);
create(_config->getDefaultModelName());
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_facial_landmark_internal.h"
-#include "facial_landmark_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "FacialLandmarkAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "landmark_detection_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_pose_landmark_internal.h"
-#include "pose_landmark_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "PoseLandmarkAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "landmark_detection_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include/media
FILES_MATCHING
- PATTERN "iobject_detection.h"
+ PATTERN "IObjectDetection.h"
PATTERN "object_detection_type.h"
)
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "machine_learning_config.h"
-#include "mobilenet_v1_ssd.h"
+#include "ITask.h"
+#include "MvMlConfig.h"
+#include "MobilenetV1Ssd.h"
namespace mediavision
{
{
private:
std::unique_ptr<IObjectDetection> _object_detection;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "face_detection.json";
const std::string _plugin_config_file_name = "face_detection_plugin.json";
#include <mv_common.h>
#include "mv_private.h"
-#include "object_detection.h"
+#include "ObjectDetection.h"
#include <mv_inference_type.h>
namespace mediavision
ObjectDetectionResult _result;
public:
- MobilenetV1Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ MobilenetV1Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<Config> config);
~MobilenetV1Ssd();
ObjectDetectionResult &result() override;
#include <mv_common.h>
#include "mv_private.h"
-#include "object_detection.h"
+#include "ObjectDetection.h"
#include <mv_inference_type.h>
namespace mediavision
Box decodeBoxWithAnchor(const BoxAnchorParam *boxAnchorParam, Box &box, cv::Rect2f &anchor);
public:
- MobilenetV2Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ MobilenetV2Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<Config> config);
~MobilenetV2Ssd();
ObjectDetectionResult &result() override;
#include "object_detection_type.h"
#include "MetaParser.h"
#include "ObjectDetectionParser.h"
-#include "machine_learning_config.h"
-#include "machine_learning_preprocess.h"
-#include "iobject_detection.h"
-#include "async_manager.h"
+#include "MvMlConfig.h"
+#include "MvMlPreprocess.h"
+#include "IObjectDetection.h"
+#include "AsyncManager.h"
namespace mediavision
{
protected:
std::unique_ptr<mediavision::inference::Inference> _inference;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
std::vector<std::string> _labels;
std::vector<std::string> _valid_backends;
std::vector<std::string> _valid_devices;
virtual ObjectDetectionResult &result() = 0;
public:
- explicit ObjectDetection(ObjectDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ explicit ObjectDetection(ObjectDetectionTaskType task_type, std::shared_ptr<Config> config);
virtual ~ObjectDetection() = default;
void preDestroy() override;
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "machine_learning_config.h"
-#include "mobilenet_v1_ssd.h"
-#include "mobilenet_v2_ssd.h"
+#include "ITask.h"
+#include "MvMlConfig.h"
+#include "MobilenetV1Ssd.h"
+#include "MobilenetV2Ssd.h"
namespace mediavision
{
{
private:
std::unique_ptr<IObjectDetection> _object_detection;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "object_detection.json";
const std::string _plugin_config_file_name = "object_detection_plugin.json";
#include <opencv2/imgproc.hpp>
#include "object_detection_type.h"
-#include "iobject_detection.h"
+#include "IObjectDetection.h"
namespace mediavision
{
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "face_detection_adapter.h"
-#include "object_detection_external.h"
+#include "MvMlException.h"
+#include "FaceDetectionAdapter.h"
+#include "ObjectDetectionExternal.h"
#include "mv_object_detection_config.h"
using namespace std;
{
FaceDetectionAdapter::FaceDetectionAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
// If the model type needs external plugin then bypass to load the meta file and just create the external plugin.
// In this case, external plugin will use its own meta file approach regardless of Mediavision's one.
#include <map>
#include <algorithm>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "mv_object_detection_config.h"
-#include "mobilenet_v1_ssd.h"
+#include "MobilenetV1Ssd.h"
#include "Postprocess.h"
using namespace std;
namespace machine_learning
{
template<typename T>
-MobilenetV1Ssd<T>::MobilenetV1Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config)
+MobilenetV1Ssd<T>::MobilenetV1Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<Config> config)
: ObjectDetection<T>(task_type, config), _result()
{}
#include <string>
#include <queue>
#include <algorithm>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "MobilenetV2AnchorParser.h"
-#include "common.h"
+#include "meta_common.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
#include <algorithm>
#include <iostream>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "mv_object_detection_config.h"
-#include "mobilenet_v2_ssd.h"
+#include "MobilenetV2Ssd.h"
#include "Postprocess.h"
using namespace std;
namespace machine_learning
{
template<typename T>
-MobilenetV2Ssd<T>::MobilenetV2Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<MachineLearningConfig> config)
+MobilenetV2Ssd<T>::MobilenetV2Ssd(ObjectDetectionTaskType task_type, std::shared_ptr<Config> config)
: ObjectDetection<T>(task_type, config), _result()
{}
#include <map>
#include <memory>
-#include "machine_learning_exception.h"
-#include "mv_machine_learning_common.h"
+#include "MvMlException.h"
+#include "common.h"
#include "mv_object_detection_config.h"
-#include "object_detection.h"
+#include "ObjectDetection.h"
using namespace std;
using namespace mediavision::inference;
namespace machine_learning
{
template<typename T>
-ObjectDetection<T>::ObjectDetection(ObjectDetectionTaskType task_type, shared_ptr<MachineLearningConfig> config)
+ObjectDetection<T>::ObjectDetection(ObjectDetectionTaskType task_type, shared_ptr<Config> config)
: _task_type(task_type), _config(config)
{
_inference = make_unique<Inference>();
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "object_detection_adapter.h"
-#include "object_detection_external.h"
+#include "MvMlException.h"
+#include "ObjectDetectionAdapter.h"
+#include "ObjectDetectionExternal.h"
#include "mv_object_detection_config.h"
using namespace std;
{
ObjectDetectionAdapter::ObjectDetectionAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
// If the model type needs external plugin then bypass to load the meta file and just create the external plugin.
// In this case, external plugin will use its own meta file approach regardless of Mediavision's one.
#include "mv_private.h"
-#include "machine_learning_exception.h"
-#include "object_detection_external.h"
+#include "MvMlException.h"
+#include "ObjectDetectionExternal.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
*/
#include <memory>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "ObjectDetectionParser.h"
#include "object_detection_type.h"
#include "MobilenetV2AnchorParser.h"
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_face_detection_internal.h"
-#include "face_detection_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "FaceDetectionAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "object_detection_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_object_detection_internal.h"
-#include "object_detection_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "ObjectDetectionAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "object_detection_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
#include "inference_engine_common_impl.h"
#include "Inference.h"
#include "object_detection_3d_type.h"
-#include "iobject_detection_3d.h"
+#include "IObjectDetection3d.h"
#include "MetaParser.h"
-#include "machine_learning_config.h"
+#include "MvMlConfig.h"
#include "ObjectDetection3dParser.h"
-#include "machine_learning_preprocess.h"
+#include "MvMlPreprocess.h"
namespace mediavision
{
protected:
std::unique_ptr<mediavision::inference::Inference> _inference;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
std::vector<std::string> _labels;
std::vector<std::string> _valid_backends;
std::vector<std::string> _valid_devices;
void inference(std::vector<std::vector<T> > &inputVectors);
public:
- ObjectDetection3d(ObjectDetection3dTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ ObjectDetection3d(ObjectDetection3dTaskType task_type, std::shared_ptr<Config> config);
virtual ~ObjectDetection3d() = default;
ObjectDetection3dTaskType getTaskType();
#include <dlog.h>
#include "EngineConfig.h"
-#include "itask.h"
-#include "machine_learning_config.h"
-#include "objectron.h"
-#include "iobject_detection_3d.h"
+#include "ITask.h"
+#include "MvMlConfig.h"
+#include "Objectron.h"
+#include "IObjectDetection3d.h"
namespace mediavision
{
{
private:
std::unique_ptr<IObjectDetection3d> _object_detection_3d;
- std::shared_ptr<MachineLearningConfig> _config;
+ std::shared_ptr<Config> _config;
const std::string _config_file_name = "object_detection_3d.json";
void create(const std::string &model_name);
#include <memory>
#include <mv_common.h>
#include "mv_private.h"
-#include "machine_learning_config.h"
+#include "MvMlConfig.h"
-#include "object_detection_3d.h"
+#include "ObjectDetection3d.h"
#include <mv_inference_type.h>
namespace mediavision
ObjectDetection3dResult _result;
public:
- Objectron(ObjectDetection3dTaskType task_type, std::shared_ptr<MachineLearningConfig> config);
+ Objectron(ObjectDetection3dTaskType task_type, std::shared_ptr<Config> config);
~Objectron();
ObjectDetection3dResult &result() override;
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
#include <memory>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "mv_machine_learning_common.h"
-#include "object_detection_3d.h"
+#include "MvMlException.h"
+#include "common.h"
+#include "ObjectDetection3d.h"
using namespace std;
using namespace mediavision::inference;
namespace machine_learning
{
template<typename T>
-ObjectDetection3d<T>::ObjectDetection3d(ObjectDetection3dTaskType task_type,
- std::shared_ptr<MachineLearningConfig> config)
+ObjectDetection3d<T>::ObjectDetection3d(ObjectDetection3dTaskType task_type, std::shared_ptr<Config> config)
: _task_type(task_type), _config(config)
{
_inference = make_unique<Inference>();
* limitations under the License.
*/
-#include "machine_learning_exception.h"
-#include "object_detection_3d_adapter.h"
+#include "MvMlException.h"
+#include "ObjectDetection3dAdapter.h"
using namespace std;
using namespace MediaVision::Common;
{
ObjectDetection3dAdapter::ObjectDetection3dAdapter()
{
- _config = make_shared<MachineLearningConfig>();
+ _config = make_shared<Config>();
_config->parseConfigFile(_config_file_name);
create(_config->getDefaultModelName());
*/
#include <iostream>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
#include "ObjectDetection3dParser.h"
using namespace std;
#include <map>
#include <algorithm>
-#include "machine_learning_exception.h"
-#include "objectron.h"
+#include "MvMlException.h"
+#include "Objectron.h"
#include "Postprocess.h"
using namespace std;
namespace machine_learning
{
template<typename T>
-Objectron<T>::Objectron(ObjectDetection3dTaskType task_type, std::shared_ptr<MachineLearningConfig> config)
+Objectron<T>::Objectron(ObjectDetection3dTaskType task_type, std::shared_ptr<Config> config)
: ObjectDetection3d<T>(task_type, config), _result()
{}
#include "mv_private.h"
#include "mv_feature_key.h"
-#include "itask.h"
+#include "ITask.h"
#include "mv_object_detection_3d_internal.h"
-#include "object_detection_3d_adapter.h"
-#include "machine_learning_exception.h"
-#include "MachineLearningNative.h"
+#include "ObjectDetection3dAdapter.h"
+#include "MvMlException.h"
+#include "native_capi.h"
#include "object_detection_3d_type.h"
-#include "context.h"
+#include "Context.h"
#include <new>
#include <unistd.h>
#include <vector>
#include <map>
-#include "feature_vector_manager.h"
+#include "FeatureVectorManager.h"
class DataSetManager
{
#include "training_engine_error.h"
#include "training_engine_common_impl.h"
#include "inference_engine_common_impl.h"
-#include "data_set_manager.h"
-#include "feature_vector_manager.h"
+#include "DataSetManager.h"
+#include "FeatureVectorManager.h"
struct TrainingEngineBackendInfo {
std::vector<std::string> input_layer_names;
* limitations under the License.
*/
-#include "data_set_manager.h"
+#include "DataSetManager.h"
using namespace std;
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc/imgproc.hpp>
-#include "machine_learning_exception.h"
-#include "feature_vector_manager.h"
+#include "MvMlException.h"
+#include "FeatureVectorManager.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
#include <dlog.h>
#include <mv_private.h>
-#include "machine_learning_exception.h"
-#include "label_manager.h"
+#include "MvMlException.h"
+#include "LabelManager.h"
using namespace std;
using namespace mediavision::machine_learning::exception;
#include <dlog.h>
#include <mv_private.h>
-#include "machine_learning_exception.h"
-#include "training_model.h"
+#include "MvMlException.h"
+#include "TrainingModel.h"
using namespace std;
using namespace TrainingEngineInterface::Common;
%files machine_learning-devel
%{_includedir}/media/mv_infer*.h
-%{_includedir}/media/machine_learning_exception.h
-%{_includedir}/media/machine_learning_config.h
-%{_includedir}/media/MachineLearningType.h
-%{_includedir}/media/machine_learning_preprocess.h
+%{_includedir}/media/MvMlException.h
+%{_includedir}/media/MvMlConfig.h
+%{_includedir}/media/mv_ml_types.h
+%{_includedir}/media/MvMlPreprocess.h
%{_libdir}/pkgconfig/*inference.pc
%if "%{enable_ml_face_recognition}" == "1"
%{_includedir}/media/mv_face_recognition*.h
%{_includedir}/media/mv_object_detection_type.h
%{_includedir}/media/mv_face_detection_internal.h
%{_includedir}/media/mv_face_detection_type.h
-%{_includedir}/media/iobject_detection.h
+%{_includedir}/media/IObjectDetection.h
%{_includedir}/media/object_detection_type.h
%{_libdir}/pkgconfig/*object-detection.pc
%endif
%if "%{enable_ml_image_segmentation}" == "1"
%{_includedir}/media/mv_selfie_segmentation_internal.h
%{_includedir}/media/mv_selfie_segmentation_type.h
-%{_includedir}/media/iimage_segmentation.h
+%{_includedir}/media/IImageSegmentation.h
%{_includedir}/media/image_segmentation_type.h
%{_libdir}/pkgconfig/*image-segmentation.pc
%endif