This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:edge2:npu:demos:yolov8n [2023/08/28 02:39] louis ↷ Page moved from products:sbc:edge2:npu:demo2-yolov8n to products:sbc:edge2:npu:npu-demos:demo2-yolov8n |
products:sbc:edge2:npu:demos:yolov8n [2025/04/23 05:23] (current) louis |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Demo2 - Yolov8n ====== | + | ~~tag> YOLO NPU Edge2 RK3588~~ |
- | ===== Get Source Code ===== | + | ====== YOLOv8n OpenCV Edge2 Demo - 2 ====== |
- | Download yolov8 official codes. Refer README.md | + | {{indexmenu_n> |
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | YOLOv8n is an object detection model. It uses bounding boxes to precisely draw each object in image. | ||
+ | |||
+ | Inference results on Edge2. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | **Inference speed test**: USB camera about **52ms** per frame. MIPI camera about **40ms** per frame. | ||
+ | |||
+ | ===== Train Model ===== | ||
+ | |||
+ | Download YOLOv8 official code [[gh> | ||
```shell | ```shell | ||
$ git clone https:// | $ git clone https:// | ||
``` | ``` | ||
+ | |||
+ | Refer '' | ||
===== Convert Model ===== | ===== Convert Model ===== | ||
Line 55: | Line 71: | ||
After training model, modify '' | After training model, modify '' | ||
- | ```diff | + | ```diff |
diff --git a/ | diff --git a/ | ||
index 0b02eb3..0a6e43a 100644 | index 0b02eb3..0a6e43a 100644 | ||
Line 85: | Line 101: | ||
``` | ``` | ||
- | Create a python file written as follows to export onnx model. | + | <WRAP important> |
+ | If you pip-installed ultralytics package, you should modify in package. | ||
+ | </ | ||
+ | |||
+ | Create a python file written as follows to export | ||
```python export.py | ```python export.py | ||
Line 92: | Line 112: | ||
results = model.export(format=" | results = model.export(format=" | ||
``` | ``` | ||
+ | |||
+ | <WRAP important> | ||
+ | Use [[https:// | ||
+ | |||
+ | {{: | ||
+ | </ | ||
Enter '' | Enter '' | ||
Line 139: | Line 165: | ||
==== Get source code ==== | ==== Get source code ==== | ||
- | Clone the source code form our [[gh> | + | Clone the source code from our [[gh> |
```shell | ```shell | ||
Line 175: | Line 201: | ||
$ bash build.sh | $ bash build.sh | ||
- | # Run | + | # Run USB camera |
+ | $ cd install/ | ||
+ | $ ./ | ||
+ | |||
+ | # Run MIPI camera | ||
$ cd install/ | $ cd install/ | ||
- | $ ./ | + | $ ./ |
``` | ``` | ||
<WRAP info > | <WRAP info > | ||
- | '' | + | '' |
</ | </ | ||
<WRAP tip > | <WRAP tip > | ||
- | If your yolov8n | + | If your **YOLOv8n** |
</ | </ | ||