From: Kwanghoon Son Date: Thu, 15 Sep 2022 05:08:26 +0000 (-0400) Subject: Change Info class to struct X-Git-Tag: submit/tizen/20220921.082242^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fsandbox%2Finki.dae%2Fobject_detection_3d;p=platform%2Fcore%2Fapi%2Fmediavision.git Change Info class to struct [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 --- 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 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 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 dims; -public: std::vector 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 names; DimInfo dimInfo; double threshold = 0.0; @@ -52,8 +51,6 @@ private: std::shared_ptr deQuantization; std::map supportedScoreTypes = { { "NORMAL", INFERENCE_SCORE_TYPE_NORMAL }, { "SIGMOID", INFERENCE_SCORE_TYPE_SIGMOID } }; - -public: ~ScoreInfo() = default; std::string GetName()