Download README.md from fastforks/selective-igev: direct link, hf CLI and curl.
- Browser
- Download file 12.1 kB
-
https://huggingface.co/fastforks/selective-igev/resolve/main/README.md
- Command line
-
hf download hf://fastforks/selective-igev/README.md
-
curl -L -o README.md https://huggingface.co/fastforks/selective-igev/resolve/main/README.md
library_name: fastforks
pipeline_tag: depth-estimation
license: other
license_name: mit-code-weights-unstated
license_link: >-
https://github.com/Windsrain/Selective-Stereo/blob/c39acbfef9fbe36fbc01efa4abeafc62bbe2da36/README.md#L25
tags:
- stereo
- stereo-matching
- disparity
- cuda
- pytorch
- fastforks
Selective-IGEV (fastforks)
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.
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/Windsrain/Selective-Stereo at c39acbfef9fb.
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.
| variant | weights (author link) | SHA-256 | weights licence | commercial use |
|---|---|---|---|---|
selective-igev-eth3d-finetune@1 |
eth3d_finetune.pth | 29d62b91c58e |
MIT (assumed from code) | yes |
selective-igev-eth3d-train@1 |
eth3d_train.pth | 989327ad0220 |
MIT (assumed from code) | yes |
selective-igev-kitti12@1 |
kitti12.pth | 3a9ed6f2e778 |
MIT (assumed from code) | yes |
selective-igev-kitti15@1 |
kitti15.pth | 488254b5cfbf |
MIT (assumed from code) | yes |
selective-igev-middlebury-finetune@1 |
middlebury_finetune.pth | ce019e97bbe8 |
MIT (assumed from code) | yes |
selective-igev-middlebury-train@1 |
middlebury_train.pth | a51f67029d77 |
MIT (assumed from code) | yes |
selective-igev-sceneflow@1 |
sceneflow.pth | 27286b184d68 |
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/Windsrain/Selective-Stereo/blob/c39acbfef9fbe36fbc01efa4abeafc62bbe2da36/README.md#L25
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-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 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-sceneflow 3000x4000 (10.3 GiB peak allocated, 14.0 reserved)
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 |
|---|---|---|---|---|---|---|---|---|---|
selective-igev-eth3d-finetune |
2201.3 | 1455.0 | 998.4 | 348.76 | 4.2x | 2.9x | 2013 / 2152 | 1238 / 1488 | 1109 / 1390 |
Startup and first call
| model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
|---|---|---|---|---|---|---|
selective-igev-eth3d-finetune |
0.36 (375x1242) | 0.50 | 0.14† | 2.25 (375x1242) | 1.02† | 0.35† |
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) |
|---|---|---|---|---|---|---|---|---|---|---|
selective-igev-eth3d-finetune |
994x1482 | 998.4 | 690.7 | 125.8 | 460.8 | 256 | 348.76 | 1238 / 1488 | 919 / 1088 | 1148 |
Fixed-size speed and peak memory, all models
| model | mode | 640x480 | 1280x720 | 1920x1080 | 12 MP 4000x3000 |
|---|---|---|---|---|---|
selective-igev-eth3d-finetune |
portable | 190.5 ms / 282 / 362 | 575.3 ms / 769 / 1036 | 1420.2 ms / 1690 / 2030 | 8918.7 ms (n=3) / 10549 / 14320 |
selective-igev-eth3d-finetune |
kernels | 82.5 ms / 260 / 368 | 212.8 ms / 693 / 1010 | 472.5 ms / 1502 / 2046 | 2806.7 ms (n=3) / 6928 / 8800 |
selective-igev-eth3d-train |
portable | 190.5 ms / 282 / 362 | 575.3 ms / 769 / 1036 | 1420.4 ms / 1690 / 2030 | 8919.8 ms (n=3) / 10549 / 14320 |
selective-igev-eth3d-train |
kernels | 82.4 ms / 260 / 368 | 212.8 ms / 693 / 1010 | 472.6 ms / 1502 / 2046 | 2807.0 ms (n=3) / 6928 / 8800 |
selective-igev-kitti12 |
portable | 190.6 ms / 282 / 362 | 575.3 ms / 769 / 1036 | 1420.5 ms / 1690 / 2030 | 8917.7 ms (n=3) / 10549 / 14320 |
selective-igev-kitti12 |
kernels | 82.3 ms / 260 / 368 | 212.9 ms / 693 / 1010 | 471.9 ms / 1502 / 2046 | 2803.4 ms (n=3) / 6928 / 8800 |
selective-igev-kitti15 |
portable | 190.6 ms / 282 / 362 | 575.3 ms / 769 / 1036 | 1420.8 ms / 1690 / 2030 | 8918.8 ms (n=3) / 10549 / 14320 |
selective-igev-kitti15 |
kernels | 82.5 ms / 260 / 368 | 212.8 ms / 693 / 1010 | 471.9 ms / 1502 / 2046 | 2803.9 ms (n=3) / 6928 / 8800 |
selective-igev-middlebury-finetune |
portable | 190.6 ms / 282 / 362 | 575.6 ms / 769 / 1036 | 1420.8 ms / 1690 / 2030 | 8923.1 ms (n=3) / 10549 / 14320 |
selective-igev-middlebury-finetune |
kernels | 82.3 ms / 260 / 368 | 212.6 ms / 693 / 1010 | 472.1 ms / 1502 / 2046 | 2804.4 ms (n=3) / 6928 / 8800 |
selective-igev-middlebury-train |
portable | 190.7 ms / 282 / 362 | 575.4 ms / 769 / 1036 | 1420.5 ms / 1690 / 2030 | 8921.4 ms (n=3) / 10549 / 14320 |
selective-igev-middlebury-train |
kernels | 82.5 ms / 260 / 368 | 213.1 ms / 693 / 1010 | 472.4 ms / 1502 / 2046 | 2804.8 ms (n=3) / 6928 / 8800 |
selective-igev-sceneflow |
portable | 190.6 ms / 282 / 362 | 575.4 ms / 769 / 1036 | 1420.3 ms / 1690 / 2030 | 8917.6 ms (n=3) / 10549 / 14320 |
selective-igev-sceneflow |
kernels | 82.5 ms / 260 / 368 | 213.5 ms / 693 / 1010 | 473.3 ms / 1502 / 2046 | 2808.4 ms (n=3) / 6928 / 8800 |
Apple silicon (MPS)
| model | portable |
kernels |
speed-up |
|---|---|---|---|
selective-igev-sceneflow |
2292 ms / 1727 MiB (float16) | 1878 ms / 1704 MiB | 1.22x |
Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
selective-igev-eth3d-train,selective-igev-kitti12,selective-igev-kitti15,selective-igev-middlebury-finetune,selective-igev-middlebury-train,selective-igev-sceneflow: same network and settings asselective-igev-eth3d-finetune, measured once (rows not repeated).
Hardware, protocol and caveats: benchmarks (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
On public datasets
Original = the authors' code, same checkpoint and protocol.
| variant | dataset | original | portable | kernels | note |
|---|---|---|---|---|---|
selective-igev-sceneflow |
ETH3D two-view train, bad > 1 px % / EPE | 6.07 / 1.430 | 6.05 / 1.407 | 6.07 / 1.415 | |
selective-igev-sceneflow |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 11.78 / 2.584 | 11.80 / 2.587 | 11.79 / 2.585 | |
selective-igev-kitti12 |
ETH3D two-view train, bad > 1 px % / EPE | 24.07 / 3.647 | 24.07 / 3.660 | ||
selective-igev-kitti12 |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 20.08 / 4.845 | 20.10 / 4.862 | ||
selective-igev-kitti15 |
ETH3D two-view train, bad > 1 px % / EPE | 24.26 / 2.442 | 24.26 / 2.447 | ||
selective-igev-kitti15 |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 19.65 / 4.956 | 19.64 / 4.942 | ||
selective-igev-middlebury-finetune |
ETH3D two-view train, bad > 1 px % / EPE | 24.26 / 0.995 | 24.24 / 0.995 | ||
selective-igev-middlebury-finetune |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 5.66 / 1.208 | 5.66 / 1.192 | 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.24 / 0.433 | 10.26 / 0.433 | ||
selective-igev-middlebury-train |
Middlebury 2014 trainingH, bad > 2 px % / EPE | 5.95 / 1.434 | 5.99 / 1.436 | 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 | 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.811 | 12.35 / 2.811 | ||
selective-igev-eth3d-train |
ETH3D two-view train, bad > 1 px % / EPE | 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.99 / 2.162 | 8.01 / 2.156 |
Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, 2026-10-27.
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
- ONNX export needs torch >= 2.14 (older exporters fail on this network).
Usage
from fastforks import stereo
model = stereo.load("selective-igev-eth3d-finetune") # 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: selective-igev-eth3d-finetune, selective-igev-eth3d-train, selective-igev-kitti12, selective-igev-kitti15, selective-igev-middlebury-finetune, selective-igev-middlebury-train, selective-igev-sceneflow.
Kernels backend
stereo.load("selective-igev-eth3d-finetune", mode="kernels") runs our CUDA kernels (igev, 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.