platform/upstream/nnstreamer.git
4 years ago[Tests] Add 'nosync' option into mux
Sangjung Woo [Wed, 10 Jun 2020 01:16:46 +0000 (10:16 +0900)]
[Tests] Add 'nosync' option into mux

To fix `framerate` issue in mux, it set sync-mode to slowest as default.
However, This LSTM test case is hanging as a side-effect since it uses
both tensor_repo and tensor_mux. This patch adds 'nosync' option into
mux so that the test pipeline starts and finishes without hanging.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Mux] Set sync-mode to slowest as default
Sangjung Woo [Tue, 9 Jun 2020 05:10:26 +0000 (14:10 +0900)]
[Mux] Set sync-mode to slowest as default

After passing mux / demux, the framerate is extremely bigger than
before. (Issue #2440) This is mainly because sync_mode of tensor_mux
filter is SYNC_NOSYNC. To fix this bug, this patch set sync_mode to
SYNC_SLOWEST as default.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years agoFilter/Custom/Easy: fix doxygen entry
MyungJoo Ham [Tue, 9 Jun 2020 10:29:48 +0000 (19:29 +0900)]
Filter/Custom/Easy: fix doxygen entry

Fix easy-custom-filter API's doxygen entry.
It gets output dimenesion info as an input, not output.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android] implement on-load in native
Jaeyun [Tue, 9 Jun 2020 06:22:21 +0000 (15:22 +0900)]
[Android] implement on-load in native

register native functions when loading native library.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android] return to static build
Jaeyun [Tue, 9 Jun 2020 04:24:12 +0000 (13:24 +0900)]
[Android] return to static build

To execute model faster, return to static build.
Make all sub-plugins static libs and build one native so file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Fix][Filter/Prop] Fix performance property (latency) for tensorfilter
Yongjoo Ahn [Fri, 5 Jun 2020 07:15:54 +0000 (16:15 +0900)]
[Fix][Filter/Prop] Fix performance property (latency) for tensorfilter

- Initialize with zero value.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Decoder/Neon] Support neon accl for SNPE deeplab/depth seg decoder
Dongju Chae [Thu, 4 Jun 2020 11:25:54 +0000 (20:25 +0900)]
[Decoder/Neon] Support neon accl for SNPE deeplab/depth seg decoder

This patch supports neon accl for SNPE deeplab/depth seg decoder

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Decoder/Fix] Revise tensordec-imagesegment impl. and fix minor bugs
Dongju Chae [Thu, 4 Jun 2020 10:53:01 +0000 (19:53 +0900)]
[Decoder/Fix] Revise tensordec-imagesegment impl. and fix minor bugs

This patch revises tensordec-imagesegment impl. and fix minor bugs

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Android] private data to set metadata
Jaeyun [Wed, 3 Jun 2020 05:19:06 +0000 (14:19 +0900)]
[Android] private data to set metadata

Each invoke callback gets/returns tensor data object including metadata.
To improve performance, Cache tensor metadata object and avoid duplicated conversion.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoStart development of 1.5.3 as 1.6.0-RC4 accepted/tizen/unified/20200608.144742 submit/tizen/20200608.023449
MyungJoo Ham [Thu, 4 Jun 2020 02:50:24 +0000 (11:50 +0900)]
Start development of 1.5.3 as 1.6.0-RC4

As soon as all major known bugs and SVACE/Coverity issues are fixed,
I'm going to release 1.6.0.

Cheers!

```
1.5.2 -> 1.5.3
- Mediapipe's graphs (NNStreamer pipeline equivalent) may be embedded as an element in NNStreamer pipeline
- Qualcomm SNPE is supported (tensor-filter subplugin)
- Verisilicon Vivante is supported (tensor-filter subplugin)
- NNStreamer --> Protobuf decoder added.
- New tensor-filter subplugin API "v1" released. (with v0 backward compatibility)
- Tensor-filter now accepts C++ classes as a subplugin. Edge-TPU subplugin is re-written as an example.

- Meson script re-worked.
- Semantics of hardware-acceleration options for tensor-filter re-worked.
- API/Android: nnfw-runtime (neurun) and SNPE support
- API/Android: usability update.
- API/Android: less invokation latency. (more optimization coming in next versions)
- API/C: bugfixes, architectural upgrade, latency reduction.
- tensor-filter has latency and throughput performance monitors.
- tensor-sink is by default "sync=false". If appsink or tensor_sink in NNStreamer Pipeline API's pipeline has sync=true, emit warning messages.
- Architectural updates: lower CC, less duplication, removed dependency cycles, less complicated #if statements and blocks.
- Test suite updates: timeout handling, arm-arch error fixes, more test cases (supplying more negative cases), floating-point handling. and a lot more fixes and performance (latency) optimizations.
- Build script updates: cleaned up dependencies and applied "feature" meson feature.
- No more essential class in assert() for optimized binaries.
- Much less assertions. Apply error-handling instead.
- Daily build & test activated and published.
- Rules & policy updated to comply with LF/AI.
- Memory leaks removed: from demux, split, and a few more components.

- Known bug: edge-TPU subplugin is not working in Tizen devices recently.
```

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Android] typo in mk file
Jaeyun [Fri, 5 Jun 2020 13:41:37 +0000 (22:41 +0900)]
[Android] typo in mk file

fix typo in mk file (jni nnstreamer defines)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agoTizen/spec: disable mvncsdk/edgeTPU for DA build
MyungJoo Ham [Fri, 5 Jun 2020 05:57:22 +0000 (14:57 +0900)]
Tizen/spec: disable mvncsdk/edgeTPU for DA build

DA requested to remove mvncsdk/edgeTPU from the dependency.
Disable them for their builds.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[NNFW] set backend after loading model
Jaeyun [Thu, 4 Jun 2020 11:16:20 +0000 (20:16 +0900)]
[NNFW] set backend after loading model

recently updated, nnfw set-backend should be called after loading the model.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years agodoc: how to enable vivante tensor filter
Geunsik Lim [Tue, 2 Jun 2020 11:10:18 +0000 (20:10 +0900)]
doc: how to enable vivante tensor filter

This commit is to append how to enable the Vivante tensor filter
based on Vivante NPU Toolkit library on Ubuntu/ARM and Tizen/ARM devices.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years agoMovidius Filter: Fixed typos
Geunsik Lim [Thu, 4 Jun 2020 11:28:56 +0000 (20:28 +0900)]
Movidius Filter: Fixed typos

This commit is trivial. Let's fix typos in the Movidius filter file.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Filter/TFLite] remove ineffective codes
Hyoung Joo Ahn [Thu, 4 Jun 2020 08:38:30 +0000 (17:38 +0900)]
[Filter/TFLite] remove ineffective codes

setting allocation type is not effective anymore.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Decoder] Extend tensordec-imagesegment to support snpe-deeplab/depth
Dongju Chae [Mon, 1 Jun 2020 12:31:08 +0000 (12:31 +0000)]
[Decoder] Extend tensordec-imagesegment to support snpe-deeplab/depth

This patch extends tensordec-imagesegment to support snpe-deeplab/depth.
Also, it include minor code refactoring.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Filter/Prop] Add performance properties (lat/fps) for tensor filter
Dongju Chae [Wed, 3 Jun 2020 04:01:35 +0000 (13:01 +0900)]
[Filter/Prop] Add performance properties (lat/fps) for tensor filter

This patch adds performance properties (latency/throughput) for tensor filter.

Those properties will be used for the overlay information, to show the performance
of tensor filter (e.g., SNPE).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years agoSPEC: fixed indentation
Geunsik Lim [Thu, 4 Jun 2020 02:25:57 +0000 (11:25 +0900)]
SPEC: fixed indentation

This commit is trivial. It is to keep an indentation consistently.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Android/Custom] drop input buffer
Jaeyun [Wed, 3 Jun 2020 02:40:36 +0000 (11:40 +0900)]
[Android/Custom] drop input buffer

In custom-filter interface, returning null in invoke-callback will drop the input buffer.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] function to get pipeline element
Jaeyun [Wed, 3 Jun 2020 05:08:39 +0000 (14:08 +0900)]
[C-Api] function to get pipeline element

Add new function to get the gst-element from pipeline handle.
For native developers, it is necessary to get pipeline element to use gstreamer functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Log] add definition log-fatal
Jaeyun [Thu, 4 Jun 2020 02:38:10 +0000 (11:38 +0900)]
[Log] add definition log-fatal

define new nns_logf (common fatal-log definition with nns_log prefix)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Decoder/protobuf] Add protobuf tensor_decoder sub-plugin submit/tizen/20200604.023022
Yongjoo Ahn [Tue, 24 Mar 2020 08:48:03 +0000 (17:48 +0900)]
[Decoder/protobuf] Add protobuf tensor_decoder sub-plugin

- Add tensor_decoder sub-plugin "protobuf" to support Protocol Buffers

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Filter] bugfix: dangling pointer access.
MyungJoo Ham [Wed, 3 Jun 2020 05:25:59 +0000 (14:25 +0900)]
[Filter] bugfix: dangling pointer access.

gfree should be called when you completed accesing it.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoREADME update: add committer, update hw-accl, ci status
MyungJoo Ham [Wed, 3 Jun 2020 06:26:13 +0000 (15:26 +0900)]
README update: add committer, update hw-accl, ci status

- Add the new committer
- Add the list of hardware accelerators
- Add daily-release status

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years agoDoc update: component-description
MyungJoo Ham [Wed, 3 Jun 2020 06:21:43 +0000 (15:21 +0900)]
Doc update: component-description

There are a few components completed. Update component list

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Filter] fix a tiny mem leak
Hyoung Joo Ahn [Wed, 3 Jun 2020 10:36:58 +0000 (19:36 +0900)]
[Filter] fix a tiny mem leak

move a few `g_free()` to fix mem leak

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Build/Fix] Add a missing header to 'nnstreamer_cppplugin_api_filter.hh'
Dongju Chae [Wed, 3 Jun 2020 09:30:08 +0000 (18:30 +0900)]
[Build/Fix] Add a missing header to 'nnstreamer_cppplugin_api_filter.hh'

This patch adds a missing header, string.h, to
'nnstreamer_cppplugin_api_filter.hh', which uses memcpy().

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Conf] parse sub-plugins name
Jaeyun [Tue, 2 Jun 2020 07:20:26 +0000 (16:20 +0900)]
[Conf] parse sub-plugins name

Basename is unnecessary, set sub-plugins name while loading configuration.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Build/Tests] Fix 'tests/meson.build' to always find 'copy'
Dongju Chae [Tue, 2 Jun 2020 01:26:21 +0000 (10:26 +0900)]
[Build/Tests] Fix 'tests/meson.build' to always find 'copy'

This patch fixes minor build errors when `libpng_dep` does not exist.
`tests/nnstreamer_filter_extensions_common/meson.build` is using this
variable regardless of `libpng_dep`'s existence.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[single] Add missing gstTensorFilterFramework v1 support
Parichay Kapoor [Mon, 18 May 2020 18:13:51 +0000 (23:43 +0530)]
[single] Add missing gstTensorFilterFramework v1 support

Add missing support for gstTensorFilterFramework in checking framework availability
for a given backend accelerator/hardware

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Android] cache method id
Jaeyun [Wed, 20 May 2020 11:49:51 +0000 (20:49 +0900)]
[Android] cache method id

1. get required method ids to improve performance when initializing the pipe info.
2. add internal method to handle arraylist.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Filter] release mem block when execution failed
Jaeyun [Fri, 29 May 2020 03:50:18 +0000 (12:50 +0900)]
[Filter] release mem block when execution failed

release in/out mem blocks when failed to invoke nn framework.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/SNPE] Decouple SNPE env setting from native-api
Yongjoo Ahn [Mon, 1 Jun 2020 07:38:17 +0000 (16:38 +0900)]
[Android/SNPE] Decouple SNPE env setting from native-api

- Move function for android SNPE env setting from nnstreamer-native-api.c to tensor_filter_snpe.cc

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[SNPE] Add custom properties
Yongjoo Ahn [Wed, 27 May 2020 06:19:28 +0000 (15:19 +0900)]
[SNPE] Add custom properties

- Add Debug message
- Add custom prop for snpe runtime and cpu_fallback options
ex) "custom=Runtime:GPU,CPUFallback:true"

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Android] prepare dsp/npu runtime for snpe filter
Yongjoo Ahn [Fri, 15 May 2020 01:15:48 +0000 (10:15 +0900)]
[Android] prepare dsp/npu runtime for snpe filter

- Add required snpe-sdk libs
- Set `jniLibs.srcDirs` to this project explictly contains snpe-sdk libs for dsp/npu
- Make function `nns_set_env` to set env "ADSP_LIBRARY_PATH" (https://developer.qualcomm.com/docs/snpe/dsp_runtime.html)
- Log SNPE version
- Prevent build SNAP and SNPE together in android build script and
  Android.mk

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Aggregator] Remove duplicated function to set caps
gichan-jang [Fri, 29 May 2020 07:50:25 +0000 (16:50 +0900)]
[Aggregator] Remove duplicated function to set caps
Remove duplicated works to set source pad cap when sink event is received

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Unittest] Fix a potential bug of unit testcase
Sangjung Woo [Fri, 22 May 2020 05:26:47 +0000 (14:26 +0900)]
[Unittest] Fix a potential bug of unit testcase

This patch fixes the potential bug (i.e. pipeline parsing error) of unit
testcase when using Protobuf v3.8.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[subplugins] Update subplugins accl support
Parichay Kapoor [Fri, 15 May 2020 10:28:47 +0000 (15:58 +0530)]
[subplugins] Update subplugins accl support

Update subplugin's accelerators support as per updated rules for auto/default

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Tensor Filter] Added a sub-plugin filter for VIM3/Vivante NPU
Geunsik Lim [Fri, 15 May 2020 05:00:50 +0000 (14:00 +0900)]
[Tensor Filter] Added a sub-plugin filter for VIM3/Vivante NPU

This commit is to append the Vivante sub-plugin based on the tensor filter
of NNStreamer to support the Vivante NPU driver.

**Changelog**

* Version 10:
   * Added license clause
   * Improved statements of the nnsreamer.spec file

* Version 1-9:
   * Fixed memory leak (e.g., g_free)
   * FIxed security (e.g., nnstreamer.nanifest) for Tizen packaging
   * doc: Added how to build and run the Vivante filter on Ubuntu 18.04 (ARM64)
   * Updated the invoke function to support various models
     (e.g., Inception, Yolo, Mobile SSD)
   * Added Tizen package script for Tizen platform
   * Fixed incorrect var type (e.g., unsigned int for num_tensors)
   * Added annotations for code maintenance
   * Added run.sh for Ubuntu18.04 aarch64 + VIM3 board
   * Added convert function for vivante tensor data type
   * Added vsi_nn_GetTensor of OpenVX apis to obtain tensor data (input, output)
   * Added info[i].name with dummy data (e.g., tensor id)
   * Removed deprecated variables and functions
   * Updated the vivante filter with "multi-files" structure for re-usability
     - "model=/opt/vivante/model/inception_v3.nb,
       /opt/vivante/model/libinception_v3.so
   * Updated the existing vivante tensor filter based on dlopen() scheme
   * Added a functions to check the dlopen operation to avoid undefined symbol issue
   * Updated annotaiton (e.g., image size is 299:299)
   * Added Vivante functions (common APIs) in the vivante_open function
   * Added Vivante functions (common APIs) in the vivante_invoke function
   * Added Vivante functions (common APIs) in the vivante_close function
   * Update annotation to avoid misunderstanding
   * Fixed typos (GstTensorsInfo)
   * Add todo list (e.g., glib's time functions)
   * Added vsi_nn_pub.h header file to use libraries of acuity-ovxlib-dev tool
   * Added a skeleton of the Vivate tensor filter
   * Imported the major implementation of the Vivante (inceptionv3 model)
     for Nnstreamer pipeline. libvivante_v3.so will be used by "model=***"
     interface to support a generic approach for re-usability.
   * Added vivante_inception_v3.h header file for .so file of a NN model
   * Added a data structure (e.g., vivante_data) to manage Vivante data

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Android] fix warning
Jaeyun [Thu, 21 May 2020 05:32:20 +0000 (14:32 +0900)]
[Android] fix warning

fix build warning, remove unnecessary code.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Merge] reduce complexity
Jaeyun [Mon, 25 May 2020 06:02:44 +0000 (15:02 +0900)]
[Merge] reduce complexity

code clean in tensor-merge element, reduce code complexity.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Test] sample for media format
Jaeyun [Wed, 27 May 2020 10:08:37 +0000 (19:08 +0900)]
[Android/Test] sample for media format

test/sample to input media data format into appsrc.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android/Doc] link proper method
Jaeyun [Mon, 25 May 2020 10:53:44 +0000 (19:53 +0900)]
[Android/Doc] link proper method

link proper method, for the interfaces defined in Pipeline/CustomFilter.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Spec] Fix the wrong meson option for armnn
Sangjung Woo [Fri, 22 May 2020 08:23:10 +0000 (17:23 +0900)]
[Spec] Fix the wrong meson option for armnn

Because of the typo for meson option, below warning occurs when
building.
* WARNING: Unknown options: "armnn_support"

This patch fixes this warning.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Test] use test-env
Jaeyun [Thu, 21 May 2020 05:34:51 +0000 (14:34 +0900)]
[Test] use test-env

update unittest arg, use test-env in cpp-method test.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[CONF] Fix nnstreamer conf load function
gichan-jang [Thu, 21 May 2020 02:23:32 +0000 (11:23 +0900)]
[CONF] Fix nnstreamer conf load function

Since key_file is declared using g_autoptr macro, it does not need to cleaning up variables.
It is related issue #2393.

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Android] enable custom filter in singleshot
Jaeyun [Tue, 19 May 2020 09:27:57 +0000 (18:27 +0900)]
[Android] enable custom filter in singleshot

register filter subplugins (custom-filter support) when building single-shot library

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[filter] Handle auto/default semantics for tensor_filter v1
Parichay Kapoor [Tue, 12 May 2020 21:18:20 +0000 (02:48 +0530)]
[filter] Handle auto/default semantics for tensor_filter v1

Patch to handle auto/default semantics for tensor_filter v1
getFrameworkInfo adds two more parameters - accl_default and accl_auto with the same characteristics as v0
Passed user input is parsed and if auto/default is used, corresponding accelerators are set and used.

This resolves #2320 for tensor_filter v1

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[filter] Handle auto/default semantics for tensor_filter v0
Parichay Kapoor [Tue, 12 May 2020 20:09:19 +0000 (01:39 +0530)]
[filter] Handle auto/default semantics for tensor_filter v0

Patch to handle auto/default semantics for tensor_filter
Each tensor_filter should now pass its default/auto accelerator
If not passed, the value defaults to first entry from supported list of accelerators
Passed user input is parsed and if auto/default is used, corresponding accelerators
are set and used.

This resolves #2320 for v0

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Android] fix lint warning
Jaeyun [Tue, 19 May 2020 09:00:00 +0000 (18:00 +0900)]
[Android] fix lint warning

fix lint report : set default locale

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Meson] Provide an environment object to test()
Wook Song [Wed, 22 Apr 2020 05:38:40 +0000 (14:38 +0900)]
[Meson] Provide an environment object to test()

In order to make test() in the meson.build script work, this patch
defines an environment object for the unit test cases and provides it to
those test() functions as an argument.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Android] Update document for Android Library
Sangjung Woo [Wed, 13 May 2020 05:26:44 +0000 (14:26 +0900)]
[Android] Update document for Android Library

This patch newly updates the guide for Android Library.
* Add installration guide for required package
* Add proxy setting guide simply without specific IP and port info
* Fix the typoes

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[Android] Updated document for nnstreamer multi-model app
Geunsik Lim [Thu, 7 May 2020 10:52:59 +0000 (19:52 +0900)]
[Android] Updated document for nnstreamer multi-model app

Fixed issue nnstreamer/nnstreamer#2349.

This commit is to update the existing document in order to re-upload
the nnstreamer multi-model application because the application management
of Google Store is changed.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Filter/Mediapipe] fix a bug at destructor
Hyoung Joo Ahn [Mon, 18 May 2020 03:03:23 +0000 (12:03 +0900)]
[Filter/Mediapipe] fix a bug at destructor

call free the resource after using it.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[SPEC] Fix typo in spec file
gichan-jang [Mon, 18 May 2020 04:26:17 +0000 (13:26 +0900)]
[SPEC] Fix typo in spec file

Fix typo in spec file

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[hw/accl] Add CPU_SIMD as a backend option
Parichay Kapoor [Thu, 14 May 2020 06:31:11 +0000 (12:01 +0530)]
[hw/accl] Add CPU_SIMD as a backend option

Added CPU_SIMD as a backend option
CPU_NEON will be alias for CPU_SIMD in enum but different string representation

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Android] build shared libs
Jaeyun [Thu, 14 May 2020 08:48:25 +0000 (17:48 +0900)]
[Android] build shared libs

1. build shared libs (nnstreamer and subplugins)
2. clean up build script

TODO : we need to update mk files in android-res repo and sub-plugins

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Android] Add omitted header when archiving
Sangjung Woo [Fri, 15 May 2020 10:37:48 +0000 (19:37 +0900)]
[Android] Add omitted header when archiving

'ml-api-common.h' is recently added and it is included in nnstreamer.h.
However, it is not archived in nnstreamer-native.zip. Because of this
reason, buildbreak occurs when building Android jni application. This
patch fixes that bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[meson]Correct deprecated arg in features
Jihoon Lee [Fri, 15 May 2020 00:54:46 +0000 (09:54 +0900)]
[meson]Correct deprecated arg in features

**Changes proposed in this PR:**
- Change `additional_deps` -> `extra_deps` for tflite-nnapi-delegation

**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>
4 years agoindent: Update the gst-indent file
Geunsik Lim [Thu, 14 May 2020 01:34:49 +0000 (10:34 +0900)]
indent: Update the gst-indent file

This commit is to update the below contents in the 'gst-indent' file.

**Changelog**
 * Fixed typo
 * Declared a default shell script (e.g., bash) with Linux shebang line

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
4 years ago[Android/build] Move tensor-filter common to nnstreamer_common_srcs
Yongjoo Ahn [Wed, 13 May 2020 05:54:53 +0000 (14:54 +0900)]
[Android/build] Move tensor-filter common to nnstreamer_common_srcs

- To enable SINGLE-only build for cpp class filter (snpe)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Android/SNPE] Support SNPE in Android
Yongjoo Ahn [Fri, 8 May 2020 04:11:53 +0000 (13:11 +0900)]
[Android/SNPE] Support SNPE in Android

- Support SNPE for Android api
- Add simple tests (singleshot, pipeline) using pre-loaded SNPE model

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[single] Add implementation to support for hw accelerator
Parichay Kapoor [Wed, 13 May 2020 03:33:31 +0000 (09:03 +0530)]
[single] Add implementation to support for hw accelerator

single API supported hw accelerator for the NNFW
this hw was used to check if it is supported by the framework
however this hw was never passed to the framework to use
this patch sovles this issue

resolves #2374

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[single] Added documentation for the thread behavior
Parichay Kapoor [Mon, 11 May 2020 19:40:08 +0000 (01:10 +0530)]
[single] Added documentation for the thread behavior

Added documentation for the thread behavior in various functions in single API
Also removed ERROR state as it was rendundant after #2360

Resolves #2185

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[tflite] bug fix for tflite unittest
Parichay Kapoor [Tue, 12 May 2020 21:05:02 +0000 (02:35 +0530)]
[tflite] bug fix for tflite unittest

unittest of tflite compared output with grep "exp"
however some expressions could be prefix of different exp
this could lead to false positives
added line end marker

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Demux/Split] unref incoming buffer
Jaeyun [Mon, 11 May 2020 08:34:15 +0000 (17:34 +0900)]
[Demux/Split] unref incoming buffer

After demux/split the incoming buffer, unref the buffer to decrease ref count.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[single] single API to process nnfw transparently once opened
Parichay Kapoor [Thu, 7 May 2020 17:58:16 +0000 (23:28 +0530)]
[single] single API to process nnfw transparently once opened

single API should process all the frameworks transparently once the single handle has been opened.
The framework check has been performed when the handle was created and opened.
If the operation is not supported, that should be handled in the nnfw rather than in single API.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Android] Stop when first error occurs
Sangjung Woo [Mon, 11 May 2020 09:53:57 +0000 (18:53 +0900)]
[Android] Stop when first error occurs

When running build-android-lib.sh, it does not stop even though error
occur (e.g. command not found). It makes users hard to find the reason
of the problem. This patch stops first error occurs so users can fix it
easily.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[filter/SNPE] Add tensor_filter sub-plugin for SNPE
Yongjoo Ahn [Thu, 9 Apr 2020 07:58:19 +0000 (16:58 +0900)]
[filter/SNPE] Add tensor_filter sub-plugin for SNPE

- Currently, this only supports CPU runtime
- Use meson feature "feature" : check environment variable `SNPE_ROOT`
  to enable the build or not

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
4 years ago[Meson/Option] remove unnecessary option
Jaeyun [Mon, 11 May 2020 07:53:29 +0000 (16:53 +0900)]
[Meson/Option] remove unnecessary option

remove unnecessary option for disabling audio elements.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api/CodeClean] validate model file
Jaeyun [Fri, 8 May 2020 11:19:13 +0000 (20:19 +0900)]
[C-Api/CodeClean] validate model file

add function for nnfw auto detection and clean up functions to validate model file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test] add simple testcases
Jaeyun [Thu, 7 May 2020 07:47:38 +0000 (16:47 +0900)]
[Test] add simple testcases

add simple testcases for native c-api and internal functions.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[single] cache tensor filter class once at open
Parichay Kapoor [Thu, 7 May 2020 17:32:24 +0000 (23:02 +0530)]
[single] cache tensor filter class once at open

Existing implementation seeks the tensor filter class based on its type everytime a class is needed.
Rather, cache the tensor filter class increasing its ref at open, and unref at single api close.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[Subplugin] Fix the typo
Sangjung Woo [Mon, 11 May 2020 02:11:54 +0000 (11:11 +0900)]
[Subplugin] Fix the typo

This patch fixes the typo in header file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years agoChange packaging in regards to feature migration
Jihoon Lee [Fri, 24 Apr 2020 08:37:01 +0000 (17:37 +0900)]
Change packaging in regards to feature migration

 Change debian and rpm build in regards to feature update option. This
commit just inherits past options leaving possibilities open to
exploit "auto" options.

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
4 years ago[Meson] Migrate to feature
Jihoon Lee [Mon, 20 Apr 2020 06:34:05 +0000 (15:34 +0900)]
[Meson] Migrate to feature

 1. Feature / feature handler added
 2. Add video support as feature (and wipe out disable-video-support)
 3. Add extra args support
 4. Implement enable-tesnorflow, enable-tensorflow-lite ... as feature
 5. Implement enable-orc, ... as feature *

 - enable-orc -> orcc-support
 - enable-tensorflow-lite -> tflite-support
 - enable-tensorflow -> tf-support
 - enable-caffe2 -> caffe2-support
 - enable-pytorch -> pytorch-support
 - enable-movidius-ncsdk2 -> mvncsdk2-support
 - enable-python -> python2-support / python3-support
 - enable-tflite-nnapi-delegation -> tflite-nnapi-delegation
 - enable-nnfw-runtime -> nnfw-runtime-support
 - enable-armnn -> armnn-suport

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
4 years agoAdd feature object handler
Jihoon Lee [Mon, 20 Apr 2020 06:34:05 +0000 (15:34 +0900)]
Add feature object handler

 1. Feature / feature handler added
 2. Add video support as feature (and wipe out disable-video-support) *
 3. Add extra args support
 4. Implement enable-tesnorflow, enable-tensorflow-lite ... as feature
 5. Implement enable-orc, ... as feature
 6. Change docs

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
4 years ago[Android/AMC] Set the omitted finalize function
Sangjung Woo [Mon, 4 May 2020 07:04:40 +0000 (16:04 +0900)]
[Android/AMC] Set the omitted finalize function

'gst_amc_src_finalize()' exists in the code but the finalize of GObject
class is not set. Because of this reason, gst_amc_src_finalize() function
is not called at all. This patch fixes this bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[CAPI] Separate error codes: ml-api-common.h
MyungJoo Ham [Thu, 7 May 2020 07:28:13 +0000 (16:28 +0900)]
[CAPI] Separate error codes: ml-api-common.h

nntrainer wants to share the error codes for its API set.
Separate "common" header and release it via a sub-pacakge.

CC: @jijoongmoon: You can use this for
https://github.com/nnstreamer/nntrainer/issues/75

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Tests/Regression] GTEST error is ignored
MyungJoo Ham [Thu, 7 May 2020 10:24:43 +0000 (19:24 +0900)]
[Tests/Regression] GTEST error is ignored

PR #2338 has incurred a regression in the test suite that
make gbs pass even if there is a failed unit test case in gtest.

This fixes the regression of #2338

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Unittest/IIO] fix mem leak of unittest_src_iio
HyoungJoo Ahn [Thu, 7 May 2020 04:37:50 +0000 (13:37 +0900)]
[Unittest/IIO] fix mem leak of unittest_src_iio

fix mem leaks of few test cases

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Mediapipe] upload the new subplugin
Hyoung Joo Ahn [Wed, 6 May 2020 11:49:42 +0000 (20:49 +0900)]
[Mediapipe] upload the new subplugin

this subplugin helps running mediapipe graph through nnstreamer

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[Mediapipe] fix shell script
Hyoung Joo Ahn [Wed, 6 May 2020 11:45:04 +0000 (20:45 +0900)]
[Mediapipe] fix shell script

make the nnstreamer lib path rather than error

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
4 years ago[C-Api] unknown tensor type
Jaeyun [Thu, 7 May 2020 09:41:37 +0000 (18:41 +0900)]
[C-Api] unknown tensor type

do not allow setting unknown tensor type.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Dist/Tizen] Remove an invalid command line
Wook Song [Thu, 7 May 2020 08:18:42 +0000 (17:18 +0900)]
[Dist/Tizen] Remove an invalid command line

This patch removes an invalid command line that creates a symlink, *.so.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Tizen] Provide GST_PLUGIN_PATH to unittest_tizen_sensor
Wook Song [Thu, 7 May 2020 07:57:14 +0000 (16:57 +0900)]
[Dist/Tizen] Provide GST_PLUGIN_PATH to unittest_tizen_sensor

'unittest_tizen_sensor' requires a nnstreamer extension plugin,
'tensor_src_tizensensor', in addition to the other nnstreamer plugins.
In order to resolve this dependency at build time, this patch modifies
the rpm spec for Tizen to provide extra GST_PLUGIN_PATH to
'unittest_tizen_sensor'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tests/Script] Do not override GST_PLUGIN_PATH in the test script
Wook Song [Thu, 7 May 2020 07:47:42 +0000 (16:47 +0900)]
[Tests/Script] Do not override GST_PLUGIN_PATH in the test script

This patch removes the code line overrides GST_PLUGIN_PATH from the test
script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Test] add testcases for internal function
Jaeyun [Wed, 6 May 2020 11:41:48 +0000 (20:41 +0900)]
[Test] add testcases for internal function

add testcases for internal function (validate model files)

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Unittest/IIO] add the negative case: base dir
HyoungJoo Ahn [Thu, 7 May 2020 03:42:07 +0000 (12:42 +0900)]
[Unittest/IIO] add the negative case: base dir

testcase for the logic with invalid base dir

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Unittest/IIO] add the negative case: frequency
HyoungJoo Ahn [Wed, 29 Apr 2020 05:39:27 +0000 (14:39 +0900)]
[Unittest/IIO] add the negative case: frequency

testcase for the logic with invalid frequency

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Conf] Add omitted comment and fix a typo
Sangjung Woo [Thu, 7 May 2020 01:48:14 +0000 (10:48 +0900)]
[Conf] Add omitted comment and fix a typo

* Add omitted parameter comment for nnsconf_get_subplugin_info()
* Fix a typo

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years ago[TEST] Fix svace defect : nnfw_runtime, tensordec-imagelabel
gichan-jang [Wed, 6 May 2020 09:54:06 +0000 (18:54 +0900)]
[TEST] Fix svace defect : nnfw_runtime, tensordec-imagelabel

Fix memory leak of nnfw runtime and tensor decoder image labeling unit test.
Related SVACE defects : 440263, 440264, 440265, 440266, 440261

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[README] Add daily build and test badge
gichan-jang [Wed, 29 Apr 2020 02:24:08 +0000 (11:24 +0900)]
[README] Add daily build and test badge

Add daily build and test badge (Tizen x64, Tizen X86, Ubuntu x64)

Signed-off-by: gichan-jang <gichan2.jang@samsung.com>
4 years ago[Tests/Python] Update test scripts for python extensions
Wook Song [Fri, 24 Apr 2020 08:35:51 +0000 (17:35 +0900)]
[Tests/Python] Update test scripts for python extensions

This patch modifies the scripts running the test cases for python
filters to use proper PYTHONPATH.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Transform] return value when failed to set option
Jaeyun [Wed, 29 Apr 2020 08:57:40 +0000 (17:57 +0900)]
[Transform] return value when failed to set option

1. return false if failed to set option.
2. add simple testcases for the option string.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[C-Api] new ref to get tensor name
Jaeyun Jung [Thu, 30 Apr 2020 05:59:11 +0000 (14:59 +0900)]
[C-Api] new ref to get tensor name

if tensors-info has name, return new ref when getting the tensor name.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
4 years ago[Unittest/IIO] add a testcase for unusual cases
HyoungJoo Ahn [Tue, 28 Apr 2020 11:52:21 +0000 (20:52 +0900)]
[Unittest/IIO] add a testcase for unusual cases

the added testcase cover various cases not covered previous set.

Signed-off-by: HyoungJoo Ahn <hello.ahn@samsung.com>
4 years ago[Filter/Test] test for filter-fw registration
Jaeyun [Wed, 29 Apr 2020 10:59:29 +0000 (19:59 +0900)]
[Filter/Test] test for filter-fw registration

add test for filter-fw v1 registration without model file.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
4 years ago[Test/tensordec-pose] Fix a test case with arithmetic transform
Yongjoo Ahn [Mon, 4 May 2020 04:25:40 +0000 (13:25 +0900)]
[Test/tensordec-pose] Fix a test case with arithmetic transform

- tensordec-pose treats incoming array as float, thus add `tensor_transform mode=arithmetic`
- expecting proper line converage results

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>