CV / YOLOv8
YOLOv8-seg
reComputer R Series (CM5 + Hailo-10H)
YOLOv8n/s/m instance segmentation on reComputer RK3588/RK3576 (RKNN) and on reComputer R Series with Hailo-8 or Hailo-10H through HailoRT.
Choose the device you're using, the set up guide and documentation will update accordingly.
Getting Started
sudo docker run --rm \
--name cm5-hailo10h-yolov8n-seg \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/yolov8n_seg:latest \
python web_detection.py --model_path model/yolov8n_seg.hef --video_path video/test.mp4Model Details
reComputer R Series (CM5 + Hailo-10H)YOLOv8-seg on reComputer CM5 + Hailo-10H
YOLOv8n/s/m-seg models run on Hailo-10H through HailoRT 5.1.1. The HEF exposes raw heads (no on-chip NMS): the host decodes the box heads (DFL or folded layout), applies sigmoid + per-class NMS and assembles the prototype masks (32 coefficients × 160×160×32 prototype, cropped to each box) for 80 COCO classes.
Model Info
| Variant | Input | Packaged HEF | Container image |
|---|---|---|---|
| YOLOv8n-seg | 640×640×3 RGB | 6.1 MB | yolov8n_seg |
| YOLOv8s-seg | 640×640×3 RGB | 18.6 MB | yolov8s_seg |
| YOLOv8m-seg | 640×640×3 RGB | 28.9 MB | yolov8m_seg |
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | Raspberry Pi CM5 |
| Accelerator | Hailo-10H, /dev/hailo0 |
| Runtime | HailoRT 5.1.1 |
| OS | Raspberry Pi OS Bookworm, aarch64 |
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot
# After reboot
hailortcli fw-control identify
ls /dev/hailo0Run With Demo Video
Select the command matching the model variant.
YOLOv8n-seg
sudo docker run --rm --privileged --net=host \
--name cm5-hailo10h-yolov8n-seg \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/yolov8n_seg:latest \
python web_detection.py --model_path model/yolov8n_seg.hef --video_path video/test.mp4YOLOv8s-seg
sudo docker run --rm --privileged --net=host \
--name cm5-hailo10h-yolov8s-seg \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/yolov8s_seg:latest \
python web_detection.py --model_path model/yolov8s_seg.hef --video_path video/test.mp4YOLOv8m-seg
sudo docker run --rm --privileged --net=host \
--name cm5-hailo10h-yolov8m-seg \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/yolov8m_seg:latest \
python web_detection.py --model_path model/yolov8m_seg.hef --video_path video/test.mp4Open http://<Board_IP>:8000 for the Web preview. Use /api/video_feed for the
MJPEG stream with instance masks and boxes overlaid.
REST API
Each variant has its own endpoint:
| Variant | Endpoint |
|---|---|
| YOLOv8n-seg | POST /api/models/yolov8n_seg/predict |
| YOLOv8s-seg | POST /api/models/yolov8s_seg/predict |
| YOLOv8m-seg | POST /api/models/yolov8m_seg/predict |
Example:
curl -X POST "http://<Board_IP>:8000/api/models/yolov8n_seg/predict" \
-F "file=@test.jpg"The response contains predictions entries with class, confidence and
box fields (box is x1/y1/x2/y2 in original-frame pixels).
Expected Result and Common Errors
On the first inference the module prints the loaded vstream list plus one layout line per inference type: the 10 output tensors, their value ranges and whether a sigmoid was applied. Expected: three box heads, three 80-channel score heads, three 32-channel mask-coefficient heads and one 160×160×32 prototype; a preview where masks stick to the instances.
| Symptom | Likely cause | Fix |
|---|---|---|
unexpected output layout in the log | Different HEF compile | Check the printed shapes against the list above; do not guess the layout |
HailoRT version error on start | Host library not 5.1.1 | Install hailo-h10-all on the host and keep the container mount at libhailort.so.5.1.1 |
docker: container name already in use | A previous container was not removed | docker rm -f cm5-hailo10h-yolov8n-seg, or change --name |
No /dev/hailo0 inside the container | Missing --device /dev/hailo0:/dev/hailo0 | Add the device mapping and --privileged --net=host |
Development
| Variant | Source | Dockerfile |
|---|---|---|
| YOLOv8n-seg | src/hailo10h_yolov8n_seg/ | docker/hailo10h/yolov8n_seg.dockerfile |
| YOLOv8s-seg | src/hailo10h_yolov8s_seg/ | docker/hailo10h/yolov8s_seg.dockerfile |
| YOLOv8m-seg | src/hailo10h_yolov8m_seg/ | docker/hailo10h/yolov8m_seg.dockerfile |
- Executor: HailoRT 5.1.1 InferModel wrapper (Python 3.13 + the bundled cp313
wheel); regression tests live in each module's
tests/. - HEFs: Hailo Model Zoo v5.4.0 Hailo-10H builds.
- Letterbox padding is 114 (Model Zoo
base/yolo.yaml); normalization is compiled into the HEF. Referenced mAP values are Model Zoo full-precision figures, not measurements on this board.