summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwanghoon Son <k.son@samsung.com>2022-09-15 01:08:26 -0400
committerKwanghoon Son <k.son@samsung.com>2022-09-15 01:08:26 -0400
commitade8239371eb41feb901cced7cd1a51e5e514e60 (patch)
tree148a186154f71409ae7ab98090f70cd7fc8fadf5
parentbd71b171abe786ab0290151eefef6963fa42386a (diff)
downloadmediavision-ade8239371eb41feb901cced7cd1a51e5e514e60.tar.gz
mediavision-ade8239371eb41feb901cced7cd1a51e5e514e60.tar.bz2
mediavision-ade8239371eb41feb901cced7cd1a51e5e514e60.zip
Change Info class to structsandbox/inki.dae/object_detection_3d
[Issue type] refactoring ObjectDecoder class needs access all of Info member variables. So all of Info class variables need to get method because it is just struct of data. Since Info classes not have any special member function, struct is more suitable for data access. Change-Id: Ifa470fbb17344451584e0b93ad6faf859c021eba Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r--mv_machine_learning/inference/include/BoxInfo.h4
-rw-r--r--mv_machine_learning/inference/include/DecodeInfo.h4
-rw-r--r--mv_machine_learning/inference/include/DimInfo.h4
-rw-r--r--mv_machine_learning/inference/include/ScoreInfo.h5
4 files changed, 4 insertions, 13 deletions
diff --git a/mv_machine_learning/inference/include/BoxInfo.h b/mv_machine_learning/inference/include/BoxInfo.h
index 131e6076..dedc7e30 100644
--- a/mv_machine_learning/inference/include/BoxInfo.h
+++ b/mv_machine_learning/inference/include/BoxInfo.h
@@ -48,9 +48,8 @@ struct Number
DimInfo dimInfo;
};
-class BoxInfo
+struct BoxInfo
{
-private:
std::vector<std::string> names;
DimInfo dimInfo;
inference_box_type_e type = INFERENCE_BOX_TYPE_ORIGIN_LEFTTOP; // 0:L-T-R-B, 1: Cx-Cy-W-H
@@ -75,7 +74,6 @@ private:
{ "YOLO_ANCHOR", INFERENCE_BOX_DECODING_TYPE_YOLO_ANCHOR }
};
-public:
~BoxInfo() = default;
std::string GetName();
diff --git a/mv_machine_learning/inference/include/DecodeInfo.h b/mv_machine_learning/inference/include/DecodeInfo.h
index 3a5fef8b..67c7e326 100644
--- a/mv_machine_learning/inference/include/DecodeInfo.h
+++ b/mv_machine_learning/inference/include/DecodeInfo.h
@@ -101,9 +101,8 @@ struct RoiOptionParam
int mode;
};
-class DecodeInfo
+struct DecodeInfo
{
-private:
AnchorParam anchorParam;
std::vector<cv::Rect2f> anchorBoxes;
CellParam cellParam;
@@ -111,7 +110,6 @@ private:
RotateParam rotParam;
RoiOptionParam roiOptParam;
-public:
DecodeInfo()
{
cellParam.type = INFERENCE_SCORE_TYPE_NORMAL;
diff --git a/mv_machine_learning/inference/include/DimInfo.h b/mv_machine_learning/inference/include/DimInfo.h
index 3c0782a6..e32c43fd 100644
--- a/mv_machine_learning/inference/include/DimInfo.h
+++ b/mv_machine_learning/inference/include/DimInfo.h
@@ -24,12 +24,10 @@ namespace mediavision
{
namespace inference
{
-class DimInfo
+struct DimInfo
{
-private:
std::vector<int> dims;
-public:
std::vector<int> GetValidIndexAll() const
{
LOGI("ENTER");
diff --git a/mv_machine_learning/inference/include/ScoreInfo.h b/mv_machine_learning/inference/include/ScoreInfo.h
index 69a0d453..4592f7f9 100644
--- a/mv_machine_learning/inference/include/ScoreInfo.h
+++ b/mv_machine_learning/inference/include/ScoreInfo.h
@@ -41,9 +41,8 @@ struct DeQuantization
{}
};
-class ScoreInfo
+struct ScoreInfo
{
-private:
std::vector<std::string> names;
DimInfo dimInfo;
double threshold = 0.0;
@@ -52,8 +51,6 @@ private:
std::shared_ptr<DeQuantization> deQuantization;
std::map<std::string, inference_score_type_e> supportedScoreTypes = { { "NORMAL", INFERENCE_SCORE_TYPE_NORMAL },
{ "SIGMOID", INFERENCE_SCORE_TYPE_SIGMOID } };
-
-public:
~ScoreInfo() = default;
std::string GetName()