Introduction
Semantic segmentation aims to assign a categorical label to every pixel in an image. A core challenge in this task is effective context aggregation. While traditional methods like Atrous Spatial Pyramid Pooling (ASPP) capture context across multiple spatial scales, they often struggle to distinguish between pixels of the same object class and those of different classes. Recent relational methods, such as self-attention, attempt to relate every pixel to every other pixel, but these are computationally intensive and do not explicitly leverage the categorical structure of objects.
This paper introduces Object-Contextual Representations (OCR). Instead of characterizing a pixel by its spatial neighbors, OCR defines a pixel's representation based on its relationship to learned object regions. By explicitly supervising the formation of these regions, OCR achieves state-of-the-art performance with high computational efficiency.
Methodology
The OCR framework follows a three-step pipeline to augment pixel-level features with object-level context.
- Soft Object Regions: The model generates a coarse segmentation map. Crucially, this stage is supervised by ground-truth labels, ensuring the "soft" regions correspond to actual semantic categories (e.g., "car", "road").
- Object Region Representations: For each category, the model aggregates features from all pixels predicted to belong to that class, creating a "prototype" vector representing the entire object category within the image.
- Object-Contextual Representation (OCR): The final representation for each pixel is computed by relating the pixel's initial feature to every object region prototype. Each pixel is then augmented by a weighted sum of these prototypes, effectively asking, "How much do I belong to the 'car' region versus the 'road' region?"
Experiments and Results
The authors evaluated OCR on several major benchmarks, including Cityscapes, ADE20K, PASCAL-Context, and COCO-Stuff.
Key Findings
- Supervision Impact: Learning object regions under ground-truth supervision is significantly more effective than unsupervised clustering. Ablation studies show a notable mIoU jump just by adding this supervision.
- Efficiency: By aggregating pixels into $K$ class prototypes before computing relations, OCR avoids the $N \times N$ complexity of standard self-attention. Compared to other relational methods like DANet, OCR uses significantly less GPU memory and is nearly 3x faster.
- State-of-the-Art Performance: At the time of publication, the "HRNet + OCR + SegFix" entry ranked 1st on the Cityscapes leaderboard. On Cityscapes, OCR improved a dilated ResNet-101 baseline from 75.8% to 79.6% mIoU.
Conclusion
OCR shifts the focus of context aggregation from spatial proximity to semantic object membership. By leveraging supervised object regions, the method provides a robust and efficient way to enhance pixel representations. While the quality of the final output depends on the initial coarse segmentation, the approach's generalizability and efficiency make it a powerful tool for various dense prediction tasks.
Summary updated