NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

S^4M: Boosting Semi-Supervised Instance Segmentation with SAM

Heeji Yoon, Heeseong Shin, Eunbeen Hong, Hyunwook Choi, Hansang Cho, Daun Jeong, Seungryong KimarXiv 2025

Abstract

Semi-supervised instance segmentation poses challenges due to limited labeled data, causing difficulties in accurately localizing distinct object instances. Current teacher-student frameworks still suffer from performance constraints due to unreliable pseudo-label quality stemming from limited labeled data. While the Segment Anything Model (SAM) offers robust segmentation capabilities at various granularities, directly applying SAM to this task introduces challenges such as class-agnostic predictions and potential over-segmentation. To address these complexities, we carefully integrate SAM into the semi-supervised instance segmentation framework, developing a novel distillation method that effectively captures the precise localization capabilities of SAM without compromising semantic recognition. Furthermore, we incorporate pseudo-label refinement as well as a specialized data augmentation with the refined pseudo-labels, resulting in superior performance. We establish state-of-the-art performance, and provide comprehensive experiments and ablation studies to validate the effectiveness of our proposed approach.

Introduction

Instance segmentation—the task of simultaneously detecting objects and delineating their exact pixel-level boundaries—is notoriously expensive to label. Semi-supervised learning (SSL) attempts to mitigate this by training a "teacher" model on a small labeled dataset to generate "pseudo-labels" for a larger unlabeled dataset, which a "student" model then learns from.

However, a critical bottleneck exists: under-segmentation. As shown in Figure 1, a bottleneck analysis reveals that while teacher models are quite proficient at classification (96.9% accuracy), their segmentation quality is significantly lower (47.7%). This leads to failure cases where the model fails to distinguish between adjacent objects of the same class, grouping them into a single, messy mask. While foundation models like the Segment Anything Model (SAM) have incredible localization abilities, they cannot be used directly because they are class-agnostic and often "over-segment" (e.g., breaking a car into wheels and windows). $S^4M$ bridges this gap, using SAM’s precision to guide the teacher without inheriting its class-blindness.

Bottleneck analysis and failure cases of under-segmentation.

Methodology

The $S^4M$ framework introduces three main components to the standard teacher-student pipeline to address the mask quality bottleneck.

The S^4M framework overview.

Structural Distillation (SD)

During the initial "burn-in" phase, the teacher model is trained on labeled data while also "watching" SAM. Instead of forcing the teacher to mimic SAM’s raw features, the authors use self-similarity matrices. By calculating the cosine similarity between all pairs of pixels in a feature map, the teacher learns the structural layout (which pixels belong together) from SAM while maintaining its own semantic understanding. Distilling from SAM’s decoder features is particularly effective as they contain more localized, fine-grained spatial information.

Pseudo-label Refinement (PR)

When generating pseudo-labels for unlabeled images, the teacher often produces noisy masks. $S^4M$ treats these masks as probability distributions and stochastically samples $K$ points from them. These points serve as prompts for SAM, which then generates a much cleaner, refined mask. This stochastic point-sampling is more robust than bounding-box prompts, which often include background noise from adjacent objects.

Augmentation with Refined Pseudo-labels (ARP)

To make the student model more robust, the authors use an instance-aware augmentation strategy. High-quality refined masks are "pasted" bidirectionally between pairs of images in a training batch. This creates complex scenes that force the student to learn better object boundaries and separation in dense environments.

Experimental Results

The authors evaluated $S^4M$ on two primary benchmarks: Cityscapes (urban driving) and COCO (general objects).

  • Cityscapes: At a 5% label ratio, $S^4M$ achieved 30.1 AP, a significant +6.9 point jump over previous state-of-the-art methods.
  • COCO: In the ultra-sparse 1% label setting, it reached 24.2 AP, outperforming the baseline by 1.9 points.

Visualizations confirm that $S^4M$ successfully separates "clumped" objects, such as rows of parked cars or crowds of people, that previous models would have merged into single instances.

Conclusion and Limitations

$S^4M$ establishes a new state-of-the-art for semi-supervised instance segmentation by effectively integrating SAM's localization capabilities. However, at higher label ratios (e.g., 10% on COCO), the performance gain is less dramatic, as the stochastic nature of point-sampling can occasionally introduce noise when the teacher’s original labels are already high-quality. Additionally, running SAM for refinement adds computational overhead during the pseudo-label generation phase, though this does not affect final inference speed. Future work may focus on better calibration of the sampling process based on the teacher's confidence.

Summary updated

BibTeX
@misc{yoon2025s,
  author = {Heeji Yoon and Heeseong Shin and Eunbeen Hong and Hyunwook Choi and Hansang Cho and Daun Jeong and Seungryong Kim},
  title = {{S^4M: Boosting Semi-Supervised Instance Segmentation with SAM}},
  year = {2025},
  eprint = {2504.05301},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.05301},
}
Figure