CV / PP-YOLOE

PP-YOLOE

Select PP-YOLOE-S or PP-YOLOE-M by changing the RKNN model path.

3 downloads
Precision
RKNN

Choose the device you're using, the set up guide and documentation will update accordingly.

Getting Started

Deploy
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 -1

REST API

Use the REST API to run inference. Copy the commands below.

Curl
curl http://localhost:8080/v1/chat/completions -d '{
  "model": "ppyoloe-rknn",
  "messages": [{"role": "user", "content": "Hello"}]
}'
Python
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

PP-YOLOE on reComputer RK3576 and RK3588

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

PropertyValue
TaskCOCO 80-class object detection
Input640 x 640 letterboxed RGB
Variantsppyoloe_s.rknn, ppyoloe_m.rknn
Defaultmodel/ppyoloe_s.rknn
Post-processingDFL decoding and class-aware NMS

Run the service

RK3576

bash
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 -1

RK3588

bash
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 -1

Switch to PP-YOLOE-M with --model_path model/ppyoloe_m.rknn. For camera input, map /dev/videoN and set the matching --camera_id.

Startup arguments

ArgumentDefaultDescription
--platformRequiredrk3576 or rk3588.
--model_pathRequiredPP-YOLOE-S or PP-YOLOE-M RKNN file.
--class_pathCOCO labelsClass names used for serialization and drawing.
--camera_id1Camera index; -1 enables upload-only mode.
--video_pathNoneLooping local MP4; overrides the camera.
--host / --port0.0.0.0 / 8000Service address and port.

REST API

Endpoint: POST /api/models/ppyoloe/predict

bash
curl -X POST "http://<BOARD_IP>:8000/api/models/ppyoloe/predict" \
  -F "file=@bus.jpg" -F "conf=0.30" -F "iou=0.45"
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}
}

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.

Build locally

bash
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_ppyoloe

Inputs and Outputs

Input: image, video frame, or camera frame. Output: COCO classes, confidence scores, and boxes.