X-ray Image Contraband Detection Based on Improved YOLOv8
To solve the problem of low accuracy of contraband detection in existing X-ray images,an X-ray image contraband detection algorithm based on improved YOLOv8 is proposed.Firstly,a small target detection head is added on the basis of YOLOv8 to enhance the sensitivity of small target objects.At the same time,Adaptively Spatial Feature Fusion(ASFF)module is used to adaptively adjust the weights between different detection layers to avoid information conflicts between multi-scale levels.Secondly,the Spatial Pyramid Pooling-Fast(SPPF)module in YOLOv8 is replaced with reparameterized RFB_S module,and the convolution of different sizes is used to obtain the feature map information of different fields of view,so as to avoid the potential gradient disappearance problem caused by multiple maximum pooling.The Efficient Multi-scale Attention(EMA)mechanism is then introduced between the neck network and the backbone network to effectively distinguish the background region from the target region and enhance the interaction of key information.Finally,the common convolution in C2f module is replaced by deformable convolution,and the shape of the convolution kernel is adjusted adaptively by using deformable convolution to better capture and perceive the object features of different scales in the image.The mean Average Precision(mAP)value of the proposed algorithm reaches 92.7%on the SIXary dataset,which is 3.2%higher than the original algorithm.The experimental results show that the improved algorithm is much better than the original algorithm,which proves the effectiveness of the improved algorithm.