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:yolov8n [2024/12/03 02:02] louis |
products:sbc:vim4:npu:demos:yolov8n [2025/06/12 05:39] (current) louis |
||
|---|---|---|---|
| Line 6: | Line 6: | ||
| {{indexmenu_n> | {{indexmenu_n> | ||
| + | |||
| + | ===== Introduction ===== | ||
| + | |||
| + | YOLOv8n 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 **150ms** per frame. | ||
| + | |||
| ===== Get Source Code ===== | ===== Get Source Code ===== | ||
| Line 30: | Line 41: | ||
| ==== Get Model Conversion Tools ==== | ==== Get Model Conversion Tools ==== | ||
| - | Get source [[gl> | + | Get source [[gh> |
| - | + | ||
| - | ```shell | + | |
| - | $ git clone https:// | + | |
| - | ``` | + | |
| ```shell | ```shell | ||
| $ git lfs install | $ git lfs install | ||
| - | $ git lfs clone https://gitlab.com/ | + | $ git lfs clone https://github.com/ |
| $ cd vim4_npu_sdk | $ cd vim4_npu_sdk | ||
| $ ls | $ ls | ||
| Line 49: | Line 56: | ||
| <WRAP important> | <WRAP important> | ||
| - | If your kernel is older than 241129, please use version before tag ddk-3.4.7.7. | + | If your kernel is older than 241129, please use branch npu-ddk-1.7.5.5. |
| </ | </ | ||
| Line 81: | Line 88: | ||
| + cls = self.cv3[i](x[i]).contiguous() | + cls = self.cv3[i](x[i]).contiguous() | ||
| + results.append(torch.cat([cls, | + results.append(torch.cat([cls, | ||
| - | + # results.append(torch.cat([cls, | ||
| + return tuple(results) | + return tuple(results) | ||
| + | + | ||
| Line 179: | Line 185: | ||
| $ ./yolov8n -m ../ | $ ./yolov8n -m ../ | ||
| ``` | ``` | ||
| - | |||
| - | {{: | ||
| === Camera input demo === | === Camera input demo === | ||
| Line 195: | Line 199: | ||
| # Run | # Run | ||
| - | $ ./ | + | $ ./ |
| ``` | ``` | ||