CV / Depth-Anything
Depth-Anything-ViTS
reComputer R Series (CM5 + Hailo-8)
Monokulare Zero-Shot-Tiefenschätzung mit Depth-Anything V1 (ViT-S) auf reComputer R Series mit Hailo-8 oder Hailo-10H.
Wähle das Gerät, das du verwendest. Die Einrichtungsanleitung und Dokumentation werden entsprechend aktualisiert.
Erste Schritte
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.mp4REST API
Verwende die REST API für die Inferenz. Kopiere die folgenden Befehle.
curl -X POST "http://<Board_IP>:8000/api/models/depth_anything_vits/predict" \
-F "file=@test.jpg"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())Modelldetails
reComputer R SeriesDepth-Anything-ViTS auf reComputer R Series (CM5 + Hailo-8)
Depth-Anything V1 (ViT-S-Backbone) führt auf Hailo-8 eine monokulare Zero-Shot-Tiefenschätzung aus. Gleiche Ein-/Ausgabe wie V2, aber etwas genauer (AbsRel 0.13 gegenüber 0.147). INFERNO-Visualisierung und API für Tiefenstatistiken.
Modellinformationen
| Eigenschaft | Wert |
|---|---|
| Architektur | ViT-S (Depth-Anything V1) |
| Aufgabe | Zero-Shot-Tiefenschätzung |
| Eingabe | 224x224x3 RGB |
| Ausgabe | Tiefenkarte 224x224x1 (relativ) |
| Parameter | 24.2M |
| AbsRel | 0.13 |
| HEF | Hailo Model Zoo v2.19.0, Hailo-8 |
Mit Demovideo ausführen
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.mp4REST-API
curl -X POST "http://<Board_IP>:8000/api/models/depth_anything_vits/predict" \
-F "file=@test.jpg"Gibt depth_stats (Minimum, Maximum, Mittelwert, Standardabweichung) zurück.
| Endpunkt | Methode | Zweck |
|---|---|---|
/api/models/depth_anything_vits/predict | POST | Tiefenstatistiken (JSON) |
/api/video_feed | GET | MJPEG mit INFERNO-Tiefenüberlagerung |
Entwicklungshinweise
- Quelle:
src/rpi5_hailo8_depth_anything_vits/ - Container:
ghcr.io/seeed-projects/recomputer-hailo8-cv/depth_anything_vits:latest - Familie: depth_anything (Varianten v2_vits / vits)
Eingaben und Ausgaben
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.