Adaptive Pyramid Context Network for Semantic Segmentation

Junjun He, Zhongying Deng, Lei Zhou, Yali Wang, Yu Qiao

Introduction

Semantic segmentation—the task of assigning a specific category label to every pixel in an image—remains a fundamental challenge in computer vision. Objects within a scene often exhibit significant variations in scale, shape, and occlusion, making pixel-level classification difficult. While standard Convolutional Neural Networks (CNNs) have revolutionized the field, they are often constrained by a limited "receptive field." This local focus can lead to ambiguity; for instance, a patch of white texture might be indistinguishable between a horse's leg and a patch of snow without broader context.

To resolve these ambiguities, researchers have integrated context-aware methods. However, existing approaches like PSPNet or DeepLab often rely on fixed pooling regions that do not adapt to image content, fail to capture context at sufficient scales simultaneously, or ignore the "global-local" gap—calculating relationships between pixels based only on local similarities while neglecting the global representation that should guide those associations.

The Adaptive Context Module (ACM)

This paper introduces the Adaptive Pyramid Context Network (APCNet), which addresses these limitations through the Adaptive Context Module (ACM). The ACM serves as the core building block, utilizing two parallel branches to process information at a given scale:

  1. The Affinity Branch: This novel component calculates "affinity coefficients" by integrating local features with a global image representation. By leveraging the global "vibe" of the image, the network intelligently determines which sub-regions are relevant to the specific pixel being analyzed.
  2. The Context Branch: This branch employs adaptive pooling to extract features from various sub-regions of the image.

The resulting context vector weights sub-region features by their calculated affinities. APCNet stacks multiple ACMs in parallel to capture context across multiple scales (e.g., $1\times1, 2\times2, 3\times3, 6\times6$), concatenating these with original local features for the final prediction.

Global-guided Local Affinity (GLA)

The primary innovation of APCNet is Global-guided Local Affinity (GLA). The authors argue that local similarities alone are insufficient for accurate segmentation. For example, in a scene featuring a horse in snow, the horse's legs may visually resemble the background. By incorporating global context (the knowledge that a "horse" exists in the scene), the network can correctly associate leg pixels with the animal rather than the snowy background. Unlike previous models that use rigid, fixed weights for pyramid pooling, APCNet learns to weight regions dynamically for every unique image.

Visual comparison of APCNet variants showing the impact of multi-scale context (top) and Global-guided Local Affinity (bottom).

Experimental Results

APCNet was evaluated on three major benchmarks, setting new performance records at the time of publication:

  • PASCAL VOC 2012: The model achieved 84.2% mIoU on the test set. Notably, it reached this milestone without relying on massive external pre-training datasets like MS COCO, outperforming established models such as EncNet and PSPNet.
  • Pascal-Context: APCNet achieved 54.7% mIoU, representing a significant improvement over the previous state-of-the-art (DANet at 52.6%).
  • ADE20K: On this complex scene parsing dataset, the model reached 45.38% mIoU on the validation set.

Qualitative analysis demonstrates that APCNet excels at maintaining the consistency of large objects and capturing fine details, such as chair legs or human figures on boats, which are often lost in baseline Fully Convolutional Network (FCN) architectures.

Conclusion

APCNet advances the state-of-the-art in semantic segmentation by bridging the gap between global image representations and local pixel affinities. By making context extraction adaptive rather than rigid, the network achieves superior accuracy across diverse and complex datasets. While the multi-scale affinity calculations introduce some computational overhead, the robustness of the GLA property suggests potential applications in broader scene understanding tasks, including instance segmentation and object detection.

Summary updated

BibTeX
@inproceedings{he2019adaptive,
  author = {Junjun He and Zhongying Deng and Lei Zhou and Yali Wang and Yu Qiao},
  title = {{Adaptive Pyramid Context Network for Semantic Segmentation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00770},
}
Figure