Abstract
Traditional object detectors treat objects as isolated entities, ignoring the rich contextual relationships present in a scene. This paper introduces the Object Relation Module, an attention-based mechanism that enables detectors to reason about object interactions by considering both appearance and relative geometry. This module facilitates improved instance recognition and allows for the replacement of hand-crafted post-processing steps, such as Non-Maximum Suppression (NMS), with a learnable network. Experimental results on the MS COCO dataset demonstrate significant accuracy improvements across various backbone architectures, paving the way for fully end-to-end object detection.
Introduction
In the current landscape of deep learning-based computer vision, state-of-the-art detectors like Faster R-CNN often process object proposals independently. While effective, this approach fails to leverage the spatial and semantic context that humans naturally use—for example, recognizing a "cat" is easier when it is seen sitting on a "sofa."
Modeling these relationships is challenging due to the arbitrary locations, scales, and varying numbers of objects in an image. Furthermore, traditional pipelines rely on Non-Maximum Suppression (NMS), a hand-crafted, non-differentiable step to prune duplicate detections. This manual bottleneck prevents the entire system from being optimized end-to-end.
Methods
The proposed Object Relation Module is inspired by the "Attention" mechanism used in Natural Language Processing (NLP). Just as an NLP model relates a word to others in a sentence, this module relates an object proposal to all other proposals in an image, enhancing its feature representation through a weighted sum of features from its neighbors.
The Core Mechanism
The module calculates weights based on two primary components:
- Appearance Weight: Measures the visual similarity between two objects.
- Geometric Weight: Captures spatial relationships using the log-distance between box centers and the log-ratio of box scales. This ensures the module remains translation and scale invariant.
Applications in Detection
The module is integrated into the detection pipeline in two key areas:
- Instance Recognition: Inserted into the detector's head, it uses context to improve classification accuracy.
- Duplicate Removal: It replaces traditional NMS by learning to identify the "correct" bounding box among duplicates based on scores and mutual relationships.
Experimental Results
The approach was evaluated on the MS COCO (Common Objects in Context) dataset, which is known for its complex scenes and numerous small objects.
Key findings include:
- Accuracy Gains: Integrating the relation module into a standard Faster R-CNN (ResNet-50) yielded a 2.3 point improvement in Mean Average Precision (mAP).
- Superior Duplicate Removal: The learnable duplicate removal network outperformed both traditional NMS and Soft-NMS.
- Architectural Universality: Improvements were consistent across different backbones, including ResNet, FPN, and Deformable ConvNets, suggesting the module captures fundamental visual reasoning missing in standard CNNs.
- End-to-End Training: The highest performance was achieved when both relational recognition and duplicate removal were trained together.
Discussion and Conclusion
A critical insight from this work is that geometric context is essential; appearance alone is insufficient for robust relational modeling. By turning duplicate removal into a learning problem, the authors have removed a significant manual hurdle in object detection.
While the $O(N^2)$ computational complexity poses challenges for dense detectors with thousands of proposals, the module remains highly effective for region-based architectures. Future work may extend this relational reasoning to tasks such as instance segmentation, action recognition, and visual question answering.
Summary updated