CV / STDC1
STDC1
STDC1 (Short-Term Dense Concatenate) runs semantic segmentation with 19 Cityscapes classes through the HailoRT inference service.
Choose the device you're using, the set up guide and documentation will update accordingly.
Getting Started
# Docker command for hailo on reComputer R Series (CM5 + Hailo-10H)
sudo docker run -it --rm \
<image>:latest \
<serve> stdc1REST API
Use the REST API to run inference. Copy the commands below.
curl -X POST "http://<R20_IP>:8000/api/models/stdc1/predict" \
-F "file=@test.jpg"import requests
resp = requests.post(
"http://<R20_IP>:8000/api/models/stdc1/predict",
files={"file": open("test.jpg", "rb")},
timeout=30,
)
print(resp.json())Model Details
STDC1 on reComputer R Series (CM5 + Hailo-10H)
STDC1 (Short-Term Dense Concatenate) real-time semantic segmentation with Cityscapes 19-class output, running on Hailo-10H via HailoRT.
This page targets reComputer R Series (CM5 + Hailo-10H) with a PCIe Hailo-10H accelerator.
Model Info
| Property | Value |
|---|---|
| Architecture | STDC1 (Short-Term Dense Concatenate) |
| Task | Semantic Segmentation |
| Input | 1024×1920×3 RGB |
| Output | 1024×1920 class mask (19 classes) |
| Parameters | 8.27M |
| mIoU (Cityscapes) | 73.7% (hardware) |
| Source | Hailo Model Zoo |
Cityscapes Classes
| ID | Class | ID | Class | ID | Class |
|---|---|---|---|---|---|
| 0 | road | 7 | traffic sign | 14 | truck |
| 1 | sidewalk | 8 | vegetation | 15 | bus |
| 2 | building | 9 | terrain | 16 | train |
| 3 | wall | 10 | sky | 17 | motorcycle |
| 4 | fence | 11 | person | 18 | bicycle |
| 5 | pole | 12 | rider | ||
| 6 | traffic light | 13 | car |
Hardware and Host Setup
| Item | Value |
|---|---|
| Board | reComputer R Series with Raspberry Pi CM5 |
| Accelerator | Hailo-10H over PCIe, exposed as /dev/hailo0 |
| OS | Raspberry Pi OS Bookworm, aarch64 |
| Host driver | hailo-all apt package |
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 dockerRun With Demo Video
sudo docker run --rm --privileged --net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/stdc1:latest \
python web_detection.py --model_path model/stdc1.hef --video_path video/test.mp4Open http://<R20_IP>:8000 to view the web preview. The image includes the module source, demo video, HailoRT Python wheel, and HEF files listed below.
USB Camera Mode
sudo docker run --rm --privileged --net=host \
-e PYTHONUNBUFFERED=1 \
--device /dev/hailo0:/dev/hailo0 \
--device /dev/video0:/dev/video0 \
-v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
ghcr.io/seeed-projects/recomputer-hailo10h-cv/stdc1:latest \
python web_detection.py --model_path model/stdc1.hef --camera_id 0HEF Files
| HEF | Size | Notes |
|---|---|---|
stdc1.hef | 11 MB | Semantic segmentation model |
REST API
Prediction endpoint:
POST http://<R20_IP>:8000/api/models/stdc1/predictExample image request:
curl -X POST "http://<R20_IP>:8000/api/models/stdc1/predict" \
-F "file=@test.jpg"Common service endpoints:
| Endpoint | Method | Purpose |
|---|---|---|
/ | GET | Web preview UI |
/api/models/stdc1/predict | POST | Segmentation mask (JSON) |
/api/models/stdc1/visualize | POST | Overlay image (JPEG) |
/api/models/stdc1/classes | GET | Cityscapes class list |
/api/video_feed | GET | MJPEG preview stream |
Development Notes
- Source module:
src/hailo10h_stdc1/ - Dockerfile:
docker/hailo10h/stdc1.dockerfile - Main service:
web_detection.py --model_path model/stdc1.hefwraps HailoRT inference, post-processing, MJPEG preview, and REST prediction.
Inputs and Outputs
Input: image (1024x1920 RGB). Output: 19-class semantic segmentation mask (Cityscapes).