SAMST: A Transformer framework based on SAM pseudo label filtering for remote sensing semi-supervised semantic segmentation

Jun Yin, Fei Wu, Yupeng Ren, Jisheng Huang, Qiankun Li, Heng jin, Jianhai Fu, Chanjie CuiarXiv 2025 · DOI

Abstract

Remote sensing (RS) imagery is abundant, but high-quality pixel-level annotations are scarce and expensive to produce. Semi-supervised learning (SSL) offers a solution by leveraging unlabeled data, yet standard self-training often suffers from noisy pseudo-labels and imprecise object boundaries. This paper presents SAMST, a novel SSL framework that integrates the Segment Anything Model (SAM) to refine and "clean" pseudo-labels. By combining a Transformer-based architecture with SAM's zero-shot boundary precision, SAMST achieves significant performance gains in data-scarce scenarios, particularly in complex remote sensing environments.

Introduction

The primary challenge in remote sensing semantic segmentation is the labor-intensive nature of manual labeling for diverse geographic features like buildings, vegetation, and infrastructure. While self-training methods use model predictions as pseudo-labels for unlabeled data, errors in these initial predictions often propagate, leading to suboptimal performance. High resolution and complex object boundaries in RS imagery further exacerbate this "noise" problem. SAMST addresses these issues by using a foundation model as an automated refiner to ensure high-quality pseudo-labels.

Methodology

SAMST (SAM-based Pseudo-label Self-Training) operates in two stages. First, a supervised model—utilizing a Swin Transformer backbone and a UperNet head—is trained on a limited set of labeled data. Second, this model generates initial predictions for unlabeled data, which are then processed by a SAM-based Pseudo-label Refiner.

Overview of the SAMST framework showing the two-stage training process and the SAM-based pseudo-label refiner.

The refiner consists of three key modules:

  1. Threshold Filter Module (TFM): Filters predictions based on class-specific confidence thresholds to remove low-confidence noise.
  2. Prompt Generation Module (PGM): Automatically generates bounding boxes and point prompts from filtered predictions to guide SAM.
  3. Label Refinement Module (LRM): Stitches SAM-generated masks, fills holes, and validates them against the original model's probabilities to ensure semantic and spatial accuracy.

A Weighted Composite Loss is employed to balance the training signal from labeled and refined pseudo-labeled data, specifically addressing class imbalances common in geographic datasets.

Experimental Setup

The framework was evaluated on the Potsdam dataset, featuring 38 high-resolution aerial images (5 cm/pixel) categorized into six classes: Buildings, Trees, Cars, Low Vegetation, Impervious Surfaces, and Clutter. To simulate extreme data scarcity, only 1/32 of the training data was used as labeled, with the remainder treated as unlabeled.

Results and Discussion

SAMST demonstrated superior performance over both the supervised baseline and several state-of-the-art SSL methods, including ST++ and ClassHyPer.

Quantitative comparison of SAMST against baseline and state-of-the-art semi-supervised methods on the Potsdam dataset.

Key results include:

  • Overall Performance: A 5.67% relative improvement in mIoU over the baseline and a 2.11% increase in overall accuracy.
  • Class-Specific Gains: Significant gains in the "Clutter" class, with a 17.68% improvement in F1 score, highlighting the model's ability to handle visually inconsistent categories.
  • Boundary Recovery: SAM's geometric priors help "snap" pseudo-labels to physical object edges, overcoming the typical struggles of standard CNNs and Transformers with crisp boundaries in aerial imagery.

Conclusion

SAMST effectively leverages foundation models like SAM as automated "expert editors" to overcome the limitations of traditional self-training in remote sensing. While the approach introduces some computational overhead and hyperparameter sensitivity, its ability to produce high-quality segmentation from minimal labeled data is a significant advancement. Future work will focus on automating hyperparameter tuning and testing across more diverse RS datasets to prove generalizability.

Summary updated

BibTeX
@misc{yin2025samst,
  author = {Jun Yin and Fei Wu and Yupeng Ren and Jisheng Huang and Qiankun Li and Heng jin and Jianhai Fu and Chanjie Cui},
  title = {{SAMST: A Transformer framework based on SAM pseudo label filtering for remote sensing semi-supervised semantic segmentation}},
  year = {2025},
  eprint = {2507.11994},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.11994},
}
Figure