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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
MyungJoo Ham [Mon, 16 Jul 2018 09:07:06 +0000 (18:07 +0900)]
[Code Clean] Comments Cleaned Up
This is part of #169
A few comment lines were cleaned up (Style Fixes)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 16 Jul 2018 08:17:58 +0000 (17:17 +0900)]
[Code Clean] Use common function / Remove unnecessary code
- Use get_tensor_from_padcap to read tensor info from padcap.
- Expand the capability of get-tensor_from_padcap for framerate.
- Remove nnfw_support_status
This is start of #169
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 18 Jul 2018 08:08:55 +0000 (17:08 +0900)]
[Example Apps] Build example apps out of nnstreamer context
Build example_* apps in tizen build environment without nnstreamer
build environment as if nnstreamer is already in Tizen and
the apps are regular Tizen apps.
In order to do this:
- Add nnstreamer_testapp.spec: try gbs build --spec nnstreamer_testapp.spec to build test apps only
- Add INSTALL_EXAMPLE_APP option to install example apps optionally.
- Add tizen_app_build_example CMakeLists.txt to build example apps seperatedly.
- Added format dependencies on gstreamer-app-1.0
With this we can ensure that nnstreamer-based apps can be built completely without nnstreamer source codes and we can verify packaging of nnstreamer-devel.
Fixes #262 for Tizen.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Wed, 18 Jul 2018 04:40:54 +0000 (13:40 +0900)]
[Test/Example] add python example / code clean
1. add python example to link nnstreamer plugin
2. update document to run examples
3. remove unnecessary code
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
jijoong.moon [Tue, 17 Jul 2018 10:29:17 +0000 (19:29 +0900)]
[TensorMux] Append GstMemory according to the setcaps order
There was potential bugs due to saving without considering setcaps
order. Previously, the tensors meta is not consisitent with saving
GstMemory in outbut buffer. Because it was not considered the order of
save GstMemory from sink. Mostly it is because gstreamer is working by
asynchronous manner. Therefore _get_tensor_order which give right
order to save is added.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
HyoungjooAhn [Tue, 17 Jul 2018 10:27:18 +0000 (19:27 +0900)]
[Filter/TF-Lite] make model path as const
changing model path at tflite core is prevented by using const
Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
jijoong.moon [Tue, 17 Jul 2018 08:09:05 +0000 (17:09 +0900)]
[TensorMux] Remove lock in tensor_meta
There is no need to have lock in tensor_meta. Therefore remove them.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Geunsik Lim [Tue, 17 Jul 2018 07:29:05 +0000 (16:29 +0900)]
[debuild/pdebuild] Enable a parallel build by default for debuild command
* Resolves: issue #284 (sub-issue 1. -j1)
This commit is to enable a parallel build for debuild command by default.
According to debhelper manual:
If your package can be built in parallel,
please either use compat 10 or pass --parallel to dh. Then dpkg-buildpackage -j will work.
* https://manpages.debian.org/testing/debhelper/dh.1.en.html
**How to evaluate:**
* debuild
```bash
export DEB_BUILD_OPTIONS='parallel=8' ; time debuild -us -uc ; export DEB_BUILD_OPTIONS=""
```
* pdebuild
```bash
export DEB_BUILD_OPTIONS='parallel=8' ; time pdebuild ; export DEB_BUILD_OPTIONS=""
```
**Self assessment:**
* 1. before this PR:
```bash
make[2]: Leaving directory '/var/www/temp-archive/nnstreamer/build'
/usr/bin/cmake -E cmake_progress_start /var/www/temp-archive/nnstreamer/build/CMakeFiles 0
make[1]: Leaving directory '/var/www/temp-archive/nnstreamer/build'
dh_auto_test -O--buildsystem=cmake -O--builddirectory=build -O--parallel
make -j1 test ARGS\+=-j1
make[1]: Entering directory '/var/www/temp-archive/nnstreamer/build'
Running tests...
/usr/bin/ctest --force-new-ctest-process -j1
Test project /var/www/temp-archive/nnstreamer/build
Start 1: unit_test
```
* 2. after this PR:
```bash
make[2]: Leaving directory '/var/www/temp-archive/nnstreamer/build'
/usr/bin/cmake -E cmake_progress_start /var/www/temp-archive/nnstreamer/build/CMakeFiles 0
make[1]: Leaving directory '/var/www/temp-archive/nnstreamer/build'
dh_auto_test -O--buildsystem=cmake -O--builddirectory=build -O--parallel
make -j8 test ARGS\+=-j8
make[1]: Entering directory '/var/www/temp-archive/nnstreamer/build'
Running tests...
/usr/bin/ctest --force-new-ctest-process -j8
Test project /var/www/temp-archive/nnstreamer/build
Start 1: unit_test
```
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
sewon.oh [Tue, 17 Jul 2018 04:44:20 +0000 (13:44 +0900)]
[CI/config] Update CI-config files to the latest version.
update CI-config files to the latest version.
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
jijoong.moon [Fri, 13 Jul 2018 09:38:51 +0000 (18:38 +0900)]
[TensorMux] Add types varible handle
There are a lot of cases which types are differ. Therefore proper
type handling is requried when the tensors is generated.
In order to do this, gst_push_tensor is added.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Thu, 12 Jul 2018 06:17:08 +0000 (15:17 +0900)]
[Dist/Debian] Enable tensorflow-lite
Use tensorflow-lite in debian build (for Ubuntu)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jijoong.moon [Wed, 11 Jul 2018 09:13:31 +0000 (18:13 +0900)]
[TensorMux] Add 3 Test Cases
Add three test cases.
- one tensor sink pad --> mux --> tensors
- two tensor sink pads --> mux --> tensors ( two gstmem )
- three tensor sink pads --> mux --> tensors ( three gstmem )
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jy1210.jung [Fri, 13 Jul 2018 09:23:29 +0000 (18:23 +0900)]
[Example] initial commit for tensor stream from cam
prepare demo app,
1. pipeline displays video frame from cam
2. add textoverlay to indicate result
3. should update tensor filter later
Related issue #197.
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
jy1210.jung [Fri, 13 Jul 2018 07:49:41 +0000 (16:49 +0900)]
[Sink/Example] change sink caps / property
1. change sink pad caps (any > other/tensor)
2. change property type and name (signal-rate)
3. remove unnecessary functions and params
4. add testcase for caps nego failed
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
jijoong.moon [Fri, 13 Jul 2018 04:22:46 +0000 (13:22 +0900)]
[TensorMux] Remove memcopy
No need to use memcopy to make tensors buffer. gst_buffer_get_memory
is used to extract the mem from in buffer and use it after increase
ref count.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Fri, 13 Jul 2018 06:20:52 +0000 (15:20 +0900)]
[Test] Allow to execute tests of a single category.
We now can execute a single "runTest.sh" instead of
"testAll.sh"
Fixes #188
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 12 Jul 2018 10:35:32 +0000 (19:35 +0900)]
[Test] GenBMP python module
Write BMP files based on the string input.
Addresses #266 partially.
Tested with locally modified nnstreamer_converter cases.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 11 Jul 2018 04:53:41 +0000 (13:53 +0900)]
[Transform] Add testcase for dimchg, 0:b cases.
Add unittest cases for transform/dimchg where
option is 0:b.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jijoong.moon [Fri, 13 Jul 2018 05:24:55 +0000 (14:24 +0900)]
[TensorMux] Documentation of Section header in source code
Add tensromux refsec in source code
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Wed, 11 Jul 2018 05:15:14 +0000 (14:15 +0900)]
[TensorMux] Making Output buffer for tensors
After caps negotiations, we need to make tensors buffer and generate
meta for "other/tensors".
@TODO : Need better way to handle threads
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Thu, 12 Jul 2018 06:07:32 +0000 (15:07 +0900)]
[Dist] LD Path Error Fix
- Run unittest after install and set LD_LIBRARY_PATH to the install path
- Run ldconfig at install/uninstall
Fixes #246
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
HyoungjooAhn [Wed, 11 Jul 2018 11:32:59 +0000 (20:32 +0900)]
[Filter/TF-Lite] add the invoke function
the scratch invoke function is updated.
the index array has the name ~_list and the length variable has ~_len
use filling input parameter rather than return the pointer
move the real definitions code to .cc
Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
MyungJoo Ham [Thu, 12 Jul 2018 04:53:04 +0000 (13:53 +0900)]
[CMake] Fix cmake bugs
1. Use C++11 (moving to 14 is ok if you really want it)
2. Fix link direction reversal issue
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Wed, 11 Jul 2018 07:07:52 +0000 (16:07 +0900)]
[Example] update document for example
1. add videoscale example (example_cam)
2. remove unnecessary header-include (example_cam)
3. update document to build and run examples
Related issue #255.
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
MyungJoo Ham [Tue, 10 Jul 2018 10:38:17 +0000 (19:38 +0900)]
[Transform] Initial draft implementation of DIMCHG.
DIMCHG mode of tensor_tranform implemented.
Testcases will be added later.
Partially addresses #248 (need test cases to close it!)
(This code is only minimally tested with gst-launch-1.0 and vbindiff.)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 11 Jul 2018 06:15:08 +0000 (15:15 +0900)]
[Decoder] Add stream test case
Add the basic small 10-frame PNG stream test case.
Please refer to this scheme when you expand the test cases.
Fixes #160
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 11 Jul 2018 06:54:05 +0000 (15:54 +0900)]
[License] Clean up bolierplates
- Remove alternative license (MIT) from boilerplate; apply LPGL 2.0+ for all
- Shorten the license statement.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 10 Jul 2018 09:24:52 +0000 (18:24 +0900)]
[Transform] Skeleton with dimchg mode.
other/tensor result of tensor_converter from video/x-raw is
not compatible with most neural network image input dimensions.
Thus, we need tensor-transform ASAP to test with real
NN models.
This prepares such cases.
Cap negotiation codes will follow soon as another commits.
Partially addresses #248
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 11 Jul 2018 05:07:11 +0000 (14:07 +0900)]
[License] Clean up license statements
LGPL-2.1 is the default license for gst plugins.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Tue, 10 Jul 2018 10:56:36 +0000 (19:56 +0900)]
[Example] application for webcam
1. add test pipeline for webcam.
2. use video-mixer to mix two video frames.
add tensor_filter and change pipeline later.
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
jy1210.jung [Tue, 10 Jul 2018 07:59:39 +0000 (16:59 +0900)]
[Sink] update example code
1. change to video live stream test.
2. remove unnecessary element in test pipeline.
3. fix doxygen error.
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
sewon.oh [Tue, 10 Jul 2018 05:59:25 +0000 (14:59 +0900)]
[CI/Doxygen] Apply advanced rule
- Remove unused file: config-cibot.json
- Update config files for applying advanced doxygen rule
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
jijoong.moon [Tue, 10 Jul 2018 00:35:09 +0000 (09:35 +0900)]
[TensorMux] Set Capability & using private date for sink pad
Added vmthods
- gst_tesnor_mux_request_new_pad : set new sink pad & call setup
- gst_tensor_mux_release_pad : release pad
- gst_tensor_mux_setup_sinkpad : initialize pad
- gst_tensor_mux_chain : actual calculation of buffers
- gst_tensor_mux_setcaps : set capability
- gst_tensor_mux_sink_event : event handling ( cap, segment, start )
- gst_tensor_mux_dispose : dispose tensor mux
- gst_tensor_mux_change_state : state handler
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Fri, 6 Jul 2018 04:51:04 +0000 (13:51 +0900)]
[Filter] Support fixed framerate
Do not declare framerate in filter. Use whatever the input source uses.
Added 30fps stream test case for tensor_filter custom filters
Fixes #159
Fixes #240
Prepares #160
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 6 Jul 2018 05:03:00 +0000 (14:03 +0900)]
[DIST/Build] Fix bugs of tensorflow-lite on/off control
- Fixed typo
- Added compiler preprocessor definition control
- Code clean
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 5 Jul 2018 11:21:20 +0000 (20:21 +0900)]
[Filter] Allow to allocate outbuf in invoke().
Because tensorflow allocated output buffer in the tensorflow context,
allocating output buffer in gstreamer side incurs additional memcpy.
Thus, allow to generate GstBuf of Sink-Pad from the memory allocated
by filter's "invoke" method.
Fixes #161
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 6 Jul 2018 06:26:54 +0000 (15:26 +0900)]
[Test Framework] Do not printout clutters.
When everything is alright, you don't need to log such.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
sewon.oh [Fri, 6 Jul 2018 04:23:27 +0000 (13:23 +0900)]
[CI/Doxygen] Change capital letter to small letter
Capital letter doxygen tag change to small letter
Doxygen can't use /* */ and capital letter tags.
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
MyungJoo Ham [Fri, 6 Jul 2018 02:01:57 +0000 (11:01 +0900)]
[Testcase] Increase # frame to 10 from 6.
The stream test case is required to have at least 10 frames.
Increase the number of frames.
This prepares #160
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
HyoungjooAhn [Thu, 5 Jul 2018 07:54:20 +0000 (16:54 +0900)]
[Filter/TF-Lite] upload the tensorflow lite core
some of main functions are uploaded
Signed-off-by: HyoungjooAhn <hello.ahn@samsung.com>
MyungJoo Ham [Thu, 5 Jul 2018 10:10:56 +0000 (19:10 +0900)]
[Filter/Main] Allow to define dimension methods freely
Loosen dimension declaration methods conditions.
A subplugin may now define all three methods and behave
differently in runtime.
Fixes #231
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Thu, 5 Jul 2018 07:42:39 +0000 (16:42 +0900)]
[Sink] add examples for sink element
1. add simple example for data callback from sink
2. add video play example using gst app
3. update cmake (does not install sample app)
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
MyungJoo Ham [Thu, 5 Jul 2018 07:51:19 +0000 (16:51 +0900)]
[Filter] Change vmethod prototype to return outptr.
To prepare subplugin output pointer allocation (#231),
change the vmethod (invoke_NN) prototype.
This prepares #231.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
sewon.oh [Thu, 5 Jul 2018 03:12:41 +0000 (12:12 +0900)]
[CI/Build] Add armv7l build test
This commit for adding arm build test.
Add pr_comment_notice option if you want notice that value change to 1
** change logs **
Version 2:
- Change pr_commnet_notice value to 1 for notice
Version 1:
- config-environment.sh: add build and notice option
Signed-off-by: sewon.oh <sewon.oh@samsung.com>
MyungJoo Ham [Thu, 5 Jul 2018 05:19:34 +0000 (14:19 +0900)]
[Filter/Main] Add detailed doxygen entries for internal APIs
Added detailed doxygen entries for internal API users.
CC: @jinhyuck83-park @hello-ahn
Fixes #227
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jinhyuck [Thu, 5 Jul 2018 04:32:51 +0000 (13:32 +0900)]
[Filter/tflite]Add skeleton for tflite sub-plugin
add skelton code for tflite sub-plugin
"open", "close" and "setinputdimension"
Signed-off-by: jinhyuck <jinhyuck83.park@samsung.com>
MyungJoo Ham [Wed, 4 Jul 2018 10:42:31 +0000 (19:42 +0900)]
[Convert/Test] Add stream test case
Adds 6-frame 16x16 png stream test case for tensor_converter.
This shows how to create a deterministic video stream test case
for nnstreamer.
Partially addresses #160
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 5 Jul 2018 01:32:53 +0000 (10:32 +0900)]
[PkgConfig] Fix pkgconfig information
- Fix incorrect include path.
- Updated comments for better readability (for custom plugin writers)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Wed, 4 Jul 2018 07:40:02 +0000 (16:40 +0900)]
[Sink] update sink query
1. remove format query
2. block seek query
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
sewon.oh [Wed, 4 Jul 2018 06:27:32 +0000 (15:27 +0900)]
[CI/FIX] Change ci option to fix bug
This commit is to fix wrong build message and result.
- config-plugins-audit.sh: fix duplicate build running
- config-plugins-format.sh: remove unnecessary test
Signed-off-by: Sewon Oh <sewon.oh@samsung.com>
jijoong.moon [Wed, 4 Jul 2018 06:06:27 +0000 (15:06 +0900)]
[TensorMux] Skeleton for the Tensor Muxer
In oder to muxing tensors, we need tensor muxer. It takes as many as
"other/tensor" (currently 16 is max) and make it "other/tensors".
Therefore there are multiple sink pad of tensor and one source pad for
tensors.
Also we may need to enable how we concate the tensor. Maybe direction
property is needed.
- Add CMakeList.txt
- Add gsttensormux.c
- Add gsttensormux.h
- Modify nnstreamer/CMakeList.txt
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Wed, 4 Jul 2018 05:53:48 +0000 (14:53 +0900)]
[Filter/Custom/Example] Add unittest case for "Average"
Added unittest case for "Average" filter.
Fixed bug found by the unittest.
Fixes #58
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 3 Jul 2018 06:27:13 +0000 (15:27 +0900)]
[Filter/Main] Call close() when a stream stops.
Call close() when stop() vmethod is invoked.
Ensure open() when start() vmethod is invoked.
This resolves a few Valgrind memcheck errors.
Fixes #214
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 4 Jul 2018 02:45:32 +0000 (11:45 +0900)]
[Build Break Fix] C89 Compatibility issue in example
The two then-pending PRs had been conflicting with each other.
This commit fixes the build break from them (C89 vs strtok_r)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 3 Jul 2018 08:14:49 +0000 (17:14 +0900)]
[Convert] Fix memory error
Unref gst object when it is no more needed.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 2 Jul 2018 11:51:14 +0000 (20:51 +0900)]
[Filter/Custom/Example] Add new example: do average
Added a new test case to satisfy #58.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 3 Jul 2018 04:28:04 +0000 (13:28 +0900)]
[Code Clean] Enforce C89 for all .C files
Gstreamer requires compatibility with C89 for good plugins.
This commit fixes all non-C89 compliant code of C and
enforces C89 for all C code in Cflag.
Fixes #206
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Geunsik Lim [Tue, 3 Jul 2018 10:58:31 +0000 (19:58 +0900)]
[github] Updated pull request template
This PR is to update the existing pull request (PR) template
in order that developers can write a good Git commit messages.
**Changed proposed in this PR:**
1. Updated PR template
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
MyungJoo Ham [Tue, 3 Jul 2018 04:42:20 +0000 (13:42 +0900)]
[Filter/Custom/Example] Thread Safety.
Let's not use strtok, which is not thread-safe.
Gstreamer may use multithreading depending on the stream setup.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jijoong.moon [Tue, 3 Jul 2018 04:53:40 +0000 (13:53 +0900)]
[Tensors] Use GString to parse string of dimensions/types
It's better to use GString to parse the string of dimensions/types
rather than strdup/strtok.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jy1210.jung [Tue, 3 Jul 2018 03:50:10 +0000 (12:50 +0900)]
[Sink] move unittest file
move unittest_sink to tests/nnstreamer_sink/
**Self evaluation:**
1. Build test: [*]Passed [ ]Failed [ ]Skipped
2. Run test: [*]Passed [ ]Failed [ ]Skipped
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
MyungJoo Ham [Tue, 3 Jul 2018 01:21:56 +0000 (10:21 +0900)]
[Sink] Support 32bit systems.
Use %zd for size_t
Fixes #200
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jijoong.moon [Tue, 3 Jul 2018 00:59:06 +0000 (09:59 +0900)]
[Tensors] Support heterogeneous types for other/tensors
By taking the input string for types in capability, we can supprot the
heterogeneous types for other/tensors.
- Added parse string for types
- Added string for types of tensors in capability.
- Added test for type string
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jijoong.moon [Mon, 2 Jul 2018 01:59:56 +0000 (10:59 +0900)]
[Tensors] Add tensor dimensions string for negotiation
Add tensors dimensions string for negotiation.
The default cap form of "other/tenosrs" is
"other/tensors, " \
"rank = (int) [ 1, 4 ], " \
"num_tensors = (int) [1, 65535], "\
"type = (string) { float32, float64, int32, uint32,
int16, uint16, int8, uint8 }, " \
"framerate = (fraction) [ 0/1,
2147483647/1 ]" \
/* Dimensions of Tensors for negotiation */
/* "dimensions = (string)
dim1:dim2:dim3:dim4, dim1:dim2:dim3:dim4" */
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Mon, 2 Jul 2018 11:57:54 +0000 (20:57 +0900)]
[DIST] RPM Build: Add python build dependency
Although python is implicitly added as build-dep by other packages,
we now uses python explicitly with a few test cases.
Thus, we'd better express it explicitly.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 2 Jul 2018 12:18:02 +0000 (21:18 +0900)]
[Common/Unittest] move unittest to tests/
TODO: add runTest.sh for tests/common and remove unittest_common from rpm spec.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 2 Jul 2018 11:02:28 +0000 (20:02 +0900)]
[Filter/Test] Add regression test for issue #190
Test case with 640x480 --> 320x240 scaler.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>