Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (12): 193-200.DOI: 10.3778/j.issn.1002-8331.2301-0158

• Graphics and Image Processing • Previous Articles     Next Articles

Improved YOLOv7 X-Ray Image Real-Time Detection of Prohibited Items

LI Song, Yasenjiang Musa   

  1. School of Mechanical Engineering, Xinjiang University, Urumqi 830000, China
  • Online:2023-06-15 Published:2023-06-15

改进YOLOv7的X射线图像违禁品实时检测

李松,亚森江·木沙   

  1. 新疆大学 智能制造现代产业学院(机械工程学院),乌鲁木齐 830000

Abstract: The X-ray detection of prohibited items at the traffic entrance is very important for public safety. In order to achieve the detection accuracy and speed balance of prohibited items, the YOLOv7 algorithm is improved. A detector head generated from low-level and high-resolution feature map is added to improve the sensitivity to small target objects. MobileNetViTv3 block is added at the end of the Backone of YOLOv7 to capture global infomation and help the network accurately locate in high-density scenarios. An MPCA module is designed to compensate for the lack of deep convolution location information. Some advanced stragies are adopted to improve the effect of the model, such as data enhancement and additional clasfiers. The improved model is tested in three data sets of security prohibited items, SiXary, HiXary and CLCXray, and the mAP reaches 94.9%, 77.3% and 86.1% respectively. The results show that the proposed model can effectively improve the ability of YOLOv7 to detect complex prohibited items while maintaining a fast detection speed. Compared with the current mainstream algorithm, it has a certain degree of progressiveness.

Key words: X-ray image, prohibited items detection, attention mechanism, additional classifier

摘要: 交通入口处X光违禁品检测对公共安全至关重要,为了达到违禁品检测精度和速度均衡,对YOLOv7算法进行改进。增加了一个由低层、高分辨率的特征图生成的检测头,提高对小目标物体敏感度。在YOLOv7的Backbone末尾增加轻量级MobileNetViTv3 block,用于捕获全局信息,帮助网络在高密度场景中精准定位。并设计出一种MPCA模块用于弥补深层卷积定位信息的不足。在测试阶段引入一个额外的分类器,进一步提高网络的分类能力。改进后的模型在3种安检违禁品数据集SiXary、HiXary、CLCXray进行测试,mAP分别达到了94.9%、77.3%、86.1%。结果表明,所提出的模型能够有效提高YOLOv7的检测复杂违禁品的能力,同时保持较快的检测速度,与当前主流算法相比,具有一定的先进性。

关键词: X射线图像, 违禁品检测, 注意力机制, 额外分类器