Better (pseudo-)labels for semi-supervised instance segmentation

Francois Porcher, camille couprie, Marc Szafraniec, Jakob Verbeek

TL;DR

Standard semi-supervised distillation falters on long-tailed instance segmentation because teacher models are overconfident on common classes and severely underconfident on rare ones. This paper introduces two fixes: semantic, frequency-modulated label smoothing to train a stronger teacher, and a directional, class-conditional calibration correction to adjust pseudo-labels for the student. On LVIS, this approach boosts rare-class Average Precision ($\text{AP}_r$) by 10.3 points over a strong supervised baseline, closing the performance gap between rare and frequent classes.

What Problem Does This Paper Address?

Instance segmentation requires predicting both bounding boxes and pixel-level masks for every object. While modern detectors excel on frequent categories, real-world data is heavily long-tailed: common classes have thousands of training examples, while rare categories have fewer than ten.

Semi-supervised learning via teacher-student distillation is a natural remedy, leveraging abundant unlabeled images to generate pseudo-labels. However, existing methods suffer from two key flaws:

  1. Miscalibration & threshold bias: Teachers become overconfident in head (frequent) classes and underconfident in tail (rare) classes. Confidence-score thresholding consequently filters out pseudo-labels for rare classes—the exact ones that need additional data most.
  2. Loss of semantic context: Discarding teacher uncertainty with hard (one-hot) pseudo-labels throws away useful semantic relationships (e.g., confusing a cat with a dog versus a car).

Methods

The authors introduce a dual-stage framework using Cascade Mask R-CNN with an EVA-02 ViT-L backbone:

  1. Targeted Unlabeled Image Retrieval: Rather than using arbitrary unlabeled data, the authors extract DINOv2 embeddings for crops of rare LVIS objects and perform nearest-neighbor search (via Faiss) over a large unlabeled dataset, retrieving ~200k relevant unlabeled images.
  2. Frequency-Modulated Prototype Smoothing (Teacher Training): Instead of standard uniform label smoothing, the teacher is trained with soft targets based on cosine similarities between class prototype feature embeddings in the backbone. Similarity distributions are scaled by class frequencies ($N_j^\gamma$), boosting smoothing weights toward rare classes: $$\tilde{y} = (1 - \epsilon)y + \epsilon S'y$$
  3. Class-Conditional Expected Calibration Error (CCECE) Correction (Student Distillation): Standard ECE measures absolute error, hiding whether a model is over- or under-confident. The authors define signed CCECE ($\Delta_i$) per class: $$\Delta_i = \sum_{b=1}^{B} \frac{N_{i,b}}{N_i} (\text{acc}_{i,b} - \text{conf}_{i,b})$$ A negative $\Delta_i$ flags overconfidence, while positive indicates underconfidence. The teacher's soft targets are then calibrated before distilling to the student: $$\tilde{y}_{\text{teacher}} = y_{\text{teacher}} + \lambda \Delta$$

Datasets

  • LVIS v1.0: The primary benchmark, containing 1,203 categories in a severe long-tail distribution (over 300 classes have $\le 10$ training images). Models were trained on 85% of the official train set, tuned on 15%, and evaluated on the official validation split.
  • Retrieved Unlabeled Pool: ~200k unlabeled images retrieved from a large internal dataset using DINOv2 feature queries of rare LVIS categories.

Key Insights and Ideas

  • Uniform smoothing hurts, semantic smoothing helps: Standard uniform label smoothing provides no benefit on long-tail benchmarks. However, smoothing targets toward semantically similar categories—and intentionally tilting soft labels toward rare classes—provides an effective inductive bias in extreme low-shot regimes.
  • Directional calibration matters: Miscalibration in deep models is class-asymmetric. Using a signed metric allows the student to directly counteract the teacher's systematic biases (suppressing overconfident common classes and boosting underconfident tail classes).
  • Closing the tail gap: Remarkably, this calibration scheme improves rare-class performance so significantly that the historic gap between tail-class AP and overall AP is virtually eliminated.

Key Results

  • State-of-the-Art Performance: On LVIS validation, the proposed pipeline achieves 56.8 AP overall and 57.3 $\text{AP}_r$ on rare classes.
  • Substantial Gains on Rare Classes:
  • Over the supervised baseline (54.0 AP / 47.0 $\text{AP}_r$): +2.8 AP overall and +10.3 $\text{AP}_r$.
  • Over standard one-hot semi-supervised distillation (54.8 AP / 49.7 $\text{AP}_r$): +2.0 AP overall and +7.6 $\text{AP}_r$.
  • Improved Calibration: Aggregate Expected Calibration Error (ECE) drops from 0.22 in the teacher down to 0.07 in the student.

Limitations and Future Work

  • Reliance on an Unlabeled Retrieval Corpus: The approach depends on nearest-neighbor search across a large internal image repository to find relevant unlabeled images, which may not be readily available in all domains.
  • Hyperparameter Sensitivity: The framework introduces several tuning parameters ($\epsilon$, $\gamma$, and $\lambda$) that require a held-out validation split to calibrate properly.
  • Future Work: Not explicitly detailed by the authors, though extending class-conditional calibration to open-vocabulary detection and end-to-end multi-task architectures represents a natural extension.

Summary updated

BibTeX
@inproceedings{porcher2024better,
  author = {Francois Porcher and camille couprie and Marc Szafraniec and Jakob Verbeek},
  title = {{Better (pseudo-)labels for semi-supervised instance segmentation}},
  booktitle = {PML4LRS @ ICLR},
  year = {2024},
  url = {https://openreview.net/forum?id=VzTKuT6O4m},
}

Loading related content...

Figure