Flor commited on
Commit
eec6f92
Β·
verified Β·
1 Parent(s): 870cb32

card: update from fastforks 24802779

Browse files
Files changed (1) hide show
  1. README.md +26 -21
README.md CHANGED
@@ -18,7 +18,7 @@ This repo is the model card only: it holds no weights. fastforks downloads the a
18
 
19
  Author weight repos: <https://huggingface.co/tomtomtommi/LiteAnyStereoV2>.
20
 
21
- Task: stereo. Tier: experimental. Outputs: `disparity`. Backends: `portable`, `kernels`.
22
 
23
  Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).
24
 
@@ -54,25 +54,37 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `las2-h` 3000x4000 (8.5 GiB pe
54
 
55
  | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
56
  | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
57
- | `las2-h` | 205 | 135 | 123 | 53.3 | 2.5x | 2.3x | 1022 / 1084 | 1050 / 1110 | 1021 / 1388 |
58
  | `las2-l` | 154 | 90.8 | 80.3 | 29.9 | 3.0x | 2.7x | 1010 / 1082 | 1036 / 1098 | 397 / 600 |
59
  | `las2-m` | 79.1 | 52.4 | 54.1 | 18.3 | 2.9x | 3.0x | 948 / 1000 | 972 / 1026 | 329 / 572 |
60
  | `las2-s` | 62.0 | 43.5 | 46.9 | 14.3 | 3.0x | 3.3x | 933 / 978 | 955 / 988 | 320 / 558 |
61
 
 
 
 
 
 
 
 
 
 
62
  ### Startup and first call
63
 
64
  | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
65
  | --- | --- | --- | --- | --- | --- | --- |
66
- | `las2-h` | 0.26 (375x1242) | 0.18 | 0.13† | 1.21 (375x1242) | 0.14† | 0.06† |
67
- | `las2-l` | 0.39 (375x1242) | 0.23 | 0.18† | 0.04 (375x1242) | 0.08† | 0.03† |
68
- | `las2-m` | 0.17 (375x1242) | 0.12 | 0.10† | 0.02 (375x1242) | 0.05† | 0.02† |
69
- | `las2-s` | 0.11 (375x1242) | 0.09 | 0.07† | 0.02 (375x1242) | 0.05† | 0.01† |
70
 
71
  ### torch.compile and TensorRT
72
 
73
- | 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) |
74
- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
75
- | `las2-s` | 994x1482 | 46.9 | 23.7 | 22.4 | 10.3 | 87 | 14.3 | 955 / 988 | 238 / 264 | 162 |
 
 
 
76
 
77
  ### Fixed-size speed and peak memory, all models
78
 
@@ -87,22 +99,15 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `las2-h` 3000x4000 (8.5 GiB pe
87
  | `las2-s` | portable | 16.1 ms / 202 / 234 | 31.0 ms / 569 / 632 | 64.4 ms / 1232 / 1342 | 532.1 ms / 7119 / 7566 |
88
  | `las2-s` | kernels | 3.0 ms / 88 / 246 | 6.9 ms / 179 / 602 | 16.6 ms / 338 / 500 | 109.3 ms / 1859 / 2598 |
89
 
90
- ### Apple silicon (MPS)
91
-
92
- | model | `portable` | `kernels` | speed-up |
93
- | --- | --- | --- | --- |
94
- | `las2-h` | 418 ms / 2625 MiB (float32) | 266 ms / 1642 MiB | 1.57x |
95
- | `las2-s` | 94 ms / 1501 MiB (float32) | 85 ms / 1542 MiB | 1.11x |
96
-
97
  Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
98
 
99
- 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.
100
 
101
  ## Accuracy
102
 
103
  ### On public datasets
104
 
105
- Original = the authors' code, same checkpoint and protocol.
106
 
107
  | variant | dataset | original fp32 | original fp16 | portable | kernels | note |
108
  |---|---|---|---|---|---|---|
@@ -115,7 +120,7 @@ Original = the authors' code, same checkpoint and protocol.
115
  | `las2-h` | ETH3D two-view train, bad > 1 px % / EPE | 2.14 / 0.258 | 2.14 / 0.258 | 2.13 / 0.258 | 2.14 / 0.258 | possibly in the training data |
116
  | `las2-h` | Middlebury 2014 trainingH, bad > 2 px % / EPE | 9.27 / 2.141 | 9.28 / 2.141 | 9.27 / 2.141 | 9.27 / 2.141 | possibly in the training data |
117
 
118
- Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-05.
119
 
120
  ### Parity with the original code
121
 
@@ -124,7 +129,7 @@ Every variant is checked against reference outputs of the original code at its p
124
  ## Limitations
125
 
126
  - The original code's LAS1 (LiteAnyStereo.pth, another architecture) is not included.
127
- - Portable LAS2-H is faster than the original code but allocates more memory.
128
 
129
  ## Usage
130
 
@@ -143,4 +148,4 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
143
 
144
  `stereo.load("las2-h", mode="kernels")` runs our CUDA kernels (`igev`, `cutlass_conv`, `cudnn_hacc`, `stereo_ops`). 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.
145
 
146
- <!-- staged from fastforks feccac41 (2026-11-06) -->
 
18
 
19
  Author weight repos: <https://huggingface.co/tomtomtommi/LiteAnyStereoV2>.
20
 
21
+ Task: stereo. Tier: stable. Outputs: `disparity`. Backends: `portable`, `kernels`.
22
 
23
  Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).
24
 
 
54
 
55
  | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
56
  | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
57
+ | `las2-h` | 205 | 135 | – | – | – | – | 1022 / 1084 | – | – |
58
  | `las2-l` | 154 | 90.8 | 80.3 | 29.9 | 3.0x | 2.7x | 1010 / 1082 | 1036 / 1098 | 397 / 600 |
59
  | `las2-m` | 79.1 | 52.4 | 54.1 | 18.3 | 2.9x | 3.0x | 948 / 1000 | 972 / 1026 | 329 / 572 |
60
  | `las2-s` | 62.0 | 43.5 | 46.9 | 14.3 | 3.0x | 3.3x | 933 / 978 | 955 / 988 | 320 / 558 |
61
 
62
+ ### Stereo, synthetic, 994x1482
63
+
64
+ | model | time (ms): original fp32 | portable | kernels | kernels speed-up: vs portable | peak memory (MiB, allocated / reserved): portable | kernels |
65
+ | --- | --- | --- | --- | --- | --- | --- |
66
+ | `las2-h` | – | 113 | 53.8 | 2.1x | 1002 / 1046 | 917 / 1248 |
67
+ | `las2-l` | – | 75.7 | – | – | 648 / 716 | – |
68
+ | `las2-m` | – | 37.1 | – | – | 584 / 664 | – |
69
+ | `las2-s` | – | 27.8 | – | – | 568 / 648 | – |
70
+
71
  ### Startup and first call
72
 
73
  | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
74
  | --- | --- | --- | --- | --- | --- | --- |
75
+ | `las2-h` | 0.26 (375x1242) | 0.27 (375x1242) | 0.78 (375x1242) | 1.21 (375x1242) | 0.39 (375x1242) | 0.26 (375x1242) |
76
+ | `las2-l` | 0.39 (375x1242) | 0.53 (375x1242) | 0.18† | 0.04 (375x1242) | 0.33 (375x1242) | 0.03† |
77
+ | `las2-m` | 0.17 (375x1242) | 0.25 (375x1242) | 0.10† | 0.02 (375x1242) | 0.40 (375x1242) | 0.02† |
78
+ | `las2-s` | 0.11 (375x1242) | 0.27 (375x1242) | 0.07† | 0.02 (375x1242) | 0.47 (375x1242) | 0.01† |
79
 
80
  ### torch.compile and TensorRT
81
 
82
+ | 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) |
83
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
84
+ | `las2-h` | 994x1482 | 113 ms | 75.0 ms | planned for 0.2.1 | 53.8 ms | 37.5 s | – | 1002 / 1046 | 579 / 724 | 917 / 1248 | – |
85
+ | `las2-l` | 994x1482 | 75.7 ms | 46.6 ms | 23.4 ms | 29.9 ms | 30.5 s | 97.5 s | 648 / 716 | 385 / 432 | 397 / 600 | 393 / 424 |
86
+ | `las2-m` | 994x1482 | 37.1 ms | 28.6 ms | 13.2 ms | 18.3 ms | 24.0 s | 98.3 s | 584 / 664 | 252 / 300 | 329 / 572 | 343 / 386 |
87
+ | `las2-s` | 994x1482 | 27.8 ms | 23.7 ms | 10.3 ms | 14.3 ms | 22.4 s | 86.9 s | 568 / 648 | 238 / 264 | 320 / 558 | 258 / 304 |
88
 
89
  ### Fixed-size speed and peak memory, all models
90
 
 
99
  | `las2-s` | portable | 16.1 ms / 202 / 234 | 31.0 ms / 569 / 632 | 64.4 ms / 1232 / 1342 | 532.1 ms / 7119 / 7566 |
100
  | `las2-s` | kernels | 3.0 ms / 88 / 246 | 6.9 ms / 179 / 602 | 16.6 ms / 338 / 500 | 109.3 ms / 1859 / 2598 |
101
 
 
 
 
 
 
 
 
102
  Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
103
 
104
+ 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.
105
 
106
  ## Accuracy
107
 
108
  ### On public datasets
109
 
110
+ Original = the original code named under Details, same checkpoint and protocol.
111
 
112
  | variant | dataset | original fp32 | original fp16 | portable | kernels | note |
113
  |---|---|---|---|---|---|---|
 
120
  | `las2-h` | ETH3D two-view train, bad > 1 px % / EPE | 2.14 / 0.258 | 2.14 / 0.258 | 2.13 / 0.258 | 2.14 / 0.258 | possibly in the training data |
121
  | `las2-h` | Middlebury 2014 trainingH, bad > 2 px % / EPE | 9.27 / 2.141 | 9.28 / 2.141 | 9.27 / 2.141 | 9.27 / 2.141 | possibly in the training data |
122
 
123
+ Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.
124
 
125
  ### Parity with the original code
126
 
 
129
  ## Limitations
130
 
131
  - The original code's LAS1 (LiteAnyStereo.pth, another architecture) is not included.
132
+ - Portable LAS2-H at 375 x 1242 is faster than the original code (35.6 vs 36.4 ms) but peaks 13 MB (3.7 %) higher (365 vs 352 MB).
133
 
134
  ## Usage
135
 
 
148
 
149
  `stereo.load("las2-h", mode="kernels")` runs our CUDA kernels (`igev`, `cutlass_conv`, `cudnn_hacc`, `stereo_ops`). 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.
150
 
151
+ <!-- staged from fastforks 24802779 (2026-11-15) -->