This project implements YOLOv11 inference on the RK3588 platform using the RKNN framework. With deep optimization of the official code and RGA hardware acceleration for image preprocessing, it achieves a stable 25 FPS for YOLOv11s without overclocking and core binding, showcasing efficient real-time object detection for embedded applications.
本项目基于RKNN框架,在RK3588平台上实现了YOLOv11推理。通过对官方代码的深度优化和RGA硬件加速预处理,YOLOv11s在未超频和绑定大核的情况下,稳定达到25帧/秒,为嵌入式实时目标检测提供了高效解决方案。
- YOLOv11 Inference: Optimized implementation for RK3588.
- RGA Preprocessing: Utilizes hardware acceleration for image processing.
- CMake Build System: Easy to configure and build.
- High Performance: Achieves 25 FPS without overclocking or core binding.
- Zero-Copy API: Reduces inference overhead for better efficiency.
- RK3588 Optimization: Supports concurrent inference across three NPU cores (requires custom thread pool implementation).
- RK3588 development board
- RKNPU Driver (version >= 0.9.6)
- RKNN SDK
- CMake (version 3.10 or higher)
- OpenCV (for image handling, optional)
-
Clone the repository:
git clone https://github.com/yuunnn-w/rknn-cpp-yolo.git cd rknn-cpp-yolo
-
Install dependencies:
sudo apt-get update sudo apt-get install -y build-essential gcc g++ gdb cmake ninja-build git libopencv-dev zlib1g-dev librga-dev ninja-build libomp-dev
-
Install RKNN SDK:
sudo bash install_rknpu.sh
-
Create a build directory:
mkdir build cd build
-
Configure the project with CMake:
cmake ..
-
Build the project:
make
-
Run the inference:
./yolov11_rk3588
After building the project, you can run the inference by executing the generated binary. Ensure that the RKNN model and test images are correctly placed in the specified paths.
The project includes several optimizations to achieve high performance on the RK3588 platform:
- Efficient use of RGA for image preprocessing.
- Memory and computation optimizations in the inference pipeline.
- Zero-Copy API to minimize memory overhead.
- Support for concurrent NPU core utilization (requires thread pool implementation).
Please note that this project only provides an example of image-based inference in the rknn.cpp
file. If you need to perform real-time inference in more complex application scenarios, you will need to implement it yourself.
Additionally, this project is purely an experimental demo and is not responsible for any products or issues. The final interpretation right belongs to yuunnn_w.
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the RKNN team for their framework and support.
- Inspired by the official YOLOv11 implementation.
For any questions or contributions, feel free to open an issue or submit a pull request.
If you have any questions, suggestions, or would like to contribute to this project, feel free to reach out! You can contact me through the following channels:
- Email: [email protected]
- GitHub: yuunnn-w
I’m always open to discussions, collaborations, and feedback. Let’s make this project even better together! 🚀