--- license: apache-2.0 base_model: depth-anything/Depth-Anything-V2-Large tags: - robotics - edge-deployment - anima - forge - depth-estimation - monocular-depth - safetensors - vision - ros2 - jetson - real-time library_name: transformers pipeline_tag: depth-estimation model-index: - name: depth-anything-v2-large results: - task: type: depth-estimation metrics: - name: Model Size (MB) type: model_size value: 1279 --- # Depth Anything V2 Large — SafeTensors > Depth Anything V2 (Large, ViT-L backbone) converted to SafeTensors format for safe, fast loading in robotic depth estimation pipelines. 335M parameters for high-quality monocular depth maps. This model is part of the **[RobotFlowLabs](https://huggingface.co/robotflowlabs)** model library, built for the **ANIMA** agentic robotics platform — a modular ROS2-native AI system that brings foundation model intelligence to real robots operating in the real world. ## Why This Model Exists Monocular depth estimation is fundamental to robotic navigation and manipulation — robots need to know how far away things are from a single camera. Depth Anything V2 produces the highest-quality relative depth maps from a single image. The original weights are distributed as raw `.pth` files. We converted them to SafeTensors format for safe, zero-copy memory-mapped loading. ## Model Details | Property | Value | |----------|-------| | **Architecture** | DPT head + ViT-Large encoder | | **Parameters** | 335M | | **Encoder** | ViT-L/14 (DINOv2-based) | | **Input Resolution** | Flexible (recommended 518×518) | | **Output** | Dense relative depth map | | **Training** | Synthetic + real depth labels (multi-stage) | | **Original Model** | [`depth-anything/Depth-Anything-V2-Large`](https://huggingface.co/depth-anything/Depth-Anything-V2-Large) | | **License** | Apache-2.0 | ## Included Files ``` depth-anything-v2-large/ ├── model.safetensors # 1.3 GB — Full model weights └── README.md # This file ``` ## Quick Start ```python from safetensors.torch import load_file import torch # Load SafeTensors weights state_dict = load_file("model.safetensors") # Load into Depth Anything V2 architecture from depth_anything_v2.dpt import DepthAnythingV2 model = DepthAnythingV2(encoder='vitl', features=256, out_channels=[256, 512, 1024, 1024]) model.load_state_dict(state_dict) model.to("cuda").eval() # Predict depth depth = model.infer_image(image) # Returns relative depth map ``` ### With Transformers ```python from transformers import AutoModelForDepthEstimation, AutoImageProcessor import torch processor = AutoImageProcessor.from_pretrained("depth-anything/Depth-Anything-V2-Large") model = AutoModelForDepthEstimation.from_pretrained("depth-anything/Depth-Anything-V2-Large") model.to("cuda").eval() inputs = processor(images=image, return_tensors="pt").to("cuda") with torch.no_grad(): depth = model(**inputs).predicted_depth ``` ### With FORGE (ANIMA Integration) ```python from forge.vision import VisionEncoderRegistry depth_estimator = VisionEncoderRegistry.load("depth-anything-v2-large") depth_map = depth_estimator(image_tensor) # Relative depth map ``` ## Use Cases in ANIMA Depth estimation is critical across ANIMA modules: - **Obstacle Avoidance** — Real-time depth maps for safe navigation - **Grasp Planning** — Estimate object distance for manipulation reach calculations - **3D Reconstruction** — Dense depth for point cloud generation from single camera - **Safety Zones** — Distance-based safety boundaries for human-robot collaboration - **Path Planning** — Identify traversable spaces and obstacle heights ## Depth Anything V2 Family | Model | Params | Size | Best For | |-------|--------|------|----------| | **[depth-anything-v2-large](https://huggingface.co/robotflowlabs/depth-anything-v2-large)** | **335M** | **1.3 GB** | **Highest quality depth** | | [depth-anything-v2-small](https://huggingface.co/robotflowlabs/depth-anything-v2-small) | 24.8M | 95 MB | Real-time edge deployment | ## Intended Use ### Designed For - Monocular depth estimation for robotic navigation - Dense depth maps for manipulation planning - Point cloud generation from RGB cameras - Obstacle detection and distance estimation ### Limitations - Produces relative (not metric) depth — requires calibration for absolute distances - Performance degrades on reflective, transparent, or textureless surfaces - Single-frame estimation — no temporal consistency for video - Inherits biases from training data distribution ### Out of Scope - Safety-critical autonomous driving without additional validation - Medical depth estimation - Surveillance applications ## Attribution - **Original Model**: [`depth-anything/Depth-Anything-V2-Large`](https://huggingface.co/depth-anything/Depth-Anything-V2-Large) by TUM & HKU - **License**: [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) - **Paper**: [Depth Anything V2](https://arxiv.org/abs/2406.09414) — Yang et al., 2024 - **Converted by**: [RobotFlowLabs](https://huggingface.co/robotflowlabs) using [FORGE](https://github.com/robotflowlabs/forge) ## Citation ```bibtex @article{yang2024depth_anything_v2, title={Depth Anything V2}, author={Yang, Lihe and Kang, Bingyi and Huang, Zilong and Zhao, Zhen and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang}, journal={arXiv preprint arXiv:2406.09414}, year={2024} } ``` ---

Built with FORGE by RobotFlowLabs
Optimizing foundation models for real robots.