Deep image representations using caption generators

Konda Reddy Mopuri, Vishal B. Athreya, R. Venkatesh BabuarXiv 2017

Abstract

Deep learning exploits large volumes of labeled data to learn powerful models. When the target dataset is small, it is a common practice to perform transfer learning using pre-trained models to learn new task-specific representations. However, pre-trained CNNs for image recognition are provided with limited information about the image during training—the label alone. Tasks such as scene retrieval suffer from features learned from this weak supervision and require stronger supervision to better understand the contents of the image. In this paper, we exploit the features learned from caption-generating models to learn novel task-specific image representations. In particular, we consider the state-of-the-art captioning system Show and Tell and the dense region description model DenseCap. We demonstrate that, owing to richer supervision provided during training, the features learned by the captioning system perform better than those of CNNs. Further, we train a Siamese network with a modified pairwise loss to fuse these features and learn image representations suitable for retrieval. Experiments show that the proposed fusion exploits the complementary nature of the individual features and yields state-of-the-art retrieval results on benchmark datasets.

Introduction

Most deep learning models for computer vision are trained using "weak supervision," specifically category labels like "dog" or "chair." While effective for classification, these labels fail to capture the rich context of a scene, such as the interactions between objects or the specific environment. For instance, a label-based model might struggle to distinguish between a dog sitting on a sofa and a dog running on a beach, as both are simply labeled "dog."

A complex scene where simple labels like "dog" or "horse" fail to capture the relational context of the fence.

Tasks like image retrieval require "stronger supervision" to learn representations that truly understand image content. The authors argue that human-written captions provide this necessary structural and relational data, forcing the model to learn more nuanced visual features than category labels alone.

Methodology

The proposed framework leverages the strong supervision inherent in captions through three main components:

1. Feature Extraction

  • Full Image Caption (FIC) Features: Using the Show and Tell model, features are extracted from the image encoding layer—the bridge between the CNN backbone and the RNN decoder. This captures the global "gist" of the scene.
  • DenseCap Features: The DenseCap model generates descriptions for multiple local regions. The top-K region features are mean-pooled to create a vector representing specific local details.
The feature extraction pipeline leveraging an Inception V3 backbone and an LSTM to generate Full Image Caption (FIC) features.

2. Feature Fusion via Siamese Network

Because FIC (global summary) and DenseCap (local details) are complementary, they are concatenated and fed into a Siamese network. This twin-branch architecture learns a unified, discriminative embedding space where similar scenes are mapped closer together.

3. Modified Contrastive Loss

Standard retrieval models often use binary similarity labels. However, human perception of similarity is often graded. The authors modified the traditional contrastive loss function to handle non-binary relevance scores (e.g., 0 to 3), penalizing the network more heavily when it fails to distinguish highly relevant pairs from irrelevant ones.

Experimental Results

The models were evaluated on two ranking datasets designed for graded relevance: rPascal (1,835 images) and rImagenet (3,354 images). Relevance scores were derived from human annotators on a scale of 0 to 3.

Using normalized Discounted Cumulative Gain (nDCG) as the primary metric, the results demonstrated:

  • Superiority over CNNs: FIC features alone significantly outperformed standard Inception V3 features that were not fine-tuned for the task.
  • State-of-the-Art Performance: The fused model (FIC + DenseCap) outperformed previous methods, including the "Attribute Graph" approach, on both benchmarks.
  • Qualitative Success: Visual analysis confirmed that the model successfully ranked images in decreasing order of relevance, correctly identifying complex scene similarities that simple object-label models would miss.

Conclusion

This research demonstrates that image representations learned from caption generation models are significantly more powerful for image retrieval than those learned from standard object classification. By fusing global scene summaries with dense local region descriptions, the model achieves a more "natural" embedding space that aligns closely with human similarity judgments. Future work may explore other sources of strong supervision to further bridge the gap between vision and language.

Summary updated

BibTeX
@misc{mopuri2017deep,
  author = {Konda Reddy Mopuri and Vishal B. Athreya and R. Venkatesh Babu},
  title = {{Deep image representations using caption generators}},
  year = {2017},
  eprint = {1705.09142},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.09142},
}
Figure