Models · Stereo matching

RAFT-Stereo

A recurrent stereo network from the Princeton Vision & Learning Lab, with checkpoints for several datasets. Commercially usable.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
raft-stereo-middleburyMiddlebury 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-middlebury 3000x4000 (10.2 GiB peak allocated, 12.5 reserved); raft-stereo-sceneflow 3000x4000 (10.2 GiB peak allocated, 12.5 reserved); raft-stereo-eth3d 3000x4000 (10.2 GiB peak allocated, 12.5 reserved)
  • raft-stereo-sceneflow, raft-stereo-eth3d: same network and settings as raft-stereo-middlebury, measured once (rows not repeated).
  • raft-stereo-middlebury original (fp32) 994x1482, original 994x1482: timed with raft-stereo-eth3d (same network, other weights); corr_implementation=reg_cuda
  • raft-stereo-middlebury portable 994x1482, kernels 994x1482: measured on raft-stereo-eth3d (same architecture, other checkpoint)
  • raft-stereo-middlebury load / first call: original 0.27 s / 1.452 s (375x1242), portable 0.25 s / 0.746† s, kernels 0.05† s / 0.273† s
  • raft-stereo-sceneflow load / first call: original 0.27 s / 1.452 s (375x1242), portable 0.25 s / 0.746† s, kernels 0.05† s / 0.273† s
  • raft-stereo-eth3d load / 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.

variantdatasetoriginal fp32original fp16portablekernelsnote
raft-stereo-middleburyETH3D two-view train, bad > 1 px % / EPE2.77 / 0.2872.77 / 0.2892.77 / 0.2892.79 / 0.289
raft-stereo-middleburyMiddlebury 2014 trainingH, bad > 2 px % / EPE7.20 / 1.0697.19 / 1.0697.20 / 1.0697.21 / 1.071trained on this dataset's public images; not a zero-shot result
raft-stereo-sceneflowETH3D two-view train, bad > 1 px % / EPE2.61 / 0.2662.61 / 0.2672.60 / 0.2672.60 / 0.267
raft-stereo-sceneflowMiddlebury 2014 trainingH, bad > 2 px % / EPE11.22 / 1.43611.21 / 1.43911.23 / 1.43811.23 / 1.452
raft-stereo-eth3dETH3D two-view train, bad > 1 px % / EPE2.61 / 0.2742.60 / 0.2742.60 / 0.2742.61 / 0.274possibly in the training data
raft-stereo-eth3dMiddlebury 2014 trainingH, bad > 2 px % / EPE11.95 / 1.63511.99 / 1.63412.00 / 1.63511.98 / 1.635possibly 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.

variantkernels error vs original, mean / p99GPU, torchkernels used
raft-stereo-middlebury0.00836 / 0.07899RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, raft@9524a68234cc:sm_120
raft-stereo-sceneflow0.0019 / 0.01941RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, raft@9524a68234cc:sm_120
raft-stereo-eth3d0.00166 / 0.01285RTX 5060 Ti, torch 2.14.1+cu130cudnn_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.