TL;DR
This paper introduces a streamlined framework that leverages the "raw" zero-shot output of the Segment Anything Model (SAM) to improve remote sensing image segmentation. By introducing two novel auxiliary losses—Object Consistency and Boundary Preservation—the authors enhance standard segmentation models without requiring complex fine-tuning or manual prompting.
What Problem Does This Paper Address?
Semantic segmentation in remote sensing (RS) involves assigning a class label (like "building," "tree," or "water") to every pixel in a satellite or aerial image. While deep learning has made huge strides here, two persistent issues remain:
- Fragmentation: Predicted maps often look "speckled," where pixels within a single object are assigned different classes.
- Blurry Boundaries: Accurate edge detection is difficult due to the complex textures and varying scales of geographic features.
The Segment Anything Model (SAM) is a powerful foundation model that can identify "objects" with incredible precision, but it has a major catch for RS: it provides masks without semantic labels (it knows where a thing is, but not what it is). Previous attempts to bridge this gap required complex prompt engineering or heavy fine-tuning. This paper seeks a simpler, "plug-and-play" way to use SAM’s geometric knowledge to guide traditional RS models.
Methods
The authors propose a framework that uses SAM as a "pre-processor" to generate two types of prior knowledge: SAM-Generated Objects (SGO) and SAM-Generated Boundaries (SGB). These are then used to supervise the training of a standard segmentation model (like a UNetformer or ABCNet) via two new loss functions:
- Object Consistency Loss ($L_{obj}$): This loss enforces that all pixels within a SAM-identified object should have similar semantic predictions. If SAM says a region is a single entity, the model is penalized if it tries to split that region into multiple classes.
- Boundary Preservation Loss ($L_{bdy}$): This uses the sharp edges found by SAM to "pull" the semantic model’s predicted boundaries toward the actual physical edges of objects.
Crucially, SAM is only used during the training phase. Because these constraints are implemented as loss functions, the final model doesn't need SAM to run during inference, meaning there is zero impact on deployment speed.
Datasets
The researchers evaluated their method on two widely recognized benchmarks:
- ISPRS Vaihingen: A very high-resolution dataset (9cm) featuring five foreground classes (e.g., buildings, cars, trees) in an urban environment.
- LoveDA Urban: A 30cm resolution dataset covering complex urban scenes across three Chinese cities, featuring seven landcover categories.
Key Insights and Ideas
- SAM as a Teacher, Not a Replacement: Instead of trying to make SAM do the classification, the authors use SAM’s superior "objectness" to teach a smaller, specialized model how to respect physical boundaries.
- Overcoming the Domain Gap: SAM was trained on natural images (photos of dogs, cars, etc.), while RS images are top-down. By using SAM's output as a constraint rather than a direct prediction, the authors bypass the need to perfectly adapt SAM to the RS domain.
- Consistency over Labels: The "Aha!" moment here is realizing that SAM doesn't need to know what a "building" is to be useful. Just knowing that "this group of pixels belongs together" is enough to prevent the semantic model from making fragmented errors.
Key Results
The "SAM-assisted" versions of four popular models (ABCNet, CMTFNet, UNetformer, and FTUNetformer) consistently outperformed their baseline versions:
- Accuracy Boost: On the ISPRS Vaihingen dataset, the FTUNetformer+SAM achieved a mean F1 score (mF1) of 91.08% and a mean Intersection over Union (mIoU) of 84.01%, outperforming the baseline.
- Cleaner Edges: Qualitative results show significantly sharper boundaries for buildings and roads, and a reduction in "noise" in large forested or agricultural areas.
- Efficiency: While training takes longer (due to the extra loss calculations), the inference speed remains identical to the baseline models (e.g., ~31 FPS for UNetformer), making it practical for real-world use.
Limitations and Future Work
- SAM's Sensitivity: The quality of the improvement depends on SAM’s initial mask generation. If SAM fails to detect an object or produces an incorrect boundary, the auxiliary losses might provide "noisy" supervision.
- Training Overhead: Generating the SGO and SGB maps requires a one-time computational cost before training begins, and the backpropagation of extra losses adds to the training time.
- Future Directions: The authors suggest exploring more sophisticated ways to filter out "low-quality" SAM masks automatically and testing the framework on even more diverse datasets, such as multi-spectral or SAR (Synthetic Aperture Radar) imagery.
Summary updated