CV / NanoDet
NanoDet-RepVGG-a12
reComputer R Series (CM5 + Hailo-10H)
COCO 80-class object detection with nanodet_repvgg_a12 (YOLOX-based, on-chip NMS) 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-hailo10h-nanodet-repvgg-a12 \
--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/nanodet_repvgg_a12:latest \
python web_detection.py --model_path model/nanodet_repvgg_a12.hef --video_path video/test.mp4REST API
Use the REST API to run inference. Copy the commands below.
curl -X POST "http://<Board_IP>:8000/api/models/nanodet_repvgg_a12/predict" \
-F "file=@test.jpg"import requests
response = requests.post(
"http://<Board_IP>:8000/api/models/nanodet_repvgg_a12/predict",
files={"file": open("test.jpg", "rb")},
timeout=30,
)
print(response.json())Model Details
reComputer R Series (CM5 + Hailo-10H)NanoDet-RepVGG-a12 on reComputer CM5 + Hailo-10H
NanoDet-RepVGG performs COCO 80-class object detection on Hailo-10H with
on-chip NMS (Hailo HPP). The HEF emits already-decoded detections and the
app only parses the post-NMS tensor. Ported from the validated Hailo-8 module
rpi5_hailo8_nanodet_repvgg_a12; the executor uses the HailoRT 5.1.1
create_infer_model multi-output wrapper with FLOAT32 outputs.
Model Info
| Property | Value |
|---|---|
| Architecture | NanoDet-RepVGG (COCO-80) |
| Task | Object detection |
| Input | Read from the HEF at startup (printed on first run) |
| Output | on-chip NMS tensor, post-NMS shape 80x5x100 |
| Classes | 80 (COCO, 0-indexed — no labels_offset) |
| HEF | Hailo Model Zoo v5.4.0, Hailo-10H (4.6 MB) |
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | reComputer R Series with Raspberry Pi CM5 |
| Accelerator | Hailo-10H over PCIe, exposed as /dev/hailo0 |
| Host driver | hailo-h10-all apt package |
| Runtime | HailoRT 5.1.1 |
| Python in container | 3.13, 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
sudo docker run --rm \
--name cm5-hailo10h-nanodet-repvgg-a12 \
--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/nanodet_repvgg_a12:latest \
python web_detection.py --model_path model/nanodet_repvgg_a12.hef --video_path video/test.mp4Open http://<Board_IP>:8000 to view the web preview. For a USB camera, mount
/dev/video0 and replace --video_path video/test.mp4 with --camera_id 0.
REST API
curl -X POST "http://<Board_IP>:8000/api/models/nanodet_repvgg_a12/predict" \
-F "file=@test.jpg"| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/api/models/nanodet_repvgg_a12/predict | POST | Detections (JSON) |
/api/video_feed | GET | MJPEG preview stream |
Implementation notes
- The HEF runs NMS on-chip; the app only parses the post-NMS tensor, so
nms_threshis ignored (kept for API parity). - Post-NMS rows are
[ymin, xmin, ymax, xmax, score], normalized to [0,1] of the letterboxed input; the app scales to pixels and un-letterboxes. - Input preprocessing (normalization / color conversion) is compiled into the HEF; the app letterboxes and feeds raw uint8 pixels.
- HailoRT may return the NMS vstream as a ragged per-class list (NMS-by-score); the parser handles that plus object/dense layouts. First inference logs the raw type/shape for on-device verification.
- Executor outputs are requested as
FormatType.FLOAT32(dequantized by the SDK); reading the raw quantized buffers yields values in the tens of thousands and zero valid detections. - Class mapping:
cls_id(0..79) → standard COCO 80-class list directly.
Model source
nanodet_repvgg.hef is the Hailo-10H build from Hailo Model Zoo v5.4.0 —
URL, SHA256 and size are recorded in the repository
(src/hailo10h_nanodet_repvgg_a12/model/README.md).
Inputs and Outputs
Input: image, video, or USB camera frame. Output: COCO 80-class detection boxes with confidences, plus an annotated MJPEG preview.