Dense Image Representation with Spatial Pyramid VLAD Coding of CNN for Locally Robust Captioning

Andrew Shin, Masataka Yamaguchi, Katsunori Ohnishi, Tatsuya HaradaarXiv 2016 · OpenReview

Abstract

The workflow of extracting features from images using convolutional neural networks (CNN) and generating captions with recurrent neural networks (RNN) has become a de-facto standard for image captioning task. However, since CNN features are originally designed for classification task, it is mostly concerned with the main conspicuous element of the image, and often fails to correctly convey information on local, secondary elements. We propose to incorporate coding with vector of locally aggregated descriptors (VLAD) on spatial pyramid for CNN features of sub-regions in order to generate image representations that better reflect the local information of the images. Our results show that our method of compact VLAD coding can match CNN features with as little as 3% of dimensionality and, when combined with spatial pyramid, it results in image captions that more accurately take local elements into account.

Introduction

Modern image captioning systems typically employ a "CNN-RNN" pipeline where a Convolutional Neural Network (CNN) extracts holistic image features and a Recurrent Neural Network (RNN), such as an LSTM, translates these into natural language. While effective for general scenes, this approach often suffers from "tunnel vision." Because CNNs are primarily pre-trained for image classification—a task focused on identifying a single dominant object—the resulting features frequently overlook secondary or local elements.

Standard CNN-LSTM models often fail to correctly identify small, local objects, such as mistaking a toothbrush for a baseball bat.

For instance, a model might correctly identify a person but fail to notice a small object they are holding, or misidentify it entirely due to the lack of local robustness in the global feature vector. This paper addresses this gap by proposing a dense image representation designed to capture granular details alongside global context.

Proposed Methodology

The authors introduce a multi-stage pipeline designed to generate locally robust image representations. The process moves from broad region proposals to structured feature aggregation.

The proposed pipeline: Selective Search generates region proposals, which are then processed via CNN, PCA, and Spatial Pyramid VLAD coding before being fed into an LSTM.

1. Region Proposal and Feature Extraction

Instead of analyzing the image as a single unit, the model uses Selective Search to generate hundreds of sub-region proposals. For each proposal, 4096-dimensional features are extracted from the fc7 layer of a VGG network. Unlike standard object detection, all proposals are retained to ensure a dense sampling of the image space.

2. Dimensionality Reduction and VLAD Coding

To manage the computational load of processing hundreds of regions, the 4096-D features are compressed using Principal Component Analysis (PCA) to 128 or 256 dimensions. These compressed features are then aggregated using Vector of Locally Aggregated Descriptors (VLAD). VLAD clusters local features into "codewords" and stores the residuals (the difference between a feature and its nearest cluster center), providing a richer statistical summary than simple averaging.

3. Spatial Pyramid Integration

To preserve the spatial layout of the scene, the authors employ a Spatial Pyramid. The image is divided into various grid configurations (1x1, 2x2, and 3x1), and VLAD coding is performed within each cell. This ensures that the final representation knows not just what objects are present, but roughly where they are located.

Experimental Results

The model was evaluated on the MS COCO dataset, involving approximately 160,000 images and over 60 million region proposals.

  • Efficiency: The VLAD-coded representation achieved performance parity with standard CNN features while utilizing only 3% of the original dimensionality (256-D vs 4096-D).
  • Accuracy: The proposed model achieved a BLEU-4 score of 18.9, outperforming the holistic CNN baseline of 18.7.
  • Spatial Utility: Models utilizing the Spatial Pyramid (Levels 2 or 3) consistently outperformed global VLAD blocks, confirming that spatial context is vital for coherent captioning.

Qualitatively, the model often produced more detailed captions than human ground truth, identifying secondary objects like cell phones that humans occasionally omitted in their summaries.

Discussion and Conclusion

While the proposed method excels at capturing local details, it faces challenges with "simple" images containing only a single subject. In these cases, the spatial pyramid can lead to "hallucinations" or poor descriptions of the main object. Future work may involve moving from fixed grids to learned spatial pyramids that adapt to the specific region proposals of an image. Additionally, integrating this dense representation with modern attention-based LSTMs could further enhance captioning performance.

By bridging the gap between holistic classification features and local scene details, this approach provides a more robust foundation for automated image understanding.

Summary updated

Abstract

The workflow of extracting features from images using convolutional neural networks (CNN) and generating captions with recurrent neural networks (RNN) has become a de-facto standard for image captioning task. However, since CNN features are originally designed for classification task, it is mostly concerned with the main conspicuous element of the image, and often fails to correctly convey information on local, secondary elements. We propose to incorporate coding with vector of locally aggregated descriptors (VLAD) on spatial pyramid for CNN features of sub-regions in order to generate image representations that better reflect the local information of the images. Our results show that our method of compact VLAD coding can match CNN features with as little as 3% of dimensionality and, when combined with spatial pyramid, it results in image captions that more accurately take local elements into account.
BibTeX
@misc{shin2016dense,
  author = {Andrew Shin and Masataka Yamaguchi and Katsunori Ohnishi and Tatsuya Harada},
  title = {{Dense Image Representation with Spatial Pyramid VLAD Coding of CNN for Locally Robust Captioning}},
  year = {2016},
  eprint = {1603.09046},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1603.09046},
}
Figure