platform/upstream/nnstreamer.git
3 years ago[Converter] reduce complexity
Jaeyun [Mon, 19 Apr 2021 10:20:57 +0000 (19:20 +0900)]
[Converter] reduce complexity

code clean, reduce code complexity.
add internal function to parse incoming caps for custom mode.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Decoder/BoundingBox] revive old modes for backward compatibility
Hyoung Joo Ahn [Wed, 21 Apr 2021 04:26:55 +0000 (13:26 +0900)]
[Decoder/BoundingBox] revive old modes for backward compatibility

For the old-pipeline, make the previous names are usable.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Decoder/BoundingBox] change the name of option
Hyoung Joo Ahn [Tue, 13 Apr 2021 01:21:21 +0000 (10:21 +0900)]
[Decoder/BoundingBox] change the name of option

The mode of this decoder should be decided according to the model rather than the framework.
Currently, however, some of the modes are decided by the framework: `tf-ssd`, `tflite-ssd`

If we want to use this decoder to run a TFLite model that include the `postprocess`, we have to use `tf-ssd`.
It could occur some confusion.
For this reason, I want to suggest that the name should be changed.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[indent] Change indent style
Gichan Jang [Tue, 20 Apr 2021 04:55:27 +0000 (13:55 +0900)]
[indent] Change indent style

Change coding style
  - but no space after unary operators:
     &  *  +  -  ~  !  sizeof  typeof  alignof  __attribute__  defined
reference: https://www.kernel.org/doc/html/v4.10/process/coding-style.html

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Docs] Change nnstreamer CI server link
Gichan Jang [Tue, 20 Apr 2021 05:39:35 +0000 (14:39 +0900)]
[Docs] Change nnstreamer CI server link

Change nnstreamer CI server link

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years agoEnable detection for nntrainer singleshot
Jihoon Lee [Wed, 10 Mar 2021 12:13:20 +0000 (21:13 +0900)]
Enable detection for nntrainer singleshot

This patch maps *.ini as nntrainer to utilize auto detection for
nntrainer.

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[Common/Collect] check null param
Jaeyun [Mon, 12 Apr 2021 03:24:40 +0000 (12:24 +0900)]
[Common/Collect] check null param

add condition to check null param (public functions only)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Mux/Merge] clear collect pad data
Jaeyun [Fri, 9 Apr 2021 08:22:09 +0000 (17:22 +0900)]
[Mux/Merge] clear collect pad data

Clear old buffer in collect pad data when received flush event.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Converter] Add caps filter
Gichan Jang [Mon, 12 Apr 2021 02:00:11 +0000 (11:00 +0900)]
[Converter] Add caps filter

Add caps filter of tensor converter for _NNS_MEDIA_ANY type.

Example launchline:
```
...
        tensor_filter silent=false framework=tensorflow-lite model=tflite_model/ssd_mobilenet_v2_coco.tflite ! \
        tensor_decoder mode=flexbuf ! other/flexbuf ! tensor_converter silent=false ! \
        other/tensors, num_tensors=2, framerate=30/1, dimensions=\"4:1:1917:1\,91:1917:1:1\", types=\"float32\,float32\" ! \
        tensor_decoder mode=bounding_boxes option1=tflite-ssd option2=tflite_model/coco_labels_list.txt option3=tflite_model/box_priors.txt option4=640:480 option5=300:300 ! ... \
```

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Change menu tree name of contributing doc.
Gichan Jang [Mon, 12 Apr 2021 07:50:52 +0000 (16:50 +0900)]
[Doc] Change menu tree name of contributing doc.

Change menu tree name of Documentation/contributing.md.
Related issue: #3100

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder/DirectVideo] add the video format RGBA
Hyoung Joo Ahn [Fri, 9 Apr 2021 03:38:02 +0000 (12:38 +0900)]
[Decoder/DirectVideo] add the video format RGBA

To handle various video formats, the available formats are required for the direct video decoder and add an option to handle it.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[TEST] Add converter and decoder subplugins test
Gichan Jang [Thu, 8 Apr 2021 02:21:45 +0000 (11:21 +0900)]
[TEST] Add converter and decoder subplugins test

Add tensor converter and decoder subplugin test

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] Add tensor transform mode option test
Gichan Jang [Thu, 8 Apr 2021 06:38:51 +0000 (15:38 +0900)]
[Test] Add tensor transform mode option test

Add tensor transform mode option test

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add tensor common unittests
Gichan Jang [Wed, 7 Apr 2021 05:18:14 +0000 (14:18 +0900)]
[TEST] Add tensor common unittests

Add unittest for tensor common functions.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TCM] Modify tca config files
Gichan Jang [Tue, 6 Apr 2021 07:43:59 +0000 (16:43 +0900)]
[TCM] Modify tca config files

 - Move android and tizen config file of the TCM to nnstreamer/api repo
 - Modify nnstreamer config file of the TCM

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter/Decoder] Add error handling code and testcases
Gichan Jang [Tue, 6 Apr 2021 07:40:06 +0000 (16:40 +0900)]
[Converter/Decoder] Add error handling code and testcases

Add error handling code for tensor converter and decoder subplugins
Add testcases for tensor converter and decoder subplugins

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter] Define function to find subplugins
Gichan Jang [Tue, 6 Apr 2021 04:41:39 +0000 (13:41 +0900)]
[Converter] Define function to find subplugins

Define function to find converter subplugins.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[aggregator/converter] Fix when GST_EVENT_FLUSH_*
Yongjoo Ahn [Fri, 2 Apr 2021 09:45:41 +0000 (18:45 +0900)]
[aggregator/converter] Fix when GST_EVENT_FLUSH_*

- Do not reset tensor config when flush event occurs, just clear the buffers

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Mux/Merge] change property name submit/tizen/20210406.094012
Jaeyun [Tue, 6 Apr 2021 03:22:17 +0000 (12:22 +0900)]
[Mux/Merge] change property name

change property name (sync mode and option), remove underbar in property name.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[SRNPU/FILTER] Add auto detection for SRNPU subplugin
Dongju Chae [Mon, 5 Apr 2021 11:17:47 +0000 (20:17 +0900)]
[SRNPU/FILTER] Add auto detection for SRNPU subplugin

This patch adds auto detection for SRNPU subplugin.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Android/AMC] clear looper
Jaeyun [Thu, 1 Apr 2021 02:51:16 +0000 (11:51 +0900)]
[Android/AMC] clear looper

Clear looper when media steam is finished.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoChange gboolean comparison
Gichan Jang [Mon, 5 Apr 2021 04:28:18 +0000 (13:28 +0900)]
Change gboolean comparison

Never directly compare the contents of a gboolean variable with the values TRUE or FALSE.
Use `if (condition)` to check a gboolean is "true", instead of `if (condition == TRUE)`. Likewise use `if (!condition)` to check a gboolean is "false".
There is no validation when assigning to a gboolean variable and so it could contain any value represented by a gint. This is why the use of if (condition) is recommended.
All non-zero values in C evaluate to "true".

Refer: https://developer.gnome.org/glib/stable/glib-Basic-Types.html#gboolean

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Fix/Python3] Fix install link name of python3 module
Dongju Chae [Mon, 5 Apr 2021 02:24:49 +0000 (11:24 +0900)]
[Fix/Python3] Fix install link name of python3 module

This patch fixes install link name of python3 module.

As python subplugin scripts import 'nnstreamer_python',
its name should be also matched.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Converter] Remove duplicated error handling code
Gichan Jang [Mon, 5 Apr 2021 02:19:18 +0000 (11:19 +0900)]
[Converter] Remove duplicated error handling code

Remove duplicated error handling code.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter] Fix mem leak of the converter
Gichan Jang [Thu, 1 Apr 2021 10:08:18 +0000 (19:08 +0900)]
[Converter] Fix mem leak of the converter

A memory leak occurred because the name of the tensor was not released.
Free the name of the tensor and set default name as "" instead of
"Anonymous"

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Transform] add regex for stand mode
Jaeyun [Thu, 1 Apr 2021 03:01:41 +0000 (12:01 +0900)]
[Transform] add regex for stand mode

1. add regex for stand mode, filter option string.
2. ignore upper/lowercase.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Filter/EdgeTPU] tf-lite ver for EdgeTPU
Jaeyun [Thu, 1 Apr 2021 08:00:37 +0000 (17:00 +0900)]
[Filter/EdgeTPU] tf-lite ver for EdgeTPU

When tensorflow2-lite is enabled, set dependency tf2-lite to build EdgeTPU sub-plugin.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[test/tensor_transform] Add testcases for stand
Yongjoo Ahn [Mon, 29 Mar 2021 11:16:44 +0000 (20:16 +0900)]
[test/tensor_transform] Add testcases for stand

- Add SSAT testcases for stand: default and dc-average

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[tensor_data] Make tensor_data_raw_* return allocated memory
Yongjoo Ahn [Thu, 1 Apr 2021 05:55:53 +0000 (14:55 +0900)]
[tensor_data] Make tensor_data_raw_* return allocated memory

- `gst_tensor_data_raw_*` get double pointer for result as input. And allocate memory for it.
- Correspond change in tensor_transform and gsttensorif
- Divide with N, not N - 1 when calculate standard deviation

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[tensor_transform] Add "per-channel" option to stand
Yongjoo Ahn [Mon, 29 Mar 2021 07:47:17 +0000 (16:47 +0900)]
[tensor_transform] Add "per-channel" option to stand

- "channel" is the first dimension.
- Support channel-wise default and dc-average transform

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[TEST] Add apply option testcases for tensor transform
Gichan Jang [Mon, 29 Mar 2021 05:18:01 +0000 (14:18 +0900)]
[TEST] Add apply option testcases for tensor transform

Add apply option testcases for tensor transform

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TRANSFORM] Add apply option
Gichan Jang [Mon, 29 Mar 2021 00:46:18 +0000 (09:46 +0900)]
[TRANSFORM] Add apply option

User can select tensors to apply transformation.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] Fix the Svace issue accepted/tizen/unified/20210331.054224 submit/tizen/20210330.110555
Sangjung Woo [Tue, 30 Mar 2021 08:57:40 +0000 (17:57 +0900)]
[Test] Fix the Svace issue

ret variable is used without initialization. This patch fixes the bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[TizenSensor] init sensor type
Jaeyun [Tue, 30 Mar 2021 09:12:09 +0000 (18:12 +0900)]
[TizenSensor] init sensor type

set init value of sensor type. 'all' means no specific sensor and if user does not set type in pipeline, it will be failed.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[CodeQuality] add return error value
Hyoung Joo Ahn [Tue, 30 Mar 2021 08:26:15 +0000 (17:26 +0900)]
[CodeQuality] add return error value

without error return, there are a lot of unreachable code blocks will be existed.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[CodeQuality] check the variables before using it
Hyoung Joo Ahn [Tue, 30 Mar 2021 08:25:58 +0000 (17:25 +0900)]
[CodeQuality] check the variables before using it

check the allocated or passed variables has proper state.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[CodeQuality] release memory when test is failed
Hyoung Joo Ahn [Tue, 30 Mar 2021 08:25:35 +0000 (17:25 +0900)]
[CodeQuality] release memory when test is failed

when a test case is finalized with ASSERT, the allocated memory should be freed properly.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[TensorIf] add a NULL checker
Hyoung Joo Ahn [Tue, 30 Mar 2021 02:47:36 +0000 (11:47 +0900)]
[TensorIf] add a NULL checker

To improve code quality, I want to suggest a null checker.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Doxygen] Add missing doxygen tag
Gichan Jang [Tue, 30 Mar 2021 04:42:04 +0000 (13:42 +0900)]
[Doxygen] Add missing doxygen tag

Add missing doxygen tag for tensorrt

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Subplugins] Add extern "C"
Gichan Jang [Tue, 30 Mar 2021 01:10:29 +0000 (10:10 +0900)]
[Subplugins] Add extern "C"

Add extern "C" in converter, decoder and filter subplugins.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Flatbuffers] Change function name
Gichan Jang [Mon, 29 Mar 2021 05:48:45 +0000 (14:48 +0900)]
[Flatbuffers] Change function name

Change the name of functions to be consistent.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Fix typo in md files
Junhwan Kim [Tue, 30 Mar 2021 06:28:34 +0000 (15:28 +0900)]
[Doc] Fix typo in md files

Typo correction in md files.

Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
3 years ago[Spec] Remove archiving script
Sangjung Woo [Fri, 26 Mar 2021 03:47:37 +0000 (12:47 +0900)]
[Spec] Remove archiving script

This patch removes an archiving script, which is not necessary.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[RPM] Add virtual conf package
Jihoon Lee [Tue, 23 Mar 2021 04:27:13 +0000 (13:27 +0900)]
[RPM] Add virtual conf package

Add virtual conf package to resolve build dependency issue as suggested
in https://github.com/nnstreamer/api/pull/21#issuecomment-804599118

With this patch, it is now possible to install devel package with
`/etc/nntrainer.ini` or the packager choose to use `test-devel` when
building.

See also nnstreamer/nntrainer#1034

**Evaluation Method**
Cross building with nntrainer package

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Cc: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[CONVERTER] Change custom mode name
Gichan Jang [Fri, 26 Mar 2021 02:35:21 +0000 (11:35 +0900)]
[CONVERTER] Change custom mode name

Changed custom mode name to custom-code fot callback type.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Transform/Orc] orc acceleration for tensors
Jaeyun [Mon, 29 Mar 2021 08:29:15 +0000 (17:29 +0900)]
[Transform/Orc] orc acceleration for tensors

condition to support orc acceleration for each tensor.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Flatbuffer] Remove memcpy in converter
Gichan Jang [Fri, 26 Mar 2021 05:44:17 +0000 (14:44 +0900)]
[Flatbuffer] Remove memcpy in converter

Remove memory copy in converter.
Memory allocation occurs two times on g_memdup and gst_memory_new_wrapped.
Changed to use gst_memory_share.
No memory copy is performed and the memory region is simply shared.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Modify tensor_if README.md
Gichan Jang [Mon, 29 Mar 2021 01:49:11 +0000 (10:49 +0900)]
[Doc] Modify tensor_if README.md

 - Remove description of unsupported properties.
 - Elaborate the description.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years agotests/nnstreamer_repo_dynamicity: Fix unittest_repo binary path handling
Xavier Roumegue [Thu, 25 Mar 2021 15:02:34 +0000 (15:02 +0000)]
tests/nnstreamer_repo_dynamicity: Fix unittest_repo binary path handling

In case the unit tests are run from their installed directory,
unittest_repo binary can't be found in this case because install test
directory path and unittest_repo binary location are invalid.

This fixes regression introduced by bfb6630ff and 0c02456ba

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years agoCODEOWNERS: Add members
MyungJoo Ham [Mon, 29 Mar 2021 08:16:45 +0000 (17:16 +0900)]
CODEOWNERS: Add members

We had been accepting new members.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[TEST] Add tensor transform testcases for tensrs stream
Gichan Jang [Fri, 26 Mar 2021 01:34:04 +0000 (10:34 +0900)]
[TEST] Add tensor transform testcases for tensrs stream

Add tensor transform testcases for tensrs stream

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TRANSFORM] Changed to support tensors
Gichan Jang [Wed, 24 Mar 2021 01:52:02 +0000 (10:52 +0900)]
[TRANSFORM] Changed to support tensors

Changd tensor transform to support tensors

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add tensor decdoer cusotom mode unittest
Gichan Jang [Mon, 22 Mar 2021 06:39:56 +0000 (15:39 +0900)]
[TEST] Add tensor decdoer cusotom mode unittest

Add tensor decoder custom mode unittest

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder] Add decoder cusotm operation
Gichan Jang [Fri, 19 Mar 2021 04:56:25 +0000 (13:56 +0900)]
[Decoder] Add decoder cusotm operation

It is similar to cusom-easy of the tensor filter.
Get an input tensors and make output media stream.
It can be used to create cusom media stream from tensors such as flexbuffer.
Output capability is application/octet-stream.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[grpc/debian] Disable grpc packages in debian distro
Dongju Chae [Fri, 12 Mar 2021 03:54:31 +0000 (12:54 +0900)]
[grpc/debian] Disable grpc packages in debian distro

This patch disables grpc packages in debian distro.
For now, gRPC is only supported in Tizen env.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[gRPC/Test] Add gRPC unittests using asynchronous APIs
Dongju Chae [Thu, 24 Dec 2020 06:23:47 +0000 (15:23 +0900)]
[gRPC/Test] Add gRPC unittests using asynchronous APIs

This patch adds gRPC unittests using asynchronous APIs.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Build/Android] prepare subplugins for flatbuf accepted/tizen/unified/20210329.145047 submit/tizen/20210326.073159
Jaeyun [Thu, 25 Mar 2021 10:17:36 +0000 (19:17 +0900)]
[Build/Android] prepare subplugins for flatbuf

Prepare Android API build, add definition for flatbuf/flexbuf subplugins.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Add tensor converter custom mode unittest
Gichan Jang [Thu, 18 Mar 2021 10:45:22 +0000 (19:45 +0900)]
[TEST] Add tensor converter custom mode unittest

Add tensor converter custom mode unittest.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter] Add converter cusotm operation
Gichan Jang [Wed, 17 Mar 2021 07:31:44 +0000 (16:31 +0900)]
[Converter] Add converter cusotm operation

Add converter custom operation.
It is similar to cusom-easy of the tensor filter.
Get an input buffer and make output tensor.
It can be used to create tensors from not supported capabilities or
flexible data structure such as flexbuffer.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add flexbuf test for converter and decoder accepted/tizen/unified/20210324.124252 submit/tizen/20210324.062722
Gichan Jang [Fri, 12 Mar 2021 01:13:12 +0000 (10:13 +0900)]
[TEST] Add flexbuf test for converter and decoder

Add flexbuf test cases for converter and decoder

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Converter] Add flex buffer converter
Gichan Jang [Thu, 11 Mar 2021 08:45:48 +0000 (17:45 +0900)]
[Converter] Add flex buffer converter

Add tensor converter subplugin of flexbuffer.
Convert flexbuffer to tensor(s)

Example launch line:
gst-launch-1.0 videotestsrc !  video/x-raw,format=RGB,width=320,height=240 ! tensor_converter ! tensor_decoder mode=flexbuf ! other/flexbuf ! tensor_converter ! tensor_decoder mode=direct_video ! videoconvert !  videoscale ! video/x-raw,width=320,height=240 ! xvimagesink

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder] Add flex buffer decoder
Gichan Jang [Thu, 11 Mar 2021 08:00:46 +0000 (17:00 +0900)]
[Decoder] Add flex buffer decoder

Add tensor decoder subplugin offlexbuffer.
Decode tensor(s) to flexbuffer.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Spec] Add configuration for VD build
Sangjung Woo [Wed, 24 Mar 2021 05:16:20 +0000 (14:16 +0900)]
[Spec] Add configuration for VD build

* Disable NNFW, ArmCL, Viviante, pytorch, caffe2 & tensorflow.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Transform] option for DC removal
Jaeyun [Thu, 11 Mar 2021 10:12:23 +0000 (19:12 +0900)]
[Transform] option for DC removal

Add new option for DC removal (average value) in stand mode.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Common] tensor data struct
Jaeyun [Thu, 11 Mar 2021 08:02:03 +0000 (17:02 +0900)]
[Common] tensor data struct

Now tensor-transform and tensor-if use common data struct to handle data.
Add new struct and common functions to handle tensor type and value.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[API] Remove API directory
Yongjoo Ahn [Thu, 11 Mar 2021 05:28:14 +0000 (14:28 +0900)]
[API] Remove API directory

- Finish migration of API related code to ML API repo (github.com/nnstreamer/api)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Doc] Fix Android build guide after ML API repo
Yongjoo Ahn [Thu, 11 Mar 2021 05:25:03 +0000 (14:25 +0900)]
[Doc] Fix Android build guide after ML API repo

- Fix Android library build guide for ML API with nnstreamer
- REF: https://github.com/nnstreamer/api/java

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[api/Android] Remove api related declarations in nnstreamer.mk
Yongjoo Ahn [Mon, 8 Mar 2021 09:40:56 +0000 (18:40 +0900)]
[api/Android] Remove api related declarations in nnstreamer.mk

- Remove `NNSTREAMER_CAPI_*` from jni/nnstreamer.mk

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Filter/Python3] Include <stdexcept> for std::runtime_error support
Xavier Roumegue [Thu, 18 Mar 2021 18:04:48 +0000 (18:04 +0000)]
[Filter/Python3] Include <stdexcept> for std::runtime_error support

This fixes the following build issue:

error: 'runtime_error' is not a member of 'std'
|   192 |       throw std::runtime_error (dlerror ());

https://en.cppreference.com/w/cpp/error/runtime_error

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Filter/Lua] Design of LUA script rules for nnstreamer.
MyungJoo Ham [Sun, 28 Feb 2021 13:01:16 +0000 (22:01 +0900)]
[Filter/Lua] Design of LUA script rules for nnstreamer.

Provided comments on how to write nnstreamer filters with LUA.

Related with #3095

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Spec] Fix the buildbreak issue for VD accepted/tizen/unified/20210318.063516 submit/tizen/20210318.034025
Sangjung Woo [Wed, 17 Mar 2021 10:05:38 +0000 (19:05 +0900)]
[Spec] Fix the buildbreak issue for VD

* Disable OpenVino
* Omit the test case execution & testcase summary

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[Fix] Add missing file section in rpm build
Jihoon Lee [Wed, 17 Mar 2021 23:28:34 +0000 (08:28 +0900)]
[Fix] Add missing file section in rpm build

As nnstreamer mata package was not containing `files` section, it led to
the recent SR fail, this patch resolves the issue.

Also add %config directive to the configuration file

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[Doc] Change hotdoc generation script submit/tizen/20210317.111732
Gichan Jang [Tue, 9 Mar 2021 00:38:23 +0000 (09:38 +0900)]
[Doc] Change hotdoc generation script

Change hotdoc generation script.
This change will prevent broken link in github.io

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Transform] handle empty option string case
Jaeyun [Fri, 12 Mar 2021 10:18:12 +0000 (19:18 +0900)]
[Transform] handle empty option string case

If option string is empty, tensor-transform cannot parse the mode and will crash application.
Add error case for empty option string.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Decoder/Pose] Add support for position offset output tensor
Xavier Roumegue [Fri, 12 Mar 2021 16:47:59 +0000 (16:47 +0000)]
[Decoder/Pose] Add support for position offset output tensor

The decodeur can change its decoding scheme thanks to option4.
The possible mode are:
- 'heatmap-only' (default):
   * The confidence score is within [0:1] range.
   * The keypoint position can be directly used.
- 'heatmap-offset
   * This decoding scheme is applicable for posenet:
https://www.tensorflow.org/lite/examples/pose_estimation/overview
   * Sigmoid has to be applied to get condidence score
   * Additional offset tensor has to be considered to map a keypoint
    in the NN input resolution range prior to downscale to heatmap
    grid resolution size.
   Example for posenet_resnet50_16_513 NN (Same Input/Output resolution) :
... ! tensor_decoder mode=pose_estimation \
option1=513:513 option2=513:513 \
option3=key_point_labels.txt option4=heatmap-offset ! ...

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/Pose] Get key body connections from optional file
Xavier Roumegue [Thu, 11 Mar 2021 20:05:01 +0000 (20:05 +0000)]
[Decoder/Pose] Get key body connections from optional file

The body connections are added to each keypoint line in the
optional key body listing file.
A space separated number list is expected to describe other keypoints
connected to the current's one.

For example, default pose decoder configuration could be described
as the following:
top 1
neck 0 2 5 8 11
r_shoulder 1 3
r_elbow 2 4
r_wrist 3 1
l_shoulder 1 6
l_elbow 5 7
l_wrist 6
r_hip 1 9
r_knee 8 10
r_ankle 9
l_hip 1 12
l_knee 11 13
l_ankle 12

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Package] Seperate nnstreamer into core and conf
Jihoon Lee [Mon, 15 Mar 2021 11:11:20 +0000 (20:11 +0900)]
[Package] Seperate nnstreamer into core and conf

This patch separates nnstreamer into nnstreamer-core and nnstreamer-configuration.
From this patch, nnstreamer becomes a meta package that requires
`nnstreamer-core` and `nnstreamer-configuration`.

**Evaluation Method**
gbs and pdebuild

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
Cc: Myungjoo Ham <myungjoo.ham@samsung.com>
3 years ago[Doc] Add documentation of using test-devel
Jihoon Lee [Thu, 11 Mar 2021 09:44:24 +0000 (18:44 +0900)]
[Doc] Add documentation of using test-devel

Add documentation of how to utilize test-devel package in the
perspective of subplugin developer

**Self evaluation:**
1. Build test: [ ]Passed [ ]Failed [X]Skipped
2. Run test: [ ]Passed [ ]Failed [X]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[Packaging] Add test-devel to rpm/dpkg
Jihoon Lee [Thu, 11 Mar 2021 09:15:49 +0000 (18:15 +0900)]
[Packaging] Add test-devel to rpm/dpkg

Add test-devel to rpm/dpkg

This patch...
1. offers `nnstreamer-template.ini.in` from test-devel package
1. offers `subplugin_unittest_template.cc.in` from test-devel package
1. for rpm test-devel, it renames /etc/nnstreamer.ini until test-devel
is unintalled
1. add pkg-config variable to locate test related templates

Resolves #3124

Tested using gbs and pdebuild

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
3 years ago[TEST] Test protobuf and flatbuf support tensors
Gichan Jang [Fri, 12 Mar 2021 04:47:03 +0000 (13:47 +0900)]
[TEST] Test protobuf and flatbuf support tensors

Test whether flatbuffer and protobuf support other/tensors.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Transform] tensor type in stand mode
Jaeyun [Wed, 10 Mar 2021 10:10:59 +0000 (19:10 +0900)]
[Transform] tensor type in stand mode

Currently only float32 can use stand mode in tensor-transform.

Add option to set output type and calc stand mode.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test] Fix typo
Juyeong Lee [Fri, 12 Mar 2021 15:11:41 +0000 (00:11 +0900)]
[Test] Fix typo

Fix typo made in #3130

Signed-off-by: Juyeong Lee <2jy22@naver.com>
3 years ago[Decoder] file content size
Jaeyun [Fri, 12 Mar 2021 07:05:43 +0000 (16:05 +0900)]
[Decoder] file content size

When loading data from file, use param to get the contents size.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[tests/decoder_pose] Remove dummy option3 setting from command line
Xavier Roumegue [Wed, 10 Mar 2021 12:56:56 +0000 (12:56 +0000)]
[tests/decoder_pose] Remove dummy option3 setting from command line

Option3 is now used to specify the labels file.

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/Pose] Add support for optional pose label file
Xavier Roumegue [Tue, 9 Mar 2021 12:28:56 +0000 (12:28 +0000)]
[Decoder/Pose] Add support for optional pose label file

This adds an optional option (3), specifying the pose labels file path.

A label per line is expected, line number specifying the pose id.

If this option is not selected, legacy label mapping is used as fallback.

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/Pose] Run gst-indent
Xavier Roumegue [Wed, 10 Mar 2021 16:41:00 +0000 (16:41 +0000)]
[Decoder/Pose] Run gst-indent

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/Utils] Remove last empty label while enumerating labels from file
Xavier Roumegue [Tue, 9 Mar 2021 19:46:13 +0000 (20:46 +0100)]
[Decoder/Utils] Remove last empty label while enumerating labels from file

While parsing the labels file, a label per line is expected.
g_strsplit(file_contents, '\n', -1) is used to parse the file and
returns the label as a string vector.

The last '\n' in the file introduces an additional empty element, as the
delimiter involves 2 elements.

Hence, the patch is removing the last trailing '\n' to avoid this
additional dummy element in the labels list.

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/Utils] Run gst-indent on tensordecutil.c
Xavier Roumegue [Wed, 10 Mar 2021 16:37:24 +0000 (16:37 +0000)]
[Decoder/Utils] Run gst-indent on tensordecutil.c

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years agoRemove underscore in test names
Juyeong Lee [Thu, 11 Mar 2021 20:53:06 +0000 (05:53 +0900)]
Remove underscore in test names

Resolves #2541
Update test suit names and test names not to contain underscore.
This follows gtest recommendations.
https://github.com/google/googletest/blob/master/docs/faq.md#why-should-test-suite-names-and-test-names-not-contain-underscore

Signed-off-by: Juyeong Lee <2jy22@naver.com>
3 years ago[Coverity] Fix coverity issues (CID 314892, 314893)
Dongju Chae [Fri, 12 Mar 2021 01:38:55 +0000 (10:38 +0900)]
[Coverity] Fix coverity issues (CID 314892, 314893)

This patch fixes coverity issues (CID 314892, 314893)
- UNINTENDED_INTEGER_DIVISION

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Filter/TF-lite] tensor name in meta
Jaeyun [Mon, 8 Mar 2021 06:11:14 +0000 (15:11 +0900)]
[Filter/TF-lite] tensor name in meta

Set tensor name in tensors info struct.

TODO: we should update testcases in api repo later.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoFix md file link
hyeonseok lee [Wed, 3 Mar 2021 09:52:17 +0000 (18:52 +0900)]
Fix md file link

1. Fix all the md files in
$NNST_ROOT/*.md
$NNST_ROOT/Documentation/*.md
$NNST_ROOT/tools/*md
which has a link to other md files

Signed-off-by: hyeonseok lee <hs89.lee@samsung.com>
3 years ago[Edge/MQTT] Manifest for MQTT implementation accepted/tizen/unified/20210308.132520 submit/tizen/20210305.081230 submit/tizen/20210308.024729
MyungJoo Ham [Wed, 3 Mar 2021 10:44:32 +0000 (19:44 +0900)]
[Edge/MQTT] Manifest for MQTT implementation

This describes more specific for #3104.
The assignees of #3104 should refer to this document for implementation.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Python] Change the logic to find the python library name
Dongju Chae [Thu, 4 Mar 2021 06:17:15 +0000 (15:17 +0900)]
[Python] Change the logic to find the python library name

This patch changes the logic to find the python library name.

The library name depends on which options were used to build python.
For example, if python 3.7 was compiled with '--with-pymalloc',
the library name is 'libpython3.7m.so'

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[If] fix typo
Jaeyun [Wed, 3 Mar 2021 11:30:13 +0000 (20:30 +0900)]
[If] fix typo

Fix typo, property name of tensor-if element.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoRevert "[Debian] Temporally disable caffe2/tensorflow"
Dongju Chae [Thu, 4 Mar 2021 01:51:27 +0000 (10:51 +0900)]
Revert "[Debian] Temporally disable caffe2/tensorflow"

This reverts commit dd053adff98fadd339eb9a5f50078bdcae73d7f7.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Build] fix install path accepted/tizen/unified/20210305.034038 submit/tizen/20210303.233950
Jaeyun [Wed, 3 Mar 2021 11:46:37 +0000 (20:46 +0900)]
[Build] fix install path

fix build error, change unittest install path.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Meson] Revise build dependency checking mechanism for MvNCSDK2 submit/tizen/20210303.100623
Wook Song [Wed, 24 Feb 2021 09:57:41 +0000 (18:57 +0900)]
[Meson] Revise build dependency checking mechanism for MvNCSDK2

The existing build dependency checking mechanism for MvNCSDK2 is
unnecessarily complex. This patch revises it.

See also: https://review.tizen.org/gerrit/#/c/platform/adaptation/npu/intel-libmvnc/+/254171/

Reported-by: Jaeyun Jung <jy1210.jung@samsung.com>
Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Test] unittest install dir
Jaeyun [Fri, 19 Feb 2021 07:53:08 +0000 (16:53 +0900)]
[Test] unittest install dir

change unittest install dir (libdir to bindir) and update related build script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Docs] Fix broken links in contributing guide
Juyeong Lee [Thu, 25 Feb 2021 18:32:01 +0000 (03:32 +0900)]
[Docs] Fix broken links in contributing guide

This patch updates broken links in contributing guide.

Signed-off-by: Juyeong Lee <2jy22@naver.com>