ShapeMask: Learning to Segment Novel Objects by Refining Shape Priors

Weicheng Kuo, Anelia Angelova, Jitendra Malik, Tsung-Yi Lin

Abstract

Instance segmentation typically requires extensive pixel-level annotations for every target category. ShapeMask addresses the challenge of generalizing to novel objects by learning a category-agnostic shape library and refining these priors using instance-specific embeddings. By decoupling shape from class labels, ShapeMask achieves significant performance gains in cross-category tasks, outperforming state-of-the-art methods like Mask R-CNN in data efficiency and inference speed.

Introduction

Modern instance segmentation models often struggle with "novel" objects—categories not seen during training. This "category-hunger" stems from a reliance on class-specific mask predictors. ShapeMask proposes a shift toward learning "object-ness" through shape priors. Instead of predicting masks from scratch, the model selects and refines canonical shapes, allowing it to generalize the concept of a "four-legged animal" or "long-thin object" to unseen species or tools.

Methodology: The Three-Stage Refinement

ShapeMask decomposes segmentation into three progressive stages:

  1. Shape Recognition: The model utilizes a library of Shape Priors—canonical geometries (e.g., "round," "four-legged") derived via k-means clustering of training masks. For a detected bounding box, the model predicts a weighted combination of these priors to form a "detection prior."
  2. Coarse Mask Prediction: This geometric prior is fused with image features to align the abstract shape with visible edges in the scene.
  3. Fine-Tuning via Instance Embedding: To handle specific object details, the model learns an instance embedding. By centering features around this embedding, the model groups pixels belonging to the same object, effectively separating the figure from the background even for novel classes.
The ShapeMask pipeline: from initial detection to the final fine mask through successive refinement stages.

Key Insights: Universal Shapes

A core premise of ShapeMask is that shapes are universal. A horse and a zebra share similar geometric structures. By learning a diverse set of priors, the model can transfer knowledge across categories. This allows the system to segment objects it has never seen before by identifying familiar geometric components.

A library of learned shape priors across various categories, demonstrating how canonical shapes can represent multiple object classes.

Results and Evaluation

ShapeMask was evaluated on the COCO dataset using a "VOC vs. Non-VOC" split to test generalization.

  • Generalization: It outperformed Mask$^X$ R-CNN by 6.4 AP on unseen categories.
  • Efficiency: Training on just 1% of labeled data, ShapeMask surpassed some fully-supervised state-of-the-art models.
  • Performance: The model runs at ~150-200ms per image and trains 4x faster than Mask R-CNN on TPUs.
  • Robustness: Unlike standard models that fail with imprecise bounding boxes, ShapeMask's "soft" prior approach allows it to recover object boundaries even when the initial detection is slightly misaligned.

Conclusion

ShapeMask represents a move toward class-agnostic computer vision. By leveraging geometric intuition rather than rigid labels, it provides a robust framework for robotics and autonomous systems operating in open-world environments where encountering unknown objects is a certainty. Future work may involve dynamic learning of these priors to further enhance detail in complex structures.

Summary updated

BibTeX
@inproceedings{kuo2019shapemask,
  author = {Weicheng Kuo and Anelia Angelova and Jitendra Malik and Tsung-Yi Lin},
  title = {{ShapeMask: Learning to Segment Novel Objects by Refining Shape Priors}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00930},
}
Figure