Models · Stereo matching

MoCha-Stereo

A stereo network by Ziyang Chen et al. that adds motif channel attention to an IGEV-style volume. Commercially usable.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
mocha-v1-sceneflowMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
2148
1456
1057
455
4140 / 4598
3637 / 3982
1632 / 1770
1588 / 1730
mocha-v2-sceneflowMiddlebury 2014 half (994x1482)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
2054
1295
1033
448
713
437
4017 / 4418
3576 / 3982
1632 / 1770
1587 / 1790
1122 / 1308
1098 (engine)
Details
  • Original code: https://github.com/ZYangChen/MoCha-Stereo at 78c5889c467f
  • Code licence: MIT (permissive); files: LICENSE
  • Weights licence: MIT (assumed from code)
  • Licence evidence: https://github.com/ZYangChen/MoCha-Stereo/blob/78c5889c467fe31414c9425f1280afc0a8f6c1a0/README.md#L69
  • Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
  • Options: iters = 32 (>= 1)
  • Kernel libraries: igev, mocha, cutlass_conv, cudnn_hacc
  • Variants: mocha-v1-sceneflow, mocha-v2-sceneflow
  • 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): mocha-v1-sceneflow 3000x4000 (12.2 GiB peak allocated, 15.2 reserved); mocha-v2-sceneflow 3000x4000 (12.2 GiB peak allocated, 14.8 reserved)
  • mocha-v2-sceneflow 994x1482, first call: portable + torch.compile 148 s (cold Inductor cache), TensorRT fp16 361 s (ONNX + engine).
  • mocha-v1-sceneflow load / first call: original 1.95 s / 1.846 s (375x1242), portable 0.79 s / 1.057† s, kernels 0.48† s / 0.454† s
  • mocha-v2-sceneflow load / first call: original 2.37 s / 0.399 s (375x1242), portable 1.3 s / 1.033† s, kernels 0.45† s / 0.447† 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
mocha-v1-sceneflowETH3D two-view train, bad > 1 px % / EPE4.35 / 1.0874.35 / 1.0844.35 / 1.0854.35 / 1.088
mocha-v1-sceneflowMiddlebury 2014 trainingH, bad > 2 px % / EPE9.56 / 2.5849.57 / 2.5829.57 / 2.5889.56 / 2.588
mocha-v2-sceneflowETH3D two-view train, bad > 1 px % / EPE3.84 / 0.8923.83 / 0.8853.83 / 0.8873.82 / 0.886
mocha-v2-sceneflowMiddlebury 2014 trainingH, bad > 2 px % / EPE10.76 / 2.83810.78 / 2.84310.73 / 2.84410.77 / 2.833

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
mocha-v1-sceneflow0.00086 / 0.00467RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, mocha@757b90f1dbe1:sm_120
mocha-v2-sceneflow0.00074 / 0.0025RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, mocha@757b90f1dbe1:sm_120