Models · Stereo matching

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

Checkpoint

Paper 2024 Added in 0.1.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 349 ms 994x1482, fp16
vs the faster original 4.2× original fp16: 1455 ms
Peak memory 1,109 MiB original: 2,013 MiB
Accuracy vs original fp32 +0.02 kernels bad px %, ETH3D two-view train (6.08 original)

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.

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32timed with selective-igev-eth3d-finetune (same network, other weights)fp32 22010.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 fp32fp32not measured ––––
Portablemeasured on selective-igev-eth3d-finetune (same architecture, other checkpoint)fp16 9981.5×1,238 MiB/1,488 MiB0.51.02
Kernelsmeasured on selective-igev-eth3d-finetune (same architecture, other checkpoint)fp16 3494.2×1,109 MiB/1,390 MiB0.10.35
Portable + torch.compile 6922.1×915 MiB/1,028 MiB127 (build)–
TensorRT fp16fp16 4633.1×1,146 MiBenginenot comparable255 (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

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12Originalfp328196 7,002 MiB processmatches994x1482
Portablefp166968 3,859 MiB processmatches994x1482
Portablefp329010 6,961 MiB processmatches994x1482
Kernelsfp165710 3,907 MiB processmatches994x1482
NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp161123 1,211 MiB/1,448 MiB–994x1482
Kernelsfp16515 1,112 MiB/1,390 MiB–994x1482
NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16327 1,211 MiB/1,448 MiB–994x1482
Kernelsfp16163 1,112 MiB/1,390 MiB–994x1482
NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07Portablefp16875 1,211 MiB/1,448 MiB–994x1482
Kernelsfp16410 1,112 MiB/1,430 MiB–994x1482
NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp16343 1,211 MiB/1,448 MiB–994x1482
Kernelsfp16168 1,112 MiB/1,390 MiB–994x1482
NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08Portablefp16170 1,235 MiB/1,488 MiB–994x1482
Kernelsfp1689.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
  • 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 Drive

fastforks 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

Rundtypebad px % ↓EPE ↓Δ bad px % vs fp32 originalpairsms / pair
Original fp32fp326.081.426 reference 27 540
Original fp16fp166.061.405 +0.02 27 418
Portable fp32fp326.071.407 +0.01 27 514
Portablefp166.051.401 +0.03 27 236
Kernelsfp166.061.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

Rundtypebad px % ↓EPE ↓Δ bad px % vs fp32 originalpairsms / pair
Original fp32fp3211.782.584 reference 15 1931
Original fp16fp1611.772.571 +0.01 15 1292
Portable fp32fp3211.792.582 −0.01 15 1859
Portablefp1611.812.591 −0.03 15 851
Kernelsfp1611.802.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.

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.002 pxnot recorded
GPU default dtypes, mean |diff|≤ 0.02 px0.00076 px
GPU default dtypes, p99 |diff|≤ 0.25 px0.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 gates
  • cutlass_convCUTLASS convolutions with the recurrent update (GRU) fused in
  • cudnn_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.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
selective-igev-sceneflowMiddlebury 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-finetuneMiddlebury 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-sceneflow 3000x4000 (10.3 GiB peak allocated, 14.0 reserved); selective-igev-kitti12 3000x4000 (10.3 GiB peak allocated, 14.0 reserved); selective-igev-kitti15 3000x4000 (10.3 GiB peak allocated, 14.0 reserved); selective-igev-middlebury-finetune 3000x4000 (10.3 GiB peak allocated, 14.0 reserved); selective-igev-middlebury-train 3000x4000 (10.3 GiB peak allocated, 14.0 reserved); selective-igev-eth3d-finetune 3000x4000 (10.3 GiB peak allocated, 14.0 reserved); selective-igev-eth3d-train 3000x4000 (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 as selective-igev-sceneflow, measured once (rows not repeated).
  • selective-igev-sceneflow 994x1482, first call: portable + torch.compile 127 s (cold Inductor cache), TensorRT fp16 255 s (ONNX + engine).
  • selective-igev-eth3d-finetune 994x1482, first call: portable + torch.compile 126 s (cold Inductor cache), TensorRT fp16 256 s (ONNX + engine).
  • selective-igev-sceneflow original (fp32) 994x1482, original 994x1482: timed with selective-igev-eth3d-finetune (same network, other weights)
  • selective-igev-sceneflow portable 994x1482, kernels 994x1482: measured on selective-igev-eth3d-finetune (same architecture, other checkpoint)
  • selective-igev-sceneflow load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† s
  • selective-igev-kitti12 load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† s
  • selective-igev-kitti15 load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† s
  • selective-igev-middlebury-finetune load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† s
  • selective-igev-middlebury-train load / first call: original 0.36 s / 2.251 s (375x1242), portable 0.5 s / 1.016† s, kernels 0.14† s / 0.35† s
  • selective-igev-eth3d-finetune load / 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-train load / 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.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
selective-igev-sceneflowETH3D two-view train, bad > 1 px % / EPE6.08 / 1.4266.06 / 1.4056.05 / 1.4016.07 / 1.4076.06 / 1.410
selective-igev-sceneflowMiddlebury 2014 trainingH, bad > 2 px % / EPE11.78 / 2.58411.77 / 2.57111.81 / 2.59111.79 / 2.58211.80 / 2.591
selective-igev-kitti12ETH3D two-view train, bad > 1 px % / EPE24.09 / 3.65524.07 / 3.66324.07 / 3.64924.09 / 3.65624.07 / 3.662
selective-igev-kitti12Middlebury 2014 trainingH, bad > 2 px % / EPE20.09 / 4.85420.09 / 4.86220.08 / 4.84520.09 / 4.85720.09 / 4.862
selective-igev-kitti15ETH3D two-view train, bad > 1 px % / EPE24.25 / 2.44924.26 / 2.44524.26 / 2.44524.26 / 2.45624.26 / 2.456
selective-igev-kitti15Middlebury 2014 trainingH, bad > 2 px % / EPE19.64 / 4.94919.64 / 4.95219.65 / 4.95619.64 / 4.95419.64 / 4.941
selective-igev-middlebury-finetuneETH3D two-view train, bad > 1 px % / EPE24.24 / 0.99524.24 / 0.99424.27 / 0.99524.22 / 0.99524.24 / 0.995
selective-igev-middlebury-finetuneMiddlebury 2014 trainingH, bad > 2 px % / EPE5.65 / 1.1925.66 / 1.1925.66 / 1.2085.65 / 1.1915.67 / 1.194trained on this dataset's public images; not a zero-shot result
selective-igev-middlebury-trainETH3D two-view train, bad > 1 px % / EPE10.28 / 0.43410.24 / 0.43310.24 / 0.43310.25 / 0.43310.25 / 0.433
selective-igev-middlebury-trainMiddlebury 2014 trainingH, bad > 2 px % / EPE5.95 / 1.4375.96 / 1.4335.97 / 1.4355.94 / 1.4365.99 / 1.437trained on this dataset's public images; not a zero-shot result
selective-igev-eth3d-finetuneETH3D two-view train, bad > 1 px % / EPE0.32 / 0.0820.32 / 0.0820.32 / 0.0820.32 / 0.0820.32 / 0.082trained on this dataset's public images; not a zero-shot result
selective-igev-eth3d-finetuneMiddlebury 2014 trainingH, bad > 2 px % / EPE12.33 / 2.81312.33 / 2.80812.33 / 2.80712.33 / 2.81112.34 / 2.811
selective-igev-eth3d-trainETH3D two-view train, bad > 1 px % / EPE0.78 / 0.1370.78 / 0.1370.78 / 0.1370.78 / 0.1370.78 / 0.137trained on this dataset's public images; not a zero-shot result
selective-igev-eth3d-trainMiddlebury 2014 trainingH, bad > 2 px % / EPE7.96 / 2.1587.97 / 2.1537.99 / 2.1617.96 / 2.1508.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.

variantkernels error vs original, mean / p99GPU, torchkernels used
selective-igev-sceneflow0.00076 / 0.00407RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120
selective-igev-kitti120.00076 / 0.00226RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120
selective-igev-kitti150.00051 / 0.00166RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120
selective-igev-middlebury-finetune0.00102 / 0.00544RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120
selective-igev-middlebury-train0.0027 / 0.02007RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120
selective-igev-eth3d-finetune0.00127 / 0.005RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120
selective-igev-eth3d-train0.00115 / 0.00565RTX 5060 Ti, torch 2.14.1+cu130cudnn_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).

Left view
Right view
Output
Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), left view
Left view · 100%

Input: Motorcycle, Middlebury 2014 stereo (left and right view, downscaled 4x), Scharstein et al., Middlebury College (research dataset, no licence stated).