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>
kwang son [Tue, 13 Sep 2022 23:58:10 +0000 (23:58 +0000)]
Merge "Add Yolo anchor parser and test" into tizen_devel
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
Inki Dae [Wed, 24 Aug 2022 01:53:32 +0000 (01:53 +0000)]
Merge "mv_machine_learning: fix wrong tensor order" into tizen
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Inki Dae [Thu, 28 Jul 2022 08:16:58 +0000 (08:16 +0000)]
Merge "mv_machine_learning: package face recognition header files" into tizen
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Hyunsoo Park [Thu, 16 Jun 2022 07:42:13 +0000 (16:42 +0900)]
mv_roi_tracker: Adds test suite
[Issue type] add test
Change-Id: Ia34c393f9e4ce2702e8e0367ff66f3b666f85b12
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Hyunsoo Park [Tue, 14 Jun 2022 07:17:48 +0000 (16:17 +0900)]
mv_roi_tracker: Adds feature check
[Issue type] feature check
Feature key patch is below.
https://review.tizen.org/gerrit/#/c/platform/adaptation/unified-model-config/+/276303/
Change-Id: I736837b097d021f77a3dde6e5995ea9bd137f3c2
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Hyunsoo Park [Tue, 14 Jun 2022 02:34:55 +0000 (11:34 +0900)]
mv_roi_tracker: Adds setting tracker type api
[Issue type] new feature
Change-Id: Ibde49baef7110d45301494144f33312c795179b2
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Inki Dae [Thu, 9 Jun 2022 04:25:13 +0000 (13:25 +0900)]
mv_machine_learning: update CAPI descriptions
[Issue type] cleanup
Updated CAPI descriptions of Face Recognition Framework by dropping
redundant descriptions and adding missed ones.
Change-Id: Ib8d320bd5dc4e9c36486abe25a3ce3039036e431
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 9 Jun 2022 04:22:01 +0000 (13:22 +0900)]
mv_machine_learning: return correct error value
[Issue type] bug fix
Fixed a bug that CheckBackendType function returns wrong error value.
Change-Id: If3cbcc4039ad825238b56418b74dfa86b408b85e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Hyunsoo Park [Mon, 23 May 2022 09:14:32 +0000 (18:14 +0900)]
mv_roi_tracker: Improve API usage
[Version] : 0.23.1-0
[Issue type] : code refactoring
For improving api usage convenient, some are modified.
- Remove coordinates parameter of 'mv_roi_tracker_create'.
- Add new API 'mv_roi_tracker_set_coordinate'
Change-Id: I5837e9ad524a8ba03b3b103c8eccb97ede60c4e0
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Inki Dae [Mon, 30 May 2022 00:47:08 +0000 (09:47 +0900)]
test/machine_learning: fix positive and negative counting
[Issue type] bug fix
Fixed positive and negative counting.
Change-Id: I4689fc496e3fa36c118163cd498c838c023a92c9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Kwanghoon Son [Fri, 27 May 2022 02:24:21 +0000 (22:24 -0400)]
Add lcov exclude
[Version] 0.23.1
[Issue type] lcov
CPP files not fully supported by TCT.
Block lcov until covered by unit test.
Change-Id: I30e701414a4b05bea5593287d179cde168271c74
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
Inki Dae [Mon, 30 May 2022 00:44:50 +0000 (09:44 +0900)]
mv_machine_learning: use resnet based facenet model
[Issue type] etc
Changed the backbone model to resnet based facenet model from
mobilenet based one. So this patch modifies input and output layer
information.
Change-Id: I3a94604232e1673c7cac24bba611c0961df7d258
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 27 May 2022 08:28:56 +0000 (17:28 +0900)]
mv_machine_learning: code cleanup with code sliding
[Issue type] : code cleanup
Cleaned up mv_inference_prepare and mv_inference_prepare_open functions
by doing code sliding. Four configuration functions don't have to be called
in mv_inference.c so move them to mv_inference_open.cpp
because they configure information required by Load function.
This is a cleanup work for gathering relevant code to same place
for next code refactoring.
Change-Id: I2c9627832c77888d084a4c7441d9f70fa46a4317
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 26 May 2022 06:22:58 +0000 (15:22 +0900)]
mv_machine_learning: code refactoring
[Version] : 0.23.2-0
[Issue type] : code refactoring
Did code refactoring like below,
- Move ConfigureBackendType function to Inference class and do not
keep the backend type in Inference class. Instead, pass the backend
type through Bind function directly.
- Rename ConfigureBackendType to CheckBackendType. Now this function
checks if a given backend type is valid or not when Bind function
is called.
- Add some exception code.
This is just a step for next code refactoring.
Change-Id: Id81ba442656823540c45be00bc398d961662b6b0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Mon, 23 May 2022 09:34:59 +0000 (18:34 +0900)]
mv_machine_learning: code cleanup to mv_inference_open.cpp
[Version] : 0.23.1-0
[Issue type] : code cleanup
Cleaned up mv_inference_open.cpp module by dropping redundant code
and doing code sliding.
Change-Id: Iab8eab6465503a8403f0b029b094bbd49765d89d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Kwang Son [Tue, 24 May 2022 23:54:05 +0000 (19:54 -0400)]
Change gcov rpm packaging path
[Version] 0.23.0
[Issue type] Gcov
Change gcov package to show relative code path
gcov/obj/%{name} -> gcov/obj/%{name}/%{builddir}
Change-Id: I27895951a5e39d6b637ec9734a01b54f8679dfdc
Signed-off-by: Kwang Son <k.son@samsung.com>
Inki Dae [Fri, 20 May 2022 08:13:12 +0000 (17:13 +0900)]
mv_machine_learning: use Inference class
[Version] : 0.22.0-0
[Issue type] : code refactoring
Did code refactoring to Face Recognition Framework by making
it to use Inference class instead of InferenceEngineHelper class
which was a temporary class.
What this refactoring does,
- drop many duplicated code by removing InferenceEngineHelper class.
- introduce Run API to Inference class, which allows inference engine
to inference with buffer objects for preprocessing not required.
- disable data augmentation feature, which will be added later.
Change-Id: Ibb7454500821ef98de26e46ed1ce8971c1c23d57
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Hyunsoo Park [Fri, 20 May 2022 06:31:48 +0000 (15:31 +0900)]
mv_roi_tracker: update lib dependency
[Version] : 0.21.7-0
[Issue type] : bug fix
Change-Id: Ie04af3548435608c6cf0d485c831b9b730b8378f
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Inki Dae [Wed, 18 May 2022 06:35:39 +0000 (15:35 +0900)]
mv_machine_learning: Code refactoring to Prepare function
[Version] : 0.21.6-0
[Issue type] : code refactoring
Did code refactoring to mv_inference_open.cpp file by moving
some code to proper place and dropping Prepare function.
Only what Prepare function does is to check given target device types
and set them to a given backend engine but when BindBackend functin
is called in Inference class, SetTargetDevice is called.
It's code duplication and no need anymore.
In addition, call missed UnbindBackend call in error case.
Change-Id: I16aa6c79587175de89ea76891c10b8a75fa53de8
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Tue, 17 May 2022 10:15:19 +0000 (19:15 +0900)]
mv_machine_learning: code refactoring to mv_inference_open
[Version] : 0.21.5-0
[Issue type] : code refactoring
Did code refactoring to mv_inference_open.cpp file by moving
IsTargetDeviceSupported function to Inference class because
this function is valid only after Bind call. So no reason
for mv_inference_open.cpp to call IsTargetDeviceSupport function
to check if a given device type is valid or not.
And configure backend type as soon as getting the backend type from
the default ini file.
Change-Id: I5d51fb7c71fc737d111f0058e2b1c3ddf1ebf75f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 13 May 2022 07:39:40 +0000 (16:39 +0900)]
mv_machine_learning: code refactoring to Face Recognition
[Version] : 0.21.4-0
[Issue type] : code refactoring
Did code refactoring to Face Recognition Framework by doing,
- Make a top module of Face Recognition Framework to pass
backend engine information such as bacnend type and target device type.
- Move binding code of training engine to Initialize function from
RegisterNewFace and RecognizeFace functions. By doing this,
it enhance initial launching time because engine binding is done
only one time.
- Introduce ClearDataSet API which is a internal API of
TrainingModel class to drop all previous dataset data.
- Rename Prepare function to ImportLabel one because this function
imports the label data to in-memory from a file only now.
This is just a step for next code refactoring.
Change-Id: If8b4021793e62c290ce59362ed605215c2bf5e3e
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 13 May 2022 04:20:20 +0000 (13:20 +0900)]
mv_machine_learning: correct variable types and cleanup
[Version] : 0.21.3-0
[Issue type] : code cleanup
Corrected types of width and height values and dropped commeted code.
Change-Id: Ic94297e97b4ecb420675176a826a8df3febed134
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 12 May 2022 10:03:29 +0000 (19:03 +0900)]
mv_machine_learning: drop dead code
[Version] : 0.21.2-0
[Issue type] : code cleanup
Change-Id: I2939f8f21f798d40c4315ac628355d40d74ed0be
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 12 May 2022 09:55:51 +0000 (18:55 +0900)]
mv_machine_learning: pass mv_source_h instead of raw vector
[Version] : 0.21.1-0
[Issue type] : code cleanup
Cleaned up face recognition framework by passing mv_source_h
to face recognition framework instead of raw vector.
By doing this, converting mv_source_h to raw vector is done
in face recognition framework internally.
It is just a step for code refactoring to InferenceEngineHelper class.
Change-Id: I898e19bb8b1ba7d0380f45542ac7fbb8d01f5c59
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Wed, 11 May 2022 09:05:56 +0000 (18:05 +0900)]
mv_machine_learning: drop deprecated API
[Version] 0.21.0-0
[Issue type] code cleanup
Dropped the deprecated API and relevant code.
Change-Id: Id8d18955dd89a27eb56bc929bd79ae67741680de
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Wed, 11 May 2022 05:44:50 +0000 (14:44 +0900)]
test/machine_learning: do not verify label value
[Version] : 0.20.2-0
[Issue type] : fixup
Do not verify label name. Instead, just verify if API works or not,
and print out the accuracy.
Change-Id: I7432c7ee8055e49a8f51571aaf515a62f4747f75
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Wed, 11 May 2022 01:46:35 +0000 (10:46 +0900)]
mv_machine_learning: make abstract class
[Version] : 0.20.1-0
[Issue type] : code cleanup
Made two classes, DataSetManager and TrainingModel, as abstract class
by changing virtual functions to pure virtual ones.
Change-Id: I49d1cba4fd8fb96b065f18380f4b109928c1e1fe
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Hyunsoo Park [Tue, 26 Apr 2022 05:32:54 +0000 (14:32 +0900)]
mv_machine_learning: add tracker apis
[Version] : 0.20.0-0
[Issue type] : new feature
Tracking apis is track roi image are released.
Currently it is KCF algorithm based.
[CAPI Description]
mv_tracker_create
- Create tracker handle and set desired initial roi to be tracked.
mv_tracker_perform
- Return roi value in given frame based on initial roi.
It also return track result whether tracking is sucessful or not.
mv_tracker_destroy
- Destroy a given handle.
Change-Id: I8bdfd6d240892b843cf80acdc6aaa338736170b6
Signed-off-by: Hyunsoo Park <hance.park@samsung.com>
Seungbae Shin [Fri, 6 May 2022 10:26:10 +0000 (19:26 +0900)]
mv_machine_learning: revise FeatureVectorManager class
[Version] 0.19.4-0
[Issue type] refactoring
- Remove unnecessary include from header files
- Make FeatureVectorManager as a abstract class
- Renaming for file stream object
- Use an initialization constructor for fstream
- Apply some useful keyword to help readability
- Remove unnecessary fstream manual closing due to RAII
Change-Id: I0793fb1fd186a3a11bf3fe67b7806e1b8b3ca3da
Seungbae Shin [Fri, 6 May 2022 05:13:28 +0000 (14:13 +0900)]
Fix SVACE defects
[Version] 0.19.3-0
[Issue type] Svace
- SIGNED_TO_BIGGER_UNSIGNED
- INTEGER_OVERFLOW
Change-Id: I0bbc17a0a789071b226a1d3d843fdb540bf4686a
Seungbae Shin [Wed, 27 Apr 2022 05:49:04 +0000 (14:49 +0900)]
mv_machine_learning: refactoring ml exception
[Version] 0.19.2-0
[Issue type] refactoring
- Add BaseException class, an abstract class to handle error code.
- Remove default parameter if possible which is not that useful.
- Remove unnecessary catch section if just propagating is performed.
- Catch by const reference.
Change-Id: Ia720ccbd6dfc8a0ad46d600f62534026df3a7d88
Seungbae Shin [Thu, 21 Apr 2022 01:29:23 +0000 (10:29 +0900)]
mv_machine_learning: Fix UNINIT.CTOR.MANY defect on testsuite
[Version] : 0.19.1-0
[Issue type] Svace
Change-Id: I47d5a6a5e70724aff5d49d51f0ee2901105047e6
Inki Dae [Wed, 20 Apr 2022 05:39:44 +0000 (14:39 +0900)]
mv_machine_learning: add accuracy measurement app for face recognition
[Version] : 0.19.0-0
[Issue type] : new feature
Added an application for measuring the accuracy of face recognition.
Change-Id: I0d41f9619b09dd93b544a77cce6d187b3f7a7723
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 15 Apr 2022 01:50:39 +0000 (10:50 +0900)]
mv_machine_learning: tune face recognition
[Version] : 0.18.4-0
[Issue type] enhancement
Tuned face recognition accuracy by dropping flip data augmentation and
chaning decision threshold value.
Change-Id: I505628a1d64ff4460eb2760bc9cedb40fd7e65a8
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 15 Apr 2022 01:45:51 +0000 (10:45 +0900)]
mv_machine_learning: handle exception case correctly
[Version] 0.18.3-0
[Issue type] : bug fix
Handled an exception case correctly. In case that internal model file
doesn't exist, this patch returns MEDIA_VISION_ERROR_INVALID_PATH
so that app can check such exception case correctly.
Change-Id: I2494ebaf69931c470ff1a7b82e581745030a0edd
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Fri, 8 Apr 2022 06:12:17 +0000 (15:12 +0900)]
mv_machine_learning: call prepare at inference request
[Version] : 0.18.2-0
[Issue type] : bug fix
Called Prepare function at inference request because
training model file can be updated in runtime so
every time inference is requested model and relevant
data should be loaded again.
Change-Id: If3c39d24ea7121262818a811ce433ffe505b94df
Signed-off-by: Inki Dae <inki.dae@samsung.com>