With the rapid development of economy and society,security inspection has become one of the important means to ensure the safety of air transportation,railway passenger transportation and express delivery industry.At present,most places in China still use manual X-ray image detection of contraband.However,manual security inspection has the problems of slow speed,high cost and high missed detection rate.This thesis studies the detection method of contraband in X-ray images.Through the research of literature,this thesis conducts an in-depth analysis of the existing object detection methods,few-shot object detection methods and selfsupervised learning methods.Based on the characteristics of X-ray images,this thesis proposes an algorithm of X-ray image contraband detection based on scale adaptive and self-supervised learning.Aiming at the problems of serious accumulation and occlusion of objects in X-ray images,different imaging angles,a large number of small-size contraband,and high requirements for detection speed,this thesis proposes an X-ray image contraband detection algorithm based on scale-adaptive center point detection.First of all,a data augmentation method based mixup is proposed to ensure the diversity of training data.Secondly,a feature decoupling module is proposed to extract the features of large and small-size contraband independently and in parallel.The feature decoupling module can enhance the feature decoupling ability of various size of contraband to increase the differentiation of features and strengthen the effect of feature extraction of small-size contraband.Finally,a scale-adaptive prediction module based on group convolution is designed to detect contraband of feature maps with different strides in the upsampling process to enhance the detection effect of occluded contraband.Besides,this thesis uses group convolution and lightweight feature extraction network to reduce the amount of model parameters,make the model smaller,and speed up inference.The algorithm can not only accurately detect occluded contraband and small-size contraband but also can run on CPU devices for fast detection.Insufficient data of some contraband in actual security inspection scenarios leads to over-fitting of the deep learning model.Different coloring algorithms of security inspection machines from different manufacturers lead to poor generalization ability of the model.In response to these two questions,this thesis proposes an X-ray image contraband detection algorithm combined with self-supervised learning and few-shot learning.First of all,the self-supervised information training model based on color insensitivity is used to determine the initial weight of the network.Secondly,for the problem of complex image background information,a background suppression module is proposed to enhance the object features.Finally,this thesis proposes online hard example mining for few-shot learning,which back propagates hard samples and simple samples at the same time to balance the hard samples and simple samples in the training process.This algorithm improves the accuracy of few-shot object detection,and this algorithm has high generalization ability.The experimental results on the UNICOMP dataset show that the algorithms proposed in this thesis achieve better detection results for contraband.These algorithms have better performance than the mainstream detection algorithms. |