platform/upstream/nnstreamer.git
16 months ago[TEST] file name changed unittest_tensorRegion
HarshJ20 [Tue, 27 Jun 2023 09:59:07 +0000 (15:29 +0530)]
[TEST] file name changed unittest_tensorRegion

    - unittest_tensorRegion changed to unittest_tensor_region
    - folder name changed from nnstreamer_decoder_tensorRegion to nnstreamer_decoder_tensor_region

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months ago[TEST] SSAT based test case complete
HarshJ20 [Thu, 22 Jun 2023 06:54:17 +0000 (12:24 +0530)]
[TEST] SSAT based test case complete

    - removed unnecessary line from unittest_plugins
    - updated test pipeline in unittest_tensorRegion, runTest.sh and getCropInfo
    - tested all the python scripts, ssat test case script and unittest for tensor_region
    - Python Script for generating golden test results
    - Using tensor_filter's output for orange.png for testing to avoid uploading ssd_mobilenet_v2_coco.tflite model
    - changed Camel casing and update tests/meson.build

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months ago[TEST] Test case for tensor_decoder::tensor_region
HarshJ20 [Tue, 20 Jun 2023 06:12:04 +0000 (11:42 +0530)]
[TEST] Test case for tensor_decoder::tensor_region

    - ssat based runTest.sh [incomplete]
    - getCropInfo.py for viewing the data produces of orange.unittest_plugins
    - gtest based test case in unittest_plugins with name TensorDecoder.TensorRegion [removed]
    - temporary file removed
    - Separate test unit for tensor_region
    - included missing Doxygen tags

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months ago[trivial] Fix nms in bounding_box decoder
Yongjoo Ahn [Wed, 5 Jul 2023 04:06:01 +0000 (13:06 +0900)]
[trivial] Fix nms in bounding_box decoder

- Skip nms when the size of given array is 0

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[Common] reconfigure gst-buffer with extra tensors
Jaeyun Jung [Mon, 3 Jul 2023 07:57:31 +0000 (16:57 +0900)]
[Common] reconfigure gst-buffer with extra tensors

Handle extra tensors when reconfiguring the gst-buffer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[DataRepo] util to get data type
Jaeyun Jung [Mon, 3 Jul 2023 04:57:28 +0000 (13:57 +0900)]
[DataRepo] util to get data type

Add util function to get data type from caps.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[datareposink] Add function to write flexible tensors
hyunil park [Tue, 20 Jun 2023 10:19:48 +0000 (19:19 +0900)]
[datareposink] Add function to write flexible tensors

- To add memory to gstbuffer by number of flexible tensors when read sample in datareposrc,
  sample_offset, tensor_size, and tensor_count field are added to the JSON file
- Add unit test

- Reference
  * If caps of sink pad is flexible, the input gstBuffer is saved as a flexible tensor
  * The size of the input gstBuffer is stored as sample_offset field in JSON file and
    it will be used when shuffle operation in datareposrc
  * Each flexible tensor size is stored as tensor_size field in JSON file and
    it will be used with gst_buffer_append_memory() in datareposrc

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
16 months ago[TEST] bounding_box test with config_file
HarshJ20 [Thu, 29 Jun 2023 04:23:26 +0000 (09:53 +0530)]
[TEST] bounding_box test with config_file

    - updated the runTest.sh for nnstreamer_decoder_bounding_box including the config-file property

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months ago[FEAT] Config file for properties
HarshJ20 [Tue, 27 Jun 2023 19:53:50 +0000 (01:23 +0530)]
[FEAT] Config file for properties

    - Defined a module in nnstreamer_plugin_api_impl named gst_tensor_parse_config_file
    - Used to install new property to specify Configuration file path
    - example case included for tensor_decoder
    - updated after build checkers failed for indentation
    - Type specific setting of prop_value

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months ago[debian/rules] Add tests path of nnstreamer_datarepo to debian rules
hyunil park [Thu, 29 Jun 2023 03:41:38 +0000 (12:41 +0900)]
[debian/rules] Add tests path of nnstreamer_datarepo to debian rules

Modify to run nnstreamer_datarepo tests

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
16 months agoDist/Tizen: Fix a GBS build error due to #4007
Wook Song [Tue, 27 Jun 2023 06:11:50 +0000 (15:11 +0900)]
Dist/Tizen: Fix a GBS build error due to #4007

This patch fixes a GBS build error caused by #4007 on the SNPE
sub-plugin for Tizen.

Signed-off-by: Wook Song <wook16.song@samsung.com>
16 months ago[trivial] Fix log level warn -> info
Yongjoo Ahn [Tue, 27 Jun 2023 06:52:47 +0000 (15:52 +0900)]
[trivial] Fix log level warn -> info

- Decrease log level since the line is in proper scenario when the
  num_tensors is exactly 16.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[DataRepo] util to get nth info
Jaeyun Jung [Tue, 27 Jun 2023 12:21:05 +0000 (21:21 +0900)]
[DataRepo] util to get nth info

Prepare extra tensors, use util function to get nth info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[DataRepo] enum of incoming data type
Jaeyun Jung [Tue, 27 Jun 2023 10:20:33 +0000 (19:20 +0900)]
[DataRepo] enum of incoming data type

Define new enum of incoming data type for data-repo elements.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Common] magic number for flex-tensor
Jaeyun Jung [Tue, 27 Jun 2023 08:55:39 +0000 (17:55 +0900)]
[Common] magic number for flex-tensor

Add magic to tensor-meta, this indicates given memory block is flexible tensor.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Common] validate tensor-info accepted/tizen/unified/20230628.023656
Jaeyun Jung [Tue, 27 Jun 2023 03:25:02 +0000 (12:25 +0900)]
[Common] validate tensor-info

Param error case, validate tensor-info before appending new memory.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[CodeClean] use util func for extra tensors
Jaeyun Jung [Mon, 26 Jun 2023 05:44:37 +0000 (14:44 +0900)]
[CodeClean] use util func for extra tensors

Code clean, remove unnecessary local val and use util function to handle extra tensors.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months agoRevert "Filter/Meson: Move 'filter-snpe-list' to the build directory" accepted/tizen/7.0/unified/20230627.014905
gichan2-jang [Mon, 26 Jun 2023 06:34:40 +0000 (15:34 +0900)]
Revert "Filter/Meson: Move 'filter-snpe-list' to the build directory"

This reverts commit 2d6bc59653dab21bf1706d61a06c205c10583a92.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
16 months ago[tensor_crop] Push EOS event
gichan2-jang [Fri, 23 Jun 2023 04:58:36 +0000 (13:58 +0900)]
[tensor_crop] Push EOS event

Push eos event to src pad when collect pad is set to EOS state.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
16 months ago[Fix] fix svace issue.
SuYeon [Wed, 21 Jun 2023 06:51:14 +0000 (15:51 +0900)]
[Fix] fix svace issue.

Fix overflow before widen (distance value in 'g_array_set_size' func).

Signed-off-by: SuYeon <suyeon5.kim@samsung.com>
16 months ago[Fix] fix svace issue.
SuYeon [Wed, 21 Jun 2023 03:42:23 +0000 (12:42 +0900)]
[Fix] fix svace issue.

Fix data type of distance value in 'g_array_set_size' (gint -> guint64)

Signed-off-by: SuYeon <suyeon5.kim@samsung.com>
16 months ago[Fix] fix coverity & svace issues
SuYeon [Fri, 16 Jun 2023 02:00:17 +0000 (11:00 +0900)]
[Fix] fix coverity & svace issues

Fix coverity issues.
 - Fix resource leak (free 'dim_str' in '_custom_easy_filter_dynamic' function)
 - Delete unused 'cIdx' value in 'g_array_sort' function.
 - Fix 'g_strlcpy' return value and check fail to copy 'caps_str'.

Fix svace issue.
 - Fix data type of distance value in 'g_array_set_size'(gint ->guint64)

Signed-off-by: SuYeon <suyeon5.kim@samsung.com>
16 months agoRefactor tensor_region.c in regard to PR feedback
HarshJ20 [Fri, 16 Jun 2023 17:37:00 +0000 (23:07 +0530)]
Refactor tensor_region.c in regard to PR feedback

    - fixed the name of parameter in gst_tensor_top_detectedObjects_cropInfo
    - constified recommended pointer parameters and unconstified scalars
    - Added SPDX identifier
    - caps updated

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months agoAddress feedback from PR#4115
HarshJ20 [Fri, 16 Jun 2023 11:32:31 +0000 (17:02 +0530)]
Address feedback from PR#4115

    - changed "finalize" function to "gst_tensor_top_detectedObjects_cropInfo"
    - introduced new function "init_meta" to intialize flexible tensor header info for tensor_crop
    - changed the string value in GstOutCaps for updating Caps info
    - checked the resulting buffer's data with the intended result

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months agoTensor_region subplugin, currently supports mobilenet_ssd
Harshj20 [Thu, 15 Jun 2023 03:42:37 +0000 (09:12 +0530)]
Tensor_region subplugin, currently supports mobilenet_ssd

    - updated nnstreamer.mk for tensor_region.c
    - A subplugin for tensor_decoder for providing cropping info to tensor-crop element
    - Code cleaned, global scalability for supporting other models
    - @brief tags added for init_modes, finalize, getOutCaps and nms functions
    - pre-build for ubuntu passed
    - newline added
    - multi line comments properly configured

Signed-off-by: HarshJ20 <hjain24in@gmail.com>
16 months ago[filter] Show deprecate message for tflite1 filter
Yongjoo Ahn [Tue, 13 Jun 2023 07:18:05 +0000 (16:18 +0900)]
[filter] Show deprecate message for tflite1 filter

- tflite1 is going to be dropped in Tizen image.
- Show deprecate warning message when the tflite1 subplugin is opened
  and in build time.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[Common] data size of extra tensor
Jaeyun Jung [Mon, 19 Jun 2023 04:41:59 +0000 (13:41 +0900)]
[Common] data size of extra tensor

Fix util function, getting tensor size of extra tensor.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Common/Doc] removed param
Jaeyun Jung [Mon, 19 Jun 2023 04:38:42 +0000 (13:38 +0900)]
[Common/Doc] removed param

Update doc, delete unnecessary param. (It was removed from prev PR.)

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[common] Increase tensor_size_extra_limit to 240
Yongjoo Ahn [Tue, 13 Jun 2023 06:28:07 +0000 (15:28 +0900)]
[common] Increase tensor_size_extra_limit to 240

- Making the total size limit to be 256 (16 + 240)
- TODO: Set NNS_TENSOR_SIZE as 256 and update other source codes
  accordingly

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[fix] Fix a source file using clang-format
Yongjoo Ahn [Tue, 13 Jun 2023 06:11:46 +0000 (15:11 +0900)]
[fix] Fix a source file using clang-format

- Apply clang-format-15 to the file `unittest_sink.cc`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[util] Fix the signature of gst_tensor_buffer_get_nth_meory
Yongjoo Ahn [Tue, 13 Jun 2023 05:43:36 +0000 (14:43 +0900)]
[util] Fix the signature of gst_tensor_buffer_get_nth_meory

- Remove unused argument of GstTensorsInfo.
- Fix used lines.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[Common] unnecessary mem-map calls
Jaeyun Jung [Mon, 12 Jun 2023 07:12:01 +0000 (16:12 +0900)]
[Common] unnecessary mem-map calls

Code clean, reduce duplicated mem-map calls for extra tensor memory.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Filter] Support dynamic invoke
gichan2-jang [Mon, 12 Jun 2023 05:50:08 +0000 (14:50 +0900)]
[Filter] Support dynamic invoke

 - Support dynamic invoke
 - dynamic invoke function is added for custom-easy filter.
 - New custom callback and register function is added.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
17 months ago[CodeClean] util function for caps
Jaeyun Jung [Thu, 8 Jun 2023 07:28:15 +0000 (16:28 +0900)]
[CodeClean] util function for caps

Code clean, fix indent and use util function for gst-caps.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[CodeClean/RepoSink] unnecessary lines
Jaeyun Jung [Thu, 8 Jun 2023 08:38:14 +0000 (17:38 +0900)]
[CodeClean/RepoSink] unnecessary lines

Code clean, cleanup unnecessary lines.
- fix data type from gst-buffer
- handle error message

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Common] fix tensor dimension compare util
Yelin Jeong [Wed, 7 Jun 2023 01:00:34 +0000 (10:00 +0900)]
[Common] fix tensor dimension compare util

This patch fixes `gst_tensor_dimension_is_equal`
and adds unittests.

Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
17 months ago[Fillter] Change custom-easy filter version from v0 to v1 accepted/tizen/7.0/unified/20230621.051151 accepted/tizen/unified/20230609.163737
gichan [Wed, 26 Apr 2023 10:38:39 +0000 (19:38 +0900)]
[Fillter] Change custom-easy filter version from v0 to v1

Change custom-easy filter version from v0 to v1

Signed-off-by: gichan <gichan2.jang@samsung.com>
Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
17 months ago[Filter] Update filter subplugin interface
gichan [Tue, 25 Apr 2023 08:14:59 +0000 (17:14 +0900)]
[Filter] Update filter subplugin interface

Update filter subplugin v1 interface to support dynamic invoke.
Output tensors info should be filled by filter subplugin for dynamic
invoke.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
17 months ago[TEST] Add testcase for flexible tensor_filter
gichan [Wed, 12 Apr 2023 05:00:36 +0000 (14:00 +0900)]
[TEST] Add testcase for flexible tensor_filter

 - Testcase for flexible tensor filter is disabled and activate after
development is done.
 - In order to invoke tensor_filter with flexible input/output, you need to specify custom option.
  ex) ... ! tensor_filter framework=... invoke-dynamic=TRUE model=... ! ...

Signed-off-by: gichan <gichan2.jang@samsung.com>
17 months ago[decoder] Fix logic error in box tracking
Yongjoo Ahn [Fri, 2 Jun 2023 09:31:28 +0000 (18:31 +0900)]
[decoder] Fix logic error in box tracking

- Fix to calculate correct distance value between centroid and box
- Initialize tracking_id with 0 for yolov5 decode mode

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[datareposrc] For caps negotiation, use the caps of the JSON file
hyunil park [Wed, 26 Apr 2023 06:14:26 +0000 (15:14 +0900)]
[datareposrc] For caps negotiation, use the caps of the JSON file

- For caps negotiation, use the caps of the JSON file
- Remove supportable caps and add 'ANY'
- Add caps property for setting caps of unregistered file (have not JSON)
- Add unittest

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
17 months ago[tensor_trainer] Save the stats information of the model to output tensors
hyunil park [Thu, 25 May 2023 02:15:19 +0000 (11:15 +0900)]
[tensor_trainer] Save the stats information of the model to output tensors

Whenever one of the epochs is completed, the stats information of the model being trained
in subplugin is stored in the output tensor.

- Apply getStatus to get status of subplugin
- Add new internal API(nnstreamer_trainer_notify_event()) to get event from subplugin
- Add function to write stats to output tensors

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
17 months ago[API][tensor_trainer] Add event notifier and getStatus callback pointer
hyunil park [Fri, 12 May 2023 02:18:56 +0000 (11:18 +0900)]
[API][tensor_trainer] Add event notifier and getStatus callback pointer

Add GstTensorTrainerEventNotifier to get event from subplugin
- subplugin must send event to tensor_trainer with this notifier by internal API
- Add GstTensorTrainerEventType
- Add new internal API: nnstreamer_trainer_notify_event(notifier, event_type, data)

Add getStatus callback pointer to GstTensorTrainerFramework.
- Call this to get status of subplugin

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
17 months ago[Common] prepare 0-init dimension
Jaeyun Jung [Fri, 19 May 2023 07:17:18 +0000 (16:17 +0900)]
[Common] prepare 0-init dimension

Prepare increasing max rank and 0-init dimension case.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Build] missed libs in debian package
Jaeyun Jung [Mon, 22 May 2023 08:05:12 +0000 (17:05 +0900)]
[Build] missed libs in debian package

Add missed libraries in debian package.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Common] util to compare dimensions
Jaeyun Jung [Fri, 19 May 2023 05:28:03 +0000 (14:28 +0900)]
[Common] util to compare dimensions

Add util function to compare tensor dimensions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[trivial] Fix yocto build badge in README
Yongjoo Ahn [Fri, 26 May 2023 05:39:40 +0000 (14:39 +0900)]
[trivial] Fix yocto build badge in README

- Yocto daily build targets aarch64. Change build badge position right.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[decoder] Add "tracking" feature for bounding boxes
Yongjoo Ahn [Mon, 15 May 2023 08:27:08 +0000 (17:27 +0900)]
[decoder] Add "tracking" feature for bounding boxes

- If the property is given as  `... option6=1 ...`, result bounding boxes will be marked with unique IDs.
- Centroid based track algorithm is used. It calculate every euclidean centroid distance among previous boxes and incoming boxes. And match from the least distance pair.

NOTE that this is too naive and trivial to be applied to production level application. Use it for test purpose.

If you need more information about object tracking task, refer https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvtracker.html

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[Filter] PyTorch, ignore extra output tensors
Torsten Schulz [Tue, 9 May 2023 23:56:18 +0000 (16:56 -0700)]
[Filter] PyTorch, ignore extra output tensors
Allow tensor_filter to be configured with smaller number of output tensors than PyTorch returns natively.

Signed-off-by: Torsten Schulz <torsten.schulz@gmail.com>
17 months ago[Test] missed testcases in spec file
Jaeyun Jung [Mon, 22 May 2023 07:29:19 +0000 (16:29 +0900)]
[Test] missed testcases in spec file

For test coverage, add missed testcases when running unittest in tizen build.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Common] duplicated lines
Jaeyun Jung [Fri, 12 May 2023 08:35:58 +0000 (17:35 +0900)]
[Common] duplicated lines

Code clean, remove duplicated lines using util function.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Common] condition to release extra info
Jaeyun Jung [Fri, 19 May 2023 05:15:18 +0000 (14:15 +0900)]
[Common] condition to release extra info

Remove unnecessary log-print, most pipelines does not have extra info and dont need releasing extra info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Meson/Test] testcases for datarepo
Jaeyun Jung [Fri, 19 May 2023 08:13:28 +0000 (17:13 +0900)]
[Meson/Test] testcases for datarepo

Fix meson script, build testcases of datarepo when option is enabled.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months agodatarepo: dependency management.
MyungJoo Ham [Wed, 17 May 2023 05:55:10 +0000 (14:55 +0900)]
datarepo: dependency management.

Datarepo has its own unique dependency.
Thus, make datarepo optional at build so that
we can cut the dependency.

It's set "enabled by default" because most
releases will be using it anyway.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
18 months ago[Test] parse error msg
Jaeyun Jung [Fri, 19 May 2023 05:09:41 +0000 (14:09 +0900)]
[Test] parse error msg

For debug mode, parse error message received from pipeline.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months agoreadme: add linux foundation badge
MyungJoo Ham [Wed, 17 May 2023 10:42:51 +0000 (19:42 +0900)]
readme: add linux foundation badge

The badges are from
https://github.com/lfai/artwork/blob/main/lfaidata-assets/lfaidata-project-badge/README.md

Fixes #4036

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
18 months ago[CodeClean] util to compare dimensions
Jaeyun Jung [Mon, 15 May 2023 10:44:13 +0000 (19:44 +0900)]
[CodeClean] util to compare dimensions

Code clean, common function to compare tensor dimensions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[Trainer] parse config in caps event
Jaeyun Jung [Tue, 16 May 2023 10:14:50 +0000 (19:14 +0900)]
[Trainer] parse config in caps event

Fix invalid tensor-config,
1. parse config when receiving caps event.
2. init/free config in start/finalize callback.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[CodeClean] fix indent and unnecessary space
Jaeyun Jung [Tue, 16 May 2023 10:53:53 +0000 (19:53 +0900)]
[CodeClean] fix indent and unnecessary space

Code clean, fix indent and remove unnecessary space.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[Test] enable testcases for tf-lite
Jaeyun Jung [Fri, 12 May 2023 08:42:35 +0000 (17:42 +0900)]
[Test] enable testcases for tf-lite

Run testcases when tf-lite ver 2.x is enabled.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[Common] allocate extra info
Jaeyun Jung [Fri, 12 May 2023 06:23:30 +0000 (15:23 +0900)]
[Common] allocate extra info

Clearly allocate extra info array in tensors-info struct, and remove unnecessary log line.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[tensor_trainer] Get TensorsInfo from negotiated caps instead of property
hyunil park [Wed, 3 May 2023 06:03:49 +0000 (15:03 +0900)]
[tensor_trainer] Get TensorsInfo from negotiated caps instead of property

- Get TensorsInfo from negotiated caps
- Remove input-type and input-dim property

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[CodeClean] missed tags
Jaeyun Jung [Fri, 12 May 2023 06:20:49 +0000 (15:20 +0900)]
[CodeClean] missed tags

Code clean, add brief tag of newly added functions.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[TEST] remove meaningless test
SuYeon [Fri, 12 May 2023 01:53:52 +0000 (10:53 +0900)]
[TEST] remove meaningless test

 - remove meaningless test
 - issue has been resolved

Signed-off-by: SuYeon <suyeon5.kim@samsung.com>
18 months ago[Debian] Update ubuntu control file
gichan [Thu, 4 May 2023 10:41:24 +0000 (19:41 +0900)]
[Debian] Update ubuntu control file

 - Add json-glib-dev dep
 - Remove python2, tf, tf-lite

Signed-off-by: gichan <gichan2.jang@samsung.com>
18 months ago[Filter] Add doxygen tag for mxnet subplugin
gichan [Tue, 2 May 2023 08:28:54 +0000 (17:28 +0900)]
[Filter] Add doxygen tag for mxnet subplugin

Add missing doxygen tag for mxnet tensor filter subplugin.

Signed-off-by: gichan <gichan2.jang@samsung.com>
18 months agoApply clang format to cpp files
www-data [Wed, 3 May 2023 07:06:02 +0000 (16:06 +0900)]
Apply clang format to cpp files

Apply clang format to all files

Signed-off-by: www-data <www-data@ip-172-31-18-85.ap-northeast-2.compute.internal>
18 months ago[MQTT] Change string copy
gichan [Thu, 27 Apr 2023 06:15:47 +0000 (15:15 +0900)]
[MQTT] Change string copy

Change string copy to avoid gcc-12 build error.

Signed-off-by: gichan <gichan2.jang@samsung.com>
18 months ago[datareposink] Change the Confirm file creation part in TC
hyunil park [Mon, 24 Apr 2023 02:33:26 +0000 (11:33 +0900)]
[datareposink] Change the Confirm file creation part in TC

- Change the confirm file creation
- Move ASSERT

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months agoUpdate tutorial2_object_detection.md
pasteldream-ps [Thu, 6 Apr 2023 14:32:37 +0000 (23:32 +0900)]
Update tutorial2_object_detection.md

Add `nnstreamer-tensorflow2-lite` package to the install instruction in the tutorial

Signed-off-by: pasteldream-ps <128911696+pasteldream-ps@users.noreply.github.com>
18 months ago[Tizen] Exclude test files for SAM
gichan [Mon, 24 Apr 2023 04:08:24 +0000 (13:08 +0900)]
[Tizen] Exclude test files for SAM

Exclude test files for SAM

Signed-off-by: gichan <gichan2.jang@samsung.com>
18 months ago[SVACE] Fix SVACE and coverity issue accepted/tizen/unified/20230424.185348
hyunil park [Fri, 21 Apr 2023 10:26:55 +0000 (19:26 +0900)]
[SVACE] Fix SVACE and coverity issue

- Fix SVACE and coverity issue

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[common] Set as error when flexible tensor is requsted for extra tensor
Yongjoo Ahn [Fri, 21 Apr 2023 09:07:38 +0000 (18:07 +0900)]
[common] Set as error when flexible tensor is requsted for extra tensor

- Extra tensors does not yet support flexible tensor.
- Set this case as error.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Change the value of NNS_TENSOR_SIZE_EXTRA_LIMIT 200 -> 100
Yongjoo Ahn [Fri, 21 Apr 2023 08:54:14 +0000 (17:54 +0900)]
[common] Change the value of NNS_TENSOR_SIZE_EXTRA_LIMIT 200 -> 100

- Large stack use can be dangerous, decrease the value.
- 100 is still enough to the criteria

TODO: Change the tensor_filter code to allocate dynamically extra infos

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[TEST] Add TC for datarepo and tensor_trainer validation
hyunil park [Fri, 21 Apr 2023 04:22:11 +0000 (13:22 +0900)]
[TEST] Add TC for datarepo and tensor_trainer validation

- Add datareposrc TC
- Add datareposink TC
- Add tensor_trainer TC

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[datareposrc] Add tensor-sequence property
hyunil park [Fri, 24 Mar 2023 10:52:52 +0000 (19:52 +0900)]
[datareposrc] Add tensor-sequence property

- Tensors in a sample are read into gstBuffer according to input sequence.
- Only read the set tensors among all tensors in a sample.
- It is for other/tensors and default value is NULL.
- Add checking int param value

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[datareposink] Add json property
hyunil park [Mon, 10 Apr 2023 05:20:21 +0000 (14:20 +0900)]
[datareposink] Add json property

- Add setting JSON file path to write the meta information of a sample data
- Write gstreamer caps, sample size, and number of total samples
- In the case of flexible tensors, write the offset of each sample except the sample size

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[datareposrc] Add json property
hyunil park [Fri, 17 Mar 2023 05:23:31 +0000 (14:23 +0900)]
[datareposrc] Add json property

- Add setting json file path to read meta information of the file specified as locaton
- Add function to read and validate JSON file for each types
- The sample size is calculated from reading JSON file

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[API][tensor_trainer] Change type of structure member variable
hyunil park [Mon, 17 Apr 2023 05:42:59 +0000 (14:42 +0900)]
[API][tensor_trainer] Change type of structure member variable

- Change from int64_t to unsigned int
- Bug-fix: When passing values to a sub-plugin in an arm 32bit environment, invalid values are passed.
- Add function to Check invalid param
- Remove default framework
- Change some default value

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[test] Add a tflite inference test with 32 in/output model
Yongjoo Ahn [Thu, 23 Feb 2023 09:29:47 +0000 (18:29 +0900)]
[test] Add a tflite inference test with 32 in/output model

- Add a simple tflite model file with 32 inputs whose return
  values are 32 outputs (add 1.0 to each input)
- Add a unittest to test inference of the model.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[filter] Fix tflite filter to handle extra tensors
Yongjoo Ahn [Thu, 23 Feb 2023 09:27:10 +0000 (18:27 +0900)]
[filter] Fix tflite filter to handle extra tensors

- Change the configuration methods to handle extra tensors

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[filter] Fix tensor_filter to support extra tensors
Yongjoo Ahn [Thu, 23 Feb 2023 09:25:07 +0000 (18:25 +0900)]
[filter] Fix tensor_filter to support extra tensors

- Fix the transform method to handle buffers containing extra tensors

TODO: handle input/output combi
Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Add a util getting number of tensors in GstBuffer
Yongjoo Ahn [Thu, 23 Feb 2023 09:10:26 +0000 (18:10 +0900)]
[common] Add a util getting number of tensors in GstBuffer

- Add function `gst_buffer_n_tensor` returns the number of
  total tensors in the given GstBuffer.
- This considers the extra tensors reside in the last GstMemory

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Fix util _is_structure_dimensions_same
Yongjoo Ahn [Thu, 23 Feb 2023 09:04:18 +0000 (18:04 +0900)]
[common] Fix util _is_structure_dimensions_same

-  Add calls to init and free tensors_info

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Add a util for get tensor info from tensors_info
Yongjoo Ahn [Thu, 23 Feb 2023 09:00:32 +0000 (18:00 +0900)]
[common] Add a util for get tensor info from tensors_info

- Add a util getting nth info from given tensors_info

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Fix util functions for tensors info
Yongjoo Ahn [Thu, 23 Feb 2023 08:48:51 +0000 (17:48 +0900)]
[common] Fix util functions for tensors info

- Let those util functions handle the extra info.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Fix create/free of extra tensor info
Yongjoo Ahn [Thu, 23 Feb 2023 08:40:13 +0000 (17:40 +0900)]
[common] Fix create/free of extra tensor info

- Do not clear existing extra info in the create function.
- Set null after free the memory.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[datareposink] Add supportable caps and writing function according to the media type
hyunil park [Mon, 3 Apr 2023 07:07:41 +0000 (16:07 +0900)]
[datareposink] Add supportable caps and writing function according to the media type

- Add supportable caps
  other/tensors, video/x-raw, audio/x-raw, text/x-raw, application/octet-stream
  image/png, image/jpeg, image/tiff, image/gif
- Get media_type from caps
- Add a function to write a file according to the media type,
  images are written as multi-files

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[datareposrc] Add is-shuffle property
hyunil park [Fri, 10 Mar 2023 06:04:08 +0000 (15:04 +0900)]
[datareposrc] Add is-shuffle property

- If the value is true, samples index are shuffled, default value is true
- The sample index is the order in which samples are stored in the file, starting from 0

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[EDGE] Add MQTT data transmission test
gichan [Wed, 15 Mar 2023 08:15:47 +0000 (17:15 +0900)]
[EDGE] Add MQTT data transmission test

Add run test for MQTT data transmission of edgesrc/sink.

Signed-off-by: gichan <gichan2.jang@samsung.com>
18 months ago[test] Add test for tensor_mux with 20 sinkpads
Yongjoo Ahn [Thu, 9 Feb 2023 12:50:26 +0000 (21:50 +0900)]
[test] Add test for tensor_mux with 20 sinkpads

- Add a testcase of tensor_mux with 20 sinkpads

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Fix gst_tensors_config_from_structure to support extra tensors
Yongjoo Ahn [Thu, 9 Feb 2023 13:00:47 +0000 (22:00 +0900)]
[common] Fix gst_tensors_config_from_structure to support extra tensors

- if num_tensors is larger than NNS_TENSOR_SIZE_LIMIT, create extra info
  in the tensors info

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[common] Update gst_tensor_time_sync_buffer_from_collectpad to support extra tensors
Yongjoo Ahn [Thu, 9 Feb 2023 12:46:33 +0000 (21:46 +0900)]
[common] Update gst_tensor_time_sync_buffer_from_collectpad to support extra tensors

- Fix the api to collect buffer from pads more than NNS_TENSOR_SIZE_LIMIT.
- This api currently used in the tensor_mux and tensor_merge.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[tensor_mux] Free tensors_config in finalize function.
Yongjoo Ahn [Thu, 9 Feb 2023 12:45:45 +0000 (21:45 +0900)]
[tensor_mux] Free tensors_config in finalize function.

- Free configured tensors_config in the finalization.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[datareposrc] Add start/stop-sample-index and epochs property
hyunil park [Fri, 10 Feb 2023 09:16:51 +0000 (18:16 +0900)]
[datareposrc] Add start/stop-sample-index and epochs property

- Add start-sample-index and stop-sample-index for setting
  range of files or samples to read (set none, set both, or set one)
- Add epochs property to set number of repetitions,
  datareposrc read range of files or samples for epochs
- Add gst_base_src_set_live and move start function to create function.
  a. datareposrc can get media type and size after set_caps(), but
     set_caps is completed after PAUSED_TO_PLAYING.
  b. filling the buffer should be pending until set_caps().
  c. datareposrc is a live source.

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
19 months ago[tensor_trainer] Modify query caps to support negotiation with fixed caps of peers
hyunil park [Mon, 30 Jan 2023 02:16:06 +0000 (11:16 +0900)]
[tensor_trainer] Modify query caps to support negotiation with fixed caps of peers

- Support negotiation without tensor_converter
- Modify Example launch line

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
19 months ago[datareposrc] Add supportable caps and function to read file
hyunil park [Wed, 8 Feb 2023 06:37:30 +0000 (15:37 +0900)]
[datareposrc] Add supportable caps and function to read file

- Add supportable caps
  other/tensors, video/x-raw, audio/x-raw, text/x-raw, application/octet-stream
  image/png, image/jpeg, image/tiff, image/gif

- Add get_caps and set_caps function for caps negotiation

- Get media mimetype and media size after set_caps
  a. get video size (Byte/frame)
  b. get audio size (Bps)
  c. get tensor type size

- Add function to read file from the MLOps Data repository
  a. In case of tensors, tensors data are added to a single gstbuffer.
  b. In case of image files, a image file is added to a single gstbuffer,
     Images are numbered files
  c. In other cases, data of size calculated in set_caps is added to a singgle gstbuffer

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
19 months ago[tensor_trainer] Add epochs property
hyunil park [Thu, 5 Jan 2023 07:13:12 +0000 (16:13 +0900)]
[tensor_trainer] Add epochs property

- Add epochs property to inform the total amount of data subplugin can receive
- tensor_trainer should receive total number of samples (num-training-samples + num-validation-samples) * epochs
- Change data type of some properties from uint to int64
- Modify Example launch

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
19 months ago[Tests] Move generateTest script to non-optional test directory
Alexi Birlinger [Wed, 12 Apr 2023 07:58:50 +0000 (09:58 +0200)]
[Tests] Move generateTest script to non-optional test directory

Script 'generateTest.py' location induces ssat test failures for platform not supporting
Pytorch as meson build set nnstreamer_filter_pytorch only if 'pytorch_support_is_available'
flag is true.

Move 'generateTest.py' script to nnstreamer_converter directory as this test suite is
installed by default. This location has been selected for two main reasons:
    - nnstreamer_converter is using this script
    - another script used in the same way was already located in this directory

Signed-off-by: Alexi Birlinger <alexi.birlinger@nxp.com>
19 months ago[test] Fix unittest_sink with recent change in GstTensorsInfo
Yongjoo Ahn [Thu, 9 Feb 2023 12:38:32 +0000 (21:38 +0900)]
[test] Fix unittest_sink with recent change in GstTensorsInfo

- Add init and free of tensors_info in the callback

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>