CCNet: Criss-Cross Attention for Semantic Segmentation
Zilong HuangXinggang WangLichao HuangChang HuangYunchao WeiHumphrey ShiWenyu Liu
Introduces CCNet, a criss-cross attention network that captures global visual context for semantic segmentation while reducing GPU memory usage by eleven times and computation by 85 percent compared to standard non-local blocks.
Semantic segmentation assigns class labels to every pixel in an image and supports key applications such as autonomous driving and remote sensing. Conventional fully convolutional networks capture only local context, which reduces accuracy, while prior attention methods that gather full-image context incur high computational and memory costs that limit practical use.
The work set out to deliver full-image contextual information for semantic segmentation at far lower cost than existing attention mechanisms. The authors introduced the Criss-Cross Network (CCNet), which replaces dense attention with a recurrent criss-cross attention module. Each pixel aggregates information only along its horizontal and vertical paths; two successive modules allow every pixel to reach all other pixels. A category-consistent loss further encourages discriminative features, and the module extends naturally to three-dimensional video data.
Extensive experiments on Cityscapes, ADE20K, LIP, CamVid, and COCO show that CCNet reaches new state-of-the-art mean intersection-over-union scores of 81.9 percent, 45.76 percent, and 55.47 percent on the respective test or validation sets. The recurrent criss-cross module uses roughly one-eleventh the GPU memory and 85 percent fewer floating-point operations than a non-local block while still delivering higher accuracy. Adding the category-consistent loss yields an additional 0.7-point gain, and the same module improves instance segmentation when inserted into Mask R-CNN.
These results indicate that dense prediction tasks can obtain global context without prohibitive resource demands, lowering barriers to deployment on edge devices and in real-time systems. The approach also generalizes across image and video segmentation benchmarks.
The source code is publicly released, enabling immediate integration into existing fully convolutional pipelines. Further work could explore larger-scale video datasets and hardware-specific optimizations. The main limitations are that performance gains were measured on standard academic benchmarks rather than production-scale data, and the method still requires careful hyper-parameter tuning of the loss weights. Overall, the evidence supports confident adoption for accuracy-critical segmentation workloads where memory or compute budgets are constrained.
- Paper: Non-local Neural Networks, Xiaolong Wang et al. (2018). Reading non-local neural networks first provides the essential background on non-local attention operations that CCNet adapts and makes more efficient via criss-cross paths.
- Paper: Dual Attention Network for Scene Segmentation, Jun Fu et al. (2019). This paper extends the contextual attention paradigm by introducing parallel position and channel attention modules for scene segmentation.
