Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim4:npu:demos:yolov7-tiny

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:demos:yolov7-tiny [2024/10/28 21:10]
louis
products:sbc:vim4:npu:demos:yolov7-tiny [2025/01/08 22:22] (current)
louis
Line 1: Line 1:
 ~~tag> NPU YOLO OpenCV VIM4 ~~ ~~tag> NPU YOLO OpenCV VIM4 ~~
 +
 +**Doc for version ddk-3.4.7.7**
  
 ====== YOLOv7-tiny VIM4 Demo - 1 ====== ====== YOLOv7-tiny VIM4 Demo - 1 ======
Line 26: Line 28:
 ``` ```
  
-===== Get Convert Tool =====+==== Get the conversion tool ==== 
 + 
 +Download The conversion tool from [[gh>khadas/vim4_npu_sdk]].
  
 ```shell ```shell
 $ git lfs install $ git lfs install
-$ git lfs clone https://gitlab.com/khadas/vim4_npu_sdk.git+$ git lfs clone https://github.com/khadas/vim4_npu_sdk
 $ cd vim4_npu_sdk $ cd vim4_npu_sdk
 $ ls $ ls
-adla-toolkit-binary  adla-toolkit-binary-1.2.0. convert-in-docker.sh  Dockerfile  docs  README.md+adla-toolkit-binary  adla-toolkit-binary-3.1.7. convert-in-docker.sh  Dockerfile  docs  README.md
 ``` ```
  
Line 40: Line 44:
   * ''adla-toolkit-binary/demo'' - Conversion examples   * ''adla-toolkit-binary/demo'' - Conversion examples
  
-==== Get the conversion tool ==== +<WRAP important> 
- +If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5
-Download The conversion tool from [[gl>khadas/vim4_npu_sdk]]+</WRAP>
- +
-```shell +
-$ git clone https://gitlab.com/khadas/vim4_npu_sdk +
-```+
  
 ==== Convert ==== ==== Convert ====
Line 98: Line 98:
         --quantize-dtype int8 --outdir onnx_output  \         --quantize-dtype int8 --outdir onnx_output  \
         --channel-mean-value "0,0,0,255"  \         --channel-mean-value "0,0,0,255"  \
 +        --inference-input-type "float32" \
 +        --inference-output-type "float32" \
         --source-file dataset.txt  \         --source-file dataset.txt  \
         --batch-size 1 --target-platform PRODUCT_PID0XA003         --batch-size 1 --target-platform PRODUCT_PID0XA003
Line 118: Line 120:
  
 ``` ```
 +
 +<WRAP important>
 +If your kernel is older than 241129, please use version before tag ddk-3.4.7.7.
 +</WRAP>
  
 ==== Install dependencies ==== ==== Install dependencies ====
Line 141: Line 147:
  
 # Run # Run
-sudo ./yolov7_tiny -m ../data/yolov7_tiny_int8.adla -p ../data/horses.jpg+$ ./yolov7_tiny -m ../data/yolov7_tiny_int8.adla -p ../data/horses.jpg
 ``` ```
 +
 +{{:products:sbc:vim4:npu:demos:yolov7-tiny-demo-output.webp?800|}}
  
 === Camera input demo === === Camera input demo ===
Line 157: Line 165:
  
 # Run # Run
-sudo ./yolov7_tiny_cap -m ../data/yolov7_tiny_int8.adla -d 0 -w 1920 -h 1080+$ ./yolov7_tiny_cap -m ../data/yolov7_tiny_int8.adla -d 0
 ``` ```
  
Last modified: 2024/10/28 21:10 by louis