mv_machine_learning: rename file names
authorInki Dae <inki.dae@samsung.com>
Wed, 10 Jan 2024 06:36:35 +0000 (15:36 +0900)
committerInki Dae <inki.dae@samsung.com>
Wed, 17 Jan 2024 04:19:59 +0000 (13:19 +0900)
[Issue type] code clean

Rename file names of mv_machine_learning according to Tizen coding style
document.[1]

Below are rules used in this patch,
  - Class module refered by external modules uses "NanespaceClassname.*"
  - Class module used internally uses "Classname.*"
    . If "Classname" is duplicated with other task group then sub directory
  name can be added as a prefix.
  - Non class file referred by external modules uses "namespace_filename.*"
  - Non class file used internally uses "filename.*"
    . If "filename" is duplicated with other task group then sub directory
  name can be added as a prefix.

[1] https://wiki.tizen.org/Native_Platform_Coding_Idiom_and_Style_Guide

Change-Id: I0fe3a95a1b5b88b294e2d00ad1fe489143d6cd7d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
109 files changed:
mv_machine_learning/common/CMakeLists.txt
mv_machine_learning/common/include/AsyncManager.h [moved from mv_machine_learning/common/include/async_manager.h with 99% similarity]
mv_machine_learning/common/include/Context.h [moved from mv_machine_learning/common/include/context.h with 97% similarity]
mv_machine_learning/common/include/ITask.h [moved from mv_machine_learning/common/include/itask.h with 97% similarity]
mv_machine_learning/common/include/MvMlConfig.h [moved from mv_machine_learning/common/include/machine_learning_config.h with 91% similarity]
mv_machine_learning/common/include/MvMlException.h [moved from mv_machine_learning/common/include/machine_learning_exception.h with 94% similarity]
mv_machine_learning/common/include/common.h [moved from mv_machine_learning/common/include/mv_machine_learning_common.h with 95% similarity]
mv_machine_learning/common/include/keys.h [moved from mv_machine_learning/common/include/machine_learning_key.h with 96% similarity]
mv_machine_learning/common/include/mv_ml_types.h [moved from mv_machine_learning/common/include/MachineLearningType.h with 92% similarity]
mv_machine_learning/common/include/native_capi.h [moved from mv_machine_learning/common/include/MachineLearningNative.h with 94% similarity]
mv_machine_learning/common/meta/include/MvMlPreprocess.h [moved from mv_machine_learning/common/meta/include/machine_learning_preprocess.h with 94% similarity]
mv_machine_learning/common/meta/include/meta_common.h [moved from mv_machine_learning/common/meta/include/common.h with 96% similarity]
mv_machine_learning/common/meta/src/MetaParser.cpp
mv_machine_learning/common/meta/src/MvMlPreprocess.cpp [moved from mv_machine_learning/common/meta/src/machine_learning_preprocess.cpp with 98% similarity]
mv_machine_learning/common/meta/src/PostprocessParser.cpp
mv_machine_learning/common/src/MvMlConfig.cpp [moved from mv_machine_learning/common/src/machine_learning_config.cpp with 77% similarity]
mv_machine_learning/common/src/native_capi.cpp [moved from mv_machine_learning/common/src/MachineLearningNative.cpp with 98% similarity]
mv_machine_learning/face_recognition/include/FaceRecognition.h [moved from mv_machine_learning/face_recognition/include/face_recognition.h with 95% similarity]
mv_machine_learning/face_recognition/include/FaceRecognitionAdapter.h [moved from mv_machine_learning/face_recognition/include/face_recognition_adapter.h with 97% similarity]
mv_machine_learning/face_recognition/include/FaceRecognitionDSM.h [moved from mv_machine_learning/face_recognition/include/face_recognition_dsm.h with 94% similarity]
mv_machine_learning/face_recognition/include/FaceRecognitionFVM.h [moved from mv_machine_learning/face_recognition/include/face_recognition_fvm.h with 96% similarity]
mv_machine_learning/face_recognition/include/Facenet.h [moved from mv_machine_learning/face_recognition/include/facenet.h with 95% similarity]
mv_machine_learning/face_recognition/include/FacenetAdapter.h [moved from mv_machine_learning/face_recognition/include/facenet_adapter.h with 95% similarity]
mv_machine_learning/face_recognition/include/FacenetParser.h [moved from mv_machine_learning/face_recognition/include/facenet_parser.h with 100% similarity]
mv_machine_learning/face_recognition/include/SimpleShot.h [moved from mv_machine_learning/face_recognition/include/simple_shot.h with 97% similarity]
mv_machine_learning/face_recognition/src/FaceRecognition.cpp [moved from mv_machine_learning/face_recognition/src/face_recognition.cpp with 99% similarity]
mv_machine_learning/face_recognition/src/FaceRecognitionAdapter.cpp [moved from mv_machine_learning/face_recognition/src/face_recognition_adapter.cpp with 98% similarity]
mv_machine_learning/face_recognition/src/FaceRecognitionDSM.cpp [moved from mv_machine_learning/face_recognition/src/face_recognition_dsm.cpp with 98% similarity]
mv_machine_learning/face_recognition/src/FaceRecognitionFVM.cpp [moved from mv_machine_learning/face_recognition/src/face_recognition_fvm.cpp with 97% similarity]
mv_machine_learning/face_recognition/src/Facenet.cpp [moved from mv_machine_learning/face_recognition/src/facenet.cpp with 99% similarity]
mv_machine_learning/face_recognition/src/FacenetAdapter.cpp [moved from mv_machine_learning/face_recognition/src/facenet_adapter.cpp with 97% similarity]
mv_machine_learning/face_recognition/src/FacenetParser.cpp [moved from mv_machine_learning/face_recognition/src/facenet_parser.cpp with 94% similarity]
mv_machine_learning/face_recognition/src/mv_face_recognition.cpp
mv_machine_learning/face_recognition/src/simple_shot.cpp
mv_machine_learning/image_classification/include/IImageClassification.h [moved from mv_machine_learning/image_classification/include/iimage_classification.h with 100% similarity]
mv_machine_learning/image_classification/include/ImageClassification.h [moved from mv_machine_learning/image_classification/include/image_classification.h with 90% similarity]
mv_machine_learning/image_classification/include/ImageClassificationAdapter.h [moved from mv_machine_learning/image_classification/include/image_classification_adapter.h with 91% similarity]
mv_machine_learning/image_classification/include/ImageClassificationDefault.h [moved from mv_machine_learning/image_classification/include/image_classification_default.h with 91% similarity]
mv_machine_learning/image_classification/include/image_classification_type.h
mv_machine_learning/image_classification/src/ImageClassification.cpp [moved from mv_machine_learning/image_classification/src/image_classification.cpp with 97% similarity]
mv_machine_learning/image_classification/src/ImageClassificationAdapter.cpp [moved from mv_machine_learning/image_classification/src/image_classification_adapter.cpp with 96% similarity]
mv_machine_learning/image_classification/src/ImageClassificationDefault.cpp [moved from mv_machine_learning/image_classification/src/image_classification_default.cpp with 94% similarity]
mv_machine_learning/image_classification/src/ImageClassificationParser.cpp
mv_machine_learning/image_classification/src/mv_image_classification.cpp
mv_machine_learning/image_segmentation/CMakeLists.txt
mv_machine_learning/image_segmentation/include/IImageSegmentation.h [moved from mv_machine_learning/image_segmentation/include/iimage_segmentation.h with 100% similarity]
mv_machine_learning/image_segmentation/include/ImageSegmentation.h [moved from mv_machine_learning/image_segmentation/include/image_segmentation.h with 90% similarity]
mv_machine_learning/image_segmentation/include/ImageSegmentationAdapter.h [moved from mv_machine_learning/image_segmentation/include/selfie_segmentation_adapter.h with 94% similarity]
mv_machine_learning/image_segmentation/include/ImageSegmentationExternal.h [moved from mv_machine_learning/image_segmentation/include/image_segmentation_external.h with 98% similarity]
mv_machine_learning/image_segmentation/include/ImageSegmentationParser.h [moved from mv_machine_learning/image_segmentation/include/image_segmentation_parser.h with 100% similarity]
mv_machine_learning/image_segmentation/include/image_segmentation_type.h
mv_machine_learning/image_segmentation/src/ImageSegmentation.cpp [moved from mv_machine_learning/image_segmentation/src/image_segmentation.cpp with 98% similarity]
mv_machine_learning/image_segmentation/src/ImageSegmentationAdapter.cpp [moved from mv_machine_learning/image_segmentation/src/selfie_segmentation_adapter.cpp with 96% similarity]
mv_machine_learning/image_segmentation/src/ImageSegmentationExternal.cpp [moved from mv_machine_learning/image_segmentation/src/image_segmentation_external.cpp with 97% similarity]
mv_machine_learning/image_segmentation/src/ImageSegmentationParser.cpp [moved from mv_machine_learning/image_segmentation/src/image_segmentation_parser.cpp with 93% similarity]
mv_machine_learning/image_segmentation/src/mv_selfie_segmentation.cpp
mv_machine_learning/landmark_detection/include/FacialLandmarkAdapter.h [moved from mv_machine_learning/landmark_detection/include/facial_landmark_adapter.h with 92% similarity]
mv_machine_learning/landmark_detection/include/FldTweakCnn.h [moved from mv_machine_learning/landmark_detection/include/fld_tweak_cnn.h with 94% similarity]
mv_machine_learning/landmark_detection/include/ILandmarkDetection.h [moved from mv_machine_learning/landmark_detection/include/ilandmark_detection.h with 100% similarity]
mv_machine_learning/landmark_detection/include/LandmarkDetection.h [moved from mv_machine_learning/landmark_detection/include/landmark_detection.h with 92% similarity]
mv_machine_learning/landmark_detection/include/PldCpm.h [moved from mv_machine_learning/landmark_detection/include/pld_cpm.h with 89% similarity]
mv_machine_learning/landmark_detection/include/PoseLandmarkAdapter.h [moved from mv_machine_learning/landmark_detection/include/pose_landmark_adapter.h with 92% similarity]
mv_machine_learning/landmark_detection/include/landmark_detection_type.h
mv_machine_learning/landmark_detection/src/FacialLandmarkAdapter.cpp [moved from mv_machine_learning/landmark_detection/src/facial_landmark_adapter.cpp with 97% similarity]
mv_machine_learning/landmark_detection/src/FldTweakCnn.cpp [moved from mv_machine_learning/landmark_detection/src/fld_tweak_cnn.cpp with 96% similarity]
mv_machine_learning/landmark_detection/src/LandmarkDetection.cpp [moved from mv_machine_learning/landmark_detection/src/landmark_detection.cpp with 98% similarity]
mv_machine_learning/landmark_detection/src/LandmarkDetectionParser.cpp
mv_machine_learning/landmark_detection/src/PldCpm.cpp [moved from mv_machine_learning/landmark_detection/src/pld_cpm.cpp with 97% similarity]
mv_machine_learning/landmark_detection/src/PoseLandmarkAdapter.cpp [moved from mv_machine_learning/landmark_detection/src/pose_landmark_adapter.cpp with 97% similarity]
mv_machine_learning/landmark_detection/src/mv_facial_landmark.cpp
mv_machine_learning/landmark_detection/src/mv_pose_landmark.cpp
mv_machine_learning/object_detection/CMakeLists.txt
mv_machine_learning/object_detection/include/FaceDetectionAdapter.h [moved from mv_machine_learning/object_detection/include/face_detection_adapter.h with 93% similarity]
mv_machine_learning/object_detection/include/IObjectDetection.h [moved from mv_machine_learning/object_detection/include/iobject_detection.h with 100% similarity]
mv_machine_learning/object_detection/include/MobilenetV1Ssd.h [moved from mv_machine_learning/object_detection/include/mobilenet_v1_ssd.h with 94% similarity]
mv_machine_learning/object_detection/include/MobilenetV2Ssd.h [moved from mv_machine_learning/object_detection/include/mobilenet_v2_ssd.h with 95% similarity]
mv_machine_learning/object_detection/include/ObjectDetection.h [moved from mv_machine_learning/object_detection/include/object_detection.h with 92% similarity]
mv_machine_learning/object_detection/include/ObjectDetectionAdapter.h [moved from mv_machine_learning/object_detection/include/object_detection_adapter.h with 92% similarity]
mv_machine_learning/object_detection/include/ObjectDetectionExternal.h [moved from mv_machine_learning/object_detection/include/object_detection_external.h with 98% similarity]
mv_machine_learning/object_detection/include/object_detection_type.h
mv_machine_learning/object_detection/src/FaceDetectionAdapter.cpp [moved from mv_machine_learning/object_detection/src/face_detection_adapter.cpp with 96% similarity]
mv_machine_learning/object_detection/src/MobilenetV1Ssd.cpp [moved from mv_machine_learning/object_detection/src/mobilenet_v1_ssd.cpp with 96% similarity]
mv_machine_learning/object_detection/src/MobilenetV2AnchorParser.cpp
mv_machine_learning/object_detection/src/MobilenetV2Ssd.cpp [moved from mv_machine_learning/object_detection/src/mobilenet_v2_ssd.cpp with 98% similarity]
mv_machine_learning/object_detection/src/ObjectDetection.cpp [moved from mv_machine_learning/object_detection/src/object_detection.cpp with 98% similarity]
mv_machine_learning/object_detection/src/ObjectDetectionAdapter.cpp [moved from mv_machine_learning/object_detection/src/object_detection_adapter.cpp with 96% similarity]
mv_machine_learning/object_detection/src/ObjectDetectionExternal.cpp [moved from mv_machine_learning/object_detection/src/object_detection_external.cpp with 97% similarity]
mv_machine_learning/object_detection/src/ObjectDetectionParser.cpp
mv_machine_learning/object_detection/src/mv_face_detection.cpp
mv_machine_learning/object_detection/src/mv_object_detection.cpp
mv_machine_learning/object_detection_3d/include/IObjectDetection3d.h [moved from mv_machine_learning/object_detection_3d/include/iobject_detection_3d.h with 100% similarity]
mv_machine_learning/object_detection_3d/include/ObjectDetection3d.h [moved from mv_machine_learning/object_detection_3d/include/object_detection_3d.h with 92% similarity]
mv_machine_learning/object_detection_3d/include/ObjectDetection3dAdapter.h [moved from mv_machine_learning/object_detection_3d/include/object_detection_3d_adapter.h with 92% similarity]
mv_machine_learning/object_detection_3d/include/Objectron.h [moved from mv_machine_learning/object_detection_3d/include/objectron.h with 92% similarity]
mv_machine_learning/object_detection_3d/include/object_detection_3d_type.h
mv_machine_learning/object_detection_3d/src/ObjectDetection3d.cpp [moved from mv_machine_learning/object_detection_3d/src/object_detection_3d.cpp with 97% similarity]
mv_machine_learning/object_detection_3d/src/ObjectDetection3dAdapter.cpp [moved from mv_machine_learning/object_detection_3d/src/object_detection_3d_adapter.cpp with 97% similarity]
mv_machine_learning/object_detection_3d/src/ObjectDetection3dParser.cpp
mv_machine_learning/object_detection_3d/src/Objectron.cpp [moved from mv_machine_learning/object_detection_3d/src/objectron.cpp with 96% similarity]
mv_machine_learning/object_detection_3d/src/mv_object_detection_3d.cpp
mv_machine_learning/training/include/DataSetManager.h [moved from mv_machine_learning/training/include/data_set_manager.h with 97% similarity]
mv_machine_learning/training/include/FeatureVectorManager.h [moved from mv_machine_learning/training/include/feature_vector_manager.h with 100% similarity]
mv_machine_learning/training/include/LabelManager.h [moved from mv_machine_learning/training/include/label_manager.h with 100% similarity]
mv_machine_learning/training/include/TrainingModel.h [moved from mv_machine_learning/training/include/training_model.h with 96% similarity]
mv_machine_learning/training/src/DataSetManager.cpp [moved from mv_machine_learning/training/src/data_set_manager.cpp with 98% similarity]
mv_machine_learning/training/src/FeatureVectorManager.cpp [moved from mv_machine_learning/training/src/feature_vector_manager.cpp with 97% similarity]
mv_machine_learning/training/src/LabelManager.cpp [moved from mv_machine_learning/training/src/label_manager.cpp with 98% similarity]
mv_machine_learning/training/src/TrainingModel.cpp [moved from mv_machine_learning/training/src/training_model.cpp with 98% similarity]
packaging/capi-media-vision.spec

index c192745..ba81c4e 100644 (file)
@@ -10,9 +10,9 @@ target_include_directories(${PROJECT_NAME} PRIVATE include meta/include ../../in
 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
@@ -28,7 +28,7 @@
 
 #include <mv_common.h>
 #include <mv_inference_type.h>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
 
 #ifdef LOG_TAG
 #undef LOG_TAG
similarity index 97%
rename from mv_machine_learning/common/include/context.h
rename to mv_machine_learning/common/include/Context.h
index f2b7b3d..ea6c654 100644 (file)
@@ -18,7 +18,7 @@
 #define __CONTEXT_H__
 
 #include <map>
-#include "itask.h"
+#include "ITask.h"
 
 namespace mediavision
 {
similarity index 97%
rename from mv_machine_learning/common/include/itask.h
rename to mv_machine_learning/common/include/ITask.h
index a55865c..ee68dd2 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef __ITASK_H__
 #define __ITASK_H__
 
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
 #include <string>
 
 namespace mediavision
@@ -14,8 +14,8 @@
  * 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"
@@ -27,7 +27,7 @@ namespace mediavision
 {
 namespace machine_learning
 {
-class MachineLearningConfig
+class Config
 {
 private:
        std::unique_ptr<MetaParser> _parser;
@@ -43,8 +43,8 @@ private:
        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);
@@ -14,8 +14,8 @@
  * 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>
@@ -86,4 +86,4 @@ public:
 }; // MachineLearning
 }; // Mediavision
 
-#endif // __MACHINE_LEARNING_EXCEPTION_H__
+#endif // __MV_ML_EXCEPTION_H__
@@ -14,8 +14,8 @@
  * 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>
@@ -14,8 +14,8 @@
  * 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
@@ -98,4 +98,4 @@
  */
 #define MV_USE_PLUGIN "USE_PLUGIN"
 
-#endif /* __MACHINE_LEARNING_KEY_H__ */
+#endif /* __KEYS_H__ */
@@ -14,8 +14,8 @@
  * 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
 {
@@ -14,8 +14,8 @@
  * 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>
@@ -31,7 +31,7 @@
 #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.
  */
@@ -90,4 +90,4 @@ private:
 } /* machine_learning */
 } /* mediavision */
 
-#endif /* __MACHINE_LEARNING_PREPROCESS_H__ */
+#endif /* __MV_ML_PREPROCESS_H__ */
@@ -23,7 +23,7 @@
 #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"
 
index 5b66500..56aebae 100644 (file)
@@ -18,9 +18,9 @@
 #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;
@@ -20,8 +20,8 @@
 #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 },
index fb4effa..cacc2f6 100644 (file)
@@ -18,9 +18,9 @@
 #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;
@@ -14,9 +14,9 @@
  * 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;
@@ -27,70 +27,70 @@ namespace mediavision
 {
 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;
@@ -105,7 +105,7 @@ static bool IsJsonFile(const string &fileName)
        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);
 
@@ -159,7 +159,7 @@ void MachineLearningConfig::parseConfigFile(const std::string &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);
 
@@ -176,7 +176,7 @@ void MachineLearningConfig::parsePluginConfigFile(const std::string &pluginConfi
                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);
@@ -16,8 +16,8 @@
 
 #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
 {
@@ -19,8 +19,8 @@
 
 #include <string>
 
-#include "feature_vector_manager.h"
-#include "data_set_manager.h"
+#include "FeatureVectorManager.h"
+#include "DataSetManager.h"
 
 class FaceRecognitionDSM : public DataSetManager
 {
@@ -20,7 +20,7 @@
 #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
 {
@@ -20,9 +20,9 @@
 #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
 {
@@ -18,7 +18,7 @@
 #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;
@@ -14,8 +14,8 @@
  * 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>
 
@@ -18,8 +18,8 @@
 #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
@@ -17,8 +17,8 @@
 #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;
@@ -19,8 +19,8 @@
 #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;
@@ -14,8 +14,8 @@
  * 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;
@@ -14,8 +14,8 @@
  * 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;
index ee257dd..b9f2e4e 100644 (file)
 
 #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"
 
index eb6c0a0..d508ac5 100644 (file)
 
 #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
 {
@@ -50,7 +50,7 @@ private:
 
 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;
@@ -62,7 +62,7 @@ protected:
        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
 {
@@ -33,7 +33,7 @@ class ImageClassificationAdapter : public mediavision::common::ITask
 {
 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();
@@ -21,7 +21,7 @@
 #include <mv_common.h>
 #include "mv_private.h"
 
-#include "image_classification.h"
+#include "ImageClassification.h"
 #include <mv_inference_type.h>
 #include "EngineConfig.h"
 
@@ -38,7 +38,7 @@ private:
        ImageClassificationResult _result;
 
 public:
-       ImageClassificationDefault(std::shared_ptr<MachineLearningConfig> config);
+       ImageClassificationDefault(std::shared_ptr<Config> config);
        ~ImageClassificationDefault();
 
        ImageClassificationResult &result() override;
 #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;
@@ -35,8 +35,7 @@ namespace mediavision
 {
 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>();
 }
@@ -16,9 +16,9 @@
 
 #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;
@@ -31,7 +31,7 @@ namespace machine_learning
 {
 ImageClassificationAdapter::ImageClassificationAdapter()
 {
-       _config = make_shared<MachineLearningConfig>();
+       _config = make_shared<Config>();
        _config->parseConfigFile(_config_file_name);
 
        create();
@@ -18,8 +18,8 @@
 #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;
@@ -31,7 +31,7 @@ namespace mediavision
 namespace machine_learning
 {
 template<typename T>
-ImageClassificationDefault<T>::ImageClassificationDefault(shared_ptr<MachineLearningConfig> config)
+ImageClassificationDefault<T>::ImageClassificationDefault(shared_ptr<Config> config)
                : ImageClassification<T>(config), _result()
 {}
 
index 72f681f..965ff5c 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
 #include "ImageClassificationParser.h"
 
 using namespace std;
index 208624e..89296e4 100644 (file)
 
 #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>
index 1e3d958..5d29c85 100644 (file)
@@ -23,6 +23,6 @@ install(
 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
 {
@@ -55,7 +55,7 @@ private:
 
 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;
@@ -67,7 +67,7 @@ protected:
        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;
@@ -20,9 +20,9 @@
 #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
 {
@@ -32,7 +32,7 @@ class ImageSegmentationAdapter : public mediavision::common::ITask
 {
 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";
 
index e6a459c..0b9f688 100644 (file)
@@ -21,7 +21,7 @@
 
 #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;
@@ -34,7 +34,7 @@ namespace mediavision
 {
 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>();
 }
@@ -14,9 +14,9 @@
  * 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;
@@ -30,7 +30,7 @@ namespace machine_learning
 {
 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.
@@ -19,8 +19,8 @@
 
 #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;
@@ -15,8 +15,8 @@
  */
 #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;
index 5c3c25b..7bd6754 100644 (file)
 
 #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
 {
@@ -33,7 +33,7 @@ class FacialLandmarkAdapter : public mediavision::common::ITask
 {
 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);
@@ -22,7 +22,7 @@
 #include <mv_common.h>
 #include "mv_private.h"
 
-#include "landmark_detection.h"
+#include "LandmarkDetection.h"
 #include <mv_inference_type.h>
 
 namespace mediavision
@@ -39,7 +39,7 @@ private:
        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
 {
@@ -52,7 +52,7 @@ private:
 
 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;
@@ -64,7 +64,7 @@ protected:
        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();
@@ -22,7 +22,7 @@
 #include <mv_common.h>
 #include "mv_private.h"
 
-#include "landmark_detection.h"
+#include "LandmarkDetection.h"
 #include <mv_inference_type.h>
 
 namespace mediavision
@@ -38,7 +38,7 @@ private:
        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
 {
@@ -33,7 +33,7 @@ class PoseLandmarkAdapter : public mediavision::common::ITask
 {
 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);
index f131029..80a947b 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <mv_common.h>
 #include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
 
 namespace mediavision
 {
@@ -14,8 +14,8 @@
  * 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;
@@ -29,7 +29,7 @@ namespace machine_learning
 {
 FacialLandmarkAdapter::FacialLandmarkAdapter()
 {
-       _config = make_shared<MachineLearningConfig>();
+       _config = make_shared<Config>();
        _config->parseConfigFile(_config_file_name);
 
        create(_config->getDefaultModelName());
@@ -18,8 +18,8 @@
 #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;
@@ -31,7 +31,7 @@ namespace mediavision
 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()
 {}
 
@@ -20,9 +20,9 @@
 #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;
@@ -35,7 +35,7 @@ namespace mediavision
 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>();
index 2321ffa..d47c6ee 100644 (file)
@@ -15,7 +15,7 @@
  */
 #include <memory>
 
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
 #include "LandmarkDetectionParser.h"
 #include "landmark_detection_type.h"
 
@@ -18,9 +18,9 @@
 #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;
@@ -32,7 +32,7 @@ namespace mediavision
 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()
 {}
 
@@ -14,8 +14,8 @@
  * 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;
@@ -29,7 +29,7 @@ namespace machine_learning
 {
 PoseLandmarkAdapter::PoseLandmarkAdapter()
 {
-       _config = make_shared<MachineLearningConfig>();
+       _config = make_shared<Config>();
        _config->parseConfigFile(_config_file_name);
 
        create(_config->getDefaultModelName());
index 40d2ae4..f98d2a6 100644 (file)
 
 #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>
index 09dc5ed..8abf04c 100644 (file)
 
 #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>
index 96a95a2..121791c 100644 (file)
@@ -25,6 +25,6 @@ install(
 install(
        DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include/media
        FILES_MATCHING
-       PATTERN "iobject_detection.h"
+       PATTERN "IObjectDetection.h"
        PATTERN "object_detection_type.h"
        )
@@ -20,9 +20,9 @@
 #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
 {
@@ -32,7 +32,7 @@ class FaceDetectionAdapter : public mediavision::common::ITask
 {
 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";
 
@@ -22,7 +22,7 @@
 #include <mv_common.h>
 #include "mv_private.h"
 
-#include "object_detection.h"
+#include "ObjectDetection.h"
 #include <mv_inference_type.h>
 
 namespace mediavision
@@ -39,7 +39,7 @@ private:
        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;
@@ -22,7 +22,7 @@
 #include <mv_common.h>
 #include "mv_private.h"
 
-#include "object_detection.h"
+#include "ObjectDetection.h"
 #include <mv_inference_type.h>
 
 namespace mediavision
@@ -45,7 +45,7 @@ private:
        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
 {
@@ -56,7 +56,7 @@ private:
 
 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;
@@ -68,7 +68,7 @@ protected:
        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
 {
@@ -33,7 +33,7 @@ class ObjectDetectionAdapter : public mediavision::common::ITask
 {
 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";
 
index 467374b..b5e3b94 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <mv_common.h>
 #include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
 
 namespace mediavision
 {
@@ -14,9 +14,9 @@
  * 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;
@@ -30,7 +30,7 @@ namespace machine_learning
 {
 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.
@@ -18,9 +18,9 @@
 #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;
@@ -32,7 +32,7 @@ namespace mediavision
 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()
 {}
 
index 066fa85..42c3526 100644 (file)
@@ -18,9 +18,9 @@
 #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;
@@ -19,9 +19,9 @@
 #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;
@@ -33,7 +33,7 @@ namespace mediavision
 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;
@@ -35,7 +35,7 @@ namespace mediavision
 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>();
@@ -14,9 +14,9 @@
  * 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;
@@ -30,7 +30,7 @@ namespace machine_learning
 {
 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.
@@ -19,8 +19,8 @@
 
 #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;
index 4505297..d440042 100644 (file)
@@ -15,7 +15,7 @@
  */
 #include <memory>
 
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
 #include "ObjectDetectionParser.h"
 #include "object_detection_type.h"
 #include "MobilenetV2AnchorParser.h"
index f5470d1..b73cbb3 100644 (file)
 
 #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>
index 4fd9b9d..b492d34 100644 (file)
 
 #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
 {
@@ -46,7 +46,7 @@ private:
 
 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;
@@ -58,7 +58,7 @@ protected:
        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
 {
@@ -33,7 +33,7 @@ class ObjectDetection3dAdapter : public mediavision::common::ITask
 {
 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);
@@ -20,9 +20,9 @@
 #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
@@ -39,7 +39,7 @@ private:
        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;
index bd86601..ecbfd0b 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <mv_common.h>
 #include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
 
 namespace mediavision
 {
@@ -20,9 +20,9 @@
 #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;
@@ -35,8 +35,7 @@ namespace mediavision
 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>();
@@ -14,8 +14,8 @@
  * 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;
@@ -28,7 +28,7 @@ namespace machine_learning
 {
 ObjectDetection3dAdapter::ObjectDetection3dAdapter()
 {
-       _config = make_shared<MachineLearningConfig>();
+       _config = make_shared<Config>();
        _config->parseConfigFile(_config_file_name);
 
        create(_config->getDefaultModelName());
index 373ef5c..37d2bf9 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #include <iostream>
-#include "machine_learning_exception.h"
+#include "MvMlException.h"
 #include "ObjectDetection3dParser.h"
 
 using namespace std;
@@ -18,8 +18,8 @@
 #include <map>
 #include <algorithm>
 
-#include "machine_learning_exception.h"
-#include "objectron.h"
+#include "MvMlException.h"
+#include "Objectron.h"
 #include "Postprocess.h"
 
 using namespace std;
@@ -31,7 +31,7 @@ namespace mediavision
 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()
 {}
 
index ff238ce..d43b5c4 100644 (file)
 
 #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>
@@ -21,7 +21,7 @@
 #include <vector>
 #include <map>
 
-#include "feature_vector_manager.h"
+#include "FeatureVectorManager.h"
 
 class DataSetManager
 {
@@ -25,8 +25,8 @@
 #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;
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "data_set_manager.h"
+#include "DataSetManager.h"
 
 using namespace std;
 
@@ -17,8 +17,8 @@
 #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;
@@ -17,8 +17,8 @@
 #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;
@@ -26,8 +26,8 @@
 #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;
index 9f93e88..461e13d 100644 (file)
@@ -411,10 +411,10 @@ find . -name '*.gcno' -not -path "./test/*" -not -path "./mv_machine_learning/*"
 
 %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
@@ -431,7 +431,7 @@ find . -name '*.gcno' -not -path "./test/*" -not -path "./mv_machine_learning/*"
 %{_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
@@ -450,7 +450,7 @@ find . -name '*.gcno' -not -path "./test/*" -not -path "./mv_machine_learning/*"
 %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