Codemaps - Segment, Classify and Search Objects Locally

Zhenyang Li, Efstratios Gavves, Koen E. A. van de Sande, Cees G. M. Snoek, Arnold W. M. SmeuldersICCV 2013

Abstract

In this paper, we aim for the segmentation and classification of objects. We propose codemaps, a joint formulation of the classification score and the local neighborhood it belongs to in the image. We obtain the codemap by reordering the encoding, pooling, and classification steps over lattice elements. Beyond existing linear decompositions that emphasize only efficiency benefits for localized search, we make three novel contributions. First, we provide a theoretical generalization of the sufficient mathematical conditions under which image encodings and classification become locally decomposable. Second, we introduce $\ell_2$ normalization for arbitrarily shaped image regions, which is fast enough for semantic segmentation using our Fisher codemaps. Third, using the same lattice across images, we propose kernel pooling, which embeds nonlinearities into codemaps for object classification by explicit or approximate feature mappings. Results demonstrate that $\ell_2$ normalized Fisher codemaps improve the state-of-the-art in semantic segmentation for PASCAL VOC. For object classification, the addition of nonlinearities brings performance on par with the state-of-the-art while being 3x faster. We also exploit the efficiency gain for object segment retrieval using a single query image.

Introduction

In the early 2010s, the standard computer vision pipeline for object recognition followed a rigid sequence: encoding local features (such as SIFT), pooling them into a global histogram (such as Fisher Vectors), and finally applying a classifier (such as an SVM). While effective for image-level classification, this paradigm struggled with localization.

To find an object within an image, a system must evaluate thousands of candidate regions or windows. Running the full encoding-pooling-classification pipeline for every single candidate is computationally prohibitive. Furthermore, high-performance methods rely heavily on $\ell_2$ normalization, which is mathematically difficult to apply efficiently to regions with arbitrary shapes. The "Codemaps" approach bridges this gap by creating a spatial map of object evidence that allows for nearly instantaneous evaluation of overlapping regions.

Methodology

The core innovation of this work is the Codemap, a decomposed image representation achieved by reordering the standard pipeline.

The Codemap pipeline reorders standard operations to enable efficient local search.

1. Pipeline Reordering

The authors mathematically define conditions under which the order of pooling and classification can be swapped. By classifying local "lexes" (small image patches or superpixels) before global pooling, they create a map where the final score for any region is simply the sum of the scores of the lexes contained within it.

2. Fast $\ell_2$ Normalization

Normalization is critical for accuracy but computationally expensive for arbitrary shapes. The authors introduce a method to pre-calculate a "normalization matrix" of dot products between lexes. This allows the system to scale the classification score of a region by its norm after the pooling step, maintaining the mathematical rigor of traditional Fisher Vectors at a fraction of the cost.

3. Nonlinear Kernel Pooling

To handle complex, nonlinear relationships, the method utilizes explicit feature mappings. By transforming features into a higher-dimensional space where they are linearly separable, nonlinearities are embedded directly into the codemap structure.

Results and Discussion

The efficiency gains of the Codemap approach are substantial. When evaluating 1,000 image regions, Fisher codemaps required only 23 seconds per image, compared to 22 minutes for traditional Fisher Vectors—a 56x speedup.

Accuracy also saw significant improvements. The paper demonstrates that unnormalized Fisher codemaps perform poorly (7.0 mAP), but the proposed $\ell_2$ normalization increases performance to 26.9 mAP. On the PASCAL VOC 2012 benchmark, adding Fisher codemaps to the leading CPMC-$O_2P$ method improved results in 8 out of 21 object categories. Furthermore, the method enabled "query-by-example" segment retrieval, allowing specific objects (like the Brooklyn Bridge) to be found in a database using only a single query mask.

Limitations and Future Work

Despite its efficiency, the method introduces a specific memory overhead. While storing the final codemaps is inexpensive (typically under 30 MB), the initial computation of the normalization matrix can be RAM-intensive, requiring up to 600 MB per image depending on the number of lexes used.

Memory usage analysis for computing and storing Fisher codemaps.

Additionally, the method's precision is tied to the initial lattice or superpixel segmentation. If the initial decomposition fails to capture object boundaries accurately, the codemap's localization ability is inherently limited. Future work may explore applying this "local-first" classification logic to real-time object detection systems and other high-dimensional vision challenges.

Summary updated

BibTeX
@inproceedings{li2013codemaps,
  author = {Zhenyang Li and Efstratios Gavves and Koen E. A. van de Sande and Cees G. M. Snoek and Arnold W. M. Smeulders},
  title = {{Codemaps - Segment, Classify and Search Objects Locally}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2013},
  url = {https://openreview.net/forum?id=YHoMnYrmmV},
}
Figure