This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:vim4:npu:npu-applications [2023/06/06 21:43] louis |
products:sbc:vim4:npu:npu-applications [2025/03/17 01:45] (current) nick [Install dependences] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ~~tags> |
+ | |||
+ | **Doc for version ddk-3.4.7.7** | ||
+ | |||
+ | ====== NPU Applications ====== | ||
+ | |||
+ | {{indexmenu_n> | ||
<WRAP important > | <WRAP important > | ||
Line 8: | Line 14: | ||
<WRAP important > | <WRAP important > | ||
- | Only supports OpenCV4 | + | Only supports OpenCV4. |
</ | </ | ||
- | ==== Install Dependencies ==== | + | ==== Get source code ==== |
- | + | ||
- | ```shell | + | |
- | $ sudo apt update | + | |
- | $ sudo apt install libopencv-dev python3-opencv cmake | + | |
- | ``` | + | |
- | + | ||
- | ==== Source Code for Applications | + | |
You need to download the source code to your VIM4 board and compile on it. | You need to download the source code to your VIM4 board and compile on it. | ||
Line 30: | Line 29: | ||
$ cd vim4_npu_applications | $ cd vim4_npu_applications | ||
$ ls | $ ls | ||
- | mobilenet_v2 | + | densenet_ctc |
``` | ``` | ||
- | * '' | + | * '' |
- | * '' | + | |
+ | <WRAP important> | ||
+ | Please use convert tool version tag ddk-3.4.7.7 or higher. | ||
+ | </ | ||
+ | |||
+ | ==== Install dependences ==== | ||
+ | |||
+ | ```shell | ||
+ | $ sudo apt update | ||
+ | $ sudo apt install -y libopencv-dev python3-opencv cmake | ||
+ | ``` | ||
==== Compile ==== | ==== Compile ==== | ||
- | Take '' | + | Take '' |
```shell | ```shell | ||
- | $ cd mobilenet_v2 | + | $ cd yolov3 |
$ mkdir build && cd build | $ mkdir build && cd build | ||
$ cmake .. | $ cmake .. | ||
Line 48: | Line 56: | ||
==== Run ==== | ==== Run ==== | ||
- | |||
- | === Mobilenet V2 === | ||
- | |||
- | ```shell | ||
- | $ cd mobilenet_v2/ | ||
- | $ sudo ./ | ||
- | [sudo] password for khadas: | ||
- | 997: 0.273438 | ||
- | 886: 0.031250 | ||
- | 108: 0.023438 | ||
- | 109: 0.019531 | ||
- | 127: 0.019531 | ||
- | ``` | ||
=== Yolov3 === | === Yolov3 === | ||
Line 68: | Line 63: | ||
</ | </ | ||
- | It needs to be edited before | + | <WRAP tip > |
+ | Before | ||
+ | </ | ||
Detect picture: | Detect picture: | ||
Line 74: | Line 71: | ||
```shell | ```shell | ||
$ cd yolov3/ | $ cd yolov3/ | ||
- | $ sudo ./yolov3 -p ../ | + | $ ./yolov3 -p ../ |
``` | ``` | ||
Line 83: | Line 80: | ||
```shell | ```shell | ||
$ cd yolov3_cap/ | $ cd yolov3_cap/ | ||
- | $ sudo ./ | + | $ ./ |
``` | ``` | ||
**x**: the number for you camera device. such as ''/ | **x**: the number for you camera device. such as ''/ | ||
- | |||
- | === Yolov7_tiny === | ||
- | |||
- | Detect picture: | ||
- | |||
- | ```shell | ||
- | $ cd yolov7_tiny/ | ||
- | $ sudo ./ | ||
- | ``` | ||
- | |||
- | Detection with camera: | ||
- | |||
- | ```shell | ||
- | $ cd yolov7_tiny_cap/ | ||
- | $ sudo ./ | ||
- | ``` | ||
- | |||
- | === Yolov8n === | ||
- | |||
- | Detect picture: | ||
- | |||
- | ```shell | ||
- | $ cd yolov8n/ | ||
- | $ sudo ./yolov8n -p ../ | ||
- | ``` | ||
- | |||
- | Detection with camera: | ||
- | |||
- | ```shell | ||
- | $ cd yolov8n_tiny_cap/ | ||
- | $ sudo ./ | ||
- | ``` | ||
===== Android ===== | ===== Android ===== | ||
WIP: | WIP: | ||
- | |||