SAM as the Guide: Mastering Pseudo-Label Refinement in Semi-Supervised Referring Expression Segmentation

Danni Yang, Jiayi Ji, Yiwei Ma, Tianyu Guo, Haowei Wang, Xiaoshuai Sun, Rongrong Ji

Introduction

Referring Expression Segmentation (RES) represents a significant challenge at the intersection of computer vision and natural language processing. The task requires a model to segment a specific object within an image based on a natural language description, such as "the person in the black shirt eating a sandwich." This necessitates a deep understanding of both visual features and complex linguistic nuances, including spatial relationships and object attributes.

Despite its potential, the advancement of RES is hindered by the exorbitant cost of data annotation. Manually segmenting objects for RES is labor-intensive, requiring an average of 80 seconds per mask. While semi-supervised learning (SSL) offers a path forward by utilizing unlabeled data through pseudo-labeling, the resulting labels are often "noisy." These masks frequently suffer from boundary bleeding or incomplete coverage, leading to a "garbage in, garbage out" cycle that limits the performance of student models.

The SemiRES Framework

To address these challenges, we introduce SemiRES, a novel semi-supervised framework that leverages the Segment Anything Model (SAM) as a high-precision geometric guide. While SAM excels at identifying object boundaries, it lacks the linguistic grounding necessary to interpret referring expressions. SemiRES bridges this gap by using a teacher model’s linguistic understanding to select and refine the most accurate geometric masks from SAM’s proposals.

Refinement Strategies

SemiRES employs a multi-tiered approach to refine noisy pseudo-labels generated by the teacher model:

  1. IoU-based Optimal Matching (IOM): This strategy calculates the Intersection over Union (IoU) between the teacher's initial pseudo-label and a library of SAM-generated masks. The best-fitting SAM mask is selected to replace the noisy original, ensuring the final label adheres strictly to physical object boundaries.
  2. Composite Parts Integration (CPI): Recognizing that a single SAM mask may not always capture a complex object, CPI allows for "Lego-style" assembly. It can merge multiple segments to correct under-segmentation (CPI-U) or filter out extraneous noise to address over-segmentation (CPI-O).
  3. Pixel-Wise Adjustment (PWA): In cases where no suitable SAM mask is found, PWA acts as a safety net. It applies a weighting function that encourages the student model to focus on high-confidence pixels while ignoring ambiguous regions near the edges.

To maintain computational efficiency, SAM mask proposals are generated offline and stored using Run-Length Encoding (RLE), significantly reducing storage requirements.

Experimental Evaluation

The effectiveness of SemiRES was evaluated across three gold-standard benchmark datasets: RefCOCO (spatial positions), RefCOCO+ (attributes), and G-Ref (complex, long-form expressions).

Label Efficiency and Performance

The results demonstrate a remarkable improvement in label efficiency. Most notably, with only 1% of the RefCOCO dataset labeled, SemiRES outperformed the supervised baseline by 18.64%. Furthermore, when using 10% of the labeled data, the framework achieved performance levels nearly identical to models trained on the full 100% dataset. This suggests that the geometric guidance provided by SAM allows the model to reach saturation much faster than traditional methods.

Qualitative and Small Object Analysis

Beyond aggregate metrics, SemiRES shows a distinct advantage in segmenting small objects, which are typically prone to being lost in noisy pseudo-labels. Qualitative comparisons reveal that SemiRES produces masks with significantly cleaner boundaries that respect the physical geometry of the target, avoiding the "blurry" or "boxy" artifacts common in previous SSL methods.

Discussion and Future Work

The core insight of SemiRES is the transition from filtering low-confidence labels to fixing them. By using SAM as a geometric anchor, the model can learn from a much larger portion of unlabeled data without being misled by noise. This "fix-instead-of-filter" philosophy maximizes the utility of the available unlabeled pool.

However, some limitations remain. The current reliance on an offline SAM proposal library, while efficient for training, lacks the flexibility of an end-to-end system. Additionally, if SAM fails to propose a mask for highly occluded or obscure objects, the system must rely on the less robust PWA strategy. Future research will focus on deeper integration between linguistic encoders and SAM, as well as extending these refinement techniques to video-based tasks.

Conclusion

SemiRES establishes a new state-of-the-art for semi-supervised RES by effectively marrying the linguistic intelligence of teacher models with the geometric precision of SAM. By drastically reducing the reliance on manual annotations, SemiRES paves the way for more scalable and robust referring expression systems.

Summary updated

BibTeX
@inproceedings{yang2024sam,
  author = {Danni Yang and Jiayi Ji and Yiwei Ma and Tianyu Guo and Haowei Wang and Xiaoshuai Sun and Rongrong Ji},
  title = {{SAM as the Guide: Mastering Pseudo-Label Refinement in Semi-Supervised Referring Expression Segmentation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=M5kn9NKIs4},
}
Figure