Open Source RoboticsRobots, software & learning

Depth Anything V2

Robotics model

Monocular relative and metric depth estimation family (DINOv2 + DPT, 24.8M–335.3M released params) with Apache-2.0 code and Small weights, and CC-BY-NC-4.0 Base/Large weights. [1] [2] [4]

Setup & usage →CheckpointsModel hub / homepageGetting started

For
Robotics perception engineers needing fast monocular relative or metric depth estimation; Teams deploying Apache-2.0 Depth-Anything-V2-Small on workstations or edge runtimes [1] [2]
Parameters
Small: 24.8M (0.099 GB), Base: 97.5M (0.39 GB), Large: 335.3M (1.341 GB) [1] [5]
Embodiments
Embodiment-agnostic monocular RGB camera perception module [1]
Source rights
Some licenses are unresolved. Includes noncommercial terms. Review licenses

Source researched · Not tested by us
Sources checked · Research details

Licenses & related hardware
License
Apache-2.0, Apache-2.0 (Small) / CC-BY-NC-4.0 (Base, Large, Giant per README) (noncommercial) · license not fully assessed for datasets · Details by part

Requirements · Research details and dates

On this page

Overview

Depth Anything V2 (DepthAnything/Depth-Anything-V2, arXiv:2406.09414) is a monocular depth estimation family from HKU and TikTok that pairs DINOv2 Vision Transformer encoders with a Dense Prediction Transformer (DPT) decoder head. Rather than training on noisy real-image depth labels, the authors train a large teacher exclusively on synthetic labeled images and distill student models across large-scale pseudo-labeled real images. At pinned commit a561b849ebae10a6f5ef49e26c83cbbcd36c71bf (last commit March 2026), the repository covers relative depth inference, indoor/outdoor metric depth fine-tuning, and the DA-2K evaluation benchmark. [1] [3] [4] [6]

Model card summary

Architecture

DINOv2 Vision Transformer encoder (vits, vitb, vitl; intermediate features from 4 transformer stages) paired with a Dense Prediction Transformer (DPT) decoder head for relative depth, or a metric depth regression head (max_depth=20 m indoor / 80 m outdoor).

[1] [4]

Base model

DINOv2 Vision Transformer encoders (vits, vitb, vitl) distilled from a large synthetic-trained teacher model

[1] [6]

Parameter count

Small: 24.8M (0.099 GB), Base: 97.5M (0.39 GB), Large: 335.3M (1.341 GB); Giant (1.3B) listed as Coming soon and unreleased

[1] [5]

Input modalities
rgb

Single RGB images or video frames (default inference input size 518).

[1]

Output modalities
video-frames

Outputs dense HxW per-pixel relative or metric depth maps/frames (and optional projected 3D point clouds via depth_to_pointcloud.py) rather than robot actions; mapped to video-frames as the closest controlled-vocabulary visual modality.

[1] [4] · Editorial assessment

Action space

Perception-only monocular depth model (no robot action output); outputs HxW relative depth maps or metric depth maps in meters (optionally projected to 3D point clouds).

[1] [4]

Trained / supported embodiments
  • Embodiment-agnostic monocular RGB camera perception module

[1]

Training datasets
  • Synthetic labeled images (used to train teacher model) bridged to large-scale pseudo-labeled real images
  • Hypersim (synthetic indoor) and Virtual KITTI 2 (synthetic outdoor) for metric depth fine-tuning
  • DA-2K benchmark (1K images, 2K pairwise relative depth annotations) for evaluation

[4] [6]

Interfaces
  • Python API (DepthAnythingV2.infer_image)
  • CLI scripts (run.py, run_video.py, metric_depth/run.py, depth_to_pointcloud.py)
  • Hugging Face Transformers pipeline
  • Gradio app (app.py)
  • Apple Core ML (Small)

[1] [4]

Checkpoints

Nine public ungated PyTorch checkpoints verified via Hugging Face API (3 relative + 6 metric). Hugging Face Transformers safetensors mirrors (-hf) and Apple Core ML Small exports are also linked in README.

[1] [4] [5]

Is this for you?

Use cases
  • Monocular relative depth estimation from single RGB images or videos (run.py, run_video.py, Hugging Face pipeline)
  • Indoor (Hypersim, max_depth=20 m) and outdoor (Virtual KITTI 2, max_depth=80 m) metric depth estimation in meters
  • Projecting 2D RGB + predicted metric depth into 3D point clouds (metric_depth/depth_to_pointcloud.py)
  • Fine-tuning the DINOv2 encoder + DPT head on custom metric depth datasets (metric_depth/dist_train.sh)

[1] [4]

Known limitations
  • Split weight licensing: only Depth-Anything-V2-Small is explicitly Apache-2.0 in the README, whereas Base, Large, and Giant are stated as CC-BY-NC-4.0 (note: Base/Large metric-depth Hugging Face cards list apache-2.0 metadata, creating a conflict that commercial users should clarify upstream).
  • Depth-Anything-V2-Giant (1.3B) is listed as 'Coming soon' in the README and is not publicly released.
  • Relative depth models output scale- and shift-invariant depth maps rather than metric meters; metric variants are fine-tuned separately on synthetic Hypersim (indoor) or Virtual KITTI 2 (outdoor).
  • README notes slight prediction differences between native OpenCV preprocessing and Hugging Face Transformers Pillow upsampling.

[1] [4] [5]

Safety and limitations
  • Commercial deployment is clearly permitted by the README only for the code and Depth-Anything-V2-Small (24.8M, Apache-2.0); Base and Large are stated as CC-BY-NC-4.0 in the README despite apache-2.0 tags on metric-depth Hugging Face cards.
  • Monocular depth estimation is inherently scale-ambiguous for relative models and domain-sensitive for metric models; do not rely on uncalibrated monocular depth alone for safety-critical obstacle avoidance.
  • Perception-only model outputting depth maps (or projected point clouds) and no robot actions.
  • Open Source Robotics has not installed Depth Anything V2, downloaded weights, run inference, or reproduced DA-2K or metric depth benchmarks.

[1] [2] [4] [5]

Compute & fine-tuning

Inference compute
  • Documented hardware: CUDA GPU, Apple Silicon MPS, or CPU (official code selects cuda -> mps -> cpu; also integrated in Apple Core ML; exact minimum VRAM and ms latency not tabulated in README)
  • Edge / consumer capable: Yes

Small (24.8M, 0.099 GB) officially supports MPS/CPU and is integrated into Apple Core ML (coreml-depth-anything-v2-small), supporting edge_capable=true; exact VRAM/latency not stated in README.

[1] [5] · Editorial assessment

Fine-tuning

[4]

Host computer

Runs on CUDA GPU, Apple Silicon MPS, or CPU (0.099 GB Small to 1.341 GB Large checkpoints); distributed GPU training used for metric_depth/dist_train.sh.

[1] [4] [5]

Operating system
  • Linux
  • macOS

README inference code explicitly supports CUDA, Apple MPS (macOS), and CPU; dist_train.sh targets Linux.

[1] · Editorial assessment

Dependencies
  • PyTorch and OpenCV (requirements.txt)
  • Optional Hugging Face Transformers (for -hf pipeline)
  • Optional Gradio (app.py)

[1]

Skills
  • Python, PyTorch, and OpenCV
  • Camera calibration (if projecting metric depth to 3D point clouds)

Inferred from README code snippets and metric_depth scripts.

[1] [4] · Editorial assessment

Setup & usage

Open the upstream getting-started guide [1] · Model card / documentation [1]

  • Clone DepthAnything/Depth-Anything-V2 and install requirements.txt (or install Hugging Face transformers for pipeline usage).
  • Download the desired checkpoint (.pth) from Hugging Face into checkpoints/ (choosing Small for clear Apache-2.0 commercial rights).
  • Run python run.py --encoder <vits|vitb|vitl> --img-path <path> --outdir <outdir> (or metric_depth/run.py with --max-depth 20 or 80 for metric meters).
  • Optionally project metric depth to 3D point clouds via metric_depth/depth_to_pointcloud.py.

[1] [4]

Upstream-reported benchmarks

Upstream-reported only: Open Source Robotics has not run training, inference, or hardware evaluations for these benchmarks.

BenchmarkUpstream-reported scoreScope & caveats
DA-2K & Zero-Shot Monocular Depth Benchmarks (arXiv:2406.09414)Upstream reports >10x faster inference and higher depth accuracy than Stable-Diffusion-based monocular depth baselines, plus finer details and robustness than Depth Anything V1; separately introduces the DA-2K relative depth benchmark (1K images, 2K pairwise annotations).Upstream-reported paper abstract and README summary; exact per-benchmark numerical scores are not included in the supplied README or abstract, and OSR has not independently reproduced evaluations.

[1] [6]

Project notes

Checkpoints, metric depth variants, and runtime notes

Nine public, ungated PyTorch checkpoints were verified via the Hugging Face API across three released scales—Small (24.8M, 0.099 GB), Base (97.5M, 0.39 GB), and Large (335.3M, 1.341 GB)—comprising three relative depth models plus six fine-tuned metric depth models trained on synthetic Hypersim (indoor, max_depth=20 m) and Virtual KITTI 2 (outdoor, max_depth=80 m). Practically, the relative checkpoints output scale- and shift-invariant relative depth maps rather than metric distances, whereas the metric checkpoints predict depth in meters using the configured indoor or outdoor scale. Across the verified checkpoints, the three 24.8M Small models—relative, Hypersim metric, and Virtual KITTI 2 metric—are the clear Apache-2.0 choices supported by both the README and Hugging Face metadata. The 1.3B Giant variant remains listed as "Coming soon" in the README and is not released. [1] [4] [5]

The native Python snippet automatically selects CUDA, Apple Silicon MPS, or CPU, and the ecosystem includes Hugging Face Transformers -hf mirrors as well as an official Apple Core ML Small export. However, upstream explicitly notes that Pillow upsampling in Hugging Face Transformers can produce slightly different predictions than the native OpenCV pipeline, so native inference is recommended for exact reproduction. For robotics 3D workflows, metric_depth/depth_to_pointcloud.py projects predicted metric depth maps into 3D point clouds. [1] [4]

Upstream-reported performance

In arXiv:2406.09414 and the README, the authors report over 10× faster inference and higher depth accuracy than Stable-Diffusion-based monocular depth baselines, along with finer details and improved robustness compared with Depth Anything V1. Separately, they introduce the DA-2K benchmark (1K images and 2K pairwise relative depth annotations across eight scene types) for evaluating relative depth estimation. Exact per-benchmark numerical scores are not included in the supplied README or abstract. All performance claims are upstream-reported; Open Source Robotics has not installed dependencies, downloaded weights, run training, fine-tuning, or inference, or reproduced DA-2K or metric depth evaluations. [1] [6]

What we checked

Source researched only; no installation, training, fine-tuning, inference, benchmark, or physical hardware test performed. No affiliate links or reused media.

Not yet established

  • Documented closed-loop control frequency (Hz)

Updates

Upstream last updated
Mar 24, 2026 [3]
Latest release
Not established
Profile updated
Nov 21, 2026
Sources last checked
Nov 21, 2026
Next review
Feb 19, 2027
Reviewed revision
commit snapshot; no GitHub release / a561b849ebae10a6f5ef49e26c83cbbcd36c71bf · software repository

Separate license matrix

Include Depth Anything V2 as a partially open model family: Apache-2.0 code and Small (24.8M) weights, while Base/Large weights are stated as CC-BY-NC-4.0 in the README (with an HF metric-card metadata discrepancy).

LayerAvailability / license
Codeavailable · Apache-2.0
Repository code is Apache-2.0. [1] [2]
Model weightsavailable · Apache-2.0 (Small) / CC-BY-NC-4.0 (Base, Large, Giant per README)
README states Small is Apache-2.0 and Base/Large/Giant are CC-BY-NC-4.0. Note: Hugging Face metadata on Base/Large metric-depth repos lists apache-2.0, creating a discrepancy that commercial users should verify before using Base or Large. [1] [5]
Training datasetsavailable · License not fully assessed
DA-2K evaluation benchmark (1K images, 2K pairwise depth annotations) is published on Hugging Face; synthetic/pseudo-labeled pre-training corpora and external Hypersim/VKITTI2 datasets are not bundled here. [1] [6]
Documentationavailable · Apache-2.0
README, metric_depth/README.md, and DA-2K.md included in repository. [1] [2]

Split Apache-2.0 and CC-BY-NC-4.0 licensing

While the repository root LICENSE is Apache-2.0, the README's License section explicitly states that only Depth-Anything-V2-Small is licensed under Apache-2.0, whereas Base, Large, and Giant are under CC-BY-NC-4.0 (non-commercial). Notably, Hugging Face card metadata on the Base and Large metric-depth repositories lists apache-2.0, creating a metadata conflict with the root README; commercial robotics teams should stick to the 24.8M Small checkpoints or obtain written clarification upstream before using Base or Large. [1] [2] [5]

References

Each source links to the exact revision we read. “Used for” shows where this page relies on it.

Correction guidance · Discussion is not enabled · Profile format 0.8.0-draft.1

Change history

2026-11-21 — Initial 0.8.0-draft.1 model profile for Depth Anything V2 (9 verified HF checkpoints, split license analysis).