QueryDet: Cascaded Sparse Query for Accelerating High-Resolution Small Object Detection

Chenhongyi Yang, Zehao Huang, Naiyan Wang

Abstract

Detecting small objects efficiently remains a significant challenge in computer vision due to the high computational cost of processing high-resolution feature maps. We present QueryDet, a novel detection framework that utilizes a "Cascade Sparse Query" (CSQ) mechanism to accelerate high-resolution object detection. By predicting coarse locations of small objects on low-resolution maps and restricting dense computations to these regions on high-resolution maps, QueryDet achieves a 3.0× speedup on the COCO dataset while simultaneously improving small object detection accuracy.

Introduction

Small object detection is a critical yet computationally expensive task. Standard detectors like RetinaNet often struggle with objects occupying only a few pixels. While increasing image resolution or adding high-resolution feature layers (e.g., a $P_2$ layer in a Feature Pyramid Network) improves accuracy, it introduces a "computational tax" that grows quadratically with resolution. For instance, adding a $P_2$ layer can increase computation by 300%, reducing frame rates from 13.6 FPS to 4.85 FPS. QueryDet addresses this by observing that small objects are spatially sparse, and most high-resolution computation is wasted on background pixels.

Methodology: Cascade Sparse Query (CSQ)

The core of QueryDet is the Cascade Sparse Query mechanism, which treats high-resolution feature maps as a searchable database rather than a uniform grid for dense computation.

Architecture and Sparse Heads

QueryDet augments standard detectors with a "Query Head" in parallel with classification and regression heads. This head operates on low-resolution feature maps (e.g., $P_3$) to predict a heatmap indicating potential small object locations. These predictions serve as "keys" to trigger sparse computation on the subsequent high-resolution layer ($P_2$).

QueryDet Architecture: The model uses a Feature Pyramid Network where high-resolution layers (P2, P3) are computed sparsely based on queries from lower-resolution layers.

Implementation Details

  1. Sparse Computation: The model only computes high-resolution features at predicted locations, utilizing sparse convolutions (spconv) to ensure hardware efficiency.
  2. Cascading: This process is recursive; for example, $P_4$ guides $P_3$, which then guides $P_2$.
  3. Loss Re-balancing: To handle the disparity in sample counts between low and high-resolution layers, a re-balancing weight ($\beta_l$) is applied during training.

Experimental Results

QueryDet was evaluated on the COCO and VisDrone datasets. VisDrone is particularly relevant as it features drone-shot imagery dominated by small objects like pedestrians and vehicles.

Performance and Efficiency

On COCO, QueryDet improved the baseline RetinaNet by 1.1 mAP overall and 2.0 $AP_S$ for small objects. Crucially, it achieved a 3.0× speedup compared to dense high-resolution detectors, maintaining approximately 14.9 FPS where dense models dropped to 4.8 FPS. On VisDrone, QueryDet established a new state-of-the-art, improving mAP by 2.1 and $AP_{50}$ by 3.2 while being 2.3× faster than the high-resolution baseline.

Performance Trade-offs: QueryDet (QD) significantly outperforms baseline RetinaNet (RN) in both speed (FPS) and accuracy (AP/AR) across COCO and VisDrone datasets.

Discussion and Conclusion

QueryDet demonstrates that spatial sparsity is a significant advantage for small object detection. By adopting a coarse-to-fine logic—using low resolution to determine "where" and high resolution to determine "what"—the framework effectively eliminates redundant background computation. While the model can occasionally miss objects if the initial query fails or perform unnecessary work for large objects, its efficiency gains are substantial. Future work includes extending this query-based approach to 3D object detection in LiDAR point clouds, where spatial sparsity is even more pronounced.

Summary updated

BibTeX
@misc{yang2021querydet,
  author = {Chenhongyi Yang and Zehao Huang and Naiyan Wang},
  title = {{QueryDet: Cascaded Sparse Query for Accelerating High-Resolution Small Object Detection}},
  year = {2021},
  eprint = {2103.09136},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.09136},
}
Figure