CV / YOLOv12

YOLOv12n

reComputer R Series (CM5 + Hailo-8)

YOLOv12n COCO object detection on reComputer R Series with Hailo-8 or Hailo-10H.

1 downloads
Size
8.5 MB
Precision
Hailo HEF

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

Getting Started

Deploy
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:latest

REST API

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

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

ItemValue
BoardreComputer R Series with Raspberry Pi CM5
AcceleratorHailo-8 M.2 over PCIe, /dev/hailo0
OSRaspberry Pi OS Bookworm, aarch64
Host driverhailo-all apt package
HailoRT4.23.x; driver, firmware, native library, and wheel must share major.minor
Container Python3.11, aarch64
bash
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 docker

Run With Docker

bash
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:latest

Open 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

ItemValue
HEFyolov12n.hef, 8,940,675 B, Model Zoo v2.20.0
SHA256a1837b80fab4f102beb78c911cbfce2dcf93593d7015abecf2c1fadb2287d251
Input640x640x3
Post-processingOn-chip NMS (HPP)
COCO mAP (float / hardware)40.5 / 39.3
FPS (batch 1 / batch 8)46.2 / 150
Parameters / operations2.6M / 7.5G
Upstream / licensesunsmarterjie/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.
bash
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.