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

Unsupervised Visual Object Categorisation with BoF and Spatial Matching

Teemu Kinnunen, Jukka Lankinen, Joni-Kristian Kämäräinen, Lasse Lensu, Heikki Kälviäinen

Introduction

Visual Object Categorisation (VOC) is traditionally approached as a supervised learning task, requiring extensive human-labeled datasets. However, the manual labeling of thousands of categories is prohibitively expensive and fails to scale with the vast diversity of objects encountered in the real world. The "ultimate challenge" in this field is unsupervised object discovery: the ability of a system to automatically group unlabeled images into semantically meaningful categories.

While the Bag-of-Features (BoF) model has been the standard for efficient image representation, it treats images as unordered collections of local features, ignoring spatial layout. This "spatial blindness" often leads to false positives, where unrelated images are matched based on shared textures or background elements. This paper proposes a two-stage method that integrates robust spatial verification into the BoF framework to achieve high-accuracy unsupervised categorization.

Methodology

The proposed pipeline transitions from efficient global matching to fine-grained geometric verification across four key stages:

1. Pre-filtering via Bag-of-Features

To maintain computational efficiency, the system first identifies the top 100 candidate matches for each image using a BoF approach. A Self-Organizing Map (SOM) is utilized to generate the visual vocabulary, offering greater stability across varying vocabulary sizes compared to standard k-means clustering.

2. Spatial Verification and Re-ranking

For the selected candidate images, the system performs a rigorous spatial check. Using a random sampling procedure similar to RANSAC, it attempts to find a similarity transformation (covering rotation, scale, and translation) that aligns the local features of two images. This step filters out "noisy" matches where features might be similar in appearance but are jumbled in layout.

Comparison of BoF and BoF + spatial verification in identifying correct candidate matches.

As shown in the figure above, the addition of spatial verification significantly improves the probability of including a correct match within the set of candidate images compared to a pure BoF approach.

3. Graph-Based Clustering

The resulting spatial similarity scores are used to construct a graph where each node represents an image and edges represent the strength of their spatial alignment. The Normalized Cuts (NC) algorithm is then applied to partition this graph into clusters, each corresponding to a discovered object category.

Visualization of the image collection as a graph, where edges represent spatial similarity between images.

Experimental Evaluation

The method was evaluated on three benchmark datasets:

  • Caltech-101: A standard benchmark for object categorization.
  • Caltech-256 Subset: A more challenging dataset used to compare performance against existing literature.
  • Randomized Caltech-101 (r-Caltech-101): A rigorous test where objects are randomly transformed against complex Google landscape backgrounds, preventing the model from relying on background correlations.

Key Results and Insights

The experiments yielded several critical findings:

  • Improved Accuracy: On the Caltech-256 subset, the method achieved a conditional entropy of 1.71, outperforming the previous state-of-the-art (1.78).
  • Scalability: Unlike many unsupervised methods that degrade as the number of categories increases, the relative improvement of the spatial matching approach over standard BoF actually grew with the number of classes.
  • Robustness: The method maintained a significant performance lead on the r-Caltech-101 dataset, demonstrating that spatial verification effectively focuses on the object rather than the background.
  • Rank-Based Similarity: The authors found that using the rank of a match (e.g., 1st best vs. 10th best) to build the similarity matrix was more effective for clustering than using raw distance metrics.

Conclusion

By combining the efficiency of Bag-of-Features with the precision of spatial verification, this research demonstrates a scalable path for unsupervised object discovery. While the spatial matching stage remains a computational bottleneck and the automatic determination of the number of categories ($K$) is still an open question, this approach sets a new benchmark for discovering structure in large, unlabeled image collections.

Summary updated

BibTeX
@inproceedings{kinnunen2013unsupervised,
  author = {Teemu Kinnunen and Jukka Lankinen and Joni-Kristian Kämäräinen and Lasse Lensu and Heikki Kälviäinen},
  title = {{Unsupervised Visual Object Categorisation with BoF and Spatial Matching}},
  booktitle = {SCIA},
  year = {2013},
  doi = {10.1007/978-3-642-38886-6\_37},
}
Figure