Context-Aware Semantic Segmentation via Stage-Wise Attention
Antoine Carreaud, Elias Naha, Arthur Chansel, Nina Lahellec, Jan Skaloud, Adrien Gressin
TL;DR
The paper tackles RGB-only semantic segmentation of ultra-high-resolution aerial imagery, addressing the memory bottlenecks of transformers by introducing CASWiT, a dual-branch Swin-based architecture that injects global context into high-resolution features via stage-wise cross-attention. It couples a supervised objective with an auxiliary low-resolution loss and leverages a SimMIM-style self-supervised pretraining on unlabeled orthophotos to enhance cross-scale learning. Empirical results on FLAIR-HUB and URUR demonstrate state-of-the-art RGB-only performance and strong boundary quality, with SSL and augmentation yielding notable gains ($mIoU$ up to $65.83\%$ on FLAIR-HUB and $49.1\%$ on URUR). The work offers a practical RGB-only UHR segmentation solution with robust cross-scale representations and broad applicability in remote sensing tasks, along with public code and pretrained weights for reproducibility.
Abstract
Semantic ultra high resolution image (UHR) segmentation is essential in remote sensing applications such as aerial mapping and environmental monitoring. Transformer-based models struggle in this setting because memory grows quadratically with token count, constraining either the contextual scope or the spatial resolution. We introduce CASWiT (Context-Aware Stage-Wise Transformer), a dual-branch, Swin-based architecture that injects global cues into fine-grained UHR features. A context encoder processes a downsampled neighborhood to capture long-range dependencies, while a high resolution encoder extracts detailed features from UHR patches. A cross-scale fusion module, combining cross-attention and gated feature injection, enriches high-resolution tokens with context. Beyond architecture, we propose a SimMIM-style pretraining. We mask 75% of the high-resolution image tokens and the low-resolution center region that spatially corresponds to the UHR patch, then train the shared dual-encoder with small decoder to reconstruct the UHR initial image. Extensive experiments on the large-scale IGN FLAIR-HUB aerial dataset demonstrate the effectiveness of CASWiT. Our method achieves 65.83% mIoU, outperforming RGB baselines by 1.78 points. On URUR, CASWiT achieves 49.1% mIoU, surpassing the current SoTA by +0.9% under the official evaluation protocol. All codes are provided on: https://huggingface.co/collections/heig-vd-geo/caswit.
