Attentional Network for Visual Object Detection

Kota Hara, Ming-Yu Liu, Oncel Tuzel, Amir-massoud FarahmandarXiv 2017

Abstract

We propose augmenting deep neural networks with an attention mechanism for the visual object detection task. As perceiving a scene, humans have the capability of multiple fixation points, each attended to scene content at different locations and scales. However, such a mechanism is missing in the current state-of-the-art visual object detection methods. Inspired by the human vision system, we propose a novel deep network architecture that imitates this attention mechanism. As detecting objects in an image, the network adaptively places a sequence of glimpses of different shapes at different locations in the image. Evidences of the presence of an object and its location are extracted from these glimpses, which are then fused for estimating the object class and bounding box coordinates. Due to lacks of ground truth annotations of the visual attention mechanism, we train our network using a reinforcement learning algorithm with policy gradients. Experiment results on standard object detection benchmarks show that the proposed network consistently outperforms the baseline networks that does not model the attention mechanism.

Introduction

Traditional deep learning object detectors, such as the R-CNN family, typically operate in a "one-shot" manner. They take an initial object proposal and analyze it exactly once to determine its class and refine its boundaries. This approach differs significantly from human perception, where we perform multiple fixations, shifting our gaze to gather more detail or context. The Attentional Object Detection (AOD) network addresses this by sequentially "zooming in" or "looking around" an object proposal to refine its prediction.

Architecture and Methods

The AOD network is built as a recurrent module on top of a convolutional backbone (e.g., VGG16 or CaffeNet).

The AOD architecture uses a sequence of adaptive glimpses ($t=1$ to $T$) and fuses features via an element-wise max operation.

Sequential Glimpses

Starting from an initial proposal ($t=1$), the network extracts features using ROI pooling. A Recurrent Neural Network (RNN) then predicts parameters for the next "glimpse" ($t=2, 3, \dots, T$). Unlike models with fixed-size glimpses, AOD adaptively adjusts the location, scale, and aspect ratio of each glimpse.

Feature Fusion and Training

At the final time step, visual evidence from all glimpses is aggregated using an element-wise max operation. This allows the model to retain the strongest signals found across the entire sequence. Since ground-truth labels for intermediate glimpses do not exist, the network is trained using the REINFORCE algorithm. The reward is calculated at the final step as the product of the predicted class probability and the Intersection over Union (IoU) of the predicted box. To stabilize training, rewards are normalized per sample to reflect relative performance improvements.

Experimental Results

The model was evaluated on the PASCAL VOC 2007 and PASCAL VOC 2012 benchmarks. AOD consistently outperformed the Fast R-CNN baseline:

  • VGG16 on VOC 2007: AOD (with 3 glimpses) achieved 67.5% mAP, compared to 66.9% for the baseline.
  • CaffeNet on VOC 2007: Performance improved from 57.1% to 58.1% mAP.
  • VOC 2012: mAP increased from 65.7% to 66.7%.

The authors found that $T=3$ glimpses provided the optimal balance between accuracy and computational efficiency, with diminishing returns observed at higher step counts.

Key Insights

Qualitative analysis reveals that the network often adopts a "coarse-to-fine" strategy. Early glimpses frequently examine the context surrounding a proposal, while later glimpses zoom in on specific features for precise localization.

Qualitative example showing the network focusing on the face to confirm the object is a dog despite the lion-like mane.

Furthermore, the ability to change the aspect ratio of glimpses proved critical for detecting elongated objects like cars or boats. The element-wise max operation was also found to be superior to standard RNN hidden state propagation, as it prevents the loss of useful visual cues from earlier steps.

Conclusion and Limitations

While AOD improves detection accuracy by mimicking human attention, it introduces computational overhead due to its sequential nature. Training with reinforcement learning also adds complexity compared to standard supervised learning. Future work could involve integrating this mechanism into modern one-stage detectors or transformer-based architectures to see if the gains scale.

Summary updated

Abstract

We propose augmenting deep neural networks with an attention mechanism for the visual object detection task. As perceiving a scene, humans have the capability of multiple fixation points, each attended to scene content at different locations and scales. However, such a mechanism is missing in the current state-of-the-art visual object detection methods. Inspired by the human vision system, we propose a novel deep network architecture that imitates this attention mechanism. As detecting objects in an image, the network adaptively places a sequence of glimpses of different shapes at different locations in the image. Evidences of the presence of an object and its location are extracted from these glimpses, which are then fused for estimating the object class and bounding box coordinates. Due to lacks of ground truth annotations of the visual attention mechanism, we train our network using a reinforcement learning algorithm with policy gradients. Experiment results on standard object detection benchmarks show that the proposed network consistently outperforms the baseline networks that does not model the attention mechanism.
BibTeX
@misc{hara2017attentional,
  author = {Kota Hara and Ming-Yu Liu and Oncel Tuzel and Amir-massoud Farahmand},
  title = {{Attentional Network for Visual Object Detection}},
  year = {2017},
  eprint = {1702.01478},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1702.01478},
}
Figure