This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim3:npu:npu-prebuilt-demo-usage [2023/04/13 02:24] nick |
products:sbc:vim3:npu:npu-prebuilt-demo-usage [2023/09/11 09:58] (current) hyphop |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~tag> | ||
+ | |||
====== NPU Prebuilt Demo Usage ====== | ====== NPU Prebuilt Demo Usage ====== | ||
- | <WRAP tip > | + | Prebuilt example demos for interacting with the Amlogic |
- | - Please follow this docs to upgrade | + | |
- | - Just support Opencv4. | + | |
- | </ | + | |
===== Install OpenCV4 ===== | ===== Install OpenCV4 ===== | ||
+ | Update your system and install the OpenCV packages. | ||
```shell | ```shell | ||
$ sudo apt update | $ sudo apt update | ||
Line 14: | Line 13: | ||
===== Get NPU Demo ===== | ===== Get NPU Demo ===== | ||
- | < | + | /* |
- | NPU Demo is not installed on the board by default. You need to download it from github | + | < |
+ | The NPU Demo is not installed on the board by default. You need to download it from GitHub | ||
</ | </ | ||
+ | */ | ||
- | 1. Clone to the board through the git command. | + | Get the demo source: [[gh> |
```shell | ```shell | ||
- | $ cd {workspace} | ||
$ git clone --recursive https:// | $ git clone --recursive https:// | ||
``` | ``` | ||
- | 2. Or download the compressed package directly, and then unzip it to the board. | + | The NPU demo contains three examples: |
- | There are three directories in NPU Demo: | + | |
- | + | - '' | |
- | | + | - '' |
- | - '' | + | |
- | - '' | + | |
===== Inception Model ===== | ===== Inception Model ===== | ||
+ | The inception model does not have any library dependencies and can be used as is. | ||
- | The inception model does not need to install any libraries into the system. | + | |
- | '' | + | Enter the '' |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
$ ls | $ ls | ||
dog_299x299.jpg | dog_299x299.jpg | ||
``` | ``` | ||
- | < | + | '' |
- | If your board is VIM3, enter the VIM3 directory, if it is VIM3L, then enter the VIM3L directory. Here is VIM3 as an example. | + | |
+ | < | ||
+ | Depending on your board, enter the VIM3 or VIM3L directory | ||
</ | </ | ||
```shell | ```shell | ||
- | $ ls {workspace}/ | + | $ ls aml_npu_demo_binaries/ |
$ inceptionv3 | $ inceptionv3 | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
$ ./run.sh | $ ./run.sh | ||
Create Neural Network: 59ms or 59022us | Create Neural Network: 59ms or 59022us | ||
Line 71: | Line 72: | ||
<WRAP Info> | <WRAP Info> | ||
| | ||
- | By querying '' | + | By querying '' |
</ | </ | ||
Line 77: | Line 78: | ||
===== Yolo Series Model ===== | ===== Yolo Series Model ===== | ||
- | ==== Preparation | + | ==== Install and uninstall libraries |
- | The application of the yolo series | + | The yolo series |
- | + | ||
- | ==== Install | + | |
- | The yolo series models need to install | + | You can follow the steps to either |
- | 1. Install: | + | Install |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
$ sudo ./INSTALL | $ sudo ./INSTALL | ||
``` | ``` | ||
- | 2. Uninstall: | + | Uninstall |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
$ sudo ./UNINSTALL | $ sudo ./UNINSTALL | ||
``` | ``` | ||
Line 102: | Line 101: | ||
<WRAP important > | <WRAP important > | ||
- | The type parameter is an input parameter that must be selected whether it is to use camera dynamic recognition or to recognize pictures. This parameter is mainly used to specify the running | + | The type parameter is an input parameter that must be selected whether it is to use camera dynamic recognition or to recognize pictures. This parameter is mainly used to specify the running |
</ | </ | ||
Line 113: | Line 112: | ||
``` | ``` | ||
- | ==== Operating Environment | + | ==== Operating Environment |
| | ||
- | NPU Demo can run in X11 or framebuffer mode, just select the corresponding demo to run. | + | NPU Demo can run in X11 Desktop |
- | === X11 / Framebuffer === | + | - The demo with fb is running in framebuffer mode. |
+ | - The demo with x11 is running in X11 mode. | ||
- | - The demo with fb is running in framebuffer mode. | + | ==== Demo examples |
- | - The demo with x11 is running in X11 mode. | + | === detect_demo_picture |
- | + | ||
- | ==== Illustrative Example | + | |
- | + | ||
- | Here is an example of detect_demo_picture, | + | |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
$ ls | $ ls | ||
- | 1080p.bmp | + | 1080p.bmp |
``` | ``` | ||
+ | == Run == | ||
- | <WRAP tip > | + | Command |
- | - '' | + | |
- | - '' | + | |
- | </ | + | |
- | + | ||
- | ==== Run ==== | + | |
- | + | ||
- | Identify the command | + | |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
- | $ ./ | + | $ ./ |
``` | ``` | ||
- | Here is an example of using Opencv4 | + | Here is an example of using OpenCV4 |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
- | $ ./detect_demo_fb | + | $ ./detect_demo_x11 -m 2 -p 1080p.bmp |
``` | ``` | ||
Line 157: | Line 147: | ||
{{: | {{: | ||
+ | === detect_demo === | ||
- | < | + | < |
You should use the demo of usb to use the USB camera, and the demo of mipi to use the mipi camera. | You should use the demo of usb to use the USB camera, and the demo of mipi to use the mipi camera. | ||
</ | </ | ||
+ | == Run == | ||
Command format for camera dynamic recognition. | Command format for camera dynamic recognition. | ||
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
- | $ ./ | + | $ ./ |
``` | ``` | ||
- | Here is an example of using opencv4 | + | Here is an example of using OpenCV4 |
```shell | ```shell | ||
- | $ cd {workspace}/ | + | $ cd aml_npu_demo_binaries/ |
$ ./ | $ ./ | ||
``` | ``` | ||
- | < | + | < |
After turning on the camera, the recognition result will be displayed on the screen. | After turning on the camera, the recognition result will be displayed on the screen. | ||
</ | </ | ||
{{: | {{: |