CV / STDC1

STDC1

STDC1 (Short-Term Dense Concatenate) runs semantic segmentation with 19 Cityscapes classes through the HailoRT inference service.

Size
11 MB
Memory
4GB+
Precision
Hailo HEF / HailoRT

Choose the device you're using, the set up guide and documentation will update accordingly.

Getting Started

Deploy
# Docker command for hailo on reComputer R Series (CM5 + Hailo-10H)
sudo docker run -it --rm \
  <image>:latest \
  <serve> stdc1

REST API

Use the REST API to run inference. Copy the commands below.

Curl
curl -X POST "http://<R20_IP>:8000/api/models/stdc1/predict" \
  -F "file=@test.jpg"
Python
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

PropertyValue
ArchitectureSTDC1 (Short-Term Dense Concatenate)
TaskSemantic Segmentation
Input1024×1920×3 RGB
Output1024×1920 class mask (19 classes)
Parameters8.27M
mIoU (Cityscapes)73.7% (hardware)
SourceHailo Model Zoo

Cityscapes Classes

IDClassIDClassIDClass
0road7traffic sign14truck
1sidewalk8vegetation15bus
2building9terrain16train
3wall10sky17motorcycle
4fence11person18bicycle
5pole12rider
6traffic light13car

Hardware and Host Setup

ItemValue
BoardreComputer R Series with Raspberry Pi CM5
AcceleratorHailo-10H over PCIe, exposed as /dev/hailo0
OSRaspberry Pi OS Bookworm, aarch64
Host driverhailo-all apt package
bash
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 docker

Run With Demo Video

bash
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.mp4

Open 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

bash
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 0

HEF Files

HEFSizeNotes
stdc1.hef11 MBSemantic segmentation model

REST API

Prediction endpoint:

text
POST http://<R20_IP>:8000/api/models/stdc1/predict

Example image request:

bash
curl -X POST "http://<R20_IP>:8000/api/models/stdc1/predict" \
  -F "file=@test.jpg"

Common service endpoints:

EndpointMethodPurpose
/GETWeb preview UI
/api/models/stdc1/predictPOSTSegmentation mask (JSON)
/api/models/stdc1/visualizePOSTOverlay image (JPEG)
/api/models/stdc1/classesGETCityscapes class list
/api/video_feedGETMJPEG preview stream

Development Notes

  • Source module: src/hailo10h_stdc1/
  • Dockerfile: docker/hailo10h/stdc1.dockerfile
  • Main service: web_detection.py --model_path model/stdc1.hef wraps HailoRT inference, post-processing, MJPEG preview, and REST prediction.

Inputs and Outputs

Input: image (1024x1920 RGB). Output: 19-class semantic segmentation mask (Cityscapes).