Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4:npu:npu-applications

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:vim4:npu:npu-applications [2023/06/06 06:38]
nick
products:sbc:vim4:npu:npu-applications [2023/09/15 03:05] (current)
hyphop
Line 1: Line 1:
-====== VIM4 NPU Applications ======+~~tags>VIM4 NPU~~ 
 +  
 +====== NPU Applications ====== 
 + 
 +{{indexmenu_n>1}}
  
 <WRAP important > <WRAP important >
Line 5: Line 9:
 </WRAP> </WRAP>
  
-==== Linux ====+===== Linux =====
  
 <WRAP important > <WRAP important >
-Only supports OpenCV4+Only supports OpenCV4.
 </WRAP> </WRAP>
  
-==== 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. ''~/workspace'': Clone the NPU demo applications to somewhere, e.g. ''~/workspace'':
Line 28: Line 27:
 $ cd vim4_npu_applications $ cd vim4_npu_applications
 $ ls $ ls
-mobilenet_v2  nn_sdk  yolov3  yolov3_cap+mobilenet_v2  nn_sdk  yolov3  yolov3_cap  yolov7_tiny  yolov7_tiny_cap  yolov8n  yolov8n_cap
 ``` ```
-  * ''mobilenet_v2''/''yolov3''/''yolov3_cap''Different demo for VIM4 NPU. +  * ''mobilenet_v2''''yolov3''''yolov3_cap'', ''yolov7_tiny'', ''yolov8n''Different demo for VIM4 NPU. 
-  * ''nn_sdk''Dependencies required for compilation.+  * ''nn_sdk'' Dependencies required for compilation.
  
- +==== Install dependences ====
-==== Compile ==== +
- +
-All demos are made based on the ''cmake'' tool.+
  
 ```shell ```shell
-$ sudo apt install cmake+$ sudo apt update 
 +$ sudo apt install libopencv-dev python3-opencv cmake
 ``` ```
 +
 +==== Compile ====
  
 Take ''mobilenet_v2'' as an example, other demos are the same. Take ''mobilenet_v2'' as an example, other demos are the same.
Line 69: Line 68:
  
 <WRAP important > <WRAP important >
-The demos of the Yolo series only support running in the desktop environment.+The demos of the Yolo series only support running under the desktop environment.
 </WRAP> </WRAP>
  
-It needs to be edited before running, please refer to the compilation method of ''Mobilenet V2''.+<WRAP tip > 
 +Before running, please compile the source code. The compilation method is same as ''Mobilenet V2''. 
 +</WRAP>
  
-Detect pictures:+Detect picture:
  
 ```shell ```shell
Line 81: Line 82:
 ``` ```
  
-https://docs.khadas.com/_media/local/dev/vim4/output.webp +{{:products:sbc:vim4:npu:vim4-yolov3-output.webp?1000|}}
-{{:local:dev:vim4:output.png?1000|detect-picture}}+
  
-Detection by camera:+Detection with camera:
  
 ```shell ```shell
Line 90: Line 90:
 $ sudo ./yolov3_cap -m ../data/det_yolov3_int8.adla -d X -w 1920 -h 1080 $ sudo ./yolov3_cap -m ../data/det_yolov3_int8.adla -d X -w 1920 -h 1080
 ``` ```
-**x**: the number for you camera device. such as `/dev/video0``xis `0`. +**x**: the number for you camera device. such as ''/dev/video0''''x'' is ''0''.
  
 +===== Android =====
  
 +WIP:
  
Last modified: 2023/06/06 06:38 by nick