CV / EfficientDet
EfficientDet-Lite1
reComputer R Series (CM5 + Hailo-10H)
COCO 80-class object detection with EfficientDet-Lite1 (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-efficientdet-lite1 \
--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/efficientdet_lite1:latest \
python web_detection.py --model_path model/efficientdet_lite1.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/efficientdet_lite1/predict" \
-F "file=@test.jpg"import requests
response = requests.post(
"http://<Board_IP>:8000/api/models/efficientdet_lite1/predict",
files={"file": open("test.jpg", "rb")},
timeout=30,
)
print(response.json())Model Details
reComputer R Series (CM5 + Hailo-10H)EfficientDet-Lite1 on reComputer R Series (CM5 + Hailo-10H)
EfficientDet-Lite1 performs COCO 80-class object detection on Hailo-10H through HailoRT. NMS and sigmoid run on-chip (Hailo HPP), so the host only parses the post-NMS tensor. This is the lite1 variant of the efficientdet family.
This page targets reComputer R Series (CM5 + Hailo-10H) with a PCIe Hailo-10H accelerator.
Model Info
| Property | Value |
|---|---|
| Architecture | EfficientDet-Lite1 (BiFPN) |
| Task | Object detection |
| Input | 384x384x3 RGB (normalization compiled into the HEF: mean=127, std=128) |
| Output | on-chip NMS tensor, post-NMS shape 89x5x100 |
| Classes | 89 slots (COCO category IDs 1..89 via labels_offset=1; 10 unused) |
| Parameters | 4.73M |
| Operations | 4G |
| Postprocess | on-chip NMS (HPP) + sigmoid; host parses post-NMS tensor |
| HEF | Hailo Model Zoo v5.4.0, Hailo-10H (7,614,464 bytes) |
The accuracy value is Hailo's Model Zoo reference. It is not a benchmark measured on CM5.
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | reComputer R Series with Raspberry Pi CM5 |
| Accelerator | Hailo-10H over PCIe, exposed as /dev/hailo0 |
| Runtime | HailoRT 5.1.1 |
| Python in container | 3.13, aarch64 |
Install the Hailo-10H packages on the host and confirm that the driver and device are ready before starting the container:
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot
# After reboot
hailortcli --version
hailortcli fw-control identify
ls -l /dev/hailo0The expected HailoRT version for this image is 5.1.1.
Run With Demo Video
sudo docker run --rm \
--name cm5-hailo10h-efficientdet-lite1 \
--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/efficientdet_lite1:latest \
python web_detection.py --model_path model/efficientdet_lite1.hef --video_path video/test.mp4Open http://<Board_IP>:8000 to view the web preview.
USB Camera Mode
sudo docker run --rm \
--name cm5-hailo10h-efficientdet-lite1 \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
--device /dev/video0:/dev/video0 \
-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/efficientdet_lite1:latest \
python web_detection.py --model_path model/efficientdet_lite1.hef --camera_id 0REST API
POST http://<Board_IP>:8000/api/models/efficientdet_lite1/predictcurl -X POST "http://<Board_IP>:8000/api/models/efficientdet_lite1/predict" \
-F "file=@test.jpg"| Endpoint | Method | Purpose |
|---|---|---|
/ | GET | Web preview UI |
/api/models/efficientdet_lite1/predict | POST | Detections (JSON) |
/api/video_feed | GET | MJPEG preview stream |
Implementation Notes
- The HEF runs NMS and sigmoid on-chip (
device_pre_post_layers: nms=true, sigmoid=true,hpp=true); the app only parses the post-NMS tensor, sonms_threshis ignored (API parity only). - Post-NMS rows are
[ymin, xmin, ymax, xmax, score], normalized to [0,1] of the 384x384 letterboxed input; the app scales to pixels and un-letterboxes. normalize_in_netwith mean=127/std=128 andpadding_color=127: the app letterboxes with gray (127) padding and feeds raw uint8 RGB pixels — no manual normalization.- The parser handles the HailoRT NMS layouts: the compact per-class buffer, the dense
89x5x100/89x100x5forms and the ragged (NMS-by-score) list. The first inference logs the raw type and shape once for on-device verification. - Class mapping:
cls_id(0..88) maps to COCO category IDcls_id+1(labels_offset=1); the 10 unused COCO IDs are "N/A" and not drawn. - Defaults: confidence 0.25, IOU 0.45 (IOU has no effect — NMS on-chip). Lower the confidence slider to inspect more detections.
Development Notes
- Source module:
src/hailo10h_efficientdet_lite1/ - Dockerfile:
docker/hailo10h/efficientdet_lite1.dockerfile - Container:
ghcr.io/seeed-projects/recomputer-hailo10h-cv/efficientdet_lite1:latest - The module uses the HailoRT 5.1.1 InferModel API and a Hailo-10H-specific HEF.
- Unit tests run without a device:
python -m unittest discover -s tests -v.
Inputs and Outputs
Input: image, video, or USB camera frame. Output: COCO 80-class detection boxes with confidences, plus an annotated MJPEG preview.