Learning to Generate Content-Aware Dynamic Detectors

Junyi Feng, Jiashen Hua, Baisheng Lai, Jianqiang Huang, Xi LiarXiv 2020

Abstract

Object detection traditionally relies on static architectures that treat all input images uniformly, regardless of their complexity. This paper presents CADDet (Content-Aware Dynamic Detectors), a framework that generates customized neural architectures for every input image through dynamic routing within a multi-scale supernet. By leveraging image context—specifically object scale—CADDet achieves a significant 42% reduction in computational cost (FLOPs) while maintaining competitive accuracy against state-of-the-art static models.

Introduction

In computer vision, the "one-size-fits-all" approach of static models is inherently inefficient. Real-world data exhibits extreme diversity; for instance, a high-resolution image of a crowded urban scene requires more computational resources than a simple photo of a single large object. Using a heavy model for simple images is wasteful, while a light model may fail on complex scenes.

Comparison of traditional fixed detectors versus context-aware dynamic detectors across various scenarios.

CADDet addresses this by creating a dynamic detector capable of sensing image complexity and adjusting its architecture on the fly. The primary challenge in dynamic detection is the high variance in object scales, which CADDet manages through a novel routing mechanism.

Methodology

The CADDet framework is built upon three core pillars:

1. Multi-Scale Supernet

Unlike traditional architectures that separate the backbone and neck (e.g., FPN), CADDet utilizes a densely connected supernet. This supernet maintains feature representations at four distinct scales simultaneously. Each node in the network can pass information across resolutions (up, down, or lateral), providing a rich search space for dynamic paths.

2. Dynamic Routing

Each computation node contains a "router"—a lightweight sub-network that predicts the importance of available paths. If a path's predicted relevance falls below a threshold, it is pruned during inference to save power.

Overview of the Dynamic Routing Network and Routing Space Optimization process.

3. Coarse-to-Fine Regularization

To effectively train the routers, two new regularization metrics are introduced:

  • Dynamic Global Budget Constraint: The model uses "scale encoding" to estimate image complexity based on ground-truth object sizes. It then assigns a specific computational budget, allowing complex scenes more resources.
  • Local Path Similarity Regularization: This encourages diversity by forcing images with similar object scales to use similar paths while pushing images with different characteristics to explore distinct architectural configurations.

Experiments and Results

CADDet was evaluated on the MS COCO benchmark, using ImageNet for initial supernet pre-training.

Key Findings

  • Efficiency Gains: CADDet achieved a 42% reduction in MAdds (Multiply-Adds) compared to static baselines like MobileNetV2 + FPN, without sacrificing detection performance.
  • Improved Accuracy: Compared to a standard dynamic routing strategy, the proposed regularization techniques led to a 1.8 higher mAP.
  • Emergent Design Principles: The dynamic routers naturally discovered "U-shape" paths, similar to hand-crafted Feature Pyramid Networks (FPN), validating the model's ability to learn optimal architectural patterns autonomously.

Conclusion

CADDet demonstrates that content-aware dynamic routing is a viable path toward more efficient object detection. By using object scale as a proxy for complexity, the model successfully allocates resources where they are most needed. Future work will focus on optimizing dynamic execution for specific hardware backends and extending dynamic logic to the detection heads for further efficiency gains.

Summary updated

BibTeX
@misc{feng2020learning,
  author = {Junyi Feng and Jiashen Hua and Baisheng Lai and Jianqiang Huang and Xi Li and Xian-Sheng Hua},
  title = {{Learning to Generate Content-Aware Dynamic Detectors}},
  year = {2020},
  eprint = {2012.04265},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.04265},
}
Figure