CV / YOLOX
YOLOX
reComputer R Series (CM5 + Hailo-10H)
YOLOX COCO object detection on reComputer RK3576, RK3588, and CM5 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-yolox-tiny \
--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/yolox_tiny:latest \
python web_detection.py --model_path model/yolox_tiny.hef --video_path video/test.mp4REST API
Use the REST API to run inference. Copy the commands below.
curl http://localhost:8080/v1/chat/completions -d '{
"model": "yolox-rknn",
"messages": [{"role": "user", "content": "Hello"}]
}'import requests
resp = requests.post(
"http://localhost:8080/v1/chat/completions",
json={"model": "yolox-rknn", "messages": [{"role": "user", "content": "Hello"}]},
)
print(resp.json())Model Details
reComputer R Series (CM5 + Hailo-10H)YOLOX on reComputer R Series (CM5 + Hailo-10H)
The Hailo-10H YOLOX services provide COCO 80-class object detection with on-chip Hailo HPP NMS. The HEFs emit decoded post-NMS detections, while the FastAPI application provides image prediction, video and camera input, an MJPEG preview and offline video analysis.
Model information
| Variant | Input | Packaged HEF | Container image |
|---|---|---|---|
| YOLOX-Tiny | 416x416x3 RGB | 8,880,128 bytes | yolox_tiny |
| YOLOX-S-Leaky | 640x640x3 RGB | 14,520,320 bytes | yolox_s_leaky |
| YOLOX-L-Leaky | 640x640x3 RGB | 48,189,440 bytes | yolox_l_leaky |
All three variants use Hailo Model Zoo v5.4.0 Hailo-10H HEFs (the byte sizes are listed in the table above).
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 |
The host driver, firmware, native HailoRT library, and Python wheel in the container must use the same HailoRT major and minor version.
sudo apt update
sudo apt install hailo-h10-all -y
sudo reboot
# After reboot
hailortcli --version
hailortcli fw-control identify
ls -l /dev/hailo0Run with the demo video
YOLOX-Tiny
sudo docker run --rm --privileged --net=host \
--name cm5-hailo10h-yolox-tiny \
-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/yolox_tiny:latest \
python web_detection.py --model_path model/yolox_tiny.hef --video_path video/test.mp4YOLOX-S-Leaky
sudo docker run --rm --privileged --net=host \
--name cm5-hailo10h-yolox-s-leaky \
-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/yolox_s_leaky:latest \
python web_detection.py --model_path model/yolox_s_leaky.hef --video_path video/test.mp4YOLOX-L-Leaky
sudo docker run --rm --privileged --net=host \
--name cm5-hailo10h-yolox-l-leaky \
-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/yolox_l_leaky:latest \
python web_detection.py --model_path model/yolox_l_leaky.hef --video_path video/test.mp4Open http://<BOARD_IP>:8000 for the Web preview.
REST API
Each variant exposes a model-specific prediction route:
| Variant | Endpoint |
|---|---|
| YOLOX-Tiny | POST /api/models/yolox_tiny/predict |
| YOLOX-S-Leaky | POST /api/models/yolox_s_leaky/predict |
| YOLOX-L-Leaky | POST /api/models/yolox_l_leaky/predict |
curl -X POST "http://<BOARD_IP>:8000/api/models/yolox_tiny/predict" \
-F "file=@test.jpg"The response contains COCO class IDs, confidence scores, and bounding boxes.
Development
| Variant | Source | Dockerfile |
|---|---|---|
| YOLOX-Tiny | src/hailo10h_yolox_tiny/ | docker/hailo10h/yolox_tiny.dockerfile |
| YOLOX-S-Leaky | src/hailo10h_yolox_s_leaky/ | docker/hailo10h/yolox_s_leaky.dockerfile |
| YOLOX-L-Leaky | src/hailo10h_yolox_l_leaky/ | docker/hailo10h/yolox_l_leaky.dockerfile |
Inputs and Outputs
Input: image, video frame, or camera frame. Output: COCO classes, confidence scores, and boxes.