Introduction
Standard two-stage instance segmentation frameworks, such as Mask R-CNN, typically process Regions of Interest (RoIs) in isolation. Once the Region Proposal Network (RPN) identifies potential objects, the model crops these regions and extracts features independently. However, this approach ignores the rich contextual information present in the relationships between objects. In real-world scenes, objects exhibit strong co-occurrence patterns (e.g., cars and pedestrians on a street) and mutual information (e.g., similar poses in a crowd).
This paper introduces the Non-Local RoI (NL-RoI) Block, a plug-and-play module that allows the network to consider relationships between different objects. By moving away from treating RoIs as independent entities, the model leverages global context to improve segmentation accuracy, particularly in crowded or complex environments.
Methodology: The NL-RoI Block
The core innovation is the NL-RoI Block, inspired by the self-attention mechanism. Unlike standard non-local networks that operate at the pixel level, this block enables instance-to-instance communication.
How it Works
- Relation Function ($f$): For a target RoI, the block calculates a correlation score with every other RoI in the image using an "Embedded Gaussian" version of self-attention. This results in an $N \times N$ attention matrix.
- Feature Extraction ($g$): A separate branch extracts useful features from the related RoIs. To maintain efficiency, the authors use 1x1 convolutions to reduce channel dimensions and a 3x3 convolution for spatial information.
- Global Pooling and Integration: Global 2D average pooling is applied to reduce memory costs before the non-local information is "tiled" back into the original feature map. This seamless integration allows the block to be added to existing Mask R-CNN heads (classification, box regression, or mask prediction) without a total backbone redesign.
Datasets and Evaluation
The method was evaluated on several challenging benchmarks, primarily focusing on the Robust Vision Challenge (ROB) 2018:
- Cityscapes: Urban street scenes.
- Kitti Instance Segmentation: Autonomous driving data.
- WildDash: Real-world driving with visual hazards like blur and distortion.
- ScanNet: 3D reconstructed indoor scenes.
- ADE20K: Used for additional training variety.
Key Results and Insights
The NL-RoI Block provides significant improvements by enabling disambiguation through context. In crowded scenes, instance-specific information helps the network distinguish between physically touching objects of the same category.
Quantitative highlights from the Robust Vision Challenge 2018 include:
- Cityscapes: Achieved 24.0% AP and 45.8% AP50.
- Kitti: Reached 16.37% AP.
- WildDash: Demonstrated robustness with a 19.4% AP despite visual hazards.
Qualitatively, the model showed a marked ability to correctly segment individual pedestrians in dense crowds and maintain mask integrity for non-rigid objects where bounding boxes overlap significantly.
Conclusion and Future Work
The NL-RoI block offers a low-cost way to incorporate higher-level dependencies into instance segmentation. While effective, future work could address the computational overhead of the $N \times N$ correlation matrix for very high numbers of proposals. Additionally, exploring semantic guidance—where category labels explicitly direct attention—could further refine the learned correlations.
Summary updated