| With the rapid increase of public transport and logistics throughput,especially during holidays,the flow of people is very large,which brings great challenges to artificial security inspections.Using computer vision algorithm to assist artificial security inspections can improve security inspections efficiency.Currently,the contraband recognition algorithm based on computer vision is mainly based on image classification and object detection,and it is unable to obtain the contour information of contraband.There are also problems such as blurred edges,overlapping and different scale of contraband.In order to solve these problems,a deep learning based X-ray security inspection image contraband segmentation algorithm is proposed in this paper,which can obtain contraband contour information,so as to assist artificial security inspections more effectively.The main work and innovations of this paper are as follows:(1)According to the characteristics of X-ray security images,a data augmentation method based on adaptive image stitching is proposed.In order to improve the generalization of the model,multiple images are stitched together;multiple images containing single luggage are merged into one image containing multiple bags,so as to simulate different scenes.(2)An encode-decode network suitable for contraband segmentation is designed.An encoder network combining channel attention mechanism,grouped convolution and residual structure is used to extract useful features for contraband recognition.A global multi-scale context module is designed and implemented to enrich the features extracted from the encoder network.A decoder module with multi-level fusion is designed-and implemented to obtain more abundant multi-scale information.(3)A multi-task loss function suitable for contraband segmentation task is designed.By introducing the minimum circumscribed rectangle label and edge label as auxiliary supervision,we enhance the network’s learning of contraband shape,so as to solve the problem of fuzzy boundary when the surrounding background of contraband is complex.In order to solve the problem of sample imbalance between foreground and background of contraband in X-ray security image,the weighted binary cross-entropy loss and Dice loss are used as loss functions.In addition,we conduct a series of comparative experiments and ablation experiments,and the experimental results show that our algorithm achieves the best performance of 71.06%mIoU on contraband segmentation dataset,and it is proved that the proposed algorithm for contraband segmentation of X-ray security images is effective.Finally,we also design and implemente a web prototype system based on our proposed algorithm.The real-time performance and stability of the system are evaluated through large-scale test data.The test results show that the system we designed has good real-time performance and stability. |