通过筛选难负样本查询,提升检测Transformer的压缩效果
Knowledge Distillation via Query Selection for Detection Transformer
- 按查询与真实框的GIoU分组,挖掘难负样本用于知识蒸馏
- 在MS-COCO上使Conditional DETR-R18的AP从35.8提升至39.9
- 适合需轻量化部署但又不牺牲检测精度的场景
Transformers彻底改变了目标检测领域,以DETR为代表,因其简洁性和有效性备受关注。尽管优势显著,这些模型庞大的规模给资源受限环境的实际部署带来了挑战。本文通过知识蒸馏技术解决DETR的模型压缩问题,该技术能在保持性能的同时减小模型体积。DETR性能的关键在于其对查询的依赖,以准确理解目标表示。传统蒸馏方法仅关注通过二分匹配识别出的正查询,忽略了硬负查询中蕴含的丰富信息。我们的视觉分析表明,聚焦于前景元素的硬负查询对蒸馏结果有重要提升作用。为此,我们提出一种新的分组查询选择策略,不同于传统方法,该策略基于查询与真实框的广义交并比(GIoU)进行分组,从而发现有价值的硬负查询用于蒸馏。此外,我们构建了针对DETR的知识蒸馏框架QSKD,包含注意力引导特征蒸馏(AGFD)和局部对齐预测蒸馏(LAPD),通过聚焦教师模型中间特征和输出中最信息量的部分来优化蒸馏过程。在MS-COCO数据集上的全面实验表明,该方法有效提升了多种DETR架构的平均精度(AP),且计算开销极小。具体而言,Conditional DETR ResNet-18的AP从35.8提升至39.9。
原文摘要 · Abstract (English)
Transformers have revolutionized the object detection landscape by introducing DETRs, acclaimed for their simplicity and efficacy. Despite their advantages, the substantial size of these models poses significant challenges for practical deployment, particularly in resource-constrained environments. This paper addresses the challenge of compressing DETR by leveraging knowledge distillation, a technique that holds promise for maintaining model performance while reducing size. A critical aspect of DETRs' performance is their reliance on queries to interpret object representations accurately. Traditional distillation methods often focus exclusively on positive queries, identified through bipartite matching, neglecting the rich information present in hard-negative queries. Our visual analysis indicates that hard-negative queries, focusing on foreground elements, are crucial for enhancing distillation outcomes. To this end, we introduce a novel Group Query Selection strategy, which diverges from traditional query selection in DETR distillation by segmenting queries based on their Generalized Intersection over Union (GIoU) with ground truth objects, thereby uncovering valuable hard-negative queries for distillation. Furthermore, we present the Knowledge Distillation via Query Selection for DETR (QSKD) framework, which incorporates Attention-Guided Feature Distillation (AGFD) and Local Alignment Prediction Distillation (LAPD). These components optimize the distillation process by focusing on the most informative aspects of the teacher model's intermediate features and output. Our comprehensive experimental evaluation of the MS-COCO dataset demonstrates the effectiveness of our approach, significantly improving average precision (AP) across various DETR architectures without incurring substantial computational costs. Specifically, the AP of Conditional DETR ResNet-18 increased from 35.8 to 39.9.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。