针对X光图像重叠导致检测性能下降,提出语义先验对比学习方法提升模型敏感度。
CSPCL: Category Semantic Prior Contrastive Learning for Deformable DETR-Based Prohibited Item Detectors
- 设计类别语义先验对比损失,通过类原型对齐内容查询
- 在多个数据集上显著提升Deformable DETR模型检测精度
- 无需增加推理开销,适合实际安检场景部署
基于X射线图像的违禁品检测是有效的安全检查手段。然而,由于X光图像特有的重叠现象导致前景与背景特征耦合,通用自然图像检测器表现不佳。为此,本文提出类别语义先验对比学习(CSPCL)机制,将分类器感知的类别原型与内容查询对齐,以纠正并补充分类缺失的语义信息,从而增强模型对前景特征的敏感性。具体地,设计了包含类内截断吸引(ITA)和类间自适应排斥(IAR)的对比损失(CSP损失)。ITA利用类别原型吸引同类内容查询,并通过梯度截断函数保持类内多样性;IAR则基于原型-原型相似性动态调节排斥强度,提升类间可区分性,尤其对相似类别效果显著。CSPCL具有通用性,可无缝集成至基于Deformable DETR的模型中。在PIXray、OPIXray、PIDray和CLCXray数据集上的大量实验表明,CSPCL显著提升了多种先进模型性能,且不增加推理复杂度。代码已开源:https://github.com/Limingyuan001/CSPCL。
原文摘要 · Abstract (English)
Prohibited item detection based on X-ray images is one of the most effective security inspection methods. However, the foreground-background feature coupling caused by the overlapping phenomenon specific to X-ray images makes general detectors designed for natural images perform poorly. To address this issue, we propose a Category Semantic Prior Contrastive Learning (CSPCL) mechanism, which aligns the class prototypes perceived by the classifier with the content queries to correct and supplement the missing semantic information responsible for classification, thereby enhancing the model sensitivity to foreground features. To achieve this alignment, we design a specific contrastive loss, CSP loss, which comprises the Intra-Class Truncated Attraction (ITA) loss and the Inter-Class Adaptive Repulsion (IAR) loss, and outperforms classic contrastive losses. Specifically, the ITA loss leverages class prototypes to attract intra-class content queries and preserves essential intra-class diversity via a gradient truncation function. The IAR loss employs class prototypes to adaptively repel inter-class content queries, with the repulsion strength scaled by prototype-prototype similarity, thereby improving inter-class discriminability, especially among similar categories. CSPCL is general and can be easily integrated into Deformable DETR-based models. Extensive experiments on the PIXray, OPIXray, PIDray, and CLCXray datasets demonstrate that CSPCL significantly enhances the performance of various state-of-the-art models without increasing inference complexity. The code is publicly available at https://github.com/Limingyuan001/CSPCL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。