File size: 8,326 Bytes
fa8b576 3789411 fa8b576 3789411 fa8b576 3789411 fa8b576 3789411 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | ---
library_name: "fastforks"
pipeline_tag: "depth-estimation"
license: "other"
license_name: "mit-code-weights-unstated"
license_link: "https://github.com/gangweix/IGEV-plusplus/blob/099dec97989780d151700459c682df1cc2c18e88/README.md#L23"
tags:
- "stereo"
- "stereo-matching"
- "disparity"
- "cuda"
- "pytorch"
- "fastforks"
---
# IGEV++ (fastforks)
IGEV++ (Xu et al. 2025): IGEV-Stereo with geometry encoding volumes for small, medium and large disparity ranges (48 bins each at 1/4 resolution, up to 768 px), aggregated separately and blended per pixel in the ConvGRU update, 32 iterations.
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/gangweix/IGEV-plusplus> at `099dec979897`.
Task: stereo. Tier: experimental. Outputs: `disparity`. Backends: `portable`, `kernels`.
Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).
## Variants
Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in [`card.toml`](https://github.com/kleinicke/fastforks/blob/main/src/fastforks/stereo/models/igev_plusplus/card.toml).
| variant | weights (author link) | SHA-256 | weights licence | commercial use |
|---|---|---|---|---|
| `igev-plusplus-eth3d@1` | [eth3d.pth](https://drive.usercontent.google.com/download?export=download&confirm=t&id=1gN8J9YVJMupJVjUAUMSJ0jldkqH1YJUo) | `4595ac1c164b` | MIT (assumed from code) | yes |
| `igev-plusplus-kitti12@1` | [kitti2012.pth](https://drive.usercontent.google.com/download?export=download&confirm=t&id=1j5grw6AKhwhJNWJXn_RfhpFfiWBYboqH) | `2e7947101eec` | MIT (assumed from code) | yes |
| `igev-plusplus-kitti15@1` | [kitti2015.pth](https://drive.usercontent.google.com/download?export=download&confirm=t&id=15kWs23CO4bBDy3DJE4kNv_tlbeEvp1bk) | `42db237df5f8` | MIT (assumed from code) | yes |
| `igev-plusplus-middlebury@1` | [middlebury.pth](https://drive.usercontent.google.com/download?export=download&confirm=t&id=1R9a2YP4kaAv4oT0wtwTnWXrb82Shpp3O) | `eecddfa4549d` | MIT (assumed from code) | yes |
| `igev-plusplus-sceneflow@1` | [sceneflow.pth](https://drive.usercontent.google.com/download?export=download&confirm=t&id=1n8tu7eoByY_Xpyox5XJnjJC_bGBM2r4M) | `550227fb7b73` | MIT (assumed from code) | yes |
## Licence
Original-code strings, recorded as they are (research-use package; check them before any other use). Code: MIT. Files: `LICENSE`.
Code licence: MIT; the authors do not state a separate weights licence.
Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa).
Licence evidence: <https://github.com/gangweix/IGEV-plusplus/blob/099dec97989780d151700459c682df1cc2c18e88/README.md#L23>
## Input size
any H x W >= 32, padded to a multiple of 32
Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `igev-plusplus-eth3d` not measured yet; `igev-plusplus-kitti12` not measured yet; `igev-plusplus-kitti15` not measured yet; `igev-plusplus-middlebury` not measured yet; `igev-plusplus-sceneflow` not measured yet
## Speed and memory
### Stereo, Middlebury 2014 half, 994x1482
| model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `igev-plusplus-eth3d` | 2012.16 | 1277.86 | 1080.64 | 393.04 | 3.3x | 2.7x | 2891 / 3108 | 1594 / 1840 | 1389 / 2302 |
### Startup and first call
| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
| --- | --- | --- | --- | --- | --- | --- |
| `igev-plusplus-eth3d` | 0.42 (375x1242) | 0.20 | 0.16† | 2.33 (375x1242) | 1.10† | 0.40† |
### torch.compile and TensorRT
| 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) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| `igev-plusplus-eth3d` | 994x1482 | 1080.64 | 715.6 | 159.0 | 494.4 | 425 | 393.04 | 1594 / 1840 | 952 / 1074 | 3632 |
### Fixed-size speed and peak memory, all models
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
| --- | --- | --- | --- | --- | --- |
| `igev-plusplus-eth3d` | portable | 201.5 ms / 354 / 614 | 606.5 ms / 987 / 1662 | 1534.8 ms / 2172 / 3496 | OOM |
| `igev-plusplus-eth3d` | kernels | 88.7 ms / 357 / 1092 | 241.2 ms / 830 / 1210 | 534.3 ms / 1799 / 2464 | 3135.8 ms (n=3) / 8419 / 9752 |
| `igev-plusplus-kitti12` | portable | 201.4 ms / 354 / 614 | 607.2 ms / 987 / 1662 | 1535.8 ms / 2172 / 3496 | OOM |
| `igev-plusplus-kitti12` | kernels | 89.1 ms / 357 / 1092 | 244.8 ms / 830 / 1210 | 535.9 ms / 1799 / 2464 | 3143.3 ms (n=3) / 8419 / 9750 |
| `igev-plusplus-kitti15` | portable | 202.7 ms / 354 / 614 | 606.9 ms / 987 / 1662 | 1535.8 ms / 2172 / 3496 | OOM |
| `igev-plusplus-kitti15` | kernels | 88.7 ms / 357 / 1092 | 240.2 ms / 830 / 1210 | 534.9 ms / 1799 / 2464 | 3141.8 ms (n=3) / 8419 / 9752 |
| `igev-plusplus-middlebury` | portable | 201.2 ms / 354 / 612 | 606.8 ms / 987 / 1662 | 1535.6 ms / 2172 / 3496 | OOM |
| `igev-plusplus-middlebury` | kernels | 88.7 ms / 357 / 1092 | 240.5 ms / 830 / 1210 | 535.0 ms / 1799 / 2464 | 3140.6 ms (n=3) / 8419 / 9752 |
| `igev-plusplus-sceneflow` | portable | 201.0 ms / 354 / 612 | 606.2 ms / 987 / 1662 | 1534.9 ms / 2172 / 3496 | OOM |
| `igev-plusplus-sceneflow` | kernels | 88.6 ms / 357 / 1092 | 240.6 ms / 830 / 1210 | 535.4 ms / 1799 / 2464 | 3143.9 ms (n=3) / 8419 / 9752 |
### Apple silicon (MPS)
| model | `portable` | `kernels` | speed-up |
| --- | --- | --- | --- |
| `igev-plusplus-sceneflow` | 2852 ms / 1783 MiB (float16) | 2054 ms / 1803 MiB | 1.39x |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
- `igev-plusplus-kitti12`, `igev-plusplus-kitti15`, `igev-plusplus-middlebury`, `igev-plusplus-sceneflow`: same network and settings as `igev-plusplus-eth3d`, measured once (rows not repeated).
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.
## Accuracy
### Parity with the original code
Every variant is checked against golden outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 px and p99 <= 0.25 px.
## Limitations
- CUDA output (float16, kernels, float32 with PyTorch's default TF32 convolutions) differs from the CPU by ~0.06 px mean / 1.2 px p99 at 720x1280, 0.005 px with full float32: rounding amplified by 32 GRU iterations. Portable and kernels reach the same ETH3D / Middlebury accuracy.
## Usage
```python
from fastforks import stereo
model = stereo.load("igev-plusplus-eth3d") # mode="auto": the preferred backend from recorded measurements
result = model("left.png", "right.png")
result.disparity # [H, W] float32 tensor, input resolution
result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
```
Install with `pip install fastforks` (see <https://github.com/kleinicke/fastforks>). Other variants: `igev-plusplus-eth3d`, `igev-plusplus-kitti12`, `igev-plusplus-kitti15`, `igev-plusplus-middlebury`, `igev-plusplus-sceneflow`.
## Kernels backend
`stereo.load("igev-plusplus-eth3d", mode="kernels")` runs our CUDA kernels (`igev`, `igevpp`, `cutlass_conv`, `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.
<!-- staged from fastforks 7204e33f (2026-11-05) -->
|