Selective-IGEV
IGEV-Stereo with selective recurrent units, by Xianqi Wang et al., with checkpoints for several datasets.
stable Fork of Windsrain/Selective-Stereo@c39acbf · backends: portable, kernels
- Paper Selective-Stereo: Adaptive Frequency Information Selection for Stereo Matching CVPR 2024 · first released 1 Mar 2024
Paper 2024 Added in 0.1.0 Evaluated with 0.2.0
Use it
pip install fastforks Lean install with only what this model needs: pip install fastforks-core
from fastforks import stereo
model = stereo.load("selective-igev-sceneflow") # kernels on a supported GPU, else portable PyTorch
result = model(left, right)
result.disparity
result.backend # what ran: mode, device, dtype, kernels fastforks bench selective-igev-sceneflow 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.
| Backend | dtype | Time per call (ms) | vs original fp16 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32timed with selective-igev-eth3d-finetune (same network, other weights) | fp32 | 2201 | 0.66× | 2,888 MiB/3,216 MiB | – | – |
| Original fp16timed with selective-igev-eth3d-finetune (same network, other weights) | fp16 | 1455 | – | 2,013 MiB/2,152 MiB | – | – |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portablemeasured on selective-igev-eth3d-finetune (same architecture, other checkpoint) | fp16 | 998 | 1.5× | 1,238 MiB/1,488 MiB | 0.5 | 1.02 |
| Kernelsmeasured on selective-igev-eth3d-finetune (same architecture, other checkpoint) | fp16 | 349 | 4.2× | 1,109 MiB/1,390 MiB | 0.1 | 0.35 |
| Portable + torch.compile | 692 | 2.1× | 915 MiB/1,028 MiB | 127 (build) | – | |
| TensorRT fp16 | fp16 | 463 | 3.1× | 1,146 MiBenginenot comparable | 255 (build) | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-01 to 2026-11-03. Median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls. 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
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12 | Original | fp32 | 8196 | 7,002 MiB process | matches | 994x1482 |
| Portable | fp16 | 6968 | 3,859 MiB process | matches | 994x1482 | |
| Portable | fp32 | 9010 | 6,961 MiB process | matches | 994x1482 | |
| Kernels | fp16 | 5710 | 3,907 MiB process | matches | 994x1482 | |
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 1123 | 1,211 MiB/1,448 MiB | – | 994x1482 |
| Kernels | fp16 | 515 | 1,112 MiB/1,390 MiB | – | 994x1482 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 327 | 1,211 MiB/1,448 MiB | – | 994x1482 |
| Kernels | fp16 | 163 | 1,112 MiB/1,390 MiB | – | 994x1482 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 875 | 1,211 MiB/1,448 MiB | – | 994x1482 |
| Kernels | fp16 | 410 | 1,112 MiB/1,430 MiB | – | 994x1482 | |
| NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 343 | 1,211 MiB/1,448 MiB | – | 994x1482 |
| Kernels | fp16 | 168 | 1,112 MiB/1,390 MiB | – | 994x1482 | |
| NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 170 | 1,235 MiB/1,488 MiB | – | 994x1482 |
| Kernels | fp16 | 89.2 | 1,106 MiB/1,350 MiB | – | 994x1482 |
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
-
- Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa) research-only, non-commercial
- weights licence not stated by the original authors; assumed to be the code licence
Our reading of the licences, not legal advice.
Weights
sceneflow.pth 53.0 MB· hosted on Google Drivefastforks downloads and checks these files on first use (fastforks download selective-igev-sceneflow).
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.
ETH3D two-view train
bad > 1 px % / EPE
| Run | dtype | bad px % ↓ | EPE ↓ | Δ bad px % vs fp32 original | pairs | ms / pair |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 6.08 | 1.426 | reference | 27 | 540 |
| Original fp16 | fp16 | 6.06 | 1.405 | +0.02 | 27 | 418 |
| Portable fp32 | fp32 | 6.07 | 1.407 | +0.01 | 27 | 514 |
| Portable | fp16 | 6.05 | 1.401 | +0.03 | 27 | 236 |
| Kernels | fp16 | 6.06 | 1.410 | +0.02 | 27 | 98.6 |
Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.
Middlebury 2014 trainingH
bad > 2 px % / EPE
| Run | dtype | bad px % ↓ | EPE ↓ | Δ bad px % vs fp32 original | pairs | ms / pair |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 11.78 | 2.584 | reference | 15 | 1931 |
| Original fp16 | fp16 | 11.77 | 2.571 | +0.01 | 15 | 1292 |
| Portable fp32 | fp32 | 11.79 | 2.582 | −0.01 | 15 | 1859 |
| Portable | fp16 | 11.81 | 2.591 | −0.03 | 15 | 851 |
| Kernels | fp16 | 11.80 | 2.591 | −0.02 | 15 | 298 |
Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32, portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.
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| <= 0.02 px and p99 <= 0.25 px.
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0.002 px | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.02 px | 0.00076 px |
| GPU default dtypes, p99 |diff| | ≤ 0.25 px | 0.00407 px |
Recorded for selective-igev-sceneflow on RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-31, with these kernels: cudnn_hacccutlass_convigev
Details
Selective-IGEV (Wang et al. 2024, Selective-Stereo): IGEV-Stereo with selective recurrent units, attention-blended small (1x1) and large (3x3) ConvGRUs on a channel- and spatially re-weighted context, 32 iterations.
- Input / output
- Input: a rectified left / right image pair. Output: a disparity map (pixels, left view).
- Input size
- any H x W >= 32, padded to a multiple of 32; tested up to 3000x4000 (10.3 GiB allocated)
- Options
iters=32>= 1· changes the output
- Outputs
disparity- CUDA kernels
igevIGEV stereo: convolution epilogues, correlation lookups, GRU gatescutlass_convCUTLASS convolutions with the recurrent update (GRU) fused incudnn_haccconvolutions with fp16 accumulation (cuDNN)
- Apple (MPS)
stereo_metalMetal: stereo kernels. fp32, fp16
Limitations
- ONNX export needs torch >= 2.14 (older exporters fail on this network).
Full reference, generated from the repository
IGEV-Stereo with selective recurrent units, by Xianqi Wang et al., with checkpoints for several datasets.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
selective-igev-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 2201 1455 998 349 692 463 | 2888 / 3216 2013 / 2152 1238 / 1488 1109 / 1390 915 / 1028 1278 / 1334 |
selective-igev-eth3d-finetune | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 2201 1455 996 351 691 461 | 2888 / 3216 2013 / 2152 1227 / 1448 1051 / 1190 919 / 1088 1279 / 1316 |
Details
- Original code: https://github.com/Windsrain/Selective-Stereo at
c39acbfef9fb - Code licence: MIT (permissive); files:
LICENSE - Weights licence: MIT (assumed from code)
- Licence evidence: https://github.com/Windsrain/Selective-Stereo/blob/c39acbfef9fbe36fbc01efa4abeafc62bbe2da36/README.md#L25
- Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
selective-igev-kitti12: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), KITTI stereo / optical flow 2012 / 2015 (SceneFlow, then fine-tuned on KITTI (KITTI 2012 model))selective-igev-kitti15: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), KITTI stereo / optical flow 2012 / 2015 (SceneFlow, then fine-tuned on KITTI (KITTI 2015 model))selective-igev-middlebury-finetune: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), Middlebury stereo (2014) (SceneFlow, then fine-tuned on Middlebury (final fine-tune stage; Selective-Stereo README training commands, 'middlebury_finetune' stage); original demo runs it with max_disp 768, 80 iterations)selective-igev-middlebury-train: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), Middlebury stereo (2014) (SceneFlow, then fine-tuned on Middlebury (first fine-tune stage; Selective-Stereo README training commands, 'middlebury_train' stage))selective-igev-eth3d-finetune: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), ETH3D two-view stereo (SceneFlow, then fine-tuned on ETH3D (final fine-tune stage; Selective-Stereo README training commands, 'eth3d_finetune' stage))selective-igev-eth3d-train: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), ETH3D two-view stereo (SceneFlow, then fine-tuned on ETH3D (first fine-tune stage; Selective-Stereo README training commands, 'eth3d_train' stage))
- Options:
iters= 32 (>= 1) - Kernel libraries:
igev,cutlass_conv,cudnn_hacc - Variants:
selective-igev-sceneflow,selective-igev-kitti12,selective-igev-kitti15,selective-igev-middlebury-finetune,selective-igev-middlebury-train,selective-igev-eth3d-finetune,selective-igev-eth3d-train - Outputs: disparity
- Input size: any H x W >= 32, padded to a multiple of 32
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
selective-igev-sceneflow3000x4000 (10.3 GiB peak allocated, 14.0 reserved);selective-igev-kitti123000x4000 (10.3 GiB peak allocated, 14.0 reserved);selective-igev-kitti153000x4000 (10.3 GiB peak allocated, 14.0 reserved);selective-igev-middlebury-finetune3000x4000 (10.3 GiB peak allocated, 14.0 reserved);selective-igev-middlebury-train3000x4000 (10.3 GiB peak allocated, 14.0 reserved);selective-igev-eth3d-finetune3000x4000 (10.3 GiB peak allocated, 14.0 reserved);selective-igev-eth3d-train3000x4000 (10.3 GiB peak allocated, 14.0 reserved) selective-igev-kitti12,selective-igev-kitti15,selective-igev-middlebury-finetune,selective-igev-middlebury-train,selective-igev-eth3d-train: same network and settings asselective-igev-sceneflow, measured once (rows not repeated).selective-igev-sceneflow994x1482, first call: portable + torch.compile 127 s (cold Inductor cache), TensorRT fp16 255 s (ONNX + engine).selective-igev-eth3d-finetune994x1482, first call: portable + torch.compile 126 s (cold Inductor cache), TensorRT fp16 256 s (ONNX + engine).selective-igev-scenefloworiginal (fp32) 994x1482, original 994x1482: timed with selective-igev-eth3d-finetune (same network, other weights)selective-igev-sceneflowportable 994x1482, kernels 994x1482: measured on selective-igev-eth3d-finetune (same architecture, other checkpoint)selective-igev-sceneflowload / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† sselective-igev-kitti12load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† sselective-igev-kitti15load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† sselective-igev-middlebury-finetuneload / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† sselective-igev-middlebury-trainload / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† sselective-igev-eth3d-finetuneload / first call: original 0.36 s / 2.251 s (375x1242), portable 0.68 s / 1.017 s (375x1242), kernels 0.6 s / 0.57 s (375x1242)selective-igev-eth3d-trainload / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† s- † measured in the speed sweep after the portable load (or an earlier size) in the same process: file cache and kernels are warm, so the time is lower than a fresh start.
- Protocol,
selective-igev-sceneflow,selective-igev-kitti12,selective-igev-kitti15,selective-igev-middlebury-finetune,selective-igev-middlebury-train,selective-igev-eth3d-train: median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls - Protocol,
selective-igev-eth3d-finetune: first call, 3 warm-up, peak reset, median of 3 rounds x median of 5
Measured
Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
selective-igev-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 6.08 / 1.426 | 6.06 / 1.405 | 6.05 / 1.401 | 6.07 / 1.407 | 6.06 / 1.410 | |
selective-igev-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 11.78 / 2.584 | 11.77 / 2.571 | 11.81 / 2.591 | 11.79 / 2.582 | 11.80 / 2.591 | |
selective-igev-kitti12 | ETH3D two-view train, bad > 1 px % / EPE | 24.09 / 3.655 | 24.07 / 3.663 | 24.07 / 3.649 | 24.09 / 3.656 | 24.07 / 3.662 | |
selective-igev-kitti12 | Middlebury 2014 trainingH, bad > 2 px % / EPE | 20.09 / 4.854 | 20.09 / 4.862 | 20.08 / 4.845 | 20.09 / 4.857 | 20.09 / 4.862 | |
selective-igev-kitti15 | ETH3D two-view train, bad > 1 px % / EPE | 24.25 / 2.449 | 24.26 / 2.445 | 24.26 / 2.445 | 24.26 / 2.456 | 24.26 / 2.456 | |
selective-igev-kitti15 | Middlebury 2014 trainingH, bad > 2 px % / EPE | 19.64 / 4.949 | 19.64 / 4.952 | 19.65 / 4.956 | 19.64 / 4.954 | 19.64 / 4.941 | |
selective-igev-middlebury-finetune | ETH3D two-view train, bad > 1 px % / EPE | 24.24 / 0.995 | 24.24 / 0.994 | 24.27 / 0.995 | 24.22 / 0.995 | 24.24 / 0.995 | |
selective-igev-middlebury-finetune | Middlebury 2014 trainingH, bad > 2 px % / EPE | 5.65 / 1.192 | 5.66 / 1.192 | 5.66 / 1.208 | 5.65 / 1.191 | 5.67 / 1.194 | trained on this dataset's public images; not a zero-shot result |
selective-igev-middlebury-train | ETH3D two-view train, bad > 1 px % / EPE | 10.28 / 0.434 | 10.24 / 0.433 | 10.24 / 0.433 | 10.25 / 0.433 | 10.25 / 0.433 | |
selective-igev-middlebury-train | Middlebury 2014 trainingH, bad > 2 px % / EPE | 5.95 / 1.437 | 5.96 / 1.433 | 5.97 / 1.435 | 5.94 / 1.436 | 5.99 / 1.437 | trained on this dataset's public images; not a zero-shot result |
selective-igev-eth3d-finetune | ETH3D two-view train, bad > 1 px % / EPE | 0.32 / 0.082 | 0.32 / 0.082 | 0.32 / 0.082 | 0.32 / 0.082 | 0.32 / 0.082 | trained on this dataset's public images; not a zero-shot result |
selective-igev-eth3d-finetune | Middlebury 2014 trainingH, bad > 2 px % / EPE | 12.33 / 2.813 | 12.33 / 2.808 | 12.33 / 2.807 | 12.33 / 2.811 | 12.34 / 2.811 | |
selective-igev-eth3d-train | ETH3D two-view train, bad > 1 px % / EPE | 0.78 / 0.137 | 0.78 / 0.137 | 0.78 / 0.137 | 0.78 / 0.137 | 0.78 / 0.137 | trained on this dataset's public images; not a zero-shot result |
selective-igev-eth3d-train | Middlebury 2014 trainingH, bad > 2 px % / EPE | 7.96 / 2.158 | 7.97 / 2.153 | 7.99 / 2.161 | 7.96 / 2.150 | 8.01 / 2.158 |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.
Parity
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.
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
selective-igev-sceneflow | 0.00076 / 0.00407 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
selective-igev-kitti12 | 0.00076 / 0.00226 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
selective-igev-kitti15 | 0.00051 / 0.00166 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
selective-igev-middlebury-finetune | 0.00102 / 0.00544 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
selective-igev-middlebury-train | 0.0027 / 0.02007 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
selective-igev-eth3d-finetune | 0.00127 / 0.005 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
selective-igev-eth3d-train | 0.00115 / 0.00565 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
Limitations
- ONNX export needs torch >= 2.14 (older exporters fail on this network).
Example output
One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).
Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).