| Anomaly detection has become a hot research topic in the field of object detection in recent years,aiming to build models using normal samples to detect anomalies.Security inspection is a specific task in this area,which often uses X-ray security inspection machines to detect prohibited items at important transportation hubs.Currently,this task is mainly carried out manually,which is labor-intensive and easily affected by external environmental factors,resulting in the risk of missing detection or false alarms.Developing an automatic,fast,and accurate algorithm for detecting prohibited items can improve the efficiency and reliability of security inspections.The main challenges currently faced by this task are as follows:(1)extremely imbalanced data.In real-life scenarios,the number of normal samples far exceeds the number of prohibited item samples,making models trained on such datasets lack good generalization ability.(2)Serious object overlap.Due to the limited size of luggage packages,there are often cases of overlapping and occlusion between objects,which are easily ignored by general detection networks.In this thesis,a two-stage dual-channel input target detection algorithm is constructed to address the above problems.The main work of this thesis is summarized as follows:(1)To solve the data imbalance problem,this thesis combines anomaly detection algorithms and propose an Asymmetric Autoencoder(AAE).The network is trained only using normal samples,allowing the encoder to learn the distribution of normal samples in deep space,and then using the decoder to reconstruct and restore the deep features,outputting the corresponding sample’s generated image.Subsequently,the original and generated images are used to construct a disparity map to assist the target detection network to improve the detection accuracy.The network uses a lightweight decoder and encoder to form an asymmetric structure,which can solve the problem of reconstruction error failure.Additionally,this thesis uses knowledge distillation to train the AAE network,with the encoder serving as the teacher network,guiding the decoder,which serves as the student network,to improve its feature reconstruction ability through its powerful feature extraction capabilities.To ensure the integrity of the knowledge distillation process,this thesis designs a hierarchical multiscale loss function,including pixel-level distance loss function and global direction loss function.Experimental results show that the above methods effectively improve the accuracy of the network in anomaly detection tasks.(2)To use the disparity map to assist the target detection network,this thesis constructs a dual-channel object detection network,with the two inputs being the original image and the disparity map.Considering the particularity of the disparity map,this thesis designs a multiscale feature extraction network based on gated convolution,which can adaptively enhance abnormal information in the disparity map and better highlight abnormal features.Furthermore,to effectively fuse the features of the original image and the disparity map,this thesis combines self-attention mechanism and design a dualchannel input abnormal feature fusion attention network(AFFA).This network can effectively improve the detection network’s attention to anomalies based on disparity map features.The final experimental results show that our algorithm can solve the data imbalance problem and improve the detection accuracy of the network in situations where objects overlap. |