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)).
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
unidepth-v2-vitl14 | Middlebury 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-vitl143000x4000 (2.6 GiB peak allocated, 3.2 reserved) unidepth-v2-vitl14994x1482, first call: portable + torch.compile 31 s (cold Inductor cache), TensorRT fp16 119 s (ONNX + engine).unidepth-v2-vitl14original 994x1482: torch.autocast(fp16) around the forwardunidepth-v2-vitl14load / 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.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
unidepth-v2-vitl14 | NYUv2 test, AbsRel / delta1 | 0.0355 / 0.9843 | 0.0355 / 0.9843 | 0.0355 / 0.9843 | 0.0355 / 0.9843 | |
unidepth-v2-vitl14 | iBims-1, AbsRel / delta1 | 0.0298 / 0.9850 | 0.0298 / 0.9850 | 0.0298 / 0.9851 | 0.0298 / 0.9850 | |
unidepth-v2-vitl14 | ETH3D two-view train left, AbsRel / delta1 | 0.0586 / 0.9802 | 0.0586 / 0.9802 | 0.0586 / 0.9802 | 0.0586 / 0.9802 | possibly in the training data |
unidepth-v2-vitl14 | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0221 / 0.9970 | 0.0221 / 0.9970 | 0.0221 / 0.9970 | 0.0221 / 0.9970 | possibly 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).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
unidepth-v2-vitl14 | 0.004 / 0.00526 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120 |
Limitations
- The confidence head adds measurable time; the option confidence = false skips it.