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>
MyungJoo Ham [Mon, 2 Jul 2018 11:01:03 +0000 (20:01 +0900)]
[Filter] Fix pad-cap tranform bug
Fixes #190.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 2 Jul 2018 04:18:48 +0000 (13:18 +0900)]
[Convert/Filter] Add transform size functions
This commit enables allocation-type vmethods, "transform_size" for filter
and updates corresponding comments for converter.
Note that allocation units is not requires as transform size is supplied.
Fixes #26
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Mon, 2 Jul 2018 11:46:37 +0000 (20:46 +0900)]
[Sink] update testcase
1. add test for basesink properties
2. add test for unknown property and signal
3. add signal handle (greater than 0 when successfully connected)
4. add example to get negotiated caps
**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, 2 Jul 2018 02:27:09 +0000 (11:27 +0900)]
[Tensors] Fix gst buffer error
In order to keep buffer data to next element after create new buffer,
we have to increse reference count before push the buffer.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Wed, 27 Jun 2018 08:33:17 +0000 (17:33 +0900)]
[Example Custom Filter] Scaler Example Custom Filter
Added scaler that changes dimension and to meaningful memcpy
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Fri, 29 Jun 2018 11:30:14 +0000 (20:30 +0900)]
[Sink] testcases with base pipeline
1. test code for tensor sink
- testcases for get/set properties, buffer, render-rate
- uses simple pipeline
- can receive buffer after signal connect
2. update cmake 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>
sewon.oh [Thu, 28 Jun 2018 09:22:16 +0000 (18:22 +0900)]
[Test] Add plugin dependency and cmake build check.
- testAPI.sh: using find and gst-inspect-1.0 to check dependency
Signed-off-by: Sewon Oh <sewon.oh@samsung.com>
sewon.oh [Thu, 28 Jun 2018 05:31:24 +0000 (14:31 +0900)]
[CI] Add TAOS-CI config files for nnstreamer
1st
- config files: copy files
- Documentation/ci-config/README.md: describe how to use these files.
- ./README.md: add link ci-config readme file.
2nd
- ./README.md: modify to change line
3rd
- merge: some files are added.
- Documentation/ci-config/README.md: command change to link ci-config folder
Signed-off-by: Sewon Oh <sewon.oh@samsung.com>
MyungJoo Ham [Tue, 26 Jun 2018 06:39:22 +0000 (15:39 +0900)]
[Code Clean] tensor_fitler clean up
- Remove debugging-only code
- Code clean for repeated expressions & debug prints
- Remove unnecessary code blocks
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Geunsik Lim [Thu, 28 Jun 2018 07:19:34 +0000 (16:19 +0900)]
Added how to use test cases in Documentation folder
This PR is to append how to use test cases in Documentation folder
because the instruction contents of test cases has been increased gradually.
**Changes proposed in this PR:**
1. Added test case document in Documentation directory
**Self assessment:**
1. mark-down test: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Geunsik Lim [Thu, 28 Jun 2018 04:59:58 +0000 (13:59 +0900)]
Added getting-started document in Documentation folder
The content of `Getting Started` section is too big in README.md file.
This PR is to create getting-started mark-down document in Documentation folder.
**Changes proposed in this PR:**
1. Added getting-started.md file
2. Updated README.md
**Self assessment:**
1. mark-down test: okay
2. gbs build: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Geunsik Lim [Thu, 28 Jun 2018 01:44:28 +0000 (10:44 +0900)]
[Tests] Added check function to inspect dependent commands
This PR is to append a dependency check routine to inspect the required
packages are install before starting tests/testAPI.sh
**Changes proposed in this PR:**
1. Added dependency check function
2. Applied shell commands with checkDependency()
- gst-launch-1.0, cmp, dirname, basename, sed, and find
**Self assessment:**
1. gbs build: okay
2. local test: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
jijoong.moon [Wed, 27 Jun 2018 08:09:37 +0000 (17:09 +0900)]
[Tensors] Complete Set of Test Case for Tensors
Test Case is:
1. generate random png (RGB, 640x480)
2. read x-raw from png
3. Make Three Tensors (gsttesttensors)
. R Tensor [1][640][480][1] : Size 307200
. G Tensor [1][640][480][1] : Size 307200
. B Tensor [1][640][480][1] : Size 307200
. num_tensors : 3
. glist dimensions : tensor_dim type([1][640][480][1]) x 3
- Add generate golden data from python code
- Add tar for the tizen rpm pacakging
- Add binary difference check
- Modify tensor_meta to work right
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Mon, 25 Jun 2018 07:42:52 +0000 (16:42 +0900)]
[Filter/Main] Fully support flexible (sink->src) dimension
Fixes #153, thus fixing #71 as well.
Added a test case to prevent regression
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 22 Jun 2018 06:26:44 +0000 (15:26 +0900)]
[Filter/Custom] Support flexible dimension
- Allow to configure input/output dimension in run-time.
- After pad-cap negotiation, if gstremaer somehow fixes input-dimenson,
a filter subplugin can configure output-dimension accordingly.
- An example custom filter, "passthrough_variable", supports any
arbitrary tensor for passthrough operations.
- Filter/Main and Filter/Custom has been amended during the development
of the example custom plugin.
FOUND BUG (mentioned as "known bug" in the code):
- If GST-BaseTransform tries to fixate pad-caps without getting
any hints on the input dimension, fixate vmethod fixes the input
dimension to 1:1:1:1. We need to implement non-fixed pad-cap
declarations in fixated vmethod.
- The disabled test case #4 in tests/nnstreamer_filter_custom
is the corresponding regression detector.
- However, this bug is to be fixed with another commit.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 27 Jun 2018 07:05:39 +0000 (16:05 +0900)]
[Git Infra] pre-commit to filter styles
If you want to know if there is coding style errors
before actually creating a commit, use this pre-commit by
copying common/pre-commit to .git/hooks/
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Wed, 27 Jun 2018 10:27:52 +0000 (19:27 +0900)]
[Sink] add properties and signals
1. emit signals when new buffer received, start/end stream event.
2. add properties for signals and render rate.
3. add caps callback from basesink.
**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, 27 Jun 2018 06:48:19 +0000 (15:48 +0900)]
[CI/Unit test] Integrate unit test with cmake.
Test command: ctest -V (you can do after 'make', -V means log output)
- ./CMakeLists.txt: add subdirectory and enable test
- test/CMakeLists.txt: add unit test
- testAll.sh: using `dirname $0` to solve path problem
- testAPI.sh: same as testAll.sh
- debian/control: add dependency for unit testing
Signed-off-by: Sewon Oh <sewon.oh@samsung.com>
MyungJoo Ham [Wed, 27 Jun 2018 06:30:56 +0000 (15:30 +0900)]
[Convert] Memory Handling Fixed
1. Added g_free() to an allocated pointer.
2. Added transform_size() to allow gst framework to allocate
the exact amount needed for output buffer in non-in-place mode.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 22 Jun 2018 07:23:49 +0000 (16:23 +0900)]
[Filter/Main] Guarantee calling "open" before all other callbacks.
Added "open" virtual methods for tensor_filer subplugins.
TODO: guarantee calling "close" at the end.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 27 Jun 2018 05:33:45 +0000 (14:33 +0900)]
[Common] Code Clean for common libraries
1. Install tensor_common.a to devel packaging so that external custom plugins may use tensor-common libraries
2. Rearrange headers, straighten up the dependencies
3. Add cap-to-dim API.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jinhyuck [Mon, 25 Jun 2018 10:46:26 +0000 (19:46 +0900)]
[Filter/tflite]Add skeleton code for load model file
add skeleton code for load model file of tensorflow lite subplugin
additional implement will be done after applying cpp api of tensorflow lite
could be used in tensorflow_lite_filter.c
Signed-off-by: jinhyuck <jinhyuck83.park@samsung.com>
MyungJoo Ham [Tue, 26 Jun 2018 08:16:38 +0000 (17:16 +0900)]
[CI/UnittestCoverage] Exclude tests
Do not check unittest coverage of tests/*
Limit the coverage target to gst, nnstreamer_example, include, common.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 26 Jun 2018 06:47:18 +0000 (15:47 +0900)]
[Documentation] update readme with the progress details
The "known bug" is already fixed.
Add progress updates.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Fri, 22 Jun 2018 06:04:28 +0000 (15:04 +0900)]
[Filter/Main] Support implicit dimension declaration
If a subplugin of tensor-filter has declared input/output dimension
with getInputDimenion/getOutputDimension, configure tensor-filter
with such values.
This prepares for configuring dimesions based on pad-cap negotiations as well.
(There are a few TODOs to fully support it)
This does about half of #144 .
Added a test case for implicit dimension declaration as well.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 27 Jun 2018 01:05:46 +0000 (10:05 +0900)]
[Readme] Fix typo
Multi model --> Multi modal
(multiple heterogeneous input sources for NNs; e.g.. cameras and mics)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
문지중/동작제어Lab(SR)/Principal Engineer/삼성전자 [Wed, 27 Jun 2018 00:51:19 +0000 (09:51 +0900)]
[TensorMeta] Add utility functions to manipilation of tensors (#158)
* [TensorMeta] Add utility functions to manipilation of tensors
Add Utility functions
- gst_make_tensors
- gst_get_tensor
- gst_get_tensordim
- gst_remove_tensor
- gst_get_num_tensors
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
* [Tensors] Add Tensors Generation Testcase
Add Testcase to generate Tensors
- gsttesttensor
. take video/x-raw ( RGB type )
. generate three [1][642][480][1] dimension tensor
. generate tensors with GstTensorMeta
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
* [Tensors] Add Tensors Check Element
In order to check tensors in downstream element, tensorscheck element
is added.
In this element, "other/tensor" type is in sink pad and check if it is
tensors and merge three tensor into one RGB original tensor.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
* [Tensors] Add test for the tensors in tests directory
In order to test tensors, gstreamer pipeline test is added as below.
filesrc location=testcase01_RGB_642x480.png ! pngdec ! videoscale !
imagefreeze ! videoconvert !
video/x-raw,format=RGB,width=642,height=480,framerate=0/1 !
testtensors silent=TRUE ! tensorscheck silent=TRUE ! filesink
location=\"testcase01_RGB_642x480.nonip.log\" sync=true
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
Geunsik Lim [Tue, 26 Jun 2018 06:32:26 +0000 (15:32 +0900)]
[Documentation] Added maintainer & committers
This PR is to append the maintainer(s) and committer(s) that were proposed
at `STAR-SteeringCommitte` as follows.
* [STAR On Device] nnstreamer Repo Creation Proposal
* https://github.sec.samsung.net/STAR/STAR-SteeringCommittee/issues/17
**Changes proposed in this PR:**
1. Added maintainer & committers
2. Updated mark-down template
3. Updated some statements for readability
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Geunsik Lim [Mon, 25 Jun 2018 07:20:48 +0000 (16:20 +0900)]
Renamed file name to display license info at webpage
This PR is to replace `LICENSE.LGPLv2.1` with `LICENSE` in order to
display official license of this repository automatically.
**Changes proposed in this PR:**
1. Replaced LICENSE.LGPLv2.1 with LICENSE
2. Updated nnstreamer.spec
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Geunsik Lim [Tue, 19 Jun 2018 23:04:43 +0000 (08:04 +0900)]
[Doxygen] Added how to write doxygen tags
This PR is to add how to write doxygen documents in the source code.
**Changes proposed in this PR:**
Ver2:
2. Added addtional case studies for C/C++ code
Ver1:
1 Added how to write doxygen tags
**Self assessment:**
1. GBS build: okay
2. mark-down test: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
MyungJoo Ham [Wed, 20 Jun 2018 10:16:59 +0000 (19:16 +0900)]
[Filter] Flexible input/output dimension, prep data structure
In order to allow flexible input/output dimension for subplugins,
prepare proper data structure and virtual method, "setInputDimension
Additional mod: constify Gst_Tensor_Filter for subplugins
CC: @jinhyuck83-park @hello-ahn : I need your opinion on this vmethod update.
Preparing #71
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jy1210.jung [Fri, 22 Jun 2018 07:46:18 +0000 (16:46 +0900)]
[Sink] register sink plugin
Update code to register tensor sink plugin.
1. added plugin registration
2. refactor code for interface (later work)
**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 [Fri, 22 Jun 2018 06:32:24 +0000 (15:32 +0900)]
[Merge Error Fix] Missing Merge Conflict Resolve.
There were a few missing spots in the previous merge conflict resolve.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jijoong.moon [Thu, 21 Jun 2018 07:37:47 +0000 (16:37 +0900)]
[TensorMeta] Change TensorMeta -> GstMetaTensor
- Change Tensor Meta from TensorMeta to GstMetaTensor for more general.
- Add GstMetaTensor in tensor_converter and tensor_decoder and tested.
. For now, GstMetaTensor->num_tensors is set as 1 in
tensor_converter and included in GstBuffer.
. GstBuffer is sent through pipeline and this meta data can get in
tensordec.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
jy1210.jung [Thu, 21 Jun 2018 07:07:48 +0000 (16:07 +0900)]
[Sink] update doxygen
Add doxygen eitries and fix doxygen issue.
**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, 19 Jun 2018 11:47:47 +0000 (20:47 +0900)]
[Sink] Add template for buffer and QoS event
1. add function to handle buffer
(render and render_list in BaseSinkClass)
2. add template to set QoS event
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
Geunsik Lim [Tue, 19 Jun 2018 22:54:58 +0000 (07:54 +0900)]
[Documentation] Added development guide of nnstreamer
This PR is to append some mark-down documents to develop
nnstreamer source code consistently.
Original documents is mirrored from TAOS-CI repository.
Thane, modified the document for nnstreamer project.
**Changes proposed in this PR:**
* Version 3:
1. Removed Python rule
2. Updated how to run gst-indent before submitting PR
* Version 2:
1. Replaced a manual indent command with ./common/gst-indent script
* Version 1:
1. Added coding convention document
2. Added how to contribute code
3. Added generation script to create TOC automatically
4. Added how to archive large data for evaluation
(In this case, another repository has to be created for only large data.)
**Self assessment:**
1. gbs build: okay
2. markd-down generation: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
MyungJoo Ham [Thu, 21 Jun 2018 02:18:06 +0000 (11:18 +0900)]
[Doxygen] Add doxygen entries for common headers and conveter
To comply with doxygen, a few more entires are added.
Hope this will help developers using common headers.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
jijoong.moon [Wed, 20 Jun 2018 09:27:29 +0000 (18:27 +0900)]
[TensorMeta] Add Tensor Meta Data for GstBuffer
In order to deal with other/tensors, we need GstBuffer which includes
multiple GstMemory for Tensors and GstMeta to describe offset and etc.
This is the first draft commit for the GstMeta for Tensor, say
TensorMeta.
Signed-off-by: jijoong.moon <jijoong.moon@samsung.com>
MyungJoo Ham [Wed, 20 Jun 2018 10:26:03 +0000 (19:26 +0900)]
[Code Clean] Type naming & constify
1. We still had "uint32_t *", which should've been replaced by "tensor_dim"
2. Constify input tensor. Incorrect usage will generate compiler errors later :)
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Geunsik Lim [Tue, 19 Jun 2018 22:16:21 +0000 (07:16 +0900)]
Added legacy issue template
This PR is to support compatibility of issue template between different github versions.
**Changes proposed in this PR:**
1. Added legacy issue template
**Reference:**
* Legacy issue template: ./.github/ISSUE_TEMPLATE.md
* Up-to-date issue template: ./.github/ISSUE_TEMPLATE/{Bug_report.md|Feature_request.md|Support_request.md}
* Our request for github.sec.samsung.neet:
* https://github.sec.samsung.net/SERVICE/GitHub/issues/124
**Self assessment:**
1. GBS build: okay
2. Local test: okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
MyungJoo Ham [Tue, 19 Jun 2018 11:00:24 +0000 (20:00 +0900)]
[License] Remove apache-2.0. Unify to LGPL-2.1
Please use LGPL 2.1 for all files
Fixes #130
Fixes PROTEX mismatches
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Geunsik Lim [Tue, 19 Jun 2018 06:20:09 +0000 (15:20 +0900)]
Updated README.md to fix pdebuild issue
Fix issue #127.
This PR is to solve unexpected build issues when users try to run
`pdebuild` command to do Debian packaging of nnstreamer source.
**Changes proposed in this PR:**
1. Replaced **```** with **```bash**
2. Added how to create a base tarball with correct apt repository
3. Updated how to use pdebuild to avoid build errors
4. Used OTHERMIRROR instead of MIRRORSITE to handle lots of cases
**Self assessment:**
1. Local test with Ubuntu 16.04 (Xenial): Okay
2. GBS Build: Okay
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>