| X-ray security inspection technology is widely used in the security inspection of public transportation places and logistics express industries to maintain transportation safety and protect public places from threats.However,the current security inspection work is to manually screen dangerous goods in X-ray images,which has high labor costs and is easily affected by environmental and subjective mental factors,resulting in false detections and missed detections,which poses a greater safety hazard.Nowadays,with the rapid development of computer hardware and the enhancement of deep learning,it is of practical application value to use the advantages of deep learning to explore X-ray security image detection algorithms with high accuracy,fast speed,safety and reliability.This paper uses the YOLOv4 network to detect dangerous goods in X-ray security images.The purpose of the research is to improve the detection accuracy of the network for the problems of multi-scale and serious overlapping of dangerous goods in X-ray security inspection image samples,and to reduce the weight of the network.While ensuring the accuracy,the speed of detection is improved,thereby improving the efficiency of security inspection.The main research content of this paper includes:First,using deformable convolution,the PANet(Path Aggregation Network)module can achieve more accurate feature alignment when high-level features and low-level features are fused,and an X-ray security image detection algorithm combining deformable convolution and YOLOv4 is designed and implemented.YOLOv4-PANv2.Improve the CIOU(Complete-IOU)loss function used in the original YOLOv4 training,use the side length as a penalty item,solve the problem of severe oscillation of the loss value of the CIOU loss function when processing lowquality samples,and make the network converge faster.Improve the non-maximum value suppression algorithm of YOLOv4,consider DIOU when deleting redundant bounding boxes,and also consider the confidence of objects,solve the problem of serious overlap of dangerous goods in X-ray security image data sets,and improve detection precision.Secondly,based on the YOLOv4-PANv2 network,a lightweight algorithm is designed and implemented.First,the RepCSPDarknet-53 backbone network is designed to improve the detection accuracy of the network without reducing the detection accuracy speed.Second,a channel pruning strategy is designed,using sparse training to determine the importance of the channel through the scaling factor of the BN(Batch Normalization)layer,and then designing a channel pruning strategy,using adaptive BN to quickly screen out subnets with good performance,improving the network detection speed. |