CV / PP-YOLOE
PP-YOLOE
PP-YOLOE COCO object detection accelerated by RKNN on reComputer RK3576 and RK3588.
Choose the device you're using, the set up guide and documentation will update accordingly.
Getting Started
sudo docker run --rm --privileged --net=host --device /dev/dri/renderD128:/dev/dri/renderD128 \
-v /proc/device-tree/compatible:/proc/device-tree/compatible:ro \
ghcr.io/seeed-projects/recomputer-rk-cv/rk3576-ppyoloe:latest \
python web_detection.py --platform rk3576 --model_path model/ppyoloe_s.rknn \
--class_path model/coco_80_labels_list.txt --camera_id -1REST API
Use the REST API to run inference. Copy the commands below.
curl http://localhost:8080/v1/chat/completions -d '{
"model": "ppyoloe-rknn",
"messages": [{"role": "user", "content": "Hello"}]
}'import requests
resp = requests.post(
"http://localhost:8080/v1/chat/completions",
json={"model": "ppyoloe-rknn", "messages": [{"role": "user", "content": "Hello"}]},
)
print(resp.json())Model Details
Quick Start
1. Install Docker
Run the following commands on the development board to install Docker:
# Download installation script
curl -fsSL https://get.docker.com -o get-docker.sh
# Install using Aliyun mirror source
sudo sh get-docker.sh --mirror Aliyun
# Start Docker and enable auto-start on boot
sudo systemctl enable docker
sudo systemctl start docker2. Run the Project (One command, dual-mode preview)
This deployment follows the PP-YOLOE modules in
reComputer-RK-CV. The
service provides RKNN NPU inference, Web preview, REST API, and asynchronous
video analysis.
Model Information
| Property | Value |
|---|---|
| Task | COCO 80-class object detection |
| Input | 640 x 640 letterboxed RGB |
| Variants | ppyoloe_s.rknn, ppyoloe_m.rknn |
| Default | model/ppyoloe_s.rknn |
| Post-processing | DFL decoding and class-aware NMS |
Step A: Pull Images
sudo docker pull ghcr.io/seeed-projects/recomputer-rk-cv/rk3588-ppyoloe:latest
sudo docker pull ghcr.io/seeed-projects/recomputer-rk-cv/rk3576-ppyoloe:latestStep B: Run with One Click
For RK3576:
sudo docker run --rm --privileged --net=host \
--device /dev/dri/renderD128:/dev/dri/renderD128 \
-v /proc/device-tree/compatible:/proc/device-tree/compatible:ro \
ghcr.io/seeed-projects/recomputer-rk-cv/rk3576-ppyoloe:latest \
python web_detection.py --platform rk3576 \
--model_path model/ppyoloe_s.rknn \
--class_path model/coco_80_labels_list.txt --camera_id -1For RK3588:
sudo docker run --rm --privileged --net=host \
--device /dev/dri/renderD128:/dev/dri/renderD128 \
-v /proc/device-tree/compatible:/proc/device-tree/compatible:ro \
ghcr.io/seeed-projects/recomputer-rk-cv/rk3588-ppyoloe:latest \
python web_detection.py --platform rk3588 \
--model_path model/ppyoloe_s.rknn \
--class_path model/coco_80_labels_list.txt --camera_id -1Switch to PP-YOLOE-M with --model_path model/ppyoloe_m.rknn. For camera
input, map /dev/videoN and set the matching --camera_id.
🔌 API Documentation
1. Model Inference Interface (Predict)
Endpoint: POST /api/models/ppyoloe/predict
Request Parameters (Multipart/Form-Data):
file: Optional image file to detect.video: Optional MP4 file.timestamp: Optional video timestamp in seconds; defaults to the first frame.realtime: Optional boolean; with no upload, use the active camera or local-video frame.conf: Optional request-level confidence threshold; defaults to0.25.iou: Optional request-level NMS IoU threshold; defaults to0.45.
Usage Examples:
curl -X POST "http://<BOARD_IP>:8000/api/models/ppyoloe/predict" \
-F "file=@bus.jpg" -F "conf=0.30" -F "iou=0.45"Response Format (JSON):
{
"success": true,
"source": "uploaded image",
"predictions": [
{
"class": "bus",
"confidence": 0.91,
"box": {"x1": 120, "y1": 80, "x2": 520, "y2": 430}
}
],
"image": {"width": 640, "height": 480}
}2. System Configuration Interface (Config)
Input priority is image, uploaded MP4 frame, then the active camera or sample
video. GET/POST /api/config controls the global object and NMS thresholds.
The runtime also exposes health, MJPEG, video upload, asynchronous analysis,
status, list, and download interfaces.
web_detection.py performs letterbox preprocessing, RKNN inference,
PP-YOLOE DFL decoding, class-aware NMS, coordinate restoration, rendering, and
API serialization. Replacement models must remain compatible with that DFL
decoder and output layout.
3. Command Line Arguments
| Argument | Default | Description |
|---|---|---|
--platform | Required | rk3576 or rk3588. |
--model_path | Required | PP-YOLOE-S or PP-YOLOE-M RKNN file. |
--class_path | COCO labels | Class names used for serialization and drawing. |
--camera_id | 1 | Camera index; -1 enables upload-only mode. |
--video_path | None | Looping local MP4; overrides the camera. |
--host / --port | 0.0.0.0 / 8000 | Service address and port. |
Real-time Video Stream Interface (Video Feed)
Get the latest annotated MJPEG stream for browser preview:
- Endpoint:
GET /api/video_feed - Example Usage:
<img src="http://<BOARD_IP>:8000/api/video_feed">
🛠️ Developer Guide (Production Recommendations)
Build Local Images
docker build -f docker/rk3576/ppyoloe.dockerfile \
-t rk3576-ppyoloe:local src/rk3576_ppyoloe
docker build -f docker/rk3588/ppyoloe.dockerfile \
-t rk3588-ppyoloe:local src/rk3588_ppyoloeInputs and Outputs
Input: image, video frame, or camera frame. Output: COCO classes, confidence scores, and boxes.