Sparse R-CNN: End-to-End Object Detection With Learnable Proposals

Peize Sun, Rufeng Zhang, Yi Jiang, Tao Kong, Chenfeng Xu, Wei Zhan, Masayoshi Tomizuka, Lei Li, Zehuan Yuan, Changhu Wang, Ping Luo

Abstract

Sparse R-CNN is a paradigm-shifting object detector that replaces the traditional "dense-to-sparse" pipeline with a purely sparse approach. By using a small, fixed set of learnable proposal boxes and features, it achieves state-of-the-art performance (45.0 AP on COCO) while completely eliminating the need for hand-designed anchors, many-to-one label assignment, and Non-Maximum Suppression (NMS) post-processing.

Introduction

For years, object detection has been dominated by the "dense prior" convention. Detectors like RetinaNet or Faster R-CNN rely on thousands of pre-defined anchor boxes or reference points spread across an image grid. This approach has three major drawbacks:

  1. Redundancy: It produces thousands of overlapping predictions, requiring a messy post-processing step called Non-Maximum Suppression (NMS) to filter out duplicates.
  2. Complexity: Training requires complex "many-to-one" label assignment rules to decide which of the thousands of anchors matches a specific ground-truth object.
  3. Heuristics: Performance is highly sensitive to the manually chosen sizes and aspect ratios of these anchors.
Comparison of object detection paradigms: (a) Dense (RetinaNet), (b) Dense-to-Sparse (Faster R-CNN), and (c) Sparse (Sparse R-CNN).

While the DETR (Detection Transformer) model recently introduced a sparse alternative, it relies on global attention mechanisms where every object query interacts with every pixel in the image, leading to slow convergence. Sparse R-CNN aims to provide a "purely sparse" method that is efficient, fast to converge, and easy to implement.

Methodology

Sparse R-CNN introduces three core innovations to achieve high performance with only ~100 proposals:

  • Learnable Proposal Boxes ($N \times 4$): Instead of using a Region Proposal Network (RPN) to generate candidates from anchors, Sparse R-CNN uses a fixed set of $N$ bounding boxes that are treated as parameters of the network. These boxes are "learned" during training to represent the statistical distribution of object locations in the dataset.
  • Learnable Proposal Features ($N \times d$): Each proposal box is paired with a high-dimensional latent vector. While the box provides a rough location, the feature vector is intended to encode rich instance characteristics like pose and shape.
  • Dynamic Instance Interactive Head: For each proposal, the network uses its proposal feature to generate the weights for a series of convolutions. These customized convolutions then process the image features (extracted via RoIAlign) for that specific box, effectively giving each object candidate its own "exclusive" detector head.
  • Iterative Refinement: The model applies these steps across multiple stages (usually 6), where the predicted boxes and features from one stage serve as the proposals for the next, gradually honing in on the objects.

Key Results and Insights

The authors evaluated Sparse R-CNN on the MS COCO 2017 benchmark. Using a ResNet-50 backbone, Sparse R-CNN achieved 45.0 AP, outperforming the well-established Faster R-CNN (40.2 AP) and matching or exceeding DETR performance.

Sparse R-CNN achieves state-of-the-art accuracy with significantly faster convergence than DETR, reaching peak performance within a standard 3x training schedule.
  • Sparsity is Sufficient: The most striking finding is that 100 well-learned proposals are enough to cover an image effectively, provided the network can refine them.
  • Faster Convergence: Unlike DETR, which requires 500 epochs to reach peak performance, Sparse R-CNN achieves better results in just 36 epochs (a 10x speedup). This is because it uses RoIAlign to focus on local regions rather than attending to the entire image at once.
  • End-to-End Simplicity: By using a bipartite matching loss, the model ensures a one-to-one mapping between predictions and ground truth, removing the need for NMS and making the inference pipeline much cleaner.

Discussion and Future Work

While Sparse R-CNN is a major step forward, some areas remain for exploration. The model relies on a fixed number of proposals ($N$), which might require tuning for extremely crowded scenes. Additionally, generating parameters for convolutions on the fly adds a layer of implementation complexity compared to standard fixed-weight detectors. Future work could extend this sparse, learnable proposal framework to tasks like instance segmentation or video object tracking.

Summary updated

BibTeX
@inproceedings{sun2021sparse,
  author = {Peize Sun and Rufeng Zhang and Yi Jiang and Tao Kong and Chenfeng Xu and Wei Zhan and Masayoshi Tomizuka and Lei Li and Zehuan Yuan and Changhu Wang and Ping Luo},
  title = {{Sparse R-CNN: End-to-End Object Detection With Learnable Proposals}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01422},
}
Figure