Weak-shot Semantic Segmentation via Dual Similarity Transfer

Junjie Chen, Li Niu, Siyuan Zhou, Jianlou Si, Chen Qian, Liqing Zhang · DOI

Abstract

Semantic segmentation is a critical task in computer vision, yet its reliance on dense pixel-level annotations creates a significant bottleneck for scaling to new categories. This paper introduces SimFormer, a novel framework designed for the "weak-shot" semantic segmentation setting. In this scenario, a model is trained on a "base" set of classes with full pixel-level masks and a "novel" set of classes with only image-level tags. By leveraging a Dual Similarity Transfer mechanism, SimFormer effectively transfers class-agnostic structural knowledge from base to novel classes, significantly reducing annotation costs while maintaining high performance.

Introduction

Assigning a categorical label to every pixel in an image—semantic segmentation—is one of the most labor-intensive tasks in data labeling. While high-quality datasets exist for common objects like cars or pedestrians, expanding these models to recognize hundreds of specialized or rare categories typically requires a massive investment in human annotation.

To address this, researchers have turned to "weak-shot" learning. This paradigm assumes we have access to a rich source of pixel-level data for a set of base classes, but only cheap, image-level labels (e.g., "this image contains a lamp") for novel classes. The fundamental challenge lies in teaching a model to delineate precise boundaries for objects it has never seen masks for, using only the structural patterns learned from known categories.

Methodology: The SimFormer Framework

SimFormer builds upon the MaskFormer architecture, which treats segmentation as a set-prediction problem: predicting a series of binary mask proposals and then classifying those segments. SimFormer extends this architecture through a Dual Similarity Transfer mechanism designed to bridge the gap between base and novel classes.

1. Proposal-Pixel Similarity Transfer

The core insight of SimFormer is that the process of segmenting an object is largely class-agnostic. A boundary between a foreground object and its background follows similar geometric principles whether the object is a cat (base class) or a lamp (novel class). SimFormer learns this masking behavior from the base classes and applies the learned "boundary-finding" skills directly to generate masks for novel class proposals.

2. Pixel-Pixel Similarity Transfer (SimNet)

To ensure global consistency, the authors introduce SimNet, a secondary network that learns to predict whether any two pixels belong to the same category. Trained on the base classes, SimNet is used to distill knowledge into the novel class predictions. By comparing pixel pairs across different images, SimNet enforces a constraint: if two pixels are visually and contextually similar, they should likely belong to the same novel mask. This prevents the model from producing disjointed or inconsistent segments.

3. Complementary Loss

SimFormer utilizes a spatial constraint known as Complementary Loss. Since the model is trained to recognize base classes with high confidence, it can reason about the "negative space" in an image. If the model identifies pixels that do not belong to any base class, it can infer that the novel classes must reside within those leftover regions. This provides a coarse but effective supervision signal that guides the model toward the correct regions for novel objects.

Experimental Results

The researchers evaluated SimFormer on two major benchmarks: COCO-Stuff-10K (171 classes) and ADE20K (150 classes). In these experiments, classes were split into base and novel groups (typically a 3:1 ratio) to simulate real-world dataset expansion.

Quantitative Performance

SimFormer established a new state-of-the-art for weak-shot semantic segmentation:

  • Superiority over Baselines: On COCO-Stuff-10K, SimFormer outperformed the previous leading method, RETAB, by 2.7% mIoU (mean Intersection-over-Union) in a zero-shot setting and by 6.0% mIoU after standard retraining.
  • Closing the Gap: The model achieved between 77% and 89% of the performance of a "Fully Oracle" model—a theoretical upper bound trained with 100% pixel-level masks for all classes—despite only having image tags for the novel categories.

Qualitative Impact

Visual analysis demonstrates that SimFormer produces significantly cleaner and more complete masks for novel objects compared to traditional weakly-supervised methods. While earlier methods often produced "noisy" or incomplete blobs centered on the most discriminative parts of an object, SimFormer successfully captures the full extent of novel objects by transferring structural knowledge from the base classes.

Limitations and Future Work

While SimFormer represents a significant leap forward, two primary challenges remain:

  1. Semantic Confusion: The model occasionally struggles to distinguish between highly similar novel classes (e.g., "house" vs. "building"). Image-level labels often lack the granularity required to separate these categories without direct mask supervision.
  2. Small Object Suppression: Small novel objects, such as a clock on a distant wall, can sometimes be overlooked or subsumed by the masks of larger neighboring objects during the proposal generation stage.

Future research may focus on identifying more granular transferable features to refine the boundaries of small objects and improve the discriminative power between visually similar novel categories.

Conclusion

SimFormer demonstrates that the "where" of segmentation can be effectively decoupled from the "what." By transferring similarity-based structural knowledge, the framework allows for the rapid expansion of segmentation models to new categories with minimal annotation effort. This approach paves the way for more scalable and cost-effective computer vision systems.

Summary updated

BibTeX
@inproceedings{chen2022weak,
  author = {Junjie Chen and Li Niu and Siyuan Zhou and Jianlou Si and Chen Qian and Liqing Zhang},
  title = {{Weak-shot Semantic Segmentation via Dual Similarity Transfer}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=qSYVigfakqS},
}
Figure