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.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
mocha-v1-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 2148 1456 1057 455 | 4140 / 4598 3637 / 3982 1632 / 1770 1588 / 1730 |
mocha-v2-sceneflow | Middlebury 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-sceneflow3000x4000 (12.2 GiB peak allocated, 15.2 reserved);mocha-v2-sceneflow3000x4000 (12.2 GiB peak allocated, 14.8 reserved) mocha-v2-sceneflow994x1482, first call: portable + torch.compile 148 s (cold Inductor cache), TensorRT fp16 361 s (ONNX + engine).mocha-v1-sceneflowload / first call: original 1.95 s / 1.846 s (375x1242), portable 0.79 s / 1.057† s, kernels 0.48† s / 0.454† smocha-v2-sceneflowload / 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.
| variant | dataset | original fp32 | original fp16 | portable | kernels | note |
|---|---|---|---|---|---|---|
mocha-v1-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 4.35 / 1.087 | 4.35 / 1.084 | 4.35 / 1.085 | 4.35 / 1.088 | |
mocha-v1-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 9.56 / 2.584 | 9.57 / 2.582 | 9.57 / 2.588 | 9.56 / 2.588 | |
mocha-v2-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 3.84 / 0.892 | 3.83 / 0.885 | 3.83 / 0.887 | 3.82 / 0.886 | |
mocha-v2-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 10.76 / 2.838 | 10.78 / 2.843 | 10.73 / 2.844 | 10.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.
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
mocha-v1-sceneflow | 0.00086 / 0.00467 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, mocha@757b90f1dbe1:sm_120 |
mocha-v2-sceneflow | 0.00074 / 0.0025 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, mocha@757b90f1dbe1:sm_120 |