Computer Engineering and Applications ›› 2025, Vol. 61 ›› Issue (6): 141-149.DOI: 10.3778/j.issn.1002-8331.2403-0139

• Special Issue on YOLOv8 Improvements and Applications • Previous Articles     Next Articles

X-Ray Image Contraband Detection Based on Improved YOLOv8s

YAN Zhiming, LI Xinwei, YANG Yi   

  1. 1.School of Electrical Engineering and Automation, Henan Polytechnic University, Jiaozuo, Henan 454000, China
    2.Henan Key Laboratory of Intelligent Detection and Control of Coal Mine Equipment, Jiaozuo, Henan 454000, China
  • Online:2025-03-15 Published:2025-03-14

基于改进YOLOv8s的X射线图像违禁品检测算法

颜志明,李新伟,杨艺   

  1. 1.河南理工大学 电气工程与自动化学院,河南 焦作 454000
    2.河南省煤矿装备智能检测与控制重点实验室,河南 焦作 454000

Abstract: The variable size of contraband in X-ray images and mutual occlusion are the main factors for the low detection accuracy of small model target detection methods, in order to improve the accuracy of contraband detection under the restricted model parameters, an improved small YOLOv8SP contraband detection network is proposed. Aiming at the problem of different sizes of contraband and the difficulty of identifying small targets, a multi-size spatial pyramid pooling module is designed to realize multi-scale feature extraction by using a dense connection method. For the leakage detection problem caused by mutual occlusion of contraband, a parallel attention module is designed to improve the feature extraction ability of occluded objects. A large number of experiments prove that YOLOv8SP achieves 94.27% detection accuracy on the SIXray dataset at a very small scale, which is 2.13?percentage points higher than the original network, and the detection speed is 115 frames per second. It also has obvious advantages in terms of accuracy and computation speed compared with similar networks, which proves the effectiveness of the designed algorithm.

Key words: X-ray, contraband detection, YOLOv8s, attentional mechanism, parameter constraint

摘要: X射线图像违禁品尺寸多变、相互遮挡是小模型目标检测方法检测精度低的主要因素,为了在模型参数受限情况下提高违禁品检测精度,提出一种改进的小型YOLOv8SP违禁品检测网络。针对违禁品大小不一和小目标难以识别的问题,设计了一种多尺寸空间金字塔池化模块,采用密集连接方式实现多尺度特征提取;针对违禁品相互遮挡造成的漏检问题,设计了一种并行注意力模块提升遮挡物体的特征提取能力。大量实验证明,YOLOv8SP在极小的规模上对SIXray数据集的检测精度达到94.27%,相比于原网络提升2.13个百分点,检测速度(FPS)为115;与同类网络相比在精度和运算速度上也具有明显优势,证明了设计算法的有效性。

关键词: X射线, 违禁品检测, YOLOv8s, 注意力机制, 参数受限