CV / STDC1
STDC1
STDC1(短时密集连接)通过 HailoRT 推理服务运行语义分割,支持 19 个 Cityscapes 类别。
12 次下载
大小
11 MB内存
4GB+精度
Hailo HEF / HailoRT选择你正在使用的设备,设置指南和文档将相应更新。
快速开始
部署
sudo docker run --rm \
--name cm5-hailo8-stdc1 \
--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/stdc1:latest \
python web_detection.py --model_path model/stdc1.hef --video_path video/test.mp4REST API
使用 REST API 进行推理。复制以下命令。
Curl
curl -X POST "http://<Board_IP>:8000/api/models/stdc1/predict" \
-F "file=@test.jpg"Python
import requests
resp = requests.post(
"http://<Board_IP>:8000/api/models/stdc1/predict",
files={"file": open("test.jpg", "rb")},
timeout=30,
)
print(resp.json())模型详情
STDC1 在 reComputer R Series (CM5 + Hailo-10H)
STDC1 (Short-Term Dense Concatenate) 实时 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 | 值 |
|---|---|
| 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 |
硬件与主机设置
| 项目 | 值 |
|---|---|
| 开发板 | reComputer R Series with Raspberry Pi CM5 |
| 加速器 | Hailo-10H over PCIe, exposed as /dev/hailo0 |
| 操作系统 | Raspberry Pi 操作系统 Bookworm, aarch64 |
| 主机驱动 | hailo-all apt 包 |
bash
sudo apt update
sudo apt install hailo-all
sudo 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使用演示视频运行
bash
sudo docker run --rm --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/stdc1:latest \
python web_detection.py --model_path model/stdc1.hef --video_path video/test.mp4打开 http://<Board_IP>:8000 查看 Web 预览。 镜像包含模块源码、演示视频、HailoRT Python wheel 以及下列 HEF 文件。
USB 摄像头模式
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.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/stdc1:latest \
python web_detection.py --model_path model/stdc1.hef --camera_id 0HEF 文件
| HEF | 大小 | 备注 |
|---|---|---|
stdc1.hef | 11 MB | 语义分割 model |
REST API
预测端点:
text
P操作系统T http://<Board_IP>:8000/api/models/stdc1/predict示例图片请求:
bash
curl -X P操作系统T "http://<Board_IP>:8000/api/models/stdc1/predict" \
-F "file=@test.jpg"通用服务端点:
| Endpoint | 方法 | 用途 |
|---|---|---|
/ | GET | Web 预览界面 |
/api/models/stdc1/predict | P操作系统T | Segmentation mask (JSON) |
/api/models/stdc1/visualize | P操作系统T | Overlay image (JPEG) |
/api/models/stdc1/classes | GET | Cityscapes class list |
/api/video_feed | GET | MJPEG 预览流 |
开发说明
- 源模块:
src/hailo10h_stdc1/ - Dockerfile:
docker/hailo10h/stdc1.dockerfile - 主服务:
web_detection.py --model_path model/stdc1.hefwraps HailoRT inference, post-processing, MJPEG preview, and REST prediction.
输入与输出
输入:图像(1024×1920 RGB)。输出:19 类语义分割掩码(Cityscapes)。