Skip to content
ModelsThatRun

Depth Anything V2 Metric

Depth Anything V2 fine-tuned for depth in meters, indoors (Hypersim, to 20 m) and outdoors (Virtual KITTI 2, to 80 m). Only Small is Apache-2.0.

Size

Commercial use OK for size indoor-small: code Apache-2.0, weights Apache-2.0. Measured on our RTX 4090: 18.1 ms median, 869 MiB VRAM peak. safetensors weights, 95 MB.

License

Commercial use OK indoor-small

Code
Apache-2.0checked 21 Nov 2026
Weights indoor-small
Apache-2.0 Commercial OKchecked 21 Nov 2026
Weights indoor-base
CC-BY-NC-4.0 Non-commercialchecked 21 Nov 2026
Weights indoor-large
CC-BY-NC-4.0 Non-commercialchecked 21 Nov 2026
Weights outdoor-small
Apache-2.0 Commercial OKchecked 21 Nov 2026
Weights outdoor-base
CC-BY-NC-4.0 Non-commercialchecked 21 Nov 2026
Weights outdoor-large
CC-BY-NC-4.0 Non-commercialchecked 21 Nov 2026

On our RTX 4090, measured

18.1ms median

p90 19.8 ms, fp32, batch 1, 770x518

VRAM peak
869 MiB
Status
Runs as is
Environment, 22 Nov 2026

NVIDIA GeForce RTX 4090, driver 580.173.02, CUDA 13.0, torch 2.14.1+cu130, Python 3.12.9, transformers==5.20.2. Baseline 1034 MiB. 10 warm-up + 100 timed. Scope: predict(): pre-processing, forward pass and post-processing; input file decoded beforehand.

Accuracy

Not yet scored

Weights

safetensors

Size
95 MB
sha256
e990eb82fbf11b05b7813261196a2b841bdcf5a05f64396724a8987fa90504a3
Download indoor-small weights

Same photos and one score threshold for every model of this task. Failures are marked.

Use it when

You need depth in meters and know your scenes: the indoor checkpoints are trained to 20 m, the outdoor ones to 80 m. Small is Apache-2.0 and took 18 ms a call.

Avoid it when

You need Base or Large commercially (CC BY-NC 4.0), or one checkpoint for every scene: the indoor Small and Base put the treeline behind the mountains in our valley photo, and every outdoor size lost the runner at the back of our marathon photo into the road.

Sizes

SizeLatencyVRAMAccuracyWeightsRunsLicense
indoor-small18.1 ms770x518869 MiBNot yet scored95 MBAs isCommercial OK
indoor-base30.3 ms770x5181.3 GiBNot yet scored372 MBAs isNon-commercial
indoor-large72.7 ms770x5182.7 GiBNot yet scored1.25 GBAs isNon-commercial
outdoor-small18.0 ms770x518858 MiBNot yet scored95 MBAs isCommercial OK
outdoor-base30.1 ms770x5181.3 GiBNot yet scored372 MBAs isNon-commercial
outdoor-large73.3 ms770x5182.7 GiBNot yet scored1.25 GBAs isNon-commercial

Estimated on other GPUs

Estimate, not measured. Worked out from our RTX 4090 run and NVIDIA's spec sheets. Each kind of GPU work is scaled by that GPU's peak for it: tensor cores at the precision the kernels used, CUDA cores, or memory bandwidth. The CPU's part of each call is kept at what it took on our Intel Core i7-10700K. How we estimate

Where a call's time goes on our RTX 4090: CUDA cores, FP32 44%, CPU and kernel launches 38%, host–device copies 8%, memory-bound 7%, tensor cores, TF32 3%.

GeForce (13)
GPUFitsLatency
GeForce RTX 5090Blackwell, 32 GB GDDR7Yes≈ 16 ms
GeForce RTX 5080Blackwell, 16 GB GDDR7Yes≈ 22 ms
GeForce RTX 5070 TiBlackwell, 16 GB GDDR7Yes≈ 25–26 ms
GeForce RTX 5070Blackwell, 12 GB GDDR7Yes≈ 32–33 ms
GeForce RTX 5060 Ti 16GBBlackwell, 16 GB GDDR7Yes≈ 38–41 ms
GeForce RTX 5060Blackwell, 8 GB GDDR7Yes≈ 45–48 ms
GeForce RTX 4080Ada Lovelace, 16 GB GDDR6XYes≈ 24 ms
GeForce RTX 4070 TiAda Lovelace, 12 GB GDDR6XYes≈ 27–28 ms
GeForce RTX 4070Ada Lovelace, 12 GB GDDR6XYes≈ 33–35 ms
GeForce RTX 3090Ampere, 24 GB GDDR6XYes≈ 28–29 ms
GeForce RTX 3080Ampere, 10 GB GDDR6XYes≈ 32–34 ms
GeForce RTX 3070 TiAmpere, 8 GB GDDR6XYes≈ 41–43 ms
GeForce RTX 3070Ampere, 8 GB GDDR6Yes≈ 43–46 ms
Workstation (4)
GPUFitsLatency
RTX PRO 6000 Blackwell Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 14–15 ms
RTX PRO 6000 Blackwell Max-Q Workstation EditionBlackwell, 96 GB GDDR7Yes≈ 15–16 ms
RTX 6000 Ada GenerationAda Lovelace, 48 GB GDDR6Yes≈ 17 ms
RTX A6000Ampere, 48 GB GDDR6Yes≈ 27–28 ms
Data center (6)
GPUFitsLatency
B200 (HGX, one GPU)Blackwell, 180 GB HBM3EYes≈ 17–18 ms
H200 SXMHopper, 141 GB HBM3eYes≈ 19 ms
H100 SXMHopper, 80 GB HBM3Yes≈ 19 ms
A100 SXM 80GBAmpere, 80 GB HBM2eYes≈ 42–43 ms
L40SAda Lovelace, 48 GB GDDR6Yes≈ 17 ms
L4Ada Lovelace, 24 GB GDDR6Yes≈ 33–35 ms

CPU only

Measured by us with no GPU on an Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz, 8 cores, 94.2 GiB of memory: the same official code with the GPU hidden, in fp32 on 8 threads. Before it was timed, its output on the timing input was checked against the GPU's. These numbers say what to expect without a GPU. They aren't compared with any GPU's, here or in the charts. How we measure on a CPU

SizeRuntimeLatency on the CPURAM peak
indoor-smallPyTorch2.14.1 · fp32 · 8 threads461 ms770x5181.2 GiB
indoor-basePyTorch2.14.1 · fp32 · 8 threads1278 ms770x5181.7 GiB
indoor-largePyTorch2.14.1 · fp32 · 8 threads4200 ms770x5183.1 GiB
outdoor-smallPyTorch2.14.1 · fp32 · 8 threads526 ms770x5181.2 GiB
outdoor-basePyTorch2.14.1 · fp32 · 8 threads1165 ms770x5181.7 GiB
outdoor-largePyTorch2.14.1 · fp32 · 8 threads4157 ms770x5183.0 GiB

From the authors

In their words, with their numbers. Ours are in the cards at the top of this page.

Paper

Depth Anything V2

Lihe Yang, Bingyi Kang, Zilong Huang, Zhen Zhao, Xiaogang Xu, Jiashi Feng and 1 others

arXiv 2406.09414, 13 Jun 2024

Abstract

This work presents Depth Anything V2. Without pursuing fancy techniques, we aim to reveal crucial findings to pave the way towards building a powerful monocular depth estimation model. Notably, compared with V1, this version produces much finer and more robust depth predictions through three key practices: 1) replacing all labeled real images with synthetic images, 2) scaling up the capacity of our teacher model, and 3) teaching student models via the bridge of large-scale pseudo-labeled real images. Compared with the latest models built on Stable Diffusion, our models are significantly more efficient (more than 10x faster) and more accurate. We offer models of different scales (ranging from 25M to 1.3B params) to support extensive scenarios. Benefiting from their strong generalization capability, we fine-tune them with metric depth labels to obtain our metric depth models. In addition to our models, considering the limited diversity and frequent noise in current test sets, we construct a versatile evaluation benchmark with precise annotations and diverse scenes to facilitate future research.

README

Copied from the authors' repository at commit a561b84 on 23 Nov 2026. Numbers and license claims in it are theirs, not measured or checked by us. We removed badges, replaced images with links and adjusted headings.

Figure teaser

We here provide a simple codebase to fine-tune our Depth Anything V2 pre-trained encoder for metric depth estimation. Built on our powerful encoder, we use a simple DPT head to regress the depth. We fine-tune our pre-trained encoder on synthetic Hypersim / Virtual KITTI datasets for indoor / outdoor metric depth estimation, respectively.

Pre-trained Models

We provide six metric depth models of three scales for indoor and outdoor scenes, respectively.

Base ModelParamsIndoor (Hypersim)Outdoor (Virtual KITTI 2)
Depth-Anything-V2-Small24.8MDownloadDownload
Depth-Anything-V2-Base97.5MDownloadDownload
Depth-Anything-V2-Large335.3MDownloadDownload

We recommend to first try our larger models (if computational cost is affordable) and the indoor version.

Usage
Prepraration
git clone https://github.com/DepthAnything/Depth-Anything-V2
cd Depth-Anything-V2/metric_depth
pip install -r requirements.txt

Download the checkpoints listed here and put them under the checkpoints directory.

Use our models
import cv2
import torch

from depth_anything_v2.dpt import DepthAnythingV2

model_configs = {
    'vits': {'encoder': 'vits', 'features': 64, 'out_channels': [48, 96, 192, 384]},
    'vitb': {'encoder': 'vitb', 'features': 128, 'out_channels': [96, 192, 384, 768]},
    'vitl': {'encoder': 'vitl', 'features': 256, 'out_channels': [256, 512, 1024, 1024]}
}

encoder = 'vitl' # or 'vits', 'vitb'
dataset = 'hypersim' # 'hypersim' for indoor model, 'vkitti' for outdoor model
max_depth = 20 # 20 for indoor model, 80 for outdoor model

model = DepthAnythingV2(**{**model_configs[encoder], 'max_depth': max_depth})
model.load_state_dict(torch.load(f'checkpoints/depth_anything_v2_metric_{dataset}_{encoder}.pth', map_location='cpu'))
model.eval()

raw_img = cv2.imread('your/image/path')
depth = model.infer_image(raw_img) # HxW depth map in meters in numpy
Running script on images

Here, we take the vitl encoder as an example. You can also use vitb or vits encoders.

# indoor scenes
python run.py \
  --encoder vitl \
  --load-from checkpoints/depth_anything_v2_metric_hypersim_vitl.pth \
  --max-depth 20 \
  --img-path <path> --outdir <outdir> [--input-size <size>] [--save-numpy]

# outdoor scenes
python run.py \
  --encoder vitl \
  --load-from checkpoints/depth_anything_v2_metric_vkitti_vitl.pth \
  --max-depth 80 \
  --img-path <path> --outdir <outdir> [--input-size <size>] [--save-numpy]
Project 2D images to point clouds:
python depth_to_pointcloud.py \
  --encoder vitl \
  --load-from checkpoints/depth_anything_v2_metric_hypersim_vitl.pth \
  --max-depth 20 \
  --img-path <path> --outdir <outdir>
Reproduce training

Please first prepare the Hypersim and Virtual KITTI 2 datasets. Then:

bash dist_train.sh
Citation

If you find this project useful, please consider citing:

@article{depth_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:2406.09414},
  year={2024}
}

@inproceedings{depth_anything_v1,
  title={Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data}, 
  author={Yang, Lihe and Kang, Bingyi and Huang, Zilong and Xu, Xiaogang and Feng, Jiashi and Zhao, Hengshuang},
  booktitle={CVPR},
  year={2024}
}

Alternatives

Changes

First published . Every model's changes

    • Added, with sizes indoor-small, indoor-base, indoor-large, outdoor-small, outdoor-base, and outdoor-large

Badge for a README

It says the model ran on our RTX 4090 and links to this page. It carries no number, so it never goes out of date.

ModelsThatRun: ran on RTX 4090
[![ModelsThatRun: ran on RTX 4090](https://modelsthatrun.dev/models/depth-anything-v2-metric/badge.svg)](https://modelsthatrun.dev/models/depth-anything-v2-metric/)

Something wrong on this page, such as a license or a number? Email us.

⇆
InputOutput