HFER-SAM: Boundary-Aware Segment Anything Model via High-Frequency Enhanced and Residual Injection for Building Extraction
Automatic building extraction from high-resolution remote sensing imagery is vital for urban applications. Although the Segment Anything Model (SAM) offers powerful semantic capabilities, its direct application faces severe challenges. The inherent low-pass filtering of Vision Transformers typically causes blurred building edges, distorted right angles, and severe adhesion among dense clusters. To address these bottlenecks, we propose a Boundary-Aware Segment Anything Model via High-Frequency Enhanced and Residual Injection (HFER-SAM). First, a Multi-scale Semantic Adaptation Module (MSAM) uses domain adapters and coordinate attention to recover spatial priors for precise domain alignment. Second, a High-Frequency Residual Injection Module (HFRIM) employs a lightweight CNN to extract roof textures and edge gradients. These are injected as residual terms into the semantic stream to explicitly sharpen physical boundaries. Finally, a Boundary-Constrained Dual-Task Head (BC-DTH) utilizes morphological supervision to sever erroneous connections between adjacent buildings and resolve target adhesion. Experiments on the WHU and Inria datasets reveal that HFER-SAM achieves an Intersection over Union of 91.53% and 82.06%, respectively. Our method significantly outperforms existing state-of-the-art models in both accuracy and boundary fidelity, providing a robust avenue for high-precision building mapping.
Authors
- Aihua Shen (ORCID: https://orcid.org/0009-0004-3165-5496)
- Junfeng Xu
- Jiazhen Bao
- Aixia Liu (ORCID: https://orcid.org/0000-0002-7558-3242)
- Xu Han (ORCID: https://orcid.org/0000-0003-4573-0624)
- Lijian Xie
- Jinsong Deng
- Panpan Ma
- Yun He
- Xin Zhao
Institutions
- Ministry of Natural Resources (CN)
- Zhejiang Academy of Forestry (CN)
- Zhejiang University (CN)
Publication Details
- Journal
- Remote Sensing
- Published
- 2026-10-15
- DOI
- https://doi.org/10.3390/rs18203531
- Primary Topic
- Automated Road and Building Extraction
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Key Research and Development Program of China