Abstract:Automatic Xray security inspection is an important method to maintain public safety. Current research of prohibited item inspection on Xray images only works on predefined classes in the dataset and cannot be generalized to unseen categories. The imbalance problem in the dataset will also affect the performance of models. In order to solve above defects, the paper proposes a segmentation model for prohibited item inspection in Xray Images based on fewshot learning. The model first embeds the test image and annotated support images to a common space, then measures the spatial pixelwise similarity and regional similarity, finally segments out suspected areas in the test image. To deal with uncertain numbers of support images, a fusion method based on the ConvGRU is proposed to integrate the similarity information for the test image and different support images. Experiments show that the proposed model improves 20% and 22% meanIoU compared to the stateoftheart methods under 1shot task and 5shot task, which demonstrates the ability to recognize unseen categories.