GwcNet
A classic stereo network by Xiaoyang Guo et al. that builds a group-wise correlation cost volume. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
gwcnet-gc-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 632 365 353 257 | 8252 / 8822 5887 / 6214 2082 / 2402 1768 / 1962 |
gwcnet-g-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 604 352 344 238 417 275 | 6691 / 7280 5105 / 5414 2081 / 2402 1799 / 2102 1527 / 1864 3548 (engine) |
Details
- Original code: https://github.com/xy-guo/GwcNet at
0987074f48b0 - Code licence: MIT (permissive); files:
LICENSE - Weights licence: MIT (assumed from code)
- Licence evidence: https://github.com/xy-guo/GwcNet/blob/0987074f48b098c6e975a58ca5aacf233b0fb0eb/README.md#L27
- Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
- Kernel libraries:
igev,cutlass_conv,cudnn_hacc - Variants:
gwcnet-gc-sceneflow,gwcnet-g-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):
gwcnet-gc-sceneflow3000x4000 (13.6 GiB peak allocated, 13.7 reserved);gwcnet-g-sceneflow3000x4000 (13.3 GiB peak allocated, 14.8 reserved) gwcnet-g-sceneflow994x1482, first call: portable + torch.compile 53 s (cold Inductor cache), TensorRT fp16 66 s (ONNX + engine).gwcnet-gc-scenefloworiginal 994x1482: torch.autocast(fp16) around the forwardgwcnet-g-scenefloworiginal 994x1482: torch.autocast(fp16) around the forwardgwcnet-gc-sceneflowload / first call: original 0.29 s / 0.119 s (375x1242), portable 0.39 s / 0.353† s, kernels 0.44† s / 0.258† sgwcnet-g-sceneflowload / first call: original 0.26 s / 0.46 s (375x1242), portable 0.4 s / 0.344† s, kernels 0.14† s / 0.238† 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 |
|---|---|---|---|---|---|---|
gwcnet-gc-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 10.97 / 1.794 | 10.97 / 1.794 | 10.95 / 1.787 | 10.96 / 1.793 | |
gwcnet-gc-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 25.63 / 6.967 | 25.63 / 6.970 | 25.63 / 6.968 | 25.63 / 6.974 | |
gwcnet-g-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 9.60 / 0.620 | 9.60 / 0.622 | 9.60 / 0.624 | 9.59 / 0.621 | |
gwcnet-g-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 25.84 / 6.712 | 25.84 / 6.714 | 25.84 / 6.713 | 25.84 / 6.713 |
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 |
|---|---|---|---|
gwcnet-gc-sceneflow | 0.00494 / 0.01739 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
gwcnet-g-sceneflow | 0.00375 / 0.01272 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
Limitations
- The original code's KITTI 2012 / 2015 fine-tuned weights are not included.
- The dominant 3D convolutions run in cuDNN in both modes, so kernels gains less over portable than for other stereo models. Portable is slightly slower than the original code at 994x1482 but allocates less than half the memory.