platform/upstream/nnstreamer.git
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>
3 years ago[Dist/RPM] Fix meson path options.
MyungJoo Ham [Thu, 25 Feb 2021 00:51:47 +0000 (09:51 +0900)]
[Dist/RPM] Fix meson path options.

With the side-effects of meon join_paths,
absolute paths of bindir/libdir is working,
this is not recommended.

Fix the path inputs; use relative paths along with
prefix.

Fixes #2642

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Debian] Temporally disable caffe2/tensorflow
Dongju Chae [Tue, 2 Mar 2021 06:23:21 +0000 (06:23 +0000)]
[Debian] Temporally disable caffe2/tensorflow

This patch temporally disables caffe2/tensorflow.

They are not compatible with protobuf 3.14.0, and need the corresponding patches. This will be reverted soon.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Documentation] List up supported features for binary releases
MyungJoo Ham [Wed, 24 Feb 2021 10:13:40 +0000 (19:13 +0900)]
[Documentation] List up supported features for binary releases

For binary release list up supported features.

Fixes #1448

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Fix/Meson] Find the dependency using alternative name
Dongju Chae [Thu, 25 Feb 2021 01:53:47 +0000 (10:53 +0900)]
[Fix/Meson] Find the dependency using alternative name

This patch checks the dependency using alternative name even with 'enabled' option.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Filter/Lua] Skeleton code for LUA filter subplugin
MyungJoo Ham [Thu, 25 Feb 2021 04:08:09 +0000 (13:08 +0900)]
[Filter/Lua] Skeleton code for LUA filter subplugin

This is skeleton code for LUA filter subplugin, which
shows the idea of implementation and usage patterns.

This starts addressing #3095 (backlog of #3087)

Anyone may jump in and start implementing the contents.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[meson] supports alternative target name to find pkg dependency accepted/tizen/unified/20210226.131852 submit/tizen/20210225.100319
Dongju Chae [Mon, 22 Feb 2021 03:35:07 +0000 (12:35 +0900)]
[meson] supports alternative target name to find pkg dependency

This patch supports alternative target name to find pkg dependency.

For example, in case of armnn, the dependency name should be
'Armnn' not 'armnn' to find its cmake config files.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years agoRevert "[gRPC/Test] Add gRPC unittests using asynchronous APIs"
Dongju Chae [Tue, 23 Feb 2021 01:50:57 +0000 (10:50 +0900)]
Revert "[gRPC/Test] Add gRPC unittests using asynchronous APIs"

This reverts commit 3cafaa57660a652bf45eaadfeb4ad44d75413a81.

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[gRPC/Async] Extend gRPC codes to support async/non-blocking APIs
Dongju Chae [Tue, 22 Dec 2020 09:45:13 +0000 (18:45 +0900)]
[gRPC/Async] Extend gRPC codes to support async/non-blocking APIs

This patch extends gRPC codes to support async/non-blocking APIs.

Let's discuss about how we can handle the tag of each RPC request
in the gstreamer pipeline.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[C-Api] remove script to build c-api
Jaeyun [Thu, 18 Feb 2021 06:55:48 +0000 (15:55 +0900)]
[C-Api] remove script to build c-api

Remove build option for c-api and related testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[LOG] unifying the unit of time checker
Hyoung Joo Ahn [Fri, 19 Feb 2021 08:25:44 +0000 (17:25 +0900)]
[LOG] unifying the unit of time checker

To make it simple, the value is changed to `ms`.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[NNFW] add a timer and DBG flag
Hyoung Joo Ahn [Fri, 19 Feb 2021 04:09:18 +0000 (13:09 +0900)]
[NNFW] add a timer and DBG flag

The `DBG` flag and log messages are added to check the time of `invoke` function

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Meson] Place main library dep at the first place of deps
MyungJoo Ham [Mon, 22 Feb 2021 10:32:04 +0000 (19:32 +0900)]
[Meson] Place main library dep at the first place of deps

1. Guarantee the main library's position of deps.
2. Print out tf/tf-lite version number during meson.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[TF 2.4] TF C-API breaking changes at 2.4
MyungJoo Ham [Mon, 22 Feb 2021 08:07:41 +0000 (17:07 +0900)]
[TF 2.4] TF C-API breaking changes at 2.4

Because of breaking changes of TF 2.4
https://github.com/tensorflow/tensorflow/blob/e43be76009614be88454d2fdf2fe702acc5bab77/RELEASE.md#breaking-changes-1
, we need to use different C-API usages for TensorFlow.

The corresponding change is
> C-API functions TF_StringDecode, TF_StringEncode, and TF_StringEncodedSize are no longer relevant and have been removed; see core/platform/ctstring.h for string access/modification in C.

Fixing #3081

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Fix/test] fix unittest fail when no tflite
Jihoon Lee [Wed, 17 Feb 2021 08:59:57 +0000 (17:59 +0900)]
[Fix/test] fix unittest fail when no tflite

When testing auto option, *.tflite is used so nnstreamer tries to find
tflite in the framework. However when tflite is disabled, there is no
tflite support leading the test to segfault (tested in ubuntu 18.04)
This patch resolves the issue

v2. Fixed tizen_capi plugin. Added a convinient macro
`TEST_REQUIRE_TFLITE` to exploit `DISABLED_tcname` feature in gtest

v3. adding tizen_capi fix is reverted as tizen_capi is migrating

**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[Build] disable c-api accepted/tizen/unified/20210218.080557 submit/tizen/20210217.032056
Jaeyun [Tue, 16 Feb 2021 06:51:40 +0000 (15:51 +0900)]
[Build] disable c-api

disable c-api build.

TODO: we should remove api directory and related testcases later.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TFLite] fix a minor bug
Hyoung Joo Ahn [Wed, 17 Feb 2021 11:14:20 +0000 (20:14 +0900)]
[TFLite] fix a minor bug

during the DBG mode, the `g_critical` generate an error. Furthermore, when there are multiple models, the invoke time should be distinguished.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Build/Dev] internal header in cpp
Jaeyun [Wed, 17 Feb 2021 09:15:57 +0000 (18:15 +0900)]
[Build/Dev] internal header in cpp

add extern for cpp use in internal dev header.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Test] remove dependency to ml api
Jaeyun [Wed, 17 Feb 2021 04:55:36 +0000 (13:55 +0900)]
[Test] remove dependency to ml api

For tizen sensor element, remove dependency to ml api. Replace to gst functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[gRPC] remove uncessary dependency declaration
Dongju Chae [Tue, 16 Feb 2021 08:34:16 +0000 (17:34 +0900)]
[gRPC] remove uncessary dependency declaration

This patch removes unnecessary dependency declaration.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years agoRevert "[grpc] Temporral disable grpc package"
Dongju Chae [Tue, 16 Feb 2021 07:50:30 +0000 (16:50 +0900)]
Revert "[grpc] Temporral disable grpc package"

This reverts commit f563d989d6b26ce097574c21c6c1e6185b189614.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[TEST/common] Fix memory leak
Gichan Jang [Mon, 15 Feb 2021 01:58:32 +0000 (10:58 +0900)]
[TEST/common] Fix memory leak

Fix memory leak of the tensor common unit test.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[CAPI] Change comment to comply convention
Gichan Jang [Mon, 15 Feb 2021 06:29:00 +0000 (15:29 +0900)]
[CAPI] Change comment to comply convention

Change comment for nntrainer enum to comply convention.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Bug] Fix memory leak
Gichan Jang [Wed, 10 Feb 2021 06:52:24 +0000 (15:52 +0900)]
[Bug] Fix memory leak

Fix memory leak detected by valgrind.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST/sink] Change free function
Gichan Jang [Wed, 10 Feb 2021 06:58:27 +0000 (15:58 +0900)]
[TEST/sink] Change free function

Some tests do not remove and free temporary files.
Change to remove and free temporary files from `_free_test_data`.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[OSX] Build error fix
MyungJoo Ham [Tue, 9 Feb 2021 15:35:14 +0000 (00:35 +0900)]
[OSX] Build error fix

OSX does not have sys/auxv.h
Add a macro assuming that SIMD is always available for
OSX-AARCH64 (e.g., M1) devices.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[Build] remove unnecessary option
Jaeyun [Thu, 4 Feb 2021 07:42:01 +0000 (16:42 +0900)]
[Build] remove unnecessary option

Remove unnecessary build option for sub-plugins, default val is auto.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST/single] Destory output data handle
Gichan Jang [Tue, 9 Feb 2021 10:58:21 +0000 (19:58 +0900)]
[TEST/single] Destory output data handle

After #3002, User should destory the output handle.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[C-Api/Tizen] restricted elements for internal function
Jaeyun [Tue, 9 Feb 2021 08:07:35 +0000 (17:07 +0900)]
[C-Api/Tizen] restricted elements for internal function

Do not check restricted list when constructing a pipeline with internal API.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[grpc] Temporral disable grpc package
Gichan Jang [Tue, 9 Feb 2021 08:04:30 +0000 (17:04 +0900)]
[grpc] Temporral disable grpc package

The grpc version is upgraded, but the grpc package of the nnstreamer ppa is not upgraded properly, so it is temporarily disabled.
Discussed with dongju-chae

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[gRPC/Test] Skip SSAT tests on qemu/aarch64
Dongju Chae [Mon, 8 Feb 2021 05:55:24 +0000 (14:55 +0900)]
[gRPC/Test] Skip SSAT tests on qemu/aarch64

This patch makes gbs skip ssat tests on qemu/aarch64 env.

In gRPC 1.35.0, some behaviors are not supported on qemu/aarch64.

See the below error log
```
[  119s] qemu: Unsupported syscall: 168
[  119s] E0208 04:45:45.854670498   21089 cpu_linux.cc:41] Error determining current CPU: Function not implemented
[  119s]
[  119s] Unsupported setsockopt level=1 optname=15
[  119s] E0208 04:45:45.874942631   21089 socket_utils_common_posix.cc:222] check for SO_REUSEPORT: {"created":"@1612759545.874068306","description":"Protocol not available","errno":92,"file":"/home/abuild/rpmbuild/BUILD/grpc-1.35.0/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":198,"os_error":"Protocol not available","syscall":"setsockopt(SO_REUSEPORT)"}
[  119s] qemu: uncaught target signal 4 (Illegal instruction) - core dumped
```

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Build] remove unnecessary option accepted/tizen/unified/20210209.124348 submit/tizen/20210209.021014
Jaeyun [Thu, 4 Feb 2021 07:42:01 +0000 (16:42 +0900)]
[Build] remove unnecessary option

Remove unnecessary build option for sub-plugins, default val is auto.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[CodeClean] fix indent
Jaeyun [Fri, 5 Feb 2021 08:35:46 +0000 (17:35 +0900)]
[CodeClean] fix indent

fix indent in c-api source.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[test/SSAT] Check flatbuf and protobuf decoder sub-plugins
Yongjoo Ahn [Mon, 18 Jan 2021 07:35:18 +0000 (16:35 +0900)]
[test/SSAT] Check flatbuf and protobuf decoder sub-plugins

- Check existence of flatbuf and protobuf sub-plugins for decoder SSAT test

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Build] fix package name
Jaeyun [Fri, 5 Feb 2021 09:07:35 +0000 (18:07 +0900)]
[Build] fix package name

fix package name required for devel packages.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years agoTAOS-CI: Use .TAOS-CI/.gbs.conf by default
Geunsik Lim [Thu, 4 Feb 2021 01:51:11 +0000 (10:51 +0900)]
TAOS-CI: Use .TAOS-CI/.gbs.conf by default

This commit is to use a (1) ./.TAOS-CI/.gbs.conf or (2) ./packaging/.gbs.conf file
by default to support customized GBS repositories for each GitHub repository
because the (3) ~/.gbs.conf file of user account (e.g., www-data) can be used among
lots of repositories.

**Changelog**
 * Added ./.TAOS-CI/.gbs.conf
 * Added ./packaging/.gbs.conf
 * Replaced https with http to avoid ssl issue due to firewall

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
3 years ago[TEST] Code clean unittest plugins
Gichan Jang [Wed, 3 Feb 2021 05:01:15 +0000 (14:01 +0900)]
[TEST] Code clean unittest plugins

 - It causes confusion by performing free resource in the macros.
   Changed to release the resource in same code block.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[TEST] Add tensor filter fw autodetection unit test
Gichan Jang [Tue, 2 Feb 2021 07:14:58 +0000 (16:14 +0900)]
[TEST] Add tensor filter fw autodetection unit test

Add tensor filter framework autodetection unit tests

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Filter] Framework auto detection without specifying the option
Gichan Jang [Tue, 2 Feb 2021 06:54:43 +0000 (15:54 +0900)]
[Filter] Framework auto detection without specifying the option

Modify the tensor filter to automatically detect the framework without specifying the framework option.
Default value of the framework is changed to "auto".

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Test] separate nnfw testcase
Jaeyun [Fri, 29 Jan 2021 06:25:13 +0000 (15:25 +0900)]
[Test] separate nnfw testcase

separate testcases for nnfw plugin (functions for filter-plugin and ml-api)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[SSAT] Remove some log files generated by SSAT tests
Gichan Jang [Wed, 27 Jan 2021 04:48:16 +0000 (13:48 +0900)]
[SSAT] Remove some log files generated by SSAT tests

- Remove some log files during SSAT test for humble yocto qemu environment

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[ML-API] add log messages
Hyoung Joo Ahn [Thu, 4 Feb 2021 03:02:27 +0000 (12:02 +0900)]
[ML-API] add log messages

The additional log messages are required because returning the error code `ML_ERROR_STREAMS_PIPE` gives very little information for the abnormal situation.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
3 years ago[Doc] Move stable wiki doc to /Documentation accepted/tizen/unified/20210204.134621 submit/tizen/20210203.232822
Gichan Jang [Wed, 27 Jan 2021 04:48:16 +0000 (13:48 +0900)]
[Doc] Move stable wiki doc to /Documentation

Copy stable wiki documents to /Documentation.
After this PR, copied wiki page will be deleted.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[DOC] Add a description of the combination option
Gichan Jang [Mon, 1 Feb 2021 10:37:19 +0000 (19:37 +0900)]
[DOC] Add a description of the combination option

Add a description of the comparison between tee and input-combination.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Add nnstreamer tools to github.io
Gichan Jang [Tue, 2 Feb 2021 07:47:00 +0000 (16:47 +0900)]
[Doc] Add nnstreamer tools to github.io

Add nnstreamer tools doc to github.io

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Doc] Add nnstreamer logo to github.io
Gichan Jang [Tue, 2 Feb 2021 00:23:31 +0000 (09:23 +0900)]
[Doc] Add nnstreamer logo to github.io

Add NNStreamer logo to github.io.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Build] internal header for APIs
Jaeyun [Fri, 29 Jan 2021 07:57:38 +0000 (16:57 +0900)]
[Build] internal header for APIs

Add internal header for sub-plugins and native APIs.
After separating API repo, native API build will include this header.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[TEST] Change string property test
Gichan Jang [Mon, 1 Feb 2021 08:40:05 +0000 (17:40 +0900)]
[TEST] Change string property test

Current setting and getting string property test try to select tensor(s) that does not exist.
Changed to set and get framework of the tensor filter.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
3 years ago[Decoder/BoundingBox] Add option for detection threshold on tf-ssd reported scores
Xavier Roumegue [Tue, 26 Jan 2021 17:15:07 +0000 (18:15 +0100)]
[Decoder/BoundingBox] Add option for detection threshold on tf-ssd reported scores

This limits boxes drawing to objects detected with reasonable confidence,
specifying the threshold in percentage thanks to the option-3 as below:

option-3=bbox idx:classes idx:scores idx:num detection idx,threshold

So this adds ",threshold" to the current option-3 configuration scheme.

The threshold has to be within [0 100] range, otherwise skipped.

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/BoundingBox] Fix off-by-one error on valid TF-SSD labels handling
Xavier Roumegue [Thu, 28 Jan 2021 14:12:54 +0000 (15:12 +0100)]
[Decoder/BoundingBox] Fix off-by-one error on valid TF-SSD labels handling

The class label indexes starts at 0 while parsing the labels file,
and hence 0 should be considered as a valid label in the general case.

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/BoundingBox] Clamp bounding boxes locations
Xavier Roumegue [Thu, 28 Jan 2021 14:17:40 +0000 (15:17 +0100)]
[Decoder/BoundingBox] Clamp bounding boxes locations

Some neural networks could return negative values, which can lead to
segfault errors while drawing the boxes.

For example, the model below outputs some locations boxes with values
out of [0.0 1.0] in some circumstances.

http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/BoundingBox] Add option to specify TF-SSD output tensors mapping
Xavier Roumegue [Fri, 22 Jan 2021 19:46:02 +0000 (19:46 +0000)]
[Decoder/BoundingBox] Add option to specify TF-SSD output tensors mapping

Recent tensor flow object detections neural network models use output
tensor mapping defined by google:

https://www.tensorflow.org/lite/models/object_detection/overview#output_signature

which is different than the one currently used on bounding boxes tensor
decoder element.

This patch adds the possibility to specify any output tensors mapping
through the option-3 parameter for tf-ssd mode using the following
convention:

locations index:classes index: scores index: number of detections index.

For example, option3=0:1:2:3 would map the output tensors as defined by
previous link, .i.e. :
- Bounding boxes locations tensor on index 0
- Classes tensor on index 1
- Scores tensor on index 2
- Number of detection tensor on index 3

option3 for tf-ssd mode is optional, and if not specified, the default
tensors mapping preserve the backward compatibility (.i.e. 3:1:2:0)

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>
3 years ago[Decoder/BoundingBox] Apply gst-indent
Xavier Roumegue [Thu, 28 Jan 2021 16:26:15 +0000 (17:26 +0100)]
[Decoder/BoundingBox] Apply gst-indent

Signed-off-by: Xavier Roumegue <xavier.roumegue@nxp.com>