Model card synced with fastforks 7204e33f
Browse files
README.md
CHANGED
|
@@ -59,6 +59,12 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `nmrf-sceneflow` 3000x4000 (11
|
|
| 59 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 60 |
| `nmrf-sceneflow` | 0.21 (375x1242) | 0.10 | 0.07† | 0.77 (375x1242) | 0.22† | 0.20† |
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
### Fixed-size speed and peak memory, all models
|
| 63 |
|
| 64 |
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|
|
@@ -66,6 +72,12 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `nmrf-sceneflow` 3000x4000 (11
|
|
| 66 |
| `nmrf-sceneflow` | portable | 35.9 ms / 390 / 454 | 124.3 ms / 953 / 1094 | 315.1 ms / 2040 / 2402 | 2021.2 ms (n=3) / 11263 / 13666 |
|
| 67 |
| `nmrf-sceneflow` | kernels | 31.7 ms / 247 / 298 | 112.1 ms / 626 / 800 | 286.8 ms / 1356 / 1814 | 1834.3 ms / 7543 / 10866 |
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
|
| 70 |
|
| 71 |
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.
|
|
@@ -81,7 +93,7 @@ Every variant is checked against golden outputs of the original code at its pinn
|
|
| 81 |
```python
|
| 82 |
from fastforks import stereo
|
| 83 |
|
| 84 |
-
model = stereo.load("nmrf-sceneflow") #
|
| 85 |
result = model("left.png", "right.png")
|
| 86 |
result.disparity # [H, W] float32 tensor, input resolution
|
| 87 |
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
|
|
@@ -92,3 +104,5 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
|
|
| 92 |
## Kernels backend
|
| 93 |
|
| 94 |
`stereo.load("nmrf-sceneflow", mode="kernels")` runs our CUDA kernels (`fastbb`). 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.
|
|
|
|
|
|
|
|
|
| 59 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 60 |
| `nmrf-sceneflow` | 0.21 (375x1242) | 0.10 | 0.07† | 0.77 (375x1242) | 0.22† | 0.20† |
|
| 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 |
+
| `nmrf-sceneflow` | 994x1482 | 216.44 | 160.8 | 84.8 | 183.7 | 142 | 195.66 | 1510 / 1552 | 854 / 1104 | 826 |
|
| 67 |
+
|
| 68 |
### Fixed-size speed and peak memory, all models
|
| 69 |
|
| 70 |
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|
|
|
|
| 72 |
| `nmrf-sceneflow` | portable | 35.9 ms / 390 / 454 | 124.3 ms / 953 / 1094 | 315.1 ms / 2040 / 2402 | 2021.2 ms (n=3) / 11263 / 13666 |
|
| 73 |
| `nmrf-sceneflow` | kernels | 31.7 ms / 247 / 298 | 112.1 ms / 626 / 800 | 286.8 ms / 1356 / 1814 | 1834.3 ms / 7543 / 10866 |
|
| 74 |
|
| 75 |
+
### Apple silicon (MPS)
|
| 76 |
+
|
| 77 |
+
| model | `portable` | `kernels` | speed-up |
|
| 78 |
+
| --- | --- | --- | --- |
|
| 79 |
+
| `nmrf-sceneflow` | 455 ms / 2408 MiB (float32) | 365 ms / 1425 MiB | 1.24x |
|
| 80 |
+
|
| 81 |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
|
| 82 |
|
| 83 |
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.
|
|
|
|
| 93 |
```python
|
| 94 |
from fastforks import stereo
|
| 95 |
|
| 96 |
+
model = stereo.load("nmrf-sceneflow") # mode="auto": the preferred backend from recorded measurements
|
| 97 |
result = model("left.png", "right.png")
|
| 98 |
result.disparity # [H, W] float32 tensor, input resolution
|
| 99 |
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
|
|
|
|
| 104 |
## Kernels backend
|
| 105 |
|
| 106 |
`stereo.load("nmrf-sceneflow", mode="kernels")` runs our CUDA kernels (`fastbb`). 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.
|
| 107 |
+
|
| 108 |
+
<!-- staged from fastforks 7204e33f (2026-11-05) -->
|