CV / Depth-Anything

Depth-Anything-ViTS

reComputer R Series (CM5 + Hailo-8)

在搭载 Hailo-8 或 Hailo-10H 的 reComputer R Series 上使用 Depth-Anything V1(ViT-S)进行零样本单目深度估计。

55 次下载
大小
32 MB
内存
4GB+
精度
Hailo HEF

选择你正在使用的设备,设置指南和文档将相应更新。

快速开始

部署
sudo docker run --rm \
  --name cm5-hailo8-depth-anything-vits \
  --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/depth_anything_vits:latest \
  python web_detection.py --model_path model/depth_anything_vits.hef --video_path video/test.mp4

REST API

使用 REST API 进行推理。复制以下命令。

Curl
curl -X POST "http://<Board_IP>:8000/api/models/depth_anything_vits/predict" \
  -F "file=@test.jpg"
Python
import requests
response = requests.post(
    "http://<Board_IP>:8000/api/models/depth_anything_vits/predict",
    files={"file": open("test.jpg", "rb")},
    timeout=30,
)
print(response.json())

模型详情

reComputer R Series

Depth-Anything-ViTS 在 reComputer R Series(CM5 + Hailo-8)上运行

Depth-Anything V1(ViT-S 骨干网络)在 Hailo-8 上执行零样本单目深度估计。输入输出与 V2 相同,但精度略高(AbsRel 0.13 对比 0.147)。支持 INFERNO 色图可视化和深度统计 API。

模型信息

属性值
架构ViT-S(Depth-Anything V1)
任务零样本深度估计
输入224x224x3 RGB
输出深度图 224x224x1(相对值)
参数量24.2M
AbsRel0.13
HEFHailo Model Zoo v2.19.0, Hailo-8

使用演示视频运行

bash
sudo docker run --rm \
  --name cm5-hailo8-depth-anything-vits \
  --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/depth_anything_vits:latest \
  python web_detection.py --model_path model/depth_anything_vits.hef --video_path video/test.mp4

REST API

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

返回 depth_stats(最小值、最大值、均值、标准差)。

端点方法用途
/api/models/depth_anything_vits/predictPOST深度统计(JSON)
/api/video_feedGET带 INFERNO 深度叠加的 MJPEG

开发说明

  • 来源: src/rpi5_hailo8_depth_anything_vits/
  • 容器: ghcr.io/seeed-projects/recomputer-hailo8-cv/depth_anything_vits:latest
  • 系列:depth_anything(变体:v2_vits / vits)

输入与输出

Input: image, video, or USB camera frame. Output: relative depth map with INFERNO colormap overlay on MJPEG preview, plus depth statistics (min/max/mean/std) via API.