platform/core/api/machine-learning.git
19 months ago[lcov] Change directory before generate html result.
gichan [Wed, 21 Dec 2022 10:35:15 +0000 (19:35 +0900)]
[lcov] Change directory before generate html result.

After gcno files path was changed from the absolute path to the relative path, the codes of coverage were not properly displayed. Change the build directory before generating the html result.

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[build/android] Add missing arg in build.gradle
Yongjoo Ahn [Mon, 19 Dec 2022 04:33:15 +0000 (13:33 +0900)]
[build/android] Add missing arg in build.gradle

- Add missing arg NNSTREAMER_EDGE_ROOT in build.gradle

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
19 months ago[Meson] cleanup dependencies to common library
Jaeyun [Tue, 13 Dec 2022 09:56:40 +0000 (18:56 +0900)]
[Meson] cleanup dependencies to common library

Code clean, declare dependency to common library and cleanup meson script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
19 months ago[meson] Construct paths automatically not manually.
gichan [Fri, 9 Dec 2022 05:48:18 +0000 (14:48 +0900)]
[meson] Construct paths automatically not manually.

Costruct paths automatically ussing `files` not manually.
This patch fixes wrong object file names.
Foe example:
before:
_home_abuild_rpmbuild_BUILD_capi-machine-learning-inference-1.8.3_c_src_ml-api-inference-internal.c.o
after: src_ml-api-inference-internal.c.o

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[Tizen] Generate packages for automation test tools
gichan [Thu, 8 Dec 2022 07:13:51 +0000 (16:13 +0900)]
[Tizen] Generate packages for automation test tools

 - Generate gcov and unittest package with "gcov 1" option for tizen test
automation tools.

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[android] Add a testcase for tensor_query
Yongjoo Ahn [Mon, 17 Oct 2022 07:44:43 +0000 (16:44 +0900)]
[android] Add a testcase for tensor_query

- Add a simple Pipeline API TC for tensor_query.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
19 months ago[android/build] Build tensor_query with nnstreamer-edge sources
Yongjoo Ahn [Fri, 14 Oct 2022 01:48:37 +0000 (10:48 +0900)]
[android/build] Build tensor_query with nnstreamer-edge sources

- Define source files to build tensor_query elements.
- User should set envvar "NNSTREAMER_EDGE_ROOT" (path to nnstreamer-edge source dir)
  to build tensor_query.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
19 months ago[Common] mem leak case
Jaeyun [Tue, 29 Nov 2022 05:12:31 +0000 (14:12 +0900)]
[Common] mem leak case

Fix mem leak case when failed to create data handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
20 months ago[TEST] Initialize tensors info
Gichan Jang [Thu, 24 Nov 2022 02:08:36 +0000 (11:08 +0900)]
[TEST] Initialize tensors info

 - Initialize tensors info to fix build warning

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
21 months ago[android] Fix snpe test of multiple moutput model
Yongjoo Ahn [Fri, 14 Oct 2022 07:59:25 +0000 (16:59 +0900)]
[android] Fix snpe test of multiple moutput model

- Fix the snpe filter test. The usage of multiple output model was changed.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
21 months ago[C-Api/Service] clearly check returned errcode
Jaeyun [Wed, 5 Oct 2022 05:32:30 +0000 (14:32 +0900)]
[C-Api/Service] clearly check returned errcode

Code clean, clearly check returned error code of ML API.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[C-Api] feature for float16 type
Jaeyun [Tue, 4 Oct 2022 04:16:40 +0000 (13:16 +0900)]
[C-Api] feature for float16 type

Code clean, update feature name (same with nnstreamer repo) and size of float16 type.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[Test] update test
Jaeyun [Tue, 4 Oct 2022 04:20:19 +0000 (13:20 +0900)]
[Test] update test

1. Fix invalid test name, to run unittest of data utils.
2. Code clean, add more negative testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[Version] update version to 1.8.3
Jaeyun [Fri, 30 Sep 2022 03:06:07 +0000 (12:06 +0900)]
[Version] update version to 1.8.3

Release 1.8.2 for Tizen 7.0 M2. Start implementation for next release (v1.8.3).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[agent] Fix occasional hanging issue when destroy certain pipelines accepted/tizen_7.0_unified_hotfix accepted/tizen/7.0/unified/20221110.060356 accepted/tizen/7.0/unified/hotfix/20221116.104706 accepted/tizen/unified/20221001.053450 tizen_7.0_m2_release
Yongjoo Ahn [Wed, 28 Sep 2022 06:51:34 +0000 (15:51 +0900)]
[agent] Fix occasional hanging issue when destroy certain pipelines

- When pipeline is destroyed, agent tried to set its state as GST_STATE_NULL.
- However, pipelines which contain tensor_query_* elements make hanging
  when change te state. To resolve this, as a workaround, this commit just unref it.
- After fix this issue in tensor_query / nnstreamer-edge, revive this code.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
21 months ago[agent] Remove lock in freeing pipeline instances
Yongjoo Ahn [Wed, 28 Sep 2022 06:47:49 +0000 (15:47 +0900)]
[agent] Remove lock in freeing pipeline instances

- Remove lock/unlock when freeing pipeline instances

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[test] Add more negative testcases for ml-service APIs accepted/tizen/unified/20220928.020841
Yongjoo Ahn [Mon, 26 Sep 2022 11:20:01 +0000 (20:20 +0900)]
[test] Add more negative testcases for ml-service APIs

- Add more negative testcases for ml-service APIs

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[Version] prepare release ver 1.8.2
Jaeyun [Mon, 26 Sep 2022 06:41:22 +0000 (15:41 +0900)]
[Version] prepare release ver 1.8.2

Update version info for tizen release (ver 1.8.2).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[test] Add unittest for ml-service
Yongjoo Ahn [Mon, 26 Sep 2022 08:25:31 +0000 (17:25 +0900)]
[test] Add unittest for ml-service

- Add negative TCs for launch and get_state APIs
- Add testcases with explicitly corrupted parameters.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add code for inavlid parameters
Yongjoo Ahn [Mon, 26 Sep 2022 08:23:48 +0000 (17:23 +0900)]
[service] Add code for inavlid parameters

- Add code for handling invalid parameters in ml_service_destroy and
  ml_service_get_pipeline_state.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[agent] Fix return value of dbus method invoc accepted/tizen/unified/20220925.234928 accepted/tizen/unified/20220925.234956 accepted/tizen/unified/20220926.025521
Yongjoo Ahn [Thu, 22 Sep 2022 08:50:44 +0000 (17:50 +0900)]
[agent] Fix return value of dbus method invoc

- Fix return values of method to TRUE cause all the call is success
- This fix recent ASAN issue

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[coverity] Check return value in query_client cb
Yongjoo Ahn [Mon, 19 Sep 2022 08:24:20 +0000 (17:24 +0900)]
[coverity] Check return value in query_client cb

- Check return values in sink callback

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[query] Fix mem leaks in query client
Yongjoo Ahn [Thu, 15 Sep 2022 04:32:24 +0000 (13:32 +0900)]
[query] Fix mem leaks in query client

- Fix mem leaks in query client and its unittests

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[spec] Disable ml-service for tv profile
Yongjoo Ahn [Fri, 16 Sep 2022 04:56:52 +0000 (13:56 +0900)]
[spec] Disable ml-service for tv profile

- Disable ml-service for tv profile

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[debian] Exclude ml-service from debain packaging
Yongjoo Ahn [Thu, 15 Sep 2022 09:11:15 +0000 (18:11 +0900)]
[debian] Exclude ml-service from debain packaging

- Exclude ml-service from debian cause it is not available.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[build] Build/package ml-service when the option is given
Yongjoo Ahn [Thu, 15 Sep 2022 06:12:21 +0000 (15:12 +0900)]
[build] Build/package ml-service when the option is given

- Build/Package ml-service related files only whne the option is given
- Change the meson option name `enable-machine-learning-agent` to
  `enable-ml-service`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[Svace] fix res leak accepted/tizen/unified/20220919.012625
Jaeyun [Wed, 14 Sep 2022 11:27:03 +0000 (20:27 +0900)]
[Svace] fix res leak

Fix svace issue, mem leak case.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[test] Add a testcase to test ml_service_query_create
Yongjoo Ahn [Wed, 14 Sep 2022 07:38:37 +0000 (16:38 +0900)]
[test] Add a testcase to test ml_service_query_create

- Test if 'caps' is set or not.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[query] Code clean and fix resource memleak
Yongjoo Ahn [Wed, 14 Sep 2022 07:36:42 +0000 (16:36 +0900)]
[query] Code clean and fix resource memleak

- Return error when the caps is not set by ml_option
- Free allocated variables and remove unused 'caps' member.
- Destroy pipe handle in error case.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add unittest for query client
Yongjoo Ahn [Wed, 31 Aug 2022 12:07:53 +0000 (21:07 +0900)]
[service] Add unittest for query client

- Add simple unittests for using query client APIs.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Implement query client APIs
Yongjoo Ahn [Wed, 31 Aug 2022 12:07:28 +0000 (21:07 +0900)]
[service] Implement query client APIs

- Implement two query client APIs: ml_service_query_create and
  ml_service_query_request
- ml_service_query_create creates a query client handle with given
  ml-option instance. The handle maintains a gstreamer pipeline with
  description:
"appsrc ! other/tensors,... (caps string given with ml-option) ! \
 tensor_query_client ... (props given with ml-option) ! tensor_sink"
- ml_service_query_request takes an input tensor and feed it to the
  pipeline. An output from tensor_sink is copied to given output handle.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add ml-api-service-common to implement common feature
Yongjoo Ahn [Thu, 1 Sep 2022 04:39:09 +0000 (13:39 +0900)]
[service] Add ml-api-service-common to implement common feature

- Implement common feature for server and query client
- Let ml_service_destroy can destroy multiple types of service handle

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-agent] Hash key for DB
Yongjoo Ahn [Fri, 2 Sep 2022 01:53:58 +0000 (10:53 +0900)]
[ml-agent] Hash key for DB

- To prevent storing plain keys in DB, hash it.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-agent] Add prefix for key in daemon's DB
Yongjoo Ahn [Thu, 1 Sep 2022 08:10:09 +0000 (17:10 +0900)]
[ml-agent] Add prefix for key in daemon's DB

- Add prefix for key when access DB
- This prefix could be set in build time via meson option.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-agent] Add missing header
Yongjoo Ahn [Thu, 8 Sep 2022 05:07:33 +0000 (14:07 +0900)]
[ml-agent] Add missing header

- Add missing header for errno to enable build daemon in ubuntu.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[conf] Update gbs conf to new repos
Yongjoo Ahn [Tue, 13 Sep 2022 05:24:19 +0000 (14:24 +0900)]
[conf] Update gbs conf to new repos

- Update repo urls to the new one.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add API header for query_client service
Yongjoo Ahn [Wed, 31 Aug 2022 12:07:07 +0000 (21:07 +0900)]
[service] Add API header for query_client service

- Add signatures of two APIs for query_client service

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[Build] dependency to dlog accepted/tizen/unified/20220908.124835
Jaeyun [Tue, 6 Sep 2022 09:39:46 +0000 (18:39 +0900)]
[Build] dependency to dlog

Add dlog dependency when building daemon on Tizen release.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[Build] flag to run unittest
Jaeyun [Tue, 6 Sep 2022 05:31:07 +0000 (14:31 +0900)]
[Build] flag to run unittest

Clearly check unittest flag when building tizen rpms.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[service] Add a guide for the "key" when using ml_service_set_pipeline
Yongjoo Ahn [Mon, 5 Sep 2022 08:52:49 +0000 (17:52 +0900)]
[service] Add a guide for the "key" when using ml_service_set_pipeline

- Add a sentence to warn users to keep their name (key) safe.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[svace] Initialize a GstState variable
Yongjoo Ahn [Mon, 5 Sep 2022 04:07:05 +0000 (13:07 +0900)]
[svace] Initialize a GstState variable

- Initialize an uninitialized value.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[svace] Fix leak of GList in `ml_pipeline_switch_get_pad_list`
Yongjoo Ahn [Mon, 5 Sep 2022 04:04:31 +0000 (13:04 +0900)]
[svace] Fix leak of GList in `ml_pipeline_switch_get_pad_list`

- Free allocated `dllist` when allocation of other list is falied.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[test] Count each sink for multi model pipeline nnfw unittest
Yongjoo Ahn [Fri, 2 Sep 2022 02:17:48 +0000 (11:17 +0900)]
[test] Count each sink for multi model pipeline nnfw unittest

- Count each sink for multi model pipeline nnfw unittest
  to prevent occasional CI test failure

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-service] Change API name
Yongjoo Ahn [Fri, 26 Aug 2022 06:22:43 +0000 (15:22 +0900)]
[ml-service] Change API name

- Change `ml_service_getstate_pipeline` to `ml_service_get_pipeline_state`
- Change `ml_service_destroy_pipeline` to `ml_service_destroy`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add document for newly added service APIs
Yongjoo Ahn [Tue, 23 Aug 2022 07:55:36 +0000 (16:55 +0900)]
[service] Add document for newly added service APIs

- Add document for newly added service APIs

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Fix return values and free proxy
Yongjoo Ahn [Tue, 23 Aug 2022 07:53:19 +0000 (16:53 +0900)]
[service] Fix return values and free proxy

- Fix return values and free proxy

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Remove an useless API (ml_service_getdesc_pipeline)
Yongjoo Ahn [Mon, 29 Aug 2022 09:01:03 +0000 (18:01 +0900)]
[service] Remove an useless API (ml_service_getdesc_pipeline)

- Remove API `ml_service_getdesc_pipeline`.
- User can know the pipeline description with existing API `ml_service_get_pipeline`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[test/service] Set available port number for service API unittest
Yongjoo Ahn [Tue, 30 Aug 2022 11:43:12 +0000 (20:43 +0900)]
[test/service] Set available port number for service API unittest

- Set available port number for service API unittest, rather than
  default value

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-service] Add missing doxygen tag accepted/tizen/unified/20220825.053102 submit/tizen/20220825.022456
Yongjoo Ahn [Mon, 22 Aug 2022 09:09:10 +0000 (18:09 +0900)]
[ml-service] Add missing doxygen tag

- Add missing doxygen tag of an API

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-service] Fix session type of ml-service API
Yongjoo Ahn [Mon, 22 Aug 2022 08:57:52 +0000 (17:57 +0900)]
[ml-service] Fix session type of ml-service API

- Set System type for ml-service API.
- If fails to get system bus, try with session type (for unittest)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ML Agent] Enable PIE option for Tizen security check
Sangjung Woo [Sat, 20 Aug 2022 05:26:57 +0000 (14:26 +0900)]
[ML Agent] Enable PIE option for Tizen security check

This patch enables the PIE (Position Independent Executable) option to
comply with Tizen security. If this option is not enabled, the daemon
file will be lost its executable permission when making platform image.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
23 months ago[ml-service] Add test for ml-service-agent-client accepted/tizen/unified/20220819.122510 submit/tizen/20220818.081536 submit/tizen/20220819.071123
Yongjoo Ahn [Wed, 13 Jul 2022 02:05:39 +0000 (11:05 +0900)]
[ml-service] Add test for ml-service-agent-client

- Add gtest and GTestDBus based unittest for ml-service-agent-client.
- It use own session mode d-bus to test the features.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[service] Implement ml_service_[set|get|delete]_pipeline use dbus call
Yongjoo Ahn [Thu, 18 Aug 2022 07:01:03 +0000 (16:01 +0900)]
[service] Implement ml_service_[set|get|delete]_pipeline use dbus call

- Implement those APIs using dbus call

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-service] Add service APIs using pipelind d-bus interface
Yongjoo Ahn [Fri, 8 Jul 2022 06:01:22 +0000 (15:01 +0900)]
[ml-service] Add service APIs using pipelind d-bus interface

- Implement some service APIs using pipeline d-bus interface

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-service] Define API signatures for pipeline service.
Yongjoo Ahn [Thu, 4 Aug 2022 11:11:40 +0000 (20:11 +0900)]
[ml-service] Define API signatures for pipeline service.

- Define ml_service APIs for pipeline.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[service] Remove ml-api-service-db.cc and related test
Yongjoo Ahn [Thu, 18 Aug 2022 06:59:01 +0000 (15:59 +0900)]
[service] Remove ml-api-service-db.cc and related test

- Remove the source, header and tests.
- The APIs are moving to ml-api-service-agent.cc as it should use dbus
  call

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[agent] Update policy conf file
Yongjoo Ahn [Fri, 19 Aug 2022 02:34:57 +0000 (11:34 +0900)]
[agent] Update policy conf file

- Change the owner to "service_fw".
- Set default deny for default context.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-agent] Add set/get/delete pipeline dbus call
Yongjoo Ahn [Thu, 18 Aug 2022 06:30:59 +0000 (15:30 +0900)]
[ml-agent] Add set/get/delete pipeline dbus call

- Add `set_pipeline`, `get_pipeline`, and `delete_pipieline` dbus call.
- These correspond with `ml_service_[set|get|delete]_pipeline` APIs.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[Agent] Fix pipeline interface to launch pipeline in the DB
Yongjoo Ahn [Thu, 4 Aug 2022 11:02:23 +0000 (20:02 +0900)]
[Agent] Fix pipeline interface to launch pipeline in the DB

- Change the method name `register_pipeline` -> `launch_pipeline`.
  This method launch pipeline with given service name, if the pipeline
  description is stored in the DB beforehand.
- Change the module source file into cpp file. It's to use the db
  impelemntaion.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ML Agent] Update systemd service file
Sangjung Woo [Wed, 17 Aug 2022 06:49:10 +0000 (15:49 +0900)]
[ML Agent] Update systemd service file

To comply with the Tizen security rule, this patch updates the systemd
service file.
- Enable DBus activation
- Set User and Group ID as service_fw

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
23 months ago[Debian] Enable test on ubuntu build accepted/tizen/unified/20220811.135945 submit/tizen/20220810.074948
gichan [Wed, 27 Jul 2022 04:40:10 +0000 (13:40 +0900)]
[Debian] Enable test on ubuntu build

 - Enable test on ubuntu build.

Signed-off-by: gichan <gichan2.jang@samsung.com>
23 months ago[ML Agent] Implementation of DBus Model interface
Sangjung Woo [Wed, 27 Jul 2022 07:11:59 +0000 (16:11 +0900)]
[ML Agent] Implementation of DBus Model interface

This patch newly adds the DBus Model interface, which handles the neural
network model files. The name of a model file and its file path is
stored to the internal key-value database. To do this, this patch also
adds the IMLServiceDB interface for database operation and
MLServiceLevelDB class for LevelDB support.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
23 months ago[Test] Add Testcase for DBus Model interface
Sangjung Woo [Thu, 28 Jul 2022 14:29:18 +0000 (23:29 +0900)]
[Test] Add Testcase for DBus Model interface

This patch newly adds the unit testcase of DBus Model interface. It
contains both positive and negative test cases so covers various cases.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
23 months ago[Refactoring] do refactoring the NNFW unit test to improve maintainability
Sangjung Woo [Tue, 19 Jul 2022 13:56:01 +0000 (22:56 +0900)]
[Refactoring] do refactoring the NNFW unit test to improve maintainability

This patch applies the Google Test Fixture to the unit test of NNFW
Inference MLAPI test. It removes the duplicate codes such as finalizing
the handle of TensorsInfo, TensorsData, Single, and Pipeline in each
test case. As a result, it helps developers focus on the test case
scenario without considering trivial settings such as model loading,
or memory allocation.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
23 months ago[spec] FIx lcov option to include missed files
Yongjoo Ahn [Tue, 2 Aug 2022 04:49:44 +0000 (13:49 +0900)]
[spec] FIx lcov option to include missed files

- Current lcov command misses ml-agent source files.
- To include those files, remove --no-external option and exclude some
  external / genterated files in the coverage result.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Agent] Add pipeline feature to the daemon
Yongjoo Ahn [Thu, 21 Jul 2022 01:52:46 +0000 (10:52 +0900)]
[Agent] Add pipeline feature to the daemon

- Add and implement the pipeline related feature.
- It supports following dbus method call:
  - register_pipeline
  - start_pipeline
  - stop_pipeline
  - destroy_pipeline
  - get_state
  - get_description

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[C-API/common] Add fp16 type.
MyungJoo Ham [Wed, 22 Jun 2022 08:08:56 +0000 (17:08 +0900)]
[C-API/common] Add fp16 type.

Declare API formats for API change review process.

Note:
Fp16 is generally supported by arm/arm64 compilers.
However, x64/x86 compilers usually don't support it
(GCC>=12 is required along with some compiler flags).

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[daemon] Implementation of test ML Agent
Sangjung Woo [Mon, 18 Jul 2022 06:54:08 +0000 (15:54 +0900)]
[daemon] Implementation of test ML Agent

This patch makes a machine-learning-agent-test process for test
purposes. It defines the Test DBus interface and adds the handler for
this interface. Since ML Agent provides the service file for DBus
activation, unit tests can call the Test method via Proxy and get its
result. This process and its service file are not shipped to the test
package.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[daemon/Test] Add unit test for ML Agent itself
Sangjung Woo [Mon, 18 Jul 2022 06:10:19 +0000 (15:10 +0900)]
[daemon/Test] Add unit test for ML Agent itself

To test the daemon process itself, this patch adds unit tests for
ML Agent in the GBS environment. This test case does not use the
service APIs but directly calls the Proxy methods.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[daemon] Add DBus service file for unit test
Sangjung Woo [Mon, 18 Jul 2022 05:44:46 +0000 (14:44 +0900)]
[daemon] Add DBus service file for unit test

To run the unit tests in the GBS environment, this patch newly adds
the DBus service file that uses the Session Bus type.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[daemon] Add command-line option for DBus bus type
Sangjung Woo [Mon, 18 Jul 2022 05:32:03 +0000 (14:32 +0900)]
[daemon] Add command-line option for DBus bus type

To run the unit tests in the GBS environment, the session type of the
DBus is required. This patch adds the command-line option to support
the session bus.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[ML Agent] Add daemon process code for ML Service accepted/tizen/unified/20220707.133447 submit/tizen/20220706.100329
Sangjung Woo [Thu, 16 Jun 2022 11:35:05 +0000 (20:35 +0900)]
[ML Agent] Add daemon process code for ML Service

This patch newly adds the daemon process for ML Service. It provides a
basic template code so developers can add DBus interface and its service
code.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[android] Set tensorflow-lite v2.8.1 as default
Yongjoo Ahn [Mon, 20 Jun 2022 07:32:00 +0000 (16:32 +0900)]
[android] Set tensorflow-lite v2.8.1 as default

- Add tflite v2.8.1 support and set it as default

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[doc] Fix API header description accepted/tizen/unified/20220615.135329 submit/tizen/20220614.070712 submit/tizen/20220614.100238
Yongjoo Ahn [Mon, 13 Jun 2022 06:56:28 +0000 (15:56 +0900)]
[doc] Fix API header description

- Fix API descriptions to meet the design guide.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[test/ml_option] Add unittests for ml_option
Yongjoo Ahn [Thu, 26 May 2022 01:59:46 +0000 (10:59 +0900)]
[test/ml_option] Add unittests for ml_option

- Add some testcases using newly added ml_option APIs

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[C-API/Single] Add new API "ml_single_open_with_option"
Yongjoo Ahn [Thu, 26 May 2022 01:57:16 +0000 (10:57 +0900)]
[C-API/Single] Add new API "ml_single_open_with_option"

- This API handle ml_option provided by user and make single instance

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[C-API/common] Add new API for "ml_option"
Yongjoo Ahn [Thu, 26 May 2022 01:53:50 +0000 (10:53 +0900)]
[C-API/common] Add new API for "ml_option"

- Add three new APIs for ml_option:
  ml_option_create
  ml_option_destory
  ml_option_set
- Define related types and structures
- The ml_option use GHashTable {const char* key : void* value} to store
  various values used by ml_*

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[C-Api] add NNFW type (TVM)
Jaeyun [Mon, 30 May 2022 02:31:52 +0000 (11:31 +0900)]
[C-Api] add NNFW type (TVM)

Prepare ACR, add new NNFW type (TVM) and mark Tizen version.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[trival] Fix header document
Yongjoo Ahn [Tue, 7 Jun 2022 06:29:23 +0000 (15:29 +0900)]
[trival] Fix header document

- Fix a typo in header description.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[C-Api] update API description
Jaeyun [Tue, 31 May 2022 02:58:29 +0000 (11:58 +0900)]
[C-Api] update API description

Prepare ACR, review native API and update description.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Android] update script for mxnet
Jaeyun [Mon, 30 May 2022 02:44:54 +0000 (11:44 +0900)]
[Android] update script for mxnet

1. add version flag and update prebuilt library for mxnet.
2. disable test when building lite version.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[JAVA-Api] Update android build scripts.
makesource [Fri, 27 May 2022 07:17:53 +0000 (16:17 +0900)]
[JAVA-Api] Update android build scripts.

Update to use nnstreamer-github-resource github link

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[C-Api] Fix indentation
makesource [Fri, 27 May 2022 05:35:02 +0000 (14:35 +0900)]
[C-Api] Fix indentation

Fix indent at init_filter_mxnet()

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[JAVA-Api] Remove redundant newlines
makesource [Tue, 24 May 2022 05:04:13 +0000 (14:04 +0900)]
[JAVA-Api] Remove redundant newlines

Remove redundant newlines in build-nnstreamer-android.sh and Android.mk

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[C-Api] Add missing enums in ml-api-common
makesource [Tue, 24 May 2022 04:40:22 +0000 (13:40 +0900)]
[C-Api] Add missing enums in ml-api-common

Add missing enums in ml-api-common

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[JAVA-Api] Add missing MXNet enums in JAVA, c++ APIs
makesource [Mon, 23 May 2022 10:39:34 +0000 (19:39 +0900)]
[JAVA-Api] Add missing MXNet enums in JAVA, c++ APIs

Add MXNet enums in JAVA, c++ API.

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[JAVA-Api] Parameterized nnstreamer mxnet subplugin
makesource [Mon, 23 May 2022 10:20:22 +0000 (19:20 +0900)]
[JAVA-Api] Parameterized nnstreamer mxnet subplugin

Add enable_mxnet, ENABLE_MXNET flags.

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[JAVA-Api] Fix MXNet version
makesource [Mon, 23 May 2022 09:27:47 +0000 (18:27 +0900)]
[JAVA-Api] Fix MXNet version

Use MXNet 1.9.1 tag version

Signed-off-by: makesource <makesource@gmail.com>
2 years ago [JAVA-Api] Modify build script for MXNet build
makesource [Mon, 23 May 2022 09:07:56 +0000 (18:07 +0900)]
 [JAVA-Api] Modify build script for MXNet build

Modify build script flag that does not related with mxnet

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[JAVA-Api] Modify build script for MXNet build
makesource [Sun, 1 May 2022 06:16:06 +0000 (15:16 +0900)]
[JAVA-Api] Modify build script for MXNet build

Modify build script to download MXNet so files

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[JAVA-Api] Add and update MXNet related mk files
makesource [Sun, 1 May 2022 03:50:02 +0000 (12:50 +0900)]
[JAVA-Api] Add and update MXNet related mk files

Add mk files for prebuilt MXNet shared library files

Signed-off-by: makesource <makesource@gmail.com>
2 years ago[trivial] Fix some typos
Yongjoo Ahn [Thu, 26 May 2022 12:02:49 +0000 (21:02 +0900)]
[trivial] Fix some typos

- Fix some typos.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[C-API] Fix the typo accepted/tizen/unified/20220526.143636 submit/tizen/20220525.063351
Sangjung Woo [Mon, 23 May 2022 01:33:46 +0000 (10:33 +0900)]
[C-API] Fix the typo

This patch fixes the typo in ml-api-common.h file.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[test] Add test for decoding pngfile using appsrc
Yongjoo Ahn [Fri, 13 May 2022 06:58:54 +0000 (15:58 +0900)]
[test] Add test for decoding pngfile using appsrc

- Add a test for decoding pngfile using appsrc (C API and android JAVA)
- It check the equality of decoded orange.png using simple pipline
  with raw file (orange.raw)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[pipeline] Let pipeline src use current caps when it's given
Yongjoo Ahn [Wed, 11 May 2022 07:21:08 +0000 (16:21 +0900)]
[pipeline] Let pipeline src use current caps when it's given

- If current caps is given, use it rather than allowed caps.
- Use caps "image/png" when the pipeline is "appsrc caps=image/png ! pngdec ! ... "

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[Single] Remove gst dependency from single-shot
gichan [Mon, 9 May 2022 01:54:36 +0000 (10:54 +0900)]
[Single] Remove gst dependency from single-shot

Remove gst dependency from singlep-shot

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[C/common] Remove unnecessary NULL assignment
Sangjung Woo [Mon, 2 May 2022 13:13:17 +0000 (22:13 +0900)]
[C/common] Remove unnecessary NULL assignment

This patch removes the unnecessary NULL asignment in
_ml_tensors_info_free() since _ml_tensors_info_initialize() function
internally asigns the NULL to the name of each ml_tensor_info_s. It
removes redundant code and increase the performance.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[C/Inference] Apply extract method technique to remove redundant code
Sangjung Woo [Mon, 2 May 2022 11:54:35 +0000 (20:54 +0900)]
[C/Inference] Apply extract method technique to remove redundant code

Three internal functions for appsrc callback have the redundant code to
fetch the callback function. This patch applies the extract method
technique to remove it and increase maintainability.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[C/Inference] Cleanup the nested-if statement
Sangjung Woo [Mon, 2 May 2022 11:05:16 +0000 (20:05 +0900)]
[C/Inference] Cleanup the nested-if statement

ml_pipeline_src_parse_tensors_info() has the deep nested-if statement
and it makes it hard to understand and maintain. This patch does
refactoring the code structure and increases readability and
maintainability.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years ago[C-API] Revert "Move ml_strerror() to internal header" accepted/tizen/unified/20220505.024815 submit/tizen/20220503.135114
Sangjung Woo [Tue, 3 May 2022 11:12:37 +0000 (20:12 +0900)]
[C-API] Revert "Move ml_strerror() to internal header"

Since ml_strerror() & ml_error() functions are used in webapi-plugins
module, they should be in ml-api-common.h header.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>