Spatial-Aware Graph Relation Network for Large-Scale Object Detection

Hang Xu, Chenhan Jiang, Xiaodan Liang, Zhenguo Li

Abstract

Large-scale object detection involves recognizing thousands of categories, often characterized by long-tail distributions and significant visual similarities between classes. Traditional detectors treat image regions in isolation or rely on rigid external knowledge. We introduce the Spatial-aware Graph Relation Network (SGRN), a framework that learns adaptive, sparse, and spatial-aware relationships directly from image data. By employing learnable Gaussian kernels to model relative layouts and a Relation Learner for sparse connectivity, SGRN achieves substantial performance improvements—up to 32% mAP on Visual Genome—without requiring external linguistic graphs.

Introduction: The Challenge of Large-Scale Detection

While standard object detection has matured on datasets like MS-COCO (80 classes), scaling to thousands of categories introduces significant hurdles. Large-scale datasets suffer from long-tail distributions, where rare classes lack sufficient training data, and category confusion, where visually similar objects (e.g., "van" vs. "bus") are difficult to distinguish in isolation.

Existing relational models often fall into two traps: handcrafted linguistic graphs that lack image-specific context, or fully-connected graphs that introduce excessive noise and computational cost by connecting every region to every other region.

Comparison of graph modeling approaches: (a) Handcraft Knowledge Graph, (b) Fully Connected Graph, (c) Proposed Spatial-aware Sparse Graph, and (d) Propagation with Gaussian Kernels.

Methods: The SGRN Framework

The SGRN is a modular architecture designed to enhance standard detectors like Faster R-CNN or FPN. It refines proposal features by reasoning over a learned graph structure that captures both semantic and geometric context.

The SGRN architecture, featuring the Relation Learner for sparse adjacency and the Spatial Graph Reasoning module using learnable Gaussian kernels.

Relation Learner Module

To avoid the noise of fully-connected graphs, the Relation Learner identifies a sparse adjacency matrix. It projects visual features into a latent space and retains only the top $t$ strongest connections for each region. This ensures the model focuses on the most informative contextual neighbors, filtering out irrelevant background distractors.

Visual Embeddings via Classifier Weights

SGRN leverages the detector's own classification layer weights as category "prototypes." This internal knowledge base is more aligned with visual features than external word vectors. These prototypes are associated with image regions through a soft-mapping mechanism based on initial classification scores, bridging the gap between semantic categories and visual regions.

Spatial Graph Reasoning

The core innovation lies in the use of learnable spatial Gaussian kernels. Unlike standard Graph Convolutional Networks (GCNs), SGRN incorporates the relative distance and angle (polar coordinates) between regions. This allows the network to learn spatially specific rules—for instance, recognizing that a "saddle" typically appears on top of a "horse," whereas a "tree" is usually above the "ground."

Key Results and Insights

The SGRN was evaluated on Visual Genome (VG), ADE, and MS-COCO, consistently outperforming state-of-the-art baselines:

  • Performance Gains: On Visual Genome with 3,000 classes, SGRN achieved a 32% relative improvement in mAP over the FPN baseline. On the ADE dataset, it saw a 28% relative boost.
  • Sparsity and Geometry: Results indicate that pruning weak edges (sparsity) reduces "distractor" noise, while spatial awareness (Gaussian kernels) allows for more nuanced reasoning about object layouts.
  • Transferability: Modules trained on one dataset (VG) showed high transferability to others (ADE), suggesting the model learns fundamental rules of visual relationships that generalize across domains.

Conclusion

The Spatial-aware Graph Relation Network demonstrates that modeling object relationships through adaptive, sparse, and spatially-informed graphs is a powerful strategy for large-scale detection. By moving beyond rigid handcrafted rules and noisy dense connections, SGRN provides a robust framework for understanding complex visual scenes. Future work may extend this spatial reasoning to temporal domains in video or 3D environments where spatial layouts are even more critical.

Summary updated

BibTeX
@inproceedings{xu2019spatial,
  author = {Hang Xu and Chenhan Jiang and Xiaodan Liang and Zhenguo Li},
  title = {{Spatial-Aware Graph Relation Network for Large-Scale Object Detection}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00952},
}
Figure