Co-Segmentation without any Pixel-level Supervision with Application to Large-Scale Sketch Classification

Nikolaos-Antonios Ypsilantis, Ondrej Chum · DOI

Abstract

Object co-segmentation—the task of localizing common objects across a set of images—traditionally requires expensive pixel-level annotations for training. This paper presents Class-Biased Normalized-Cut (CBNC), a method that achieves high-fidelity co-segmentation using only image-level labels. By leveraging the complementary strengths of category-aware and self-supervised Vision Transformers (ViTs), CBNC establishes a new state-of-the-art for weakly supervised models. Furthermore, the authors demonstrate a practical application in large-scale sketch classification, where co-segmentation is used to strip background clutter from natural images, significantly improving the performance of models trained to recognize hand-drawn sketches.

Introduction

Identifying and masking common objects within a collection of images is a cornerstone of computer vision, yet the "labeling tax" associated with this task is immense. Manually drawing binary masks for thousands of images is time-consuming and often prohibitive for large-scale applications. This challenge is particularly acute in the field of sketch classification. While researchers often use natural images to supplement sparse sketch datasets, the "domain gap" between a cluttered photograph and a clean line drawing often hinders model performance. Background elements in photos—such as trees behind a bird or a person holding a guitar—act as noise that confuses classifiers when they are applied to sketches.

This research addresses both the supervision cost of segmentation and the clutter problem in sketch recognition by introducing a pipeline that requires no pixel-level masks, relying instead on the inherent features of pre-trained Vision Transformers.

The CBNC Framework

The core of the proposed method is Class-Biased Normalized-Cut (CBNC). The framework exploits a "best of both worlds" strategy by combining two distinct types of pre-trained Vision Transformers:

1. Coarse Localization (The "What")

The process begins with a ViT pre-trained on ImageNet classification. Because this model was optimized to identify specific categories, its internal tokens are highly sensitive to class-specific features. By analyzing the similarity of these tokens across multiple images belonging to the same class, the system estimates a rough "relevance map" that identifies the likely location of the target object.

2. Fine Segmentation (The "Where")

While the ImageNet-ViT understands semantics, it often lacks precision regarding object boundaries. To solve this, the authors employ a DINO-ViT, which is trained via self-supervision. DINO features are exceptionally proficient at capturing local structures and boundaries, though they lack inherent category awareness.

3. Biased Spectral Clustering

The "bridge" between these two models is a biased version of the Normalized Cut (N-Cut) algorithm. The coarse relevance map from the ImageNet-ViT acts as a bias for the spectral clustering performed on the DINO features. This forces the algorithm to focus on the semantically relevant object while utilizing DINO’s spatial precision to define exact edges. The final boundaries are further polished using a GrabCut pass.

Application: Large-Scale Sketch Classification

To apply this to sketch recognition, the authors use the CBNC pipeline to isolate objects from natural images. These isolated objects are then converted into randomized Binary Thin Edges (rBTE), a proxy format that mimics the appearance of hand-drawn sketches. By training classifiers on these "cleaned" and converted examples, the model learns the essential geometry of the object without being distracted by the original photographic context.

Experimental Results

The CBNC method was evaluated across several rigorous benchmarks for co-segmentation and saliency, as well as large-scale sketch datasets.

Co-Segmentation Performance

On the PASCAL VOC dataset, CBNC achieved a Mean Jaccard Index ($J_m$) of 64.7. This result outperformed all existing image-level supervised methods and significantly narrowed the performance gap between weakly supervised models and those trained on expensive, manually-produced pixel masks. Similar successes were observed on the CoSal2015, CoSOD3k, and CoCA benchmarks.

Sketch Recognition Improvements

The impact on sketch classification was substantial:

  • Sketchy Dataset: Using CBNC to clean training data improved Top-1 accuracy from 40.9% to 50.0% using a ResNet18 backbone.
  • Im4Sketch Dataset: On this massive dataset (over 1 million images across 874 classes), the method improved Top-1 accuracy by nearly 5% in challenging "subset" evaluations, demonstrating that the method scales effectively to real-world, "in-the-wild" data.

Discussion and Limitations

The research highlights that for sketch recognition, background information is often actively harmful. By filtering training data through co-segmentation, models can focus on the core structural features that define a category.

However, the authors note certain limitations. The method can struggle with "temporal correlation," where the background remains static across a set of images (e.g., video frames), leading the model to incorrectly identify the background as the common element. Additionally, while ViT feature extraction is efficient, the subsequent spectral clustering and GrabCut steps introduce computational overhead that may affect per-image processing speeds.

Conclusion

CBNC provides a powerful, mask-free alternative for object co-segmentation. By successfully bridging the gap between semantic understanding and structural precision, the method not only advances the state-of-the-art in weakly supervised segmentation but also provides a robust solution for improving cross-domain tasks like sketch classification. Future work may involve integrating language-guided models like CLIP to allow for co-segmentation based on arbitrary text descriptions.

Summary updated

BibTeX
@inproceedings{ypsilantis2024co,
  author = {Nikolaos-Antonios Ypsilantis and Ondrej Chum},
  title = {{Co-Segmentation without any Pixel-level Supervision with Application to Large-Scale Sketch Classification}},
  booktitle = {ACCV},
  year = {2024},
  doi = {10.1007/978-981-96-0972-7\_20},
}
Figure