[论文解读] DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR
DAB-DETR 将锚框 (x, y, w, h) 视为 DETR 中动态更新的查询,在 DETR 中通过对象尺度调制跨注意力,在相同设置下实现了对 COCO 的 DETR 风格性能的最新水平。
We present in this paper a novel query formulation using dynamic anchor boxes for DETR (DEtection TRansformer) and offer a deeper understanding of the role of queries in DETR. This new formulation directly uses box coordinates as queries in Transformer decoders and dynamically updates them layer-by-layer. Using box coordinates not only helps using explicit positional priors to improve the query-to-feature similarity and eliminate the slow training convergence issue in DETR, but also allows us to modulate the positional attention map using the box width and height information. Such a design makes it clear that queries in DETR can be implemented as performing soft ROI pooling layer-by-layer in a cascade manner. As a result, it leads to the best performance on MS-COCO benchmark among the DETR-like detection models under the same setting, e.g., AP 45.7\% using ResNet50-DC5 as backbone trained in 50 epochs. We also conducted extensive experiments to confirm our analysis and verify the effectiveness of our methods. Code is available at \url{https://github.com/SlongLiu/DAB-DETR}.
研究动机与目标
- 更好地理解 DETR 的查询并改进 DETR 的训练收敛性。
- 引入一种查询表述,其中锚在 Transformer 解码器中被直接学习并用作查询。
- 利用对象尺度信息来调制跨注意力,以实现更准确的特征池化。
- 证明在同一设置下,动态、逐层更新的锚框查询相较传统的 DETR 风格查询能带来性能提升。
- 在相同设置下展示 DETR 风格模型中的最新结果,适用于 COCO。
提出的方法
- 提出 4D 锚框 (x, y, w, h) 作为查询,并通过对正弦嵌入的 MLP 生成位置查询。
- 在自注意力和跨注意力中使用拼接的内容与位置信息,并采用一个基于尺度的跨注意力机制。
- 逐层更新锚框,通过在跨层之间共享头部预测相对增量 (Δx, Δy, Δw, Δh)。
- 在注意力中用宽度和高度信息 (w, h) 调整高斯样的位置信息先验以适应对象尺度。
- 引入一个温度参数 T 以调节位置信息的软硬度,采用视觉任务的设置(T = 20)。
- 提供一个可选的更强变体(DAB-DETR-Deformable)和详细消融,确认各组件的贡献。
实验结果
研究问题
- RQ1锚基查询在收敛性和准确性方面与传统可学习查询在 DETR 中有何差异?
- RQ2动态的、具备尺度感知的锚框作为查询能否改善跨注意力与对不同尺寸对象的定位?
- RQ3逐层更新锚框对 DETR 风格检测器有何影响?
- RQ4引入宽度/高度调制的注意力和温度调节是否在 COCO 上带来可度量的提升?EDR?
主要发现
| 模型 | 多尺度 | #epochs | AP | AP 50 | AP 75 | AP S | AP M | AP L | GFLOPs | Params |
|---|---|---|---|---|---|---|---|---|---|---|
| DETR-R 50 | 500 | 42.0 | 62.4 | 44.2 | 20.5 | 45.8 | 61.1 | 86 | 41 M | |
| Anchor DETR-R 50* | - | 50 | 42.1 | 63.1 | 44.9 | 22.3 | 46.2 | 60.0 | - | 39 M |
| DAB-DETR-R 50 | - | 50 | 42.2 | 63.1 | 44.7 | 21.5 | 45.7 | 60.3 | 94 | 44 M |
| DAB-DETR-R 50* | - | 50 | 42.6 | 63.2 | 45.6 | 21.8 | 46.2 | 61.1 | 100 | 44 M |
| DETR-DC5-R 50 | - | 500 | 43.3 | 63.1 | 45.9 | 22.5 | 47.3 | 61.1 | 187 | 41 M |
| Deformable DETR-R 50 | ✓ | 50 | 43.8 | 62.6 | 47.7 | 26.4 | 47.1 | 58.0 | 173 | 40 M |
| SMCA-R 50 | ✓ | 50 | 43.7 | 63.6 | 47.2 | 24.2 | 47.0 | 60.4 | 152 | 40 M |
- DAB-DETR 在 COCO 的 ResNet-50(DC5)上训练 50 轮获得 45.7 AP,超越在相同设置下的若干 DETR 风格模型。
- 将 4D 锚框作为查询时,相比锚框-点形式的消融,将 AP 从 44.0 提升到 45.0。
- 跨层的动态锚框更新带来 1.7 AP 的增益。
- 宽度/高度调制的注意力和温度调节对进一步提升有贡献,消融实验显示若移除这些组件性能会下降。
- 在模式嵌入下,DAB-DETR 的变体在各自的骨干网络上超越了先前的 DETR 风格方法,验证了所提设计的有效性。
- 相比基线 DETR 及若干变体,DAB-DETR 在对多尺度 DETR 风格方法的对比中也表现出强劲的性能。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。