CV / YOLOv5

YOLOv5

YOLOv5 detects objects across 80 COCO classes in four builds, including the s-relu export. Start a prebuilt Docker image with one command and run inference through the REST API on RK3576, RK3588, RK1820 PCIe, Hailo-8, and Hailo-10H. The guide covers device setup, benchmarks, and troubleshooting.

304 downloads
Size
2.1 MiB model assets
Memory
Host RAM not profiled
Inference Engine
RKNN3
Image input size
640x640

Start right away with Seeed Products

Platform
Size
  1. Install the RK182x driver

    On the RK3588 host, install the vendor’s RK182x PCIe driver and matching RKNN3 runtime for your accelerator. Use headers for the running kernel. Reboot, then confirm the card and device node are visible and the card is online. RK182x driver installation guide

    bash
    lspci -nn -d 1d87:182a
    ls /dev/pcie-rkep-*
    sudo rknn-smi info
  2. Install Docker

    bash
    bash <(curl -fsSL https://get.docker.com)

    Armbian 26.8.7 Gnome or newer with OTA overlayroot: Configure Docker storage before running containers to avoid overlay mount errors.

  3. Run the Docker command

    bash
    sudo docker run --rm --name rv182x-rk3588-yolov5 \
      --privileged --net=host --ipc=host --stop-timeout 300 \
      -v /run/lock:/run/lock \
      -v /lib/modules:/lib/modules:ro \
      -v /usr/src:/usr/src:ro \
      -e PYTHONUNBUFFERED=1 \
      -e RKNN_LOG_LEVEL=0 \
      ghcr.io/seeed-projects/recomputer-rk-cv/rv182x-rk3588-yolov5:latest \
      python3 web_detection.py --variant yolov5n --model_path model/yolov5n.rknn --weight_path model/yolov5n.weight --video video/test.mp4

Deploy on hardware you already have

Platform
Size

RK3588 + RK1820 PCIe accelerator

  1. Install the RK182x driver

    On the RK3588 host, install the vendor’s RK182x PCIe driver and matching RKNN3 runtime for your accelerator. Use headers for the running kernel. Reboot, then confirm the card and device node are visible and the card is online. RK182x driver installation guide

    bash
    lspci -nn -d 1d87:182a
    ls /dev/pcie-rkep-*
    sudo rknn-smi info
  2. Install Docker

    bash
    bash <(curl -fsSL https://get.docker.com)
  3. Run the Docker command

    bash
    sudo docker run --rm --name rv182x-rk3588-yolov5 \
      --privileged --net=host --ipc=host --stop-timeout 300 \
      -v /run/lock:/run/lock \
      -v /lib/modules:/lib/modules:ro \
      -v /usr/src:/usr/src:ro \
      -e PYTHONUNBUFFERED=1 \
      -e RKNN_LOG_LEVEL=0 \
      ghcr.io/seeed-projects/recomputer-rk-cv/rv182x-rk3588-yolov5:latest \
      python3 web_detection.py --variant yolov5n --model_path model/yolov5n.rknn --weight_path model/yolov5n.weight --video video/test.mp4

Check that it’s running

Open the address below in a browser. Replace <rk3588-ip> with your board’s IP address.

http://<rk3588-ip>:8000

If you see the detection stream with boxes around objects, you’re all set.

Benchmark Performance

YOLOv5 reported inference throughput (FPS) on RK3588 + RK1820, RK3588, RK3576, CM5 + Hailo-10H. The Rockchip NPU model performance list and CM5 Hailo measurements use different test setups.
  • YOLOv5n · RK3588 + RK1820 PCIe accelerator · W8A8 · 640x640
    Single-core FPS
    42.87
    Single-core latency (ms)
    23.329
    Multi-core FPS
    92.32
    Memory (MB)
    9.293
  • YOLOv5n · RK3588 · W8A8 · 640x640
    Single-core FPS
    85.86
    Single-core latency (ms)
    11.65
    Multi-core FPS
    234.57
    Memory (MB)
    22.36
  • YOLOv5n · RK3576 · W8A8 · 640x640
    Single-core FPS
    119.54
    Single-core latency (ms)
    8.37
    Multi-core FPS
    177.08
    Memory (MB)
    17.8
  • YOLOv5s · RK3588 + RK1820 PCIe accelerator · W8A8 · 640x640
    Single-core FPS
    35.63
    Single-core latency (ms)
    28.068
    Multi-core FPS
    220.6
    Memory (MB)
    58.098
  • YOLOv5s · reComputer R Series (CM5 + Hailo-10H)
    Batch 1 FPS
    221.97
  • YOLOv5s · RK3588 · W8A8 · 640x640
    Single-core FPS
    47.86
    Single-core latency (ms)
    20.89
    Multi-core FPS
    135.13
    Memory (MB)
    37.94
  • YOLOv5s · RK3576 · W8A8 · 640x640
    Single-core FPS
    56
    Single-core latency (ms)
    17.86
    Multi-core FPS
    107.38
    Memory (MB)
    27.82
  • YOLOv5m · RK3588 + RK1820 PCIe accelerator · W8A8 · 640x640
    Single-core FPS
    18.46
    Single-core latency (ms)
    54.17
    Multi-core FPS
    63.13
    Memory (MB)
    32.128
  • YOLOv5m · reComputer R Series (CM5 + Hailo-10H)
    Batch 1 FPS
    98.13
  • YOLOv5m · RK3588 · W8A8 · 640x640
    Single-core FPS
    21.3
    Single-core latency (ms)
    46.95
    Multi-core FPS
    59.45
    Memory (MB)
    85.55
  • YOLOv5m · RK3576 · W8A8 · 640x640
    Single-core FPS
    23.68
    Single-core latency (ms)
    42.23
    Multi-core FPS
    39.8
    Memory (MB)
    60.1
  • YOLOv5s ReLU · RK3588 · W8A8 · 640x640
    Single-core FPS
    98.94
    Single-core latency (ms)
    10.11
    Multi-core FPS
    185.94
    Memory (MB)
    37.85
  • YOLOv5s ReLU · RK3576 · W8A8 · 640x640
    Single-core FPS
    66.85
    Single-core latency (ms)
    14.96
    Multi-core FPS
    103.78
    Memory (MB)
    23.2

RESTful API

API endpoints

MethodPathPurpose
POST/api/models/yolov5/predictRun inference on the uploaded image.
GET/api/healthCheck model and runtime status.

Test the API

Replace <board-ip> with your board’s IP address. Save an image as test.jpg in your current directory and send it to the prediction endpoint.

bash
curl -X POST "http://<board-ip>:8000/api/models/yolov5/predict" \
  -F "file=@sample.jpg"

Develop with the API

Install requests with python -m pip install requests. In the example, replace <board-ip> with your board’s IP address and use an image named test.jpg.

python
import requests

with open("test.jpg", "rb") as image:
    response = requests.post(
        "http://<board-ip>:8000/api/models/yolov5/predict",
        files={"file": image},
        timeout=30,
    )
response.raise_for_status()
print(response.json())

Frequently Asked Questions (FAQ)

Why do some sizes disappear when I switch platforms?

The size picker shows the variants with a deployment command for your selected platform. Switch platforms in the quick start to see the sizes available for each one.

What should I check if the accelerator is unavailable?

Check that the host OS, drivers, and runtime match the selected platform’s guide. For Hailo, verify that the host detects the accelerator and that the installed HailoRT version matches the deployment instructions.

Where do I find the inference endpoint?

Select your platform and open the RESTful API section for the endpoint and input format.

More FAQs