Abstract:In order to solve the problems of export mixed internal quality and not easily to detect of walnuts in China, X-ray imaging technology combined with convolution neural network was proposed to quickly detect the internal quality of walnut. Using X-ray transmittance, X-ray images containing internal information were obtained. Firstly, X-ray images of walnut were preprocessed and data expanded. Then, four transfer learning models, including GoogLeNet, ResNet 101, MobileNet v2 and VGG 19, were used to construct convolutional neural networks to train walnut data sets. The model was analyzed through prediction set accuracy, loss value, test set accuracy and running time, and the model parameters were optimized. Finally, the walnut internal quality detection and sorting system was developed and applied to model verification. The results showed that among the four different transfer learning models, GoogLeNet model had the highest prediction accuracy. When the learning rate of GoogLeNet model was set to 0.001 and the epoch was set to 25, the prediction effect was the best, and the prediction accuracy was 96.67%. The results of system verification showed that the discriminant accuracy of shell walnut reached 100%, and the average discriminant accuracy was 96.39%. The system could realize the non-destructive testing and sorting of walnut internal quality, and provide further theoretical basis and technical reference for the equipment research and development.