Depth Anything V2
Depth AnythingFeaturedCC-BY-NC-4.0vision

Depth Anything V2

Updated Jun 7, 2026
Parameters
0.3B
Context
8,192
License
CC-BY-NC-4.0
Updated
Jun 7, 2026

Will it run on your hardware?

Pick your GPU memory - see which quantizations fit, and the cheapest card for the rest

Runs on your 24 GB - best at Q4_K_M
1 of 1 quantizations fit Depth Anything V2 with real runtime overhead.
Q4_K_M
0.2 GB
fits tight too big

Need an exact figure for your context length? Use the VRAM calculator.

Run it locally

Copy-paste - running in under a minute

vLLMOpenAI-compatible API
vllm serve depth-anything/Depth-Anything-V2-Large

New to this? Start with Ollama · serve to many users with vLLM.

Deep dive

Notes, sources, and the full write-up

Depth Anything V2

Depth Anything V2 is the state-of-the-art monocular depth estimation model. Trained on 595K synthetic labeled images and 62M+ real unlabeled images, it produces high-quality depth maps from a single RGB image.

Key advantages

  1. More fine-grained - better detail than V1
  2. More robust - handles challenging scenes
  3. 10x faster - than Stable Diffusion-based depth models
  4. Lightweight - runs on consumer GPUs
  5. Widely used - backbone for FLUX.1 ControlNet Depth

Model variants

VariantEncoderParams
SmallViT-S24M
BaseViT-B97M
LargeViT-L335M
GiantViT-G1.1B

Usage

import cv2
import torch
from depth_anything_v2.dpt import DepthAnythingV2
 
model = DepthAnythingV2(encoder='vitl', features=256,
    out_channels=[256, 512, 1024, 1024])
model.load_state_dict(torch.load('depth_anything_v2_vitl.pth'))
model.eval()
 
depth = model.infer_image(cv2.imread('image.jpg'))
# depth is a HxW numpy array

When to use

  • 3D reconstruction - generate depth for 3D scenes
  • AR/VR - real-world depth sensing
  • Robotics - obstacle avoidance
  • Image editing - depth-aware adjustments
  • ControlNet - conditioning for image generation

Frequently asked

Quick answers to common questions

How much VRAM does Depth Anything V2 need?

Depth Anything V2 with 0.3B parameters needs significant VRAM depending on quantization. Use our VRAM calculator for an exact estimate.

Is Depth Anything V2 better than other Depth Anything models?

Depth Anything V2 has 0.3B parameters with 8,192 context - a strong choice for depth-estimation, monocular-depth, 3d-reconstruction.

What license is Depth Anything V2 under?

Depth Anything V2 is released under the CC-BY-NC-4.0 license, making it suitable for most commercial and personal projects.

What hardware runs Depth Anything V2 well?

With 0.3B parameters, Depth Anything V2 requires adequate VRAM. High-end GPUs like the RTX 4090 (24GB), RTX 5090 (32GB), or Mac Studio with unified memory are good options. Check our hardware directory for specific recommendations.

What is the best quantization for Depth Anything V2?

Q4_K_M is the recommended sweet spot - ~98% of FP16 quality at ~27% of the size. Step up to Q5_K_M or Q8_0 only if you have spare VRAM. Use our VRAM calculator to compare.

What models compete with Depth Anything V2?

Depth Anything V2 competes with other models in its class. Browse our model directory for comparisons, benchmarks, and community reviews to find the best fit.

Compare & pair with

Similar models and recommended hardware

Related models

Recommended hardware

Nearby options

Similar models and compatible hardware by spec

Comments coming soon

Configure NEXT_PUBLIC_GISCUS_REPO_ID and NEXT_PUBLIC_GISCUS_CATEGORY_ID at giscus.app to enable.