Attention to Scale: Scale-Aware Semantic Image Segmentation

Liang-Chieh Chen, Yi Yang, Jiang Wang, Wei Xu, Alan L. Yuille

Abstract

Incorporating multi-scale features in fully convolutional neural networks (FCNs) has been a key element to achieving state-of-the-art performance on semantic image segmentation. One common way to extract multi-scale features is to feed multiple resized input images to a shared deep network and then merge the resulting features for pixelwise classification. In this work, we propose an attention mechanism that learns to softly weight the multi-scale features at each pixel location. We adapt a state-of-the-art semantic image segmentation model, which we jointly train with multi-scale input images and the attention model. The proposed attention model not only outperforms average- and max-pooling, but allows us to diagnostically visualize the importance of features at different positions and scales. Moreover, we show that adding extra supervision to the output at each scale is essential to achieving excellent performance when merging multi-scale features. We demonstrate the effectiveness of our model with extensive experiments on three challenging datasets, including PASCAL-Person-Part, PASCAL VOC 2012 and a subset of MS-COCO 2014.

Introduction

Semantic image segmentation requires the classification of every pixel in an image. A significant challenge in this task is the vast variance in object scales. For instance, a "person" category might encompass a small group of pixels in the background or a large, dominant figure in the foreground. Standard Fully Convolutional Networks (FCNs) often struggle to capture these multi-scale dependencies effectively.

Existing approaches to handle scale variance typically involve:

  1. Skip-nets: These combine features from different internal layers of a network, leveraging varying receptive fields. However, they can be computationally expensive and difficult to optimize.
  2. Share-nets: These process multiple resized versions of the input image through a shared network. While simpler, they often merge features using fixed operations like average or max-pooling, which assume uniform importance across all scales and spatial locations.

This paper argues that a "one-size-fits-all" approach to scale fusion is suboptimal. Instead, a model should dynamically determine the most relevant scale for each pixel—for example, prioritizing high-resolution features for small objects and low-resolution, global features for larger structures.

Methodology: Attention to Scale

The proposed architecture builds upon the DeepLab-LargeFOV framework, introducing a learned attention mechanism to weight multi-scale features.

Overview of the proposed attention mechanism for scale-aware segmentation.

Multi-Scale Input and Shared DCNN

The input image is resized to multiple scales (e.g., 1.0x, 0.75x, and 0.5x). Each scale is processed by a shared Deep Convolutional Neural Network (DCNN) based on VGG-16, producing scale-specific score maps.

The Attention Model

Rather than simple pooling, the internal features (from the $fc7$ layer) of each branch are fed into a small, two-layer convolutional network. This Attention Model generates a weight map for each scale. These weights are used to perform a pixel-wise weighted sum of the predictions from all scales, allowing the network to "softly" select the most appropriate scale for different image regions.

Extra Supervision

A critical finding of this work is the importance of auxiliary losses. The authors apply a loss function to the output of each individual scale branch in addition to the final merged output. This "extra supervision" ensures that each branch learns discriminative features independently, which significantly enhances the effectiveness of the final fusion.

Experimental Results

The model was evaluated on three major benchmarks: PASCAL-Person-Part, PASCAL VOC 2012, and a subset of MS-COCO 2014.

Performance and State-of-the-Art

On the PASCAL-Person-Part dataset, the attention model achieved 56.39% mIOU, surpassing average pooling (55.72%) and the single-scale baseline (51.91%). On the PASCAL VOC 2012 test set, the model reached 75.1% mIOU (76.3% with refinements), establishing a new state-of-the-art at the time.

Diagnostic Visualization

One of the primary advantages of the attention mechanism is its interpretability. By visualizing the learned weight maps, the researchers could observe the model's "decision-making" process regarding scale.

Visualization of attention maps across different scales, showing how the model focuses on different resolutions for objects of varying sizes.

The visualizations confirm that the model naturally assigns higher weights to small-scale objects in the high-resolution (Scale-1) branch and to larger objects or background regions in the lower-resolution branches.

Discussion and Limitations

While the attention mechanism provides significant gains, some challenges remain. The model can still struggle with highly complex human poses or ambiguous textures where clothing resembles body parts. Additionally, there is a limit to the benefit of adding scales; a very low resolution (e.g., 0.25x) can degrade performance as the resulting score maps become too coarse. Finally, extremely small object classes in complex datasets like MS-COCO still represent a bottleneck, suggesting the need for further specialized handling of tiny objects.

Summary updated

BibTeX
@inproceedings{chen2016attention,
  author = {Liang-Chieh Chen and Yi Yang and Jiang Wang and Wei Xu and Alan L. Yuille},
  title = {{Attention to Scale: Scale-Aware Semantic Image Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2016},
  url = {https://openreview.net/forum?id=r14Se6Wd-r},
}
Figure