RAFT-Stereo
A recurrent stereo network from the Princeton Vision & Learning Lab, with checkpoints for several datasets. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
raft-stereo-middlebury | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 1775 1037 746 273 | 4825 / 4928 2516 / 2628 1388 / 1492 765 / 802 |
Details
- Original code: https://github.com/princeton-vl/RAFT-Stereo at
6e93ed2169bd - Code licence: MIT (permissive); files:
LICENSE - Weights licence: MIT (assumed from code)
- Licence evidence: https://github.com/princeton-vl/RAFT-Stereo/blob/6e93ed2169bd858dbb43033988563f3b0bb49506/README.md#L79
- Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
raft-stereo-middlebury: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa), Middlebury stereo (2014) (SceneFlow, then fine-tuned on the 23 Middlebury 2014 training scenes)raft-stereo-eth3d: ETH3D submission model
- Options:
iters= 32 (>= 1) - Kernel libraries:
raft,cutlass_conv,cudnn_hacc - Variants:
raft-stereo-middlebury,raft-stereo-sceneflow,raft-stereo-eth3d - 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):
raft-stereo-middlebury3000x4000 (10.2 GiB peak allocated, 12.5 reserved);raft-stereo-sceneflow3000x4000 (10.2 GiB peak allocated, 12.5 reserved);raft-stereo-eth3d3000x4000 (10.2 GiB peak allocated, 12.5 reserved) raft-stereo-sceneflow,raft-stereo-eth3d: same network and settings asraft-stereo-middlebury, measured once (rows not repeated).raft-stereo-middleburyoriginal (fp32) 994x1482, original 994x1482: timed with raft-stereo-eth3d (same network, other weights); corr_implementation=reg_cudaraft-stereo-middleburyportable 994x1482, kernels 994x1482: measured on raft-stereo-eth3d (same architecture, other checkpoint)raft-stereo-middleburyload / first call: original 0.27 s / 1.452 s (375x1242), portable 0.25 s / 0.746† s, kernels 0.05† s / 0.273† sraft-stereo-sceneflowload / first call: original 0.27 s / 1.452 s (375x1242), portable 0.25 s / 0.746† s, kernels 0.05† s / 0.273† sraft-stereo-eth3dload / first call: original 0.27 s / 1.452 s (375x1242), portable 0.25 s / 0.746† s, kernels 0.05† s / 0.273† 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, 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
Measured
Original = the original code named under Details, same checkpoint and protocol.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
raft-stereo-middlebury | ETH3D two-view train, bad > 1 px % / EPE | 2.77 / 0.287 | 2.77 / 0.289 | 2.77 / 0.289 | 2.79 / 0.289 | |
raft-stereo-middlebury | Middlebury 2014 trainingH, bad > 2 px % / EPE | 7.20 / 1.069 | 7.19 / 1.069 | 7.20 / 1.069 | 7.21 / 1.071 | trained on this dataset's public images; not a zero-shot result |
raft-stereo-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 2.61 / 0.266 | 2.61 / 0.267 | 2.60 / 0.267 | 2.60 / 0.267 | |
raft-stereo-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 11.22 / 1.436 | 11.21 / 1.439 | 11.23 / 1.438 | 11.23 / 1.452 | |
raft-stereo-eth3d | ETH3D two-view train, bad > 1 px % / EPE | 2.61 / 0.274 | 2.60 / 0.274 | 2.60 / 0.274 | 2.61 / 0.274 | possibly in the training data |
raft-stereo-eth3d | Middlebury 2014 trainingH, bad > 2 px % / EPE | 11.95 / 1.635 | 11.99 / 1.634 | 12.00 / 1.635 | 11.98 / 1.635 | possibly in the training data |
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 |
|---|---|---|---|
raft-stereo-middlebury | 0.00836 / 0.07899 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, raft@9524a68234cc:sm_120 |
raft-stereo-sceneflow | 0.0019 / 0.01941 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, raft@9524a68234cc:sm_120 |
raft-stereo-eth3d | 0.00166 / 0.01285 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, raft@9524a68234cc:sm_120 |
Limitations
- raftstereo-realtime.pth and iraftstereo_rvc.pth from the original zip (another architecture / instance-norm context) are not included and not supported by the kernels engine.