Quickrun
瑞芯微芯片的rknn推理框架部署(yolo模型)
Install / Use
/learn @dreamflyforever/QuickrunREADME
Quickrun
Quickrun is a software designed for the efficient and high-concurrency deployment of multiple models on the RK3588 platform with RKNN.
Software Framework
-
Session-Based Design:
- Implements a session concept, allowing the definition of multiple sessions for different task requirements.
- Example: Supports scenarios like charging pile detection, garbage classification, and cliff detection where multiple models share the same camera, e.g., using YOLOv5.
-
Message Queue for Data Management:
- Uses a message queue to store photo data, preventing frame loss and ensuring efficient concurrency.
- Photo data is collected at 25fps, with a total processing time (pre-processing, inference, post-processing) of 40ms per frame.
-
Input Processing:
- Handles model input of
640x640while the camera input is640x480. - Decodes the input using
cv::imdecode, converts it to RGB format, and leverages RGA for accelerated proportional scaling.
- Handles model input of
-
Threaded Model Execution:
- Three independent threads for three sessions to execute models concurrently without interference.
Model Output Customization
- For RK3588 YOLOv5 model:
- When converting to ONNX, remove the
catoperation in the forward layer. - Configure the model to output three feature maps:
20x20,40x40, and80x80. - Modify the necessary files:
yolo.pyandexport.py.
- When converting to ONNX, remove the
Performance Overview
-
Resource Usage:
- One model uses:
- 1.2T of the NPU.
- 40% of the CPU for pre-processing, inference, and post-processing (including frame drawing).
- One model uses:
-
Inference Time:
- Achieves an inference time of 20ms.
-
CPU Monitoring:
- Use the
perf top -pcommand to view the CPU usage rate, down to specific functions.
- Use the
Quick Start
Compilation
Run the following command to build the project:
bash build_rk3588_yolov5.sh
Testing
Run the following command to test the deployment:
bash test_rk3588_yolov5.sh
Quickrun Deployment
Modify the following parameters in the code as per your project’s requirements:
#define OBJ_NAME_MAX_SIZE 16
#define OBJ_NUMB_MAX_SIZE 64
#define OBJ_CLASS_NUM 1
#define NMS_THRESH 0.25
#define BOX_THRESH 0.5
Robot Demo Video
View Robot Video on GitHub
机器人视频观看 You can also watch the video below:
<source src="video/machine.mp4" type="video/mp4"> Your browser does not support the video tag. </video>License
Quickrun is licensed under the MIT License by Jim.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
