Instructions to use HanzoHuang/YOLOv10-RKNN2-Ultralytics with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- YOLOv10
How to use HanzoHuang/YOLOv10-RKNN2-Ultralytics with YOLOv10:
from huggingface_hub import hf_hub_download from ultralytics import YOLOv10 # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("HanzoHuang/YOLOv10-RKNN2-Ultralytics", "<weights>.pt") model = YOLOv10(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Improve model card and surface related exports
Browse files
README.md
CHANGED
|
@@ -12,24 +12,34 @@ tags:
|
|
| 12 |
|
| 13 |
# YOLOv10-RKNN2-Ultralytics
|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
#
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
##
|
| 34 |
|
| 35 |
-
|
|
|
|
| 12 |
|
| 13 |
# YOLOv10-RKNN2-Ultralytics
|
| 14 |
|
| 15 |
+
> **Looking for the Rockchip Model Zoo and custom exports?** See [YOLOv10-RKNN2](https://huggingface.co/HanzoHuang/YOLOv10-RKNN2).
|
| 16 |
|
| 17 |
+
RKNN exports of Ultralytics YOLOv10 for **RK3576** and **RK3588**, compiled with RKNN Toolkit2 2.3.2. Detection variants n, s, m, b, l, and x are available in FP16 and INT8.
|
| 18 |
|
| 19 |
+
## Choose a model
|
| 20 |
+
|
| 21 |
+
Models are organized by toolkit version, task, variant, target chip, and precision:
|
| 22 |
+
|
| 23 |
+
```text
|
| 24 |
+
models/v<toolkit-version>/<task>/<variant>/<chip>/<precision>/
|
| 25 |
+
```
|
| 26 |
|
| 27 |
+
Download `model.rknn` and `metadata.yaml` from the same directory. The [manifest](manifest.json) lists the available models and checksums.
|
| 28 |
|
| 29 |
+
## INT8 detection
|
| 30 |
|
| 31 |
+
Use the `metadata.yaml` from the same model directory. INT8 detection outputs normalized box coordinates and requires `coordinates: normalized`. Import both files together in the warehouse, or keep them in the same directory for the CLI. Treating normalized coordinates as pixels can result in no boxes.
|
| 32 |
+
|
| 33 |
+
## Reproduce the conversion
|
| 34 |
|
| 35 |
+
The [source directory](tree/main/source) contains the input checkpoints, conversion scripts, package versions, and calibration hashes. The export used [Ultralytics 8.4.184](https://pypi.org/project/ultralytics/8.4.184/#files) and [RKNN Toolkit2 2.3.2](https://github.com/airockchip/rknn-toolkit2/tree/v2.3.2).
|
| 36 |
|
| 37 |
+
```bash
|
| 38 |
+
python source/convert-model.py source/weights/yolov10n.pt --chip rk3588 --precision fp16 --imgsz 640 --output yolov10n-rk3588
|
| 39 |
+
```
|
| 40 |
|
| 41 |
+
For INT8, use `--precision int8 --data /path/to/coco128.yaml --calibration-limit 128`. Point the YAML at the extracted COCO128 tree and its `train2017` image directory. The calibration manifest links to the source images.
|
| 42 |
|
| 43 |
+
## Source and license
|
| 44 |
|
| 45 |
+
The inputs are official Ultralytics checkpoints. Conversion changes the format and quantizes the INT8 graph. The RKNN exports and original checkpoints are distributed under AGPL-3.0; see [LICENSE](LICENSE) and [checkpoint origins](source/weights.json).
|