Models · Stereo matching

NMRF

A stereo network from the CUHK T-Stone Robotics Institute that treats matching as Markov random field inference. Commercially usable.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
nmrf-sceneflowMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
445
313
216
196
161
184
2300 / 2426
1656 / 2054
1510 / 1552
1022 / 1112
854 / 1104
826 (engine)
Details
  • Original code: https://github.com/aeolusguan/NMRF at a50bd8f407ae
  • Code licence: MIT (permissive); files: LICENSE
  • Weights licence: MIT (assumed from code)
  • Licence evidence: https://github.com/aeolusguan/NMRF/blob/a50bd8f407ae481c38f95cf141e1b5256e962cb7/README.md#L103
  • Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
  • Kernel libraries: fastbb
  • Variants: nmrf-sceneflow
  • Outputs: disparity
  • Input size: any H x W >= 9, padded to a multiple of 8
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): nmrf-sceneflow 3000x4000 (11.0 GiB peak allocated, 13.3 reserved)
  • nmrf-sceneflow 994x1482, first call: portable + torch.compile 85 s (cold Inductor cache), TensorRT fp16 142 s (ONNX + engine).
  • nmrf-sceneflow original 994x1482: torch.autocast(fp16) around the forward
  • nmrf-sceneflow load / first call: original 0.21 s / 0.766 s (375x1242), portable 0.1 s / 0.218† s, kernels 0.07† s / 0.197† 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
nmrf-sceneflowETH3D two-view train, bad > 1 px % / EPE3.78 / 0.3113.81 / 0.3123.81 / 0.3113.81 / 0.311
nmrf-sceneflowMiddlebury 2014 trainingH, bad > 2 px % / EPE13.36 / 2.92013.35 / 2.91413.35 / 2.91513.35 / 2.915

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 468fba10, 2026-11-05.

Parity

CPU, float32: max |diff| <= 0.05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.05 px and p99 <= 0.5 px. On real pairs up to 720x1280 the limits are mean 0.1 / p99 1.5 (precision-sensitive there, see Limitations).

variantkernels error vs original, mean / p99GPU, torchkernels used
nmrf-sceneflow0.00236 / 0.03745RTX 5060 Ti, torch 2.14.1+cu130fastbb@7d058322634d:sm_120