Models · Monocular depth

Depth Anything V2

Depth Anything V2: relative depth from one image, in small, base and large. The licence differs by size, see the table.

stable Fork of DepthAnything/Depth-Anything-V2@a561b84 · backends: portable, kernels

Checkpoint

Paper 2024 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 4.51 ms 994x1482, fp16
vs the faster original 9.1× original fp16: 41.0 ms
Peak memory 190 MiB original: 373 MiB
Accuracy vs original fp32 ±0.0000 kernels AbsRel, NYUv2 test (0.0509 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import depth

model = depth.load("depth-anything-v2-s")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.inverse_depth  # also: depth
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench depth-anything-v2-s

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32 53.60.76×407 MiB/478 MiB0.30.22
Original fp16torch.autocast(fp16) around the forwardfp16 41.0–373 MiB/418 MiB0.70.38
Portable fp32fp32not measured ––––
Portablefp16 7.825.2×249 MiB/326 MiB0.10.03
Kernelsfp16 4.519.1×190 MiB/248 MiB0.10.01
Portable + torch.compile 6.656.2×201 MiB/224 MiB16 (build)–
TensorRT fp16fp16 4.469.2×186 MiBenginenot comparable30 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-01 to 2026-11-03. Median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14Originalfp32113 1,860 MiB processmatches994x1482
Portablefp1680.7 1,575 MiB processmatches994x1482
Portablefp3287.3 1,522 MiB processmatches994x1482
Kernelsfp16not implemented–994x1482
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp169.25 220 MiB/268 MiB–994x1482
Kernelsfp165.92 153 MiB/208 MiB–994x1482
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp163.75 220 MiB/268 MiB–994x1482
Kernelsfp162.24 153 MiB/208 MiB–994x1482
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp167.99 220 MiB/266 MiB–994x1482
Kernelsfp165.43 153 MiB/208 MiB–994x1482
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp167.17 220 MiB/268 MiB–994x1482
Kernelsfp164.63 153 MiB/208 MiB–994x1482
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp162.23 244 MiB/288 MiB–994x1482
Kernelsfp162.02 153 MiB/208 MiB–994x1482

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0 LICENSE
Weights
Apache-2.0 source
Training data
Teacher (ViT-G) on 595K synthetic images (BlendedMVS, Hypersim, IRS, TartanAir, VKITTI 2); students on 62M pseudo-labelled real images (SA-1B, Open Images, BDD100K, Google Landmarks, ImageNet-21K, LSUN, Objects365, Places365) per the paper
  • Only the Small weights are Apache-2.0; the Base and Large weights are CC-BY-NC-4.0. The training data of even the Small model has unclear commercial terms (a note only).
  • The six metric checkpoints are Apache-2.0 on their Hugging Face cards, but the Base / Large ones are fine-tuned from the CC-BY-NC-4.0 relative Base / Large weights, and Virtual KITTI 2 (the outdoor fine-tune) is CC BY-NC-SA 3.0, Hypersim CC BY-SA 3.0.
  • Distill-Any-Depth: Apache-2.0 on the Hugging Face card (the authors' transformers ports say MIT, the code is MIT). The paper initialises the Large model from the CC-BY-NC-4.0 Depth Anything V2 Large weights; its teachers include Depth Anything V2 and it trains on unlabeled SA-1B images (research licence).

Our reading of the licences, not legal advice.

Weights

depth_anything_v2_vits.pth 99.2 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download depth-anything-v2-s).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

NYUv2 test

AbsRel / delta1

RundtypeAbsRel ↓δ1 ↑Δ AbsRel vs fp32 originalimagesms / image
Original fp32fp320.05090.9780 reference 654 41.7
Original fp16fp160.05090.9780 ±0.0000 654 27.5
Portable fp32fp320.05090.9780 ±0.0000 654 22.1
Portablefp160.05090.9780 ±0.0000 654 7.00
Kernelsfp160.05090.9780 ±0.0000 654 3.96

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6d3bab64, 2026-11-17; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

iBims-1

AbsRel / delta1

RundtypeAbsRel ↓δ1 ↑Δ AbsRel vs fp32 originalimagesms / image
Original fp32fp320.04480.9744 reference 100 39.9
Original fp16fp160.04480.9744 ±0.0000 100 26.8
Portable fp32fp320.04480.9744 ±0.0000 100 21.9
Portablefp160.04480.9744 ±0.0000 100 7.15
Kernelsfp160.04480.9744 ±0.0000 100 3.95

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6d3bab64, 2026-11-17; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

ETH3D two-view train left

AbsRel / delta1training data not stated: possibly seen

RundtypeAbsRel ↓δ1 ↑Δ AbsRel vs fp32 originalimagesms / image
Original fp32fp320.08030.9256 reference 27 61.1
Original fp16fp160.08030.9256 ±0.0000 27 49.4
Portable fp32not measured
Portablefp160.08030.9256 ±0.0000 27 11.3
Kernelsfp160.08030.9256 ±0.0000 27 5.34

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Middlebury 2014 trainingH left

AbsRel / delta1training data not stated: possibly seen

RundtypeAbsRel ↓δ1 ↑Δ AbsRel vs fp32 originalimagesms / image
Original fp32fp320.03460.9947 reference 15 77.5
Original fp16fp160.03460.9947 ±0.0000 15 67.4
Portable fp32not measured
Portablefp160.03460.9947 ±0.0000 15 12.1
Kernelsfp160.03460.9947 ±0.0000 15 4.79

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.5 % and p99 <= 2 % of the reference's median |value| (absolute error of the output inverse_depth).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.005 (relative)0.00038 (relative)
GPU default dtypes, p99 |diff|≤ 0.02 (relative)0.00124 (relative)

Recorded for depth-anything-v2-s on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-07, with these kernels: dpt_fusedfastbb

Details

Depth Anything V2 (Yang et al. 2024): relative monocular depth from a DINOv2 ViT encoder and a DPT head, trained on synthetic labels and 62M pseudo-labelled real images; with the authors' metric fine-tunes (Hypersim indoor, Virtual KITTI 2 outdoor) and the Distill-Any-Depth checkpoints (He et al. 2025) of the same network.

Input / output
Input: one RGB image. Output: a depth or inverse-depth map.
What the numbers mean, and which models need the camera focal length

kind (a card field, result.kind) says what the numbers mean: metric = metres; scale_invariant, affine_invariant, affine_invariant_log (log depth) and affine_invariant_inverse are relative (unknown scale or shift, not metres). Metric models that use the focal length take model(image, intrinsics=K) (K [3, 3], pixels of the input): metric3d-vit-large and da3metric-large need it for correct metres (da3metric-large: metres = output x focal / 300; without intrinsics= a 300 px focal length is assumed, wrong for a real camera). unidepth-v2-vitl14, unik3d-vitl, depth-pro and MoGe estimate the camera themselves (given intrinsics= replace fx); zoedepth-nk and the relative models (da3mono-large too) take none. Normals-only models (kind none) return result.normals [B, H, W, 3] (unit vectors, camera frame: x right, y down, z forward).

Input size
any H x W >= 8, resized or padded inside the model (ViT patch 14); tested up to 3000x4000 (509 MiB allocated)
Options
  • short_side=518>= 14· changes the output
Outputs
inverse_depth, depth
Checkpoint
arch="vits"
CUDA kernels
  • fastbbfast backbone kernels: flash attention, window attention, instance norm and rotary embeddings for ViT and similar backbones
  • dpt_fusedfused fp16 matrix multiplies and convolutions for DINOv2 backbones and DPT depth heads
Apple (MPS)
fp32, fp16

Limitations

  • Metric checkpoints predict at most max_depth (20 m Hypersim, 80 m Virtual KITTI 2): the head is a sigmoid scaled by it. Each was fine-tuned on one synthetic domain, so indoor / outdoor scenes outside it get a wrong scale.
  • Distill-Any-Depth runs with this family's pipeline (short side 518, aspect kept, as the authors' transformers ports); the authors' demo squashes to 700 x 700. Their Dav2-Teacher-Large-2w-iter checkpoint is not included.
Full reference, generated from the repository

Depth Anything V2: relative depth from one image, in small, base and large. The licence differs by size, see the table.

Commercial use: depth-anything-v2-s, depth-anything-v2-metric-hypersim-s, depth-anything-v2-metric-hypersim-b, depth-anything-v2-metric-hypersim-l, depth-anything-v2-metric-vkitti-s, depth-anything-v2-metric-vkitti-b, depth-anything-v2-metric-vkitti-l, distill-any-depth-s, distill-any-depth-b, distill-any-depth-l: yes; depth-anything-v2-b, depth-anything-v2-l: no (weights: CC-BY-NC-4.0).

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
depth-anything-v2-sMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
53.6
41.0
7.82
4.51
6.65
4.46
407 / 478
373 / 418
249 / 326
190 / 248
201 / 224
273 / 308
depth-anything-v2-bMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
93.6
63.2
18.8
10.5
17.0
10.9
858 / 940
928 / 1026
450 / 516
387 / 436
340 / 394
539 / 596
depth-anything-v2-lMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
245
140
55.1
31.1
51.7
32.4
2109 / 2326
2560 / 2654
1026 / 1352
921 / 1034
850 / 952
1579 / 1634
depth-anything-v2-metric-hypersim-ssynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
53.0
43.6
7.66
4.67
6.67
4.47
407 / 478
373 / 418
244 / 288
152 / 208
201 / 224
305 / 348
depth-anything-v2-metric-hypersim-bsynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
91.4
60.7
18.6
10.8
17.0
10.8
858 / 960
928 / 1026
445 / 514
349 / 396
340 / 394
539 / 614
depth-anything-v2-metric-hypersim-lsynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
246
141
54.5
31.7
51.3
32.3
2109 / 2326
2560 / 2654
1022 / 1092
917 / 1034
850 / 910
1579 / 1634
depth-anything-v2-metric-vkitti-ssynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
46.1
36.0
7.66
4.67
6.68
4.47
407 / 498
373 / 418
244 / 288
152 / 208
201 / 224
305 / 348
depth-anything-v2-metric-vkitti-bsynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
90.8
60.6
18.6
10.8
17.0
10.9
858 / 960
928 / 1026
445 / 514
349 / 396
340 / 394
539 / 614
depth-anything-v2-metric-vkitti-lsynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
245
141
54.5
31.9
51.3
32.4
2109 / 2326
2560 / 2654
1022 / 1092
917 / 1034
850 / 910
1579 / 1634
distill-any-depth-ssynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
45.3
35.2
7.65
4.63
6.67
4.46
407 / 498
373 / 418
244 / 288
152 / 208
201 / 224
305 / 348
distill-any-depth-bsynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
90.5
59.8
18.6
10.8
17.0
10.8
858 / 960
928 / 1026
445 / 514
349 / 396
340 / 394
539 / 614
distill-any-depth-lsynthetic (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
244
139
54.4
31.8
51.6
32.4
2109 / 2326
2560 / 2654
1022 / 1092
917 / 1034
850 / 910
1579 / 1634
Details
  • Original code: https://github.com/DepthAnything/Depth-Anything-V2 at a561b84
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
    • depth-anything-v2-b: CC-BY-NC-4.0
    • depth-anything-v2-l: CC-BY-NC-4.0
  • Licence evidence: https://github.com/DepthAnything/Depth-Anything-V2/blob/main/README.md (LICENSE section) and the Hugging Face model cards
  • Training data: Teacher (ViT-G) on 595K synthetic images (BlendedMVS, Hypersim, IRS, TartanAir, VKITTI 2); students on 62M pseudo-labelled real images (SA-1B, Open Images, BDD100K, Google Landmarks, ImageNet-21K, LSUN, Objects365, Places365) per the paper
    • depth-anything-v2-metric-hypersim-s: Fine-tuned from the relative Depth Anything V2 Small on Hypersim (indoor, synthetic) per the metric_depth README
    • depth-anything-v2-metric-hypersim-b: Fine-tuned from the relative Depth Anything V2 Base on Hypersim (indoor, synthetic) per the metric_depth README
    • depth-anything-v2-metric-hypersim-l: Fine-tuned from the relative Depth Anything V2 Large on Hypersim (indoor, synthetic) per the metric_depth README
    • depth-anything-v2-metric-vkitti-s: Fine-tuned from the relative Depth Anything V2 Small on Virtual KITTI 2 (outdoor driving, synthetic) per the metric_depth README
    • depth-anything-v2-metric-vkitti-b: Fine-tuned from the relative Depth Anything V2 Base on Virtual KITTI 2 (outdoor driving, synthetic) per the metric_depth README
    • depth-anything-v2-metric-vkitti-l: Fine-tuned from the relative Depth Anything V2 Large on Virtual KITTI 2 (outdoor driving, synthetic) per the metric_depth README
    • distill-any-depth-s: Distilled from Depth Anything V2 and GenPercept teachers on 200K unlabeled SA-1B images per the paper (arXiv 2502.19204)
    • distill-any-depth-b: Distilled from Depth Anything V2 and GenPercept teachers on 200K unlabeled SA-1B images per the paper (arXiv 2502.19204)
    • distill-any-depth-l: Distilled from Depth Anything V2 and GenPercept teachers on 200K unlabeled SA-1B images per the paper (arXiv 2502.19204)
  • Licence note: Only the Small weights are Apache-2.0; the Base and Large weights are CC-BY-NC-4.0. The training data of even the Small model has unclear commercial terms (a note only).
  • Licence note: The six metric checkpoints are Apache-2.0 on their Hugging Face cards, but the Base / Large ones are fine-tuned from the CC-BY-NC-4.0 relative Base / Large weights, and Virtual KITTI 2 (the outdoor fine-tune) is CC BY-NC-SA 3.0, Hypersim CC BY-SA 3.0.
  • Licence note: Distill-Any-Depth: Apache-2.0 on the Hugging Face card (the authors' transformers ports say MIT, the code is MIT). The paper initialises the Large model from the CC-BY-NC-4.0 Depth Anything V2 Large weights; its teachers include Depth Anything V2 and it trains on unlabeled SA-1B images (research licence).
  • Options: short_side = 518 (>= 14; also input_size)
  • Kernel libraries: fastbb, dpt_fused
  • Variants: depth-anything-v2-s, depth-anything-v2-b, depth-anything-v2-l, depth-anything-v2-metric-hypersim-s, depth-anything-v2-metric-hypersim-b, depth-anything-v2-metric-hypersim-l, depth-anything-v2-metric-vkitti-s, depth-anything-v2-metric-vkitti-b, depth-anything-v2-metric-vkitti-l, distill-any-depth-s, distill-any-depth-b, distill-any-depth-l
  • Outputs: inverse_depth, depth; kind: affine_invariant_inverse
  • Input size:
    • depth-anything-v2-s, depth-anything-v2-b, depth-anything-v2-l: any H x W >= 8, resized or padded inside the model (ViT patch 14)
    • depth-anything-v2-metric-hypersim-s, depth-anything-v2-metric-hypersim-b, depth-anything-v2-metric-hypersim-l, depth-anything-v2-metric-vkitti-s, depth-anything-v2-metric-vkitti-b, depth-anything-v2-metric-vkitti-l, distill-any-depth-s, distill-any-depth-b, distill-any-depth-l: any H x W >= 1, resized or padded inside the model (ViT patch 14)
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): depth-anything-v2-s 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); depth-anything-v2-b 3000x4000 (0.8 GiB peak allocated, 0.9 reserved); depth-anything-v2-l 3000x4000 (1.8 GiB peak allocated, 2.2 reserved); depth-anything-v2-metric-hypersim-s 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); depth-anything-v2-metric-hypersim-b 3000x4000 (0.6 GiB peak allocated, 0.7 reserved); depth-anything-v2-metric-hypersim-l 3000x4000 (1.1 GiB peak allocated, 1.2 reserved); depth-anything-v2-metric-vkitti-s 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); depth-anything-v2-metric-vkitti-b 3000x4000 (0.6 GiB peak allocated, 0.7 reserved); depth-anything-v2-metric-vkitti-l 3000x4000 (1.1 GiB peak allocated, 1.2 reserved); distill-any-depth-s 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); distill-any-depth-b 3000x4000 (0.6 GiB peak allocated, 0.7 reserved); distill-any-depth-l 3000x4000 (1.1 GiB peak allocated, 1.2 reserved)
  • depth-anything-v2-s 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 30 s (ONNX + engine).
  • depth-anything-v2-b 994x1482, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 33 s (ONNX + engine).
  • depth-anything-v2-l 994x1482, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 44 s (ONNX + engine).
  • depth-anything-v2-metric-hypersim-s 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 30 s (ONNX + engine).
  • depth-anything-v2-metric-hypersim-b 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 32 s (ONNX + engine).
  • depth-anything-v2-metric-hypersim-l 994x1482, first call: portable + torch.compile 20 s (cold Inductor cache), TensorRT fp16 44 s (ONNX + engine).
  • depth-anything-v2-metric-vkitti-s 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 30 s (ONNX + engine).
  • depth-anything-v2-metric-vkitti-b 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 32 s (ONNX + engine).
  • depth-anything-v2-metric-vkitti-l 994x1482, first call: portable + torch.compile 20 s (cold Inductor cache), TensorRT fp16 43 s (ONNX + engine).
  • distill-any-depth-s 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 30 s (ONNX + engine).
  • distill-any-depth-b 994x1482, first call: portable + torch.compile 16 s (cold Inductor cache), TensorRT fp16 33 s (ONNX + engine).
  • distill-any-depth-l 994x1482, first call: portable + torch.compile 20 s (cold Inductor cache), TensorRT fp16 42 s (ONNX + engine).
  • depth-anything-v2-s original 994x1482: torch.autocast(fp16) around the forward
  • depth-anything-v2-b original 994x1482: torch.autocast(fp16) around the forward
  • depth-anything-v2-l original 994x1482: torch.autocast(fp16) around the forward
  • depth-anything-v2-metric-hypersim-s original 994x1482: torch.autocast(float16) around the call
  • depth-anything-v2-metric-hypersim-b original 994x1482: torch.autocast(float16) around the call
  • depth-anything-v2-metric-hypersim-l original 994x1482: torch.autocast(float16) around the call
  • depth-anything-v2-metric-vkitti-s original 994x1482: torch.autocast(float16) around the call
  • depth-anything-v2-metric-vkitti-b original 994x1482: torch.autocast(float16) around the call
  • depth-anything-v2-metric-vkitti-l original 994x1482: torch.autocast(float16) around the call
  • distill-any-depth-s original 994x1482: torch.autocast(float16) around the call
  • distill-any-depth-b original 994x1482: torch.autocast(float16) around the call
  • distill-any-depth-l original 994x1482: torch.autocast(float16) around the call
  • depth-anything-v2-s load / first call: original 0.71 s / 0.38 s, portable 0.11 s / 0.027 s, kernels 0.08† s / 0.009 s
  • depth-anything-v2-b load / first call: original 3.94 s / 0.08 s, portable 0.85 s / 0.019 s, kernels 0.2† s / 0.012 s
  • depth-anything-v2-l load / first call: original 5.66 s / 0.149 s, portable 2.39 s / 0.081 s, kernels 0.91† s / 0.055 s
  • depth-anything-v2-metric-hypersim-s load / first call: original 1.54 s / 0.166 s, portable 0.19 s / 0.227 s (518x770), kernels 0.95 s / 0.055 s (518x770)
  • depth-anything-v2-metric-hypersim-b load / first call: original 2.13 s / 0.074 s, portable 0.33 s / 0.272 s (518x770), kernels 1.13 s / 0.052 s (518x770)
  • depth-anything-v2-metric-hypersim-l load / first call: original 4.87 s / 0.148 s, portable 0.84 s / 0.151 s (518x770), kernels 1.73 s / 0.068 s (518x770)
  • depth-anything-v2-metric-vkitti-s load / first call: original 1.46 s / 0.036 s, portable 0.13 s / 0.157 s (518x770), kernels 0.96 s / 0.053 s (518x770)
  • depth-anything-v2-metric-vkitti-b load / first call: original 2.06 s / 0.06 s, portable 0.3 s / 0.281 s (518x770), kernels 1.13 s / 0.052 s (518x770)
  • depth-anything-v2-metric-vkitti-l load / first call: original 4.87 s / 0.14 s, portable 0.84 s / 0.148 s (518x770), kernels 1.65 s / 0.053 s (518x770)
  • distill-any-depth-s load / first call: original 0.25 s / 0.036 s, portable 0.13 s / 0.159 s (518x770), kernels 0.96 s / 0.039 s (518x770)
  • distill-any-depth-b load / first call: original 0.84 s / 0.06 s, portable 0.29 s / 0.267 s (518x770), kernels 1.13 s / 0.039 s (518x770)
  • distill-any-depth-l load / first call: original 3.03 s / 0.14 s, portable 0.82 s / 0.142 s (518x770), kernels 1.68 s / 0.059 s (518x770)
  • † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
  • Protocol, depth-anything-v2-s, depth-anything-v2-b, depth-anything-v2-l: median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls
  • Protocol, depth-anything-v2-metric-hypersim-s, depth-anything-v2-metric-hypersim-b, depth-anything-v2-metric-hypersim-l, depth-anything-v2-metric-vkitti-s, depth-anything-v2-metric-vkitti-b, depth-anything-v2-metric-vkitti-l, distill-any-depth-s, distill-any-depth-b, distill-any-depth-l: first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
depth-anything-v2-sNYUv2 test, AbsRel / delta10.0509 / 0.97800.0509 / 0.97800.0509 / 0.97800.0509 / 0.97800.0509 / 0.9780
depth-anything-v2-siBims-1, AbsRel / delta10.0448 / 0.97440.0448 / 0.97440.0448 / 0.97440.0448 / 0.97440.0448 / 0.9744
depth-anything-v2-sETH3D two-view train left, AbsRel / delta10.0803 / 0.92560.0803 / 0.92560.0803 / 0.92560.0803 / 0.9256possibly in the training data
depth-anything-v2-sMiddlebury 2014 trainingH left, AbsRel / delta10.0346 / 0.99470.0346 / 0.99470.0346 / 0.99470.0346 / 0.9947possibly in the training data
depth-anything-v2-bNYUv2 test, AbsRel / delta10.0462 / 0.98060.0462 / 0.98060.0462 / 0.98060.0462 / 0.98060.0462 / 0.9806
depth-anything-v2-biBims-1, AbsRel / delta10.0378 / 0.98340.0378 / 0.98340.0378 / 0.98340.0378 / 0.98340.0378 / 0.9834
depth-anything-v2-bETH3D two-view train left, AbsRel / delta10.0696 / 0.93690.0698 / 0.93610.0696 / 0.93690.0696 / 0.9372possibly in the training data
depth-anything-v2-bMiddlebury 2014 trainingH left, AbsRel / delta10.0318 / 0.99580.0319 / 0.99570.0318 / 0.99580.0318 / 0.9958possibly in the training data
depth-anything-v2-lNYUv2 test, AbsRel / delta10.0439 / 0.98140.0439 / 0.98140.0439 / 0.98140.0439 / 0.98140.0439 / 0.9814
depth-anything-v2-liBims-1, AbsRel / delta10.0347 / 0.98510.0347 / 0.98510.0347 / 0.98510.0347 / 0.98510.0347 / 0.9851
depth-anything-v2-lETH3D two-view train left, AbsRel / delta10.0627 / 0.95130.0627 / 0.95130.0627 / 0.95120.0627 / 0.9513possibly in the training data
depth-anything-v2-lMiddlebury 2014 trainingH left, AbsRel / delta10.0296 / 0.99610.0296 / 0.99610.0296 / 0.99610.0296 / 0.9961possibly in the training data
depth-anything-v2-metric-hypersim-sNYUv2 test, AbsRel / delta10.0643 / 0.96380.0643 / 0.96390.0643 / 0.96390.0643 / 0.96380.0643 / 0.9639
depth-anything-v2-metric-hypersim-siBims-1, AbsRel / delta10.0559 / 0.97000.0559 / 0.97010.0559 / 0.97000.0559 / 0.97000.0559 / 0.9700
depth-anything-v2-metric-hypersim-sETH3D two-view train left, AbsRel / delta10.1203 / 0.86370.1203 / 0.86370.1204 / 0.86360.1203 / 0.8637possibly in the training data
depth-anything-v2-metric-hypersim-sMiddlebury 2014 trainingH left, AbsRel / delta10.0481 / 0.98610.0481 / 0.98610.0481 / 0.98610.0482 / 0.9860possibly in the training data
depth-anything-v2-metric-hypersim-bNYUv2 test, AbsRel / delta10.0549 / 0.97340.0549 / 0.97340.0549 / 0.97340.0549 / 0.97340.0549 / 0.9734
depth-anything-v2-metric-hypersim-biBims-1, AbsRel / delta10.0476 / 0.97920.0476 / 0.97920.0476 / 0.97920.0476 / 0.97920.0476 / 0.9792
depth-anything-v2-metric-hypersim-bETH3D two-view train left, AbsRel / delta10.0905 / 0.92350.0906 / 0.92380.0905 / 0.92350.0905 / 0.9235possibly in the training data
depth-anything-v2-metric-hypersim-bMiddlebury 2014 trainingH left, AbsRel / delta10.0397 / 0.99380.0397 / 0.99380.0397 / 0.99380.0396 / 0.9939possibly in the training data
depth-anything-v2-metric-hypersim-lNYUv2 test, AbsRel / delta10.0491 / 0.97710.0490 / 0.97710.0491 / 0.97710.0491 / 0.97710.0491 / 0.9771
depth-anything-v2-metric-hypersim-liBims-1, AbsRel / delta10.0382 / 0.98380.0382 / 0.98380.0382 / 0.98380.0382 / 0.98380.0382 / 0.9838
depth-anything-v2-metric-hypersim-lETH3D two-view train left, AbsRel / delta10.0704 / 0.95860.0705 / 0.95860.0704 / 0.95850.0705 / 0.9586possibly in the training data
depth-anything-v2-metric-hypersim-lMiddlebury 2014 trainingH left, AbsRel / delta10.0325 / 0.99540.0325 / 0.99540.0324 / 0.99540.0325 / 0.9954possibly in the training data
depth-anything-v2-metric-vkitti-sNYUv2 test, AbsRel / delta10.1225 / 0.85290.1225 / 0.85300.1225 / 0.85290.1225 / 0.85290.1225 / 0.8530
depth-anything-v2-metric-vkitti-siBims-1, AbsRel / delta10.1145 / 0.87740.1145 / 0.87750.1145 / 0.87740.1145 / 0.87740.1145 / 0.8773
depth-anything-v2-metric-vkitti-sETH3D two-view train left, AbsRel / delta10.1370 / 0.82100.1369 / 0.82140.1370 / 0.82100.1369 / 0.8210possibly in the training data
depth-anything-v2-metric-vkitti-sMiddlebury 2014 trainingH left, AbsRel / delta10.0730 / 0.95660.0729 / 0.95660.0730 / 0.95660.0730 / 0.9565possibly in the training data
depth-anything-v2-metric-vkitti-bNYUv2 test, AbsRel / delta10.1089 / 0.88470.1089 / 0.88470.1089 / 0.88470.1089 / 0.88470.1089 / 0.8847
depth-anything-v2-metric-vkitti-biBims-1, AbsRel / delta10.0998 / 0.90860.0998 / 0.90850.0998 / 0.90850.0998 / 0.90860.0998 / 0.9085
depth-anything-v2-metric-vkitti-bETH3D two-view train left, AbsRel / delta10.1352 / 0.83110.1353 / 0.83100.1353 / 0.83110.1353 / 0.8311possibly in the training data
depth-anything-v2-metric-vkitti-bMiddlebury 2014 trainingH left, AbsRel / delta10.0651 / 0.97810.0651 / 0.97800.0651 / 0.97800.0651 / 0.9780possibly in the training data
depth-anything-v2-metric-vkitti-lNYUv2 test, AbsRel / delta10.0968 / 0.91330.0968 / 0.91330.0968 / 0.91330.0968 / 0.91330.0968 / 0.9133
depth-anything-v2-metric-vkitti-liBims-1, AbsRel / delta10.0783 / 0.93990.0783 / 0.93990.0784 / 0.93990.0783 / 0.93990.0783 / 0.9399
depth-anything-v2-metric-vkitti-lETH3D two-view train left, AbsRel / delta10.1081 / 0.89930.1081 / 0.89920.1081 / 0.89920.1082 / 0.8991possibly in the training data
depth-anything-v2-metric-vkitti-lMiddlebury 2014 trainingH left, AbsRel / delta10.0551 / 0.98360.0551 / 0.98360.0551 / 0.98370.0551 / 0.9837possibly in the training data
distill-any-depth-sNYUv2 test, AbsRel / delta10.0529 / 0.97640.0529 / 0.97640.0529 / 0.97640.0529 / 0.97640.0529 / 0.9764
distill-any-depth-siBims-1, AbsRel / delta10.0476 / 0.97010.0476 / 0.97010.0476 / 0.97010.0476 / 0.97010.0476 / 0.9701
distill-any-depth-sETH3D two-view train left, AbsRel / delta10.0854 / 0.90940.0855 / 0.90920.0855 / 0.90930.0855 / 0.9093possibly in the training data
distill-any-depth-sMiddlebury 2014 trainingH left, AbsRel / delta10.0335 / 0.99470.0335 / 0.99470.0336 / 0.99470.0335 / 0.9947possibly in the training data
distill-any-depth-bNYUv2 test, AbsRel / delta10.0470 / 0.98030.0470 / 0.98030.0470 / 0.98030.0470 / 0.98030.0470 / 0.9803
distill-any-depth-biBims-1, AbsRel / delta10.0392 / 0.98170.0392 / 0.98160.0392 / 0.98170.0392 / 0.98170.0392 / 0.9817
distill-any-depth-bETH3D two-view train left, AbsRel / delta10.0695 / 0.93860.0696 / 0.93820.0695 / 0.93860.0695 / 0.9386possibly in the training data
distill-any-depth-bMiddlebury 2014 trainingH left, AbsRel / delta10.0312 / 0.99630.0312 / 0.99630.0312 / 0.99630.0312 / 0.9963possibly in the training data
distill-any-depth-lNYUv2 test, AbsRel / delta10.0444 / 0.98180.0444 / 0.98170.0444 / 0.98170.0444 / 0.98180.0444 / 0.9817
distill-any-depth-liBims-1, AbsRel / delta10.0375 / 0.98320.0375 / 0.98320.0375 / 0.98320.0375 / 0.98320.0375 / 0.9832
distill-any-depth-lETH3D two-view train left, AbsRel / delta10.0640 / 0.95370.0640 / 0.95370.0640 / 0.95370.0639 / 0.9537possibly in the training data
distill-any-depth-lMiddlebury 2014 trainingH left, AbsRel / delta10.0303 / 0.99620.0303 / 0.99620.0303 / 0.99620.0303 / 0.9962possibly in the training data

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10 / 939adfe8 / f2992269+dirty, 2026-11-06 to 2026-11-10; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 6d3bab64, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10 / 939adfe8 / f2992269+dirty, 2026-11-06 to 2026-11-10.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.5 % and p99 <= 2 % of the reference's median |value| (absolute error of the output inverse_depth).

variantkernels error vs original, mean / p99GPU, torchkernels used
depth-anything-v2-s0.00038 / 0.00124RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-b0.00072 / 0.00264RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-l0.00077 / 0.0024RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-metric-hypersim-s0.00075 / 0.00241RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-metric-hypersim-b0.00089 / 0.00286RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-metric-hypersim-l0.00112 / 0.00349RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-metric-vkitti-s0.00093 / 0.00259RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-metric-vkitti-b0.00094 / 0.00245RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
depth-anything-v2-metric-vkitti-l0.0009 / 0.00242RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
distill-any-depth-s0.00046 / 0.00147RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
distill-any-depth-b0.001 / 0.00274RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
distill-any-depth-l0.00107 / 0.00338RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120

Limitations

  • Metric checkpoints predict at most max_depth (20 m Hypersim, 80 m Virtual KITTI 2): the head is a sigmoid scaled by it. Each was fine-tuned on one synthetic domain, so indoor / outdoor scenes outside it get a wrong scale.
  • Distill-Any-Depth runs with this family's pipeline (short side 518, aspect kept, as the authors' transformers ports); the authors' demo squashes to 700 x 700. Their Dav2-Teacher-Large-2w-iter checkpoint is not included.

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Input
Output
A cup of coffee, input
Input · 100%

Input: A cup of coffee, Rachel Michetti (CC0).