CFNet
A stereo network with cascaded and fused cost volumes, trained on synthetic data. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
cfnet-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 659 545 484 401 249 171 | 8551 / 8896 6765 / 7880 3441 / 4376 3662 / 4718 1026 / 1398 1238 (engine) |
Details
- Original code: https://github.com/gallenszl/CFNet at
982230dd3605 - Code licence: MIT (permissive); files:
LICENSE - Weights licence: MIT (assumed from code)
- Licence evidence: https://github.com/gallenszl/CFNet/blob/982230dd360583fc35743d0b7ed528982fe5fd38/README.md#L72
- Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
- Kernel libraries:
igev,cutlass_conv,cudnn_hacc - Variants:
cfnet-sceneflow - Outputs: disparity
- Input size: any H x W >= 64, padded to a multiple of 64
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
cfnet-sceneflow1988x2880 (8.2 GiB peak allocated, 11.5 reserved) cfnet-sceneflow994x1482, first call: portable + torch.compile 53 s (cold Inductor cache), TensorRT fp16 139 s (ONNX + engine).cfnet-scenefloworiginal 994x1482: torch.autocast(float16) around the callcfnet-sceneflowload / first call: original 0.55 s / 0.56 s, portable 0.94 s / 0.484† s, kernels 0.21† s / 0.402† 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 |
|---|---|---|---|---|---|---|
cfnet-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 5.59 / 0.417 | 99.92 / 13.132 (NaN / inf output) | 5.59 / 0.417 | 5.60 / 0.416 | |
cfnet-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 21.31 / 6.445 | 100.00 / 71.272 (NaN / inf output) | 21.32 / 6.447 | 21.32 / 6.444 |
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.05 px and p99 <= 0.5 px.
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
cfnet-sceneflow | 0.00193 / 0.0126 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |