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
- Paper Depth Pro: Sharp Monocular Metric Depth in Less Than a Second ICLR 2025 · first released 2 Oct 2024
Checkpoint depth-pro
Paper 2024 Added in 0.1.0 Evaluated with 0.2.0
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.
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 1776 | 0.32× | 8,170 MiB/9,020 MiB | 13.6 | 1.82 |
| Original fp16torch.autocast(fp16) around the forward; fp16 = original's own precision=float16 model | fp16 | 569 | – | 3,828 MiB/4,294 MiB | 17.3 | 0.74 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 522 | 1.1× | 3,297 MiB/3,478 MiB | 6.2 | 0.52 |
| Kernels | fp16 | 277 | 2.1× | 3,050 MiB/3,198 MiB | 4.3 | 0.27 |
| Portable + torch.compile | 488 | 1.2× | 3,053 MiB/3,198 MiB | 39 (build) | – | |
| TensorRT fp16 | fp16 | 299 | 1.9× | 2,926 MiBenginenot comparable | 163 (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
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12 | Original | fp32 | 5853 | 12.8 GiB process | matches | 994x1482 |
| Portable | fp16 | 5011 | 7,169 MiB process | matches | 994x1482 | |
| Portable | fp32 | 6115 | 11.0 GiB process | matches | 994x1482 | |
| Kernels | fp16 | not implemented | – | 994x1482 | ||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 580 | 3,278 MiB/3,458 MiB | – | 994x1482 |
| Kernels | fp16 | 472 | 3,606 MiB/3,698 MiB | – | 994x1482 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 151 | 3,278 MiB/3,458 MiB | – | 994x1482 |
| Kernels | fp16 | 133 | 3,606 MiB/3,698 MiB | – | 994x1482 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 375 | 3,278 MiB/3,458 MiB | – | 994x1482 |
| Kernels | fp16 | 359 | 3,606 MiB/3,698 MiB | – | 994x1482 | |
| NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 128 | 3,278 MiB/3,458 MiB | – | 994x1482 |
| Kernels | fp16 | 119 | 3,606 MiB/3,698 MiB | – | 994x1482 | |
| NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 77.9 | 3,301 MiB/3,438 MiB | – | 994x1482 |
| Kernels | fp16 | 68.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.comfastforks 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
| Run | dtype | AbsRel ↓ | δ1 ↑ | Δ AbsRel vs fp32 original | images | ms / image |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.0425 | 0.9810 | reference | 654 | 1767 |
| Original fp16 | fp16 | 0.0425 | 0.9810 | ±0.0000 | 654 | 524 |
| Portable fp32 | fp32 | 0.0425 | 0.9810 | ±0.0000 | 654 | 1766 |
| Portable | fp16 | 0.0425 | 0.9810 | ±0.0000 | 654 | 519 |
| Kernels | fp16 | 0.0425 | 0.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
| Run | dtype | AbsRel ↓ | δ1 ↑ | Δ AbsRel vs fp32 original | images | ms / image |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.0353 | 0.9827 | reference | 100 | 1768 |
| Original fp16 | fp16 | 0.0353 | 0.9826 | ±0.0000 | 100 | 524 |
| Portable fp32 | fp32 | 0.0353 | 0.9827 | ±0.0000 | 100 | 1766 |
| Portable | fp16 | 0.0353 | 0.9826 | ±0.0000 | 100 | 519 |
| Kernels | fp16 | 0.0353 | 0.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
| Run | dtype | AbsRel ↓ | δ1 ↑ | Δ AbsRel vs fp32 original | images | ms / image |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.0651 | 0.9642 | reference | 27 | 1767 |
| Original fp16 | fp16 | 0.0652 | 0.9642 | −0.0001 | 27 | 525 |
| Portable fp32 | not measured | |||||
| Portable | fp16 | 0.0652 | 0.9642 | −0.0001 | 27 | 519 |
| Kernels | fp16 | 0.0656 | 0.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
| Run | dtype | AbsRel ↓ | δ1 ↑ | Δ AbsRel vs fp32 original | images | ms / image |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 0.0295 | 0.9966 | reference | 15 | 1772 |
| Original fp16 | fp16 | 0.0295 | 0.9966 | ±0.0000 | 15 | 527 |
| Portable fp32 | not measured | |||||
| Portable | fp16 | 0.0295 | 0.9966 | ±0.0000 | 15 | 518 |
| Kernels | fp16 | 0.0295 | 0.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).
| Check | Tolerance | Measured |
|---|---|---|
| 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) andaffine_invariant_inverseare relative (unknown scale or shift, not metres). Metric models that use the focal length takemodel(image, intrinsics=K)(K[3, 3], pixels of the input):metric3d-vit-largeandda3metric-largeneed it for correct metres (da3metric-large: metres = output x focal / 300; withoutintrinsics=a 300 px focal length is assumed, wrong for a real camera).unidepth-v2-vitl14,unik3d-vitl,depth-proand MoGe estimate the camera themselves (givenintrinsics=replacefx);zoedepth-nkand the relative models (da3mono-largetoo) take none. Normals-only models (kindnone) returnresult.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 backbonesdpt_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).
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
depth-pro | Middlebury 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-pro3000x4000 (3.4 GiB peak allocated, 4.0 reserved) depth-pro994x1482, first call: portable + torch.compile 39 s (cold Inductor cache), TensorRT fp16 163 s (ONNX + engine).depth-prooriginal 994x1482: torch.autocast(fp16) around the forward; fp16 = original's own precision=float16 modeldepth-proload / 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.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
depth-pro | NYUv2 test, AbsRel / delta1 | 0.0425 / 0.9810 | 0.0425 / 0.9810 | 0.0425 / 0.9810 | 0.0425 / 0.9810 | 0.0425 / 0.9810 | |
depth-pro | iBims-1, AbsRel / delta1 | 0.0353 / 0.9827 | 0.0353 / 0.9826 | 0.0353 / 0.9826 | 0.0353 / 0.9827 | 0.0353 / 0.9827 | |
depth-pro | ETH3D two-view train left, AbsRel / delta1 | 0.0651 / 0.9642 | 0.0652 / 0.9642 | 0.0652 / 0.9642 | 0.0656 / 0.9638 | possibly in the training data | |
depth-pro | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0295 / 0.9966 | 0.0295 / 0.9966 | 0.0295 / 0.9966 | 0.0295 / 0.9966 | possibly 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).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
depth-pro | 0.00107 / 0.00197 | RTX 5060 Ti, torch 2.14.1+cu130 | dpt_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: A cup of coffee, Rachel Michetti (CC0).