Affiliation:
1. School of Technology, Beijing Forestry University, Beijing 100083, China
Abstract
The maturity grading of walnuts during harvesting relies on experience. In this paper, walnut images in a natural environment were collected to construct a dataset, and deep learning algorithms were utilized to combine walnut internal physical and chemical indicators to carry out research on walnut maturity detection methods and further research on walnut oil content prediction by combining walnut images with walnut oil content indicators. The main contents of this paper include collecting walnut images in a natural environment, constructing datasets, and using deep learning algorithms combined with internal physical and chemical indexes of walnuts to study walnut maturity detection and oil content prediction methods. First, two walnut image acquisition schemes were designed, and a total of 9504 images were collected from 23 August to 21 September 2021. The dataset was expanded to 18,504 images through data preprocessing and image enhancement. A self-supervised Gaussian attention network (GATCluster) walnut ripeness detection method based on image clustering is proposed to develop ripeness criteria through unsupervised clustering, and the accuracy of the criteria is verified by analysis of variance (ANOVA). The maturity detection accuracy of the test set of 1500 images is 88.33%. Secondly, a walnut oil content prediction method based on improved ResNet34 is proposed. The feature extraction capability is improved by introducing the Squeeze-and-Excitation Networks (SENet) channel attention mechanism and the convolutional self-attention module. The prediction results on 50 images show that the root mean square error, average absolute percentage error, and regression coefficient are 2.96, 0.103, and 0.8822, respectively. The experiments show that the method performs well in predicting the oil content of walnuts at different maturity levels.