summaryrefslogtreecommitdiff
path: root/mv_machine_learning/object_detection
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2024-01-10 15:36:35 +0900
committerInki Dae <inki.dae@samsung.com>2024-01-17 13:19:59 +0900
commiteb2d65dd6e4cee21a97c69d9fbacec0eda17692d (patch)
tree2bdf55642da372c5ae84df9eaf20f11b49943500 /mv_machine_learning/object_detection
parent7db97ca0b3d957b2444fa8e6ba685184c3c8af19 (diff)
downloadmediavision-eb2d65dd6e4cee21a97c69d9fbacec0eda17692d.tar.gz
mediavision-eb2d65dd6e4cee21a97c69d9fbacec0eda17692d.tar.bz2
mediavision-eb2d65dd6e4cee21a97c69d9fbacec0eda17692d.zip
mv_machine_learning: rename file names
[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>
Diffstat (limited to 'mv_machine_learning/object_detection')
-rw-r--r--mv_machine_learning/object_detection/CMakeLists.txt2
-rw-r--r--mv_machine_learning/object_detection/include/FaceDetectionAdapter.h (renamed from mv_machine_learning/object_detection/include/face_detection_adapter.h)8
-rw-r--r--mv_machine_learning/object_detection/include/IObjectDetection.h (renamed from mv_machine_learning/object_detection/include/iobject_detection.h)0
-rw-r--r--mv_machine_learning/object_detection/include/MobilenetV1Ssd.h (renamed from mv_machine_learning/object_detection/include/mobilenet_v1_ssd.h)4
-rw-r--r--mv_machine_learning/object_detection/include/MobilenetV2Ssd.h (renamed from mv_machine_learning/object_detection/include/mobilenet_v2_ssd.h)4
-rw-r--r--mv_machine_learning/object_detection/include/ObjectDetection.h (renamed from mv_machine_learning/object_detection/include/object_detection.h)12
-rw-r--r--mv_machine_learning/object_detection/include/ObjectDetectionAdapter.h (renamed from mv_machine_learning/object_detection/include/object_detection_adapter.h)10
-rw-r--r--mv_machine_learning/object_detection/include/ObjectDetectionExternal.h (renamed from mv_machine_learning/object_detection/include/object_detection_external.h)2
-rw-r--r--mv_machine_learning/object_detection/include/object_detection_type.h2
-rw-r--r--mv_machine_learning/object_detection/src/FaceDetectionAdapter.cpp (renamed from mv_machine_learning/object_detection/src/face_detection_adapter.cpp)8
-rw-r--r--mv_machine_learning/object_detection/src/MobilenetV1Ssd.cpp (renamed from mv_machine_learning/object_detection/src/mobilenet_v1_ssd.cpp)6
-rw-r--r--mv_machine_learning/object_detection/src/MobilenetV2AnchorParser.cpp4
-rw-r--r--mv_machine_learning/object_detection/src/MobilenetV2Ssd.cpp (renamed from mv_machine_learning/object_detection/src/mobilenet_v2_ssd.cpp)6
-rw-r--r--mv_machine_learning/object_detection/src/ObjectDetection.cpp (renamed from mv_machine_learning/object_detection/src/object_detection.cpp)8
-rw-r--r--mv_machine_learning/object_detection/src/ObjectDetectionAdapter.cpp (renamed from mv_machine_learning/object_detection/src/object_detection_adapter.cpp)8
-rw-r--r--mv_machine_learning/object_detection/src/ObjectDetectionExternal.cpp (renamed from mv_machine_learning/object_detection/src/object_detection_external.cpp)4
-rw-r--r--mv_machine_learning/object_detection/src/ObjectDetectionParser.cpp2
-rw-r--r--mv_machine_learning/object_detection/src/mv_face_detection.cpp10
-rw-r--r--mv_machine_learning/object_detection/src/mv_object_detection.cpp10
19 files changed, 55 insertions, 55 deletions
diff --git a/mv_machine_learning/object_detection/CMakeLists.txt b/mv_machine_learning/object_detection/CMakeLists.txt
index 96a95a25..121791ca 100644
--- a/mv_machine_learning/object_detection/CMakeLists.txt
+++ b/mv_machine_learning/object_detection/CMakeLists.txt
@@ -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"
)
diff --git a/mv_machine_learning/object_detection/include/face_detection_adapter.h b/mv_machine_learning/object_detection/include/FaceDetectionAdapter.h
index ae4cb68a..2ebb7a88 100644
--- a/mv_machine_learning/object_detection/include/face_detection_adapter.h
+++ b/mv_machine_learning/object_detection/include/FaceDetectionAdapter.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";
diff --git a/mv_machine_learning/object_detection/include/iobject_detection.h b/mv_machine_learning/object_detection/include/IObjectDetection.h
index 5a64ad1d..5a64ad1d 100644
--- a/mv_machine_learning/object_detection/include/iobject_detection.h
+++ b/mv_machine_learning/object_detection/include/IObjectDetection.h
diff --git a/mv_machine_learning/object_detection/include/mobilenet_v1_ssd.h b/mv_machine_learning/object_detection/include/MobilenetV1Ssd.h
index bb309bf7..e8e9d387 100644
--- a/mv_machine_learning/object_detection/include/mobilenet_v1_ssd.h
+++ b/mv_machine_learning/object_detection/include/MobilenetV1Ssd.h
@@ -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;
diff --git a/mv_machine_learning/object_detection/include/mobilenet_v2_ssd.h b/mv_machine_learning/object_detection/include/MobilenetV2Ssd.h
index c598c43e..1f6f7891 100644
--- a/mv_machine_learning/object_detection/include/mobilenet_v2_ssd.h
+++ b/mv_machine_learning/object_detection/include/MobilenetV2Ssd.h
@@ -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;
diff --git a/mv_machine_learning/object_detection/include/object_detection.h b/mv_machine_learning/object_detection/include/ObjectDetection.h
index a839ad25..03bce201 100644
--- a/mv_machine_learning/object_detection/include/object_detection.h
+++ b/mv_machine_learning/object_detection/include/ObjectDetection.h
@@ -32,10 +32,10 @@
#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;
diff --git a/mv_machine_learning/object_detection/include/object_detection_adapter.h b/mv_machine_learning/object_detection/include/ObjectDetectionAdapter.h
index bec6c567..098964e4 100644
--- a/mv_machine_learning/object_detection/include/object_detection_adapter.h
+++ b/mv_machine_learning/object_detection/include/ObjectDetectionAdapter.h
@@ -20,10 +20,10 @@
#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";
diff --git a/mv_machine_learning/object_detection/include/object_detection_external.h b/mv_machine_learning/object_detection/include/ObjectDetectionExternal.h
index ff63117d..e82f0bb7 100644
--- a/mv_machine_learning/object_detection/include/object_detection_external.h
+++ b/mv_machine_learning/object_detection/include/ObjectDetectionExternal.h
@@ -24,7 +24,7 @@
#include <opencv2/imgproc.hpp>
#include "object_detection_type.h"
-#include "iobject_detection.h"
+#include "IObjectDetection.h"
namespace mediavision
{
diff --git a/mv_machine_learning/object_detection/include/object_detection_type.h b/mv_machine_learning/object_detection/include/object_detection_type.h
index 467374b5..b5e3b944 100644
--- a/mv_machine_learning/object_detection/include/object_detection_type.h
+++ b/mv_machine_learning/object_detection/include/object_detection_type.h
@@ -21,7 +21,7 @@
#include <mv_common.h>
#include <mv_inference_type.h>
-#include "MachineLearningType.h"
+#include "mv_ml_types.h"
namespace mediavision
{
diff --git a/mv_machine_learning/object_detection/src/face_detection_adapter.cpp b/mv_machine_learning/object_detection/src/FaceDetectionAdapter.cpp
index 99eaa95b..30188442 100644
--- a/mv_machine_learning/object_detection/src/face_detection_adapter.cpp
+++ b/mv_machine_learning/object_detection/src/FaceDetectionAdapter.cpp
@@ -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.
diff --git a/mv_machine_learning/object_detection/src/mobilenet_v1_ssd.cpp b/mv_machine_learning/object_detection/src/MobilenetV1Ssd.cpp
index 5dcbed01..cb3c7ef8 100644
--- a/mv_machine_learning/object_detection/src/mobilenet_v1_ssd.cpp
+++ b/mv_machine_learning/object_detection/src/MobilenetV1Ssd.cpp
@@ -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()
{}
diff --git a/mv_machine_learning/object_detection/src/MobilenetV2AnchorParser.cpp b/mv_machine_learning/object_detection/src/MobilenetV2AnchorParser.cpp
index 066fa853..42c3526d 100644
--- a/mv_machine_learning/object_detection/src/MobilenetV2AnchorParser.cpp
+++ b/mv_machine_learning/object_detection/src/MobilenetV2AnchorParser.cpp
@@ -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;
diff --git a/mv_machine_learning/object_detection/src/mobilenet_v2_ssd.cpp b/mv_machine_learning/object_detection/src/MobilenetV2Ssd.cpp
index 41afeb39..47ed03a3 100644
--- a/mv_machine_learning/object_detection/src/mobilenet_v2_ssd.cpp
+++ b/mv_machine_learning/object_detection/src/MobilenetV2Ssd.cpp
@@ -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()
{}
diff --git a/mv_machine_learning/object_detection/src/object_detection.cpp b/mv_machine_learning/object_detection/src/ObjectDetection.cpp
index 539dd186..ea31f322 100644
--- a/mv_machine_learning/object_detection/src/object_detection.cpp
+++ b/mv_machine_learning/object_detection/src/ObjectDetection.cpp
@@ -19,10 +19,10 @@
#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>();
diff --git a/mv_machine_learning/object_detection/src/object_detection_adapter.cpp b/mv_machine_learning/object_detection/src/ObjectDetectionAdapter.cpp
index cc883026..1b7e4c6e 100644
--- a/mv_machine_learning/object_detection/src/object_detection_adapter.cpp
+++ b/mv_machine_learning/object_detection/src/ObjectDetectionAdapter.cpp
@@ -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.
diff --git a/mv_machine_learning/object_detection/src/object_detection_external.cpp b/mv_machine_learning/object_detection/src/ObjectDetectionExternal.cpp
index 1829cb70..2af7c8a0 100644
--- a/mv_machine_learning/object_detection/src/object_detection_external.cpp
+++ b/mv_machine_learning/object_detection/src/ObjectDetectionExternal.cpp
@@ -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;
diff --git a/mv_machine_learning/object_detection/src/ObjectDetectionParser.cpp b/mv_machine_learning/object_detection/src/ObjectDetectionParser.cpp
index 45052975..d4400424 100644
--- a/mv_machine_learning/object_detection/src/ObjectDetectionParser.cpp
+++ b/mv_machine_learning/object_detection/src/ObjectDetectionParser.cpp
@@ -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"
diff --git a/mv_machine_learning/object_detection/src/mv_face_detection.cpp b/mv_machine_learning/object_detection/src/mv_face_detection.cpp
index f5470d1a..b73cbb3d 100644
--- a/mv_machine_learning/object_detection/src/mv_face_detection.cpp
+++ b/mv_machine_learning/object_detection/src/mv_face_detection.cpp
@@ -16,13 +16,13 @@
#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>
diff --git a/mv_machine_learning/object_detection/src/mv_object_detection.cpp b/mv_machine_learning/object_detection/src/mv_object_detection.cpp
index 4fd9b9d4..b492d34c 100644
--- a/mv_machine_learning/object_detection/src/mv_object_detection.cpp
+++ b/mv_machine_learning/object_detection/src/mv_object_detection.cpp
@@ -16,13 +16,13 @@
#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>