TL;DR
This paper introduces HANet, a novel "add-on" module for semantic segmentation that leverages the inherent vertical structure of urban scenes. By selectively attending to features based on their vertical position, HANet significantly improves segmentation accuracy on datasets like Cityscapes with minimal computational overhead, achieving state-of-the-art results.
What Problem Does This Paper Address?
Semantic segmentation, a crucial task for understanding images, aims to classify every pixel into a specific category. While existing methods like FCNs, U-Nets, and DeepLab have made great strides, they often treat all parts of an image uniformly. However, urban scenes captured from a vehicle's perspective have a distinct structure: roads dominate the lower part, buildings and vegetation occupy the middle, and the sky is in the upper region. Most current segmentation networks fail to explicitly exploit this inherent vertical positional information, leading to suboptimal performance, especially for classes with strong vertical dependencies. This paper addresses this gap by proposing a method that explicitly models and utilizes these vertical priors.
Methods
The core contribution is the Height-driven Attention Network (HANet), a general-purpose module designed to be easily integrated into existing semantic segmentation architectures. HANet works by:
- Width-wise Pooling: It first aggregates feature information across the width of each horizontal "row" of a feature map, creating a height-wise representation.
- Interpolation: This height-wise representation is then downsampled to create a coarser representation of vertical context.
- Height-driven Attention Map Generation: A series of 1D convolutional layers process this coarse representation to generate a height-driven attention map. Crucially, these convolutions consider the relationship between adjacent rows, unlike global attention mechanisms.
- Positional Encoding (Optional): The authors also incorporate sinusoidal positional encodings to further inject explicit vertical position information.
- Feature Re-weighting: The generated attention map is then used to scale the features of the higher-level feature map, emphasizing informative features based on their vertical location.
This module can be inserted at multiple layers within a segmentation network, with the authors demonstrating its effectiveness when applied to the ASPP (Atrous Spatial Pyramid Pooling) module in DeepLabv3+.
Datasets
The paper primarily uses the following datasets:
- Cityscapes: A widely used dataset for urban-scene semantic segmentation, containing finely annotated images of street scenes. The authors use both training and validation sets for experiments and ablation studies.
- BDD100K (Berkeley Deep Drive): A large-scale and diverse driving video dataset, used to demonstrate the generalizability of HANet across different urban driving scenarios (day, night, various weather conditions).
Key Insights and Ideas
- Vertical Structure is Key for Urban Scenes: The paper strongly argues and demonstrates that urban scenes possess a predictable vertical structure (road at bottom, sky at top) that is largely ignored by standard segmentation models.
- Height-Specific Context Matters: By analyzing class distributions across different vertical image regions, the authors show that the probability of certain classes varies dramatically with height, justifying the need for height-aware processing.
- Lightweight and Generalizable Module: HANet is designed as a plug-and-play module, meaning it can be added to various backbone architectures (ShuffleNetV2, MobileNetV2, ResNet) and segmentation frameworks (DeepLabv3+) with minimal computational cost.
- Attention Beyond Global Context: Unlike many attention mechanisms that consider global image context, HANet's 1D convolutions specifically capture local vertical relationships between adjacent rows, which is more suitable for exploiting the structured nature of urban scenes.
Key Results
- State-of-the-Art Performance: HANet, when added to a ResNet-101 backbone with DeepLabv3+, achieved a new state-of-the-art mIoU of 80.29% on the Cityscapes validation set, outperforming previous methods by a significant margin.
- Consistent Improvement: The module consistently improved mIoU across various backbone networks (ShuffleNetV2, MobileNetV2, ResNet-50, ResNet-101) and output strides.
- Minimal Computational Overhead: The addition of HANet resulted in only a marginal increase in model parameters and FLOPs, making it a highly cost-effective enhancement.
- Improved Performance in Specific Regions: Ablation studies showed that HANet's performance gains were particularly pronounced in the upper and lower regions of the image, aligning with the hypothesis that these regions have more distinct class distributions.
- Effective on BDD100K: The method also showed superior results on the BDD100K dataset, demonstrating its applicability beyond Cityscapes.
- Interpretable Attention Maps: Visualizations of the attention maps confirmed that HANet learns to assign different weights to channels based on vertical position, correlating with the actual class distributions.
Limitations and Future Work
- Hyperparameter Tuning: The paper mentions that the choice of pooling method (average vs. max) and the interpolation factor are hyperparameters that can be tuned.
- General Scene Segmentation: While effective for urban scenes, the paper focuses on the specific vertical priors of these environments. Its effectiveness on more general scene segmentation datasets with less predictable vertical structure is not extensively explored.
- Future Work: The authors suggest exploring the use of learnable positional embeddings and comparing their method with other coordinate-based approaches like CoordConv, which they did to some extent, showing HANet's superiority. The potential to integrate HANet into other tasks beyond semantic segmentation could also be a future direction.
Summary updated