[Docs] Add documents for Tizen MLAPI sample app
authorDongju Chae <dongju.chae@samsung.com>
Wed, 7 Apr 2021 06:04:03 +0000 (15:04 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Thu, 8 Apr 2021 03:33:42 +0000 (12:33 +0900)
This patch adds documents for Tizen MLAPI sample app.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
docs/markdown/CommandLine.md [new file with mode: 0644]
docs/markdown/Examples.md
docs/markdown/TizenSample.md [new file with mode: 0644]
docs/sitemap.txt

diff --git a/docs/markdown/CommandLine.md b/docs/markdown/CommandLine.md
new file mode 100644 (file)
index 0000000..f599190
--- /dev/null
@@ -0,0 +1,42 @@
+---
+title: Command Line
+short-description: Command Line Examples
+...
+
+# Command Line Examples
+
+NPU Engine's two optional packages, `npu-engine-example` and `npu-engine-testdata`, contain example programs and their testdata, respectively.
+You may use them to verify the functionality of NPU Engine and obtain some guides for its usage.
+Please note that the programs and testdata are installed in different locations.
+
+## `npu-engine-example` package
+The `npu-engine-example` package contains useful unittests and apptests
+
+**FastModel**: `/usr/lib64/npu-engine/bin`
+
+**Ubuntu**: `/opt/trinity/bin`
+
+Please visit [here](https://github.sec.samsung.net/AIP/NPU_SystemService/tree/tizen/tests) to get full source codes.
+
+## `npu-engine-testdata` package
+The `npu-engine-testdata` package contains testdata used in some example test programs.
+
+* Repository: [NPU_SystemService_Testdata](https://github.sec.samsung.net/AIP/NPU_SystemService_Testdata)
+* Compiler: [NPU_Compiler](https://github.sec.samsung.net/AIP/NPU_Compiler)
+
+**FastModel**: `/usr/share/npu-engine/testdata`
+
+**Ubuntu**: `/opt/trinity/share/npu-engine/testdata`
+
+## Example: apptest_tvn_triv2_example
+This application ([tvn_triv2_example.cc](https://github.sec.samsung.net/AIP/NPU_SystemService/blob/tizen/tests/apptests/tvn_triv2_example.cc)) executes a given TRIV2 model using [libnpuhost.h](https://github.sec.samsung.net/AIP/NPU_SystemService/blob/tizen/include/host/libnpuhost.h).
+Note that the testdata used here follows the NPU binary format ([npubinfmt.h](https://github.sec.samsung.net/AIP/NPU_SystemService/blob/tizen/include/common/npubinfmt.h)).
+Also, TRIV2 currently works with npubinfmt v3 only.
+
+Let's assume you are testing the application in Ubuntu 16.04/18.04.
+```console
+$ sudo apt-get install npu-engine-example npu-engine-testdata
+$ cd /opt/trinity
+$ ./bin/apptests/apptest_tvn_triv2_example share/npu-engine/testdata/TRIV234_2TOPS/MOBILENET_V1
+...
+```
index 8166787..38e3dc1 100644 (file)
@@ -7,38 +7,3 @@ short-description: Usage Examples
 
 We provide example applications which use the NPU Engine library and its APIs.
 They are good reference codes when you develop your applications using the NPU Engine library.
-Please visit [here](https://github.sec.samsung.net/AIP/NPU_SystemService/tree/tizen/tests/apptests) to get full source codes.
-
-NPU Engine's two optional packages, `npu-engine-example` and `npu-engine-testdata`, contain test binaries and data, respectively.
-You may use them to verify the functionality of NPU Engine and obtain some guides for its usage.
-Please note that the binaries and testdata are installed in different locations.
-
-## `npu-engine-example` package
-The `npu-engine-example` package contains useful unittests and apptests
-
-**FastModel**: `/usr/lib64/npu-engine/bin`
-
-**Ubuntu**: `/opt/trinity/bin`
-
-## `npu-engine-testdata` package
-The `npu-engine-testdata` package contains testdata used in some example test programs.
-
-* Repository: [NPU_SystemService_Testdata](https://github.sec.samsung.net/AIP/NPU_SystemService_Testdata)
-* Compiler: [NPU_Compiler](https://github.sec.samsung.net/AIP/NPU_Compiler)
-
-**FastModel**: `/usr/share/npu-engine/testdata`
-
-**Ubuntu**: `/opt/trinity/share/npu-engine/testdata`
-
-## Example: apptest_tvn_triv2_example
-This application ([tvn_triv2_example.cc](https://github.sec.samsung.net/AIP/NPU_SystemService/blob/tizen/tests/apptests/tvn_triv2_example.cc)) executes a given TRIV2 model using [libnpuhost.h](https://github.sec.samsung.net/AIP/NPU_SystemService/blob/tizen/include/host/libnpuhost.h).
-Note that the testdata used here follows the NPU binary format ([npubinfmt.h](https://github.sec.samsung.net/AIP/NPU_SystemService/blob/tizen/include/common/npubinfmt.h)).
-Also, TRIV2 currently works with npubinfmt v3 only.
-
-Let's assume you are testing the application in Ubuntu 16.04/18.04.
-```console
-$ sudo apt-get install npu-engine-example npu-engine-testdata
-$ cd /opt/trinity
-$ ./bin/apptests/apptest_tvn_triv2_example share/npu-engine/testdata/TRIV234_2TOPS/MOBILENET_V1
-...
-```
diff --git a/docs/markdown/TizenSample.md b/docs/markdown/TizenSample.md
new file mode 100644 (file)
index 0000000..b6f9419
--- /dev/null
@@ -0,0 +1,45 @@
+---
+title: Tizen Sample
+short-description: Tizen MLAPI Sample
+...
+
+# Tizen MLAPI Sample
+
+As NPU-DDK officially supports Tizen MLAPI (i.e., NNStreamer), it's possible for Tizen app developers to access NPU-DDK libraries
+and NPU simulator on Tizen emulator.
+
+## Tizen Emulator
+
+First of all, you should download an official Tizen emulator (6.0 Mobile) from Tizen Studio.
+This emulator image can be customzied with our NPU packages.
+
+The required packages are as follows, but we provide pre-built packages in [here](https://github.sec.samsung.net/AIP/TRIV2_TIZEN_SAMPLE) for the Tizen emulator image.
+- `libmrpsim`: NPU Simulator ([Repo](https://github.sec.samsung.net/AIP/SIM_TrinityVision2))
+- `npu-decoder-triv2`: NPU DLA Decoder ([Repo](https://github.sec.samsung.net/AIP/decoder_triv2))
+- `npu-decoder-triv2-dsp`: NPU DSP Decoder ([Repo](https://github.sec.samsung.net/AIP/TRIV2_DSP_Lib))
+- `npu-engine`: NPU User Library ([Repo](https://github.sec.samsung.net/AIP/NPU_SystemService))
+- `nnstreamer`: NNStreamer Library ([Repo](https://github.com/nnstreamer/nnstreamer))
+- `capi-nnstreamer`: NNStreamer C-API (Tizen MLAPI) ([Repo](https://github.com/nnstreamer/api))
+- `nnstreamer-srnpu`: NNStreamer Tensor Filter Subplugin for NPU ([Repo](https://github.sec.samsung.net/AIP/nnstreamer-private-plugins/tree/trinity/ext/nnstreamer/tensor_filter/srnpu))
+
+```console
+$ git clone https://github.sec.samsung.net/AIP/TRIV2_TIZEN_SAMPLE
+$ cd TRIV2_TIZEN_SAMPLE
+$ ls
+install.sh  README.md  RPMS  TRIV2_SAMPLE
+$ sdb devices
+List of devices attached
+emulator-26101          device          m-0405-1
+$ ls RPMS
+capi-nnstreamer-1.6.0-0.i686.rpm  nnstreamer-srnpu-2.3.4-0.i686.rpm       npu-engine-2.3.4-1.i686.rpm
+libmrpsim-2.3.5-0.i686.rpm        npu-decoder-triv2-2.3.5-0.i686.rpm
+nnstreamer-1.6.0-0.i686.rpm       npu-decoder-triv2-dsp-2.3.5-0.i686.rpm
+$ bash install.sh
+...
+```
+
+## Tizen Sample App
+
+Then, you can just open `TRIV2_SAMPLE` project in Tizen Studio, and run the project on the customized emulator image!
+
+![demo](https://github.sec.samsung.net/storage/user/69000/files/032d9f80-964a-11eb-957a-177261e81484)
index 454a5a1..510dadc 100644 (file)
@@ -8,4 +8,6 @@ index.md
                Artifactory.md
                SPIN.md
        Examples.md
+               CommandLine.md
+               TizenSample.md
        Debugging.md