UrbanSAM: Learning Invariance-Inspired Adapters for Segment Anything Models in Urban Construction
Chenyu Li, Danfeng Hong, Bing Zhang, Yuxuan Li, Gustau Camps-Valls, Xiao Xiang Zhu, Jocelyn Chanussot
TL;DR
UrbanSAM presents invariance-inspired learnable adapters integrated with Segment Anything Model to address scale variation and morphological heterogeneity in global urban remote sensing segmentation. Grounded in multi-resolution analysis, it learns scale-invariant features via U-Scaling adapters and transfers this knowledge to the encoder through cross-alignment, enabling learnable prompts without manual intervention. The approach combines a four-module U-Scaling adapter, cross-branch masked attention, a hierarchical consistency decoder, and LoRA-based fine-tuning, achieving state-of-the-art results on water, road, and building tasks with notable parameter efficiency. The work offers significant potential for scalable urban area mapping and change detection across diverse geographies and data sources.
Abstract
Object extraction and segmentation from remote sensing (RS) images is a critical yet challenging task in urban environment monitoring. Urban morphology is inherently complex, with irregular objects of diverse shapes and varying scales. These challenges are amplified by heterogeneity and scale disparities across RS data sources, including sensors, platforms, and modalities, making accurate object segmentation particularly demanding. While the Segment Anything Model (SAM) has shown significant potential in segmenting complex scenes, its performance in handling form-varying objects remains limited due to manual-interactive prompting. To this end, we propose UrbanSAM, a customized version of SAM specifically designed to analyze complex urban environments while tackling scaling effects from remotely sensed observations. Inspired by multi-resolution analysis (MRA) theory, UrbanSAM incorporates a novel learnable prompter equipped with a Uscaling-Adapter that adheres to the invariance criterion, enabling the model to capture multiscale contextual information of objects and adapt to arbitrary scale variations with theoretical guarantees. Furthermore, features from the Uscaling-Adapter and the trunk encoder are aligned through a masked cross-attention operation, allowing the trunk encoder to inherit the adapter's multiscale aggregation capability. This synergy enhances the segmentation performance, resulting in more powerful and accurate outputs, supported by the learned adapter. Extensive experimental results demonstrate the flexibility and superior segmentation performance of the proposed UrbanSAM on a global-scale dataset, encompassing scale-varying urban objects such as buildings, roads, and water.
