Learning Spatial Fusion for Single-Shot Object Detection

Songtao Liu, Di Huang, Yunhong WangarXiv 2019

Introduction

Modern object detectors rely heavily on Feature Pyramids (such as FPN) to detect objects across varying scales. Typically, these architectures follow a heuristic approach: large objects are assigned to high-level, low-resolution feature maps, while small objects are assigned to low-level, high-resolution maps.

However, this standard approach introduces a significant "gradient conflict" during training. When an object is identified as a positive sample at one level of the pyramid, the corresponding spatial locations at other levels are often treated as background. This creates contradictory signals during backpropagation, particularly in images containing objects of diverse sizes, which limits the discriminative power of the learned features and hampers training efficiency.

Adaptively Spatial Feature Fusion (ASFF)

To address these inconsistencies, this paper introduces Adaptively Spatial Feature Fusion (ASFF). ASFF moves beyond simple summation or concatenation by learning to spatially filter and weight information from different scales at every pixel.

The architecture of Adaptively Spatial Feature Fusion (ASFF), illustrating the rescaling and adaptive fusion process across three levels.

As shown in the architecture diagram above, the ASFF process consists of two primary stages:

  1. Identical Rescaling: Features from all pyramid levels ($l=1, 2, 3$) are resized to match the resolution and channel dimensions of the target level. This is achieved through up-sampling (using $1\times1$ convolutions and interpolation) or down-sampling (using pooled convolutions).
  2. Adaptive Fusion: The network learns pixel-wise weights ($\alpha, \beta, \gamma$) for each level via a small convolution layer followed by a Softmax. For a target level $l$, the fused feature at position $(i, j)$ is calculated as: $$y^l_{ij} = \alpha^l_{ij} \cdot x^{1 \to l}_{ij} + \beta^l_{ij} \cdot x^{2 \to l}_{ij} + \gamma^l_{ij} \cdot x^{3 \to l}_{ij}$$ This mechanism allows the network to dynamically "ignore" levels carrying conflicting information and "focus" on the most relevant scale for a specific spatial location.

Experimental Results

The researchers evaluated ASFF on the MS COCO 2017 benchmark. To maximize performance, they also developed a "Strong Baseline" for YOLOv3, incorporating modern techniques like mixup augmentation, cosine learning rate schedules, and an anchor-free guided anchoring strategy.

Comparison of the speed-accuracy trade-off between YOLOv3+ASFF and other state-of-the-art detectors on MS COCO.

As illustrated in the trade-off plot, the addition of ASFF provides a substantial performance boost:

  • State-of-the-Art Trade-off: YOLOv3 + ASFF achieved 42.4% mAP at 45 FPS and reached up to 43.9% mAP at 29 FPS. This represents a massive improvement over the original YOLOv3-608 baseline (33.0% mAP).
  • Competitive Performance: The method consistently outperformed other popular real-time detectors, including RetinaNet, SSD, and CenterNet, in terms of both speed and accuracy.
  • Efficiency: The computational overhead of ASFF is minimal, adding only approximately 2ms to the total inference time, making it highly suitable for real-time applications.

Conclusion

ASFF effectively resolves the spatial inconsistencies inherent in feature pyramids by treating fusion as a spatial filtering task. By adaptively weighting features, the network harmonizes gradients and improves the representation of objects at all scales. Beyond YOLOv3, the authors demonstrated the generalizability of ASFF by applying it to RetinaNet, where it yielded consistent mAP improvements. This approach offers a practical and efficient path for enhancing the performance of single-shot object detectors.

Summary updated

BibTeX
@misc{liu2019learning,
  author = {Songtao Liu and Di Huang and Yunhong Wang},
  title = {{Learning Spatial Fusion for Single-Shot Object Detection}},
  year = {2019},
  eprint = {1911.09516},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.09516},
}
Figure