Flor commited on
Commit
44cafe5
·
verified ·
1 Parent(s): 95a8c8c

card: update from fastforks 24802779

Browse files
Files changed (1) hide show
  1. README.md +22 -16
README.md CHANGED
@@ -18,9 +18,9 @@ ZoeDepth (Bhat et al. 2023): metric monocular depth from a MiDaS v3.1 BEiT-L/16
18
 
19
  This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: <https://github.com/kleinicke/fastforks>. Kernels for the `kernels` backend: <https://huggingface.co/fastforks/kernels>. Original code: <https://github.com/isl-org/ZoeDepth> at `d87f17b`.
20
 
21
- Task: depth. Tier: experimental. Outputs: `depth`. Backends: `portable`, `kernels`.
22
 
23
- Input: one RGB image. Output: a depth or inverse-depth map. `kind` (a card field, `result.kind`) says what the numbers mean: `metric` = metres; `scale_invariant`, `affine_invariant` 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.
24
 
25
  ## Variants
26
 
@@ -36,7 +36,7 @@ Original-code strings, recorded as they are (research-use package; check them be
36
 
37
  Code licence: MIT; the authors do not state a separate weights licence.
38
 
39
- Training data: 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).
40
 
41
  Licence evidence: https://github.com/isl-org/ZoeDepth/blob/d87f17b2f5fdcb174cf4fb115491f4a6c60de152/LICENSE (weights are release assets of the same repository)
42
 
@@ -47,6 +47,12 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `zoedepth-nk` 3000x4000 (2.4 G
47
 
48
  ## Speed and memory
49
 
 
 
 
 
 
 
50
  ### Depth, Middlebury 2014 half, 994x1482
51
 
52
  | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
@@ -61,9 +67,9 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `zoedepth-nk` 3000x4000 (2.4 G
61
 
62
  ### torch.compile and TensorRT
63
 
64
- | model | input | portable ms | compile ms | compile s (cold) | TensorRT fp16 ms | ONNX + build s | kernels ms | peak MiB (alloc / reserved): portable | compile | TensorRT (device) |
65
- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
66
- | `zoedepth-nk` | 994x1482 | 124 | 71.7 | 93.8 | 73.3 | 138 | 88.9 | 2037 / 2124 | 1813 / 1880 | 852 |
67
 
68
  ### Fixed-size speed and peak memory, all models
69
 
@@ -76,22 +82,22 @@ Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
76
 
77
  Resizes to its working resolution: time depends on the aspect ratio, not the input pixels.
78
 
79
- Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the authors' code at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
80
 
81
  ## Accuracy
82
 
83
  ### On public datasets
84
 
85
- 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.
86
 
87
- | variant | dataset | original fp32 | portable | kernels | note |
88
- |---|---|---|---|---|---|
89
- | `zoedepth-nk` | NYUv2 test, AbsRel / delta1 | 0.0532 / 0.9737 | 0.0528 / 0.9743 | 0.0528 / 0.9743 | |
90
- | `zoedepth-nk` | iBims-1, AbsRel / delta1 | 0.0669 / 0.9545 | 0.0668 / 0.9546 | 0.0668 / 0.9546 | |
91
- | `zoedepth-nk` | ETH3D two-view train left, AbsRel / delta1 | 0.1139 / 0.8648 | 0.1130 / 0.8653 | 0.1130 / 0.8654 | possibly in the training data |
92
- | `zoedepth-nk` | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0449 / 0.9860 | 0.0449 / 0.9860 | 0.0449 / 0.9860 | possibly in the training data |
93
 
94
- Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-27.
95
 
96
  ### Parity with the original code
97
 
@@ -120,4 +126,4 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
120
 
121
  `depth.load("zoedepth-nk", mode="kernels")` runs our CUDA kernels (`cudnn_hacc`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice.
122
 
123
- <!-- staged from fastforks feccac41 (2026-11-06) -->
 
18
 
19
  This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: <https://github.com/kleinicke/fastforks>. Kernels for the `kernels` backend: <https://huggingface.co/fastforks/kernels>. Original code: <https://github.com/isl-org/ZoeDepth> at `d87f17b`.
20
 
21
+ Task: depth. Tier: stable. Outputs: `depth`. Backends: `portable`, `kernels`.
22
 
23
+ Input: one RGB image. Output: a depth or inverse-depth map. `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).
24
 
25
  ## Variants
26
 
 
36
 
37
  Code licence: MIT; the authors do not state a separate weights licence.
38
 
39
+ 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)).
40
 
41
  Licence evidence: https://github.com/isl-org/ZoeDepth/blob/d87f17b2f5fdcb174cf4fb115491f4a6c60de152/LICENSE (weights are release assets of the same repository)
42
 
 
47
 
48
  ## Speed and memory
49
 
50
+ ### Depth, synthetic
51
+
52
+ | model | input | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
53
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
54
+ | `zoedepth-nk` | 518x770 | 295 | 250 | 114 | 80.0 | 3.1x | 1.4x | 1965 / 2124 | 1950 / 2124 | 1658 / 1960 |
55
+
56
  ### Depth, Middlebury 2014 half, 994x1482
57
 
58
  | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
 
67
 
68
  ### torch.compile and TensorRT
69
 
70
+ | model | input | time: portable | compile | TensorRT fp16 | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) |
71
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
72
+ | `zoedepth-nk` | 994x1482 | 124 ms | 71.7 ms | 73.3 ms | 88.9 ms | 93.8 s | 138 s | 2037 / 2124 | 1813 / 1880 | 1771 / 1960 | 2246 / 2306 |
73
 
74
  ### Fixed-size speed and peak memory, all models
75
 
 
82
 
83
  Resizes to its working resolution: time depends on the aspect ratio, not the input pixels.
84
 
85
+ Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
86
 
87
  ## Accuracy
88
 
89
  ### On public datasets
90
 
91
+ 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.
92
 
93
+ | variant | dataset | original fp32 | original fp16 | portable | kernels | note |
94
+ |---|---|---|---|---|---|---|
95
+ | `zoedepth-nk` | NYUv2 test, AbsRel / delta1 | 0.0532 / 0.9737 | 0.0528 / 0.9743 (NaN / inf output) | 0.0532 / 0.9737 | 0.0532 / 0.9737 | |
96
+ | `zoedepth-nk` | iBims-1, AbsRel / delta1 | 0.0669 / 0.9545 | 0.0668 / 0.9546 (NaN / inf output) | 0.0669 / 0.9545 | 0.0669 / 0.9545 | |
97
+ | `zoedepth-nk` | ETH3D two-view train left, AbsRel / delta1 | 0.1139 / 0.8648 | 0.1130 / 0.8653 (NaN / inf output) | 0.1139 / 0.8647 | 0.1139 / 0.8648 | possibly in the training data |
98
+ | `zoedepth-nk` | Middlebury 2014 trainingH left, AbsRel / delta1 | 0.0449 / 0.9860 | 0.0449 / 0.9860 | 0.0449 / 0.9860 | 0.0449 / 0.9860 | possibly in the training data |
99
 
100
+ Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
101
 
102
  ### Parity with the original code
103
 
 
126
 
127
  `depth.load("zoedepth-nk", mode="kernels")` runs our CUDA kernels (`cudnn_hacc`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice.
128
 
129
+ <!-- staged from fastforks 24802779 (2026-11-15) -->