Cas-GwcNet
Alibaba's cascade version of GwcNet: two cost-volume stages, the second narrowed around the first disparity. Trained on synthetic data. Commercially usable.
Commercial use: yes.
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
cas-gwcnet-gc-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels | 862 567 472 358 | 10079 / 10652 8317 / 8730 2338 / 2794 2272 / 2514 |
cas-gwcnet-c-sceneflow | Middlebury 2014 half (994x1482) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 656 389 327 225 295 220 | 4816 / 5534 2791 / 2970 2006 / 2474 1725 / 1930 2098 / 2448 1440 (engine) |
Details
- Original code: https://github.com/alibaba/cascade-stereo at
2ae7da65515c - Code licence: MIT (permissive); files:
LICENSE - Weights licence: MIT (assumed from code)
- Licence evidence: https://github.com/alibaba/cascade-stereo/blob/2ae7da65515c82025383a0fbee8d6fe063dc7101/CasStereoNet/README.md#L17-L19
- Training data: Freiburg SceneFlow (FlyingThings3D, Driving, Monkaa)
- Kernel libraries:
igev,cutlass_conv,cudnn_hacc - Variants:
cas-gwcnet-gc-sceneflow,cas-gwcnet-c-sceneflow - Outputs: disparity
- Input size:
cas-gwcnet-gc-sceneflow: any H x W >= 32, padded to a multiple of 32cas-gwcnet-c-sceneflow: any H x W >= 225, padded to a multiple of 32
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
cas-gwcnet-gc-sceneflow1988x2880 (9.4 GiB peak allocated, 14.1 reserved);cas-gwcnet-c-sceneflow1988x2880 (8.2 GiB peak allocated, 9.2 reserved) cas-gwcnet-c-sceneflow994x1482, first call: portable + torch.compile 62 s (cold Inductor cache), TensorRT fp16 131 s (ONNX + engine).cas-gwcnet-gc-scenefloworiginal 994x1482: torch.autocast(float16) around the callcas-gwcnet-c-scenefloworiginal 994x1482: torch.autocast(fp16) around the forwardcas-gwcnet-gc-sceneflowload / first call: original 0.39 s / 0.636 s, portable 0.97 s / 0.472† s, kernels 0.17† s / 0.358† scas-gwcnet-c-sceneflowload / first call: original 0.48 s / 0.415 s (375x1242), portable 1.29 s / 0.327† s, kernels 0.18† s / 0.226† 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 |
|---|---|---|---|---|---|---|
cas-gwcnet-gc-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 8.08 / 0.821 | 99.90 / 13.127 (NaN / inf output) | 8.08 / 0.823 | 8.09 / 0.823 | |
cas-gwcnet-gc-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 23.83 / 6.541 | 99.80 / 70.838 (NaN / inf output) | 23.84 / 6.547 | 23.83 / 6.541 | |
cas-gwcnet-c-sceneflow | ETH3D two-view train, bad > 1 px % / EPE | 7.85 / 0.512 | 7.83 / 0.513 | 7.84 / 0.512 | 7.85 / 0.513 | |
cas-gwcnet-c-sceneflow | Middlebury 2014 trainingH, bad > 2 px % / EPE | 30.07 / 8.568 | 29.90 / 8.490 | 30.07 / 8.569 | 30.07 / 8.574 |
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 |
|---|---|---|---|
cas-gwcnet-gc-sceneflow | 0.00441 / 0.07446 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |
cas-gwcnet-c-sceneflow | 0.00354 / 0.02642 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120 |