Models · Monocular depth

Depth Pro

Apple's single-image model for metric depth and the camera focal length, at 1536x1536 internal resolution. Research-only licence.

stable Fork of apple/ml-depth-pro@9e65e4d · backends: portable, kernels

Checkpoint depth-pro

Paper 2024 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 277 ms 994x1482, fp16
vs the faster original 2.1× original fp16: 569 ms
Peak memory 3,050 MiB original: 3,828 MiB
Accuracy vs original fp32 ±0.0000 kernels AbsRel, NYUv2 test (0.0425 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-pro")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.depth  # also: intrinsics
result.backend  # what ran: mode, device, dtype, kernels

The weights are non-commercial: fastforks downloads them only with FASTFORKS_NONCOMMERCIAL=1 set.

fastforks bench depth-pro

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 17760.32×8,170 MiB/9,020 MiB13.61.82
Original fp16torch.autocast(fp16) around the forward; fp16 = original's own precision=float16 modelfp16 569–3,828 MiB/4,294 MiB17.30.74
Portable fp32fp32not measured ––––
Portablefp16 5221.1×3,297 MiB/3,478 MiB6.20.52
Kernelsfp16 2772.1×3,050 MiB/3,198 MiB4.30.27
Portable + torch.compile 4881.2×3,053 MiB/3,198 MiB39 (build)–
TensorRT fp16fp16 2991.9×2,926 MiBenginenot comparable163 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-01 to 2026-11-16. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. 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-12Originalfp325853 12.8 GiB processmatches994x1482
Portablefp165011 7,169 MiB processmatches994x1482
Portablefp326115 11.0 GiB processmatches994x1482
Kernelsfp16not implemented–994x1482
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16580 3,278 MiB/3,458 MiB–994x1482
Kernelsfp16472 3,606 MiB/3,698 MiB–994x1482
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16151 3,278 MiB/3,458 MiB–994x1482
Kernelsfp16133 3,606 MiB/3,698 MiB–994x1482
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16375 3,278 MiB/3,458 MiB–994x1482
Kernelsfp16359 3,606 MiB/3,698 MiB–994x1482
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp16128 3,278 MiB/3,458 MiB–994x1482
Kernelsfp16119 3,606 MiB/3,698 MiB–994x1482
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp1677.9 3,301 MiB/3,438 MiB–994x1482
Kernelsfp1668.9 3,630 MiB/3,718 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

Non-commercial only

Code
LicenseRef-Apple-Sample-Code LICENSE
Weights
LicenseRef-research-only source
Training data
Mixture of real and synthetic metric-depth datasets per the Depth Pro paper (Table 15); the list is not on the model card
  • weights: LicenseRef-research-only
  • The Apple sample-code licence and the model licence allow research use only.

Our reading of the licences, not legal advice.

Weights

depth_pro.pt 1.9 GB· hosted on ml-site.cdn-apple.com

fastforks downloads and checks these files on first use (fastforks download depth-pro). Non-commercial weights need FASTFORKS_NONCOMMERCIAL=1.

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.04250.9810 reference 654 1767
Original fp16fp160.04250.9810 ±0.0000 654 524
Portable fp32fp320.04250.9810 ±0.0000 654 1766
Portablefp160.04250.9810 ±0.0000 654 519
Kernelsfp160.04250.9810 ±0.0000 654 267

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.03530.9827 reference 100 1768
Original fp16fp160.03530.9826 ±0.0000 100 524
Portable fp32fp320.03530.9827 ±0.0000 100 1766
Portablefp160.03530.9826 ±0.0000 100 519
Kernelsfp160.03530.9827 ±0.0000 100 268

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.06510.9642 reference 27 1767
Original fp16fp160.06520.9642 −0.0001 27 525
Portable fp32not measured
Portablefp160.06520.9642 −0.0001 27 519
Kernelsfp160.06560.9638 −0.0005 27 266

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.02950.9966 reference 15 1772
Original fp16fp160.02950.9966 ±0.0000 15 527
Portable fp32not measured
Portablefp160.02950.9966 ±0.0000 15 518
Kernelsfp160.02950.9966 ±0.0000 15 263

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.005 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.005 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.01 (relative)0.00107 (relative)
GPU default dtypes, p99 |diff|≤ 0.03 (relative)0.00197 (relative)

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

Details

Depth Pro (Bochkovskii et al. 2024, Apple): sharp monocular metric depth from three DINOv2 ViT-L/16 encoders (35 overlapping windows of a 3-level image pyramid, the whole image, the field of view) and a multi-resolution conv decoder at 1536x1536; also estimates the focal length.

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 16); tested up to 3000x4000 (3,451 MiB allocated)
Outputs
depth, intrinsics
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
Full reference, generated from the repository

Apple's single-image model for metric depth and the camera focal length, at 1536x1536 internal resolution. Research-only licence.

Commercial use: no (weights: LicenseRef-research-only).

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
depth-proMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
1776
569
522
277
488
299
8170 / 9020
3828 / 4294
3297 / 3478
3050 / 3198
3053 / 3198
4816 / 4882
Details
  • Original code: https://github.com/apple/ml-depth-pro at 9e65e4d
  • Code licence: LicenseRef-Apple-Sample-Code (permissive); files: LICENSE
  • Weights licence: LicenseRef-research-only
  • Licence evidence: https://github.com/apple/ml-depth-pro/blob/9e65e4d/README.md (License section: code and weights under LICENSE, the Apple sample-code licence) and https://huggingface.co/apple/DepthPro (license: apple-amlr, research use only); the stricter model-card terms are recorded for the weights
  • Training data: Mixture of real and synthetic metric-depth datasets per the Depth Pro paper (Table 15); the list is not on the model card
  • Licence note: The Apple sample-code licence and the model licence allow research use only.
  • Kernel libraries: fastbb, dpt_fused
  • Variants: depth-pro
  • Outputs: depth, intrinsics; kind: metric
  • Input size: any H x W >= 8, resized or padded inside the model (ViT patch 16)
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): depth-pro 3000x4000 (3.4 GiB peak allocated, 4.0 reserved)
  • depth-pro 994x1482, first call: portable + torch.compile 39 s (cold Inductor cache), TensorRT fp16 163 s (ONNX + engine).
  • depth-pro original 994x1482: torch.autocast(fp16) around the forward; fp16 = original's own precision=float16 model
  • depth-pro load / first call: original 17.34 s / 0.745 s, portable 6.2 s / 0.522 s, kernels 4.11 s / 0.265 s
  • Protocol, 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-proNYUv2 test, AbsRel / delta10.0425 / 0.98100.0425 / 0.98100.0425 / 0.98100.0425 / 0.98100.0425 / 0.9810
depth-proiBims-1, AbsRel / delta10.0353 / 0.98270.0353 / 0.98260.0353 / 0.98260.0353 / 0.98270.0353 / 0.9827
depth-proETH3D two-view train left, AbsRel / delta10.0651 / 0.96420.0652 / 0.96420.0652 / 0.96420.0656 / 0.9638possibly in the training data
depth-proMiddlebury 2014 trainingH left, AbsRel / delta10.0295 / 0.99660.0295 / 0.99660.0295 / 0.99660.0295 / 0.9966possibly 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.005 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
depth-pro0.00107 / 0.00197RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120

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