Discrimination of shriveled walnut X-ray image based on convolution neural network
The difference of internal quality of walnut will reduce its market profit.The existing detection methods have high labor cost and low efficiency,as well as impossible to discriminate the shriveled walnuts with different degrees.Therefore,a non-destructive,rapid and accurate detection method and a discriminated method are urgently needed to detect internal shriveled walnuts.The internal images of walnuts are obtained by using X-ray technology,and the ratio of the projection area between the walnut and walnut kernel is calculated by employing Photoshop image processing software,three categories of walnuts with different degrees of shriveling are identified,which are slightly shriveled,overly shriveled and normal walnuts,respectively.A shriveled walnut dataset is constructed by using these three types of walnuts.Based on the convolutional neural network(CNN)structure,the discrimination models of walnut internal shriveling degree are constructed by using Alexnet,VGG16,MobileNetV2 and ResNet50.The optimal model is determined through performance analysis based on the prediction loss value,prediction accuracy rate,test accuracy rate and Epoch average duration of the three models on the shriveled walnut dataset,followed by parameter optimization.The results show that the MobileNetV2 model achieves the best network performance with a learning rate of 0.000 1 and a batch size of 32,and with a prediction accuracy of 98.65%and a test accuracy of 93.40%.
walnutnon-destructive detectionX-rayinternal shrinkage walnut with different degreesconvolutional neural networks