| In the process of daily travel or mailing parcels,you will always be exposed to the safety inspection of items,which is an inevitable link in safety management.However,if there is a large number of packages,the security check rate will slow down significantly.For baggage inspection,this situation may also result in a large flow of people and a slower security check,causing blockage of the station and affecting the efficiency of people’s travel.In today’s development,the enhancement of computer hardware and convolutional neural networks is driving the development of the target detection field.This paper is based on the YOLOv5 network to detect the contraband in the X-ray security image.The purpose of the research is to perform detection by using the YOLOv5 network,which has a faster calculation speed and a smaller volume in target detection.On the basis of ensuring accuracy,the detection rate of a single image is increased to ensure the real-time performance of image detection,thereby improving the efficiency of security inspection.The main content of this article is as follows: First,through the analysis and research on the existing public data sets,it is concluded that the final article selects the public data set in the Jinnan Digital Creation Algorithm Challenge(Field 2)as the basic data set for research.Then the existing common networks for target detection are analyzed and compared,and YOLOv5 is selected as the basic network framework,and the basic network is used to complete the preliminary comparison experiment.The m AP of the initial experiment is 0.62,which is used as a benchmark for comparison.Finally,it is optimized for the YOLOv5 network.The optimization content is as follows: The backbone network is improved,and the size of the entire network is reduced by using Mobilenet V2.Using this network can reduce the amount of parameters of the model to 14.70% of the original model.Aiming at the problem of different feature sizes in X-ray security inspection images due to penetrability,adaptive feature fusion is added to solve this problem through feature pyramids.Due to the weaker features of X-ray security images,an attention mechanism is introduced to enhance image features.Finally,through the use of different improvement methods,the results are compared.It can be found that the use of Mobilenet V2 can greatly reduce the amount of parameters,reducing the amount of model parameters to 14.70% of the original model.By using the combination of adaptive space fusion ASFF and attention mechanism CBAM,we can get an average accuracy rate m AP of 0.71,which is an increase of 14.51% compared to the original 0.62.The reasoning speed is increased to 204.10 FPS,and FLOPs can reach 24.90.Good performance in terms of detection speed. |