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 06:42] nick |
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 OpenCV4 | + | ==== Get source code ==== |
- | ```shell | + | You need to download the source code to your VIM4 board and compile on it. |
- | $ sudo apt update | + | |
- | $ sudo apt install libopencv-dev python3-opencv | + | |
- | ``` | + | |
- | + | ||
- | ==== Source Code for Applications ==== | + | |
Clone the NPU demo applications to somewhere, e.g. '' | Clone the NPU demo applications to somewhere, e.g. '' | ||
Line 28: | 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. | ||
+ | </ | ||
- | ==== Compile | + | ==== Install dependences |
- | + | ||
- | All demos are made based on the '' | + | |
```shell | ```shell | ||
- | $ sudo apt install cmake | + | $ sudo apt update |
+ | $ sudo apt install | ||
``` | ``` | ||
- | Take '' | + | ==== Compile ==== |
+ | |||
+ | Take '' | ||
```shell | ```shell | ||
- | $ cd mobilenet_v2 | + | $ cd yolov3 |
$ mkdir build && cd build | $ mkdir build && cd build | ||
$ cmake .. | $ cmake .. | ||
Line 52: | 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 === | ||
<WRAP important > | <WRAP important > | ||
- | The demos of the Yolo series only support running | + | The demos of the Yolo series only support running |
</ | </ | ||
- | It needs to be edited before | + | <WRAP tip > |
+ | Before | ||
+ | </ | ||
- | Detect | + | Detect |
```shell | ```shell | ||
$ cd yolov3/ | $ cd yolov3/ | ||
- | $ sudo ./yolov3 -p ../ | + | $ ./yolov3 -p ../ |
``` | ``` | ||
- | https:// | + | {{:products:sbc:vim4:npu: |
- | {{:local:dev: | + | |
- | Detection | + | Detection |
```shell | ```shell | ||
$ cd yolov3_cap/ | $ cd yolov3_cap/ | ||
- | $ sudo ./ | + | $ ./ |
``` | ``` | ||
- | **x**: the number for you camera device. such as `/dev/video0`, `x` is `0`. | + | **x**: the number for you camera device. such as '' |
+ | ===== Android ===== | ||
+ | WIP: | ||