Models · Monocular depth

ZoeDepth

ZoeDepth from the Intelligent Systems Lab: metric depth from one image, for indoor and outdoor scenes.

stable Fork of isl-org/ZoeDepth@d87f17b · backends: portable, kernels

Checkpoint zoedepth-nk

Paper 2023 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 88.9 ms 994x1482, fp16
vs the faster original 3.1× original fp16: 271 ms
Peak memory 1,771 MiB original: 2,040 MiB
Accuracy vs original fp32 ±0.0000 kernels AbsRel, NYUv2 test (0.0532 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("zoedepth-nk")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.depth
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench zoedepth-nk

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 4080.66×3,897 MiB/3,948 MiB3.90.58
Original fp16torch.autocast(fp16) around the forwardfp16 271–2,040 MiB/2,146 MiB8.31.53
Portable fp32fp32not measured ––––
Portablefp16 1242.2×2,037 MiB/2,124 MiB1.90.28
Kernelsfp16 88.93.1×1,771 MiB/1,960 MiB0.30.12
Portable + torch.compile 71.73.8×1,813 MiB/1,880 MiB94 (build)–
TensorRT fp16fp16 73.33.7×852 MiBenginenot comparable138 (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-12Originalfp321268 4,223 MiB processmatches994x1482
Portablefp16785 3,550 MiB processmatches994x1482
Portablefp32778 3,558 MiB processmatches994x1482
Kernelsfp16not implemented–994x1482
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16146 1,874 MiB/1,964 MiB–994x1482
Kernelsfp16116 1,685 MiB/1,860 MiB–994x1482
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp1645.7 1,874 MiB/1,964 MiB–994x1482
Kernelsfp1632.1 1,685 MiB/1,860 MiB–994x1482
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16128 1,876 MiB/1,964 MiB–994x1482
Kernelsfp1692.9 1,682 MiB/1,862 MiB–994x1482
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp1661.3 1,874 MiB/1,964 MiB–994x1482
Kernelsfp1641.2 1,686 MiB/1,880 MiB–994x1482
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp1629.5 1,983 MiB/2,064 MiB–994x1482
Kernelsfp1619.2 1,711 MiB/1,900 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
MIT LICENSE
Weights
MIT (assumed from code)(not stated by the authors; assumed to follow the code) source
Training data
  • weights licence not stated by the original authors; assumed to be the code licence

Our reading of the licences, not legal advice.

Weights

ZoeD_M12_NK.pt 1.4 GB· hosted on GitHub

fastforks downloads and checks these files on first use (fastforks download zoedepth-nk).

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.05320.9737 reference 654 272
Original fp16fp160.05280.9743 – 654NaN / inf output 199
Portable fp32fp320.05320.9737 ±0.0000 654 192
Portablefp160.05320.9737 ±0.0000 654 108
Kernelsfp160.05320.9737 ±0.0000 654 75.0

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.06690.9545 reference 100 273
Original fp16fp160.06680.9546 – 100NaN / inf output 199
Portable fp32fp320.06690.9545 ±0.0000 100 192
Portablefp160.06690.9545 ±0.0000 100 108
Kernelsfp160.06690.9545 ±0.0000 100 74.9

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.11390.8648 reference 27 490
Original fp16fp160.11300.8653 – 27NaN / inf output 308
Portable fp32not measured
Portablefp160.11390.8647 ±0.0000 27 147
Kernelsfp160.11390.8648 ±0.0000 27 105

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.04490.9860 reference 15 333
Original fp16fp160.04490.9860 ±0.0000 15 251
Portable fp32not measured
Portablefp160.04490.9860 ±0.0000 15 129
Kernelsfp160.04490.9860 ±0.0000 15 90.1

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| <= 1 % and p99 <= 3 % of the reference's median |value| (absolute error of the output depth).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.01 (relative)0.00045 (relative)
GPU default dtypes, p99 |diff|≤ 0.03 (relative)0.00078 (relative)

Recorded for zoedepth-nk on RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-29, with these kernels: cudnn_hacc

Details

ZoeDepth (Bhat et al. 2023): metric monocular depth from a MiDaS v3.1 BEiT-L/16 core with metric-bins heads (NYU indoor, KITTI outdoor) chosen by a learned domain router (ZoeD_M12_NK).

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; tested up to 3000x4000 (2,451 MiB allocated)
Options
  • pad_input=true· changes the output
  • flip=true· changes the output
Outputs
depth
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
Apple (MPS)
fp32, fp16

Limitations

  • torch.compile(fullgraph=True) and torch.export are not supported: graph break in the vendored MiDaS core call and data-dependent NYU / KITTI head routing (documented xfail).
  • Inputs below 5 px per side raise InputError when pad_input is on.
Full reference, generated from the repository

ZoeDepth from the Intelligent Systems Lab: metric depth from one image, for indoor and outdoor scenes.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
zoedepth-nkMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
408
271
124
88.9
71.7
73.3
3897 / 3948
2040 / 2146
2037 / 2124
1771 / 1960
1813 / 1880
2246 / 2306
Details
  • Original code: https://github.com/isl-org/ZoeDepth at d87f17b
  • Code licence: MIT (permissive); files: LICENSE
  • Weights licence: MIT (assumed from code)
  • Licence evidence: https://github.com/isl-org/ZoeDepth/blob/d87f17b2f5fdcb174cf4fb115491f4a6c60de152/LICENSE (weights are release assets of the same repository)
  • Training data: NYU Depth V2, KITTI stereo / optical flow 2012 / 2015, MegaDepth (Internet photo collections with SfM / MVS depth), TartanAir, not stated by the authors (MiDaS v3.1 BEiT-L relative-depth pre-training on 12 datasets, then metric fine-tuning on NYU Depth V2 and KITTI (ZoeDepth paper, arXiv 2302.12288))
  • Options: pad_input = True, flip = True
  • Kernel libraries: cudnn_hacc
  • Variants: zoedepth-nk
  • Outputs: depth; 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): zoedepth-nk 3000x4000 (2.4 GiB peak allocated, 2.6 reserved)
  • zoedepth-nk 994x1482, first call: portable + torch.compile 94 s (cold Inductor cache), TensorRT fp16 138 s (ONNX + engine).
  • zoedepth-nk original 994x1482: torch.autocast(fp16) around the forward
  • zoedepth-nk load / first call: original 8.35 s / 1.528 s, portable 1.92 s / 0.275 s, kernels 0.33† s / 0.122 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 fp16portableportable fp32kernelsnote
zoedepth-nkNYUv2 test, AbsRel / delta10.0532 / 0.97370.0528 / 0.9743 (NaN / inf output)0.0532 / 0.97370.0532 / 0.97370.0532 / 0.9737
zoedepth-nkiBims-1, AbsRel / delta10.0669 / 0.95450.0668 / 0.9546 (NaN / inf output)0.0669 / 0.95450.0669 / 0.95450.0669 / 0.9545
zoedepth-nkETH3D two-view train left, AbsRel / delta10.1139 / 0.86480.1130 / 0.8653 (NaN / inf output)0.1139 / 0.86470.1139 / 0.8648possibly in the training data
zoedepth-nkMiddlebury 2014 trainingH left, AbsRel / delta10.0449 / 0.98600.0449 / 0.98600.0449 / 0.98600.0449 / 0.9860possibly in the training data

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06; 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 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 <= 3 % of the reference's median |value| (absolute error of the output depth).

variantkernels error vs original, mean / p99GPU, torchkernels used
zoedepth-nk0.00045 / 0.00078RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400

Limitations

  • torch.compile(fullgraph=True) and torch.export are not supported: graph break in the vendored MiDaS core call and data-dependent NYU / KITTI head routing (documented xfail).
  • Inputs below 5 px per side raise InputError when pad_input is on.

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).