Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (2): 96-102.DOI: 10.3778/j.issn.1002-8331.2210-0240

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Detection of X-Ray Contraband by Adaptive and Multi-Scale Feature Fusion

SUN Jia’ao, DONG Yishan, GUO Jingyuan, LI Mingze, LI Shuaichao, LU Shuhua   

  1. 1.College of Information and Cyber Security, People’s Public Security University of China, Beijing 102600, China
    2.Key Laboratory of Security Technology and Risk Assessment Ministry of Public Security, Beijing 102600, China
  • Online:2024-01-15 Published:2024-01-17



  1. 1.中国人民公安大学 信息网络安全学院,北京 102600
    2.公安部安全防范技术与风险评估重点实验室,北京 102600

Abstract: To resolve the problems of spatial multi-scale variation, background interference and model complex of X-ray security inspection contraband images, a lightweight YOLOv5 model with spatial adaptation and multi-scale feature fusion is proposed. Taking YOLOv5 as the basic framework, the adaptive spatial feature fusion mechanism is introduced to suppress the influence of feature scale differences, and the bidirectional feature weighted fusion is integrated with the bidirectional feature pyramid network; the lightweight channel attention mechanism is used to obtain accurate position information and enhance the expression of effective features. Meanwhile, GhostConv is used to replace part of Conv to reduce the computational complexity of the network. This model achieves mAP of 94.2%, 92.8% and 83.3% on three public datasets such as OPIXray, SIXray and HiXray, respectively, which is 5.4, 0.5 and 1.7 percentage points higher than the baseline model. And the model training time is not significantly increased. It takes into account the accuracy and speed of model detection, which is superior to many current advanced algorithms.

Key words: X-ray images, contraband detection, spatial feature fusion, YOLOv5

摘要: 针对X光安检违禁品图像空间多尺度变化、背景干扰及模型复杂等问题,提出了空间自适应与多尺度特征融合的YOLOv5轻量模型。以YOLOv5为基本框架,引入自适应空间特征融合机制抑制特征尺度差异的影响,结合双向特征金字塔网络集成了特征双向加权融合;采用轻量化通道注意力机制获得编码的位置信息,增强有效特征的表达;同时利用GhostConv替换部分Conv降低网络计算复杂度。此模型在OPIXray、SIXray、HiXray等3个公开数据集上mAP分别达到94.2%、92.8%、83.3%,比基线模型分别提高了5.4、0.5、1.7个百分点,且未明显改变推理效率,较好兼顾了模型检测精度与速度,优于当前诸多先进算法。

关键词: X光图像, 违禁品检测, 空间特征融合, YOLOv5