Abstract
Semantic segmentation requires a delicate balance between capturing broad global context and maintaining fine-grained spatial details. We present the Pyramid Attention Network (PAN), a framework that leverages the strengths of spatial pyramids and attention mechanisms. By introducing the Feature Pyramid Attention (FPA) module and the Global Attention Upsample (GAU) module, PAN effectively bridges the gap between high-level semantics and low-level pixel precision. The model achieves state-of-the-art results, including 84.0% mIoU on PASCAL VOC 2012, without the need for additional large-scale datasets like COCO.
Introduction
Assigning a category label to every pixel in an image—semantic segmentation—is hindered by a fundamental trade-off. Deep convolutional networks require a large receptive field to understand global context (e.g., identifying an object as a "car"), but they often lose the high-resolution spatial information needed for precise boundary localization.
While existing methods like Atrous Spatial Pyramid Pooling (ASPP) or Spatial Pyramid Pooling (PSPNet) address multi-scale context, they can introduce artifacts or fail to preserve fine details. Furthermore, many decoder architectures are computationally heavy. The Pyramid Attention Network (PAN) addresses these challenges by providing a streamlined approach to integrating global context with local features.
Methodology
The PAN architecture is built upon a ResNet-101 backbone and introduces two novel components designed to enhance feature representation and recovery.
Feature Pyramid Attention (FPA)
The FPA module serves as the central bottleneck between the encoder and decoder. Unlike standard pooling layers, FPA utilizes a U-shaped structure with varying convolution kernel sizes ($3\times3$, $5\times5$, and $7\times7$) to extract multi-scale information. Instead of simple concatenation, PAN employs pixel-wise attention: multi-scale features are used to weight the original feature map, highlighting important regions while suppressing noise.
Global Attention Upsample (GAU)
To recover spatial resolution efficiently, the authors propose the GAU module. In traditional architectures, low-level features are often merged with high-level features via simple addition. GAU improves this by using global average pooling on high-level features to generate a "guidance" vector. This vector weights the low-level features, ensuring that the decoder focuses on spatial details relevant to the categories identified by the deeper layers of the network.
Results and Discussion
The model was rigorously evaluated on the PASCAL VOC 2012 and Cityscapes benchmarks.
Performance Benchmarks
- PASCAL VOC 2012: PAN achieved a top-tier 84.0% mIoU on the test set. Notably, this performance was reached without pre-training on the COCO dataset, demonstrating the inherent strength of the attention modules.
- Cityscapes: The model reached 78.6% mIoU, outperforming established architectures like PSPNet and DeepLabv2 on urban scene segmentation.
Key Insights
Ablation studies confirmed that the specific pyramid structure (C357) and the inclusion of Global Pooling (GP) were critical to success. Replacing the FPA module with a standard SENet-style attention module resulted in a significant performance drop of nearly 1.8% mIoU, highlighting the value of multi-scale attention. The GAU module further demonstrated that high-level semantic knowledge can effectively gate and refine low-level spatial features, leading to cleaner object boundaries.
Conclusion
The Pyramid Attention Network demonstrates that combining multi-scale feature extraction with global attention mechanisms can significantly improve semantic segmentation performance. By using high-level features to guide the upsampling process and employing a pyramid-based attention bottleneck, PAN achieves state-of-the-art accuracy with a relatively simple and efficient decoder structure. Future work may involve adapting these modules for real-time applications on lightweight backbones, as the current implementation relies on the computationally intensive ResNet-101.
Summary updated