platform/upstream/nnstreamer.git
5 years agoCI: remove unnecessary folder
Geunsik Lim [Fri, 14 Sep 2018 07:37:09 +0000 (16:37 +0900)]
CI: remove unnecessary folder

This commit is to remove unnecessary folder, TAOS-CI.
This folder is not needed to be archived in nnstreamer repository.

**Changes proposed in this PR:**
1. Removed TAOS-CI folder

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Filter/Custom] Ensure the loaded private data is stored at the desired position.
MyungJoo Ham [Thu, 13 Sep 2018 09:34:42 +0000 (18:34 +0900)]
[Filter/Custom] Ensure the loaded private data is stored at the desired position.

We check filter->privateData to see if the custom filter (.so) is already loaded or not.
Thus, in order to prevent duplicated filter loading, we need to ensure that
the created private data (*private_data) is stored at the desired location (filter->privateData).

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoCI: Updated config files based on latest TAOS-CI version
Geunsik Lim [Thu, 13 Sep 2018 09:41:24 +0000 (18:41 +0900)]
CI: Updated config files based on latest TAOS-CI version

This commit is to update the existing configuration files
based on the latest version of TAOS-CI.

**Changes proposed in this PR:**
1. Added config file for server administrator
2. Updated the existing config files TAOS-CI version 1.0.20180913.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
5 years ago[Decoder] Minor style fix (variable types)
MyungJoo Ham [Thu, 13 Sep 2018 01:51:54 +0000 (10:51 +0900)]
[Decoder] Minor style fix (variable types)

Let's constify mode names as they are not going to be edited in runtime, but switched between predefined strings only.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Transform] Add Transpose Mode
jijoong.moon [Wed, 12 Sep 2018 07:42:56 +0000 (16:42 +0900)]
[Transform] Add Transpose Mode

We may need transpose operation such as tensor_A[I][J][K][L] to
trneosr_B[I][J][L][K].

In order to support this, transpose mode is added. It is working with
"mode=transpose, option=0:1:3:2" (Notice that the first dim is always
fixed).

**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>
6 years ago[Common] common functions to prepare multi-tensors
Jaeyun [Wed, 12 Sep 2018 06:40:35 +0000 (15:40 +0900)]
[Common] common functions to prepare multi-tensors

prepare multi-tensors (other/tensors)

1. add new structure and functions for tensor info
2. remove dependency of media info
3. remove the rank of tensor dimension

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorDec] Add data struct for tensor decoder modes include image labeling
jinhyuck-park [Tue, 11 Sep 2018 04:33:49 +0000 (13:33 +0900)]
[TensorDec] Add data struct for tensor decoder modes include image labeling

Add initial data struct to process labels for tensor from tensor filter

Signed-off-by: jinhyuck-park <jinhyuck83.park@samsung.com>
6 years ago[Document] update readme.md
Jaeyun [Wed, 12 Sep 2018 05:58:15 +0000 (14:58 +0900)]
[Document] update readme.md

1. add readme.md file for tensor-aggregator
2. fix typo in tensor-converter

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorSplit] Add testcases
jijoong.moon [Wed, 29 Aug 2018 08:04:25 +0000 (17:04 +0900)]
[TensorSplit] Add testcases

In order to check the tensor_split plugin, testcases are added.

**Changes proposed in this PR:**
- Add 3 tensor split test cases from file source
- Add 3 tensor split test cases from multiplefile sources

**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>
6 years ago[Transform] Add Arithmetic Mode
jijoong.moon [Thu, 6 Sep 2018 22:41:59 +0000 (07:41 +0900)]
[Transform] Add Arithmetic Mode

In addition to typecast and dimchg, we may need simple arithmetic for
element by element in tensor. For example, we need to add or
multiplicate a centain constant to element by element to scale. In
order to cover the requirement another mode called "arithmetic" is
added. The option for the this arithmetic mode is
"(operation):(constnat number)" such as "mul:2.0, add:-128".

"mode=arithmetic, option=add:-128"

One thing we should aware is that we do not gurantee the type of
tensor after the arithmetic operation. For the case of multiplication
with float type to the uint8_t type tensor, the output type should be
float. But in the mode, uint8_t is the type from this mode. That
means the type of output from this mode is always same with input type
of tensor. The user should aware of this and use this mode with
caution.

**Changes proposed in this PR:**
- arithmetic mode is added

Resolves:

**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>
6 years ago[Common/Refactor] Remove rank from pad cap
MyungJoo Ham [Mon, 10 Sep 2018 02:41:10 +0000 (11:41 +0900)]
[Common/Refactor] Remove rank from pad cap

- Remove rank from pad cap of other/tensor and other/tensors
- Remove dependencies on rank info from plugins

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Documentation] Update README.md entry for tensor_filter
MyungJoo Ham [Fri, 7 Sep 2018 06:27:51 +0000 (15:27 +0900)]
[Documentation] Update README.md entry for tensor_filter

Addressing #490, this adds more information about tensor_filter.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Documentation] Add README.md entry for tensor_decoder
MyungJoo Ham [Wed, 5 Sep 2018 09:52:53 +0000 (18:52 +0900)]
[Documentation] Add README.md entry for tensor_decoder

This add the new README.md for tensor_decoder.

As partial solution of #490, this follows the format of other #490 related commits

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Documentation] Update the root README.md
MyungJoo Ham [Wed, 5 Sep 2018 07:26:43 +0000 (16:26 +0900)]
[Documentation] Update the root README.md

- Updated the developmental status of each element.
- Updated URLs
- The whole document is revised.
- The component list is detached from the root. (per the comment of @leemgs)

Partially addressing #490.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Common] Refactor num tensors range of other/tensors
MyungJoo Ham [Mon, 10 Sep 2018 02:34:57 +0000 (11:34 +0900)]
[Common] Refactor num tensors range of other/tensors

With default Gstreamer, it is [1, 16], not [1, 65535]

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Convert] refactor tensor-converter
Jaeyun [Wed, 5 Sep 2018 09:05:05 +0000 (18:05 +0900)]
[Convert] refactor tensor-converter

refactor tensor-converter with gst-adapter, so that this plugin can aggregate the frames.

1. change properties
- add frames-per-tensor to set the number of frames in output tensor
- remove force-memcpy, frames-per-buffer
2. fixed size of string type (GST_TENSOR_STRING_SIZE)
3. remove media format and type in GstTensorConfig
4. add simple testcases to test media stream and data aggregation using tensor-sink

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Test] set lib path
Jaeyun [Fri, 7 Sep 2018 10:18:18 +0000 (19:18 +0900)]
[Test] set lib path

1. set lb_lib_path before starting unittest
2. fix typo in cmake

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Aggregator] fix output tensor dimension and timestamp
Jaeyun [Wed, 5 Sep 2018 05:23:44 +0000 (14:23 +0900)]
[Aggregator] fix output tensor dimension and timestamp

1. add property to set the index of frames in tensor dimension.
2. add pad query function for caps negotiation.
3. set timestamp to push a buffer to src pad

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorSplit] Complete TensorSplit Implementation
jijoong.moon [Tue, 28 Aug 2018 22:48:00 +0000 (07:48 +0900)]
[TensorSplit] Complete TensorSplit Implementation

Complete TensorSplit Implementation.
- Adding chain function
  . Create pad to push downstream
  . Create GstMemory and insert into GstBuffer

**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>
6 years ago[unittest] Remove dependency
sewon.oh [Fri, 7 Sep 2018 02:25:19 +0000 (11:25 +0900)]
[unittest] Remove dependency

To check unit test coverage, need 'taos-ci-unittest-coverage' package.
But this package is not provided 'download.tizen.org' so remove that package and add 'unittest.py' file, lcov package.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years agoUpdate CODE_OF_CONDUCT.md
MyungJoo Ham [Tue, 4 Sep 2018 10:14:10 +0000 (19:14 +0900)]
Update CODE_OF_CONDUCT.md

This creates CODE OF CONDUCT for nnstreamer, targetting external contributors.
Based on the base CoC template of github.com, I've added "contributors' responsibilities".

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Documentation] Update README.md of converter
MyungJoo Ham [Wed, 5 Sep 2018 09:21:51 +0000 (18:21 +0900)]
[Documentation] Update README.md of converter

- Updated the status of converter.
- Added more information for converter.

Addressing #490

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[CODEOWNERS] Update for github.com migration
MyungJoo Ham [Wed, 5 Sep 2018 10:46:19 +0000 (19:46 +0900)]
[CODEOWNERS] Update for github.com migration

The usernames at github.com are different from our internal github repo.
Update CODEOWNERS accordingly.

Fixes #497

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Convert/Test] Add test cases for the GRAY8 color format
Wook Song [Mon, 3 Sep 2018 07:56:07 +0000 (16:56 +0900)]
[Convert/Test] Add test cases for the GRAY8 color format

This patch adds test cases for the 8-bit grayscale video format (i.e.,
video/x-raw,format=GRAY8).

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Test F/W] Update tools in the test framework to support GRAY8
Wook Song [Mon, 3 Sep 2018 07:40:37 +0000 (16:40 +0900)]
[Test F/W] Update tools in the test framework to support GRAY8

This patch updates gen24bBMP.py, which generates BMP files for the
testcases, and testAPI.sh, which is a helper tool for the unit tests, to
support the newly added color format, GRAY8.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Test F/W] Modify bmp2png to support converting from GRAY8 BMP
Wook Song [Mon, 3 Sep 2018 05:54:48 +0000 (14:54 +0900)]
[Test F/W] Modify bmp2png to support converting from GRAY8 BMP

This patch modifies the bmp2png tool to support converting from 8-bit
grayscale BMP to 8-bit grayscale PNG. To use this feature, it is
required to provide the second command line option '--GRAY8' with no
argument.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Common] Support GRAY8, the 8-bit grayscale video format
Wook Song [Fri, 31 Aug 2018 07:30:21 +0000 (16:30 +0900)]
[Common] Support GRAY8, the 8-bit grayscale video format

This patch adds support for the 8-bit grayscale video format, GRAY8.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Decode] remove dependency of media type in tensor config
Jaeyun [Tue, 4 Sep 2018 10:59:16 +0000 (19:59 +0900)]
[Decode] remove dependency of media type in tensor config

Updates tensordec before removing media type and format in GstTensorConfig structure

1. add property to set output media type
2. add functions for media caps
 - some functions in tensor_common will be removed

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[config] Updated the existing configuration files for TAOS-CI
Geunsik Lim [Tue, 4 Sep 2018 06:56:50 +0000 (15:56 +0900)]
[config] Updated the existing configuration files for TAOS-CI

This commit is to update the existing configuration files for TAOS-CI because
the files are out-of-date.

**Changes proposed in this PR:**
1. Added webhook configuration file
2. Updated out-of-date configuration files
3. Updated default variables in the configuration files
4. Removed license contents in configuration files to avoid license issue

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
6 years ago[Style Fix] Indentation Error Fix.
MyungJoo Ham [Tue, 4 Sep 2018 10:26:31 +0000 (19:26 +0900)]
[Style Fix] Indentation Error Fix.

As the CI system returns, we got unchecked style error.
Fixes CI style error found with PR #487

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter] Fix CMake Build Bug
jijoong.moon [Mon, 3 Sep 2018 02:06:00 +0000 (11:06 +0900)]
[Filter] Fix CMake Build Bug

When DISABLE_TENSORFLOW_LITE=ON or DISABLE_TENSORFLOW=ON, it is not
working becasue of the wrong CMakeList.txt.

**Changes proposed in this PR:**
- Fix IF-ENDIF statement in CMakeList.txt

**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>
6 years ago[TensorSplit] Add Set/Get Properties
jijoong.moon [Tue, 28 Aug 2018 01:27:17 +0000 (10:27 +0900)]
[TensorSplit] Add Set/Get Properties

In order to get/set tensor split size, TENSORSEG property is added. To
Manupilate set and get properties function is modified.

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Filter] make filter available handling multi tensor
HyoungjooAhn [Thu, 30 Aug 2018 08:37:30 +0000 (17:37 +0900)]
[Filter] make filter available handling multi tensor

get rid of set the index 0 and make it iteration

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[Aggregator] initial commit
Jaeyun [Wed, 29 Aug 2018 08:05:43 +0000 (17:05 +0900)]
[Aggregator] initial commit

Plugin to aggregate tensor stream. (used gst-adapter)

1. add properties to set output frames
 - frames-in : number of frames in input buffer
 - frames-out : number of frames in output buffer
 - frames-flush : number of frames to flush data

2. testcase (stream with aggregater) will be added soon.

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

related issue : #474 [Advanced Queueing] Support aggregation

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years agoChange file extension
Sung-Jae Lee [Thu, 30 Aug 2018 14:35:15 +0000 (23:35 +0900)]
Change file extension

* add `*.md` extension to CONTRIBUTING document to display properly on
 github

Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
6 years ago[Example] Add a tensor_filter application for performance profiling
Wook Song [Tue, 28 Aug 2018 02:27:58 +0000 (11:27 +0900)]
[Example] Add a tensor_filter application for performance profiling

This patch adds a NNStreamer example application (based on tensor_filter
using Tensorflow Lite) for performance profiling.

Signed-off-by: Wook Song <wook16.song@samsung.com>
6 years ago[Filter] Modify property dimension to get tensors format
jijoong.moon [Wed, 22 Aug 2018 00:20:59 +0000 (09:20 +0900)]
[Filter] Modify property dimension to get tensors format

In order to get tensors format, set & get properties in filter should
be changed. It takes "1:640:480:3,1:100:100:3". It counts the rank of
each tensor and number of tensor in tensors as well.

**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>
6 years ago[TensorSplit] Skeleton to split tensor into multiple tensor
jijoong.moon [Mon, 27 Aug 2018 01:53:02 +0000 (10:53 +0900)]
[TensorSplit] Skeleton to split tensor into multiple tensor

In order to split tensor to multiple tensor, tensor_split is
requried. It take one big tensor as an input and push the multiple
smale tensor segment to downstream according to segment option.

This PR indlucdes skeleton of tensor split.

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Convert/Decode] support text type (text/x-raw)
jy1210.jung [Fri, 24 Aug 2018 05:01:17 +0000 (14:01 +0900)]
[Convert/Decode] support text type (text/x-raw)

1. add code to support string (text/x-raw,format=utf8)
2. update transform buffer size (passes received size)
3. change code to get raw caps from string
4. add simple stream test using tensor sink

related issue : #305

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Sink/Example] update example for text stream
jy1210.jung [Fri, 24 Aug 2018 04:49:09 +0000 (13:49 +0900)]
[Sink/Example] update example for text stream

1. add code to test text stream
2. remove max-lateness (default -1 unlimited time)
3. update comments for changed code

related issue : #305

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Common] add int64/uint64 type
Jaeyun [Mon, 20 Aug 2018 09:53:00 +0000 (18:53 +0900)]
[Common] add int64/uint64 type

1. add type for int64, uint64
2. update unittest for tensor type
3. update comments for changed code

related issue : #304

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Doc] add link to examples wiki page
jy1210.jung [Tue, 21 Aug 2018 08:30:32 +0000 (17:30 +0900)]
[Doc] add link to examples wiki page

[how-to-run-examples.md]
link to examples wiki page (nnsuite/nnstreamer)

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Decode] support audio
jy1210.jung [Fri, 17 Aug 2018 07:22:45 +0000 (16:22 +0900)]
[Decode] support audio

1. added audio format
2. code refactoring
 - add macro for debug message
 - use common functions to set tensor and media caps

Needs to check later : test with debug message (set silent=false)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/TF] Skeleton for Tensorflow support
jijoong.moon [Thu, 2 Aug 2018 02:54:48 +0000 (11:54 +0900)]
[Filter/TF] Skeleton for Tensorflow support

Add Skeleton code to support tensorflow model

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

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Filter/TF-Lite] add a variable to store in/out tensor rank
HyoungjooAhn [Thu, 16 Aug 2018 05:33:48 +0000 (14:33 +0900)]
[Filter/TF-Lite] add a variable to store in/out tensor rank

the TfLiteCore class will hold the rank information of each tensors

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[Filter/TF-Lite] update tflite core to hold model datas
HyoungjooAhn [Thu, 16 Aug 2018 01:54:23 +0000 (10:54 +0900)]
[Filter/TF-Lite] update tflite core to hold model datas

the tflite core class hold and manage the model information likes dimensions, size, types of each tensor.

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[Filter] change properties for one tensors to array
HyoungjooAhn [Thu, 9 Aug 2018 11:03:46 +0000 (20:03 +0900)]
[Filter] change properties for one tensors to array

for now, the first index(0) will be used before multi tensor environment

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[Convert] initial commit to support audio format
jy1210.jung [Fri, 10 Aug 2018 06:15:08 +0000 (15:15 +0900)]
[Convert] initial commit to support audio format

1. supported audio format : S8, U8, S16LE, S16BE, U16LE, U16BE
2. add property for frames to set tensor dim (frames-per-buffer)
 - if frames-per-buffer is 0, tensor-converter sets sample rate into [frames]
3. code refactoring (add macros for debug, remove duplicated)
4. change property name and flags
5. add simple testcase for audio format

related issue : #350

needs discussion (later work)
 - audio tensor dim ([channels][frames] or [frames])
   In this PR, just added [channels][frames]
 - how to set the frames in buffer (samples count per buffer)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Sink] update test example / macro for debug
jy1210.jung [Tue, 7 Aug 2018 11:32:07 +0000 (20:32 +0900)]
[Sink] update test example / macro for debug

1. add test pipeline to test audio stream in sink example
   (default type 0 for video stream)
2. add definition for debug
3. fix pad caps for other/tensors

Do not use GstStaticCaps and gst_static_caps_get() as local variable

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Common] add method to get media type / macro for caps
jy1210.jung [Tue, 7 Aug 2018 09:51:05 +0000 (18:51 +0900)]
[Common] add method to get media type / macro for caps

1. add common method to get media type from caps (video and audio type)
2. add macro for tensor cap definition

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/TF-Lite] remove unnecessary code
jy1210.jung [Wed, 1 Aug 2018 12:28:20 +0000 (21:28 +0900)]
[Filter/TF-Lite] remove unnecessary code

1. use interpreter inputs() / outputs() to get input/output tensor index
list
2. add debug logs to print tensor dim and type

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Performance/profile] Implement profile feature
sewon.oh [Thu, 2 Aug 2018 03:58:14 +0000 (12:58 +0900)]
[Performance/profile] Implement profile feature

You can know time and cpu usage in pipeline using same command './testAll.sh 1'.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[CMAKE] Cleanup the cmake files
Sangjung woo [Fri, 3 Aug 2018 06:11:17 +0000 (15:11 +0900)]
[CMAKE] Cleanup the cmake files

* Remove redundant minimum required version checker in CMakeLists
* Move 'ADD_SUBDIRECTORY' statements as a single block to imporve
  readability

Signed-off-by: Sangjung woo <sangjung.woo@samsung.com>
6 years ago[README] Update readme, remove internal links.
MyungJoo Ham [Thu, 2 Aug 2018 00:16:04 +0000 (09:16 +0900)]
[README] Update readme, remove internal links.

- Remove an internal link for github.com users
- Add some notes on temporarily unavailable items.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Common] Add and refactor common functions
MyungJoo Ham [Tue, 31 Jul 2018 09:38:52 +0000 (18:38 +0900)]
[Common] Add and refactor common functions

- Added common metadata type for other/tensors
- Added GstStructure --> other/tensors meta data conversion
- Refactored GstCaps --> other/tensor meta data conversion

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter/Main] Fix memerr (dangling pointer)
MyungJoo Ham [Tue, 31 Jul 2018 10:55:52 +0000 (19:55 +0900)]
[Filter/Main] Fix memerr (dangling pointer)

An object was not freed and dangling around.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Sink] add testcase about negotiated caps
jy1210.jung [Tue, 31 Jul 2018 02:56:48 +0000 (11:56 +0900)]
[Sink] add testcase about negotiated caps

1. add tc to check negotiated caps (other/tensor, other/tensors)
2. change plugin path for unittest

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[other/tensorsave] Update header format
MyungJoo Ham [Mon, 30 Jul 2018 05:44:38 +0000 (14:44 +0900)]
[other/tensorsave] Update header format

Add "name" for each other/tensor in other/tensorsave.

This will be a "comment" that won't be used by nnstreamer
for a while, but later, this may be used by demuxer/tensorpick.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Demux] Fix test break when performance option=1
sewon.oh [Tue, 31 Jul 2018 02:42:59 +0000 (11:42 +0900)]
[Demux] Fix test break when performance option=1

occur segmentation error when testing
```bash
nnstreamer/tests $ ./testAll.sh 1
0:00:00.025194169 21004 0x7f47b0002d90 DEBUG            tensordemux gsttensordemux.c:437:gst_tensor_demux_chain:<demux>  Number or Tensors: 1
0:00:00.025209492 21004 0x7f47b0002d90 DEBUG            tensordemux gsttensordemux.c:307:gst_get_tensor_pad:<demux> createing pad: 0(0th)

****** skip ********

0:00:00.008473223 21133      0x1b51e80 DEBUG            tensordemux gsttensordemux.c:488:gst_tensor_demux_chain:<demux> pushing buffer with timestamp 99:99:99.999999999
Caught SIGSEGV
Spinning.  Please run 'gdb gst-launch-1.0 21170' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
```

I guess that cause is to typecast integer pointer to char pointer without converting.
This is temporary fix.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Sink] update pad template
jy1210.jung [Mon, 30 Jul 2018 10:22:38 +0000 (19:22 +0900)]
[Sink] update pad template

prepare tensors caps,
1. add function to merge tensor caps
2. set sink pad caps (other/tensor, other/tensors)

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/Custom/Example] Fix scaler-alloc type bug
MyungJoo Ham [Mon, 30 Jul 2018 05:12:32 +0000 (14:12 +0900)]
[Filter/Custom/Example] Fix scaler-alloc type bug

The pointer locations didn't count the effect of element size.

Fixes #193

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[DIST] Install gst plugins to gst directory
MyungJoo Ham [Mon, 30 Jul 2018 01:25:20 +0000 (10:25 +0900)]
[DIST] Install gst plugins to gst directory

The install path for gst plugins are not %{_libdir}.
It's %{_libdir}/gstreamer-1.0

We need to use gstreamer convention.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TEST] shorten length of path to plugin
sewon.oh [Fri, 27 Jul 2018 05:45:17 +0000 (14:45 +0900)]
[TEST] shorten length of path to plugin

Got an idea by @jijoong-moon @myungjoo-ham
Only use top-level directory path.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Release] Version 0.0.1 v0.0.1
MyungJoo Ham [Fri, 27 Jul 2018 04:51:04 +0000 (13:51 +0900)]
[Release] Version 0.0.1

As the basic requirement (stream app with camera and single-tensor output tf-lite model)
is fulfilled finally with #360, we hereby announce the release of 0.0.1.

We will move on to 0.0.2-rc1 after this.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[TensorDemux] Add multiple tensor choose testcase
jijoong.moon [Thu, 26 Jul 2018 02:38:55 +0000 (11:38 +0900)]
[TensorDemux] Add multiple tensor choose testcase

Add testcases to evaluate mutiple tensor choose

**Changes proposed in this PR:**
- Added testcase
  . "tensorpick=1,2" among 3 png sink mux and demux
  . "tensorpick=0,2" among 3 png stream sink mux and demux

**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>
6 years ago[Example] change video sink and update document
jy1210.jung [Fri, 27 Jul 2018 03:52:08 +0000 (12:52 +0900)]
[Example] change video sink and update document

1. change video sink (xvimagesink > ximagesink)
2. update guide document
 - sync to wiki page
 - add tflite model link
3. add qos message for debug (filter example)

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/TF-Lite] upload the unittest with test data
HyoungjooAhn [Thu, 26 Jul 2018 11:40:04 +0000 (20:40 +0900)]
[Filter/TF-Lite] upload the unittest with test data

the model will detect the image file and the result will be compared with the label

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[TEST] Fix find command for checking library
sewon.oh [Thu, 26 Jul 2018 10:05:49 +0000 (19:05 +0900)]
[TEST] Fix find command for checking library

```bash
$ find "$dirpath/../build/gst/tensor_converter" "$dirpath/../build/gst/tensor_filter" "$dirpath/../build/gst/tensor_decoder" -name *.so 1>/dev/null 2>/dev/null
```
If the folder path is correct, above command always return 0.
So I change command to return 1 when there is *.so.

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[TensorDemux] Eabling multiple tensor choose
jijoong.moon [Thu, 26 Jul 2018 01:47:35 +0000 (10:47 +0900)]
[TensorDemux] Eabling multiple tensor choose

There might be a case to choose multiple tensors at once. For example,
if 1st and third tensors are needed among 5tensors, we could do this
with "tensorpick=0,2" (the number starts from 0).

**Changes proposed in this PR:**
- Changed tensorpick property in tensor demux
- Changed get & set property
- Changed chain loop to identify right tensor to push

Resolves: 333

**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>
6 years ago[Performance/debug] Implement debug feature
sewon.oh [Fri, 20 Jul 2018 05:38:08 +0000 (14:38 +0900)]
[Performance/debug] Implement debug feature

- Make png file about pipeline when run ./testAll.sh

Signed-off-by: Sewon Oh <sewon.oh@samsung.com>
6 years ago[Documentation] Add tensormux/tensordemux in README.md
jijoong.moon [Thu, 26 Jul 2018 08:27:16 +0000 (17:27 +0900)]
[Documentation] Add tensormux/tensordemux in README.md

Add Mux & Demux in Gstreamer Elements(Plugins)

**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>
6 years ago[TensorDemux] Add TensorPick Testcases
jijoong.moon [Wed, 25 Jul 2018 23:26:30 +0000 (08:26 +0900)]
[TensorDemux] Add TensorPick Testcases

Add Test cases to evaluate tensorpick option

**Changes proposed in this PR:**
- Added 3 png -> 3 sink -> tensor mux -> 1 source -> tensors -> tensor
demux (tensorpick=1) -> one source -> first tensor
- Added 3 png -> 3 sink -> tensor mux -> 1 source -> tensors -> tensor
demux (tensorpick=2) -> one source -> second tensor
- Added 3 png stream (10) -> 3 sink -> tensor mux -> 1 source ->
tensors stream -> tensor demux (tensorpick=1) -> one source -> first
tensor stream
- Added 3 png stream (10) -> 3 sink -> tensor mux -> 1 source ->
tensors stream -> tensor demux (tensorpick=2) -> one source -> second
tensor stream

Resolves: 333

**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>
6 years ago[TensorDemux] Add Testcases
jijoong.moon [Wed, 25 Jul 2018 02:41:18 +0000 (11:41 +0900)]
[TensorDemux] Add Testcases

Add Testcases to evaluate

- png image -> mux -> tensors -> demux -> srcs -> filesink
 . One png image - Single Sink - Tensors - Single Source
 . Two png image - Two Sink - Tensors - Two Sources
 . Three png image - Three Sink - Tensors - Tree Sources

- png image stream -> mux -> tensors -> demux -> srcs -> filesink
 . One png stream (10) - Single Sinks(mux) - Tensors - Single Source (demux)
 . Two png stream (10) - Two Sinks(mux) - Tensors - Two Sources (demux)
 . Three png stream (10) - Three Sinks(mux) - Tensors - Tree Sources (demux)
 . Four png stream (10) - Four Sinks(mux) - Tensors - Four Sources(demux)

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[TensorDemux] Pick tensor among tensors to push down stream
jijoong.moon [Wed, 25 Jul 2018 23:09:59 +0000 (08:09 +0900)]
[TensorDemux] Pick tensor among tensors to push down stream

Sometimes, there is the case which only one tensor is useful to push
downstream among tensors. In this case, tensorpick option variable
could be used. It is integer variable indicated the order of
tensors. For example, we want 0th tensor among tensors, we could use
"tensorpick=0".

- PROP_TENSORPICK property is added
- mondify the code to choose nth tensor

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[TensorDemux] Implement Chain function
jijoong.moon [Wed, 25 Jul 2018 00:33:08 +0000 (09:33 +0900)]
[TensorDemux] Implement Chain function

Add chain function to create source pad for each tensor in tensors. In
order to do it, created source pad is stored in srcpads list and
compared with order of tensor to identify if created one or not.

- Add gst_tensor_demux_chain
- Add gst_get_tensor_pad
- Add gst_tensor_demux_event
- Add gst_tensor_demux_get_capsparam

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Example] change log format
jy1210.jung [Wed, 25 Jul 2018 11:55:55 +0000 (20:55 +0900)]
[Example] change log format

f-string supported from python3.6, so simply changed log format.

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Filter/TF-Lite] reverse the array for CAPS negotiation
HyoungjooAhn [Tue, 24 Jul 2018 10:31:25 +0000 (19:31 +0900)]
[Filter/TF-Lite] reverse the array for CAPS negotiation

return the reversed array: the dimension of the input tensor. Adding time profiling code at TFLiteCore

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[Load] Add skeleton code for tensor_load
MyungJoo Ham [Tue, 24 Jul 2018 08:13:49 +0000 (17:13 +0900)]
[Load] Add skeleton code for tensor_load

tensor_load element will convert other/tensorsave to other/tensors
or other/tensor

Prepares #322

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Tensorsave] Findtype file format definition.
MyungJoo Ham [Mon, 23 Jul 2018 23:34:59 +0000 (08:34 +0900)]
[Tensorsave] Findtype file format definition.

To allow save tensors as files with its medata in tact,
we define "other/tensorsave" type for gstreamer.

It can be used to share tensors with non-gstreamer programs,
or used to create testcases for nnstreamer plugins.

To be completed, we need to implement load and save plugins
in gst/tensor_saveload directory.

Fixes #29

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Test/Transform] Add testcases for typecast transform
MyungJoo Ham [Fri, 20 Jul 2018 05:41:56 +0000 (14:41 +0900)]
[Test/Transform] Add testcases for typecast transform

This probides unit test cases (golden tests) for
typecast transform.

Fixes #306

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Transform] Add "Typecast" operation
MyungJoo Ham [Fri, 20 Jul 2018 05:40:31 +0000 (14:40 +0900)]
[Transform] Add "Typecast" operation

In case a DL model uses different types for tensor elements,
we need to apply "type cast" to the tensor streams.

Fixes #306

Tested with a few test cases, which will be in another commit.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[DIST] Calculate test coverage after executing unit tests.
MyungJoo Ham [Tue, 24 Jul 2018 06:16:57 +0000 (15:16 +0900)]
[DIST] Calculate test coverage after executing unit tests.

We have moved shellscript-based tests to %install section
because of LD_LIBRARY_PATH/RPATH issue.

Thus, unit-test-coverage discovering code should move to
%install as well.

Fixes #324

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Root Doc] Add CONTRIBUTING
MyungJoo Ham [Tue, 24 Jul 2018 04:34:00 +0000 (13:34 +0900)]
[Root Doc] Add CONTRIBUTING

Github wants CONTRIBUTING file:
https://help.github.com/articles/setting-guidelines-for-repository-contributors/

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter/Custom/Example] Updated doxygen entries
MyungJoo Ham [Thu, 19 Jul 2018 05:46:30 +0000 (14:46 +0900)]
[Filter/Custom/Example] Updated doxygen entries

To avoid CI-doxygen errors, added a few doxygen entries.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter/Custom/Example] Scaler type bug fixed
MyungJoo Ham [Thu, 19 Jul 2018 05:40:46 +0000 (14:40 +0900)]
[Filter/Custom/Example] Scaler type bug fixed

Scaler had a bug that didn't work properly if element size if not 1.

Fixes #276

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Example] update buffer data (filter example)
jy1210.jung [Mon, 23 Jul 2018 07:47:08 +0000 (16:47 +0900)]
[Example] update buffer data (filter example)

Add code to update label string from passed buffer.
1. update textoverlay with max score
2. update python example and document

Error to be fixed later: cannot link converter and filter.
To fix this issue, change tflite dim for caps negotication.

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[TensorDemux] Add Skelton for TensorDemux
jijoong.moon [Mon, 23 Jul 2018 07:18:28 +0000 (16:18 +0900)]
[TensorDemux] Add Skelton for TensorDemux

In order to demux tensors, the TensorDemux is added.
This is the first implementaion of TensorDemux.

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Filter/tflite]Initialize privateData and set idx by tflite core api
jinhyuck [Sun, 22 Jul 2018 23:33:11 +0000 (08:33 +0900)]
[Filter/tflite]Initialize privateData and set idx by tflite core api

Initialize privateData and set idx by tflite core api "tflite_core_getInputSize()"

Signed-off-by: jinhyuck <jinhyuck83.park@samsung.com>
6 years ago[TensorMux] Add Tensor Mux Steam Input Test Cases
jijoong.moon [Fri, 20 Jul 2018 05:18:20 +0000 (14:18 +0900)]
[TensorMux] Add Tensor Mux Steam Input Test Cases

In order to evaluate, stream input test cases are added.

- Stream Input + 1 Sink Pad
- Stream Input + 2 Sink Pads
- Stream Input + 3 Sink Pads
- Stream Input + 4 Sink Pads

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Example] init tflite model
jy1210.jung [Fri, 20 Jul 2018 05:08:56 +0000 (14:08 +0900)]
[Example] init tflite model

prepare example of tflite filter,
1. add code to check tflite model file and load labels
2. prepare to handle buffer passed to sink element
3. change pipeline for tflite model (224x224 frame)

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

6 years ago[TensorMux] Code rewriting with GstCollectPads
jijoong.moon [Fri, 20 Jul 2018 01:27:57 +0000 (10:27 +0900)]
[TensorMux] Code rewriting with GstCollectPads

In order to dealing wiht input stream, it is better to use
GstCollectPads. Therefore most of the codes are rewritten and
restructured.

Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
6 years ago[Test] move methods to generate test img
jy1210.jung [Thu, 19 Jul 2018 09:47:33 +0000 (18:47 +0900)]
[Test] move methods to generate test img

to remove duplicated methods (for generating bmp) in testcase, move all
generating functions to gen24bBMP.py.

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

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
6 years ago[Tests] Fix bug, errors ignored
MyungJoo Ham [Wed, 18 Jul 2018 06:57:48 +0000 (15:57 +0900)]
[Tests] Fix bug, errors ignored

Bug:
- When there is no log files, a test results in "PASSED"
- When there is differences between golden and test, the result sasy "PASSED"

Fixes #275

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter/tflite]Add tensorflow lite method with core apis
jinhyuck [Thu, 19 Jul 2018 07:37:39 +0000 (16:37 +0900)]
[Filter/tflite]Add tensorflow lite method with core apis

add tensorflow lite sub plugin method by calling tensorflow lite core apis
in cpp file of tensor flow lite

Signed-off-by: jinhyuck <jinhyuck83.park@samsung.com>
6 years ago[GIT] Add bmp file to .gitignore
sewon.oh [Thu, 19 Jul 2018 07:04:42 +0000 (16:04 +0900)]
[GIT] Add bmp file to .gitignore

Ignore bmp file created by tests

Signed-off-by: sewon.oh <sewon.oh@samsung.com>
6 years ago[Documentation] Update getting-started.
MyungJoo Ham [Thu, 19 Jul 2018 02:22:12 +0000 (11:22 +0900)]
[Documentation] Update getting-started.

As we now depend on tensorflow-lite-dev, update
pdebuild configuration accordingly.

Fixes #269

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Filter/TF-Lite] update the methods for get in/out dimension of tensors
HyoungjooAhn [Wed, 18 Jul 2018 07:48:17 +0000 (16:48 +0900)]
[Filter/TF-Lite] update the methods for get in/out dimension of tensors

1. by using memcpy, improve the robustness
2. when upper layer call get in/output tensor dimension, return data type of tensor rather than length. because the length is fixed with NNS_TENSOR_RANK_LIMIT

Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
6 years ago[Mux] Fix build break during merging asynchronously.
MyungJoo Ham [Thu, 19 Jul 2018 04:56:13 +0000 (13:56 +0900)]
[Mux] Fix build break during merging asynchronously.

Resolves conflicts between #300 and #283

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[Test] Remove dependencies on PIL and .tar.gz files
MyungJoo Ham [Thu, 12 Jul 2018 11:17:04 +0000 (20:17 +0900)]
[Test] Remove dependencies on PIL and .tar.gz files

To remove build dependencies on PIL,
we implement bmp-write in the test framework.

Then, the test script will convert BMP to PNG with
bmp2png implementation based on libpng.

This eliminates all fancy dependencies
not portable to embedded SW platforms.

Fixes #266

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
6 years ago[CMAKE] Set timeout property in ctest.
sewon.oh [Mon, 16 Jul 2018 10:02:51 +0000 (19:02 +0900)]
[CMAKE] Set timeout property in ctest.

To prevent ctest from getting too long, set timeout property value to 120seconds.

Add more hint.

Resolves: #284

Signed-off-by: sewon.oh <sewon.oh@samsung.com>