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:demos:yolov7-tiny [2024/10/28 21:10] louis |
products:sbc:vim4:npu:demos:yolov7-tiny [2026/04/02 02:46] (current) nick |
||
|---|---|---|---|
| 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 ====== | ||
| {{indexmenu_n> | {{indexmenu_n> | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | YOLOv7-Tiny is an object detection model. It uses bounding boxes to precisely draw each object in image. | ||
| + | |||
| + | Inference results on VIM4. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | **Inference speed test**: USB camera about **126ms** per frame. | ||
| ===== Train the model ===== | ===== Train the model ===== | ||
| Line 26: | Line 38: | ||
| ``` | ``` | ||
| - | ===== Get Convert Tool ===== | + | ==== Get the conversion tool ==== |
| + | |||
| + | You can find the SDK here: [[dl> | ||
| ```shell | ```shell | ||
| - | $ git lfs install | + | $ wget https://dl.khadas.com/products/ |
| - | $ git lfs clone https://gitlab.com/khadas/ | + | $ tar xvzf vim4_npu_sdk-ddk-3.4.7.7-250508.tgz |
| - | $ cd vim4_npu_sdk | + | $ cd vim4_npu_sdk-ddk-3.4.7.7-250508 |
| $ ls | $ ls | ||
| - | adla-toolkit-binary | + | adla-toolkit-binary |
| ``` | ``` | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * '' | * '' | ||
| + | * '' | ||
| - | ==== 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> | + | </WRAP> |
| - | + | ||
| - | ```shell | + | |
| - | $ git clone https:// | + | |
| - | ``` | + | |
| ==== Convert ==== | ==== Convert ==== | ||
| Line 98: | Line 109: | ||
| --quantize-dtype int8 --outdir onnx_output | --quantize-dtype int8 --outdir onnx_output | ||
| --channel-mean-value " | --channel-mean-value " | ||
| + | --inference-input-type " | ||
| + | --inference-output-type " | ||
| --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 131: | ||
| ``` | ``` | ||
| + | |||
| + | <WRAP important> | ||
| + | If your kernel is older than 241129, please use version before tag ddk-3.4.7.7. | ||
| + | </ | ||
| ==== Install dependencies ==== | ==== Install dependencies ==== | ||
| Line 141: | Line 158: | ||
| # Run | # Run | ||
| - | $ sudo ./ | + | $ ./ |
| ``` | ``` | ||
| Line 157: | Line 174: | ||
| # Run | # Run | ||
| - | $ sudo ./ | + | $ ./ |
| ``` | ``` | ||