[论文解读] Dynamic Head: Unifying Object Detection Heads with Attentions
引入 Dynamic Head (DyHead),一个统一的检测头,通过堆叠尺度、空间和任务感知的注意力模块,在不增加额外计算开销的情况下提升对象检测,在 COCO 上达到最先进结果。
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.
研究动机与目标
- 提出需要一个统一的检测头来解决对象的尺度、空间和任务变异。
- 提出一个动态头,在三个特征维度上应用注意力以提升表示。
- 证明 DyHead 可插入到各种检测器(单阶段和两阶段)及骨干网络。
- 展示 DyHead 在 COCO 上带来显著的 AP 增益并实现高效训练。
- 提供对注意力模块贡献的分析,以及对现有检测器的一般化。
提出的方法
- 将骨干输出表示为形状为 L x S x C 的三维特征张量 F(层级 x 空间位置 x 通道)。
- 将全局自注意力分解为在 L、S、C 上依次进行的三个注意力,以分别实现尺度感知、空间感知、任务感知。
- 尺度感知注意力:在跨 S 和 C 平均后,通过 1x1 卷积计算逐层权重,然后经硬Sigmoid 激活。
- 空间感知注意力:使用带学习偏移和重要性的变形采样,对判别性空间区域进行稀疏聚焦,并跨层聚合。
- 任务感知注意力:通过一个学习阈值机制对通道进行门控,以偏好不同任务(分类、框回归、中心/关键点学习)。
- 堆叠多个 DyHead 块以逐步细化表示;DyHead 作为可插入的块,适用于不同检测器架构。

实验结果
研究问题
- RQ1一个统一的检测头,能够同时处理尺度、空间和任务感知注意力,是否能够在不同检测器和骨干网络上提升性能?
- RQ2单独的注意力组件(尺度、空间、任务)对性能提升的贡献有多大?在堆叠时它们如何相互作用?
- RQ3DyHead 是否具有足够的计算效率,能够在训练速度上超越现有头部,同时提供最先进的精度?
- RQ4DyHead 是否可以跨越单阶段和两阶段检测器,以及跨锚框、无锚框、基于框和基于关键点的表示进行泛化?
主要发现
| 方法 | 骨干 | 迭代 | AP | AP50 | AP75 | AP_S | AP_M | AP_L |
|---|---|---|---|---|---|---|---|---|
| ATSS | ResNeXt-64x4d-101-DCN | 2x | 50.7 | 68.9 | 56.3 | 33.2 | 52.9 | 62.4 |
| BorderDet | ResNeXt-64x4d-101-DCN | 2x | 50.3 | 68.9 | 55.2 | 32.8 | 52.8 | 62.3 |
| DyHead | ResNet-50 | 1x | 43.0 | 60.7 | 46.8 | 24.7 | 46.4 | 53.9 |
| DyHead | ResNet-101 | 2x | 46.5 | 64.5 | 50.7 | 28.3 | 50.3 | 57.5 |
| DyHead | ResNeXt-64x4d-101-DCN | 2x | 47.7 | 65.7 | 51.9 | 31.5 | 51.7 | 60.7 |
| DyHead | ResNeXt-64x4d-101-DCN | 2x | 54.0 | 72.1 | 59.3 | 37.1 | 57.2 | 66.3 |
- 将尺度、空间和任务感知注意力模块加入基线检测器时,DyHead 产生稳定的 AP 增益(例如 L、S、C 模块分别增加的 AP 为 0.9、2.4 和 1.3)。
- 完整的 DyHead(所有三个注意力堆叠)相较基线实现 3.6 的 AP 提升。
- 使用 ResNeXt-101-DCN,DyHead 在 COCO test-dev 上达到 54.0 AP;使用变换器骨干和额外数据,COCO 结果达到 60.6 AP。
- 将 DyHead 插入多种检测器(Faster R-CNN、RetinaNet、ATSS、FCOS、RepPoints)后,AP 整体提升约 1.2–3.2 点。
- DyHead 展示出高效性:2 块配置在计算量较低的情况下已优于基线,且更深的配置保持有利的成本/收益权衡。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。