CV / ByteTrack
ByteTrack
reComputer R Series (CM5 + Hailo-8)
MOT17 pedestrian tracking with ByteTrack-S / Tiny / Nano / M 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 pi5-hailo8-bytetrack-s \
--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/bytetrack_s_mot17:latest \
python web_detection.py --model_path model/bytetrack_s_mot17.hef --video_path video/test.mp4Model Details
reComputer R Series (CM5 + Hailo-8)ByteTrack-S / ByteTrack-Tiny MOT17 Tracking on reComputer R Series (CM5 + Hailo-8)
ByteTrack-S, ByteTrack-Tiny, ByteTrack-Nano and ByteTrack-M track people on MOT17-style video on Hailo-8 through HailoRT 4.23. The HEFs are YOLOX-style person detectors; the host runs the nine-head decode, NMS and ByteTrack association (Kalman prediction plus high/low-score IoU matching), then draws a stable track ID on the MJPEG preview.
Model Info
| Variant | Input | Packaged HEF | MOTA float / Hailo-8 | FPS (batch 1) | Params / Ops | Container |
|---|---|---|---|---|---|---|
| ByteTrack-S | 608×1088×3 | 14.8 MB | 79.5 / 77.7 | 88.3 | 8.94M / 43.21G | bytetrack_s_mot17 |
| ByteTrack-Tiny | 608×1088×3 | 9.7 MB | 77.2 / 76.0 | 126 | 5.03M / 24.60G | bytetrack_tiny_mot17 |
| ByteTrack-Nano | 608×1088×3 | 9.8 MB | 70.1 / 69.0 | 63.7 | 0.90M / 4.12G | bytetrack_nano_mot17 |
| ByteTrack-M | 608×1088×3 | 81.4 MB | 86.2 / 86.1 | 11.1 | 25.28M / 206.12G | bytetrack_m_mot17 |
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | reComputer R Series with Raspberry Pi CM5 |
| Accelerator | Hailo-8 over PCIe, exposed as /dev/hailo0 |
| Runtime | HailoRT 4.23.x (host / container must share major.minor) |
| Python in container | 3.11, aarch64 |
sudo apt update
sudo apt install hailo-all -y
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 Demo Video
Select the command matching the model variant. The bundled video/test.mp4 is Hailo's example.mp4 street-scene demo clip.
ByteTrack-S
sudo docker run --rm \
--name pi5-hailo8-bytetrack-s \
--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/bytetrack_s_mot17:latest \
python web_detection.py --model_path model/bytetrack_s_mot17.hef --video_path video/test.mp4ByteTrack-Tiny
sudo docker run --rm \
--name pi5-hailo8-bytetrack-tiny \
--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/bytetrack_tiny_mot17:latest \
python web_detection.py --model_path model/bytetrack_tiny_mot17.hef --video_path video/test.mp4ByteTrack-Nano
sudo docker run --rm \
--name pi5-hailo8-bytetrack-nano \
--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/bytetrack_nano_mot17:latest \
python web_detection.py --model_path model/bytetrack_nano_mot17.hef --video_path video/test.mp4ByteTrack-M
sudo docker run --rm \
--name pi5-hailo8-bytetrack-m \
--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/bytetrack_m_mot17:latest \
python web_detection.py --model_path model/bytetrack_m_mot17.hef --video_path video/test.mp4USB Camera Mode
sudo docker run --rm \
--name pi5-hailo8-bytetrack-s \
--privileged \
--net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
--device /dev/video0:/dev/video0 \
-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/bytetrack_s_mot17:latest \
python web_detection.py --model_path model/bytetrack_s_mot17.hef --camera_id 0Swap bytetrack_s_mot17 for bytetrack_tiny_mot17 to use the Tiny variant.
REST API
| Variant | Endpoint |
|---|---|
| ByteTrack-S | POST /api/models/bytetrack_s_mot17/predict |
| ByteTrack-Tiny | POST /api/models/bytetrack_tiny_mot17/predict |
| ByteTrack-Nano | POST /api/models/bytetrack_nano_mot17/predict |
| ByteTrack-M | POST /api/models/bytetrack_m_mot17/predict |
curl -X POST "http://<Board_IP>:8000/api/models/bytetrack_s_mot17/predict" \
-F "file=@test.jpg"Returns predictions entries with track_id, class, confidence and box.
Implementation Notes
- The HEFs expose nine YOLOX-style heads: box(4), objectness(1) and class(1) for strides 32, 16 and 8. There is no on-chip NMS.
- Host decode:
center = (raw_xy + grid) * stride,size = exp(raw_wh) * stride,score = obj * class(the HEF already applies sigmoid). Boxes are kept at 0.1 and NMS is 0.7. - ByteTrack association uses Kalman prediction plus high-score and low-score IoU matching; only activated tracks are drawn.
- Pre-processing letterboxes to 608×1088 with padding 114 and converts BGR to RGB; ImageNet normalization is compiled into the HEF.
- This is a person-only MOT17 detector, not a generic 80-class detector.
Development Notes
- Sources:
src/rpi5_hailo8_bytetrack_{s,tiny,nano,m}_mot17/ - Dockerfiles:
docker/hailo8/bytetrack_{s,tiny,nano,m}_mot17.dockerfile - Containers:
ghcr.io/seeed-projects/recomputer-hailo8-cv/bytetrack_{s,tiny,nano,m}_mot17:latest - HEFs: Hailo Model Zoo v2.20.0 (
hailo8), sizes and SHA256 recorded in each module'smodel/README.md - Tracker: host-side ByteTrack port in each module's
py_utils/byte_tracker.py
Inputs and Outputs
Input: image, video, or USB camera frame. Output: person boxes with confidence and track IDs, plus an annotated MJPEG preview.