Skip to main content
QUICK REVIEW

[论文解读] D$^3$ETR: Decoder Distillation for Detection Transformer

Xiaokang Chen, Jiahui Chen|arXiv (Cornell University)|Nov 17, 2022
Advanced Neural Network Applications被引用 5
一句话总结

本文提出 D³ETR,一种面向基于 DETR 的目标检测器的知识蒸馏方法,通过引入 MixMatcher——一种结合自适应匹配与固定匹配的混合匹配策略,解决了 Transformer 解码器输出无序的问题。通过蒸馏教师模型的预测结果和注意力图至学生模型,D³ETR 实现了当前最优性能,在 12 个训练周期内将 Conditional DETR-R50-C5 的 mAP 提升 7.8。

ABSTRACT

While various knowledge distillation (KD) methods in CNN-based detectors show their effectiveness in improving small students, the baselines and recipes for DETR-based detectors are yet to be built. In this paper, we focus on the transformer decoder of DETR-based detectors and explore KD methods for them. The outputs of the transformer decoder lie in random order, which gives no direct correspondence between the predictions of the teacher and the student, thus posing a challenge for knowledge distillation. To this end, we propose MixMatcher to align the decoder outputs of DETR-based teachers and students, which mixes two teacher-student matching strategies, i.e., Adaptive Matching and Fixed Matching. Specifically, Adaptive Matching applies bipartite matching to adaptively match the outputs of the teacher and the student in each decoder layer, while Fixed Matching fixes the correspondence between the outputs of the teacher and the student with the same object queries, with the teacher's fixed object queries fed to the decoder of the student as an auxiliary group. Based on MixMatcher, we build extbf{D}ecoder extbf{D}istillation for extbf{DE}tection extbf{TR}ansformer (D$^3$ETR), which distills knowledge in decoder predictions and attention maps from the teachers to students. D$^3$ETR shows superior performance on various DETR-based detectors with different backbones. For example, D$^3$ETR improves Conditional DETR-R50-C5 by $ extbf{7.8}/ extbf{2.4}$ mAP under $12/50$ epochs training settings with Conditional DETR-R101-C5 as the teacher.

研究动机与目标

  • 为解决基于 DETR 的检测器缺乏标准化知识蒸馏(KD)方法的问题,特别是由于解码器输出无序所致。
  • 克服解码器输出排列不变性导致的教师与学生预测匹配难题。
  • 开发一种针对 DETR 架构中 Transformer 解码器量身定制的稳健且高效的知识蒸馏框架。
  • 建立知识蒸馏在基于 DETR 的目标检测模型中的新基线与完整训练方案。

提出的方法

  • 提出 MixMatcher,一种混合匹配策略,结合自适应匹配(通过每解码层的二分图匹配)与固定匹配(使用共享的物体查询作为辅助输入)。
  • 利用自适应匹配在每一解码层动态对齐教师与学生的预测结果,基于最优二分图分配。
  • 通过将教师的固定物体查询输入学生解码器作为辅助组,实现固定匹配以稳定对应关系。
  • 不仅在最终预测上执行知识蒸馏,还对解码层中的自注意力与交叉注意力图进行蒸馏。
  • 在固定匹配中引入约束,确保来自同一查询的教师与学生输出保持一致监督。
  • 集成一种继承策略,通过教师模型参数初始化学生模型,进一步提升性能。
Figure 2 : Architecture of the proposed method. We propose the mixed teacher-student matching strategy that composes of two components, adaptative matching and fixed matching. We adopt two groups, where the first group feeds student queries to the decoder and the second feeds teacher queries to the
Figure 2 : Architecture of the proposed method. We propose the mixed teacher-student matching strategy that composes of two components, adaptative matching and fixed matching. We adopt two groups, where the first group feeds student queries to the decoder and the second feeds teacher queries to the

实验结果

研究问题

  • RQ1在解码器输出无序的背景下,如何有效应用知识蒸馏于基于 DETR 的检测器?
  • RQ2在 DETR 的解码器中,哪种匹配策略最能稳定并提升教师与学生模型之间的知识迁移?
  • RQ3除了预测结果外,对注意力图进行蒸馏是否能显著提升学生模型的性能?
  • RQ4结合自适应与固定匹配策略对知识蒸馏的稳定性与准确性有何影响?
  • RQ5在固定匹配机制中使用辅助物体查询与约束监督会产生何种影响?

主要发现

  • 当以 Conditional DETR-R101-C5 作为教师模型时,D³ETR 在 12 个训练周期内将 Conditional DETR-R50-C5 的 mAP 提升 7.8,50 个训练周期内提升 2.4。
  • MixMatcher 中自适应与固定匹配的结合实现了 38.1 mAP,优于单独使用任一策略。
  • 在固定匹配中加入约束后,性能从 38.1 提升至 38.1 mAP,而移除该约束后性能下降至 37.0 mAP。
  • 可视化结果表明,使用 D³ETR 训练的学生模型学习到了与教师模型更接近的空间注意力模式。
  • D³ETR 在 COCO 数据集上达到 40.2 mAP,与全量 50 个训练周期的 Conditional DETR-R50-C5(40.9 mAP)性能相当。
  • 将 D³ETR 与 MGD 结合可进一步将性能提升至 38.8 mAP,证明其与其它 KD 方法具有良好的兼容性。
Figure 3 : Analysis of different components in Conditional DETR. We adopt ResNet- $101$ /ResNet- $50$ as the backbone and train the model for $12$ epochs (1 $\times$ schedule). Best viewed in color.
Figure 3 : Analysis of different components in Conditional DETR. We adopt ResNet- $101$ /ResNet- $50$ as the backbone and train the model for $12$ epochs (1 $\times$ schedule). Best viewed in color.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。