Dynamic Feature Pyramid Networks for Object Detection

Mingjian Zhu, Kai Han, Changbin Yu, Yunhe WangarXiv 2020

Abstract

Feature pyramid network (FPN) is a critical component in modern object detection frameworks. The performance gain in most of the existing FPN variants is mainly attributed to the increase of computational burden. An attempt to enhance the FPN is enriching the spatial information by expanding the receptive fields, which is promising to largely improve the detection accuracy. In this paper, we first investigate how expanding the receptive fields affect the accuracy and computational costs of FPN. We explore a baseline model called inception FPN in which each lateral connection contains convolution filters with different kernel sizes. Moreover, we point out that not all objects need such a complicated calculation and propose a new dynamic FPN (DyFPN). The output features of DyFPN will be calculated by using the adaptively selected branch according to a dynamic gating operation. Therefore, the proposed method can provide a more efficient dynamic inference for achieving a better trade-off between accuracy and computational cost. Extensive experiments conducted on MS-COCO benchmark demonstrate that the proposed DyFPN significantly improves performance with the optimal allocation of computation resources. For instance, replacing inception FPN with DyFPN reduces about 40% of its FLOPs while maintaining similar high performance.

Introduction

In modern object detection, the Feature Pyramid Network (FPN) is the gold standard for handling objects at different scales. To improve performance, researchers often expand the receptive field by adding larger convolutional kernels (e.g., 5x5 or 7x7) to lateral connections. However, these improvements typically come with a "static tax": every image, regardless of its complexity, undergoes the same heavy computation. This is inefficient, as simple images with clear objects do not require the same complex spatial information as cluttered scenes.

Proposed Method: Dynamic FPN (DyFPN)

The authors propose two architectures to address this. First, Inception FPN serves as a high-performance baseline, replacing standard 1x1 lateral connections with blocks containing a mix of 1x1, 3x3, and 5x5 convolutions. While accurate, this is computationally expensive.

Second, the Dynamic FPN (DyFPN) introduces a dynamic gating mechanism. A lightweight gate module, inspired by Squeeze-and-Excitation, predicts whether to execute the heavy Inception block or bypass it using a simple 1x1 connection. This decision is made differentiable during training using the Gumbel Softmax trick. Furthermore, a resource constraint loss ($L_C$) allows for setting a target FLOPs budget, forcing the model to learn which layers and images most require high-power computation.

Architectural comparison between the static Inception FPN and the proposed Dynamic FPN (DyFPN).

Experiments and Results

Evaluated on the MS-COCO 2017 benchmark, DyFPN demonstrates significant efficiency gains. On a Faster R-CNN with a ResNet-50 backbone, DyFPN reduced FLOPs by approximately 40% (from 896.2G to 537.5G) with only a negligible 0.2 AP drop. In terms of real-world performance, DyFPN achieved a 34.4% reduction in actual latency on an NVIDIA RTX 2080Ti.

Performance comparison on MS-COCO showing DyFPN achieving a superior accuracy-efficiency trade-off compared to InceptionFPN and standard FPN.

Visualizations reveal that the gating mechanism is semantically driven: images with complex backgrounds or many small, overlapping objects trigger more Inception blocks, while simpler images bypass them. The multi-branch approach also helps mitigate the "receptive field paradox," where large kernels can sometimes drown out fine-grained details of small objects.

Conclusion

DyFPN effectively addresses the computational inefficiency of static FPN variants by adaptively allocating resources based on image complexity. While conditional logic can introduce minor overhead in certain production environments, the significant reduction in FLOPs and latency makes it a compelling choice for resource-constrained object detection. Future work may extend this dynamic logic to other parts of the detection pipeline, such as the backbone or detection heads.

Summary updated

BibTeX
@misc{zhu2020dynamic,
  author = {Mingjian Zhu and Kai Han and Changbin Yu and Yunhe Wang},
  title = {{Dynamic Feature Pyramid Networks for Object Detection}},
  year = {2020},
  eprint = {2012.00779},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.00779},
}
Figure