Models · Monocular depth

Prompt Depth Anything

Prompt Depth Anything: metric depth from one image plus a low-resolution depth prompt (for example a phone LiDAR map), in small and large.

experimental Fork of DepthAnything/PromptDA@9161547 · backends: portable, kernels

Checkpoint

Paper 2024 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 11.4 ms 756x1008, fp16
vs the faster original 6.8× original fp16: 77.3 ms
Peak memory 297 MiB original: 781 MiB
Accuracy vs original fp32 – original not run on the test set

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import depth

model = depth.load("prompt-depth-anything-s")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.depth
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench prompt-depth-anything-s

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.

Input: example image 1920x1440 area-resized + ARKit 192x256 prompt, 756x1008

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32fp32 85.70.90×922 MiB/1,284 MiB0.40.77
Original fp16torch.autocast(fp16) around the forwardfp16 77.3–781 MiB/1,112 MiB0.40.79
Portable fp32fp32not measured ––––
Portablefp16 18.44.2×363 MiB/442 MiB0.40.24
Kernelsfp16 11.46.8×297 MiB/384 MiB1.20.18
Portable + torch.compile 16.34.7×260 MiB/322 MiB15 (build)–
TensorRT fp16fp16 10.57.3×268 MiBenginenot comparable47 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-06 to 2026-11-13. 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-14Originalfp32251 2,741 MiB process–756x1008
Portablefp16195 1,588 MiB processmatches756x1008
Portablefp32216 1,611 MiB processmatches756x1008
Kernelsfp16not implemented–756x1008

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
Apache-2.0 LICENSE
Weights
Apache-2.0 source
Training data
Synthetic and real RGB-D data (including pseudo-labelled real images) per the paper (arXiv 2412.14015)

Our reading of the licences, not legal advice.

Weights

prompt_depth_anything_vits.ckpt 100 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download prompt-depth-anything-s).

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 (every 4th: 164 images) with a 192x256 depth prompt

AbsRel / delta1 (metric)

Rundtypemet_absrel ↑met_d1 ↑Δ met_absrel vs fp32 originalimagesms / image
Original fp32fp320.01670.9938 reference 164 22.2
Original fp16not measured
Portable fp32fp320.01580.9943 −0.0009 164 19.6
Portablenot measured
Kernelsnot measured

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Prompt depth models: the prompt is a 192x256 low-resolution depth built from the ground truth (mean of the valid pixels per cell, holes filled with the nearest cell), the output is metric depth compared without any scale fit; AbsRel / delta1 over the pixels with ground truth, mean over images. The prompt comes from the ground truth, so the numbers are not comparable with the paper's (ARKitScenes / ScanNet++ with a LiDAR prompt, L1 in mm): they compare our modes with the original. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-17; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 30c7a8e9, 2026-11-17.

iBims-1 (100 images) with a 192x256 depth prompt

AbsRel / delta1 (metric)

Rundtypemet_absrel ↑met_d1 ↑Δ met_absrel vs fp32 originalimagesms / image
Original fp32fp320.01690.9934 reference 100 23.1
Original fp16not measured
Portable fp32fp320.01630.9937 −0.0006 100 20.1
Portablenot measured
Kernelsnot measured

AbsRel / delta1 after a least-squares scale + shift fit (in disparity space for inverse-depth models), mean over images. Prompt depth models: the prompt is a 192x256 low-resolution depth built from the ground truth (mean of the valid pixels per cell, holes filled with the nearest cell), the output is metric depth compared without any scale fit; AbsRel / delta1 over the pixels with ground truth, mean over images. The prompt comes from the ground truth, so the numbers are not comparable with the paper's (ARKitScenes / ScanNet++ with a LiDAR prompt, L1 in mm): they compare our modes with the original. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-17; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 30c7a8e9, 2026-11-17.

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| <= 0.02 and p99 <= 0.25 (absolute error of the output depth).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 not recorded
GPU default dtypes, mean |diff|≤ 0.02 0.00092
GPU default dtypes, p99 |diff|≤ 0.25 0.00342

Recorded for prompt-depth-anything-s on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-13, with these kernels: dpt_fusedfastbb

Details

Prompt Depth Anything (Lin et al., CVPR 2025): metric depth from an image and a low-resolution metric depth prompt (e.g. a LiDAR map), a DINOv2 ViT with a DPT head that fuses the prompt at every refinement stage.

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 >= 1, resized or padded inside the model (ViT patch 14); tested up to 3000x4000 (570 MiB allocated)
Options
  • max_size=1008>= 14· changes the output
Outputs
depth
Checkpoint
arch="vits"
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

Limitations

  • The depth prompt is required: call the model with `prompt_depth=` a finite, positive map in metres (zero or missing LiDAR pixels must be filled first). Export is at a fixed size only.
Full reference, generated from the repository

Prompt Depth Anything: metric depth from one image plus a low-resolution depth prompt (for example a phone LiDAR map), in small and large.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
prompt-depth-anything-sexample image 1920x1440 area-resized + ARKit 192x256 prompt (756x1008)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
85.7
77.3
18.4
11.4
16.3
10.5
922 / 1284
781 / 1112
363 / 442
297 / 384
260 / 322
368 / 410
prompt-depth-anything-lexample image 1920x1440 area-resized + ARKit 192x256 prompt (756x1008)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
592
438
125
69.3
117
75.3
3369 / 4280
3446 / 3810
1318 / 1488
1179 / 1348
968 / 1148
1649 / 1714
Details
  • Original code: https://github.com/DepthAnything/PromptDA at 9161547
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
  • Licence evidence: https://github.com/DepthAnything/PromptDA/blob/9161547ca7151e14fcc8f490ad3cc02fa9437483/README.md and the Hugging Face model cards (license: apache-2.0)
  • Training data: Synthetic and real RGB-D data (including pseudo-labelled real images) per the paper (arXiv 2412.14015)
  • Options: max_size = 1008 (>= 14)
  • Kernel libraries: fastbb, dpt_fused
  • Variants: prompt-depth-anything-s, prompt-depth-anything-l
  • Outputs: depth; kind: metric
  • Input size: any H x W >= 1, resized or padded inside the model (ViT patch 14)
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): prompt-depth-anything-s 3000x4000 (0.6 GiB peak allocated, 0.8 reserved); prompt-depth-anything-l 3000x4000 (1.4 GiB peak allocated, 1.7 reserved)
  • prompt-depth-anything-s 756x1008, first call: portable + torch.compile 15 s (cold Inductor cache), TensorRT fp16 47 s (ONNX + engine).
  • prompt-depth-anything-l 756x1008, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 52 s (ONNX + engine).
  • prompt-depth-anything-s original 756x1008: torch.autocast(fp16) around the forward
  • prompt-depth-anything-l original 756x1008: torch.autocast(fp16) around the forward
  • prompt-depth-anything-s load / first call: original 0.42 s / 0.792 s (756x1008), portable 0.37 s / 0.244 s (756x1008), kernels 1.2 s / 0.181 s (756x1008)
  • prompt-depth-anything-l load / first call: original 4.8 s / 0.771 s (756x1008), portable 1.5 s / 0.296 s (756x1008), kernels 2.78 s / 0.223 s (756x1008)
  • 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. Prompt depth models: the prompt is a 192x256 low-resolution depth built from the ground truth (mean of the valid pixels per cell, holes filled with the nearest cell), the output is metric depth compared without any scale fit; AbsRel / delta1 over the pixels with ground truth, mean over images. The prompt comes from the ground truth, so the numbers are not comparable with the paper's (ARKitScenes / ScanNet++ with a LiDAR prompt, L1 in mm): they compare our modes with the original. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
prompt-depth-anything-sNYUv2 test (every 4th: 164 images) with a 192x256 depth prompt, AbsRel / delta1 (metric)0.0167 / 0.99380.0158 / 0.9943
prompt-depth-anything-siBims-1 (100 images) with a 192x256 depth prompt, AbsRel / delta1 (metric)0.0169 / 0.99340.0163 / 0.9937
prompt-depth-anything-lNYUv2 test (every 4th: 164 images) with a 192x256 depth prompt, AbsRel / delta1 (metric)0.0217 / 0.98760.0217 / 0.98760.0208 / 0.98830.0208 / 0.98830.0208 / 0.9883
prompt-depth-anything-liBims-1 (100 images) with a 192x256 depth prompt, AbsRel / delta1 (metric)0.0150 / 0.99300.0151 / 0.99300.0147 / 0.99320.0146 / 0.99320.0147 / 0.9932

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c, 2026-11-16; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 30c7a8e9, 2026-11-17; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c, 2026-11-16.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 and p99 <= 0.25 (absolute error of the output depth).

variantkernels error vs original, mean / p99GPU, torchkernels used
prompt-depth-anything-s0.00092 / 0.00342RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120
prompt-depth-anything-l0.00183 / 0.00937RTX 5060 Ti, torch 2.14.1+cu130dpt_fused@48e0065bb7cf:sm_120, fastbb@7d058322634d:sm_120

Limitations

  • The depth prompt is required: call the model with prompt_depth= a finite, positive map in metres (zero or missing LiDAR pixels must be filled first). Export is at a fixed size only.

Example output

No example rendered for this checkpoint yet.