让 DETR 模型更轻更快,同时保留全局上下文信息。
CLoCKDistill: Consistent Location-and-Context-aware Knowledge Distillation for DETRs
- 从 Transformer 编码器输出中蒸馏特征,保留长距离依赖。
- 通过目标位置增强蒸馏,提升学生模型定位能力,性能提升 2.2%~6.4%。
- 适合部署在车载等资源受限场景的 DETR 模型压缩。
目标检测在检测变压器(DETRs)的推动下取得了显著进展。然而,这些模型计算量大,难以在资源受限环境(如自动驾驶汽车)中部署。知识蒸馏(KD)是广泛应用于卷积神经网络检测器的有效压缩方法,但其在 DETR 模型上的应用仍有限。现有 DETR 的 KD 方法往往无法蒸馏变压器特有的全局上下文信息,且盲目信任教师模型,有时会导致误导。为此,本文提出一致的位置与上下文感知知识蒸馏(CLoCKDistill),包含特征蒸馏和逻辑蒸馏两部分。特征蒸馏方面,不蒸馏骨干网络特征,而是蒸馏包含重要全局上下文和长程依赖的 Transformer 编码器输出(即记忆)。同时,在蒸馏过程中融入目标位置信息,使学生模型能聚焦相关区域并有效捕捉全局上下文。为促进逻辑蒸馏,基于真实标注创建目标感知查询,使学生与教师解码器能一致地关注编码器记忆中的准确部分。在 KITTI 与 COCO 数据集上的实验表明,该方法对多种 DETRs 均有效,例如单尺度 DAB-DETR、多尺度可变形 DETR 以及基于去噪的 DINO。其性能提升达 2.2% 至 6.4%。
原文摘要 · Abstract (English)
Object detection has advanced significantly with Detection Transformers (DETRs). However, these models are computationally demanding, posing challenges for deployment in resource-constrained environments (e.g., self-driving cars). Knowledge distillation (KD) is an effective compression method widely applied to CNN detectors, but its application to DETR models has been limited. Most KD methods for DETRs fail to distill transformer-specific global context. Also, they blindly believe in the teacher model, which can sometimes be misleading. To bridge the gaps, this paper proposes Consistent Location-and-Context-aware Knowledge Distillation (CLoCKDistill) for DETR detectors, which includes both feature distillation and logit distillation components. For feature distillation, instead of distilling backbone features like existing KD methods, we distill the transformer encoder output (i.e., memory) that contains valuable global context and long-range dependencies. Also, we enrich this memory with object location details during feature distillation so that the student model can prioritize relevant regions while effectively capturing the global context. To facilitate logit distillation, we create target-aware queries based on the ground truth, allowing both the student and teacher decoders to attend to consistent and accurate parts of encoder memory. Experiments on the KITTI and COCO datasets show our CLoCKDistill method's efficacy across various DETRs, e.g., single-scale DAB-DETR, multi-scale deformable DETR, and denoising-based DINO. Our method boosts student detector performance by 2.2% to 6.4%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。