NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

StampNet: unsupervised multi-class object discovery

Joost Visser, Alessandro Corbetta, Vlado Menkovski, Federico ToschiICIP 2019 · DOI

Abstract

Unsupervised object discovery in images involves uncovering recurring patterns that define objects and discriminates them against the background. This is more challenging than image clustering as the size and the location of the objects are not known: this adds additional degrees of freedom and increases the problem complexity. In this work, we propose StampNet, a novel autoencoding neural network that localizes shapes (objects) over a simple background in images and categorizes them simultaneously. StampNet consists of a discrete latent space that is used to categorize objects and to determine the location of the objects. The object categories are formed during the training, resulting in the discovery of a fixed set of objects. We present a set of experiments that demonstrate that StampNet is able to localize and cluster multiple overlapping shapes with varying complexity including the digits from the MNIST dataset. We also present an application of StampNet in the localization of pedestrians in overhead depth-maps.

Introduction

In computer vision, identifying "what" an object is and "where" it is typically requires massive amounts of human-annotated data, such as labels and bounding boxes. While supervised models like YOLO or Faster R-CNN are highly effective, the cost of annotation remains a major bottleneck.

StampNet addresses unsupervised object discovery, a task significantly harder than standard image clustering. In discovery, the model must find recurring patterns (objects) against a background while simultaneously determining their size, location, and category. Most previous work in this area was limited to finding a single object class across images (co-localization); StampNet aims to handle multiple classes and multiple objects per image at once.

Methods

StampNet utilizes an autoencoder architecture with a specialized decoder pipeline designed to treat object discovery as a "stamping" process. The pipeline consists of three main components:

  1. The Encoder: A VGG-like convolutional network that maps the input image into a latent representation.
  2. Selection-and-Localization (SL) Layer: This layer predicts the $x,y$ coordinates and the category for $M$ potential shapes in the image. To handle discrete category selection while maintaining differentiability for backpropagation, the authors use the Gumbel-Softmax (concrete distribution). This allows the network to make a "soft" choice during training that eventually hardens into a "one-hot" selection.
  3. The Stamp Layer: Instead of a standard deconvolutional decoder, StampNet uses a fixed set of $N$ learned convolutional kernels called "stamps." These stamps serve as prototypes of the discovered objects. To reconstruct the image, the network stamps the chosen kernels onto a blank canvas at the predicted coordinates.
The StampNet architecture, featuring the Selection and Localisation (SL) layer and the Stamp Layer.

The model is trained by minimizing the Euclidean distance between the original image and this "stamped" reconstruction.

Datasets and Evaluation

The authors evaluated StampNet on four distinct datasets to test increasing levels of complexity:

  • Simple Shapes: A synthetic dataset with five basic shapes (plus, equal, triangle, etc.) randomly placed on a canvas.
  • Translated MNIST (T-MNIST): Standard MNIST digits placed at random locations on an $84 \times 84$ canvas.
  • Cluttered Translated MNIST (CT-MNIST): T-MNIST with eight smaller "clutter" digits added to the background to test robustness.
  • Pedestrian Tracking: A real-world dataset of overhead depth-map images where pedestrians appear as ovoid shapes against floors and walls.

Key Results and Insights

StampNet demonstrates that object discovery can be effectively modeled as a stamping process. By forcing the decoder to use a limited bank of learned kernels, the network is incentivized to find the most representative prototypes that explain the visual data.

Visual results across datasets: (a,c,e,g) learned stamps; (b,d,f,h) input images, predicted bounding boxes, and reconstructions.
  • High Precision Localization: On the Simple Shapes dataset, the model achieved a CorLoc (Correct Localization) of 0.9999 and an IoU (Intersection over Union) of 0.9718.
  • Emergent Categorization: In the MNIST tests, the "stamps" learned by the network clearly resemble the digits 0-9, proving the model discovered digit classes autonomously. On the cluttered MNIST (CT-MNIST) task, unsupervised clustering purity reached 0.8113.
  • Handling Overlap: Because the model sums individual stamps to create the final reconstruction, it naturally learns to handle overlapping objects—a common failure point for simpler unsupervised methods.
  • Real-world Utility: In the pedestrian tracking task, the model successfully distinguished between pedestrians and background structures, achieving a CorLoc of 0.7816 without any prior knowledge of human shapes.

Limitations and Future Work

The authors identify two primary limitations: the fixed pixel size of the "stamps," which makes it difficult to handle objects with significant scale variation, and the static nature of the kernels, which prevents the model from handling complex rotations or deformations. Future work aims to generate dynamic kernels for the stamp layer that can adapt to the specific information found in the input image.

Summary updated

BibTeX
@inproceedings{visser2019stampnet,
  author = {Joost Visser and Alessandro Corbetta and Vlado Menkovski and Federico Toschi},
  title = {{StampNet: unsupervised multi-class object discovery}},
  booktitle = {ICIP},
  year = {2019},
  doi = {10.1109/icip.2019.8803767},
}
Figure