An Improved CNN-based Neural Network Model for Fruit Sugar Level Detection

Boyang Deng,Xin Wen,Zhan Gao
2024-11-07
Abstract:Artificial Intelligence (AI) is widely used in image classification, recognition, text understanding, and natural language processing, leading to significant advancements. In this paper, we introduce AI into the field of fruit quality detection. We designed a regression model for fruit sugar level estimation, utilizing an Artificial Neural Network (ANN) based on the visible/near-infrared (V/NIR) spectra of fruits. After analyzing the fruit spectra, we proposed an innovative neural network structure: the lower layers consist of a Multilayer Perceptron (MLP), a middle layer features a 2-dimensional correlation matrix, and the upper layers contain several Convolutional Neural Network (CNN) layers. Using fruit sugar levels as the detection target, we collected data from two fruit types, Gan Nan Navel and Tian Shan Pear, and conducted separate experiments to compare their results. To assess the reliability of our dataset, we first applied Analysis of Variance (ANOVA). We then explored various strategies for processing spectral data and evaluated their impact. Additionally, we employed Wavelet Decomposition (WD) for dimensionality reduction and a Genetic Algorithm (GA) to identify optimal features. We compared the performance of Neural Network models with traditional Partial Least Squares (PLS) models, and specifically evaluated our proposed MLP-CNN structure against other traditional neural network architectures. Finally, we introduced a novel evaluation metric based on the dataset's standard deviation (STD) to assess detection performance, demonstrating the feasibility of using an artificial neural network model for nondestructive fruit sugar level detection.
Artificial Intelligence
What problem does this paper attempt to address?
### Problems the paper attempts to solve This paper aims to solve the non - destructive measurement problem in fruit brix detection. Specifically, the author designed a convolutional neural network (CNN) model based on visible/near - infrared (V/NIR) spectra to estimate the brix level of fruits. Traditional methods usually rely on large - scale experimental systems, with inconvenient parameter adjustment, high equipment cost, slow speed and lack of stability. In recent years, with the rapid development of artificial intelligence (AI) and deep learning, artificial neural networks (ANN) have excellent performance in learning abstract features and have strong self - feedback and adjustment capabilities. Therefore, this paper proposes a new deep - learning method based on V/NIR spectra to improve the accuracy and efficiency of fruit brix detection. ### Main research contents 1. **Data collection and pre - processing**: - Collected samples of two kinds of fruits (Gannan navel oranges and Tianshan pears), with 300 samples for each kind of fruit. - Used USB2000 + micro - commercial spectrometer (Ocean Optics Inc., USA), 50W halogen lamp and standard diffuse - reflection whiteboard for spectral collection. - Conducted a variety of pre - processing methods on spectral data, including multiplicative scatter correction (MSC), Savitzky - Golay smoothing (SG), standard normal variate transformation (SNV), principal component analysis (PCA), first - order and second - order derivatives, wavelet decomposition (WD), etc. 2. **Model design**: - Proposed a new neural network structure, called the MLP - CNN model. The lower layer of this model consists of multi - layer perceptrons (MLP), the middle layer is a two - dimensional correlation matrix, and the upper layer contains multiple convolutional neural network (CNN) layers. - At the beginning of the model, six MLP layers are used, and the number of neurons in each layer gradually decreases (512, 256, 128, 64, 32, 16), and each fully - connected layer is followed by a ReLU activation layer. - Convert the output features of the sixth fully - connected layer into a two - dimensional spectral information matrix, and then input it into four - layer CNN, each layer is followed by a ReLU activation layer. - The final layer adopts a special CNN layer, whose convolution kernel size matches the input size, producing a single output representing the predicted brix value. 3. **Performance evaluation**: - Used cross - validation root mean square error (RMSECV), model prediction determination coefficient (R²) and a newly proposed evaluation index based on the standard deviation (STD) of the data set to evaluate the model performance. - Demonstrated the superiority of the proposed model by comparing it with the traditional partial least squares (PLS) model and other traditional neural network architectures. ### Innovation points - **New neural network structure**: Proposed the MLP - CNN model, which combines the advantages of MLP and CNN and can effectively learn spectral features. - **Data pre - processing strategy**: Explored a variety of pre - processing methods and found that the combination of Savitzky - Golay smoothing, multiplicative scatter correction and standard normal variate transformation has the best effect. - **Feature selection**: Used genetic algorithm (GA) combined with PLS for feature selection, which improved the prediction performance of the model. - **New evaluation index**: Introduced an evaluation index based on the standard deviation (STD) of the data set to more comprehensively evaluate the detection performance of the model. ### Conclusion This paper successfully proposed a deep - learning model based on V/NIR spectra for non - destructive fruit brix detection. Through a variety of pre - processing methods and feature selection strategies, the prediction accuracy and robustness of the model are significantly improved. This research provides new ideas and technical means for fruit quality detection.