Jaeyun [Fri, 10 Jun 2022 10:12:39 +0000 (19:12 +0900)]
[Edge] handle magic validation
Before adding mutex lock, update magic validation.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Thu, 9 Jun 2022 07:42:03 +0000 (16:42 +0900)]
test/query: update gtest utc for updated protocol property.
We now use enum type for protocol property, which is NO MORE case insensitive.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 9 Jun 2022 04:44:15 +0000 (13:44 +0900)]
Query: fix protocol property handling
Protocols are enum. Use enum-param, not int or string.
With this, users can use both numbers and enum-strings.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 8 Jun 2022 04:59:39 +0000 (13:59 +0900)]
doc/filter subplugin: brief guide on how to write subplugin
To clarify which mechanism to use for new tensor-filter subplugin,
added a short guide on how to write tensor-filter subplugin.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 19 Apr 2022 10:23:50 +0000 (19:23 +0900)]
deb: cut the dependency on custom tflite binary
Custom tflite binary is supposed to be installed by users
afterwards.
Thus, cut the dependency from the deb packaging.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 19 Apr 2022 07:41:24 +0000 (16:41 +0900)]
dist: cut the dependency on custom tflite binary
Custom tflite binary is supposed to be installed by users
afterwards.
Thus, cut the dependency from the rpm packaging.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 14 Apr 2022 11:29:13 +0000 (20:29 +0900)]
Tensorflow-lite custom bin support: Plan B implemented
This addresses plan B of #3713
$ ldd build/ext/nnstreamer/tensor_filter/libnnstreamer_filter_tensorflow2-lite-custom.so
linux-vdso.so.1 (0x00007fffe21f2000)
libnnstreamer-single.so => /source/AutoDrv/NNStreamer/build/ext/nnstreamer/tensor_filter/../../../gst/nnstreamer/libnnstreamer-single.so (0x00007f08b5bba000)
/source/AutoDrv/NNStreamer/ext/nnstreamer/tensor_filter/libtensorflow2-lite-custom.so (0x00007f08b50a5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f08b4ea1000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f08b4b8a000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f08b477d000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f08b4565000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f08b4174000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f08b3f70000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f08b3d1c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f08b3afd000)
/lib64/ld-linux-x86-64.so.2 (0x00007f08b5ff8000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f08b388b000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f08b34ed000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f08b32e5000)
After this, we need the following commits.
1. a manual how to use tflite2-custom. (at /ext/nnstreamer/tensor-filter?)
2. a test case for tflite2-custom.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 9 Jun 2022 08:23:43 +0000 (17:23 +0900)]
test/query: parallel client launching shouldn't use gstTest
Don't use & fork with bash function.
Add timeout for launching.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 8 Jun 2022 01:39:49 +0000 (10:39 +0900)]
bash scripts: use python3 instead of python
We are removing python2 dependencies.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 2 Jun 2022 07:20:50 +0000 (16:20 +0900)]
dist/Ubuntu: remove python2 dependency
Use python3 instead.
Addressing #3774
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 2 Jun 2022 06:52:24 +0000 (15:52 +0900)]
dist/Tizen: remove python2 dependency.
Use python3 instead.
Addressing #3774
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Thu, 2 Jun 2022 06:50:48 +0000 (15:50 +0900)]
python scripts: use python3 instead of python in shebang.
From tests/*, tools/*, removing the usage of python3, update shebang.
Addressing #3774
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jaeyun [Thu, 9 Jun 2022 03:40:45 +0000 (12:40 +0900)]
[Log] use internal log function
Replace logutil - glib funcs, use predefined log functions.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Thu, 9 Jun 2022 06:56:57 +0000 (15:56 +0900)]
test/query: use get_available_port.py
Use get_available_port.py instead of RANDOM number.
Moved get_available_port.py from nnstreamer_grpc to tests as it has now become a common test utility.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 8 Jun 2022 06:29:36 +0000 (15:29 +0900)]
test/query: wait for server launching, not 5 sec.
1. With busy CI servers, you don't know how much time it takes
to launch tensor-query-server instances.
Thus, wait for the pipeline launching, not a constant time.
Besides, you can use "wait" command for server exit.
2. Do not use & for ssat apis.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Julien Vuillaumier [Mon, 16 May 2022 16:59:52 +0000 (18:59 +0200)]
[filter/deepview-rt] Add filter subplugin for DeepViewRT
This change implements a tensor filter subplugin to interface
with DeepViewRT inference engine:
https://www.embeddedml.com/deepviewrt
Plugin can be instanciated using NNStreamer filter element
with relevant properties:
tensor_filter framework=deepview-rt model=<rtm model file>
[custom=[Engine:<path to engine shared lib>]
[Cache:<cache size in MiB>]
[MemPool:<memory pool size in MiB>]]
SSAT test suite addition for DeepView RT tensor filter plugin.
Sample model (mobilenet_v1_0.25_224.rtm) is derived from public
tflite model, converted to rtm format per procedure below:
$ wget http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_0.25_224.tgz
$ tar xvf mobilenet_v1_0.25_224.tgz
$ deepview-converter ./mobilenet_v1_0.25_224.tflite ./mobilenet_v1_0.25_224.rtm
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Jaeyun [Thu, 12 May 2022 11:24:34 +0000 (20:24 +0900)]
[Edge] base code for edge event
Update base code to handle edge event.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 12 May 2022 10:55:50 +0000 (19:55 +0900)]
[Edge] code clean
1. Fix code style and condition to set raw data.
2. Use malloc instead of glib function.
TODO: implement lock to handle edge handles.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Fri, 15 Apr 2022 07:45:13 +0000 (16:45 +0900)]
filter:tf-lite2-custom usage manual
For #3713, add a usage manual because it may be not too trivial
for non-system-sw developers.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Julien Vuillaumier [Fri, 3 Jun 2022 09:11:47 +0000 (11:11 +0200)]
[meson] Fix Yocto Kirkstone build issue
A build configuration error is seen on Yocto Kirkstone (4.0)
coming from commit:
https://github.com/nnstreamer/nnstreamer/commit/
0584ce06e30f1dbb188bce2b370df53d335046dd
Signature of error:
meson.build:505:4: ERROR: Command "//recipe-sysroot-native/usr/bin/python3-native/python3 -m site --user-site" failed with status 1
Building with Yocto, native tools are sandboxed in build workspace,
there is no python user site.
This change is to prevent meson configuration to break when no user
site package is present.
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Wook Song [Mon, 23 May 2022 07:57:45 +0000 (16:57 +0900)]
[Meson] Fix warnings related to the run_command call
This patch sets the keyword argument, 'check', of the run_command
function to true in order to fix the following warnings:
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
Signed-off-by: Wook Song <wook16.song@samsung.com>
Julien Vuillaumier [Tue, 31 May 2022 08:43:29 +0000 (10:43 +0200)]
[decoder/bounding_box] Fix ssd box decoding without postprocessing
Boxes whose detection scores do not exceed the specified sigmoid
threshold shall never be reported as valid.
This changeset fixes current implementation whereby valid field
for a box is set only when its detection scores have passed the
threshold tests. Thus, if score test is not passed, valid field for
a box is inherited from the previous box score tests.
Therefore without this change, whenever one box passes the score
criteria, every subsequent boxes will be reported as valid, even though
their detection scores are low.
As a consequence, a very big number of boxes may be passed to the
next stage of NMS processing which causes processing overhead.
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Wook Song [Tue, 31 May 2022 14:54:19 +0000 (23:54 +0900)]
[macOS/Doc] Replace 'nnsuite' with 'nnstreamer'
This patch replaces the old organization name, nnsuite, remaining
in the Getting Started document with the current one, nnstreamer.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 31 May 2022 01:19:59 +0000 (10:19 +0900)]
[Tests/IF] Fix a build error related to -Winconsistent-missing-override
This patch fixes the following build error while compiling with clang in
macOS.
With clang in macOS:
../tests/nnstreamer_if/unittest_if.cc:65:8: error: 'TearDown' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
void TearDown ()
^
/opt/homebrew/Cellar/googletest/1.11.0/include/gtest/gtest.h:481:16: note: overridden virtual function is here
virtual void TearDown();
^
1 error generated.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Mon, 23 May 2022 09:17:41 +0000 (18:17 +0900)]
[macOS/meson] Add a missing parameter to the sed's in-place edit option
In macOS, the '-i' option of the sed command requires a parameter to
tell what extension to use for the backup file. To this end, this patch
appends '.bak' to the '-i' option to fix the build errors on macOS.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Muhwan Kim [Sun, 22 May 2022 19:48:21 +0000 (04:48 +0900)]
[mxnet] Add Doxygen tags for Predictor.hh
To suppress CI's complain and specify where this code came from.
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 22 May 2022 19:42:06 +0000 (04:42 +0900)]
[mxnet] Change license of test code to LGPL-2.1
Detailed discussion here: PR #3742
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 22 May 2022 19:40:53 +0000 (04:40 +0900)]
[mxnet] Use __FILE__ instead of hard-coded path to generate log message
__FILE__ macro is better, elegant way to print file names.
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:53:03 +0000 (03:53 +0900)]
[mxnet] Use copy option to suppress deprecation warning
meson have copy option for this usage
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:49:35 +0000 (03:49 +0900)]
[mxnet] Use official MXNet MXDType
Use datatype enum from MXNet instead of copied one
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:48:29 +0000 (03:48 +0900)]
[mxnet] Include nnstreamer_plugin_api.h
Use nnstreamer_plugin_api.h which is recommended
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:36:33 +0000 (03:36 +0900)]
[mxnet] Fix minor format issue
Add newline character to reduce line length
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:34:33 +0000 (03:34 +0900)]
[mxnet] Use kFileLocation instead of kFileUrl
We can still generate good message using kFileLocation.
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:32:42 +0000 (03:32 +0900)]
[mxnet] Fix typo
Fix typo speces -> spaces
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:31:55 +0000 (03:31 +0900)]
[mxnet] Change license of test script to LGPL-2.1
For this, being LGPL 2.1 doesn't incur problems (in PR #3742)
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 1 May 2022 18:08:55 +0000 (03:08 +0900)]
[mxnet] Fix install directory of tests
Fix typo of unittest_filter_mxnet install directory reference.
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
makesource [Tue, 26 Apr 2022 13:10:13 +0000 (22:10 +0900)]
[mxnet] Add mxnet related variables in nnstreamer.mk
Add NNSTREAMER_FILTER_MXNET_SRCS vars in nnstreamer.mk
Signed-off-by: makesource <makesource@gmail.com>
makesource [Tue, 26 Apr 2022 13:07:30 +0000 (22:07 +0900)]
[mxnet] Add unistd.h header in tensor_filter_mxnet
Add unistd.h header to use R_OK macro.
Signed-off-by: makesource <makesource@gmail.com>
makesource [Tue, 26 Apr 2022 12:51:53 +0000 (21:51 +0900)]
[mxnet] Disable name mangling
Disable name mangling for init_filter_mxnet, fini_filter_mxnet functions.
Signed-off-by: makesource <makesource@gmail.com>
Muhwan Kim [Sun, 24 Apr 2022 05:17:36 +0000 (14:17 +0900)]
[mxnet] Add doxygen tags on top of simple_test_mxnet.cc
Add omitted some tags on top
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sun, 24 Apr 2022 04:48:14 +0000 (13:48 +0900)]
[mxnet] Convert comments into doxygen style
Convert original comments into @brief of doxygen style comments
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Sat, 23 Apr 2022 08:35:31 +0000 (17:35 +0900)]
[mxnet] Initialize sourceid before use
Added initialize of sourceid
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Wed, 6 Apr 2022 14:42:05 +0000 (23:42 +0900)]
[mxnet] Fix build error in test code
Fix the unused variable errors by adding UNUSED lines
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Wed, 23 Mar 2022 08:23:30 +0000 (17:23 +0900)]
[mxnet] Fix unused parameter error
Fix build error by adding UNUSED lines
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Muhwan Kim [Wed, 23 Mar 2022 08:18:12 +0000 (17:18 +0900)]
[mxnet] Applied clang-format
Fix code format to follow .clang-format file
Signed-off-by: Muhwan Kim <mhkim4886@gmail.com>
Bumsik Kim [Mon, 26 Oct 2020 11:53:29 +0000 (04:53 -0700)]
[UNTESTED][mxnet] Add TensorRT support
Add TensorRT support for nnstreamer-filter-mxnet.
Like the previous commit, I will remove [UNTESTED] tag
after testing.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Mon, 26 Oct 2020 08:07:09 +0000 (01:07 -0700)]
[UNTESTED][mxnet] Add GPU support
Add GPU support for nnstreamer-filter-mxnet.
This should work if MXNet is properly compiled
but I don't currently have development environment
to test GPU acceleration. I will remove the UNTESTED
tag when I set up the environment and test it.
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Wed, 14 Oct 2020 06:32:35 +0000 (23:32 -0700)]
[mxnet] Add simple test
This is a simple test to verify if nnstreamer-filter-mxnet works.
This may not be a proper test for upstream NNStreamer.
The main idea is to compare the outputs of the MXNet reference
implementation [1] and that of nnstreamer-filter-mxnet.
OpenCV is required to build this test.
[1]:
https://github.com/apache/incubator-mxnet/blob/1.7.0/cpp-package/example/inference/imagenet_inference.cpp
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Sun, 4 Oct 2020 06:04:56 +0000 (23:04 -0700)]
[meson] Add mxnet support
Add nnstreamer-filter-mxnet in the meson build system.
The mxnet support flag is -Dmxnet-support=enabled
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Bumsik Kim [Wed, 14 Oct 2020 02:36:56 +0000 (19:36 -0700)]
[mxnet] Preliminary version of tensor_filter_mxnet
This patch newely adds MXNet support for tensor_filter.
This is based on tensor_filter_subplugin class. This currently does not
suppor the GPU acceleration but it will be added in later patches.
Since this project does not have a stable C++ coding convention, I
partially followed the Google C++ Style Guide [1] for naming and applied
.clang_format file in the root.
[1]: https://google.github.io/styleguide/cppguide.html#Naming
Signed-off-by: Bumsik Kim <k.bumsik@gmail.com>
Jaeyun [Fri, 20 May 2022 11:48:34 +0000 (20:48 +0900)]
[Conf] fix param name
Fix lgtm alert - name of global variable. Change param name.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 17 May 2022 09:30:01 +0000 (18:30 +0900)]
[Conf] subplugin path from extra conf
Add subplugin path loaded from extra config file.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Tue, 17 May 2022 05:17:25 +0000 (14:17 +0900)]
[Python] path to python helper lib
Change install path for python-helper library.
This is to fix library link error.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan [Fri, 13 May 2022 06:17:32 +0000 (15:17 +0900)]
[TEST] Add assertion test.
Instead of unwinding the macro, add assertion.
Signed-off-by: gichan <gichan2.jang@samsung.com>
gichan [Fri, 13 May 2022 03:15:44 +0000 (12:15 +0900)]
[TEST] Unwinding macro to avoid no assertion test.
Some code quality analyer check no assertion test.
testTesnrSparse_utilConvert has assert test, the analyer cannnot check
macro.
So, to avoid the false-positive case, unwinding macro.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Sangjung Woo [Thu, 12 May 2022 01:39:40 +0000 (10:39 +0900)]
[Test] Add palm detection decoder test
This patch newly adds the palm detection decoder test script.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Wed, 11 May 2022 14:36:45 +0000 (23:36 +0900)]
[Decoder/BoundingBox] Add binary test data of palm detection
This patch adds the binary test data for palm detection.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Yongjoo Ahn [Thu, 28 Apr 2022 04:44:17 +0000 (13:44 +0900)]
[filter/snpe] Add custom option "MaxResizableDim"
- Some snpe models have "0" dim to represent resizable dim.
- Add a custom option to deal with this case.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Tue, 19 Apr 2022 09:22:30 +0000 (18:22 +0900)]
[filter/snpe] Make the order of output tensors be consistent with the user given option
- For multiple output models, let user set output tensors instead of
output layers
- And make the order of input / output tensors be consistent.
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gichan [Mon, 9 May 2022 05:31:46 +0000 (14:31 +0900)]
[meson] Remove unnecessary dependency
Remove unnecessary dependency from single-shot package.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Jaeyun [Fri, 6 May 2022 07:24:00 +0000 (16:24 +0900)]
[Svace] check null ptr
Fix svace issue, check null ptr - allocation failure case in log util.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Fri, 1 Apr 2022 11:14:53 +0000 (20:14 +0900)]
[Edge] header for nns-edge
initial commit to implement internal library for nnstreamer edge based on glib.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Wed, 4 May 2022 03:20:04 +0000 (12:20 +0900)]
test: disable converter test if python is not available.
converter test uses python scripts.
disable converter test if python is not available.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gichan [Tue, 19 Apr 2022 10:24:08 +0000 (19:24 +0900)]
[TEST/ntp] Add ntp unittest using GMock.
Add ntp uniitest using GMock.
Signed-off-by: gichan <gichan2.jang@samsung.com>
MyungJoo Ham [Wed, 13 Apr 2022 08:41:43 +0000 (17:41 +0900)]
Start Development of NNStreamer 2.1.1 (2.2 RC2)
This is the version marking for 2.1.1 development start.
As 2.1.0 is started on Sep 28 2021, the change is huge.
2.1.0 -> 2.1.1
- Tizen 7.0 M1 RCx preparation and NNStreamer Mini Summit 2022-04 release.
- NNStreamer-Edge refactoring (module for Among-Device AI (a.k.a. Edge-AI))
- Ongoing effort of nnstreamer-edge separation from nnstreamer.
- In the future, nnstreamer-edge will provide among-device AI functions and nnstreamer will provide gstreamer plugins for such functions. Non-gstreamer systems may connect to nnstreamer-edge based pipelines without gstreamer as clients.
- NNStreamer-Edge will be using AITT as its default backend, leaving protocol issues to AITT.
- In the future, nnstreamer-edge will be compatible with non-Linux ultra-lightweight systems (e.g., Tizen-RT)
- ML-Service API preparation is going on at api.git.
- Major features
- MQTT timestaamping w/ NTP. (later will be migrated to nnstreamer-edge & aitt)
- Query (later will be migrated to nnstreamer-edge & aitt): robustness support, mqtt-hybrid protocol, performance fixes for multi-clients.
- More coverage for SNPE support: quantized model support, SNPE dimension bug workaround, fixes from/for production team.
- Flexible tensor support w/ decoder, converter, flatbuffer.
- Minor features
- MQTT unittest basis, generic stream support, android support, timeout handling, ... (and many!)
- Utility functions exported for plugin writers.
- Tensorflow-lite delegation refactored for generality: may use XNNPACK more easily.
- Tensorflow-lite multi-lib support.
- PyTorch: support complex output tensor formats.
- NNStreamer multi-lib support.
- Decoder: boundingbox-yolov5
- Filter: TRIx-Engine support. (NPUs of Samsung 2022 TV)
- Docker support refactored and cleaned up.
- Fixes
- ARMNN build errors.
- Android errors
- Build errors with recent compiler updates. (gcc 11)
- Fixes upstreamed from productions
- Errors w/ library updates: Lua >= 5.3, GLib >= 2.68
- Regression fixes: openvino, edgetpu, tensorrt
- Memory leaks in C++ subplugin infra.
- Known issues: PPA/Launchpad build broken!
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 13 Apr 2022 09:52:54 +0000 (18:52 +0900)]
clang workaround of vsnprintf
With clang in macos:
/Users/runner/work/nnstreamer/nnstreamer/gst/nnstreamer/nnstreamer_log.c:97:48: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
vsnprintf (errmsg, _NNSTREAMER_ERROR_LENGTH, fmt, arg_ptr);
^~~
/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:75:63: note: expanded from macro 'vsnprintf'
__builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
^~~~~~
1 error generated.
Add a workaround from
https://stackoverflow.com/questions/
20167124/vsprintf-and-vsnprintf-wformat-nonliteral-warning-on-clang-5-0
Note: gst-indent is applying indentation very strangely with __attribute__
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 13 Apr 2022 07:40:33 +0000 (16:40 +0900)]
common/api_util_impl: use internal error infra.
Save the internal error/info/warning message so that
caller may use the info for actual error message.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 30 Mar 2022 10:12:59 +0000 (19:12 +0900)]
filter/core: elaborate error messages.
Elaborate error and warning messages so that users and developers
can easily point out and fix issues.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 30 Mar 2022 10:12:08 +0000 (19:12 +0900)]
common/log: backtrace, internal err log
For debugging messages, add a backtrace function and internal err logging.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
yelini-jeong [Mon, 25 Apr 2022 07:03:04 +0000 (16:03 +0900)]
[TEST] Skip query test temporarily
This patch skips query test temporarily because of ppa build failure.
Signed-off-by: yelini-jeong <yelini.jeong@samsung.com>
Jaeyun [Fri, 22 Apr 2022 09:29:40 +0000 (18:29 +0900)]
[Decoder] integ division
Convert float value to get the object.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan [Tue, 19 Apr 2022 07:09:51 +0000 (16:09 +0900)]
[TEST/mqtt] Run get/set property test w/o mqtt broker
- Run get/set property test without mqtt broker.
- Add ntp prop set/get test.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Jiho Chu [Fri, 8 Apr 2022 06:40:46 +0000 (15:40 +0900)]
[decoder/bounding_box] Support decoder for mediapipe palm detection
MP_PALM_DETECTION decoder for bounding box mode is presented. The model and
algorithm is based on mediapipe palm detection model and its
implementation.
Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
Jaeyun [Tue, 12 Apr 2022 06:43:17 +0000 (15:43 +0900)]
[Filter] unnecessary initialization
Remove unnecessary init while parsing accel string.
- fetch fw info to parse accel for the case if nn framework is not opened.
- check fw info if open() callback of nn framework is not written.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Wed, 20 Apr 2022 06:01:38 +0000 (15:01 +0900)]
[CodeClean] fix svace issue
Fix svace issue - uninitialized variable.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
gichan [Wed, 20 Apr 2022 01:43:12 +0000 (10:43 +0900)]
[Doc] Change CI server domain name
Change CI server domain name from nnstreamer.mooo.com to ci.nnstreamer.ai
Signed-off-by: gichan <gichan2.jang@samsung.com>
Yongjoo Ahn [Thu, 14 Apr 2022 09:19:14 +0000 (18:19 +0900)]
[test/transform] Add tests for per-channel
- Add simple unittests for per-channel operation
- Add a SSAT testcase making red RGB image with per-channel operation
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Tue, 12 Apr 2022 02:14:07 +0000 (11:14 +0900)]
[transform] Add per-channel feature for arithmetic op
- Add "per-channel" arithmetic op (see #3711 for details)
- The syntax:
```
tensor_transform mode=arithmetic
option=typecast:float32,per-channel:true@DIM,add:A1@CH,div:D1@CH
```
- DIM means the dimension which is viewed as channel
ex) For 3:4:4:1 incomming tensor, per-channel:true@0 means 0-th DIM
(value is 3) is the channel
- CH means the idx of channel that given operation is applied. If @CH is
missing, the operation is applied to all channels.
ex) add:255@0 means add 255 to the 0-th channel (which is R among the
RGB)
- Usage example:
```
$ gst-launch-1.0 videotestsrc pattern=2 num-buffers=1 ! videoscale !
videoconvert ! video/x-raw,format=RGB,width=2,height=2 !
tensor_converter ! tensor_transform mode=arithmetic
option=typecast:float32,per-channel:true@0,add:1.5@0,add:2.5@1,mul:2 ! filesink
location=out.log
$ od -f out.log
0000000 3 5 0 3
0000020 5 0 3 5
0000040 0 3 5 0
0000060
```
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Sangjung Woo [Wed, 6 Apr 2022 12:14:39 +0000 (21:14 +0900)]
[Tests/Rate] Apply test fixture to remove duplicate code
To remove duplicate code in each test case, this patch applies
the test fixture framework of Google Test. It increases
maintainability and modifiability.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Sangjung Woo [Wed, 6 Apr 2022 01:59:46 +0000 (10:59 +0900)]
[Test/Single] Apply test fixture to remove duplicate code
To remove duplicate code in each test case, this patch applies the test
fixture framework. Moreover, g_autofree macro is used for allocated
space to be freed automatically no matter test case is passed or not.
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Yongjoo Ahn [Mon, 18 Apr 2022 07:11:27 +0000 (16:11 +0900)]
[subplugin] g_module_open with LOCAL flag (instead of GLOBAL)
- When tf1-lite and tf2-lite both are present, the later called
subplugin is not initalized. It's because the constructor functions
are same as "init_filter_tflite".
e.g.) `g_module_open (...tf1lite.so, 0)` will call "init_filter_tflite" of
tf2lite.so.
- This resolves #3709
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gichan [Thu, 14 Apr 2022 05:39:38 +0000 (14:39 +0900)]
[README] Fix daily build log link
- Fix invalid log link of the ubuntu daily build.
- Change link of the badges to daily log path.
Signed-off-by: gichan <gichan2.jang@samsung.com>
Jaeyun [Fri, 8 Apr 2022 02:52:19 +0000 (11:52 +0900)]
[CodeClean] fix svace issue
1. Set interpreter lock while replacing interpreter in tf-lite sub-plugin.
2. Remove unreached code in converter.
3. Clearly check file ext (bmp) in test util.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 7 Apr 2022 09:18:03 +0000 (18:18 +0900)]
[CodeClean] fix svace issue
Code clean, fix svace issue in testcase.
- count failure while loading data from file.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Jaeyun [Thu, 7 Apr 2022 11:54:01 +0000 (20:54 +0900)]
[Filter] svace issue
Fix svace issue - dereference after null check.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
MyungJoo Ham [Tue, 5 Apr 2022 01:31:33 +0000 (10:31 +0900)]
Fix ubuntu meson build github action
Fixed syntax error.
Run test action.
todo: register unit tests properly for meson test.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Junhwan Kim [Wed, 18 Aug 2021 07:32:06 +0000 (16:32 +0900)]
[Filter] Reload shared model
Support model reload for shared model
- Update common method to replace interpreter for instances sharing the key
Signed-off-by: Junhwan Kim <jejudo.kim@samsung.com>
MyungJoo Ham [Wed, 30 Mar 2022 02:17:07 +0000 (11:17 +0900)]
github-action: Ubuntu clean meson build test
Test build & TC in a latest Ubuntu system with meson/ninja clean build.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 30 Mar 2022 03:29:57 +0000 (12:29 +0900)]
github-action: macos build
Add macos build github action with brew
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Wed, 30 Mar 2022 10:24:32 +0000 (19:24 +0900)]
test: ppa/armhf timeout
We have the following error at PPA for armhf build:
```
../tests/nnstreamer_converter/unittest_converter.cc:409: Failure
Value of: wait_pipeline_process_buffers (data_received, 1, TEST_TIMEOUT_MS)
Actual: false
Expected: true
../tests/nnstreamer_converter/unittest_converter.cc:414: Failure
Expected: (caps) != (nullptr), actual: NULL vs 4-byte object <00-00 00-00>
(unittest_converter:16055): GStreamer-CRITICAL **: 06:06:01.349: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed
../tests/nnstreamer_converter/unittest_converter.cc:416: Failure
Expected: (structure) != (nullptr), actual: NULL vs 4-byte object <00-00 00-00>
** (unittest_converter:16055): CRITICAL **: 06:06:01.351: gst_tensors_config_from_structure: assertion 'structure != NULL' failed
../tests/nnstreamer_converter/unittest_converter.cc:418: Failure
Expected: 1U
Which is: 1
To be equal to: config.info.num_tensors
Which is: 0
```
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 8 Mar 2022 09:40:12 +0000 (18:40 +0900)]
converter: elaborate error messages
When there is a pipeline error, especially at the construct phase,
users need elaborated error messages that provide useful infomation
to correct pipeline descriptions.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 22 Mar 2022 08:53:26 +0000 (17:53 +0900)]
common: to_string() for tensors_config & tensors_info
For debugging and logging purposes,
add to_string() functions for tensors-config and tensors-info
structures.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 28 Feb 2022 07:56:14 +0000 (16:56 +0900)]
Doc: data-types update with 2.0
NNStreamer 2.0 has updated data types significantly.
Update the documents accordingly.
Fixes #3661
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 29 Mar 2022 07:25:42 +0000 (16:25 +0900)]
filter:pytorch: use %G_GSIZE_FORMAT for printing gsize
There are different definitions for gsize.
Use %G_GSIZE_FORMAT for the portability
Note that #3699 was not portable enough.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Tue, 29 Mar 2022 03:27:30 +0000 (12:27 +0900)]
CODEOWNERS: update reviewer list
We have new members and members quiting.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
MyungJoo Ham [Mon, 28 Mar 2022 02:30:56 +0000 (11:30 +0900)]
filter:pytorch: armhf error in PPA (print format)
Fix the print format string error:
```
In file included from /usr/include/glib-2.0/glib.h:62:0,
from ../gst/nnstreamer/nnstreamer_log.h:75,
from /<<PKGBUILDDIR>>/ext/nnstreamer/tensor_filter/tensor_filter_pytorch.cc:29:
/<<PKGBUILDDIR>>/ext/nnstreamer/tensor_filter/tensor_filter_pytorch.cc: In member function ‘int TorchCore::validateOutputTensor(at::Tensor, unsigned int)’:
/usr/include/glib-2.0/glib/gmessages.h:336:43: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘gsize {aka unsigned int}’ [-Werror=format=]
__VA_ARGS__)
^
../gst/nnstreamer/nnstreamer_log.h:79:17: note: in expansion of macro ‘g_critical’
#define ml_loge g_critical
^~~~~~~~~~
/<<PKGBUILDDIR>>/ext/nnstreamer/tensor_filter/tensor_filter_pytorch.cc:348:5: note: in expansion of macro ‘ml_loge’
ml_loge ("Invalid output meta: different element size at index %d. Found size %ld while expecting size %ld. Update the tensor shape/size to resolve the error.",
^~~~~~~
/usr/include/glib-2.0/glib/gmessages.h:336:43: error: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘gsize {aka unsigned int}’ [-Werror=format=]
__VA_ARGS__)
^
../gst/nnstreamer/nnstreamer_log.h:79:17: note: in expansion of macro ‘g_critical’
#define ml_loge g_critical
^~~~~~~~~~
/<<PKGBUILDDIR>>/ext/nnstreamer/tensor_filter/tensor_filter_pytorch.cc:348:5: note: in expansion of macro ‘ml_loge’
ml_loge ("Invalid output meta: different element size at index %d. Found size %ld while expecting size %ld. Update the tensor shape/size to resolve the error.",
^~~~~~~
```
Related with #3698
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Yongjoo Ahn [Thu, 17 Mar 2022 11:25:06 +0000 (20:25 +0900)]
[test/snpe] Add unittest for snpe filter's user buffer mode
- Add two simple cases to test user buffer execution
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
Yongjoo Ahn [Tue, 15 Mar 2022 07:44:30 +0000 (16:44 +0900)]
[filter/snpe] Support "user supplied buffer" for snpe
- Support "userbuffer" for snpe filter
- With this mode, the memcpy from/into model's input/output does not occur
- Note that it only supports float type
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
gichan [Fri, 18 Mar 2022 09:34:28 +0000 (18:34 +0900)]
[converter/python3] Temporarily remove Py_Finalize
Tizen issues: After python version has been upgraded from 3.9.1 to 3.9.10, python converter is stopped at Py_Finalize.
Since Py_Initialize is not called twice from this object, Py_Finalize is temporarily removed.
Signed-off-by: gichan <gichan2.jang@samsung.com>
gichan [Fri, 18 Mar 2022 06:38:33 +0000 (15:38 +0900)]
Revert "[TEST] Disable python converter tests."
This reverts commit
96142d9582507784fc11bb115bc117f34eed625b.
Signed-off-by: gichan <gichan2.jang@samsung.com>