Models · Monocular depth

ZipDepth

ZipDepth (Tosi et al., ECCV 2026): a very small, fast network that estimates relative depth (no real-world scale) of a single photo; a convolutional encoder with pooling attention, taught by Depth Anything V2 Large; standard and NPU-friendly versions. MIT code and weights.

experimental Fork of fabiotosi92/ZipDepth@91f3fd2 · backends: portable, kernels

Checkpoint

Paper 2026 Added in 0.4.0 Evaluated with 0.4.0

Kernels, RTX 5060 Ti 16 GB 2.69 ms 994x1482, fp16
vs the faster original 1.6× original fp32: 4.44 ms
Peak memory 93 MiB original: 120 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("zipdepth-base")  # fastest backend that runs here
result = model("photo.jpg")

# result fields: inverse_depth
inverse_depth = result.inverse_depth  # a torch tensor
arrays = result.numpy()  # the tensor fields as NumPy arrays: arrays["inverse_depth"]
result.backend  # what ran: mode, device, dtype
Other ways to run it
  • Backend: depth.load("zipdepth-base", mode="kernels") # or "portable", "auto" (default)
  • Precision: depth.load("zipdepth-base", dtype="float32") # full precision: slower, portable only
  • Options: depth.load("zipdepth-base", options={"short_side": 384})
fastforks bench zipdepth-base

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 fp32Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32original default fp32 (infer_image: BGR numpy in, cv2 resize on the CPU)fp32 4.44–120 MiB/164 MiB0.50.49
Original fp16torch.autocast(fp16) around infer_image (the original has no precision option)fp16 7.350.60×136 MiB/174 MiB0.10.55
Portable fp32fp32not measured ––––
Portablefp16 2.991.5×98 MiB/120 MiB0.30.03
Kernelsfp16 2.691.6×93 MiB/114 MiB0.20.00
Portable + torch.compile 1.602.8×112 MiB/130 MiB9 (build)–
TensorRT fp16fp16 0.7256.1×54 MiBenginenot comparable24 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-28 to 2026-12-02. 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 memoryLoad / first call (s)Output vs referenceInput
Apple silicon runs on macOS
Apple M1 Pro 16 GB (MLX, fp16) MLX, torch 2.14.1, 2026-11-30Portablefp1610.4 451 MiB process0.9 / 1.5skip994x1482
Portablefp3211.5 452 MiB process0.6 / 2.2skip994x1482

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
  • The repository carries one MIT licence for code; the checkpoints are files of the same repository and have no licence statement of their own (assumed MIT). The pseudo-labels the network was distilled from come from Depth Anything V2 Large, whose weights are CC-BY-NC-4.0: the terms for commercial use of the distilled weights are unclear (a note only).

Our reading of the licences, not legal advice.

Weights

zipdepth_base.pth 27.3 MB· hosted on raw.githubusercontent.com

fastforks downloads and checks these files on first use (fastforks download zipdepth-base).

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 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp320.07660.9497 654 3.69
Portablefp160.07650.9498 654 3.44
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

Aligned depth scores fit scale and shift by least squares, in disparity space for inverse-depth models. Metric depth scores follow each dataset's protocol. Both average over images. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

iBims-1

AbsRel / delta1

RundtypeAbsRel ↓δ1 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp320.07790.9339 100 3.41
Portablefp160.07780.9339 100 3.60
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

Aligned depth scores fit scale and shift by least squares, in disparity space for inverse-depth models. Metric depth scores follow each dataset's protocol. Both average over images. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

ETH3D two-view train left

AbsRel / delta1training data not stated: possibly seen

RundtypeAbsRel ↓δ1 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp320.11660.8523 27 4.39
Portablefp160.11660.8524 27 6.21
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

Aligned depth scores fit scale and shift by least squares, in disparity space for inverse-depth models. Metric depth scores follow each dataset's protocol. Both average over images. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

Middlebury 2014 trainingH left

AbsRel / delta1training data not stated: possibly seen

RundtypeAbsRel ↓δ1 ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp320.05320.9836 15 5.23
Portablefp160.05320.9837 15 10.8
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

Aligned depth scores fit scale and shift by least squares, in disparity space for inverse-depth models. Metric depth scores follow each dataset's protocol. Both average over images. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

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 <= 5 % of the reference's median |value| (absolute error of the output inverse_depth).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.01 (relative)0.00484 (relative)
GPU default dtypes, p99 |diff|≤ 0.05 (relative)0.03228 (relative)

Recorded for zipdepth-base on RTX 5060 Ti, torch 2.14.1+cu130, 2026-12-02, with these kernels: fvm_conv

Details

ZipDepth (Tosi et al., ECCV 2026): lightweight zero-shot relative monocular depth from a RepVGG encoder with strip-pooling and global-context attention and a small FPN decoder with a convex x2 upsampler, distilled from Depth Anything V2 Large; the NPU variant replaces the unfold upsampler by an unfold-free blend.

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; tested up to 3000x4000 (426 MiB allocated)
Options
  • short_side=384>= 32· changes the output
Outputs
inverse_depth
Checkpoint
dims=[48,96,192,384], depths=[2,2,6,2], dec_ch=96, half_dec_ch=32, unfold=true
CUDA kernels
  • fvm_convfused convolutions for image classifiers

Limitations

  • Relative depth only: inverse depth up to an unknown scale and shift, not metric.
Full reference, generated from the repository

ZipDepth (Tosi et al., ECCV 2026): a very small, fast network that estimates relative depth (no real-world scale) of a single photo; a convolutional encoder with pooling attention, taught by Depth Anything V2 Large; standard and NPU-friendly versions. MIT code and weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
zipdepth-baseMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
4.44
7.35
2.99
2.69
1.60
0.725
120 / 164
136 / 174
98 / 120
93 / 114
112 / 130
138 / 182
zipdepth-base-npuMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
4.37
7.32
3.01
2.73
1.63
0.669
120 / 148
137 / 178
98 / 120
93 / 114
112 / 130
138 / 182
Details
  • Original code: https://github.com/fabiotosi92/ZipDepth at 91f3fd2
  • Code licence: MIT (permissive); files: LICENSE
  • Weights licence: MIT (assumed from code)
  • Licence evidence: https://github.com/fabiotosi92/ZipDepth/blob/91f3fd21e131641f51e8d35736d1958350180e3a/LICENSE (the checkpoints are files of the same repository)
  • Training data: COCO 2017 (train, instance annotations), Objects365 (train, box annotations), ADE20K (SceneParsing, 150 classes), MegaDepth (Internet photo collections with SfM / MVS depth), not stated by the authors (Distilled from Depth Anything V2 Large pseudo-depth on about 14.1M images of 17 domains (ACDC, ADE20K, BDD100K, Cityscapes, COCO, DrivingStereo, Flickr1024, Gated2Depth, GoogleLandmarks, HRWSI, HoloPix50K, Mapillary, MegaDepth, Objects365, OpenImages v7, SA-1B, Trans10K) per the README)
  • Licence note: The repository carries one MIT licence for code; the checkpoints are files of the same repository and have no licence statement of their own (assumed MIT). The pseudo-labels the network was distilled from come from Depth Anything V2 Large, whose weights are CC-BY-NC-4.0: the terms for commercial use of the distilled weights are unclear (a note only).
  • Options: short_side = 384 (>= 32; also input_size)
  • Kernel libraries: fvm_conv
  • Variants: zipdepth-base, zipdepth-base-npu
  • Outputs: inverse_depth; kind: affine_invariant_inverse
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): zipdepth-base 3000x4000 (0.4 GiB peak allocated, 0.4 reserved); zipdepth-base-npu 3000x4000 (0.4 GiB peak allocated, 0.4 reserved)
  • zipdepth-base 994x1482, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 24 s (ONNX + engine).
  • zipdepth-base-npu 994x1482, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 16 s (ONNX + engine).
  • zipdepth-base original (fp32) 994x1482: original default fp32 (infer_image: BGR numpy in, cv2 resize on the CPU)
  • zipdepth-base original 994x1482: torch.autocast(fp16) around infer_image (the original has no precision option)
  • zipdepth-base-npu original (fp32) 994x1482: original default fp32 (infer_image: BGR numpy in, cv2 resize on the CPU)
  • zipdepth-base-npu original 994x1482: torch.autocast(fp16) around infer_image (the original has no precision option)
  • zipdepth-base load / first call: original 0.15 s / 0.551 s, portable 0.27 s / 0.029 s, kernels 0.17 s / 0.488 s (518x770)
  • zipdepth-base-npu load / first call: original 0.14 s / 0.009 s, portable 0.06 s / 0.004 s, kernels 0.27 s / 0.328 s (518x770)
  • Protocol, median of 5 after 3 warm-up, uint8 CUDA input, card defaults; peak = max over the first call and the timed calls

Measured

Aligned depth scores fit scale and shift by least squares, in disparity space for inverse-depth models. Metric depth scores follow each dataset's protocol. Both average over images. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetportableportable fp32note
zipdepth-baseNYUv2 test, AbsRel / delta10.0765 / 0.94980.0766 / 0.9497
zipdepth-baseiBims-1, AbsRel / delta10.0778 / 0.93390.0779 / 0.9339
zipdepth-baseETH3D two-view train left, AbsRel / delta10.1166 / 0.85240.1166 / 0.8523possibly in the training data
zipdepth-baseMiddlebury 2014 trainingH left, AbsRel / delta10.0532 / 0.98370.0532 / 0.9836possibly in the training data
zipdepth-base-npuNYUv2 test, AbsRel / delta10.0761 / 0.95090.0761 / 0.9510
zipdepth-base-npuiBims-1, AbsRel / delta10.0775 / 0.93370.0774 / 0.9337
zipdepth-base-npuETH3D two-view train left, AbsRel / delta10.1162 / 0.85470.1162 / 0.8548possibly in the training data
zipdepth-base-npuMiddlebury 2014 trainingH left, AbsRel / delta10.0532 / 0.98250.0532 / 0.9825possibly in the training data

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks f0b2da70d, 2026-11-30.

Parity

CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 1 % and p99 <= 5 % of the reference's median |value| (absolute error of the output inverse_depth).

variantkernels error vs original, mean / p99GPU, torchkernels used
zipdepth-base0.00484 / 0.03228RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120
zipdepth-base-npu0.00325 / 0.01461RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120

Limitations

  • Relative depth only: inverse depth up to an unknown scale and shift, not metric.

Example output

No example rendered for this checkpoint yet.