platform/core/api/mediavision.git
7 months agomv_machine_learning: add async API for image classification task group
Inki Dae [Fri, 22 Sep 2023 09:42:45 +0000 (18:42 +0900)]
mv_machine_learning: add async API for image classification task group

[Issue type] : new feature

Add asynchronous API, mv_image_classification_inference_async, for image
classification task group using AsyncManger class which is a common class
for asynchronous API support including test case.

In addition, this patch includes one fixup and cleanup.
- Fix a issue that it can access to the empty input queue after
  waitforInputQueue() call by checking if the input queue is empty or not.
- Clean up parseMetaFile and configure member functions by using const &
  as a parameter type.

Change-Id: I402760e9f585e113b06933b7d36df1767637e5c2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: drop Mediavision dependency from image classification adapter
Inki Dae [Thu, 21 Sep 2023 07:39:35 +0000 (16:39 +0900)]
mv_machine_learning: drop Mediavision dependency from image classification adapter

[Issue type] : code refactoring

Drop Mediavision dependency from adapter class of image classification task
group. There is a use case that pre-trained model file is used in private.
Therefore, the model relevant code cannot be opened. And even such users want
to configure the inference or training engines in their way.

In this case, we need to manage it properly by providing plugin approach of
behavior class. And this patch is a first step for supporting plugin based
behavior class which can be delivered as separate package.

Change-Id: Ibb7d4b5fa292378bbc5ab1fe7f5c8c00406ee3b2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: move member functions to private
Inki Dae [Thu, 21 Sep 2023 06:58:10 +0000 (15:58 +0900)]
mv_machine_learning: move member functions to private

[Issue type] : code cleanup

Move two member functions inference and preprocess from protected to private.
They are used only in ImageClassification class.

Change-Id: I2e283dd8e55bbf5a9cb45359b48ebeb08f9d1892
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: drop mv_image_classification_open.h header file
Inki Dae [Thu, 21 Sep 2023 06:42:25 +0000 (15:42 +0900)]
mv_machine_learning: drop mv_image_classification_open.h header file

[Issue type] : code cleanup

Drop mv_image_classification_open.h header file which is a abandoned file.

Change-Id: I8be8bc47acd6880f5eaef3cab126ca0f60069498
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: embed AsyncManager into each task group
Inki Dae [Wed, 13 Sep 2023 07:21:58 +0000 (16:21 +0900)]
mv_machine_learning: embed AsyncManager into each task group

[Issue type] : code cleanup

Embed AsyncManager into eash task group by moving all implementations from
cpp file to header one because keeping the implementations in cpp file
propergates template type declarations every time each task group
uses the AsyncManager for async API support.

Wit this patch, mv_ml_common.so library file isn't created anymore so drop
the relevant code.

Change-Id: I4fbabcfbe5cb29053858549fd77400ae9ae3ec2d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: code refactoring to AsyncManager
Inki Dae [Tue, 12 Sep 2023 09:18:58 +0000 (18:18 +0900)]
mv_machine_learning: code refactoring to AsyncManager

[Issue type] : code refactoring

Do code refactoring to AsyncManager by introducing new public member functions -
push() and pop() - and by moving existing all member functions as private ones
excepting isWorking(), popFromInput() and pushToOutput() which are used
in InferenceCallback function of the object detection task group.

By doing this, it can support async API with AsyncManager easily because
what each task group has to do for it is to call push() in PerformAsync()
and to call pop() in getOutput(). In addition, this patch moves the logic
of inferenceCallback() to lamda block of performAsync().

For async API support, what each task group have to do is,
    void TaskGroup::performAsync()
    {
        ...
        // create AsyncManager class with lamda function.
        ...
        _async_manager->push(inputVectors);
    }

    void TaskGroup::getOutput()
    {
        if (_async_manager) {
            ...
            _current_result = _async_manager->pop();
        }
        ...
    }

Change-Id: I022c71b921b5351d739ba685c188625806162000
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: drop redundant member variables
Inki Dae [Tue, 12 Sep 2023 06:56:10 +0000 (15:56 +0900)]
mv_machine_learning: drop redundant member variables

[Issue type] : code cleanup

Drop a redundant member variables from ObjectDetectionInput and
AsyncInputQueue structures. The member variables - handle, inference_src,
and user_data - aren't used anymore.

Change-Id: Iecd39cb8ca0f2cafdfd09b792bdcbe9cca72ca8b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: introduce common asynchronous inference manager
Inki Dae [Thu, 7 Sep 2023 00:16:24 +0000 (09:16 +0900)]
mv_machine_learning: introduce common asynchronous inference manager

[Issue type] new feature

Introduce a new asynchronous inference manager - AsyncManager class - for
asynchronous API support of all task groups. This patch just moves the queue
management relevant code from object detection task group to common directory
so that other task groups can use it commonly for the asynchronous API
implementation.

As of the queue management, input queue can be used commonly for all
task groups even though data type of each input tensor is different each
other by storing the input tensor data with unsigned char type but not used
for output queue.

In case of output queue, how to decode the output tensor data is different
each other according to the used pre-trained model. It means that each result
structure of the used pre-trained model should be different. Therefore,
this patch uses template type for output queue so that model-driven data
structure can be used.

Each task group who wants to use AsyncManager has to follow below rules,
 - create a async manager handle with its own inference callback function.
   i.e,
       in template<typename T> void void ObjectDetection::performAsync(...),
       {
           if (!async_manager) {
               // Create async manager handler with its own inference callback.
                _async_manager = make_unique<AsyncManager<TaskResult> >(
                          [this]() { inferenceCallback<T, TaskResult(); });
           }

           if (!_async_manager->isInputQueueEmpty<T>())
               return;
           ...

           // Push a input queue for inference request.
           _async_manager->pushToInput<T>(in_queue);

           // Invoke async manager. This triggers a internal thread for
           // performing the inference with the given input queue.
           _async_manager->invoke<T>();
       }

      and in ObjectDetection::getOutput()
  {
          if (_async_manager) {
              if (!_async_manager->isWorking())
                  throw an_exception;

              _async_manager->waitforOutputQueue();
              _current_result = _async_manager->popFromQueue();
          }
          ...
     }

     and in inference callback function of each task group,
 template<typename T, typename R> void ObjectDetection::inferenceCallback()
 {
         // Get a input queue for inference.
         AsyncInputQueue<T> inputQ = _async_manager->popFromInput<T>();
         inference<T>(inputQ.inputs);
         R &resultQ = result();
         resultQ.frame_number = inputQ.frame_number;

         // push the inference result to outgoing queue.
         _async_manager->pushToOutput(resultQ);
     }

Change-Id: Ie2b68b910a73377fa4d4ad8646b134e3c2bf709a
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: use template type for outgoing_queue
Inki Dae [Wed, 6 Sep 2023 05:28:54 +0000 (14:28 +0900)]
mv_machine_learning: use template type for outgoing_queue

[Issue type] : code cleanup

Use template type for _outgoing_queue. As for asynchronous inference,
we need to allow various structures to be pushed to outgoing queue
because each task group can be used for different purpose and this means
that various result structures are needed.

This is just a step for introducing asynchronous inference manager.

Change-Id: I5d7fbe59da3c95e59366f10f8232eed42a6a5e60
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agomv_machine_learning: move inferenceThreadLoop into class
Inki Dae [Wed, 6 Sep 2023 00:49:36 +0000 (09:49 +0900)]
mv_machine_learning: move inferenceThreadLoop into class

[Issue type] : code cleanup

Move the thread callback, inferenceThreadLoop(), for performing asynchronous
inference into ObjectDetection class. This is a first step for introducing
asynchronous inference manager which can be used commonly for other
task groups.

Change-Id: Ie018712406e7e922f92dfea8a23aead72e8e61c9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
7 months agoFix vision-source API 65/300265/2
Kwanghoon Son [Thu, 19 Oct 2023 10:18:16 +0000 (19:18 +0900)]
Fix vision-source API

[Version] 0.28.19

Change-Id: I56a7582af5009149f796f48c00b15e2b075518d1
Link: https://review.tizen.org/gerrit/c/platform/core/multimedia/vision-source/+/299618
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
8 months agomv_machine_learning: update test case for face recognition 32/299132/1 accepted/tizen/8.0/unified/20231005.092749 accepted/tizen/unified/20230921.171329 tizen_8.0_m2_release
Inki Dae [Wed, 20 Sep 2023 09:13:09 +0000 (18:13 +0900)]
mv_machine_learning: update test case for face recognition

[Version] : 0.28.18
[Issue type] : update test case

Update the test case 'RemoveAllLabelShouldBeOk' for face recognition.
The test case checks if unregistering all labels works well after training.
However, we didn't consider confirming the actual results
after the training-after-unregistering test.

This patch ensures that the actual results are confirmed.

Change-Id: I368a0440140d39bb3769a0a447c6cde96fb20b7b
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agomv_machine_learning: make sure to clean up dataset 12/299112/2
Inki Dae [Wed, 20 Sep 2023 03:16:30 +0000 (12:16 +0900)]
mv_machine_learning: make sure to clean up dataset

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

Make sure to clean up the training dataset after training the dataset.
If the dataset isn't cleaned up after training then new dataset will be
stacked on the previous ones. So clean up it after training.

Change-Id: I4f985e87560d5ddc237b31a16be1998ff40b1563
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agomv_machine_learning: fix label removal issue of face recognition 19/298919/1
Inki Dae [Fri, 15 Sep 2023 07:17:51 +0000 (16:17 +0900)]
mv_machine_learning: fix label removal issue of face recognition

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

Fix a label removal issue of face recognition framework.

Due to this issue, seg. fault happened when unregistering a given label
because the label table wan't updated after unregistering the label.

Therefore, this patch fixes the problem by making sure to update the label
table after unregistering. In addition, this patch makes the result CAPI
to be allowed after mv_face_recognition_inference function call so relevalt
test case is also updated properly.

Change-Id: Ib913d56c8b3625c2c6ebf9468aa19734d4ada0d2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agoMerge branch 'tizen_devel' into tizen accepted/tizen/unified/20230906.014616
Kwanghoon Son [Mon, 4 Sep 2023 05:03:08 +0000 (14:03 +0900)]
Merge branch 'tizen_devel' into tizen

[Version] 0.28.15

Inki Dae (6):
  mv_machine_learning: code clean to setModelInfo function
  mv_machine_learning: do not check model info
  mv_machine_learning: introduce DEFAULT_MODEL_NAME for object detection
  mv_machine_learning: code refactoring to getOutput function
  mv_machine_learning: drop dead code
  mv_machine_learning: change async API behavior

Kwanghoon Son (4):
  Remove mv_private include
  mv_common: Drop common_c functions
  mv_3d: Drop open functions
  Remove FORCED_STATIC_BUILD option

Change-Id: If70c54ebc3f13ff35e514d208e5d8217a72aed56

8 months agoRemove FORCED_STATIC_BUILD option
Kwanghoon Son [Fri, 1 Sep 2023 08:17:22 +0000 (17:17 +0900)]
Remove FORCED_STATIC_BUILD option

Static link option is never used.

[Issue type] Refactoring

Change-Id: Ia2e916f53f84eb8ca9d00203dc7e19815d9edaba
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
8 months agomv_3d: Drop open functions
Kwanghoon Son [Wed, 30 Aug 2023 06:46:08 +0000 (15:46 +0900)]
mv_3d: Drop open functions

[Issue type] refactoring

3d open functions was created for individual adapter layer
requirements, but was never used. Delete it because it slows down
execution and only increases complexity.

Change-Id: I1ad39ece35e808a4fde2f5f9bc32bf342bbb1153
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
8 months agomv_common: Drop common_c functions
Kwanghoon Son [Wed, 30 Aug 2023 00:26:23 +0000 (09:26 +0900)]
mv_common: Drop common_c functions

[Issue type] refactoring

common_c functions was created for individual adapter layer
requirements, but was never used. Delete it because it slows down
execution and only increases complexity.

Change-Id: I550e5a354f413635a45277eaa0abef028bb452ab
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
8 months agomv_machine_learning: change async API behavior
Inki Dae [Wed, 23 Aug 2023 01:53:51 +0000 (10:53 +0900)]
mv_machine_learning: change async API behavior

[Issue type] : code refactoring

Change async API behavior of object detection task group.

In original version, async API created an internal thread which is
different from main thread because the callback function registered by
user was called by the new thread context created by the internal framework.

With this patch, user has to create a new thread for the use of async API.
Below is an simple example,
void thread_cb(...)
{
...
while (condition) {
...
mv_object_detection_get_result(handle, &number_of_objects, ...);
...

for (unsigned int idx = 0; idx < number_of_objects; ++idx) {
...
mv_object_detection_get_label(handle, idx, &label);
...
}
}
}

In addition, this patch drops the use of mutex for thread safety due to
dead lock issue. I will introduce a new thread safety solution with
more fine-grained lock approach later.

Change-Id: I7621097a7b08456d61af79ca2659546083e0ece0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agomv_machine_learning: drop dead code
Inki Dae [Wed, 23 Aug 2023 01:46:19 +0000 (10:46 +0900)]
mv_machine_learning: drop dead code

[Issue type] : code cleanup

Drop the dead code. mv_face_detection_open.h and mv_object_detection_open.h
files aren't used anymore.

Change-Id: I5cbc98ee87b59c599d2790706dc32d8d8cec2944
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agomv_machine_learning: code refactoring to getOutput function
Inki Dae [Fri, 11 Aug 2023 06:00:46 +0000 (15:00 +0900)]
mv_machine_learning: code refactoring to getOutput function

[Issue type] : code refactoring

Do code refactoring to getOutput function of the concrete class,
ObjectDetection, by extracting some portion of existing getOutput function code
and moving it to a new interface function, getOutputCache.

With original version of the getOutput function, it handled the specific case
that one more get-result API are called, which in turn, it made the getOutput
function to be complicated.

Therefore, this patch drops the specific case from the getOutput function
by introducing getOutputCache interface which always returns internal
result object, _current_result instead of calling the result member function
of each concrete class which decodes raw output tensor data after the completion
of the inference.

Change-Id: I4aacb8fc55be3f63a983182b919291dcb927b0c9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agoRemove mv_private include
Kwanghoon Son [Fri, 11 Aug 2023 02:42:27 +0000 (11:42 +0900)]
Remove mv_private include

mv_private is not used and should not include in header file

Change-Id: Ia3149b9b048ca06ca19535e80ec5b6b23e006dbe
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
8 months agomv_machine_learning: introduce DEFAULT_MODEL_NAME for object detection
Inki Dae [Wed, 9 Aug 2023 04:04:47 +0000 (13:04 +0900)]
mv_machine_learning: introduce DEFAULT_MODEL_NAME for object detection

[Issue type] : new feature

Introduce DEFAULT_MODEL_NAME for object detection task group, which is a new
key for object detection meta file.

With this patch, a proper concreate class object will be created
at the constructor of ObjectDetectionAdapter class according to the default
model name which is parsed from object_detection.json file.

And also this patch calls the member function, create, to create the concrete
class object corresponding to the default model name instead of creating
a default concrete class object directly.

Finally, we can create user-desired concrete class object without rebuilding
by simply modifying the meta file, object_detection.json.

Change-Id: Ie159991985c4ed9a28abc5a377037110fe319be6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agomv_machine_learning: do not check model info
Inki Dae [Mon, 7 Aug 2023 23:45:12 +0000 (08:45 +0900)]
mv_machine_learning: do not check model info

[Issue type] : bug fix

Do not check model info given by user because the user-given model info
is optional but not mandatory. If the model info isn't set then default
one will be used instead.

Change-Id: I4b7dea2e2e3c53a6e418e5ac7f7cc22c328cdbd6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
8 months agomv_machine_learning: code clean to setModelInfo function
Inki Dae [Mon, 7 Aug 2023 22:45:58 +0000 (07:45 +0900)]
mv_machine_learning: code clean to setModelInfo function

[Issue type] : code cleanup

Clean up setModelInfo function by doing function extraction.

setModelInfo function converted a given model name to its corresponding
task type internally so it made the function to be complicated.
This patch extracts the conversion portion from setModelInfo function as
another function and makes the function to be called instead.

Change-Id: I93243ffba543f9c6e9a1f0d7690d8f48a1bd14e1
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agoFix build warnings 54/298154/1
Kwanghoon Son [Fri, 1 Sep 2023 08:27:49 +0000 (17:27 +0900)]
Fix build warnings

Change-Id: I180eeca73b7b95c66bbc65d93afbef9ed98e08e5
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
9 months agopackaging: drop BSD license 46/297946/1 accepted/tizen/unified/20230830.170531
Inki Dae [Tue, 29 Aug 2023 05:25:39 +0000 (14:25 +0900)]
packaging: drop BSD license

[Version] : 0.28.14
[Issue type] : drop license

Drop BSD license because now Mediavision uses OpenCV 4.7.0, and
OpenCV 4.5.0 and higher are licensed under Apache 2 license according to
OpenCV official site[1].

[1] https://opencv.org/license/

Change-Id: Ie44593bb68bfcc1b487e941e5d58b7213558ed14
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agoExclude lcov on pointcloud 69/297869/1 accepted/tizen/unified/20230828.102415
Kwanghoon Son [Mon, 28 Aug 2023 02:17:30 +0000 (11:17 +0900)]
Exclude lcov on pointcloud

[Version] 0.28.13-1

pointcloud only works on aarch64.

Change-Id: I322227f9ece9ad331dc45bfc45e61821f84f8c3d
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
9 months agoFix gcov path 24/297624/1 accepted/tizen/unified/20230822.162247
Kwanghoon Son [Tue, 22 Aug 2023 02:54:09 +0000 (11:54 +0900)]
Fix gcov path

[Version] 0.28.13

Append path build end of capi-media-vision-{version}
Finally correct full path is capi-media-vision-{version}/build

error message :
```
[DEBUG]:[2023-08-22,03:42:16]:[host_cmd.py:cmd:77]:geninfo: Warning: ('gcov') skipping .gcda file
/home/ttf/jenkins_workspace/workspace/CEC_TIZEN_RPI4_GCOV_COVERAGE/CEC/res/coverage_gcov/gcov_data/capi-media-vision-0.28.12/build/mv_roi_tracker/roi_tracker/CMakeFiles/mv_roi_tracker.dir/src/ROITracker.cpp.gcda
because corresponding .gcno file is missing
```

Fixed: 00a391760b680b37647a0ebce188a9f55db38243
Change-Id: I7ab8b11f83cd41b42a6beb8c7e5b0e06e9e18512
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
9 months agoAppend gcov path with package version 72/297072/1 accepted/tizen/unified/20230814.121004
Kwanghoon Son [Thu, 10 Aug 2023 02:06:27 +0000 (11:06 +0900)]
Append gcov path with package version

[Version] 0.28.12

Append path capi-media-vision-{version} end of usr\share\gcov\obj\capi-media-vision

Fixed: 7530347598dfc1629ecf260aa01bac4d5393b472
Change-Id: I181aba162c54f589c31febb41459e66d39e50433
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
9 months agoMerge branch 'tizen_devel' into tizen accepted/tizen/unified/20230809.071949
Kwanghoon Son [Mon, 7 Aug 2023 04:25:59 +0000 (13:25 +0900)]
Merge branch 'tizen_devel' into tizen

[Version] 0.28.11

Inki Dae (6):
  mv_machine_learning: drop meta approach dependency from preprocess
  mv_machine_learning: pack header files for external plugin
  mv_machine_learning: rename Preprocess header file
  common: clean up to mv_private.h file
  mv_machine_learning: pass a task type to external module
  mv_machine_learning: drop create member from itask

Kwanghoon Son (1):
  Change gcov install path

Change-Id: I94359713f6b4a3b5bea24702ae61a1ddd50b0498
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
9 months agoChange gcov install path
Kwanghoon Son [Thu, 27 Jul 2023 09:18:54 +0000 (18:18 +0900)]
Change gcov install path

Directory path 'build'(basename) should removed.

Change-Id: I9d1be63cc0c8b7a8e36700f5e015cfc4484e8868
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
9 months agomv_machine_learning: drop create member from itask
Inki Dae [Thu, 27 Jul 2023 06:58:47 +0000 (15:58 +0900)]
mv_machine_learning: drop create member from itask

[Issue type] : code cleanup

Drop create interface from itask interface class.

The create interface isn't common but specific to certain task group.
Therefore, drop the interface from itask interface class, and change
the create member function of each adapter class to private member if needed.

Change-Id: I65264ede3d5b627c04b7fd6d8cb7555677b0d665
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agomv_machine_learning: pass a task type to external module
Inki Dae [Thu, 27 Jul 2023 05:44:07 +0000 (14:44 +0900)]
mv_machine_learning: pass a task type to external module

[Issue type] : code cleanup

Pass a given task type from Mediavision framework to external module
so that the external module can perform various models according to
user-given behavior.

Change-Id: I86f3254081c4bf47d3659c97ee20a4a0c5408843
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agocommon: clean up to mv_private.h file
Inki Dae [Tue, 25 Jul 2023 02:00:58 +0000 (11:00 +0900)]
common: clean up to mv_private.h file

[Issue type] : code cleanup

Clean up mv_private.h by dropping unnecessary inclusions and by moving
mv_private.h from include/ to mv_common/include/.
There is no reason for the header file should exist in include directory
because it is used by internal framework code only.

Change-Id: I4160942cd4966eb4104393e4193d5dfb30ed3691
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agomv_machine_learning: rename Preprocess header file
Inki Dae [Mon, 24 Jul 2023 00:38:53 +0000 (09:38 +0900)]
mv_machine_learning: rename Preprocess header file

[Issue type] : code cleanup

Rename Preprocess.h to machine_learning_preprocess.h.
The header file name, Preprocess, is a generic one so let's change
the file name with specific one.

Change-Id: Ic497702eb27c00172159801757c16d1faf6896a4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agomv_machine_learning: pack header files for external plugin
Inki Dae [Thu, 20 Jul 2023 09:09:22 +0000 (18:09 +0900)]
mv_machine_learning: pack header files for external plugin

[Issue type] : package update

Pack two header files - machine_learning_exception.h and Preprocess.h
to devel package so that external plugin module can use them.

Change-Id: I69b26c3a415d817afb35e1537073f40e8226bb2f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 months agomv_machine_learning: drop meta approach dependency from preprocess
Inki Dae [Thu, 20 Jul 2023 06:12:33 +0000 (15:12 +0900)]
mv_machine_learning: drop meta approach dependency from preprocess

[Issue type] : code cleanup

Drop meta approach dependency from Preprocess class.

As for this, this patch introduces a new member function of the Preprocess
class, setConfig. This function sets user-desired configuration to
the Preprocess object so that preprocessing operation can be performed with
the configuration. This is required for external plugin such as
ObjectDetectionExternal class to use the Preprocess class to preprocess
a given input data because the external plugin can use its own approach
instead of Mediavision's one.

Change-Id: I3600ed06335f196da3885daca0c2da85c931cd6d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: fix DEREF_OF_NULL_RET.STAT svace issue 51/296451/2 accepted/tizen/unified/20230801.174230
Inki Dae [Fri, 28 Jul 2023 02:24:57 +0000 (11:24 +0900)]
mv_machine_learning: fix DEREF_OF_NULL_RET.STAT svace issue

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

Fix two svace issues from VD KONA, DEREF_OF_NULL_RET.STAT.
WGID: 3342, 1134975

Change-Id: I292348f51b9cb9a70c48cedc281c0b92ec91a3d5
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agoChange vision_source_buffer_s to media_packet_h 13/296113/2 accepted/tizen/unified/20230728.155814
Kwanghoon Son [Thu, 20 Jul 2023 04:51:47 +0000 (13:51 +0900)]
Change vision_source_buffer_s to media_packet_h

Change-Id: I77fc29a15268d613d529af8302731e4f30250bef
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agoMerge branch 'tizen_devel' into tizen accepted/tizen/unified/20230713.143454
Kwanghoon Son [Wed, 12 Jul 2023 09:46:03 +0000 (18:46 +0900)]
Merge branch 'tizen_devel' into tizen

[Version] 0.28.9

Inki Dae (5):
  mv_machine_learning: code cleanup to label manager
  mv_machine_learning: introduce
    mv_face_recognition_get_label_with_index() api
  mv_machine_learning: use in-class initialization
  mv_machine_learning: fix two bugs
  mv_machine_learning: fix a bug after unregistering

Kwanghoon Son (3):
  Fix typos
  Fix more typos
  Exclude mv_machine_learning gcov files

sangho park (2):
  Separate build and source directories
  add .gitignore files

Change-Id: I25fc7935b1fc68ba71c810099e5a9812a6f97cf1

10 months agomv_machine_learning: fix a bug after unregistering
Inki Dae [Mon, 10 Jul 2023 06:21:55 +0000 (15:21 +0900)]
mv_machine_learning: fix a bug after unregistering

[Issue type] : bug fix

Fix a bug that mv_face_recognition_get_confidence() call fails after
unregistering a given label from the label file.

This issue was that internal result structure can be updated only if
one of tensor value must meet the decision threshold. Therefore,
this patch makes the internal result structure to updated regardless
of the decision threshold, updates the test case, and cleans up code.

Change-Id: I0aa9d70e0b89616ee8390a1ef37986f98f6c0020
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agoadd .gitignore files
sangho park [Mon, 10 Jul 2023 10:20:03 +0000 (19:20 +0900)]
add .gitignore files

[Issue type] : code cleanup

for vscode environment, add ignore untracked files.

Change-Id: I7cbff9529a5740c4e7d0a0d25ecd3ba8b23eb982
Signed-off-by: sangho park <sangho.g.park@samsung.com>
10 months agoSeparate build and source directories
sangho park [Mon, 10 Jul 2023 05:35:31 +0000 (14:35 +0900)]
Separate build and source directories

[Issue type] : code cleanup

Source and build artifacts in separate directories for source control

Change-Id: Ie1f4b2ee126e33cefbdde720ec96a394ad5c3a0d
Signed-off-by: sangho park <sangho.g.park@samsung.com>
10 months agomv_machine_learning: fix two bugs
Inki Dae [Fri, 7 Jul 2023 08:59:06 +0000 (17:59 +0900)]
mv_machine_learning: fix two bugs

[Issue type] : bug fix

Fix two bugs - 1. one is to fix wrong result tensor data issue after
registering a new label without inference request, and 2. other is to fix
unexpected exception issue when the first label data is registered without
label file.

For issue number 1, the reason is that we got num_of_confidences from the label
file not internal result structure when mv_face_recognition_get_confidence()
funtion is called. As for this, this patch makes __labels of internal
result object - FaceRecognitionResult structure - to be updated only when
inference request is done, and it gets the num_of_confidences from the
internal result object and returns it to user.

For issue number 2, the reason is that addLabelToFile fucntion returned
0 when the label file doesn't exist, and it resulted in invalid operation
exception. As for this, this patch makes addLabelToFile function not to
return the invalid operation exception when the label file doesn't exist
because what this function has to is to add a given new label name to
the label file.

Change-Id: Ie66e2a65d40a2f2f8e091b46173cb0ecb2ddf23d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agoExclude mv_machine_learning gcov files
Kwanghoon Son [Fri, 7 Jul 2023 09:55:43 +0000 (18:55 +0900)]
Exclude mv_machine_learning gcov files

Most of code from mv_machine_learning is internal API.
Since tct not ready, exclude coverage scope

Change-Id: I5eb8c29cf79bcee732b2f4c2881db7b9b508b81f
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agoFix more typos
Kwanghoon Son [Thu, 6 Jul 2023 10:42:43 +0000 (19:42 +0900)]
Fix more typos

Change-Id: I9a1a48ec0be0a1def995dace7b70127008612986
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agoFix typos
Kwanghoon Son [Thu, 6 Jul 2023 07:36:47 +0000 (16:36 +0900)]
Fix typos

Change-Id: I42eb061115e5962540a38c7aff1a2a5532b89f1a
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agomv_machine_learning: use in-class initialization
Inki Dae [Wed, 5 Jul 2023 01:55:07 +0000 (10:55 +0900)]
mv_machine_learning: use in-class initialization

[Issue type] : code cleanup

Change-Id: Icc71f07575c5ec4348c6d6e9e83a9bd35b7f58d6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: introduce mv_face_recognition_get_label_with_index() api
Inki Dae [Wed, 5 Jul 2023 01:18:54 +0000 (10:18 +0900)]
mv_machine_learning: introduce mv_face_recognition_get_label_with_index() api

[Issue type] : new feature

Introduce a new api, mv_face_recognition_get_label_with_index() function
which returns a label string corresponding to a given index value.

With this new API, this patch adds a new test case which tests it.

Change-Id: Iad1a5dee3fa34cc55b27cf063b33b0d9b42d6d98
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: code cleanup to label manager
Inki Dae [Tue, 4 Jul 2023 06:04:47 +0000 (15:04 +0900)]
mv_machine_learning: code cleanup to label manager

[Issue type] : code cleanup

Clean up the label manager of face recognition task group by doing,
  - drop redundant code.
  - change _labels_and_files to _labels. Aand we don't need to use
    map data structure so use just vector type instead.
  - change return type of importLabel function - int to size_t.
  - iterate _labels vector instead of the label file.

Change-Id: I46809598ef67aea2a318408c4cdc3ff91d3332e4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agoFix auto to const auto & 43/295243/1
Kwanghoon Son [Tue, 4 Jul 2023 07:05:51 +0000 (16:05 +0900)]
Fix auto to const auto &

[Version] 0.28.8
[Issue] coverity

Coverity report major defect auto_causes_copy.

Change-Id: I5fe928d8a95572f26ddd0f299299a45a2c043732
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agoMerge branch 'tizen_devel' into tizen accepted/tizen_unified_dev accepted/tizen/unified/20230705.063747 accepted/tizen/unified/dev/20230726.115619
Kwanghoon Son [Tue, 4 Jul 2023 05:15:14 +0000 (14:15 +0900)]
Merge branch 'tizen_devel' into tizen

[Version] 0.28.7

Inki Dae (13):
  mv_machine_learning: add async API for object detection task group
  mv_machine_learning: move async relevant code into behavior class
  test: add mobilenet_v2_ssd model support for async API test
  mv_machine_learning: drop *open.cpp files from task groups
  mv_machine_learning: add async API for face detection task group
  mv_machine_learning: drop redundant function declarations
  mv_machine_learning: update authors
  mv_machine_learning: use enum class instead of enum
  mv_machine_learning: introduce a new internal API for face recognition
  mv_machine_learning: drop Mediavision dependency from object detection
    adapter
  mv_machine_learning: introduce IObjectDetection class
  mv_machine_learning: pack header files for plugin support
  mv_machine_learning: introduce ObjectDetectionExternal class

Kwanghoon Son (2):
  mv_machine_learning: Fix members initialize
  Fix Tizen version 7.5 to 8.0

sangho park (2):
  visualizer : fix memory leak issue
  Revert a mis-synced devel patch

Change-Id: I46bfe4414446b5483f43ff5a2f08d6fbc82e6d69

10 months agomv_machine_learning: introduce ObjectDetectionExternal class
Inki Dae [Mon, 12 Jun 2023 08:16:36 +0000 (17:16 +0900)]
mv_machine_learning: introduce ObjectDetectionExternal class

[Issue type] : new feature

Introduce ObjectDetectionExternal class which loads, unloads and manages
external plugin module provided as separate package.

If model name is given as "od_plugin" then object detection task group
will bind external plugin module and use it through ObjectDetectionExternal
class instead of internal behavior class, ObjectDetetion class.

Change-Id: If73ef7bb24e011b4375850100186f7a952ffca99
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: pack header files for plugin support
Inki Dae [Mon, 12 Jun 2023 02:28:52 +0000 (11:28 +0900)]
mv_machine_learning: pack header files for plugin support

[Issue type] : add header

Pack header files for supporting object detection plugin module.

According to plugin support requirement, behavior class of itask
can be implemented as separate package. As a initial support,
this patch packs object detection relevant headers which are needed
by separate plugin module when building.

Change-Id: I2c594440a63877420d4aef44573ebeffab3c5a1f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: introduce IObjectDetection class
Inki Dae [Fri, 9 Jun 2023 07:40:40 +0000 (16:40 +0900)]
mv_machine_learning: introduce IObjectDetection class

[Issue type] : new feature

Introduce IObjectDetection class which needs to support plugin base behavior
class. With this patch, the internal behavior class, ObjectDetection,
is derived from IObjectDetection.

On top of this patch, I will introduce a wrapper class derived from
IObjectDetection again. The wrapper class will be used to deploy plugin based
behavior class using dlsym function.

Change-Id: I0d66ceab010e66fab6d45bb8e55a042f9f9a1403
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: drop Mediavision dependency from object detection adapter
Inki Dae [Fri, 9 Jun 2023 00:59:11 +0000 (09:59 +0900)]
mv_machine_learning: drop Mediavision dependency from object detection adapter

[Issue type] code refactoring

Drop Mediavision dependency from adapter class of object detection task
group. There is a use case that pre-trained model file is used in private.
Therefore, the model relevant code cannot be opened. And even such users want
to configure the inference or training engines in their way.

In this case, we need to manage it properly by providing plugin approach of
behavior class. And this patch is a first step for supporting plugin based
behavior class which can be delivered as separate package.

Change-Id: I1549e862ed35bf467b2b99e8364b2390e69fe2b0
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: introduce a new internal API for face recognition
Inki Dae [Tue, 23 May 2023 05:31:08 +0000 (14:31 +0900)]
mv_machine_learning: introduce a new internal API for face recognition

[Issue type] : new feature

Introduce new internal API - mv_face_recognition_get_confidence - for
face recognition task group, which provides raw tensor data to user.

Change-Id: I49b61dce7c97b00a16b7f1c49e0a2b96a4a17d2f
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agoRevert a mis-synced devel patch
sangho park [Mon, 22 May 2023 09:00:52 +0000 (18:00 +0900)]
Revert a mis-synced devel patch

[Version] 0.28.7
[Issue type] Fix

'mv3d: add new vector type' should be merged in M2

Change-Id: Ib25794d6b00d9760a5c7046547a226de221fc2f7
Signed-off-by: sangho park <sangho.g.park@samsung.com>
10 months agoFix Tizen version 7.5 to 8.0
Kwanghoon Son [Mon, 22 May 2023 03:57:29 +0000 (12:57 +0900)]
Fix Tizen version 7.5 to 8.0

Change-Id: I402983dbe9509106342772030270fac3feb1d836
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agomv_machine_learning: Fix members initialize
Kwanghoon Son [Wed, 10 May 2023 04:08:36 +0000 (13:08 +0900)]
mv_machine_learning: Fix members initialize

[Version] 0.28.6
[Issue type] Fix

WGID 540948 warn about members aren't initialized.

Change-Id: I20bc22bfc07a6378e912d43048439573169c974b
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
10 months agovisualizer : fix memory leak issue
sangho park [Tue, 9 May 2023 04:47:51 +0000 (13:47 +0900)]
visualizer : fix memory leak issue

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

generated texture must be deleted

Change-Id: I15187215561de4a0d7dfc7ec8d973ee47a1ccaf5
Signed-off-by: sangho park <sangho.g.park@samsung.com>
10 months agomv_machine_learning: use enum class instead of enum
Inki Dae [Thu, 18 May 2023 00:32:25 +0000 (09:32 +0900)]
mv_machine_learning: use enum class instead of enum

[Issue type] : code cleanup

Use enum class instead of enum - 'enum status' to 'enum class WorkingStatus'
and 'enum mode' to 'enum class RequestMode'. In addition, it moves facenet
input and output structures to facenet.h file from face_recognition_type.h
which is a header file common to face recognition and facenet.

Change-Id: Ibb1d285f3c2bacce6099d1d3930ad0f1a41ea6b8
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: update authors
Inki Dae [Wed, 17 May 2023 02:32:50 +0000 (11:32 +0900)]
mv_machine_learning: update authors

[Issue type] : Author file update

Change-Id: Ib939ba0fc9e51166ff23ef5963e74d010208801d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: drop redundant function declarations
Inki Dae [Tue, 16 May 2023 09:25:53 +0000 (18:25 +0900)]
mv_machine_learning: drop redundant function declarations

[Issue type] : code cleanup

Drop redundant function declarations - updateResult.

Change-Id: I5fefea1881effe329457ba7f4018aebdf986d0c6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: add async API for face detection task group
Inki Dae [Fri, 12 May 2023 07:23:53 +0000 (16:23 +0900)]
mv_machine_learning: add async API for face detection task group

[Issue type] : new feature

Add async API support for face detection task group.

For async API support, it implements '_incoming_queue' to store
input tensors requested by user and '_outgoing_queue' to retrieve
the final result after decoding the inference results obtained
by processing each input tensor from the '_incoming_queue'.

When a user requests the result, the final result is retrieved from
'_outgoing_queue' and stored in '_current_result' for consistency
because user can use two more native API to get the result, which
is maintained until the next inference request is made.

In default, async API has frame skip behavior if previous request is being
performed. And which in turn, it minimizes time delay between input frame
and inference result. There is no longer a need to perform complex tasks
in application code to reduce the time delay with this patch.

Change-Id: If46e7f9a3a8e5ffbe564cea0439ff3dfe762e6c9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: drop *open.cpp files from task groups
Inki Dae [Thu, 11 May 2023 02:07:58 +0000 (11:07 +0900)]
mv_machine_learning: drop *open.cpp files from task groups

[Issue type] : code cleanup

Drop all *open.cpp files from task groups, which provide just wrapper functions.
Unnecessary code and code duplication.

Change-Id: I021cc16893c405b7425c6d92b1bba646d640cc46
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agotest: add mobilenet_v2_ssd model support for async API test
Inki Dae [Wed, 10 May 2023 07:18:09 +0000 (16:18 +0900)]
test: add mobilenet_v2_ssd model support for async API test

Change-Id: I8bcdf077ccae6df8b7ff2e7da0b6b815acd215e6
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: move async relevant code into behavior class
Inki Dae [Wed, 10 May 2023 02:25:07 +0000 (11:25 +0900)]
mv_machine_learning: move async relevant code into behavior class

[Issue type] : code cleanup

Move async relevant code into behavior class - ObjectDetection - from
adapter class - ObjectDetectionAdapter. By doing this,
we can reduce code duplication because we don't have to implement
behavior logic respectively according to data type.

Change-Id: Ifc193152859736ae146eb47e3a46d3ec39ee98d8
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 months agomv_machine_learning: add async API for object detection task group
Inki Dae [Fri, 28 Apr 2023 04:07:15 +0000 (13:07 +0900)]
mv_machine_learning: add async API for object detection task group

[Issue type] : new feature

Add async API support for object detection task group.

For async API support, it implements '_incoming_queue' to store
input tensors requested by user and '_outgoing_queue' to retrieve
the final result after decoding the inference results obtained
by processing each input tensor from the '_incoming_queue'.

When a user requests the result, the final result is retrieved from
'_outgoing_queue' and stored in '_current_result' for consistency
because user can use two more native API to get the result, which
is maintained until the next inference request is made.

In default, async API has frame skip behavior if previous request is being
performed. And which in turn, it minimizes time delay between input frame
and inference result. There is no longer a need to perform complex tasks
in application code to reduce the time delay with this patch.

Change-Id: Ia6367afbe421de9b90a483fd47e5da64cfb783b9
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agoFixed the build error using gcc 13 08/295008/1
wchang kim [Thu, 29 Jun 2023 21:16:37 +0000 (06:16 +0900)]
Fixed the build error using gcc 13

Change-Id: I44728aad6cd9391e6ec521f035a342bd2ec33f9e

11 months agoMerge branch 'tizen_devel' into tizen accepted/tizen/unified/20230629.132048
Kwanghoon Son [Wed, 28 Jun 2023 09:52:06 +0000 (18:52 +0900)]
Merge branch 'tizen_devel' into tizen

[Version] 0.28.5

Inki Dae (5):
  mv_machine_learning: drop MV_INFERENCE_TARGET_TYPE definition
  mv_machine_learning: change model path for new task group API
  mv_machine_learning: add pose landmark task API
  test: correct install directory to resource files
  mv_machine_learning: use raw data type instead of mv_source_h

Kwanghoon Son (3):
  Remove unused variable
  Move unittest script
  lcov exclude roi_tracker and surveillance

sangho park (2):
  mv3d: add new vector type
  mv_3d: Add lcov exclude statements for internal

Change-Id: I366110c6fcdab426786b5068b06e8673626b0c2c
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
11 months agomv_machine_learning: use raw data type instead of mv_source_h
Inki Dae [Wed, 3 May 2023 05:07:30 +0000 (14:07 +0900)]
mv_machine_learning: use raw data type instead of mv_source_h

[Issue type] : code refactoring

Use raw data type instead of mv_source. This patch makes Inference class
to use raw data type instead of mv_source_h as input data to perform
a requested inference. mv_source_h is a wrapper of raw buffer which
contains image data so we don't have to use mv_source_h after preprocessing.

Until now, Inference class did preprocessing work before performing an
inference with a given input image. However, preprocessing work is a step that
it can be used commonly for other core modules of Mediavision. Therefore,
it separates the preprocessing step from Inference class by using a new
run member function - the run member function needs raw tensor data.

With this patch, the preliminary work for supporting the async API is completed.

Change-Id: Ieddb3945e564645faf2abd1d93d936012e6f0d86
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agolcov exclude roi_tracker and surveillance
Kwanghoon Son [Thu, 27 Apr 2023 04:08:27 +0000 (13:08 +0900)]
lcov exclude roi_tracker and surveillance

Change-Id: I9a6f425bdfdaed6ca9e21a69e1935afa2f8dc57b
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
11 months agomv_3d: Add lcov exclude statements for internal
sangho park [Thu, 27 Apr 2023 02:23:36 +0000 (11:23 +0900)]
mv_3d: Add lcov exclude statements for internal

[Version] 0.28.4
[Issue type] lcov

Block internal APIs

Change-Id: Id96147a86a1875aea78212fe0a73f513ce0f3358
Signed-off-by: sangho park <sangho.g.park@samsung.com>
11 months agomv3d: add new vector type
sangho park [Mon, 24 Apr 2023 05:22:11 +0000 (14:22 +0900)]
mv3d: add new vector type

[Issue type] : new feature

Add new vector type for 3D and Plane equation

Change-Id: I5bd1145585226d1da0be0379f4e55424395d66ad
Signed-off-by: sangho park <sangho.g.park@samsung.com>
11 months agotest: correct install directory to resource files
Inki Dae [Tue, 25 Apr 2023 05:12:17 +0000 (14:12 +0900)]
test: correct install directory to resource files

[Issue type] : bug fix

Change-Id: I04efbe5405d71fec466dc2814134fe8425a3e0b2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agomv_machine_learning: add pose landmark task API
Inki Dae [Mon, 24 Apr 2023 04:06:23 +0000 (13:06 +0900)]
mv_machine_learning: add pose landmark task API

[Issue type] : new feature

Add pose landmark task API.

Pose landmark is one of landmark task groups. Therefore,
pose landmark task API is implemented in landmark task group
directory but provides separate task API.

As a initial model support for pose landmark, this patch implements
the CPM(Convolutional Pose Machines) model.

Change-Id: Ic55b673619c04873abb496b6670d15ebc79a9f62
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agoMove unittest script
Kwanghoon Son [Tue, 25 Apr 2023 08:03:03 +0000 (17:03 +0900)]
Move unittest script

It was generated in the spec file, so it was difficult
to know the actual result and track, so move it to file.

Change-Id: I5cbd5e5d70bd049484b5205984709377de5ffd3f
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
11 months agoRemove unused variable
Kwanghoon Son [Tue, 25 Apr 2023 05:40:49 +0000 (14:40 +0900)]
Remove unused variable

Change-Id: I42985738ddb46fbc67148227a7ab1e9911de8e10
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
11 months agomv_machine_learning: change model path for new task group API
Inki Dae [Wed, 12 Apr 2023 08:19:50 +0000 (17:19 +0900)]
mv_machine_learning: change model path for new task group API

[Issue type] : code cleanup

Changed default model path for new task group API.

We have introduced rpk package to release model relevant resource files
for each task group so the model files will be installed to different
path.

Change-Id: I70bfdb217a02c6ca2b5816d63f0ba84157ba3cb2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agomv_machine_learning: drop MV_INFERENCE_TARGET_TYPE definition
Inki Dae [Mon, 8 May 2023 02:41:15 +0000 (11:41 +0900)]
mv_machine_learning: drop MV_INFERENCE_TARGET_TYPE definition

[Issue type] : code cleanup
[Version] : 0.28.3

Drop MV_INFERENCE_TARGET_TYPE definition. This definition had been deprecated
two years ago so we don't have to keep this one. Instead of it, new definition
, MV_INFERENCE_TARGET_DEVICE_TYPE is used.

Change-Id: I8f9d3f96e87ea256d6ad9f3df59ca0726156644d
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agoMerge branch 'tizen_devel' into tizen accepted/tizen/unified/20230628.155148
Kwanghoon Son [Wed, 14 Jun 2023 02:15:11 +0000 (11:15 +0900)]
Merge branch 'tizen_devel' into tizen

[Version] 0.28.04

Inki Dae (3):
  mv_machine_learning: change model path for new task group API
  mv_machine_learning: include missed header files
  mv_machine_learning: add landmark detection task group

Kwanghoon Son (1):
  Apply clang-format on hpp file

Tae-Young Chung (2):
  mv_3d: bug fix in mv_depth_test_suite and minor changes
  mv_3d: fix bug which gives a base source regardless formats when
    mv_3d_run() invokes callback

Change-Id: I00fab971c683a887e51c34a09d9dbd3ada526779

11 months agomv_machine_learning: add landmark detection task group
Inki Dae [Thu, 13 Apr 2023 08:08:37 +0000 (17:08 +0900)]
mv_machine_learning: add landmark detection task group

[Issue type] : new feature

Add landmark detection task group support.

Landmark detection task group consists of facial landmark and
pose estimation detection task groups internally, and also provides
native API set for each task group.

As initial implemention, this patch adds facial landmark detection task
group API, which uses fld tweak cnn model.

Change-Id: I021bb3e2a3b23edbc7da2805178872ba60c1d0e4
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agomv_machine_learning: include missed header files
Inki Dae [Thu, 13 Apr 2023 05:03:47 +0000 (14:03 +0900)]
mv_machine_learning: include missed header files

[Issue type] : bug fix

Included missed face detection header files.

Face detection task is included in object detection task group
so install the face detection header files also when the object detection
task group is installed.

Change-Id: Ia96e186cee614e35fc3eae4d325a372e075ac839
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agomv_machine_learning: change model path for new task group API
Inki Dae [Wed, 12 Apr 2023 08:19:50 +0000 (17:19 +0900)]
mv_machine_learning: change model path for new task group API

[Issue type] : code cleanup

Changed default model path for new task group API.

We have introduced rpk package to release model relevant resource files
for each task group so the model files will be installed to different
path.

Change-Id: I70bfdb217a02c6ca2b5816d63f0ba84157ba3cb2
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 months agoApply clang-format on hpp file
Kwanghoon Son [Tue, 11 Apr 2023 04:46:29 +0000 (13:46 +0900)]
Apply clang-format on hpp file

Change-Id: Ifd5e02241fcd3aa044a6cb343e10128c490a14d3
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
11 months agomv_3d: fix bug which gives a base source regardless formats when mv_3d_run() invokes...
Tae-Young Chung [Mon, 24 Apr 2023 07:05:29 +0000 (16:05 +0900)]
mv_3d: fix bug which gives a base source regardless formats when mv_3d_run() invokes callback

[Version] 0.28.2
[Issue type] bug fix

in case of side-by-side or top-bottom stereo format is given as a base
source, the only left should be invoked with a callback.

Change-Id: I568df71fc8e20780fd612bdabf2978f1546e65c6
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
11 months agomv_3d: bug fix in mv_depth_test_suite and minor changes
Tae-Young Chung [Mon, 24 Apr 2023 05:56:39 +0000 (14:56 +0900)]
mv_3d: bug fix in mv_depth_test_suite and minor changes

[Version] 0.28.1
[Issue type] bug fix and update

if remote_url isn't given, it throws "an instance of 'std::logic_error'
" with "basic_string::_M_construct null not valid" message. That bug is
fixed. In addition, new command menu is added to select three types stereo formats.

Change-Id: I1fc444bead38dde47754b710a24b31c5d4c85cbe
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
11 months agoAdd {get/set}_{priv_}timestamp 98/293798/3 accepted/tizen/unified/20230608.164349
Kwanghoon Son [Mon, 10 Apr 2023 05:25:45 +0000 (14:25 +0900)]
Add {get/set}_{priv_}timestamp

[Version] 0.28.3
[Issue type] New

mv_source needs timestamp data.
Also put private timestamp data for extension.

Change-Id: I17436fdae2f475f3ad8ab8b359befa8393b8f4d7
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
12 months agoChange tizen version 7.5 to 8.0 55/293555/1 accepted/tizen/unified/20230605.170331
Kwanghoon Son [Wed, 31 May 2023 07:30:11 +0000 (16:30 +0900)]
Change tizen version 7.5 to 8.0

[Version] 0.28.2

Change-Id: Ie548bd295c0b3fdd6d70377193da1e6e503e5040
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
12 months agofix API break 17/293217/3 accepted/tizen/unified/20230528.171039
sangho park [Tue, 23 May 2023 02:02:01 +0000 (11:02 +0900)]
fix API break

[Version] 0.28.1
[Issue type] Fix

Revert api break code in previous commit
commit-id : 7b12e17515d7844448b5a84756bffcaa0e72dcdd

Change-Id: I395b628db5d1572290a3c9ac3e3d6f0867352b92
Signed-off-by: sangho park <sangho.g.park@samsung.com>
13 months agoMerge "Fix invalid qrcode attribute" into tizen accepted/tizen/unified/20230428.155053
kwang son [Mon, 24 Apr 2023 07:02:44 +0000 (07:02 +0000)]
Merge "Fix invalid qrcode attribute" into tizen

13 months agoMerge "Fix false LOGE to proper log level" into tizen
kwang son [Mon, 24 Apr 2023 07:02:34 +0000 (07:02 +0000)]
Merge "Fix false LOGE to proper log level" into tizen

13 months agoFix invalid qrcode attribute 55/291555/3
Kwanghoon Son [Tue, 18 Apr 2023 08:05:07 +0000 (17:05 +0900)]
Fix invalid qrcode attribute

mv_barcode_generate_attr_shape_e for
MV_BARCODE_GENERATE_ATTR_SHAPE_ROUND_RECT should failed to generate.

Change-Id: I9ba27b74910d62bde2fdb757198c11920a5d338b
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
13 months agomv_machine_learning: deprecate armnn backend type 70/291370/4
Inki Dae [Fri, 14 Apr 2023 02:08:19 +0000 (11:08 +0900)]
mv_machine_learning: deprecate armnn backend type

[Version] : 0.28.0
[Issue type] : deprecation

Deprecated ARMNN backend type because not used anymore.

Change-Id: I5eca183df6f74b302fa496368f53dcbdf3d0eb28
Signed-off-by: Inki Dae <inki.dae@samsung.com>
13 months agomv_3d: bug fix 54/291554/1
sangho park [Tue, 18 Apr 2023 07:58:23 +0000 (16:58 +0900)]
mv_3d: bug fix

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

fix bug for no-stride Y800 image

Change-Id: I6c6671af36303fbf2134b3192cc77d244bbb983a
Signed-off-by: sangho park <sangho.g.park@samsung.com>
13 months agoFix false LOGE to proper log level 52/291452/2
Kwanghoon Son [Mon, 17 Apr 2023 05:53:50 +0000 (14:53 +0900)]
Fix false LOGE to proper log level

Change-Id: I61000853c56f03d6789480567c037960b45a131b
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
13 months agoChange test resource path to owner media 92/291392/2 accepted/tizen/unified/20230420.041535
Kwanghoon Son [Fri, 14 Apr 2023 07:27:15 +0000 (16:27 +0900)]
Change test resource path to owner media

Change resource path /usr/share/capi-media-vision/ to
/opt/usr/home/owner/media/Others/mv_test/.

The problem is that the resource is stored in the location
where the root authority is required, so it's not working
during auto-coverage(user-mode).

Change-Id: Ibfbc8a3fd8d75af8ba75203bb2841795afd04e42
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
13 months agomv_3d: bug fix 08/291308/3
Inki Dae [Thu, 13 Apr 2023 05:44:39 +0000 (14:44 +0900)]
mv_3d: bug fix

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

Packed missed mv_3d.h file and cleaned up spec file.

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