Depth Anything V2 Beats Diffusion Depth Models While Running 10x Faster
A 25M parameter monocular depth model that runs 10x faster than diffusion baselines while producing sharper, more robust predictions from a single image.
ProTakeaways
- Depth Anything V2 Small is a 25M parameter monocular depth model available on Hugging Face under Apache 2.0.
- Trained on 595K synthetic labeled images plus 62M+ pseudo-labeled real images via a large teacher-student pipeline.
- Runs more than 10x faster than Stable Diffusion-based depth models like Marigold and Geowizard.
- Built on a DPT head over a DINOv2 backbone, same architecture as V1 but with a redesigned data recipe.
- Works out of the box with the Transformers
depth-estimationpipeline in three lines of Python. - Outputs relative depth by default; metric depth variants are available for SLAM and 3D reconstruction.
Estimating depth from a single RGB image is one of those computer vision problems that keeps refusing to die. The Small V2 checkpoint on Hugging Face is the compact 25M parameter version of the second generation of a model family that has become the go-to zero-shot depth estimator, and its download counter (well over 1.5 million pulls) makes it one of the most quietly load-bearing vision models in the ecosystem right now.
The checkpoint packages Depth Anything V2 in the standard transformers format so you can drop it into a pipeline with three lines. Under the hood it is the smallest of four sizes released by the authors, and it targets the case where you want good relative depth predictions without paying diffusion-model latency.
What changed between V1 and V2
The V1 to V2 jump is more interesting than a typical point release because the team essentially threw out a long-standing assumption in monocular depth. V2 produces finer and more robust depth predictions through three practices: replacing all labeled real images with synthetic images, scaling up the capacity of the teacher model, and training student models via the bridge of large-scale pseudo-labeled real images.
The synthetic-only labeled data choice is the spicy one. Real depth datasets (Kinect scans, LiDAR, structured light) are noisy, have holes around transparent and reflective surfaces, and blur fine geometry like hair or grass. Synthetic renders are pixel-perfect but do not look like the real world. The authors get around the domain gap by using a large teacher model trained on synthetic data to generate pseudo-labels on 595K synthetic labeled images and 62M+ real unlabeled images, then distilling that into smaller students. The Small checkpoint here is one of those students.

Architecture: nothing exotic, just well-picked parts
The model uses a DPT (Dense Prediction Transformer) head sitting on top of a DINOv2 backbone, which is the same skeleton as V1. DINOv2 gives you self-supervised features that already carry strong geometric structure, and DPT turns those patch tokens into a dense per-pixel prediction. The Small variant is a ViT-S encoder with roughly 24.8M parameters, and the family scales all the way up to 1.3B, covering a wide range of deployment scenarios.
Why it is fast
The direct competition here is diffusion-based depth models like Marigold and Geowizard, which produce lovely results but need many denoising steps per image. Depth Anything V2 runs more than 10x faster than the Stable Diffusion-based approaches while scoring higher on standard benchmarks. For anything running on video, robotics, or edge devices that gap decides whether the model is usable at all.
Using it
The Small variant is Apache 2.0 licensed (the Large is CC-BY-NC), free to download, and works out of the box with the standard Transformers pipeline:
from transformers import pipeline
from PIL import Image
pipe = pipeline(task="depth-estimation",
model="depth-anything/Depth-Anything-V2-Small-hf")
depth = pipe(Image.open("scene.jpg"))["depth"]
depth.save("depth.png")For more control over pre and post processing, load AutoImageProcessor and AutoModelForDepthEstimation directly and interpolate the predicted depth back to your source resolution with bicubic upsampling. The output is relative depth, so values are consistent within an image but not calibrated to meters. For metric depth in SLAM or 3D reconstruction, the authors also released metric variants fine-tuned with metric labels on top of the pre-trained checkpoints.
What it is actually good for
The practical envelope is wide. Cases where reaching for this specific checkpoint makes sense include:
- Depth conditioning for image and video generation (ControlNet-style pipelines).
- Background blur, portrait mode, and relighting in image editors.
- Rough 3D scene reconstruction from monocular footage, including novel view synthesis pre-processing.
- Robotics perception when you have no stereo rig and only need ordinal depth for obstacle avoidance.
- Data augmentation and pseudo-labeling for downstream depth or geometry tasks.
Grab the Small size when latency matters. On a modern GPU it runs comfortably in real time on 518x518 inputs, and it fits on mobile-class hardware after quantization. The community has already shipped ONNX exports, OpenVINO conversions for Intel edge devices, and three quantized variants on the Hub. If you need maximum fidelity for still images, jump to the Base or Large checkpoints, both of which use the same interface.
Where it falls down
A few honest limitations worth knowing before you build on it:
- Predictions are relative, not metric, unless you use the fine-tuned metric variants.
- Temporal consistency across video frames is not enforced, so you will see flicker on moving footage without post-processing.
- Transparent and mirrored surfaces still confuse it, though noticeably less than V1.
- Very thin structures like wires and fences can be missed at the Small size and benefit from a larger backbone.
The broader lesson from V2 is one that keeps showing up across vision: clean synthetic data plus a strong self-supervised backbone plus large-scale distillation can beat carefully curated real datasets. The V2 paper is short and worth reading if you care about depth or dense prediction in general, and the GitHub repo has the training code plus the larger checkpoints.