Coarse to Fine: Multi-label Image Classification with Global/Local Attention

Fan Lyu, Fuyuan Hu, Victor S. Sheng, Zhengtian Wu, Qiming Fu, Baochuan FuISC2 2018

Abstract

In our daily life, the scenes around us are always with multiple labels especially in a smart city, i.e., recognizing the information of city operation to response and control. Great efforts have been made by using Deep Neural Networks to recognize multi-label images. Since multi-label image classification is very complicated, people seek to use the attention mechanism to guide the classification process. However, conventional attention-based methods always analyzed images directly and aggressively. It is difficult for them to well understand complicated scenes. In this paper, we propose a global/local attention method that can recognize an image from coarse to fine by mimicking how human-beings observe images. Specifically, our global/local attention method first concentrates on the whole image, and then focuses on local specific objects in the image. We also propose a joint max-margin objective function, which enforces that the minimum score of positive labels should be larger than the maximum score of negative labels horizontally and vertically. This function can further improve our multi-label image classification method. We evaluate the effectiveness of our method on two popular multi-label image datasets (i.e., Pascal VOC and MS-COCO). Our experimental results show that our method outperforms state-of-the-art methods.

Introduction

Multi-label image classification—identifying all the different objects in a single picture—is significantly harder than single-label classification. In a typical "smart city" scenario, an image might contain cars, pedestrians, traffic lights, and buildings, often overlapping in complex ways.

Existing methods often analyze the entire image indiscriminately, wasting computational resources on redundant background information. While some models use attention mechanisms to focus on specific areas, they often do so "aggressively" or directly, skipping the vital context of the whole scene. The challenge lies in filtering out irrelevant data while capturing the complex dependencies between different labels.

Proposed Method: Global and Local Attention

The researchers developed a hierarchical encoder-decoder architecture that mimics the human visual system's "coarse-to-fine" observation process. Instead of identifying every object at once, the model first takes a global "glance" before zooming in on specific details.

1. Global Attention (The "Glance")

The model uses a VGG-16 CNN encoder to extract features. It computes a "global attention" map from the final convolutional layer, providing an overview of the image and highlighting general areas where objects are likely to exist. Crucially, this global context is used to initialize the hidden state of the Recurrent Neural Network (RNN) decoder, preventing the "blind search" problem common in sequential prediction.

2. Local Attention (The "Zoom")

As the RNN (specifically an LSTM) predicts labels one by one, it generates a "local attention" map at each step. This forces the model to focus on a specific, fine-grained region relevant to the current object it is identifying.

Overview of the global/local attention architecture

3. Joint Max-Margin Objective

To improve accuracy, the authors introduced a two-way loss function:

  • Horizontal Max-Margin: Ensures the lowest score for a correct (positive) label is higher than the highest score for an incorrect (negative) label across the image.
  • Vertical Max-Margin: Ensures that for any specific class, positive predictions across different time steps are clearly separated from negative ones.

Experimental Results

The model was evaluated on two industry-standard benchmarks: Pascal VOC 2007 (~10,000 images, 20 classes) and MS-COCO (~123,000 images, 80 classes).

The proposed model, referred to as VGG+LSTM+L/G+MM, achieved state-of-the-art results:

  • Pascal VOC 2007: Achieved a Mean Average Precision (mAP) of 85.6%. Notably, it outperformed methods like "HCP-2000C" without requiring additional pre-training on thousands of extra classes.
  • MS-COCO: Achieved an mAP of 64.64%, a significant jump over the standard VGG+LSTM baseline (61.54%).
Visualization of global and local attention maps across different object classes

Ablation studies showed that adding Global attention (G) and the Max-Margin (MM) loss consistently improved performance over using Local attention (L) alone. Visualizations (as seen above) confirm that the global attention captures the overall scene structure, while local attention successfully isolates specific instances like horses, persons, or vehicles.

Conclusion

By adopting a coarse-to-fine strategy, this research demonstrates that mimicking human psychology—looking at the forest before the trees—is as effective for neural networks as it is for humans. While MS-COCO remains a difficult hurdle due to its scale and label imbalance (e.g., the frequency of the "person" label), the global/local attention framework provides a robust foundation for understanding complex multi-label scenes.

Summary updated

BibTeX
@inproceedings{lyu2018coarse,
  author = {Fan Lyu and Fuyuan Hu and Victor S. Sheng and Zhengtian Wu and Qiming Fu and Baochuan Fu},
  title = {{Coarse to Fine: Multi-label Image Classification with Global/Local Attention}},
  booktitle = {ISC2},
  year = {2018},
  url = {https://openreview.net/forum?id=R9s2jSrI2J},
}
Figure