CoEx
A stereo network on a MobileNetV2 backbone with guided cost excitation (correlate and excite). Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
coex-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 94.9 60.0 49.9 23.5 29.4 20.6 | 2292 / 2384 2098 / 2160 1136 / 1254 495 / 886 351 / 452 360 (engine) |
Details
- Original code: https://github.com/antabangun/coex at
a98b37d33f37 - Code licence: GPL-3.0-only (copyleft); files:
LICENSE - Weights licence: GPL-3.0-only (assumed from code)
- Licence evidence: https://github.com/antabangun/coex/blob/a98b37d33f37754582b1e71f38216af8c69f2347/LICENSE
- Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
- Licence note: The code is GPL-3.0 (copyleft) and ships in the separate fastforks-nc distribution (
pip install 'fastforks-core[nc]'); the authors state no weights licence. - Options:
cuda_graphs= True (speed only) - Kernel libraries:
igev,cutlass_conv,cudnn_hacc,stereo_ops - Variants:
coex-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):
coex-sceneflow3000x4000 (8.5 GiB peak allocated, 10.7 reserved) coex-sceneflow994x1482, first call: portable + torch.compile 22 s (cold Inductor cache), TensorRT fp16 57 s (ONNX + engine).coex-scenefloworiginal 994x1482: torch.autocast(fp16) around the forwardcoex-sceneflowload / first call: original – s / 0.629 s (375x1242), portable 0.16 s / 0.062† s, kernels 0.09† s / 0.036† 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 |
|---|---|---|---|---|---|---|
coex-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 33.43 / 16.021 | 33.46 / 15.995 | 33.46 / 15.989 | 33.46 / 16.000 | |
coex-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 32.25 / 7.417 | 32.24 / 7.418 | 32.32 / 7.428 | 32.31 / 7.421 |
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 |
|---|---|---|---|
coex-sceneflow | 0.00104 / 0.00449 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, stereo_ops@899b54f4a755:sm_120 |
Limitations
- SceneFlow-only weights: zero-shot output on real images is poor, so this is mainly a latency reference.
- The original code's KITTI weights (in its git repository) are not included.