A Novel Shape Guided Transformer Network for Instance Segmentation in Remote Sensing Images

Dawen Yu, Shunping Ji

Abstract

Instance segmentation in remote sensing images (RSIs) faces unique challenges, including the spatial scattering of objects across vast geographical areas and boundary blurring caused by atmospheric interference. This paper introduces the Shape Guided Transformer Network (SGTN), a novel architecture designed to address these issues. SGTN utilizes a Long-range correlation boosted Swin (LSwin) encoder to capture global spatial relationships via 1D global self-attention and a Shape Guidance Module (SGM) to refine object boundaries through explicit edge and corner supervision. Experimental results on the WHU Building, BITCC, and NWPU VHR-10 datasets demonstrate that SGTN achieves state-of-the-art performance, particularly in high-precision metrics like $AP_{75}$.

1. Introduction

Instance segmentation in remote sensing imagery is a critical component for applications such as urban planning, agricultural estimation, and environmental monitoring. However, extracting precise object masks from aerial and satellite imagery is notoriously difficult due to two primary factors:

  1. Spatial Scattering: Related objects (e.g., a row of residential houses or a fleet of ships in a harbor) are often spread across a massive geographical area. Traditional Convolutional Neural Networks (CNNs) possess a limited receptive field, making it difficult to model the relationships between objects that are far apart.
  2. Boundary Blur: Imaging through the dynamic atmosphere often results in fuzzy object edges. Most existing models struggle to produce the sharp, geometrically accurate outlines required for high-fidelity mapping.

While Transformers have improved global context modeling, many variants rely on "local windows" to maintain computational efficiency, which inadvertently limits their ability to model truly long-range dependencies. SGTN is proposed to bridge this gap by combining efficient global attention with explicit shape priors.

2. Methodology

The SGTN architecture operates within a two-stage framework, introducing two primary innovations: the LSwin encoder and the Shape Guidance Module.

2.1 The LSwin Encoder

To overcome the "local window" limitation of the standard Swin Transformer, the authors developed LSwin (Long-range correlation boosted Swin). This encoder incorporates vertical and horizontal 1D global self-attention. Instead of restricting the attention mechanism to a small square window, the model scans entire rows and columns of the image. This decomposition allows the network to capture global relationships across the entire scene without the massive memory cost associated with a standard 2D Vision Transformer (ViT).

2.2 Shape Guidance Module (SGM)

While the LSwin encoder focuses on the "big picture," the SGM is designed to handle fine-grained details. Unlike standard models that learn a binary mask through implicit features, the SGM is explicitly trained to identify edges and corner points.

The module utilizes an Adaptive Receptive Field (ARFEM) to extract local details, which are then fused with the backbone's features. The final segmentation mask is refined by multiplying the initial prediction with a "shape-aware" foreground map. This process effectively "crisps up" the boundaries, ensuring that the resulting masks align with the geometric properties of man-made structures.

3. Experimental Evaluation

The model was evaluated on three diverse public benchmarks to test its versatility and robustness:

  • WHU Building Dataset: A large-scale aerial dataset containing over 186,000 building annotations from New Zealand.
  • BITCC Dataset: A dataset focusing on building instances in major Chinese cities, featuring challenging oblique satellite imagery.
  • NWPU VHR-10: A multi-class dataset featuring 10 categories, including airplanes, oil tanks, baseball fields, and bridges.

3.1 Results and Discussion

SGTN consistently outperformed established models such as Mask R-CNN, SOLO, and CenterMask across all datasets:

  • WHU Dataset: Achieved 74.6% AP, outperforming the second-best model (CenterMask) by 2.4%.
  • BITCC Dataset: Reached 52.1% AP, a significant lead over traditional CNN-based methods.
  • NWPU VHR-10: Achieved 71.3% AP, demonstrating the model's versatility across different object types.

The most significant improvements were observed in the $AP_{75}$ metric, which requires a high degree of overlap between the prediction and the ground truth. This confirms that the SGM successfully produces more precise and geometrically accurate masks. Furthermore, despite the added complexity, the LSwin backbone remains efficient, with inference times comparable to a standard ResNet-50.

4. Conclusion

The Shape Guided Transformer Network addresses the core challenges of remote sensing instance segmentation by effectively linking scattered objects and sharpening blurred boundaries. By decomposing global attention into 1D strips and utilizing shape-based supervision, SGTN provides a high-performance, efficient solution for RSI analysis. Future research will explore the integration of LSwin with larger foundational vision models and investigate methods to better segment complex, interconnected infrastructure like bridges and harbors.

Summary updated

BibTeX
@article{yu2025novel,
  author = {Dawen Yu and Shunping Ji},
  title = {{A Novel Shape Guided Transformer Network for Instance Segmentation in Remote Sensing Images}},
  journal = {IEEE J. Sel. Top. Appl. Earth Obs. Remote. Sens.},
  year = {2025},
  doi = {10.1109/jstars.2025.3550460},
}
Figure