There are many problems in the recognition of contraband in express packages,such as a wide variety,the dependence on manpower,the difficulty of obtaining X-ray images and so on.In order to improve the efficiency and accuracy of the recognition of contraband in express packages,a transfer learning and residual network(TL-ResNet18)method based on transfer learning and residual network for express package X-ray image recognition was proposed in this study.Firstly,the source domain dataset and target domain dataset with high similarity were constructed.Secondly,ResNet18 was selected as the pre-training model,the initialization parameter structure was adjusted,and the content learned by ResNet18 was combined as the initialization parameters to transfer to the target domain,namely,X-ray image classification of express packages.Finally,the same dataset was used as the input of the three models and the results were compared.The recognition accuracies of local and global fine-tuning of TL-Resnet18 model were 93.5%and 95.0%,respectively,which were improved by 7%and 8.5%compared with ResNet18 model.The precision,recall,and F1 score of TL-ResNet18 model were better than ResNet18 model.The TL-Resnet18 recognition method has better performance and is not limited by the deep network training caused by small datasets,which is conducive to the intelligent development of X-ray image recognition of express packages.