platform/upstream/nnstreamer.git
3 years ago[Ext/Decoder] Support face detection models for OpenVino
Wook Song [Tue, 18 Aug 2020 02:45:58 +0000 (11:45 +0900)]
[Ext/Decoder] Support face detection models for OpenVino

The output tensor description of face detection model for OpenVino is
the same as that of person detection model for the same framework. This
patch updates the bounding-boxes mode of tensor decoder to support face
detection model by reusing the code for the person detection model
support.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[single] Bug fix for setting accelerator
Parichay Kapoor [Fri, 14 Aug 2020 12:05:25 +0000 (21:05 +0900)]
[single] Bug fix for setting accelerator

Bug fix for setting accelerator in the C-API.
When accelerator is set after the framework, tensor_filter does not know the framework
to check its version and store that information appropriately.
This patch changes the order of setting this information.
However, this bug still exists for pipeline API.

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

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
3 years ago[test/fix] Fix signed-unsigned compare
Yongjoo Ahn [Thu, 20 Aug 2020 01:16:21 +0000 (10:16 +0900)]
[test/fix] Fix signed-unsigned compare

- Fix build fail issue when build with capi

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
3 years ago[Documentation] Revised getting started for better readability.
MyungJoo Ham [Thu, 13 Aug 2020 08:42:06 +0000 (17:42 +0900)]
[Documentation] Revised getting started for better readability.

Do not mix up different build environments.
Seperate documents for better readability.

Added ```rm -rf build``` in spec file to make it consistent with the documentation.
Now, you may do ```gbs build --include-all``` even if you have built in your git repo.

Fixes #2636

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
3 years ago[TESTS/CAPI] Seperate negative TC as single test case
gichan-jang [Wed, 19 Aug 2020 09:51:08 +0000 (18:51 +0900)]
[TESTS/CAPI] Seperate negative TC as single test case

Negative TCs has multiple tests, separate them as single test cases.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Android] build script with tf-lite 2.3
Jaeyun [Fri, 14 Aug 2020 08:53:41 +0000 (17:53 +0900)]
[Android] build script with tf-lite 2.3

update tf-lite version info in build script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[SPEC] Exclude device-dependent filters when checking testcase coverage
Sangjung Woo [Wed, 19 Aug 2020 08:37:34 +0000 (17:37 +0900)]
[SPEC] Exclude device-dependent filters when checking testcase coverage

This patch excludes the device-dependent filters such as OpenVino and
EdgeTPU when checking testcase coverage.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
3 years ago[TESTS/CAPI] Seperate negative TC as single test case - cutom filter register
gichan-jang [Fri, 14 Aug 2020 07:47:00 +0000 (16:47 +0900)]
[TESTS/CAPI] Seperate negative TC as single test case - cutom filter register

Negative TCs has multiple tests, separate them as single test cases.
After this commit:
 - Total TCs: 458
 - Positive TCs: 250
 - Negative TCs: 208

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[TESTS/CAPI] Seperate negative TC as single test case - element-wise control function
gichan-jang [Fri, 14 Aug 2020 07:21:03 +0000 (16:21 +0900)]
[TESTS/CAPI] Seperate negative TC as single test case - element-wise control function

Negative TCs has multiple tests, separate them as single test cases.
After this PR :
 - Total TCs: 450
 - Positive TCs: 250
 - Negative TCs: 200

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
3 years ago[Ext/Decoder] Support person detection models for OpenVino
Wook Song [Fri, 14 Aug 2020 16:59:21 +0000 (01:59 +0900)]
[Ext/Decoder] Support person detection models for OpenVino

This patch updates the tensor-decoder subplugin, "bounding-boxes", to
support person detection models for OpenVino.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Android/NNFW] update version
Jaeyun [Wed, 19 Aug 2020 06:15:00 +0000 (15:15 +0900)]
[Android/NNFW] update version

We will use ONE v1.8.0 from next build & release of Android APIs.

cc. @lemmaa @chunseoklee

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
3 years ago[Tools/Profiling] Add a section for NNShark to README.md
Wook Song [Fri, 14 Aug 2020 17:23:37 +0000 (02:23 +0900)]
[Tools/Profiling] Add a section for NNShark to README.md

This patch adds a section for NNShark to the README.md file.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Android] fix data conversion error
Jaeyun [Tue, 18 Aug 2020 07:39:22 +0000 (16:39 +0900)]
[Android] fix data conversion error

The result of single-shot invoke is invalid.
Remove tensor data free after converting native handle to data object in single-shot.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Dist/Tizen] Correct typo accepted/tizen/unified/20200819.100355 submit/tizen/20200814.014406
Wook Song [Fri, 14 Aug 2020 17:27:18 +0000 (02:27 +0900)]
[Dist/Tizen] Correct typo

This patch corrects typo in the rpm spec file.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[nnfw] Support INT64 for nnfw
Semun Lee [Fri, 14 Aug 2020 05:39:52 +0000 (14:39 +0900)]
[nnfw] Support INT64 for nnfw

Some models use INT64 type

Change-Id: I1009cc7ac845c1dbb20fbed36fc68b08f98e81dc
Signed-off-by: Semun Lee <semun.lee@samsung.com>
4 years ago[Dist/Tizen] Add a sub-package that enables tensor filter for OpenVino
Wook Song [Wed, 15 Jul 2020 01:26:31 +0000 (10:26 +0900)]
[Dist/Tizen] Add a sub-package that enables tensor filter for OpenVino

This patch adds a sub-package that enables the tensor filter plugin
for OpenVino support.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[TESTS] Fix no assertion test submit/tizen/20200818.015631
gichan-jang [Thu, 13 Aug 2020 05:16:03 +0000 (14:16 +0900)]
[TESTS] Fix no assertion test

1. The TCM(test case manager) cannnot check properly the test which is defined as macro.
   Add assert test for unittest_plugins.cc
2. Remove version control test. It's not proper negative test.
3. tensor_filter_custom_easy.in_code_func_01 is False-negative.
   The test case contains assert_* and expect_*, it is detected as no assertion TC.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[TCM] Add config file for Tizen
Sangjung Woo [Wed, 12 Aug 2020 12:17:56 +0000 (21:17 +0900)]
[TCM] Add config file for Tizen

This patch newly add config_tizen.yaml file for Tizen. Existing
config.yaml is renamed to config_android.yaml.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Android] mem ptr to byte-buffer accepted/tizen/unified/20200813.122616 submit/tizen/20200813.010849
Jaeyun [Wed, 5 Aug 2020 11:29:21 +0000 (20:29 +0900)]
[Android] mem ptr to byte-buffer

In native code, we can get the mem ptr of byte-buffer.
Remove memcopy to convert tensors object and data struct in native.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[android] Set `extractNativeLibs` true to use snpe dsp/npu runtimes
Yongjoo Ahn [Wed, 12 Aug 2020 02:49:18 +0000 (11:49 +0900)]
[android] Set `extractNativeLibs` true to use snpe dsp/npu runtimes

- For  Android Gradle Plugin 3.6.0 or higher the property is set to "false" by default
- This makes snpe sub-plugin unable to use dsp/npu runtime

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[tizensensor] Remove code related with timestamp
Yongjoo Ahn [Tue, 11 Aug 2020 02:50:12 +0000 (11:50 +0900)]
[tizensensor] Remove code related with timestamp

- Cause GstBaseSrc manages the timestamp, remove related part

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Android/Custom] change method name
Jaeyun [Thu, 6 Aug 2020 05:37:02 +0000 (14:37 +0900)]
[Android/Custom] change method name

Change method and interface name, with C# API implementation.

NOTE:
The example app should be updated also.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android] build script for nnfw
Jaeyun [Wed, 5 Aug 2020 07:41:41 +0000 (16:41 +0900)]
[Android] build script for nnfw

Update build script
- Remove unnecessary so in nnfw prebuilt libs
- Add nnfw-ext option

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Custom] free tensors-info handle
Jaeyun [Tue, 11 Aug 2020 09:21:48 +0000 (18:21 +0900)]
[Android/Custom] free tensors-info handle

After converting info object in registration, free tensors-info handles.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[SAM] remove global val
Jaeyun [Tue, 11 Aug 2020 03:19:05 +0000 (12:19 +0900)]
[SAM] remove global val

SAM report, remove global value in sub-plugins.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/AMC] start thread after the construction
Jaeyun [Thu, 6 Aug 2020 09:16:38 +0000 (18:16 +0900)]
[Android/AMC] start thread after the construction

Fix exception case, start amcsrc-looper after calling the constructor.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-api] Fix typo
DaWoon Kim [Mon, 10 Aug 2020 12:31:24 +0000 (21:31 +0900)]
[C-api] Fix typo

Fix typo from:
nnstreamer.h

Signed-off-by: DaWoon Kim <kim1023123@gmail.com>
4 years ago[C-api] Fix typo
DaWoon Kim [Sun, 9 Aug 2020 11:01:08 +0000 (20:01 +0900)]
[C-api] Fix typo

Fix typo from:
nnstreamer-capi-single.c

Signed-off-by: DaWoon Kim <kim1023123@gmail.com>
4 years ago[example] Use macro to copy tensor info
Tony Jinwoo Ahn [Sun, 2 Aug 2020 15:48:52 +0000 (00:48 +0900)]
[example] Use macro to copy tensor info

Add a macro to copy tensor info

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
4 years ago[filter] Buf fix of setting num_tensors to 0
Parichay Kapoor [Wed, 29 Jul 2020 08:26:49 +0000 (17:26 +0900)]
[filter] Buf fix of setting num_tensors to 0

In case, empty string is provided for the property,
tensor filter set_property() sets the number of tensors to 0 in
its private info.

Now with this patch, updating the num_tensors to non-zero is allowed.
However, setting to 0 is not.

Resolves #2594

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

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tflite] Minimize invoke critical path
Parichay Kapoor [Mon, 27 Jul 2020 04:26:00 +0000 (13:26 +0900)]
[tflite] Minimize invoke critical path

Minimize invoke critical path for tflite extension:
1. Cache input and output tensor ptrs out of the invoke to the location where extension
stores input and output tensors info
2. Verification of output size also moved out of invoke as the output tensor memory is
allocated internally by nnstreamer and its size is verified by each of the single API
and by tensor_filter.c for pipeline

V2:
Added bug fix to basic unittests for tflite reload exposed with the changes proposed in this PR

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tflite] Optimization for the invoke critical path
Parichay Kapoor [Mon, 27 Jul 2020 02:10:05 +0000 (11:10 +0900)]
[tflite] Optimization for the invoke critical path

tflite invoke stores evaluates and stores indexes of input and output tensors which is not needed
Remove it from critical path

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tools] Fix typo
Tony Jinwoo Ahn [Fri, 7 Aug 2020 00:19:39 +0000 (09:19 +0900)]
[tools] Fix typo

Changes for nnstreamer-toolkit.py:
1. Change "Library" to "Lesser" for LGPL v2.1
   Both words are correct, but "Lesser" is more common in v2.1
2. Fix some typo

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
4 years ago[nnfw] Optimize nnfw invoke submit/tizen/20200807.102305
Parichay Kapoor [Wed, 29 Jul 2020 04:29:10 +0000 (13:29 +0900)]
[nnfw] Optimize nnfw invoke

This patch caches the type for the input and output data tensor
rather than calculating it at every invoke call.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[C-Api/Src] free function in input data
Jaeyun [Thu, 6 Aug 2020 03:10:33 +0000 (12:10 +0900)]
[C-Api/Src] free function in input data

Remove memcopy in input-data API.
If buffer policy is do-not-free, we dont need to set free function when wrapping the memory block.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] fix exception case
Jaeyun [Thu, 6 Aug 2020 03:50:36 +0000 (12:50 +0900)]
[C-Api] fix exception case

Clear pipeline bus before unref the pipeline.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[c-api] Add unlikely for improved branch prediction
Parichay Kapoor [Mon, 3 Aug 2020 10:58:11 +0000 (19:58 +0900)]
[c-api] Add unlikely for improved branch prediction

Add G_UNLIKELY at all the error checks for invoke to improve branch predicition

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

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[single] Use pre-computed input tensor size
Parichay Kapoor [Wed, 29 Jul 2020 03:05:37 +0000 (12:05 +0900)]
[single] Use pre-computed input tensor size

Use pre-computed input tensor data size for validation than computing it in each invoke call

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[single] Reduce wrapper memcopy for invoke
Parichay Kapoor [Wed, 29 Jul 2020 02:44:39 +0000 (11:44 +0900)]
[single] Reduce wrapper memcopy for invoke

Reduced wrapper memcopy for invoke by typecasting ml_tensors_data_s->tensors to GstTensorMemory *
This reduces invoke latency

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[C-api] Fix typo
DaWoon Kim [Wed, 5 Aug 2020 10:39:39 +0000 (19:39 +0900)]
[C-api] Fix typo

Fix typo from:
nnstreamer-capi-pipeline.c

Signed-off-by: DaWoon Kim <kim1023123@gmail.com>
4 years ago[Single] Add unittest to measure invoke latency by single API
Parichay Kapoor [Thu, 23 Jul 2020 12:33:46 +0000 (21:33 +0900)]
[Single] Add unittest to measure invoke latency by single API

Added unittest to measure the invoke latency by single API.
This latency is measured for tensorflow-lite and nnfw-runtime filters.
The latency is measured by running the invoke with single API and running
the invoke over the same data with the same model using filter API directly.
The difference in average execution time is reported as the latency introduced
by the single API invoke per call.
The invoke is called 1000 times after a warmup where the output is also verified.

V2:
Direct latency is the invoke duration of the library call
Latency induced by the SINGLE API is inclusive of the overhead by the API and the extension
Overhead induced by the extension is the overhead by the invoke function in the extension

V3:
Sleep for 30sec between consecutive latency tests for different frameworks for cooldown

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[C-API] removing the hard coded waiting time
Hyoung Joo Ahn [Fri, 31 Jul 2020 07:21:03 +0000 (16:21 +0900)]
[C-API] removing the hard coded waiting time

Currently the waiting time for the state change at the destroy moment is fixed with 50ms even when the state change is not called. This PR suggests changing it with `check-and-wait` loop with a new flag

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Test] add test for single-invoke
Jaeyun [Fri, 31 Jul 2020 10:35:24 +0000 (19:35 +0900)]
[Test] add test for single-invoke

mark negative cases and add new testcases for single-shot invoke function.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test] Fix signed-unsigned comparison
Yongjoo Ahn [Mon, 3 Aug 2020 09:36:46 +0000 (18:36 +0900)]
[Test] Fix signed-unsigned comparison

- For gtest EXPECT_EQ, change constants to unsigned value

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Dist/Tizen] Package unittests
Parichay Kapoor [Tue, 4 Aug 2020 08:43:11 +0000 (17:43 +0900)]
[Dist/Tizen] Package unittests

Add packaging of unittests for Tizen distribution

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

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoC-API/ml_pipeline_src_input_data new enum for events suggstion.
MyungJoo Ham [Wed, 22 Jul 2020 02:20:36 +0000 (11:20 +0900)]
C-API/ml_pipeline_src_input_data new enum for events suggstion.

In order to give events to appsrc via ml_pipeline_src_input_data,
I'd like to suggest to use "policy" argument to keep "data"
uncomplicated.

We can simply add non-policy enum values to have general
event support; if you need some value for an event, you can
keep using "data".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test/tizensensor] Add unittest for tensor_src_tizensensor
Yongjoo Ahn [Thu, 30 Jul 2020 05:25:40 +0000 (14:25 +0900)]
[Test/tizensensor] Add unittest for tensor_src_tizensensor

- Add negative TCs with invalid sensor, unsupported sensor

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years agoRevert "[Android/NNFW] change nnfw version"
MyungJoo Ham [Mon, 3 Aug 2020 09:49:22 +0000 (18:49 +0900)]
Revert "[Android/NNFW] change nnfw version"

This reverts commit 5eefd5119550bbd19c351ecfb04bef1d589b72bd.

PM has decided to keep using 1.6.0 for this release.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[filter/single] Optimize invoke path for tensor filter single
Parichay Kapoor [Tue, 28 Jul 2020 04:16:36 +0000 (13:16 +0900)]
[filter/single] Optimize invoke path for tensor filter single

Tensor filter single performs various check on invoke
However, these checks are done on properties which remain static after open and first invoke
So, these checks are now performed on the first invoke only
Further, some checks were being performed multiple times, which have now been removed.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[C-API] Use typedef enum for feature_state
Tony Jinwoo Ahn [Sun, 2 Aug 2020 15:54:22 +0000 (00:54 +0900)]
[C-API] Use typedef enum for feature_state

For readability, use typedef enum.
https://github.com/nnstreamer/nnstreamer/issues/2574

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
4 years ago[Android/NNFW] change nnfw version
Jaeyun [Mon, 3 Aug 2020 06:30:23 +0000 (15:30 +0900)]
[Android/NNFW] change nnfw version

use nnfw 1.6.1 for android build and release.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] fix typo
Jaeyun [Mon, 3 Aug 2020 04:51:07 +0000 (13:51 +0900)]
[C-Api] fix typo

add line comment and missing dot in api description.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[example] Fix typo accepted/tizen/unified/20200803.122219 submit/tizen/20200803.040343
Tony Jinwoo Ahn [Sun, 2 Aug 2020 15:43:35 +0000 (00:43 +0900)]
[example] Fix typo

Fix typo from:
nnstreamer_customfilter_example_average.c

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
4 years ago[Test/CAPI] Update the testcase of element-wise control function
Sangjung Woo [Fri, 31 Jul 2020 04:53:08 +0000 (13:53 +0900)]
[Test/CAPI] Update the testcase of element-wise control function

This patch updates the testcase of element-wise control function since
the negative testcase does not have a negative code.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] int32/uint32 get/set functions support enum type.
Sangjung Woo [Thu, 30 Jul 2020 11:14:52 +0000 (20:14 +0900)]
[C-API] int32/uint32 get/set functions support enum type.

This patch makes int32/uint32 element-wise getter/setter functions
support Enumeration type. It is much natural and easy to use for
developers. I also add related test cases.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[tensor] Update GstTensorMemory coherent with ml_tensors_data_s
Parichay Kapoor [Tue, 28 Jul 2020 07:23:08 +0000 (16:23 +0900)]
[tensor] Update GstTensorMemory coherent with ml_tensors_data_s

One of the efforts to minimize API latency is to avoid creating data wrappers in
API and internally in nnstreamer and avoid its copying. Rather just interpret
the API data structure as internal definition.
This requires internal and external structures to be coherent.
This commit makes GstTensorMemory coherent with ml_tensor_data_s by removing
`tensor_type type` from GstTensorMemory.

type can be remove from GstTensorMemory as GstTensorMemory is used internally
and its usage is always supported with GstTensorInfo which contains the type information.
Correspondingly update the existing elements and extensions which use GstTensorMemory
to use the GstTensorInfo type information.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[ext/python] Bug fix for python extension
Parichay Kapoor [Tue, 28 Jul 2020 07:21:51 +0000 (16:21 +0900)]
[ext/python] Bug fix for python extension

setInputDimension in python extension updates only the number of tensors that all the info
Added bug fix to update all of the info

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Android] remove java in native libs
Jaeyun [Wed, 29 Jul 2020 10:55:16 +0000 (19:55 +0900)]
[Android] remove java in native libs

For native developers, remove gstreamer java file in native libraries.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Doc] Add edgeAI example description
gichan-jang [Thu, 30 Jul 2020 05:08:03 +0000 (14:08 +0900)]
[Doc] Add edgeAI example description

Add edgeAI example description.
1. Image classification
2. Text classification
3. Image classification

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[CAPI] Fix the public header issue for doxygen
Sangjung Woo [Fri, 31 Jul 2020 05:24:31 +0000 (14:24 +0900)]
[CAPI] Fix the public header issue for doxygen

This patch fixes the public header issue for doxygen, which is requested
by Sunggyu Choi.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] add the EOS push at the destroy moment accepted/tizen/unified/20200802.223717 submit/tizen/20200731.015445
Hyoung Joo Ahn [Thu, 30 Jul 2020 09:55:55 +0000 (18:55 +0900)]
[C-API] add the EOS push at the destroy moment

for the specific situation, tensor_mux(refresh), the EOS buffer has to be inserted to make the pipeline state as NULL

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Android] params to init nnstreamer
Jaeyun [Wed, 29 Jul 2020 04:07:43 +0000 (13:07 +0900)]
[Android] params to init nnstreamer

Add condition to check params when initializing nnstreamer.
Also, single-shot does not need gstreamer initialization. Add feature for this.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[single] Optimize invoke critical path
Parichay Kapoor [Tue, 28 Jul 2020 03:45:28 +0000 (12:45 +0900)]
[single] Optimize invoke critical path

Remove setup gstTensorMemory in each invoke call
rather, pre-set the tensor memory when input dimensions are set
and re-use that setup tensor memory wrapper each time

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Test/CAPI] Update testcases of element-wise control functions
Sangjung Woo [Fri, 24 Jul 2020 05:44:36 +0000 (14:44 +0900)]
[Test/CAPI] Update testcases of element-wise control functions

This patch updates testcases of element-wise control functions to comply
with Tizen API Design Guideline.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] Modify element-wise control functions
Sangjung Woo [Fri, 24 Jul 2020 05:44:10 +0000 (14:44 +0900)]
[C-API] Modify element-wise control functions

To comply with Tizen API Design Guideline, this patch use single
key-value pair for ml_pipeline_element_set_property and
ml_pipeline_element_get_property function.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years agoFix Ubuntu CI Build Error
MyungJoo Ham [Mon, 27 Jul 2020 10:53:10 +0000 (19:53 +0900)]
Fix Ubuntu CI Build Error

Having header inclusion with incorrect orders
may incur errors with older gcc of older Ubuntu distro.

You shouldn't omit headers only because they may be included
indirectly by other headers.

Change-Id: Iaf4a096e08ee27d431fad85052edbae21470114f
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[single] Memory leak bug fix
Parichay Kapoor [Tue, 28 Jul 2020 03:56:24 +0000 (12:56 +0900)]
[single] Memory leak bug fix

Add memory leak bug fix
When output ml_tensors_data_h fails to allocate, the already computed output must be freed before return

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Meson] dependency for filter subplugin
Jaeyun [Tue, 28 Jul 2020 07:18:07 +0000 (16:18 +0900)]
[Meson] dependency for filter subplugin

1. For nnfw deprecated function, find symbol in header. (cannot find function in library)
2. Remove unnecessary dependency to check pytorch version.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test] testcase to convert multi tensors
Jaeyun [Fri, 10 Jul 2020 05:35:44 +0000 (14:35 +0900)]
[Test] testcase to convert multi tensors

add new testcases to convert byte stream to multi tensors.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Converter] bytes to multi tensors
Jaeyun [Fri, 10 Jul 2020 05:30:48 +0000 (14:30 +0900)]
[Converter] bytes to multi tensors

parse the list of input info (dimension and type), and convert byte-stream to multi tensors.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Common] function to get data size
Jaeyun [Thu, 9 Jul 2020 10:25:48 +0000 (19:25 +0900)]
[Common] function to get data size

Add new function to get data size from tensors info.
If index is negative value, this will return total data size of tensors.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[CodeClean] remove redundant space
Jaeyun [Wed, 29 Jul 2020 03:57:36 +0000 (12:57 +0900)]
[CodeClean] remove redundant space

Remove redundant space in source file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[tizensensor] Add tolerance for sensor data check
Yongjoo Ahn [Mon, 27 Jul 2020 01:59:09 +0000 (10:59 +0900)]
[tizensensor] Add tolerance for sensor data check

Ease the future timestamp check:
- At the check time, the timestamp of event could be the "next" sample
- Add tolerance amount of sampling rate
- Change Error to Warning

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[TCM] Add yaml config file for android
gichan-jang [Mon, 27 Jul 2020 09:45:15 +0000 (18:45 +0900)]
[TCM] Add yaml config file for android

TCM(Test Case Manager) requires config.yaml file.
The config file is written for android API test.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Android/Single] allow 0 timeout
Jaeyun [Mon, 27 Jul 2020 04:40:27 +0000 (13:40 +0900)]
[Android/Single] allow 0 timeout

Now C-API allows setting 0 timeout val, change condition to set timeout value.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoCAPI/Single: Optimize no-timeout mode run-time performance
MyungJoo Ham [Wed, 22 Jul 2020 07:35:32 +0000 (16:35 +0900)]
CAPI/Single: Optimize no-timeout mode run-time performance

Do not invoke in a secondary thread, but ivoke in
the primary thread directly without CV so that
there is minimized latencies for single-invoke calls.

This has refactored the invoke-output-process routine.

This follows-up #2551

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[unittest] Bug fix for c-api unittest
Parichay Kapoor [Mon, 27 Jul 2020 02:00:15 +0000 (11:00 +0900)]
[unittest] Bug fix for c-api unittest

Bug fix for c-api unittest when tensorflow-lite is not present
Bug of destroy info without create in invoke_01

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoTest/Fix potential macro bug
MyungJoo Ham [Fri, 24 Jul 2020 09:58:09 +0000 (18:58 +0900)]
Test/Fix potential macro bug

What if you do:
```
if (WHATSOEVER)
  _print_log (MESSAGE);
else
  do_something ();
```

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test] Remove trailing whitespace
Tony Jinwoo Ahn [Sun, 26 Jul 2020 14:23:09 +0000 (23:23 +0900)]
[Test] Remove trailing whitespace

Signed-off-by: Tony Jinwoo Ahn <tony.jinwoo.ahn@gmail.com>
4 years ago[Protobuf] Fix protobuf util function header file
gichan-jang [Fri, 24 Jul 2020 02:23:34 +0000 (11:23 +0900)]
[Protobuf] Fix protobuf util function header file

Fix protobuf util function header file.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Build] Support VD product build system accepted/tizen/unified/20200728.045308 submit/tizen/20200724.082310
Sangjung Woo [Mon, 20 Jul 2020 07:48:51 +0000 (16:48 +0900)]
[Build] Support VD product build system

This patch supports the VD product build system.
`enable_tizen_privilege_check` and `enable_tizen_feature_check` are
newly added and below features are disabled.
* Privacy / Privilege Manager
* Resource Manager
* ProtoBuffer / FlatBuffer
* Test since python-numpy is not supported

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[tizensensor] Let the element make use of GstBaseSrc
Yongjoo Ahn [Mon, 13 Jul 2020 09:10:51 +0000 (18:10 +0900)]
[tizensensor] Let the element make use of GstBaseSrc

- Remove timestamp in `_create()` and `_fill()` and let BaseSrc do timestamp
- Remove `_get_times()`
- Init debug category
- Add query for latency
- set_interval for tizen sensor_listener

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[tensor_sink] Add debug log for timestamp in tensor_sink
Yongjoo Ahn [Mon, 13 Jul 2020 09:07:19 +0000 (18:07 +0900)]
[tensor_sink] Add debug log for timestamp in tensor_sink

- Add macro for logging timestamp in render_buffer

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Debian] Fix protobuf lib install path
gichan-jang [Thu, 23 Jul 2020 10:45:18 +0000 (19:45 +0900)]
[Debian] Fix protobuf lib install path

Fix protobuf util lib install path

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[single] Enable setting timeout to 0
Parichay Kapoor [Fri, 24 Jul 2020 01:45:45 +0000 (10:45 +0900)]
[single] Enable setting timeout to 0

Enable setting timeout to 0
timeout 0 now has significance and re-setting timeout to 0 should be allowed

Related issue: #2568

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoREADME: update example style and add more examples
MyungJoo Ham [Tue, 21 Jul 2020 09:17:37 +0000 (18:17 +0900)]
README: update example style and add more examples

- Restyle example lists of README.md
- Add "edge-ai" and "products" category

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Test] Ignore src iio unusual cases test
gichan-jang [Mon, 20 Jul 2020 06:17:57 +0000 (15:17 +0900)]
[Test] Ignore src iio unusual cases test

Unusual cases test fails occasionally when getting state of the pipeline.
I removed the previous patch and modified it to ignore this test in Ubuntu.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[caffe2] Warning fix based for updated caffe2 v1.6.0-rc1
Parichay Kapoor [Thu, 16 Jul 2020 09:59:05 +0000 (18:59 +0900)]
[caffe2] Warning fix based for updated caffe2 v1.6.0-rc1

Update caffe2 extension to remove warning based on api update
for version 1.6.0-rc1

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[pytorch] Update pytorch extension for pytorch v1.6.0-rc1
Parichay Kapoor [Thu, 16 Jul 2020 09:54:03 +0000 (18:54 +0900)]
[pytorch] Update pytorch extension for pytorch v1.6.0-rc1

Update pytorch extension for pytorch v1.6.0-rc1
Also pytorch and caffe2 headers do not follow redundant declarations
So, remove redundant declaration warning flag when compiling with them

V2:
Check version of pytorch from pkg-config
Update extension based on version number due to api update

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years agoTest/CAPI: Type mismatch warning
MyungJoo Ham [Wed, 22 Jul 2020 07:37:15 +0000 (16:37 +0900)]
Test/CAPI: Type mismatch warning

ret_sync_mode is unsigned.
If it is compiled with more strict compilers,
it emits errors. Fix it by adding U.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoDebian: add flatbuf/protobuf packaging accepted/tizen/unified/20200723.161155 submit/tizen/20200722.112755
MyungJoo Ham [Wed, 22 Jul 2020 10:13:53 +0000 (19:13 +0900)]
Debian: add flatbuf/protobuf packaging

nnstreamer-flatbuf and
nnstreamer-protobuf will be available for Ubuntu/Debian.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Dist/Debian] Add a sub-package that provides the openvino filter
Wook Song [Fri, 10 Jul 2020 07:11:44 +0000 (16:11 +0900)]
[Dist/Debian] Add a sub-package that provides the openvino filter

This patch adds a sub-package that provides the tensor filter for
OpenVino to Debian/Ubuntu.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Api/Single] default no timeout when invoking model
Jaeyun [Fri, 17 Jul 2020 10:54:28 +0000 (19:54 +0900)]
[Api/Single] default no timeout when invoking model

If user does not set the timeout, single-invoke function will wait for the output till the invoke is done.
This requires another ACR.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoFix comments in SingleShot.java
박형민 (Park Hyeoung Min) [Thu, 9 Jul 2020 07:37:29 +0000 (16:37 +0900)]
Fix comments in SingleShot.java

Fix comments grammatically correct by adding subject, "this".

Signed-off-by: Park Hyeoung-Min <phm0127@gmail.com>
4 years ago[Tests/C-API] Add test case for abnormal accessing of callback function
Sangjung Woo [Fri, 17 Jul 2020 09:51:05 +0000 (18:51 +0900)]
[Tests/C-API] Add test case for abnormal accessing of callback function

This patch newly adds a test case for abnormal accessing of callback
function when calling both `ml_pipeline_element_get_handle()` and
`ml_pipeline_sink_register()` functions.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[C-API] Bugfix for abnormal accessing of the callback function
Sangjung Woo [Fri, 17 Jul 2020 09:47:04 +0000 (18:47 +0900)]
[C-API] Bugfix for abnormal accessing of the callback function

If the handle of sink element is fetched by calling both
`ml_pipeline_element_get_handle()` and `ml_pipeline_sink_register()`
functions, segmantation fault occurs because of abnormal accessing for
callback function. This patch fixes that bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[SPEC] Cleanup spec file
Sangjung Woo [Mon, 20 Jul 2020 04:15:00 +0000 (13:15 +0900)]
[SPEC] Cleanup spec file

* Fix the wrong definition of flat buffer
* Add `nnfw_support` flag to control NNFW even though ARM architecture

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Filter/NNFW] change nnfw api
Jaeyun [Fri, 17 Jul 2020 09:17:45 +0000 (18:17 +0900)]
[Filter/NNFW] change nnfw api

1. Change nnfw api to set input info.
The function apply_tensorinfo will be deprecated soon.
2. Remove unnecessary definition about max rank of nnfw.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Api/Single] init status code before invoking
Jaeyun [Fri, 17 Jul 2020 09:50:40 +0000 (18:50 +0900)]
[Api/Single] init status code before invoking

In invoke thread, init status (error-none) before calling the invoke callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[SAM/CodeClean] remove global val
Jaeyun [Wed, 15 Jul 2020 07:31:15 +0000 (16:31 +0900)]
[SAM/CodeClean] remove global val

sam report, remove global val in openvino plugin.
update script to install common header file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>