CV / Depth-Anything

Depth-Anything-ViTS

Depth-Anything V1 (ViT-S backbone) outputs a 224x224 relative depth map. Same I/O as V2 but slightly more accurate (AbsRel 0.13 vs 0.147). INFERNO colormap visualization, depth statistics API.

1 téléchargements
Taille
32 MB
Mémoire
4GB+
Précision
Hailo HEF / HailoRT 4.23.x

Choisissez l'appareil que vous utilisez. Le guide de configuration et la documentation seront mis à jour en conséquence.

Pour commencer

Déployer
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

API REST

Utilisez l'API REST pour exécuter l'inférence. Copiez les commandes ci-dessous.

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())

Détails du modèle

Depth-Anything-ViTS on reComputer R Series (CM5 + Hailo-8)

Depth-Anything V1 (ViT-S backbone) performs zero-shot monocular depth estimation on Hailo-8. Same I/O as V2 but slightly more accurate (AbsRel 0.13 vs 0.147). INFERNO colormap visualization, depth statistics API.

Model Info

PropertyValue
ArchitectureViT-S (Depth-Anything V1)
TaskZero-shot depth estimation
Input224x224x3 RGB
OutputDepth map 224x224x1 (relative)
Parameters24.2M
AbsRel0.13
HEFHailo Model Zoo v2.19.0, Hailo-8

Run With Demo Video

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"

Returns depth_stats (min, max, mean, std).

EndpointMethodPurpose
/api/models/depth_anything_vits/predictPOSTDepth statistics (JSON)
/api/video_feedGETMJPEG with INFERNO depth overlay

Development Notes

  • Source: src/rpi5_hailo8_depth_anything_vits/
  • Container: ghcr.io/seeed-projects/recomputer-hailo8-cv/depth_anything_vits:latest
  • Family: depth_anything (variants v2_vits / vits)

Entrées et sorties

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.