Update thumbnail for Rockchip RKNN integration page (#18787)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Lakshantha Dissanayake 2025-01-21 02:39:53 -08:00 committed by GitHub
parent b5e0cee943
commit 066c5443f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,18 +4,18 @@ description: Learn how to export YOLO11 models to RKNN format for efficient depl
keywords: YOLO11, RKNN, model export, Ultralytics, Rockchip, machine learning, model deployment, computer vision, deep learning keywords: YOLO11, RKNN, model export, Ultralytics, Rockchip, machine learning, model deployment, computer vision, deep learning
--- ---
# RKNN Export for Ultralytics YOLO11 Models # Rockchip RKNN Export for Ultralytics YOLO11 Models
When deploying computer vision models on embedded devices, especially those powered by Rockchip processors, having a compatible model format is essential. Exporting [Ultralytics YOLO11](https://github.com/ultralytics/ultralytics) models to RKNN format ensures optimized performance and compatibility with Rockchip's hardware. This guide will walk you through converting your YOLO11 models to RKNN format, enabling efficient deployment on Rockchip platforms. When deploying computer vision models on embedded devices, especially those powered by Rockchip processors, having a compatible model format is essential. Exporting [Ultralytics YOLO11](https://github.com/ultralytics/ultralytics) models to RKNN format ensures optimized performance and compatibility with Rockchip's hardware. This guide will walk you through converting your YOLO11 models to RKNN format, enabling efficient deployment on Rockchip platforms.
<p align="center">
<img width="50%" src="https://github.com/ultralytics/assets/releases/download/v0.0.0/rockchip-rknn.avif" alt="RKNN">
</p>
!!! note !!! note
This guide has been tested with [Radxa Rock 5B](https://radxa.com/products/rock5/5b) which is based on Rockchip RK3588 and [Radxa Zero 3W](https://radxa.com/products/zeros/zero3w) which is based on Rockchip RK3566. It is expected to work across other Rockchip-based devices which supports [rknn-toolkit2](https://github.com/airockchip/rknn-toolkit2) such as RK3576, RK3568, RK3562, RV1103, RV1106, RV1103B, RV1106B and RK2118. This guide has been tested with [Radxa Rock 5B](https://radxa.com/products/rock5/5b) which is based on Rockchip RK3588 and [Radxa Zero 3W](https://radxa.com/products/zeros/zero3w) which is based on Rockchip RK3566. It is expected to work across other Rockchip-based devices which supports [rknn-toolkit2](https://github.com/airockchip/rknn-toolkit2) such as RK3576, RK3568, RK3562, RV1103, RV1106, RV1103B, RV1106B and RK2118.
<p align="center">
<img width="100%" src="https://www.rock-chips.com/Images/web/solution/AI/chip_s.png" alt="RKNN">
</p>
## What is Rockchip? ## What is Rockchip?
Renowned for delivering versatile and power-efficient solutions, Rockchip designs advanced System-on-Chips (SoCs) that power a wide range of consumer electronics, industrial applications, and AI technologies. With ARM-based architecture, built-in Neural Processing Units (NPUs), and high-resolution multimedia support, Rockchip SoCs enable cutting-edge performance for devices like tablets, smart TVs, IoT systems, and edge AI applications. Companies like Radxa, ASUS, Pine64, Orange Pi, Odroid, Khadas, and Banana Pi offer a variety of products based on Rockchip SoCs, further extending their reach and impact across diverse markets. Renowned for delivering versatile and power-efficient solutions, Rockchip designs advanced System-on-Chips (SoCs) that power a wide range of consumer electronics, industrial applications, and AI technologies. With ARM-based architecture, built-in Neural Processing Units (NPUs), and high-resolution multimedia support, Rockchip SoCs enable cutting-edge performance for devices like tablets, smart TVs, IoT systems, and edge AI applications. Companies like Radxa, ASUS, Pine64, Orange Pi, Odroid, Khadas, and Banana Pi offer a variety of products based on Rockchip SoCs, further extending their reach and impact across diverse markets.
@ -79,15 +79,15 @@ For detailed instructions and best practices related to the installation process
model = YOLO("yolo11n.pt") model = YOLO("yolo11n.pt")
# Export the model to RKNN format # Export the model to RKNN format
# Here name can be one of rk3588, rk3576, rk3566, rk3568, rk3562, rv1103, rv1106, rv1103b, rv1106b, rk2118 # 'name' can be one of rk3588, rk3576, rk3566, rk3568, rk3562, rv1103, rv1106, rv1103b, rv1106b, rk2118
model.export(format="rknn", args={"name": "rk3588"}) # creates '/yolo11n_rknn_model' model.export(format="rknn", name="rk3588") # creates '/yolo11n_rknn_model'
``` ```
=== "CLI" === "CLI"
```bash ```bash
# Export a YOLO11n PyTorch model to RKNN format # Export a YOLO11n PyTorch model to RKNN format
# Here name can be one of rk3588, rk3576, rk3566, rk3568, rk3562, rv1103, rv1106, rv1103b, rv1106b, rk2118 # 'name' can be one of rk3588, rk3576, rk3566, rk3568, rk3562, rv1103, rv1106, rv1103b, rv1106b, rk2118
yolo export model=yolo11n.pt format=rknn name=rk3588 # creates '/yolo11n_rknn_model' yolo export model=yolo11n.pt format=rknn name=rk3588 # creates '/yolo11n_rknn_model'
``` ```
@ -139,11 +139,11 @@ YOLO11 benchmarks below were run by the Ultralytics team on Radxa Rock 5B based
| Model | Format | Status | Size (MB) | mAP50-95(B) | Inference time (ms/im) | | Model | Format | Status | Size (MB) | mAP50-95(B) | Inference time (ms/im) |
| ------- | ------ | ------ | --------- | ----------- | ---------------------- | | ------- | ------ | ------ | --------- | ----------- | ---------------------- |
| YOLO11n | rknn | ✅ | 7.4 | 0.61 | 99.5 | | YOLO11n | `rknn` | ✅ | 7.4 | 0.61 | 99.5 |
| YOLO11s | rknn | ✅ | 20.7 | 0.741 | 122.3 | | YOLO11s | `rknn` | ✅ | 20.7 | 0.741 | 122.3 |
| YOLO11m | rknn | ✅ | 41.9 | 0.764 | 298.0 | | YOLO11m | `rknn` | ✅ | 41.9 | 0.764 | 298.0 |
| YOLO11l | rknn | ✅ | 53.3 | 0.72 | 319.6 | | YOLO11l | `rknn` | ✅ | 53.3 | 0.72 | 319.6 |
| YOLO11x | rknn | ✅ | 114.6 | 0.828 | 632.1 | | YOLO11x | `rknn` | ✅ | 114.6 | 0.828 | 632.1 |
!!! note !!! note
@ -156,3 +156,45 @@ In this guide, you've learned how to export Ultralytics YOLO11 models to RKNN fo
For further details on usage, visit the [RKNN official documentation](https://github.com/airockchip/rknn-toolkit2). For further details on usage, visit the [RKNN official documentation](https://github.com/airockchip/rknn-toolkit2).
Also, if you'd like to know more about other Ultralytics YOLO11 integrations, visit our [integration guide page](../integrations/index.md). You'll find plenty of useful resources and insights there. Also, if you'd like to know more about other Ultralytics YOLO11 integrations, visit our [integration guide page](../integrations/index.md). You'll find plenty of useful resources and insights there.
## FAQ
### How do I export my Ultralytics YOLO model to RKNN format?
You can easily export your Ultralytics YOLO model to RKNN format using the `export()` method in the Ultralytics Python package or via the command-line interface (CLI). Ensure you are using an x86-based Linux PC for the export process, as ARM64 devices like Rockchip are not supported for this operation. You can specify the target Rockchip platform using the `name` argument, such as `rk3588`, `rk3566`, or others. This process generates an optimized RKNN model ready for deployment on your Rockchip device, taking advantage of its Neural Processing Unit (NPU) for accelerated inference.
!!! Example
=== "Python"
```python
from ultralytics import YOLO
# Load your YOLO model
model = YOLO("yolo11n.pt")
# Export to RKNN format for a specific Rockchip platform
model.export(format="rknn", name="rk3588")
```
=== "CLI"
```bash
yolo export model=yolo11n.pt format=rknn name=rk3588
```
### What are the benefits of using RKNN models on Rockchip devices?
RKNN models are specifically designed to leverage the hardware acceleration capabilities of Rockchip's Neural Processing Units (NPUs). This optimization results in significantly faster inference speeds and reduced latency compared to running generic model formats like ONNX or TensorFlow Lite on the same hardware. Using RKNN models allows for more efficient use of the device's resources, leading to lower power consumption and better overall performance, especially critical for real-time applications on edge devices. By converting your Ultralytics YOLO models to RKNN, you can achieve optimal performance on devices powered by Rockchip SoCs like the RK3588, RK3566, and others.
### Can I deploy RKNN models on devices from other manufacturers like NVIDIA or Google?
RKNN models are specifically optimized for Rockchip platforms and their integrated NPUs. While you can technically run an RKNN model on other platforms using software emulation, you will not benefit from the hardware acceleration provided by Rockchip devices. For optimal performance on other platforms, it's recommended to export your Ultralytics YOLO models to formats specifically designed for those platforms, such as TensorRT for NVIDIA GPUs or [TensorFlow Lite](https://docs.ultralytics.com/integrations/tflite/) for Google's Edge TPU. Ultralytics supports exporting to a wide range of formats, ensuring compatibility with various hardware accelerators.
### What Rockchip platforms are supported for RKNN model deployment?
The Ultralytics YOLO export to RKNN format supports a wide range of Rockchip platforms, including the popular RK3588, RK3576, RK3566, RK3568, RK3562, RV1103, RV1106, RV1103B, RV1106B, and RK2118. These platforms are commonly found in devices from manufacturers like Radxa, ASUS, Pine64, Orange Pi, Odroid, Khadas, and Banana Pi. This broad support ensures that you can deploy your optimized RKNN models on various Rockchip-powered devices, from single-board computers to industrial systems, taking full advantage of their AI acceleration capabilities for enhanced performance in your computer vision applications.
### How does the performance of RKNN models compare to other formats on Rockchip devices?
RKNN models generally outperform other formats like ONNX or TensorFlow Lite on Rockchip devices due to their optimization for Rockchip's NPUs. For instance, benchmarks on the Radxa Rock 5B (RK3588) show that [YOLO11n](https://www.ultralytics.com/blog/all-you-need-to-know-about-ultralytics-yolo11-and-its-applications) in RKNN format achieves an inference time of 99.5 ms/image, significantly faster than other formats. This performance advantage is consistent across various YOLO11 model sizes, as demonstrated in the [benchmarks section](#benchmarks). By leveraging the dedicated NPU hardware, RKNN models minimize latency and maximize throughput, making them ideal for real-time applications on Rockchip-based edge devices.