Skip to main content
QUICK REVIEW

[论文解读] Conditional DETR V2: Efficient Detection Transformer with Box Queries

Xiaokang Chen, Fangyun Wei|arXiv (Cornell University)|Jul 18, 2022
Advanced Neural Network ApplicationsComputer Science被引用 17
一句话总结

该论文提出 Conditional DETR V2,一种高效的物体检测 Transformer 模型,通过将物体查询重新定义为可学习的框查询(包含参考点嵌入和图像相关的框变换),实现了更快的训练收敛速度和更高的精度。通过引入轴向自注意力(水平-垂直注意力),其内存使用量降低 74%,推理速度提升 1.6 倍,在 COCO 数据集上使用 DC5-ResNet-50 主干网络时达到 44.8 AP 的性能,推理速度为 16.4 FPS。

ABSTRACT

In this paper, we are interested in Detection Transformer (DETR), an end-to-end object detection approach based on a transformer encoder-decoder architecture without hand-crafted postprocessing, such as NMS. Inspired by Conditional DETR, an improved DETR with fast training convergence, that presented box queries (originally called spatial queries) for internal decoder layers, we reformulate the object query into the format of the box query that is a composition of the embeddings of the reference point and the transformation of the box with respect to the reference point. This reformulation indicates the connection between the object query in DETR and the anchor box that is widely studied in Faster R-CNN. Furthermore, we learn the box queries from the image content, further improving the detection quality of Conditional DETR still with fast training convergence. In addition, we adopt the idea of axial self-attention to save the memory cost and accelerate the encoder. The resulting detector, called Conditional DETR V2, achieves better results than Conditional DETR, saves the memory cost and runs more efficiently. For example, for the DC$5$-ResNet-$50$ backbone, our approach achieves $44.8$ AP with $16.4$ FPS on the COCO $val$ set and compared to Conditional DETR, it runs $1.6 imes$ faster, saves $74$\% of the overall memory cost, and improves $1.0$ AP score.

研究动机与目标

  • 通过将 DETR 中的物体查询重新表述为与锚框检测器(如 Faster R-CNN)兼容的框查询格式,提升 DETR 的效率与精度。
  • 通过从图像内容中学习框查询而非固定为可学习参数,加速训练收敛速度和推理速度。
  • 通过一种新颖的轴向自注意力机制,降低 Transformer 编码器的内存消耗和计算负担,尤其适用于高分辨率特征图。
  • 在标准基准测试中,与现有 DETR 变体相比,实现更优的速度-精度权衡,特别是在 DC5-ResNet-50 等高分辨率主干网络上。

提出的方法

  • 将 DETR 中的物体查询重新定义为框查询,由参考点的嵌入向量和编码相对于该参考点的框尺度与偏移量的预测变换向量组成。
  • 通过在特征图上预测物体性得分,并选择得分最高的点作为参考位置,从图像特征中学习参考点。
  • 在每个参考点处,从编码器特征中预测框变换(尺度与偏移量),使查询与图像内容相关联并具备自适应性。
  • 引入水平-垂直注意力(HVA),通过在水平和垂直方向上独立执行自注意力机制,降低编码器中的内存与计算开销。
  • 通过引入与图像相关的参考点嵌入和变换,使所有解码器层(包括第一层)均采用相同的交叉注意力公式。
  • 对参考点应用正弦位置编码,以在框查询表示中保留空间归纳偏差。

实验结果

研究问题

  • RQ1将物体查询重新表述为框查询是否能提升 DETR 的检测性能与训练效率?
  • RQ2从图像内容中学习框查询而非使用固定可学习参数,是否能提升定位精度与泛化能力?
  • RQ3轴向自注意力是否能有效降低 Transformer 编码器中的内存与计算成本,同时不损失性能?
  • RQ4在标准基准测试中,该方法与现有 DETR 变体相比,在速度、精度和内存效率方面表现如何?

主要发现

  • Conditional DETR V2 在 COCO 验证集上使用 DC5-ResNet-50 主干网络时达到 44.8 AP,性能与 Conditional DETR 相当,但效率显著提升。
  • 该模型推理速度比 Conditional DETR 快 1.6 倍,达到 16.4 FPS,而 Conditional DETR 为 10 FPS。
  • 与 Conditional DETR 相比,内存使用量降低 74%,DC5-ResNet-50 主干网络的内存消耗从 18,631M 降至 4,844M。
  • 水平-垂直注意力机制在高分辨率特征上将内存成本降低 74%,推理速度提升 60%,尤其显著提升了 DC5 主干网络的性能。
  • 在所有对比的 DETR 变体中,该方法实现了最佳的速度-精度权衡,精度高于 Anchor DETR(44.2 AP at 16 FPS),且效率更优。
  • 可视化结果表明,参考点主要位于物体区域内部,证实了通过图像相关查询学习实现的有效定位。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。