platform/upstream/nnstreamer.git
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>
5 years ago[Filter/MvNCSDK] Write callbacks for framework invocation
Wook Song [Thu, 30 May 2019 07:52:12 +0000 (16:52 +0900)]
[Filter/MvNCSDK] Write callbacks for framework invocation

This patch fills the body of the callback function for invoke_NN, which
invokes the framework with the given network model.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[WIP. Tizen/API] Simple Single-Shot Inference Low-Level API
MyungJoo Ham [Fri, 29 Mar 2019 05:00:35 +0000 (14:00 +0900)]
[WIP. Tizen/API] Simple Single-Shot Inference Low-Level API

This is quite similar with CoreML/MLModel API, which is the
low-level API for iOS CoreML.

With this, application developers may invoke "inferences"
of a given model with a single data frame without
any pre/post-processings.

The corresponding pipeline will be:

app_src --> tensor_filter --> tensor_sink

with 0/1 framerate.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Typdef] Update doxygen for GstTensorInfo
MyungJoo Ham [Fri, 29 Mar 2019 05:00:04 +0000 (14:00 +0900)]
[Typdef] Update doxygen for GstTensorInfo

name entry is not mandatory for all cases.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Meson] update version info
Jaeyun [Thu, 30 May 2019 08:27:45 +0000 (17:27 +0900)]
[Meson] update version info

update required meson version to 0.42

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/Python] Fix missing initialization of class members
Dongju Chae [Fri, 31 May 2019 05:03:24 +0000 (14:03 +0900)]
[Filter/Python] Fix missing initialization of class members

This commit updates missing initializations of class member variables

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Test/Api/Tizen] add testcases for params and element
Jaeyun [Thu, 30 May 2019 07:49:00 +0000 (16:49 +0900)]
[Test/Api/Tizen] add testcases for params and element

Add testcases for function params and element switch

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] Remove unnecessary todo and TBD items
Sangjung Woo [Thu, 30 May 2019 05:58:16 +0000 (14:58 +0900)]
[Tizen/API] Remove unnecessary todo and TBD items

In order to pass the ACR process, unnecessary information such as `TBD`
or `todo` should be removed in Public header. This patch removes those
things.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Api/Tizen] handle invalid param
Jaeyun [Wed, 29 May 2019 08:01:02 +0000 (17:01 +0900)]
[Api/Tizen] handle invalid param

check the error case of invalid params.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] change param and enum
Jaeyun [Wed, 29 May 2019 04:49:53 +0000 (13:49 +0900)]
[Api/Tizen] change param and enum

change function param names and enums for acr process

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years agoDevelopment of 0.2.1 RC1 started
MyungJoo Ham [Wed, 29 May 2019 18:53:21 +0000 (14:53 -0400)]
Development of 0.2.1 RC1 started

After the release of 0.2.0, 0.2.1-rc1 is started.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoRelease of NNStreamer 0.2.0 v0.2.0
MyungJoo Ham [Mon, 27 May 2019 10:09:30 +0000 (19:09 +0900)]
Release of NNStreamer 0.2.0

0.1.3 RC has become 0.2.0 as this version is accepted by Tizen 5.5 M1.

- A lot of security issues and bugs fixed (for Tizen 5.5 M1 release)
- Tizen Public C-API Pipeline for 5.5 M1
- Tizen Public C-API SingleShot Prototype
- Yocto/Openembedded layer released
- ROS sink/src
- IIO support
- Android source draft
- Python custom filter
- Android sample application released
- Tensorflow-lite / NNAPI support

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Api/Tizen] unref object after usage
Jaeyun [Tue, 28 May 2019 09:38:20 +0000 (18:38 +0900)]
[Api/Tizen] unref object after usage

unref caps and pad data after getting each object

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] add macro for logging
Jaeyun [Tue, 28 May 2019 08:56:44 +0000 (17:56 +0900)]
[Api/Tizen] add macro for logging

add macros for dlog message and replace all dlog_print()

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Api/Tizen] change function name
Jaeyun [Tue, 28 May 2019 08:30:47 +0000 (17:30 +0900)]
[Api/Tizen] change function name

change function name and indent rule in tizen-capi.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter/MvNCSDK] Write callbacks for getting dimensions of in/out tensor
Wook Song [Mon, 27 May 2019 05:22:13 +0000 (14:22 +0900)]
[Filter/MvNCSDK] Write callbacks for getting dimensions of in/out tensor

This patch fills the bodies of callback functions, getInputDimension and
getOutputDimensions, which return the dimension information of input and
output tensor of this filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Filter/MvNCSDK] Implement callbacks for open/close of filter framework
Wook Song [Thu, 23 May 2019 08:55:22 +0000 (17:55 +0900)]
[Filter/MvNCSDK] Implement callbacks for open/close of filter framework

This patch implements callback functions for opening and closing
GstTensorFilterFramework for the Intel Movidius Neural Compute Stick
sub-plugin of tensor_filter.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Conf] add option to enable symbolic link
Jaeyun [Mon, 13 May 2019 06:42:39 +0000 (15:42 +0900)]
[Conf] add option to enable symbolic link

In nnstreamer ini, add new option to enable/disable symbolic link.
Add internal function to check a library is available with symlink option.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] validate sub-plugin data
Jaeyun [Thu, 2 May 2019 12:00:49 +0000 (21:00 +0900)]
[Decoder] validate sub-plugin data

Check decoder sub-plugins data before registration.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[PythonFilter/Testcases] Add some testcases for Python filter
Dongju Chae [Fri, 17 May 2019 08:23:22 +0000 (17:23 +0900)]
[PythonFilter/Testcases] Add some testcases for Python filter

I've added some existing testcases
- passthrough.py
- scaler.py

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Meson] remove unnecessary option
Jaeyun [Mon, 13 May 2019 02:51:48 +0000 (11:51 +0900)]
[Meson] remove unnecessary option

For opencv test, 'enable-opencv-test' is unnecessary option.
Check dependency of opencv pkg and build libraries when found the dependency.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Unittest] GCC7-GTEST compatibility
MyungJoo Ham [Fri, 17 May 2019 07:15:26 +0000 (16:15 +0900)]
[Unittest] GCC7-GTEST compatibility

GCC7 has stricter rules on signed-unsigned comparison.

Update unit-test cases to avoid gtest errors with gcc7.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Conf] add flag to load path from env-var
Jaeyun [Tue, 7 May 2019 08:17:39 +0000 (17:17 +0900)]
[Conf] add flag to load path from env-var

Parse ini file and add sub-plugins path from env-var. (default false)
For unittest, add temorary configuration to read env variables.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[PythonFilter/Build] Update build files for Ubuntu/Tizen packaging
Dongju Chae [Thu, 16 May 2019 06:52:23 +0000 (15:52 +0900)]
[PythonFilter/Build] Update build files for Ubuntu/Tizen packaging

Changed ubuntu/tizen build files to support Python subplugin/api

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Filter/MvNCSDK/Meson] Add a build dependency on NCSDK2
Wook Song [Tue, 14 May 2019 02:51:50 +0000 (11:51 +0900)]
[Filter/MvNCSDK/Meson] Add a build dependency on NCSDK2

In order to use NCSDK v2 in the Intel Movidius Neural Compute Stick
sub-plugin of tensor_filter, this patch adds a build dependency on
it to the meson build script.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Filter] Add skeleton for Intel Movidius Neural Compute Stick support
Wook Song [Mon, 13 May 2019 08:23:00 +0000 (17:23 +0900)]
[Filter] Add skeleton for Intel Movidius Neural Compute Stick support

This patch adds skeleton code of a tensor_filter sub-plugin using Neural
Compute SDK ver.2 for Intel Movidius Neural Compute Stick support. The
build tree is also revised to include this sub-plugin.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Decoder/Api] remove output type
Jaeyun [Mon, 29 Apr 2019 08:29:42 +0000 (17:29 +0900)]
[Decoder/Api] remove output type

Remove output type in sub-plugin definition.
Output mime-type depends on sub-plugins out caps.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder] subplugin mode only
Jaeyun [Fri, 26 Apr 2019 09:20:20 +0000 (18:20 +0900)]
[Decoder] subplugin mode only

Support sub-plugins only.
Remove unnecessary private properties and code clean.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder/Api] change function name
Jaeyun [Fri, 26 Apr 2019 07:34:04 +0000 (16:34 +0900)]
[Decoder/Api] change function name

change decoder register function / struct name

TODO : refactor decoder main (support plugin mode only)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Conf] code clean
Jaeyun [Thu, 9 May 2019 06:41:56 +0000 (15:41 +0900)]
[Conf] code clean

1. remove unused val error. (set NULL to call glib functions)
2. add function to parse bool from string
3. rename functions and clean-up code

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Conf/Tensorflow] remove default flag in conf setting
Jaeyun [Thu, 9 May 2019 03:59:36 +0000 (12:59 +0900)]
[Conf/Tensorflow] remove default flag in conf setting

Remove default flag about tensorflow memory optimization.
In tensorflow sub-plugin, read this option using custom-bool function.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] function to get element size
Jaeyun [Mon, 29 Apr 2019 04:38:29 +0000 (13:38 +0900)]
[Common] function to get element size

Add function to get element size.
Remove variable about element size definition in header.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] function to get element type str
Jaeyun [Thu, 25 Apr 2019 07:31:38 +0000 (16:31 +0900)]
[Common] function to get element type str

define function to get tensor type string

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Merge/Mux] common functions about time-sync option
Jaeyun [Thu, 25 Apr 2019 05:50:36 +0000 (14:50 +0900)]
[Merge/Mux] common functions about time-sync option

In the element merge/mux, add common functions about time-sync option.
Also refactor function name and param to handle sync option.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] Add 'remarks' information for specific functions
Sangjung Woo [Fri, 10 May 2019 05:57:25 +0000 (14:57 +0900)]
[Tizen/API] Add 'remarks' information for specific functions

This patch adds the remarks information to properly release allocated
memory space.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/API] Make a verb for the third person singular
Sangjung Woo [Fri, 10 May 2019 05:22:39 +0000 (14:22 +0900)]
[Tizen/API] Make a verb for the third person singular

To comply with Tizen API Process, this patch makes a verb for the third
person singular in doxygen documentation.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/API] Make a consistency in naming of GStreamer
Sangjung Woo [Fri, 10 May 2019 02:34:34 +0000 (11:34 +0900)]
[Tizen/API] Make a consistency in naming of GStreamer

This patch makes a consistency in naming of GStreamer.
* Normal case: GStreamer
* URL only: gstreamer

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Meson] add minimal warning flag
Jaeyun [Fri, 3 May 2019 08:02:08 +0000 (17:02 +0900)]
[Meson] add minimal warning flag

add minimal flags to prevent build warning

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Repo] move repo sources into one directory
Jaeyun [Fri, 3 May 2019 08:34:52 +0000 (17:34 +0900)]
[Repo] move repo sources into one directory

tensor-repo is not a common header and can be built only in repo directory.
Move files about tensor-repo into tensor_repo directory and clean up sources.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Common] remove typefind function
Jaeyun [Thu, 25 Apr 2019 09:04:35 +0000 (18:04 +0900)]
[Common] remove typefind function

Remove typefind function.

TODO
Consider to add typefind later in tensor-save/load plugins.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] Make API signature as single line
Sangjung Woo [Thu, 9 May 2019 01:46:05 +0000 (10:46 +0900)]
[Tizen/API] Make API signature as single line

This patch makes the API signature as single line to comply with Tizen
API style. This is requested by Sunggyu Choi who is in charge of Tizen
API.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/API] Update omitted return codes
Sangjung Woo [Thu, 9 May 2019 01:36:39 +0000 (10:36 +0900)]
[Tizen/API] Update omitted return codes

This patch updates the omitted return codes for Tizen API.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Tizen/API] fix the typos in header
Sangjung Woo [Thu, 9 May 2019 01:22:18 +0000 (10:22 +0900)]
[Tizen/API] fix the typos in header

This patch fixes the minor typos in header file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
5 years ago[Build/Meson] remove unnecessary flag
Jaeyun [Thu, 9 May 2019 02:26:26 +0000 (11:26 +0900)]
[Build/Meson] remove unnecessary flag

Meson v0.50 supports the install arg in configure_file().
If install_dir is set, configured file will be installed.

Also, TEST_TENSORFLOW in rpm spec is unnecessary.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Tizen/API] License Tizen-CAPI as LGPL 2.1
MyungJoo Ham [Wed, 8 May 2019 11:27:59 +0000 (20:27 +0900)]
[Tizen/API] License Tizen-CAPI as LGPL 2.1

Unify the licences of subpackages.
Fortunately, there are only a few related contributors and
we have re-licensing agreements in CoC as well.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tizen/API] Rename tizen-api.h to nnstreamer.h
MyungJoo Ham [Wed, 8 May 2019 08:11:27 +0000 (17:11 +0900)]
[Tizen/API] Rename tizen-api.h to nnstreamer.h

The file name "tizen-api.h" is ubsurd for Tizen application writers.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[Tizen/API] Module group hierarchy fix
MyungJoo Ham [Wed, 8 May 2019 06:45:31 +0000 (15:45 +0900)]
[Tizen/API] Module group hierarchy fix

NNStreamer Pipeline is in NNStreamer group.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years ago[UNITTEST] Skip the test when there is not tensorflow and lite
jijoong.moon [Wed, 17 Apr 2019 01:38:18 +0000 (10:38 +0900)]
[UNITTEST] Skip the test when there is not tensorflow and lite

We need to skip tests using tensorflow and lite if they are not
installed. So pkg-config is used to identify their installation.

**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[Build/Plugin] common plugin registration
Jaeyun [Wed, 24 Apr 2019 12:51:27 +0000 (21:51 +0900)]
[Build/Plugin] common plugin registration

Move all element registration to common file. (warning about function prototype)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Subplugin] handle error case
Jaeyun [Thu, 2 May 2019 11:29:20 +0000 (20:29 +0900)]
[Subplugin] handle error case

update code to handle error case of invalid params.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Subplugin] check symlink before getting handle
Jaeyun [Tue, 30 Apr 2019 08:19:41 +0000 (17:19 +0900)]
[Subplugin] check symlink before getting handle

Add code to check symlink before open file handle.
(fix one of security issues)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Filter] validate sub-plugin data
Jaeyun [Thu, 2 May 2019 10:44:07 +0000 (19:44 +0900)]
[Filter] validate sub-plugin data

1. Add code to validate nn-framework data before registration.
2. Code clean to set filter properties.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[IIO] open file with with glib function
Jaeyun [Tue, 30 Apr 2019 10:31:29 +0000 (19:31 +0900)]
[IIO] open file with with glib function

Use glib function to open file (fix one of security issues)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Decoder/Sub-plugins] use glib to load labels
Jaeyun [Thu, 2 May 2019 06:21:37 +0000 (15:21 +0900)]
[Decoder/Sub-plugins] use glib to load labels

1. use glib function to load and initialize labels (fix one of security issues)
2. fix exception case when total label is larger then ssd model output

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
5 years ago[Repo] handle empty repo data
Jaeyun [Thu, 18 Apr 2019 08:22:38 +0000 (17:22 +0900)]
[Repo] handle empty repo data

If repo has no data or hashtable returns null, this makes exception to set lock or signal.
To prevent this exception, check returned data and handle error case.

Exception case when checking 'gst-inspect-1.0 -a'
tensor-repo made an exception.

TODO: Consider to move repo/reposrc/reposink sources into one directory.
Now tensor-repo is not a common source.

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