Models · Monocular depth

UniDepth V2

UniDepth V2: metric depth from one image without known camera data. Non-commercial licence.

Commercial use: no (code: CC-BY-NC-4.0 (noncommercial); weights: CC-BY-NC-4.0 (assumed from code)).

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
unidepth-v2-vitl14Middlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
132
132
99.8
66.4
96.4
64.3
3230 / 3508
3230 / 3508
1208 / 1472
1211 / 1472
1304 / 1392
1050 (engine)
Details
  • Original code: https://github.com/lpiccinelli-eth/UniDepth at 8d8cfe4
  • Code licence: CC-BY-NC-4.0 (noncommercial); files: LICENSE
  • Weights licence: CC-BY-NC-4.0 (assumed from code)
  • Licence evidence: https://github.com/lpiccinelli-eth/UniDepth/blob/8d8cfe4c7ee15297099983607febf0d4f32eb3d6/README.md#license
  • Training data: Mixture of public metric-depth datasets (indoor, outdoor, driving, synthetic) per the UniDepthV2 paper (arXiv 2502.20110)
  • Options: confidence = True
  • Kernel libraries: fastbb, cudnn_hacc, dpt_fused
  • Variants: unidepth-v2-vitl14
  • Outputs: depth, points, intrinsics, confidence; kind: metric
  • Input size: any H x W >= 8, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): unidepth-v2-vitl14 3000x4000 (2.6 GiB peak allocated, 3.2 reserved)
  • unidepth-v2-vitl14 994x1482, first call: portable + torch.compile 31 s (cold Inductor cache), TensorRT fp16 119 s (ONNX + engine).
  • unidepth-v2-vitl14 original 994x1482: torch.autocast(fp16) around the forward
  • unidepth-v2-vitl14 load / first call: original 3.8 s / 0.383 s, portable 4.16 s / 0.147 s, kernels 0.9† s / 0.069 s
  • † 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, 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

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 fp16portablekernelsnote
unidepth-v2-vitl14NYUv2 test, AbsRel / delta10.0355 / 0.98430.0355 / 0.98430.0355 / 0.98430.0355 / 0.9843
unidepth-v2-vitl14iBims-1, AbsRel / delta10.0298 / 0.98500.0298 / 0.98500.0298 / 0.98510.0298 / 0.9850
unidepth-v2-vitl14ETH3D two-view train left, AbsRel / delta10.0586 / 0.98020.0586 / 0.98020.0586 / 0.98020.0586 / 0.9802possibly in the training data
unidepth-v2-vitl14Middlebury 2014 trainingH left, AbsRel / delta10.0221 / 0.99700.0221 / 0.99700.0221 / 0.99700.0221 / 0.9970possibly in the training data

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.

Parity

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

variantkernels error vs original, mean / p99GPU, torchkernels used
unidepth-v2-vitl140.004 / 0.00526RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120

Limitations

  • The confidence head adds measurable time; the option confidence = false skips it.