platform/upstream/nnstreamer.git
5 years ago[C-API] Add sample code for ml_pipeline_switch_get_pad_list()
Sangjung Woo [Wed, 7 Aug 2019 05:38:29 +0000 (14:38 +0900)]
[C-API] Add sample code for ml_pipeline_switch_get_pad_list()

This patch newly adds the sample code for ml_pipeline_switch_get_pad_list()
function since it looks hard to use. Moremover, it updates the remarks
section for finalizing its allocated memory space.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] Describe pre & post state of the pipeline
Sangjung Woo [Wed, 7 Aug 2019 04:40:00 +0000 (13:40 +0900)]
[C-API] Describe pre & post state of the pipeline

This patch newly add the pre & post state of the pipeline in C-API.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] Describe the pipeline state as image
Sangjung Woo [Wed, 7 Aug 2019 02:10:51 +0000 (11:10 +0900)]
[C-API] Describe the pipeline state as image

This patch describes the the pipeline state as image instead of ASCII
text art.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] apply the review guide of C-API
Sangjung Woo [Tue, 6 Aug 2019 11:28:51 +0000 (20:28 +0900)]
[C-API] apply the review guide of C-API

* Fix the typo (targetting -> targeting)
* Use detailed comments (pipe is NULL? -> Not negotiated?)
* Use detailed URL (github.com/nnsuite/nnstreamer -> https://github.com/nnsuite/nnstreamer)
* Add '*' into omitted comment line

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-API] Add PERMISSION_DENIED state for privilege issue
Sangjung Woo [Tue, 6 Aug 2019 11:06:26 +0000 (20:06 +0900)]
[C-API] Add PERMISSION_DENIED state for privilege issue

This patch newly adds the ML_ERROR_PERMISSION_DENIED error code for
privilege issue and its checking logic in ml_get_feature_enabled()
function.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tests] Apply bash script formatter to all runTest.sh files
Wook Song [Tue, 6 Aug 2019 14:40:38 +0000 (23:40 +0900)]
[Tests] Apply bash script formatter to all runTest.sh files

In order to improve readability, this patch applies a bash shell script
formatter named 'shfmt' [1] to all runTest.sh files in the ./tests
directory. Note that 4 spaces are used for indentation instead of using
'tab'.

[1] https://github.com/mvdan/sh

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Test] stream test for custom-filter without model
Jaeyun [Tue, 30 Jul 2019 04:02:22 +0000 (13:02 +0900)]
[Test] stream test for custom-filter without model

Add simple stream testcase for custom-filter without model file.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] function declaration
Jaeyun [Tue, 30 Jul 2019 03:56:57 +0000 (12:56 +0900)]
[Common] function declaration

fix link error about plugin api in cpp file.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] common headers in nnstreamer
Jaeyun [Tue, 6 Aug 2019 07:53:18 +0000 (16:53 +0900)]
[Api] common headers in nnstreamer

change nnstreamer headers include to prepare gradle build.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Tensorflow] remove the unused option for memory optimization
Hyoung Joo Ahn [Wed, 7 Aug 2019 02:07:32 +0000 (11:07 +0900)]
[Filter/Tensorflow] remove the unused option for memory optimization

after changing tensorflow to use `c-api`, the `mem_optmz` is not used anymore

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Typo] fix typo at README.md
Hyoung Joo Ahn [Wed, 7 Aug 2019 02:17:18 +0000 (11:17 +0900)]
[Typo] fix typo at README.md

fix a typo of README file: technolog -> technology

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Build] fix build warning
Jaeyun [Mon, 5 Aug 2019 04:00:34 +0000 (13:00 +0900)]
[Build] fix build warning

Add function declaration and fix enum conversion.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] update api description
Jaeyun [Fri, 2 Aug 2019 10:19:23 +0000 (19:19 +0900)]
[Api] update api description

Fix typo and update details about the APIs.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api] check null param
Jaeyun [Fri, 2 Aug 2019 07:16:59 +0000 (16:16 +0900)]
[Api] check null param

In the functions for tensor data, add code to check null param.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/C-API] Increate single-invoke timeout
MyungJoo Ham [Fri, 2 Aug 2019 06:39:54 +0000 (15:39 +0900)]
[Tizen/C-API] Increate single-invoke timeout

Timeout of 1 sec is too short even for unit-test cases
in QEMU-ARM. Increase it to 3 sec.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[UnitTest/TizenCAPI] Support in-emulator unit test
MyungJoo Ham [Fri, 2 Aug 2019 04:49:43 +0000 (13:49 +0900)]
[UnitTest/TizenCAPI] Support in-emulator unit test

In QEMU, things are not that fast. Slow it down!

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tizen/Feature] invalid condition to check feature status
Jaeyun [Thu, 1 Aug 2019 12:10:47 +0000 (21:10 +0900)]
[Tizen/Feature] invalid condition to check feature status

1. Fix invalid condition when mutex-lock of element handle locked.
2. Add new struct to set mutex locked.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] Update the return value of each API
Sangjung Woo [Fri, 26 Jul 2019 07:00:49 +0000 (16:00 +0900)]
[C-API] Update the return value of each API

This patch updates the return value of each API by adding
'ML_ERROR_NOT_SUPPORTED' if the device is not supported
'machine_learning.inference'. Moreover, this updates nnstreamer_doc.h
file for doxygen.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api] Check feature before processing API
Sangjung Woo [Fri, 26 Jul 2019 05:00:54 +0000 (14:00 +0900)]
[C-Api] Check feature before processing API

This patch checks the machine_learning.inference feature before
processing API by calling ml_get_feature_enabled() function. In case of
Unit test, feature checking could be skipped by calling internal API,
ml_set_feature_status().

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
wip

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Android/Api] add custom-filter callback
Jaeyun [Mon, 29 Jul 2019 04:00:01 +0000 (13:00 +0900)]
[Android/Api] add custom-filter callback

1. Add custom-filter in java to execute tensors data in the application.
2. Update sample code to set the custom-filter.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] invalid data conversion
Jaeyun [Fri, 26 Jul 2019 11:14:29 +0000 (20:14 +0900)]
[Android/Api] invalid data conversion

1. Fix wrong conversion of byte buffer in native.
2. Add methods to allocate buffer with native byte order.
3. Fix invalid condition to close handle.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] refactor code
Jaeyun [Thu, 25 Jul 2019 06:58:21 +0000 (15:58 +0900)]
[Android/Api] refactor code

1. separate native code to each java class.
2. add common functions and definitions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/TF] apply c_api at tensor_filter_tensorflow
Hyoung Joo Ahn [Wed, 24 Jul 2019 08:25:59 +0000 (17:25 +0900)]
[Filter/TF] apply c_api at tensor_filter_tensorflow

change the codes of tensorflow filter to use c_api only

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tests/Filter/Tensorflow] bugfix: Fix a typo and wrong if-logic
Wook Song [Fri, 26 Jul 2019 06:44:08 +0000 (15:44 +0900)]
[Tests/Filter/Tensorflow] bugfix: Fix a typo and wrong if-logic

This patch fixes a critical typo and wrong if-logic in order to make the
test cases properly run when the '/etc/nnstreamer.ini' is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/PyTorch] bugfix: Fix a typo and wrong if-logic
Wook Song [Fri, 26 Jul 2019 04:49:11 +0000 (13:49 +0900)]
[Tests/Filter/PyTorch] bugfix: Fix a typo and wrong if-logic

In order to make the test cases properly run when the
'/etc/nnstreamer.ini' is used, this patch fixes a critical typo and
wrong if-logic for such cases.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/Caffer2] bugfix: Rewrite wrong if-logic
Wook Song [Fri, 26 Jul 2019 04:24:12 +0000 (13:24 +0900)]
[Tests/Filter/Caffer2] bugfix: Rewrite wrong if-logic

Since it is wrong that the if-logic for the test cases using
'/etc/streamer.ini', the tests are always terminated before even
started. This patch fixes this bug.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/Caffe2] bugfix: Fix a typo
Wook Song [Fri, 26 Jul 2019 04:17:10 +0000 (13:17 +0900)]
[Tests/Filter/Caffe2] bugfix: Fix a typo

This patch fixes a critical typo in the runTest script. In order to run
test cases using '/etc/nnstreamer.ini', 'ini_path' should be replaced
with 'ini_file'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Filter] condition to check model
Jaeyun [Thu, 25 Jul 2019 07:14:17 +0000 (16:14 +0900)]
[Filter] condition to check model

Prevent error case if filter framework does not need a model file.
Add a flag in nnfw struct and change condition to check model in transform callback.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test] free string
Jaeyun [Thu, 25 Jul 2019 07:11:33 +0000 (16:11 +0900)]
[Test] free string

free strings after getting the pad list in testcase.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Conf] Handle the case of using the default 'sysconfdir' value of meson
Wook Song [Fri, 24 May 2019 04:45:53 +0000 (13:45 +0900)]
[Conf] Handle the case of using the default 'sysconfdir' value of meson

Since the default value of 'sysconfdir' in the Meson build system is
just 'etc' instead of '/etc', NNSTREAMER_CONF_FILE could be set to wrong
path when the default value is used. This patch fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/CustomFilter] Fix a bug in code for checking existence of OpenCV
Wook Song [Thu, 25 Jul 2019 02:45:48 +0000 (11:45 +0900)]
[Tests/CustomFilter] Fix a bug in code for checking existence of OpenCV

This patch fixes a minor bug in the code for checking existence of
OpenCV libraries.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Android/Sample] add sample code to use library
Jaeyun [Fri, 19 Jul 2019 09:22:26 +0000 (18:22 +0900)]
[Android/Sample] add sample code to use library

Add sample code to use nnstreamer library.
This sample includes basic example to run the single-shot and pipeline examples repeatedly.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Android/Api] api base
Jaeyun [Wed, 10 Jul 2019 11:31:14 +0000 (20:31 +0900)]
[Android/Api] api base

Update files for android-java api.

- initial commit to add android java api set.
- single-shot / pipeline functions.
- data callback from sink node in pipeline api.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder/Sub] build static lib
Jaeyun [Fri, 19 Jul 2019 06:42:50 +0000 (15:42 +0900)]
[Decoder/Sub] build static lib

change font file in decoder-subplugins to build static library.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[ANDROID] Built as Shared Library with tensorflow-lite
jijoong.moon [Fri, 14 Jun 2019 04:23:35 +0000 (13:23 +0900)]
[ANDROID] Built as Shared Library with tensorflow-lite

In order to build nnstreamer shared libraries including
sub-plugins (decoder, filters), the android.mk file is
restructured. Becuse gstreamer building blocks list for nnstreamer might be
required for static build and android application build, it is moved
to nnstreamer.mk.

If you bulid libnnstreamer.so using this android.mk, gstreamer shared
libries should be prepared. Please refere "Build Gstreamer full source
based Android rootFS with Cerbero" in
https://github.com/nnsuite/nnstreamer-example/tree/master/android.

Once the build is finished successfully, you can find libnnstreamer.so
and gstreamer shared libraries in libs/$TARGET_ARCH/ which is listed
in nnstreamer.mk under the name of "NNSTREAMER_BUILDING_BLOCK_LIST".
you can use these to build your own android application.

New script for tensorflow-lite tensor filter library is added. If
there is not tflite source, "prepare_tflite.sh" will download and
prepare the external packages of tflite. Using these source code,
android.mk make tflite static library and use it to build
libnnstreamer_filter_tensorflow-lite.so (which includes static
tensorflowlite.a for android of course)

If you want to build android application statically, you could just use the
macro defined in nnstreamer.mk.

Build NNStreamer as Shared Library.
- Gstreamer Shared Libraries : Cerbero
  : Download and build by yourself
- Tensorflow-lite : If TENSORFLOW_LITE Macro is not defined,
  NNStreamer is going to download and configure
  --> static lib
- NNStreamer : libnnstreamer.so
- NNStreamer tflite : libnnstreamer_filter_tensorflow-lite.so
- NNStreamer decoder: libnnstreamer_decoder_direct_video.so
                      libnnstreamer_decoder_bounding_boxes.so
                      libnnstreamer_decoder_image_labeling.so

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
5 years ago[Sink] remove unnecessary functions
Jaeyun [Mon, 22 Jul 2019 09:38:26 +0000 (18:38 +0900)]
[Sink] remove unnecessary functions

use basesink default and remove unnecessary functions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] check gstreamer initialization status in ml_single_open() accepted/tizen/unified/20190723.112130 submit/tizen/20190722.095424
Sangjung Woo [Fri, 19 Jul 2019 09:45:14 +0000 (18:45 +0900)]
[C-API] check gstreamer initialization status in ml_single_open()

Before calling gstreamer function, this patch checks its initialization
status by calling gst_init_check() in ml_single_open().

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tests/Filter/TFLite] bugfix: Fix wrong if-logic
Wook Song [Mon, 22 Jul 2019 05:48:59 +0000 (14:48 +0900)]
[Tests/Filter/TFLite] bugfix: Fix wrong if-logic

This patch fixes wrong if-logic that results in termination of the test
without running the gstTest code when /etc/streamer.ini is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Filter/TFLite] bugfix: Correct a critical typo
Wook Song [Mon, 22 Jul 2019 05:37:41 +0000 (14:37 +0900)]
[Tests/Filter/TFLite] bugfix: Correct a critical typo

This patch corrects a critical typo by replacing 'ini_path' with
'ini_file'. Note that the 'ini_file' variable is required to run the
test case when '/etc/nnstreamer.ini' is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Decoder/ImageLabeling] bugfix: Fix wrong if-logic
Wook Song [Mon, 22 Jul 2019 05:12:10 +0000 (14:12 +0900)]
[Tests/Decoder/ImageLabeling] bugfix: Fix wrong if-logic

This patch fixes wrong if-logic that leads to always skipping the
gstTest code line when /etc/streamer.ini is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/Decoder/ImageLabeling] bugfix: Correct critical typo
Wook Song [Mon, 22 Jul 2019 02:26:25 +0000 (11:26 +0900)]
[Tests/Decoder/ImageLabeling] bugfix: Correct critical typo

When the unit tests for image labeling decoder is run using
/etc/nnstreamer.ini, it would be stuck because of a critical typo in
the variable indicating /etc/nnstreamer. This patch fixes this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Filter/Tensorflow] apply a new constructor for TFBuffer
Hyoung Joo Ahn [Fri, 12 Jul 2019 07:54:57 +0000 (16:54 +0900)]
[Filter/Tensorflow] apply a new constructor for TFBuffer

the different constructor is applied according to the version of TF

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tizen/Api] add smack label for tensor filter
Sangjung Woo [Fri, 19 Jul 2019 09:08:56 +0000 (18:08 +0900)]
[Tizen/Api] add smack label for tensor filter

Tensor filters such as libnnstreamer_filter_tensorflow-lite.so does not
have a smack label, smack deny occurs when accessing it . This patch fixes
that bug.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Dist/Tizen] Disable tensorflow (non-lite) for Tizen accepted/tizen/unified/20190722.074756 submit/tizen/20190719.063413
MyungJoo Ham [Thu, 18 Jul 2019 10:40:11 +0000 (19:40 +0900)]
[Dist/Tizen] Disable tensorflow (non-lite) for Tizen

With the Tensorflow update from 1.09 to 1.13 @ Tizen,
we have decided to drop tensorflow (non-lite).

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[C-Api] fix memory leak bug
Sangjung Woo [Thu, 18 Jul 2019 10:20:51 +0000 (19:20 +0900)]
[C-Api] fix memory leak bug

Since developers can reduce the number of Tensors by calling
ml_tensors_info_set_count(), it causes the memory leak when invoking
ml_tensors_info_free() and ml_tensors_data_destroy(). This patch fixes
that bug by checking all possible elements (i.e. ML_TENSOR_SIZE_LIMIT).

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api] fix error to run pipeline
Jaeyun [Wed, 17 Jul 2019 06:56:30 +0000 (15:56 +0900)]
[C-Api] fix error to run pipeline

1. return valid error code when opening single-shot model.
2. When called destroy() in pipeline, remove all callbacks before changing pipeline state.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] free element handle accepted/tizen/unified/20190717.115101 submit/tizen/20190717.061257
Jaeyun [Mon, 15 Jul 2019 04:58:50 +0000 (13:58 +0900)]
[C-Api] free element handle

Add code to free pipeline element and hash-table.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/TF] fix build conflict with TF version 1.13.1
Hyoung Joo Ahn [Fri, 12 Jul 2019 06:09:45 +0000 (15:09 +0900)]
[Filter/TF] fix build conflict with TF version 1.13.1

overide a specific method at the specific version of TF

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[C-Api] Add NNFW enum for future use
Sangjung Woo [Thu, 11 Jul 2019 05:34:37 +0000 (14:34 +0900)]
[C-Api] Add NNFW enum for future use

This patch newly adds the ML_NNFW_TYPE_NNFW enumeration for future use
of NNFW.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api/Single] validate input data
Jaeyun [Wed, 10 Jul 2019 08:23:33 +0000 (17:23 +0900)]
[C-Api/Single] validate input data

Add code to validate input data in single-invoke function.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] Update doxygen for Tizen API
Sangjung Woo [Thu, 11 Jul 2019 02:07:21 +0000 (11:07 +0900)]
[C-API] Update doxygen for Tizen API

This patch updates the feature name of Tizen API and its related
documentation. Detailed information is as below.

* NNStreamer -> Single / Pipeline without NNStreamer
* Newly add the 2 feature keys (machine_learning &
  machine_learning.inference)

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api/Android] add build path for c-api
Jaeyun [Tue, 9 Jul 2019 03:22:25 +0000 (12:22 +0900)]
[C-Api/Android] add build path for c-api

define path of c-api for android build

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[API] fix typo in doc header
Jaeyun [Fri, 5 Jul 2019 05:57:29 +0000 (14:57 +0900)]
[API] fix typo in doc header

update doc-header file (fix typo and minor changes)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Doc] fix typo
Jaeyun [Wed, 3 Jul 2019 04:13:48 +0000 (13:13 +0900)]
[Doc] fix typo

Add PR to fix typo (nerual > neural)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] Update the doc comment about Tizen privilege.
Sangjung Woo [Fri, 5 Jul 2019 08:48:49 +0000 (17:48 +0900)]
[C-Api] Update the doc comment about Tizen privilege.

This patch updates the the doc comment about Tizen privilege.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api] callback for pipeline state
Jaeyun [Thu, 4 Jul 2019 07:54:34 +0000 (16:54 +0900)]
[C-Api] callback for pipeline state

Add callback to notify the state change.
If it is required to get the state, add callback when constructing the pipeline.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] free data handle in src node
Jaeyun [Thu, 4 Jul 2019 06:52:45 +0000 (15:52 +0900)]
[C-Api] free data handle in src node

If buf policy is auto-free, free data handle for each case.

Also, added code to remove duplicated code when constructung the pipelie.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] Modify API names and its comments
Sangjung Woo [Thu, 4 Jul 2019 02:40:20 +0000 (11:40 +0900)]
[C-Api] Modify API names and its comments

This patch modify API names and its comments to comply with API Guide.
Detailed items are as below.

* Modify the comments to comply with API Guide
* ml_single_inference() -> ml_single_invoke()
* ml_pipeline_src_put_handle () -> ml_pipeline_src_release_handle ()
* ml_pipeline_switch_put_handle () -> ml_pipeline_switch_release_handle ()
* ml_pipeline_valve_put_handle () -> ml_pipeline_valve_release_handle ()

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api] change function name
Jaeyun [Wed, 3 Jul 2019 11:06:54 +0000 (20:06 +0900)]
[C-Api] change function name

Change function name rule.
(remove _util and add prefix _info/_data)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] Update the comments and the name of parameter
Jaeyun [Wed, 3 Jul 2019 04:25:02 +0000 (13:25 +0900)]
[C-API] Update the comments and the name of parameter

This patch updates the comments and the name of parameter to comply with
C-API review process.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[C-Api] remove unnecessary local value
Jaeyun [Wed, 3 Jul 2019 09:04:37 +0000 (18:04 +0900)]
[C-Api] remove unnecessary local value

1. remove unnecessary local variable in pipe api
2. remove unnecessary buffer count in testcases

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] handle for tensors data instance
Jaeyun [Fri, 28 Jun 2019 11:34:36 +0000 (20:34 +0900)]
[C-Api] handle for tensors data instance

1. Moved tensors-data structure to private header.
2. Add handle for tensors-data instance and refactor related functions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] tensor meta handle
Jaeyun [Wed, 26 Jun 2019 08:25:32 +0000 (17:25 +0900)]
[C-Api] tensor meta handle

As we discussed, tensors metadata in c-api changed with info-handle instance.

1. alloc and destory functions are added for tensors-info handle.
2. refactors all functions and testcases with metadata handle.
3. update api description.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api] check nnfw with file extension
Jaeyun [Wed, 26 Jun 2019 06:53:03 +0000 (15:53 +0900)]
[C-Api] check nnfw with file extension

Check given model file has valid file extension.
If the param nnfw is unknown and file ext is valid, determine fw with the ext.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-Api/Deb] build c-api
Jaeyun [Mon, 17 Jun 2019 08:10:29 +0000 (17:10 +0900)]
[C-Api/Deb] build c-api

add capi in nnstreamer debpkg.

TODO : consider to separate api pkg

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Test/C-Api] test failure case
Jaeyun [Mon, 17 Jun 2019 04:18:19 +0000 (13:18 +0900)]
[Test/C-Api] test failure case

Fix test fail cases in local.
1. caps string to appsrc (sets invalid caps)
2. set default root dir in c-api testcases

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[DECODER] Add Pose Estimation Decoder
jijoong.moon [Tue, 14 May 2019 04:58:49 +0000 (13:58 +0900)]
[DECODER] Add Pose Estimation Decoder

In order to display the result from pose estimaition, we may need
decoder. The output format of pose estimation is [14, o_Width,
o_Height, 1]. 14 means number of joint of human bone structure, top,
neck, r_shoulder, r_elbow, r_wrist, l_shoulder, l_elbow, l_wrist,
r_hip, r_knee, r_ankle, l_hip, l_knee, l_ankle.

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
5 years ago[Tizen/Api] support tensorflow model in singleshot
Jaeyun [Wed, 12 Jun 2019 03:43:11 +0000 (12:43 +0900)]
[Tizen/Api] support tensorflow model in singleshot

1. add tensorflow pipeline in singleshot
2. testcase with tensorflow speech cmd model

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[C-API] appsink function in old version
Jaeyun [Fri, 14 Jun 2019 11:37:17 +0000 (20:37 +0900)]
[C-API] appsink function in old version

gst_app_sink_try_pull_sample is available at ver 1.10.
check minor version and get buffer from appsink with gst_app_sink_pull_sample.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Conf] If CONFFILE path is not available, use the default
MyungJoo Ham [Fri, 14 Jun 2019 02:18:06 +0000 (11:18 +0900)]
[Conf] If CONFFILE path is not available, use the default

If conffile path is not available in envvar, use the default.
We had this feature before and... somehow, this feature
has been removed at some point.
I'm reviving this feature as this makes errors in some systems.

I've added g_assert to avoid similar errors without
detected at the point of failure.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Common] parse empty name string
Jaeyun [Fri, 21 Jun 2019 02:31:36 +0000 (11:31 +0900)]
[Common] parse empty name string

if name string is empty, set null str.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Meson] protobuf dependency
Jaeyun [Fri, 21 Jun 2019 04:51:25 +0000 (13:51 +0900)]
[Meson] protobuf dependency

define protobuf dependency and check this dep with tf and caffe2 option.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Unittest/Caffe2] add the unittest of caffe2
Hyoung Joo Ahn [Mon, 17 Jun 2019 12:40:05 +0000 (21:40 +0900)]
[Unittest/Caffe2] add the unittest of caffe2

with the toy example, test caffe2 as the framework of tensor_filter

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Filter/Caffe2] add caffe2 at the nnstreamer build process
Hyoung Joo Ahn [Mon, 17 Jun 2019 05:46:58 +0000 (14:46 +0900)]
[Filter/Caffe2] add caffe2 at the nnstreamer build process

make nnstreamer build process include the caffe2.

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tizen/API] Fix the error list of ACR check script. accepted/tizen/unified/20190620.071918 submit/tizen/20190619.061941
Sangjung Woo [Mon, 17 Jun 2019 10:00:05 +0000 (19:00 +0900)]
[Tizen/API] Fix the error list of ACR check script.

This patch fixes the error list of ACR check script.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Svace] fix svace issues
Jaeyun [Fri, 14 Jun 2019 06:32:00 +0000 (15:32 +0900)]
[Svace] fix svace issues

update files to fix svace issues

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Svace] fix save issues for python filter
Dongju Chae [Mon, 17 Jun 2019 02:09:23 +0000 (11:09 +0900)]
[Svace] fix save issues for python filter

Update files to fix svace issue

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years agoUnittest-coverage: apply the changed paths of CAPI files
MyungJoo Ham [Mon, 17 Jun 2019 09:34:59 +0000 (18:34 +0900)]
Unittest-coverage: apply the changed paths of CAPI files

CAPI files have been moved from tizen-capi to api/capi.

Note that C-API will support all other general Linux distros
and we will support C# and Java APIs as well.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Filters] Emit more friendly error messages.
MyungJoo Ham [Fri, 14 Jun 2019 02:16:54 +0000 (11:16 +0900)]
[Filters] Emit more friendly error messages.

When they cannot load a model file due to file types,
don't just tell you cannot load it.
Tell more about it along with the file path.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Common/Test] minor update
Jaeyun [Wed, 12 Jun 2019 03:33:44 +0000 (12:33 +0900)]
[Common/Test] minor update

1. check string len while checking data type.
2. unref pad instance in testcases.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[CAPI] Beautify CAPI Generality Support
MyungJoo Ham [Fri, 14 Jun 2019 04:06:38 +0000 (13:06 +0900)]
[CAPI] Beautify CAPI Generality Support

While the default CAPI header is focussed on Tizen,
if "-Denable-tizen=false", the CAPI header becomes
non-Tizen, which does not require any Tizen packages.

1. Beautify by not using .spec for sed (support non-RPM packages)
2. Beautify by not using unnecessary header in nnstreamer.h
3. Beautify by adding enable-tizen meson option.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test/CAPI] Fix sign-ness mismatch
MyungJoo Ham [Fri, 14 Jun 2019 04:05:39 +0000 (13:05 +0900)]
[Test/CAPI] Fix sign-ness mismatch

Add 'U' postfix for numbers required to be unsigned.
This fixes CAPI unittest build errors in Ubuntu.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Subplugin] define function to find subplugin
Jaeyun [Thu, 13 Jun 2019 03:29:02 +0000 (12:29 +0900)]
[Subplugin] define function to find subplugin

1. add definition to find filter/decoder sub-plugins instance.
2. check duplicated name when registering sub-plugin.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/Api] Reorganize API directory
Sangjung Woo [Thu, 13 Jun 2019 06:20:01 +0000 (15:20 +0900)]
[Tizen/Api] Reorganize API directory

Since previous 'tizen-api' directory only supports Tizen CAPI, this
patch reorganizes directory structure to support multiple platform APIs
as below.

  NNStreamer - api - capi
                   ` java

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/Api] Remove Tizen dependency from CAPI set
Sangjung Woo [Thu, 13 Jun 2019 06:01:51 +0000 (15:01 +0900)]
[Tizen/Api] Remove Tizen dependency from CAPI set

Since NNStreamer CAPI will be used for Android, Tizen and Linux distro,
this patch removes the Tizen dependency from API set. Detailed works are
as below.

* Support multiple Log environment such as Android, Tizen and Linux
  distro instead of dlog API.
* Use the standard error code instead of that of Tizen.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Filter/Caffe2] initial commit for caffe2
Hyoung Joo Ahn [Wed, 5 Jun 2019 09:02:45 +0000 (18:02 +0900)]
[Filter/Caffe2] initial commit for caffe2

it will be updated after packaging pytorch properly and example & test also

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Tizen/Api] add common utilities and change name prefix
Jaeyun [Mon, 10 Jun 2019 06:55:16 +0000 (15:55 +0900)]
[Tizen/Api] add common utilities and change name prefix

1. Define new functions to handle tensor data and refactor api functions.
2. Update api description.
3. Add testcases using custom filter.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/Api] change callback param for tensors
Jaeyun [Mon, 10 Jun 2019 00:57:16 +0000 (09:57 +0900)]
[Tizen/Api] change callback param for tensors

Change tensors data struct and set callback with tensors data (sink and appsrc)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Source/AMC] Source element for Android MediaCodec (AMC)
Dongju Chae [Thu, 16 May 2019 03:31:07 +0000 (12:31 +0900)]
[Source/AMC] Source element for Android MediaCodec (AMC)

This commit implements a source element for Android MediaCodec (AMC)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Typo] fix a minor typo of comment
Hyoung Joo Ahn [Mon, 10 Jun 2019 05:41:50 +0000 (14:41 +0900)]
[Typo] fix a minor typo of comment

fix a minor typo of comment

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[Dist] typo fix $ --> %
MyungJoo Ham [Thu, 6 Jun 2019 12:49:20 +0000 (08:49 -0400)]
[Dist] typo fix $ --> %

% is the macro character in RPM/spec. $ is a typo.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Test] move data files to model directory
Jaeyun [Tue, 4 Jun 2019 09:45:21 +0000 (18:45 +0900)]
[Test] move data files to model directory

Move files to data directory and remove duplicated.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/Api] change name prefix
Jaeyun [Wed, 5 Jun 2019 11:31:26 +0000 (20:31 +0900)]
[Tizen/Api] change name prefix

change function name and param prefix to ml

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter] add the model path parser
Hyoung Joo Ahn [Mon, 27 May 2019 07:37:15 +0000 (16:37 +0900)]
[Filter] add the model path parser

Since caffe2 require 2 model files(init, prediction) the model path option should handle the complicated input string

Signed-off-by: Hyoung Joo Ahn <hello.ahn@samsung.com>
5 years ago[pytorch] Added pytorch subplugin support
Parichay Kapoor [Wed, 15 May 2019 04:50:57 +0000 (13:50 +0900)]
[pytorch] Added pytorch subplugin support

1. Added pytorch subplugin support to run inference of networks
2. Added support to run on gpu for the inference
3. Added test cases for the subplugin

Added a sample file torch saved file used to test the code

V2:
Add pytorch in nnstreamer.mk
install pytorch tests
add nnstreamer-pytorch package

V3:
Disable pytorch for tizen build until its supported

V4:
Disable pytorch tests when disabling pytorch builda

V5:
Corrected variable in spec file
Explanation for enable-pytorch-use-gpu option

V6:
Using mnist based unit-test case instead of imagenet based model
to reduce the model file size in use

V7:
Using input and output properties of tensorfilter than specify in
the model file

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years agoUpdate .gitignore to ignore files generated by Visual Studio
Sangjung Woo [Wed, 5 Jun 2019 08:10:32 +0000 (17:10 +0900)]
Update .gitignore to ignore files generated by Visual Studio

This patch updates .gitignore to exclude files generated by Visual
Studio for C# APIs.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/Api] basic implementation for single shot
Jaeyun [Tue, 4 Jun 2019 07:49:55 +0000 (16:49 +0900)]
[Tizen/Api] basic implementation for single shot

Add base code for single shot model.
Update .spec and add simple testcases.

TODO: update name rules (function names and common util)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] Use function instead of API in documentation
Sangjung Woo [Mon, 3 Jun 2019 07:58:49 +0000 (16:58 +0900)]
[Tizen/API] Use function instead of API in documentation

API review scripts recommands to use the word 'function' instead of
'API' in documentation as below. So this patch fixes this issue.

Are you sure "API" in this case shouldn't be "function"? If this
sentence refers to a single function, not a set of functions, it should
be "function".

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/API] Fix the broken link
Sangjung Woo [Mon, 3 Jun 2019 07:48:33 +0000 (16:48 +0900)]
[Tizen/API] Fix the broken link

This patch fixes broken links on the doxygen documentation.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/Api] add appsink to handle sink event
Jaeyun [Mon, 3 Jun 2019 11:16:56 +0000 (20:16 +0900)]
[Tizen/Api] add appsink to handle sink event

1. Register the appsink as a sink element. User can register appsink and tensor-sink as a sink element.
2. Move logging macro to private header.
3. Add testcases to test appsink element.

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