CV / YOLOv12
YOLOv12n
reComputer R Series (CM5 + Hailo-8)
YOLOv12n COCO object detection on reComputer R Series with Hailo-8 or Hailo-10H.
Choose the device you're using, the set up guide and documentation will update accordingly.
Getting Started
sudo docker run --rm \
--name cm5-hailo-yolov12n \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo8-cv/yolov12n:latestREST API
Use the REST API to run inference. Copy the commands below.
curl http://localhost:8080/v1/chat/completions -d '{
"model": "yolov12n",
"messages": [{"role": "user", "content": "Hello"}]
}'import requests
resp = requests.post(
"http://localhost:8080/v1/chat/completions",
json={"model": "yolov12n", "messages": [{"role": "user", "content": "Hello"}]},
)
print(resp.json())Model Details
reComputer R Series (CM5 + Hailo-8)YOLOv12n on reComputer R Series (CM5 + Hailo-8)
YOLOv12n performs COCO 80-class object detection on Hailo-8 through HailoRT. The official Hailo Model Zoo HEF takes a 640x640 input and runs NMS on-chip (HPP), so the application only parses the post-NMS buffer and serves the FastAPI/MJPEG WebUI.
This page targets reComputer R Series (CM5 + Hailo-8) with a PCIe Hailo-8 accelerator.
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | reComputer R Series with Raspberry Pi CM5 |
| Accelerator | Hailo-8 M.2 over PCIe, /dev/hailo0 |
| OS | Raspberry Pi OS Bookworm, aarch64 |
| Host driver | hailo-all apt package |
| HailoRT | 4.23.x; driver, firmware, native library, and wheel must share major.minor |
| Container Python | 3.11, aarch64 |
sudo apt update
sudo apt install hailo-all
sudo reboot
# After reboot
hailortcli fw-control identify
ls /dev/hailo0
# Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh --mirror Aliyun
sudo systemctl enable docker
sudo systemctl start dockerRun With Docker
sudo docker run --rm \
--name cm5-hailo-yolov12n \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo8-cv/yolov12n:latestOpen http://<BOARD_IP>:8000 for the MJPEG preview and offline video analysis.
The default command loops video/test.mp4. For a USB camera, replace
--video_path video/test.mp4 with --camera_id 0.
Model
| Item | Value |
|---|---|
| HEF | yolov12n.hef, 8,940,675 B, Model Zoo v2.20.0 |
| SHA256 | a1837b80fab4f102beb78c911cbfce2dcf93593d7015abecf2c1fadb2287d251 |
| Input | 640x640x3 |
| Post-processing | On-chip NMS (HPP) |
| COCO mAP (float / hardware) | 40.5 / 39.3 |
| FPS (batch 1 / batch 8) | 46.2 / 150 |
| Parameters / operations | 2.6M / 7.5G |
| Upstream / license | sunsmarterjie/yolov12, AGPL-3.0 |
The HEF applies preprocessing and NMS in-network; the host converts BGR to RGB, letterboxes to 640x640 with gray padding, and feeds raw uint8 pixels.
HTTP API
GET /— WebUI with MJPEG preview.POST /api/models/yolov12n/predict— image or video-frame prediction.POST /api/video/upload,POST /api/video/analyze,GET /api/video/status— offline video analysis.GET /api/video/download/{filename}— annotated MP4 download.
curl -X POST "http://<BOARD_IP>:8000/api/models/yolov12n/predict" \
-F "file=@bus.jpg" -F "conf=0.25" -F "iou=0.45"Performance and Validation Status
The model table contains Hailo Model Zoo's published Hailo-8 numbers, not
measurements from this container. Static checks and synthetic NMS
post-processing tests pass, but board loading, output layout, and real detection
accuracy are still pending. See the module TEST_REPORT.md; do not present this
page as hardware-validated until those checks are complete.
Limitations
- NMS is inside the HEF; the confidence threshold filters parsed detections, and the IoU slider is display-only.
- The Web service targets a trusted LAN and has no authentication or TLS.
- Do not use a Hailo-10H, Hailo-15H, or Hailo-8L HEF with this Hailo-8 module.
Inputs and Outputs
Input: image, video frame, or camera frame. Output: COCO classes, confidence scores, and boxes.