Skip to main content
QUICK REVIEW

[Paper Review] Dynamic Head: Unifying Object Detection Heads with Attentions

Xiyang Dai, Yinpeng Chen|arXiv (Cornell University)|Jun 15, 2021
Advanced Neural Network ApplicationsComputer Science27 references62 citations
TL;DR

Introduces Dynamic Head (DyHead), a unified detection head that stacks scale-, spatial-, and task-aware attention modules to improve object detection without extra computational overhead, achieving state-of-the-art COCO results.

ABSTRACT

The complex nature of combining localization and classification in object detection has resulted in the flourished development of methods. Previous works tried to improve the performance in various object detection heads but failed to present a unified view. In this paper, we present a novel dynamic head framework to unify object detection heads with attentions. By coherently combining multiple self-attention mechanisms between feature levels for scale-awareness, among spatial locations for spatial-awareness, and within output channels for task-awareness, the proposed approach significantly improves the representation ability of object detection heads without any computational overhead. Further experiments demonstrate that the effectiveness and efficiency of the proposed dynamic head on the COCO benchmark. With a standard ResNeXt-101-DCN backbone, we largely improve the performance over popular object detectors and achieve a new state-of-the-art at 54.0 AP. Furthermore, with latest transformer backbone and extra data, we can push current best COCO result to a new record at 60.6 AP. The code will be released at https://github.com/microsoft/DynamicHead.

Motivation & Objective

  • Motivate the need for a unified detection head that addresses scale, spatial, and task variations in objects.
  • Propose a dynamic head that applies attentions along three feature dimensions to improve representation.
  • Demonstrate that DyHead can be plugged into diverse detectors (one- and two-stage) and backbones.
  • Show that DyHead yields significant AP gains on COCO with efficient training.
  • Provide analysis of attention module contributions and generalization to existing detectors.

Proposed method

  • Represent backbone outputs as a 3D feature tensor F in shape L x S x C (levels x spatial locations x channels).
  • Decompose full self-attention into three sequential attentions operating on L, S, and C to enforce scale-, spatial-, and task-awareness respectively.
  • Scale-aware attention: compute a level-wise weighting via a 1x1 conv after averaging across S and C, followed by a hard-sigmoid activation.
  • Spatial-aware attention: use deformable sampling with learned offsets and importances to sparsely focus on discriminative spatial regions, aggregating across levels.
  • Task-aware attention: apply channel-wise gating to favor different tasks (classification, box regression, center/keypoint learning) via a learned thresholding mechanism.
  • Stack multiple DyHead blocks to progressively refine representations; DyHead serves as a plugin block adaptable to different detector architectures.
Figure 1: An illustration of our Dynamic Head approach. It contains three different attention mechanisms, each focusing on a different perspective: scale-aware attention, spatial-aware attention, and task-aware attention. We also visualize how the feature maps are improved after each attention modul
Figure 1: An illustration of our Dynamic Head approach. It contains three different attention mechanisms, each focusing on a different perspective: scale-aware attention, spatial-aware attention, and task-aware attention. We also visualize how the feature maps are improved after each attention modul

Experimental results

Research questions

  • RQ1Can a unified detection head that jointly handles scale-, spatial-, and task-aware attentions improve performance across detectors and backbones?
  • RQ2How much do individual attention components (scale, spatial, task) contribute to performance gains, and how do they interact when stacked?
  • RQ3Is DyHead computationally efficient enough to surpass existing heads in training speed while delivering state-of-the-art accuracy?
  • RQ4Does DyHead generalize across one-stage and two-stage detectors, and across anchor-based, anchor-free, box-based, and keypoint-based representations?

Key findings

  • DyHead yields consistent AP gains when adding scale-, spatial-, and task-aware attention modules to a baseline detector (e.g., AP increases of 0.9, 2.4, and 1.3 respectively for L, S, C modules).
  • The full DyHead (all three attentions stacked) achieves a 3.6 AP improvement over the baseline.
  • With ResNeXt-101-DCN, DyHead achieves 54.0 AP on COCO test-dev, and with transformer backbones and extra data, the COCO result reaches 60.6 AP.
  • Plugging DyHead into multiple detectors (Faster R-CNN, RetinaNet, ATSS, FCOS, RepPoints) improves AP by about 1.2–3.2 points across the board.
  • DyHead demonstrates efficiency: 2-block configuration already outperforms the baseline with lower computation, and deeper configurations maintain favorable cost/benefit trade-offs.
Figure 2: A detailed design of Dynamic Head. (a) shows the detailed implementation of each attention module. (b) shows how to apply our dynamic head blocks to one-stage object detector. (c) shows how to apply our dynamic head blocks to two-stage object detector.
Figure 2: A detailed design of Dynamic Head. (a) shows the detailed implementation of each attention module. (b) shows how to apply our dynamic head blocks to one-stage object detector. (c) shows how to apply our dynamic head blocks to two-stage object detector.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.