Non-local RoI for Cross-Object Perception

Shou-Yao Roy Tseng, Hwann-Tzong Chen, Shao-Heng Tai, Tyng-Luh LiuarXiv 2018

Abstract

Standard two-stage object detectors treat region proposals as independent entities, often neglecting the rich contextual relationships between objects in a scene. This paper introduces the Non-local RoI (NL-RoI) module, a lightweight, plug-and-play component that utilizes an attention mechanism to enable cross-object communication. By aggregating features from all proposals based on their semantic and spatial correlations, NL-RoI enhances the feature representation of each region. Experimental results on the COCO dataset demonstrate consistent improvements in both object detection and instance segmentation across various backbones.

Introduction

In modern object detection frameworks like Faster R-CNN, the pipeline typically involves generating Regions of Interest (RoIs) and subsequently classifying them. A significant limitation of this approach is the "island" problem: each RoI is processed in isolation. While deep backbones capture some global context, this information is often diluted by the time the model reaches the RoI-specific heads.

The absence of explicit cross-object reasoning can lead to misclassifications in ambiguous scenarios. For instance, a blurry object on a sidewalk is more likely to be a pedestrian if the surrounding context includes cars and road markings. NL-RoI addresses this by re-introducing global scene context directly into the RoI feature refinement stage.

Methodology: Non-local RoI Module

The NL-RoI module is inspired by non-local operations in computer vision and self-attention mechanisms in natural language processing. It allows each region proposal to "attend" to every other proposal in the image to capture spatial and semantic dependencies.

Overview and detailed architecture of the NL-RoI module. (a) shows the high-level integration into the R-CNN pipeline, while (b) details the internal attention and feature aggregation mechanism.

Core Mechanism

The module performs three primary steps:

  1. Correlation Calculation: For a target RoI, it computes a correlation score with all $N$ other proposals using an "Embedded Gaussian" function.
  2. Feature Aggregation: It computes a weighted sum of the features of all other proposals, where the weights are determined by the correlation scores. This produces a "non-local" feature vector capturing the target's relationship to the rest of the scene.
  3. Integration: To maintain efficiency, the module uses 1x1 convolutions for dimensionality reduction and global 2D average pooling. The final non-local features are concatenated with the original RoI features before being passed to the classification and regression heads.

Experimental Results

The authors evaluated NL-RoI on the COCO 2017 dataset using Faster R-CNN and Mask R-CNN frameworks with ResNet-50 and ResNet-101 backbones.

Performance comparison on COCO for Mask R-CNN. The NL-RoI module consistently improves both bounding box (AP^box) and mask (AP^mask) accuracy across different training schedules and backbones.

Key findings include:

  • Consistent Gains: NL-RoI provided a boost of 0.5% to 0.8% Average Precision (AP) for Faster R-CNN across different backbones.
  • Improved Efficiency: Models equipped with NL-RoI and trained on a "1x" schedule (shorter training) often outperformed baseline models trained for twice as long ("2x" schedule).
  • Instance Segmentation: For Mask R-CNN, both box and mask AP saw significant improvements. For example, with a ResNet-50 backbone, mask AP increased from 34.48 to 35.26.

Discussion and Conclusion

The NL-RoI module demonstrates that "objects are social"—their identity is intrinsically linked to their surroundings. By providing a flexible, architecture-agnostic bridge for cross-object communication, NL-RoI improves the robustness of two-stage detectors.

While the gains are slightly less pronounced with extremely deep backbones or very long training cycles—suggesting that massive models eventually learn some context implicitly—NL-RoI remains a valuable tool for efficient and accurate perception. Future work may extend this concept to one-stage detectors or incorporate explicit semantic supervision for object relationships.

Summary updated

BibTeX
@misc{tseng2018non,
  author = {Shou-Yao Roy Tseng and Hwann-Tzong Chen and Shao-Heng Tai and Tyng-Luh Liu},
  title = {{Non-local RoI for Cross-Object Perception}},
  year = {2018},
  eprint = {1811.10002},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.10002},
}
Figure