The devil is in the object boundary: towards annotation-free instance segmentation using Foundation Models

Cheng Shi, Sibei Yang · DOI

Introduction

Instance segmentation—the task of identifying and outlining every individual object in an image—remains one of the most resource-intensive challenges in computer vision. Traditionally, this task requires extensive human-labeled datasets. While foundation models like Segment Anything (SAM) and DINO have introduced impressive zero-shot capabilities, they often struggle with "instance-level discovery." Specifically, these models frequently fail to distinguish between individual objects of the same category when they overlap or appear in clusters.

In this work, researchers identify that the core of this challenge lies in the object boundary. By discovering a latent ability within CLIP to discern these boundaries, they propose Zip, a novel pipeline that "zips" together the semantic strengths of CLIP and the geometric precision of SAM to achieve state-of-the-art, annotation-free instance segmentation.

The Boundary Problem in Foundation Models

Existing foundation models have distinct strengths and weaknesses that prevent them from performing unsupervised instance segmentation effectively. DINO is proficient at identifying foreground "blobs" but lacks the granularity to see the gaps between adjacent instances. Conversely, SAM is a master of edge detection but cannot distinguish between an object's external boundary and its internal textures (e.g., the wrinkles on an elephant).

Without a mechanism to discern where one object ends and another begins, these models cannot perform true instance-level discovery without human prompts. The authors argue that the "devil is in the object boundary," and solving this requires a model that understands both what an object is and where its limits lie.

The Zip Pipeline: Classification-First Discovery

Zip flips the traditional computer vision script. Instead of the standard "detect-then-classify" approach, Zip employs a "classification-first-then-discovery" pipeline. This method leverages CLIP’s intermediate layers to guide the segmentation process through several key stages:

  1. Semantic Localization: Using CLIP’s final layer, the model generates a coarse semantic heat map to identify potential regions of interest for specific categories.
  2. Boundary Discovery via Intermediate Features: The researchers discovered that the intermediate layers of CLIP (specifically the conv4_x layer in ResNet architectures) are highly sensitive to object boundaries. By performing K-Means clustering on these features, the model can identify distinct fragments within the image.
  3. Semantic-Aware Initialization: To ensure stable clustering, the semantic heat map from the first step is used to initialize the algorithm, specifically targeting the edges of semantic regions.
  4. Fragment Selection and Zipping: The pipeline uses a novel boundary score metric to group the discovered fragments into individual object proposals. This effectively "zips" fragments together while respecting the discovered boundaries between instances.
  5. SAM Mask Generation: These high-quality, category-specific proposals serve as prompts for SAM, which then generates the final, high-fidelity segmentation masks.

Key Insights: Why CLIP and Why CNNs?

The success of Zip rests on two critical architectural insights:

  • CLIP’s Hidden Superpower: Unlike models trained on object-centric images (DINO) or edges (SAM), CLIP is trained on image-text pairs. These pairs often describe complex scenes with multiple objects and their relationships. To satisfy these descriptions, CLIP’s intermediate layers naturally learn to distinguish between individual instances.
  • The CNN Advantage: The authors found that Vision Transformers (ViTs) often lose instance-level localization in their middle layers due to the global nature of self-attention. In contrast, standard CNNs like ResNet, with their hierarchical receptive fields, preserve these boundaries much more effectively, making them superior backbones for boundary discovery.

Experimental Results

Zip was evaluated on MS COCO and Pascal VOC benchmarks, demonstrating significant improvements over existing methods:

  • Performance Gains: Zip improves SAM’s mask Average Precision (AP) on the COCO dataset by 12.5%.
  • State-of-the-Art in Unsupervised Discovery: In annotation-free settings, Zip outperforms the previous leading method, CutLER, by 5.4% AP in class-agnostic tasks and 9.7% AP in class-aware tasks.
  • Open-Vocabulary Capabilities: Zip achieves performance comparable to specialized Open-Vocabulary Detectors (like ViLD) that require base-category annotations, despite Zip seeing no human labels at all.
  • Efficiency: By avoiding complex Laplacian matrix computations used in previous unsupervised methods, Zip is approximately 10x faster than its predecessors.

Conclusion and Future Work

Zip demonstrates that the information necessary for instance-level discovery is already latent within existing foundation models; it simply requires the right "zipping" mechanism to extract it. While a performance gap still exists between annotation-free methods and fully supervised models, Zip significantly narrows this margin.

Future research may focus on mitigating the inherent biases of the CLIP training data and exploring how minimal amounts of ground-truth data can be integrated to further bridge the supervision gap without sacrificing the flexibility of the open-vocabulary approach.

Summary updated

BibTeX
@inproceedings{shi2024devil,
  author = {Cheng Shi and Sibei Yang},
  title = {{The devil is in the object boundary: towards annotation-free instance segmentation using Foundation Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=4JbrdrHxYy},
}
Figure