platform/core/api/mediavision.git
2 years agomv3d: fix wrong parameters order 38/282738/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/hotfix/20221116.104736 accepted/tizen/unified/20221012.014917 tizen_7.0_m2_release
Tae-Young Chung [Tue, 11 Oct 2022 03:30:59 +0000 (12:30 +0900)]
mv3d: fix wrong parameters order

[Version]: 0.23.36-0
[Issue type]: fix bad bug

Change-Id: I0c7e2c12afac2df7561fac3a072800d7bdc9e006
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agomv3d: update mv_depth_test_suite 27/282527/4
Tae-Young Chung [Wed, 5 Oct 2022 05:31:05 +0000 (14:31 +0900)]
mv3d: update mv_depth_test_suite

[Version]: 0.23.35-0
[Issue type]: update test

- apply coding convention
- update global functions to static ones
- remove unused variables

Change-Id: Ibf8cb916cda98a9656e99632add7897f5c8f2947
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoroi_tracker: Fix default tracker type value as integer 26/282526/3 accepted/tizen/unified/20221006.151843 submit/tizen/20221005.080230
Hyunsoo Park [Wed, 5 Oct 2022 05:07:52 +0000 (14:07 +0900)]
roi_tracker: Fix default tracker type value as integer

[Issue type] : bug fix
[Version]: 0.23.35-0
- From this patch, tracker type set as default correctly.

Change-Id: I4fc4073f204ea46c46db631f7422e80317b0b452
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv3d: add mv_test_3d for testing mv3d module 88/282488/5
Tae-Young Chung [Tue, 4 Oct 2022 08:22:21 +0000 (17:22 +0900)]
mv3d: add mv_test_3d for testing mv3d module

[Version]: 0.23.34-0
[Issue type] : update test

Change-Id: I859593365ddc19cc232a8073a5bbe87e8f46081b
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoroi_tracker: sets to use default tracker type 19/282219/13 submit/tizen/20221004.074305
Hyunsoo Park [Wed, 28 Sep 2022 10:45:46 +0000 (19:45 +0900)]
roi_tracker: sets to use default tracker type

[Issue type] : bug fix
[Version]: 0.23.33-0
- From this patch, tracker type is checked for error handling.
If it has wrong setting, default type would be set.

Change-Id: I92935555fcfbfc14a970290b54f79fb3f6520a68
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoroi_tracker: move checking codes 14/282214/3
Hyunsoo Park [Wed, 28 Sep 2022 09:39:38 +0000 (18:39 +0900)]
roi_tracker: move checking codes

[Version]: 0.23.32-0
[Issue type] : code clean up

Change-Id: I334d859ac84a239ac4c48816dd75240954d14ede
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_barcode: code cleanup to mv_barcode_generate_open.cpp 37/282337/2
Inki Dae [Fri, 30 Sep 2022 03:02:52 +0000 (12:02 +0900)]
mv_barcode: code cleanup to mv_barcode_generate_open.cpp

[Version]: 0.23.31-0
[Issue type] : code cleanup

Just drop unnecessary code and use LOGE instead of LOGW in case of an error.

Change-Id: I696731722df593527e92b58888f881177d9d8728
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv3d: fix bug 47/282247/1 accepted/tizen/unified/20220930.020559
Tae-Young Chung [Thu, 29 Sep 2022 05:28:44 +0000 (14:28 +0900)]
mv3d: fix bug

[Version] : 0.23.30-0
[Issue type] : bug fix

parameters orders are wrong in mv3dRunAsync()

Change-Id: Ib06b26dffeae8a8088713ba9f5b51e39f8cf6621
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoMerge "mv3d: fix bugs" into tizen accepted/tizen/unified/20220928.144450
sangho park [Wed, 28 Sep 2022 01:36:28 +0000 (01:36 +0000)]
Merge "mv3d: fix bugs" into tizen

2 years agomv3d: fix bugs 66/282166/1
sangho park [Fri, 23 Sep 2022 06:42:31 +0000 (15:42 +0900)]
mv3d: fix bugs

[Issue type] : bug fix for building mv_3d (add compile_definitions)

Change-Id: Ic325fc0bb82122ae014538fb60c7cd2096e71e6b
Signed-off-by: sangho park <sangho.g.park@samsung.com>
2 years agomv3d: fix typo 65/282165/1
sangho park [Fri, 23 Sep 2022 05:01:29 +0000 (14:01 +0900)]
mv3d: fix typo

[Issue type] : fix typo MMV_3D_POINTCLOUD_IS_AVAILABLE to MV_3D_POINTCLOUD_IS_AVAILABLE in spec file

Change-Id: I5f384053219829b046c39178889ad1049218669c
Signed-off-by: sangho park <sangho.g.park@samsung.com>
2 years agoCheck new vision.3d features 39/282139/2
Tae-Young Chung [Tue, 27 Sep 2022 08:14:38 +0000 (17:14 +0900)]
Check new vision.3d features

[Version] : 0.23.29-0
[Issue type] : update

According to ACR-1720, new features, vision.3d, vision.3d.depth,
vision.3d.pointcloud, are added.

Change-Id: I02ff894588cd20ff11039a80cf9fcd91cada602f
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agomv_3d: fix svace issue (SIGNED_TO_BIGGER_UNSIGNED) 98/282098/2
Seungbae Shin [Tue, 27 Sep 2022 04:57:53 +0000 (13:57 +0900)]
mv_3d: fix svace issue (SIGNED_TO_BIGGER_UNSIGNED)

[Version] : 0.23.29-0
[Issue type] : bug fix

fix svace wgid 499263

Change-Id: Iea3cf1342f2b1b090d3fef626e26898e65a0c631

2 years agomv_3d: fix coverity issue 89/282089/3 accepted/tizen/unified/20220928.020828
sangho park [Tue, 27 Sep 2022 03:49:37 +0000 (12:49 +0900)]
mv_3d: fix coverity issue

[Version] : 0.23.28-0
[Issue type] : bug fix

fix coverity DefectId 1612132, 1612134, 1612135 (Unchecked return value)

Change-Id: Ib618ab460996f40572e8084b743954eb7fad20c1
Signed-off-by: sangho park <sangho.g.park@samsung.com>
2 years agomv_3d: fix coverity issue 88/282088/2
sangho park [Tue, 27 Sep 2022 03:42:43 +0000 (12:42 +0900)]
mv_3d: fix coverity issue

[Version] : 0.23.27-0
[Issue type] : bug fix

fix coverity DefectId 1612133 (resource leak)

Change-Id: I8a8b9a0783db79f3695dc637445dfe62d0b2ea92
Signed-off-by: sangho park <sangho.g.park@samsung.com>
2 years agomv_machine_learning: fix coverity issue 82/282082/3
Inki Dae [Tue, 27 Sep 2022 02:19:02 +0000 (11:19 +0900)]
mv_machine_learning: fix coverity issue

[Version] : 0.23.26-0
[Issue type] : bug fix

Fixed a coverity issue by handling an error value correctly.

Change-Id: Icce85a27e2be29f38799a4f312d40978d60e59eb
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv3d: fix bugs wrong lib name in CMakeLists.txt accepted/tizen/unified/20220926.025502
Tae-Young Chung [Thu, 22 Sep 2022 07:49:08 +0000 (16:49 +0900)]
mv3d: fix bugs wrong lib name in CMakeLists.txt

[Issue type] : bug fix

Change-Id: Ica7aa7c43f0c49bb685c5a4e93989f9ea28ea5fd
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agomv3d: fix bugs
Tae-Young Chung [Thu, 22 Sep 2022 05:24:48 +0000 (14:24 +0900)]
mv3d: fix bugs

[Issue type] : bug fix (SVACE: WGID 499255,499256,499263,499267)

499255: fix flcose() with nullptr
499256: fix delete operation with malloc()
499263: fix assignment of a signed integer value to a bigger size_t
499267: fix memory leak of suffix_for_algo

Change-Id: I415baa95286527007e3b8aff8befd218ebe0a09b
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agomv3d: fix a bug using nullptr
Tae-Young Chung [Thu, 22 Sep 2022 04:21:45 +0000 (13:21 +0900)]
mv3d: fix a bug using nullptr

[Issue type] : bug fix (SVACE: WGID 499264)

mDepthCallback uses deallocated memory of the variable 'base'.
It should be mv_source_h of a left image.
With dfs-adaptation change,
```
commit 1607630a5887d961cd71d0e9663e9945d70fc3ae
Author: Tae-Young Chung <ty83.chung@samsung.com>
Date:   Thu Sep 22 13:19:04 2022 +0900

    Add getLeftData() and getRigthData()

    [Version] 1.0.9-0
    [Issue type] update
```
getLeftData() returns the pointer of a left image
and the returned pointer is used to fill mv_source_h.

Change-Id: I89af7686e485a102bc444720583bf26739e08809

2 years agomv3d: add MV_3D_POINTCLOUD_AVAILABLE macro
sangho park [Wed, 21 Sep 2022 11:10:49 +0000 (20:10 +0900)]
mv3d: add MV_3D_POINTCLOUD_AVAILABLE macro

[Issue type] : supports pointcloud feature for aarch64 only

Change-Id: I32323b3e587f17b74d06fe1d2058f20084ebdaae
Signed-off-by: sangho park <sangho.g.park@samsung.com>
2 years agomv3d: fix build warning and cleanup
Inki Dae [Wed, 21 Sep 2022 09:00:07 +0000 (18:00 +0900)]
mv3d: fix build warning and cleanup

[Issue type] : code cleanup

Change-Id: I86daac442b5aadb0b40ead94f28b10fc4944ffed
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoMerge branch 'tizen_devel' into tizen submit/tizen/20220921.082242
Kwanghoon Son [Wed, 21 Sep 2022 08:14:02 +0000 (04:14 -0400)]
Merge branch 'tizen_devel' into tizen

Change-Id: I913d76601535f1d860f4bdd18c552697a6c9ede2
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoMerge changes I33594b22,Id9842754 into tizen_devel refact
kwang son [Wed, 21 Sep 2022 08:04:47 +0000 (08:04 +0000)]
Merge changes I33594b22,Id9842754 into tizen_devel

* changes:
  Change metadata class to struct
  Drop Yolo CellParm

2 years agoAdd pointcloud implementation for mv_3d APIs 36/281736/2
sangho park [Wed, 21 Sep 2022 07:46:01 +0000 (16:46 +0900)]
Add pointcloud implementation for mv_3d APIs

[Issue type] new feature

Change-Id: I7571bb1d67607e7d0c423296ce7d4c5c6fb7de6e
Signed-off-by: sangho park <sangho.g.park@samsung.com>
2 years agoAdd mv_3d apis supporting depth and pointcloud data 33/281733/2
Tae-Young Chung [Mon, 22 Aug 2022 11:22:12 +0000 (20:22 +0900)]
Add mv_3d apis supporting depth and pointcloud data

[Issue type] new feature

Change-Id: I04539a0ab6c393302a895a5c1402983e7c20d0ed
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
2 years agoChange metadata class to struct 21/281721/1 splitDec
Kwanghoon Son [Wed, 21 Sep 2022 05:05:23 +0000 (01:05 -0400)]
Change metadata class to struct

[Issue type] refactoring

OutputMetadata 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: I33594b225173314a42585738ac8a32d49efc8493
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoDrop Yolo CellParm 04/281704/1
Kwanghoon Son [Wed, 21 Sep 2022 02:37:37 +0000 (22:37 -0400)]
Drop Yolo CellParm

Yolo object detection not use CellParm anymore

Change-Id: Id9842754634b6f134b02f417c96ea24f5fc69096
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoChange Info class to struct 63/281263/1 sandbox/inki.dae/object_detection_3d
Kwanghoon Son [Thu, 15 Sep 2022 05:08:26 +0000 (01:08 -0400)]
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 <k.son@samsung.com>
2 years agoMerge "Add Yolo anchor parser and test" into tizen_devel
kwang son [Tue, 13 Sep 2022 23:58:10 +0000 (23:58 +0000)]
Merge "Add Yolo anchor parser and test" into tizen_devel

2 years agoRefactoring Inference 48/280948/7
Kwanghoon Son [Wed, 7 Sep 2022 05:17:08 +0000 (01:17 -0400)]
Refactoring Inference

[Issue type] refactoring

- remove C style typedef
- class initialization
- remove redundancy code

Change-Id: Ib3297732e1bd89cb81168983d3aaad9a53928bcb
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoAdd Yolo anchor parser and test 20/281120/3
Kwanghoon Son [Tue, 13 Sep 2022 02:03:32 +0000 (22:03 -0400)]
Add Yolo anchor parser and test

[Issue type] New feature

commit from https://review.tizen.org/gerrit/c/platform/core/api/mediavision/+/272777

Change-Id: I3652cd0adb4a0c1b34d8b3b6ba5ff9c61838ae1e
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_machine_learning: add copyright to test code 31/281131/1
Inki Dae [Tue, 13 Sep 2022 06:14:18 +0000 (15:14 +0900)]
mv_machine_learning: add copyright to test code

[Version] : 0.23.25-0
[Issue type] : code clean

Added copyright to all test code.

Change-Id: I10b09b74b6e29bf389652d83a563c35b28187ab6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoMerge "mv_machine_learning: bug fix to face recognition API" into tizen
Inki Dae [Tue, 13 Sep 2022 06:13:40 +0000 (06:13 +0000)]
Merge "mv_machine_learning: bug fix to face recognition API" into tizen

2 years agomv_machine_learning: bug fix to face recognition API 25/280925/4
Inki Dae [Wed, 7 Sep 2022 01:13:13 +0000 (10:13 +0900)]
mv_machine_learning: bug fix to face recognition API

[Version] : 0.23.24-0
[Issue type] : bug fix and cleanup

Fixed a bug that it doesn't return an error from get_result() without
inference request. This patch makes get_result() to return an error
without inference request, adds a test case for it, and drops redundant code.

Change-Id: I552c81ae05247e1489c94d5069be11f7c0acd884
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoMerge "Fix memory leak" into tizen
kwang son [Tue, 13 Sep 2022 05:49:29 +0000 (05:49 +0000)]
Merge "Fix memory leak" into tizen

2 years agoFix memory leak 61/280961/1
Kwanghoon Son [Wed, 7 Sep 2022 07:10:27 +0000 (03:10 -0400)]
Fix memory leak

[Version] : 0.23.24-0
[Issue type] : bug fix

mv_engine_config_get_string_attribute allocate memory inside of function.

Change-Id: Ia511b42a45a2b04ee818396bba0a8dee356331bc
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoRefactoring Metadata 64/280864/3
Kwanghoon Son [Tue, 6 Sep 2022 05:41:02 +0000 (01:41 -0400)]
Refactoring Metadata

[Issue type] refactoring

- split long header implementation
- class initialization
- remove unused function

Change-Id: I049c3ebdf64980e9737d66e8afc122bc1b6cc395
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoRefactoring Box, ScoreInfo 58/280858/2
Kwanghoon Son [Tue, 6 Sep 2022 04:16:02 +0000 (00:16 -0400)]
Refactoring Box, ScoreInfo

[Issue type] refactoring

- split long header implementation
- add missing header
- remove 'this' accessor
- class initialization

Change-Id: I8014892edaceccadd9abcd9c1b45fc0dcd971e33
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoroi tracker: Adds parameter checking 66/280866/1
Hyunsoo Park [Tue, 6 Sep 2022 06:03:23 +0000 (15:03 +0900)]
roi tracker: Adds parameter checking

[Issue type] Improvement

Change-Id: I3f84bac4a18c395925975d1898d865e58774d355
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoAdd Object detection test(Mobilenet V2) 93/280793/2
Kwanghoon Son [Mon, 5 Sep 2022 07:31:17 +0000 (03:31 -0400)]
Add Object detection test(Mobilenet V2)

Change-Id: Idaec609087f0ec8767f0daf135edaae1eca06f30
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoApply clang-format 15/280715/3
Kwanghoon Son [Fri, 2 Sep 2022 09:25:40 +0000 (05:25 -0400)]
Apply clang-format

[Issue type] Clean code
[Version] 0.23.23

This patch only change code convention.

Change-Id: I5f1d3dd56ecd5d962c8a9a52087ed8315db156a6
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoAdd SNPE efficient net test
Kwanghoon Son [Fri, 2 Sep 2022 05:29:40 +0000 (01:29 -0400)]
Add SNPE efficient net test

[Issue type] new test

Change-Id: Ia141001c1957709075da62416e6d4c0c6dc89916
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoApply clang-format rule
Kwanghoon Son [Thu, 1 Sep 2022 07:07:38 +0000 (03:07 -0400)]
Apply clang-format rule

[Issue type] refactoring

Change-Id: Ib947e0660c3b1057859dbc1c96650a8de4370a0a
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_machine_learning: Use Preprocess class instead of legacy one
Inki Dae [Thu, 1 Sep 2022 00:41:17 +0000 (09:41 +0900)]
mv_machine_learning: Use Preprocess class instead of legacy one

[Issue type] code refactoring

Did code refactoring to Run function of Inference class by replacing
existing internal Preprocess function with the one of Proprocess class.
We can use Preprocess class instead of Inference class internal one.
With this change, we can use Preprocess class commonly.

Change-Id: Id22de1532ce352abb013ad6bb26075c74a835949
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoDisable SNPE gtest
Kwanghoon Son [Wed, 31 Aug 2022 02:28:53 +0000 (22:28 -0400)]
Disable SNPE gtest

[Issue type] : Change

Snpe test needs special hardware which is not related with public tizen
test. To enable snpe test, run mv_test with --gtest_also_run_disabled_tests

Change-Id: I36fdc978b0298ab435ff1e5a91f63703c685c86e
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_machine_learning: code cleanup to Options and LayerInfo classes
Inki Dae [Tue, 30 Aug 2022 04:54:46 +0000 (13:54 +0900)]
mv_machine_learning: code cleanup to Options and LayerInfo classes

[Issue type] : code cleanup

Cleaned up Options and LayerInfo classes by doing,
- Change Options and LayerInfo classes to structure type.
  No reason for they are class type. It's enough with structure type.

Change-Id: Ie50877881b6acb211b9d7ae5a0800f1e7185d78a
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoChange box name to vector in meta json
Kwanghoon Son [Mon, 29 Aug 2022 06:44:00 +0000 (02:44 -0400)]
Change box name to vector in meta json

outputmetadata box name was single string, but needs to change to
handle yolo models.(multiple names)
`before`
"box" :
    {
        "name" : "some name",
        ...
    }
`after`
"box" :
    {
        "name" : ["some name"],
        ...
    }

Change-Id: Ia76001c2670c0a1fae272c31ba56dfc0cbc591de
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoFix box array to object in meta json
Kwanghoon Son [Mon, 29 Aug 2022 06:00:14 +0000 (02:00 -0400)]
Fix box array to object in meta json

outputmetadata box object has array, but usage only accept 1 array
element. This change handle object instead array.
`before`
"box" : [
    {
        "name" : "some name",
        ...
    }
],
`after`
"box" :
    {
        "name" : "some name",
        ...
    }

Change-Id: If77d781a5f4bbf6beb7078e34edd5309f29a471e
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_machine_learning: code refactoring to Inference class
Inki Dae [Fri, 19 Aug 2022 10:51:00 +0000 (19:51 +0900)]
mv_machine_learning: code refactoring to Inference class

[Issue type] : code refactoring

Did code refactoring to Run member function of Inference class by doing,
- extracted a function which converts mv sources to cv ones. And
  this converting function is now considered for multiple sources.
- introduced a new util file which can contain common things
  to be used by machine learning relevant code.
- and did code sliding and renaming several variables.

This is just a step for next code refactoring and there are many things to do.

Change-Id: Ic78ef26156481def5ecda537657638c613a304d1
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoSplit BoxInfo implementation and add missing header
Kwanghoon Son [Mon, 29 Aug 2022 02:43:48 +0000 (22:43 -0400)]
Split BoxInfo implementation and add missing header

Change-Id: Idcf2a0d06986cb8b7b23ec94af582a6fa4f37991
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoChange score name to array in meta json
Kwanghoon Son [Mon, 29 Aug 2022 02:33:19 +0000 (22:33 -0400)]
Change score name to array in meta json

outputmetadata score name was single string, but needs to change to
handle yolo models.(multiple names)
`before`
"score" :
    {
        "name" : "some name",
        ...
    }
`after`
"score" :
    {
        "name" : ["some name"],
        ...
    }

Change-Id: Ie76b38ad6eb7665300b556c2d9ce0be576a537f3
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoFix score array to object in meta json
Kwanghoon Son [Fri, 26 Aug 2022 04:14:31 +0000 (00:14 -0400)]
Fix score array to object in meta json

outputmetadata score object has array, but usage only accept 1 array
element. This change handle object instead array.
`before`
"score" : [
    {
        "name" : "some name",
...
    }
],
`after`
"score" :
    {
        "name" : "some name",
...
    }

Change-Id: I5a3ddb4c4d29ffd7f2024a40e5065222d7197fc9
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoApply code lint and update copyright year
Kwanghoon Son [Fri, 26 Aug 2022 02:00:57 +0000 (22:00 -0400)]
Apply code lint and update copyright year

Change-Id: I53fd18c3c5b3961b8c7e8fb903199e4150bf03e3
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_machine_learning: code refactoring to Inference class
Inki Dae [Thu, 11 Aug 2022 23:04:14 +0000 (08:04 +0900)]
mv_machine_learning: code refactoring to Inference class

[Issue type] : code refactoring

Did code refactoring to Inference class by doing,
- extracted a function - ConvertOutputDataTypeToFloat - from
  FillOutputResult function, which converts tensor data to float type.
  In fact, float data of output tensor is needed commonly so
  converted output tensor data to float type just after inference is
  completed. And finally, it changed FillOuputResult function name to
  GetTensorInfo and moved it to TensorBuffer class.
- renamed several variables and function with meaningful name properly.

This patch is just a step for next code refactoring.

Change-Id: I4fd808ef05dd69203eb815a8230595aa1f1b7e54
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: code refactoring to GetClassficationResults
Inki Dae [Thu, 11 Aug 2022 01:31:43 +0000 (10:31 +0900)]
mv_machine_learning: code refactoring to GetClassficationResults

[Issue type] code cleanup

Did code refactoring to GetClassficationResults functions by doing,
- drop logs from computing relevant funtions due to performance
  eating issue.
- use FillOutputResult function instead of
  mOutputTensorBuffers.getValue() which is performance eating function
  because it tries to find tensor buffer with a given layer name
  for every iteration.
- and also drop the code smell, code duplication.

This patch is just a step for next code refactoring. Which in turn,
FillOuputResult function will be refactored soon in generic way
including dropping the performance eating functions.

Change-Id: I4d8779001143a569f2f76664511005e7fcd8b389
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: rename test cases for face recognition
Inki Dae [Tue, 9 Aug 2022 08:15:17 +0000 (17:15 +0900)]
mv_machine_learning: rename test cases for face recognition

[Issue type] : code cleanup

Renamed the test case names just for cleanup.

Change-Id: I446963fcc5f2b2d7fa81896d380f963cd7fbb409
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: code cleanup to face recognition
Inki Dae [Tue, 9 Aug 2022 07:57:11 +0000 (16:57 +0900)]
mv_machine_learning: code cleanup to face recognition

[Issue type]: code cleanup

Cleaned up face recognition framework by doing,
- use override keyword for virtual functions.
- call functions of base class instead of derived one.
- drop unused declaration.

Change-Id: I0fc528e85d7248b01fd9a12d4b00ca16b1209697
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoAdd clang-format namespace indent handle
Kwanghoon Son [Thu, 4 Aug 2022 06:05:53 +0000 (02:05 -0400)]
Add clang-format namespace indent handle

Change-Id: I03f59fb89576f329e98572a88a10899011920662
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoChange private member variable to protected
Kwanghoon Son [Tue, 2 Aug 2022 06:21:02 +0000 (02:21 -0400)]
Change private member variable to protected

[Issue type] : New feature

This patch is first series of Add MediaSensor class.
MediaSensor class try to access MediaSource member variable,
instead of setter function, declare with protected.

Change-Id: Ia208c5f9d0de960c13f219b3c411b41ffed6825a
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoAdd gcc -Wall -Wextra option
Kwanghoon Son [Wed, 3 Aug 2022 01:18:16 +0000 (21:18 -0400)]
Add gcc -Wall -Wextra option

[Issue type] : New feature

To prevent unsued variable or miss-type casting

Change-Id: Ia74af20014c136d84bfa1d80164e388c828b158b
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agoFix build warnings
Seungbae Shin [Tue, 19 Jul 2022 05:41:39 +0000 (14:41 +0900)]
Fix build warnings

[Issue type] build

- fix implicit function usage
- use _ instead of __ for non-static function
- use 'void' for void parameter function
- fix warning of cmake version requiring
- fix warning of macro argument comparison

Change-Id: I4f2bf41e6694c98d67bfe7f80e122468c3346f6c

2 years agomv_machine_learning: add try-catch statement
Inki Dae [Wed, 20 Jul 2022 07:22:54 +0000 (16:22 +0900)]
mv_machine_learning: add try-catch statement

[Issue type] bug fix

Added try-catch statement to mv_face_recognition_prepare_open function,
which was missed, printed out the error messages correctly.

Change-Id: I0753cda2b894c10033141f69a0a3e1d60eb303e7
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: fix coverity issues 67/280667/1 accepted/tizen/unified/20220905.124707 submit/tizen/20220902.080727
Inki Dae [Fri, 2 Sep 2022 03:41:08 +0000 (12:41 +0900)]
mv_machine_learning: fix coverity issues

[Verion] : 0.23.22-0
[Issue type] : bug fix

Fixed two coverity issues.

Change-Id: I883415d8411b077164a8d804efd5d9aabacd5b1f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_roi_tracker: fix typo 95/280495/2
Hyunsoo Park [Wed, 31 Aug 2022 02:34:46 +0000 (11:34 +0900)]
mv_roi_tracker: fix typo

[Version] : 0.23.21
[Issue type] : clean up

Change-Id: If7c9e169444f875a1456f768ec51dc0333e7f51d
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_roi_tracker: update docs 80/280380/1 accepted/tizen/unified/20220830.133716 submit/tizen/20220830.003207
Hyunsoo Park [Mon, 29 Aug 2022 08:23:24 +0000 (17:23 +0900)]
mv_roi_tracker: update docs

[Version] : 0.23.20
[Issue type] : clean up

Change-Id: I5538bb0a643bcdd8d92cf194c1ef00001e967756
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agoMerge "mv_machine_learning: fix wrong tensor order" into tizen
Inki Dae [Wed, 24 Aug 2022 01:53:32 +0000 (01:53 +0000)]
Merge "mv_machine_learning: fix wrong tensor order" into tizen

2 years agomv_roi_tracker: fix implicit function error 86/280086/1
Hyunsoo Park [Tue, 23 Aug 2022 09:23:45 +0000 (18:23 +0900)]
mv_roi_tracker: fix implicit function error

[Version] : 0.23.19
[Issue type] : bug fix

Change-Id: Ib4528ff7355df8839c0213dbeb618270a2e7ffb7
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_machine_learning: fix wrong tensor order 67/279967/1
Inki Dae [Fri, 19 Aug 2022 12:00:08 +0000 (21:00 +0900)]
mv_machine_learning: fix wrong tensor order

[Verion] : 0.23.19-0
[Issue type] : bug fix

Fixed wrong tensor order. Tensor order, NWHC, doesn't exist.
So correct the tensor order and return width, height and channel value
correctly.

Change-Id: I53b3078d2121c9718bc5a9864ebefd0d5907b7af
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_roi_tracker: add description to doc 21/279921/1 accepted/tizen/unified/20220825.063638 submit/tizen/20220819.073800 submit/tizen/20220823.063557 submit/tizen/20220825.024015
Hyunsoo Park [Fri, 19 Aug 2022 05:45:31 +0000 (14:45 +0900)]
mv_roi_tracker: add description to doc

[Version] : 0.23.18
[Issue type] : bug fix

Change-Id: Ibe3a79b8622fdcf1a69ed275d76739cbd2c8f194
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_machine_learning: add runtime requirements 93/279793/2
Inki Dae [Thu, 18 Aug 2022 03:33:38 +0000 (12:33 +0900)]
mv_machine_learning: add runtime requirements

[Version]: 0.23.17
[Issue type]: bug fix

Added runtime requirements to inference-engine-interface-common
and training-engine-interface-common which are needed in runtime.

Change-Id: I5d1d03d4a29fe17b9560be20c89b27136e425634
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoFix json non exist member parse 48/279748/3 sandbox/pcd-acr
Kwanghoon Son [Wed, 17 Aug 2022 06:45:22 +0000 (02:45 -0400)]
Fix json non exist member parse

[Version] : 0.23.16
[Issue type] : bug fix

top_number, threshold optional member.
If member not exist, use default value

Change-Id: I96f67d5e541ce5dcaacae760e3332b745c5a3654
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_common: fix memory leak issue 01/279601/3 submit/tizen/20220812.070529 submit/tizen/20220817.123406
Inki Dae [Fri, 12 Aug 2022 06:45:49 +0000 (15:45 +0900)]
mv_common: fix memory leak issue

[Version] : 0.23.15-0
[Issue type] : bug fix

Fixed memory leak issue of mv_engine_config_get_array_string_attribute_c
function.

Change-Id: Id490ddc88c8242c8ecb405230cdb4d934791b4f7
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: fix coverity issues 94/279594/2
Inki Dae [Fri, 12 Aug 2022 05:29:00 +0000 (14:29 +0900)]
mv_machine_learning: fix coverity issues

[Version] : 0.23.14
[Issue type] : bug fix

Fixed coverity issues.

Change-Id: I2e376d517d99722366a05f8ab584858808ec2194
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: fix memory leak issue 04/279504/2
Inki Dae [Wed, 10 Aug 2022 09:21:11 +0000 (18:21 +0900)]
mv_machine_learning: fix memory leak issue

[Version] : 0.23.13
[Issue type] bug fix.

Fixed a memory leak issue with non-meta file inference by introducing
convertToFloat function of TensorBuffer class, which clears owner_is_backend
so that the buffer allocated with float type can be released properly.

And also this patch drops the code smell, code duplication, and
renames existing function name - setTensorBuffer to addTensorBuffer.

Change-Id: I062aa9cf05fc6ebb53e4cfd0c4ae6bb0d98d65fe
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoFix access wrong json member 54/279454/1
Kwanghoon Son [Wed, 10 Aug 2022 01:40:14 +0000 (21:40 -0400)]
Fix access wrong json member

[Version] : 0.23.12
[Issue type] : Bug fix

This solve non exist member access message
json_object_get_int_member: assertion 'node != NULL' failed

Change-Id: I4c3d2f54795f16aada581bd32a725b5204afee79
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agomv_machine_learning: bug fix to recognition request 75/279375/2 accepted/tizen/unified/20220809.213751 submit/tizen/20220808.075156
Inki Dae [Mon, 8 Aug 2022 06:43:57 +0000 (15:43 +0900)]
mv_machine_learning: bug fix to recognition request

[Versin] : 0.23.11
[Issue type] : bug fix

Fixed a bug that it didn't handle an error case correctly
at recognition request without label file.

Without label file, recognition request incurred seg. fault issue so
this patch handles the error case correctly.

In addition, this patch adds a test case which tests a recognition request
without label file.

Change-Id: I9e577e4fe8e13f3865bfc2db4a60244626d31467
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: update face recognition framework 82/279082/3 accepted/tizen/unified/20220804.151651 submit/tizen/20220803.092938
Inki Dae [Mon, 1 Aug 2022 09:30:04 +0000 (18:30 +0900)]
mv_machine_learning: update face recognition framework

[Version] : 0.23.10
[Issue type] : code updating

Updated face recognition framework and its test case including cleanup
and bug fix.

What this patch does,
 - fix a bug that last label isn't removed by making all relevant files
   to be removed when last label removal is requested.
 - change default face recognition resource directory.
 - add two test cases and code cleanup to existing test cases.

Change-Id: I8e172e03d8c0f355da1cd61b4a2567086c232813
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agoMerge "mv_machine_learning: package face recognition header files" into tizen accepted/tizen/unified/20220728.131646 submit/tizen/20220728.081854
Inki Dae [Thu, 28 Jul 2022 08:16:58 +0000 (08:16 +0000)]
Merge "mv_machine_learning: package face recognition header files" into tizen

2 years agomv_machine_learning: package face recognition header files 33/278933/1
Inki Dae [Thu, 28 Jul 2022 07:49:19 +0000 (16:49 +0900)]
mv_machine_learning: package face recognition header files

[Version] : 0.23.9
[Issue type] : bug fix

Included face recognition header files missed to devel package.

Change-Id: I0aa05eafc79ddc24972f9ea01e30884850590078
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_roi_tracker : add type enum 15/278915/1 submit/tizen/20220728.050117
Hyunsoo Park [Thu, 28 Jul 2022 04:51:28 +0000 (13:51 +0900)]
mv_roi_tracker : add type enum

[Version] : 0.23.9
[Issue type] : bug fix

Change-Id: I28fa3c5df93dfe4886eb60ad7064462eb64f868a
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_machine_learning: fix seg. fault 81/278881/1
Inki Dae [Wed, 27 Jul 2022 08:58:17 +0000 (17:58 +0900)]
mv_machine_learning: fix seg. fault

[Version] : 0.23.8
[Issue type] : bug fix

Fixed a bug that seg. fault happens when mv_face_recognition_destroy() is
called just after mv_face_recognition_create(). _label_manager of
FaceRecognition class has no instance at mv_face_recognition_create() call
so check if _label_manager is nullptr or not.

Change-Id: Ie7948e4f6152f1ad3237600ab6ae64bc88e0ebf9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: fix a build error on VD server 58/278858/1 accepted/tizen/unified/20220728.044740 submit/tizen/20220727.043205
Inki Dae [Wed, 27 Jul 2022 04:07:26 +0000 (13:07 +0900)]
mv_machine_learning: fix a build error on VD server

[Version] : 0.23.7
[Issue type] : bug fix

Fixed a build error on VD server due to face recognition relevant library
dependency. VD don't use the face recognition framework so this patch
breaks the build dependency.

Change-Id: Ieaf2f45afb7ebd9c80637a1c9a0dedce68ad77ec
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: add feature enabling option for face recognition 71/278771/3 submit/tizen/20220726.051149
Inki Dae [Tue, 26 Jul 2022 04:37:18 +0000 (13:37 +0900)]
mv_machine_learning: add feature enabling option for face recognition

[Version] : 0.23.6
[Issue type] cleanup

Added feature enabling option for face recognition framework.
With this patch, VD build error is fixed.

Change-Id: If80d718c3147104d53a712023a7a0c7b9ab3fca6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_common: fix utc negative test issue accepted/tizen/unified/20220726.012234 submit/tizen/20220721.064000 submit/tizen/20220725.050651
Inki Dae [Thu, 21 Jul 2022 05:26:40 +0000 (14:26 +0900)]
mv_common: fix utc negative test issue

[Issue type] bug fix

Fixed negative test issue of legacy face tracking test by
returning an error correctly. In case of invalid color space type,
INVALID_PARAMETER error should be returned according to
utc_mediavision_mv_face_track_n test case.

Change-Id: Ia74578eb33ea1bbc88681cd3abf6fa9d44e22169
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: cleanup mv_face_recognition_open.cpp
Inki Dae [Wed, 20 Jul 2022 04:51:19 +0000 (13:51 +0900)]
mv_machine_learning: cleanup mv_face_recognition_open.cpp

[Issue type] code cleanup

Cleaned up mv_face_recognition_open.cpp file by doing,
- rename itask -> task.
- use forward declarationn with "using" keyword.

Change-Id: I9a80f014efc83b6161cc09b561c1ca4e5183e453
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agotest/machine_learning: fix build error submit/tizen/20220720.053259
Inki Dae [Wed, 20 Jul 2022 05:20:47 +0000 (14:20 +0900)]
test/machine_learning: fix build error

[Issue type] bug fix

Fixed a build error by dropping duplicated declarations.

Change-Id: I594dc6e508c895a531f5944a597bbc6cb7972eee
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: cleanup namespace
Inki Dae [Mon, 18 Jul 2022 09:30:01 +0000 (18:30 +0900)]
mv_machine_learning: cleanup namespace

[Issue type] cleanup

Cleaned up the use of namespace for Face recognition framework
according to Tizen coding style document.

Change-Id: Ib5c8e751911c73a2d32e5ed453d3c04a51aef28c
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: introduce Context, ITask and adapter classes
Inki Dae [Fri, 1 Jul 2022 06:44:32 +0000 (15:44 +0900)]
mv_machine_learning: introduce Context, ITask and adapter classes

[Issue type] new feature

Introduced Context, ITask, and adapter class derived from ITask one.

With this patch, each Task API has a context which can have one more
itask objects for controlling inference or training modules.
The purpose of this patch is to keep same interfaces for each module.

As a reference, this patch applies this new approach to Face recognition
framework. This is just a step for next code refactoring
for multi models support.

Change-Id: Iad4c4df9fc87143723decadbc003787854e60e4b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agofixup! common: code refactoring to EngineConfig.cpp
Seungbae Shin [Mon, 18 Jul 2022 11:45:31 +0000 (20:45 +0900)]
fixup! common: code refactoring to EngineConfig.cpp

fix NO_CATCH defects

[Issue type] svace

Change-Id: Ia249796b28e7ab4f83b154e7da8d2ba68481d806

2 years agomv_roi_tracker: more refactoring
Seungbae Shin [Wed, 13 Jul 2022 09:29:56 +0000 (18:29 +0900)]
mv_roi_tracker: more refactoring

[Issue Type] Code Refactorying

- merge 'result' with 'boundingBox'
- rename member variables to start with __ prefix
- remove unnecessary initialized() method
- take mv_roi_tracker_type_e instead of mv_engine_config_h for the setting type
- return result by tuple instead

Change-Id: Id537086cbab2e56c474cae7343c40e6cf3af6e05

2 years agomv_roi_tracker: move logic to class subfuntion
Hyunsoo Park [Mon, 4 Jul 2022 09:19:11 +0000 (18:19 +0900)]
mv_roi_tracker: move logic to class subfuntion

[Issue Type] Code Refactorying

- Make logics class subfunction which is possible.

Change-Id: I10c934756dd7483db0ff1e20ec0efd8662c17e6c
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_common: Add buffer size check
Kwanghoon Son [Thu, 14 Jul 2022 05:38:05 +0000 (01:38 -0400)]
mv_common: Add buffer size check

[Issue type] : Bug fix

Change-Id: Iee755ff4d2871a5c1a809b3ec4eed0a73555008c
Reported-by: TSEVEN-2231
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agocommon: Clean duplicate code
Kwanghoon Son [Fri, 8 Jul 2022 04:21:23 +0000 (00:21 -0400)]
common: Clean duplicate code

[Issue type] clean up

clean up convertSourceMV2GrayCV

Change-Id: I9f8427bdc47771ccbe0e4dbe61b4ceab8a3e7730
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
2 years agocommon: code refactoring to EngineConfig.cpp
Inki Dae [Wed, 6 Jul 2022 02:09:11 +0000 (11:09 +0900)]
common: code refactoring to EngineConfig.cpp

[Issue type] code refactoring

Did code refactoring to EngineConfig.cpp file.

What this refactoring does,
 - change singletone way to OOP one.
 - drop redundant functions.
 - rename cacheDictionaries() to loadDictionaries() with
   its argument cleanup.

The purpose of this refactoring is for service based multiple models support
because config data of global config file will be moved to each config file
for each service, and EngineConfig class will be used commonly by each service
to manage its own config file.

Change-Id: I22cf241cc250a213507e87727bb86b01e929cde2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: update description
Inki Dae [Tue, 5 Jul 2022 06:06:49 +0000 (15:06 +0900)]
mv_machine_learning: update description

[Issue type] cleanup

Updated header and doc file description for face recognition CAPI,
which just reflects the feedback from API REVIEW step.

Change-Id: Id17eef55aafbd6a4c077b712fa5e8fe2a279f729
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_roi_tracker: api refactorying
Hyunsoo Park [Thu, 23 Jun 2022 09:35:27 +0000 (18:35 +0900)]
mv_roi_tracker: api refactorying

[Issue Type] Code Refactorying

- Remove struct out parameter possible to cause ABI break.
- Add 'mv_roi_tracker_get_result_roi' api as alternative.

Change-Id: Icb4bb3225ddaa1798b886cc875e59bd93bfb9fc7
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
2 years agomv_machine_learning: clean up description
Inki Dae [Tue, 28 Jun 2022 23:14:16 +0000 (08:14 +0900)]
mv_machine_learning: clean up description

[Issue type] : code cleanup

Cleaned up some descriptions to Face Recognition CAPI, which
applies some feedbacks from API REVIEW step of ACR.

Change-Id: Ifff3a6b627c365a7e3247832c0a4a567b1d40922
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: code refactoring to face recognition
Inki Dae [Wed, 22 Jun 2022 08:18:17 +0000 (17:18 +0900)]
mv_machine_learning: code refactoring to face recognition

[Issue type] code refactoring

Did code refactoring to Face recognition framework according to CAPI change.

What this refactoring does,
 - Move mv_face_recognition_result_s struct to face_recognition.cpp
   to avoid from potential ABI break.
 - Change the behavior of mv_face_recognition_inference_* functions.
   These functions return only whether error or not after inference.
 - Introduce new CAPI, mv_face_recognition_get_label_* functions.
   User can get the label string as inference result through this CAPI
   after the completion of inference.

Change-Id: Ie946a7caf9d18998597a1a21a99e252c68ee7426
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: cleanup face recognition API description
Inki Dae [Mon, 20 Jun 2022 05:47:19 +0000 (14:47 +0900)]
mv_machine_learning: cleanup face recognition API description

[Issue type] clean up

Cleaned up the face recognition API description pointed out at
API REVIEW step.

Change-Id: Ieec0df7a13af3bcdeb590fd0826d464af702de95
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2 years agomv_machine_learning: cleanup face recognition header
Inki Dae [Tue, 14 Jun 2022 05:46:41 +0000 (14:46 +0900)]
mv_machine_learning: cleanup face recognition header

[Issue type] cleanup

cleaned up face recognition header files pointed by ./check-header.py script

Change-Id: I8182c2080325bc071f9c9b9792d7c382d092503f
Signed-off-by: Inki Dae <inki.dae@samsung.com>