Abstract
Recent work has made significant progress in improving spatial resolution for pixelwise labeling with Fully Convolutional Network (FCN) framework by employing Dilated/Atrous convolution, utilizing multi-scale features and refining boundaries. In this paper, we explore the impact of global contextual information in semantic segmentation by introducing the Context Encoding Module, which captures the semantic context of scenes and selectively highlights class-dependent featuremaps. The proposed Context Encoding Module significantly improves semantic segmentation results with only marginal extra computation cost over FCN. Our approach has achieved new state-of-the-art results 51.7% mIoU on PASCAL-Context, 85.9% mIoU on PASCAL VOC 2012. Our single model achieves a final score of 0.5567 on ADE20K test set, which surpass the winning entry of COCO-Place Challenge in 2017. In addition, we also explore how the Context Encoding Module can improve the feature representation of relatively shallow networks for the image classification on CIFAR-10 dataset. Our 14 layer network has achieved an error rate of 3.45%, which is comparable with state-of-the-art approaches with over 10 times more layers.
Introduction
Standard semantic segmentation models based on Fully Convolutional Networks (FCNs) often suffer from "local ambiguity." Because these models make per-pixel predictions, they can misclassify pixels in isolation without considering the broader scene. For instance, a model might misidentify a windowpane as a door because they appear similar locally, even if the global context clearly indicates a bedroom where a door would not be positioned in that manner.
While techniques like dilated convolutions and pyramid pooling increase the receptive field, they do not explicitly model the semantic context of the scene. The authors of this paper propose a method for the network to "understand" the overall scene category (e.g., a kitchen), allowing it to prioritize relevant object categories (like refrigerators) while suppressing impossible ones (like airplanes).
The Context Encoding Module
The core contribution of this work is the Context Encoding Module, a plug-and-play component that can be integrated into existing FCN pipelines with minimal computational overhead. It consists of three primary elements:
- Encoding Layer: This layer aggregates feature maps from a backbone (e.g., ResNet) into a global, orderless representation by learning an inherent "dictionary" of visual codewords.
- Featuremap Attention: Utilizing the global context, the module predicts channel-wise scaling factors. These factors are multiplied by the original feature maps to selectively highlight channels related to present categories and suppress those that are absent.
- Semantic Encoding Loss (SE-loss): This auxiliary loss forces the network to predict which object categories are present in the entire image. Unlike standard pixel-wise loss, which is dominated by large areas like the sky, SE-loss gives equal weight to small and large objects, improving the network's global context awareness.
Experimental Evaluation
The resulting architecture, EncNet, was evaluated on several major benchmarks, including PASCAL-Context, PASCAL VOC 2012, and ADE20K. The results demonstrate that explicitly modeling scene statistics is more effective than simply increasing the receptive field.
- PASCAL-Context: Achieved a state-of-the-art 51.7% mIoU.
- PASCAL VOC 2012: Reached 85.9% mIoU, outperforming established models like PSPNet and DeepLabv3.
- ADE20K: Set a new benchmark with a score of 0.5567.
- CIFAR-10: A shallow 14-layer version of EncNet achieved a 3.45% error rate, comparable to much deeper state-of-the-art models.
Conclusion
EncNet demonstrates that global context acts as a powerful prior for semantic segmentation. By using the Context Encoding Module and SE-loss, the network performs a "sanity check" on per-pixel classifications, effectively eliminating contextual errors. The module is highly efficient, adding negligible latency while significantly boosting accuracy across diverse datasets. Future work may extend this strategy to other computer vision tasks such as scene parsing and general image recognition.
Summary updated