Field Grading of Longan SSC via Vis-NIR and Improved BP Neural Network
<p>Block diagram of the hardware system structure.</p> "> Figure 2
<p>Perspective view of the device.</p> "> Figure 3
<p>Physical drawing of the device: (<b>a</b>) internal structure of the device; (<b>b</b>) overall view of the device.</p> "> Figure 4
<p>Spectral collection points.</p> "> Figure 5
<p>Overall structures of the BPNN and Brix-BPNN.</p> "> Figure 6
<p>Structural diagram of the ECA-Brix attention mechanism.</p> "> Figure 7
<p>H-swish and ReLU activation functions.</p> "> Figure 8
<p>Max pooling process for longan spectral data.</p> "> Figure 9
<p>Original spectral curves.</p> "> Figure 10
<p>Average spectral curves of the three SSC grades.</p> "> Figure 11
<p>Feature wavelength selection of longan SSC based on the SPA algorithm: (<b>a</b>) RMSE variation of the model; (<b>b</b>) optimal feature wavelength selected by SPA.</p> "> Figure 11 Cont.
<p>Feature wavelength selection of longan SSC based on the SPA algorithm: (<b>a</b>) RMSE variation of the model; (<b>b</b>) optimal feature wavelength selected by SPA.</p> "> Figure 12
<p>Feature wavelength selection of longan SSC based on the CARS algorithm: (<b>a</b>) number of sample variables; (<b>b</b>) RMSECV.</p> "> Figure 12 Cont.
<p>Feature wavelength selection of longan SSC based on the CARS algorithm: (<b>a</b>) number of sample variables; (<b>b</b>) RMSECV.</p> "> Figure 13
<p>Statistical chart of the true and predicted labels for the SSC grade of the test samples.</p> ">
Abstract
:1. Introduction
2. Materials and Methods
2.1. Test Samples
2.2. Portable Detection Device
2.3. Modeling Method
2.3.1. Spectral Data Acquisition
2.3.2. Determination of Longan SSC Values
2.3.3. Spectral Data Preprocessing Method
2.3.4. Feature Wavelength Selection Method
2.3.5. Classification Models
2.3.6. Proposed Brix-BPNN Model
2.3.7. Model Parameter Setting and Evaluation
2.4. Field Experiment Method
3. Results
3.1. Sample Spectral Analysis
3.2. Results of Spectral Data Preprocessing
3.3. Characteristic Wavelength Selection
3.3.1. Results of SPA Feature Wavelength Selection
3.3.2. Results of CARS Feature Wavelength Selection
3.4. Results of BP Neural Network Modeling
3.5. Results of Brix-BPNN Modeling
3.6. Results of Model Ablation and Comparison Experiments
3.7. Field Experiment Verification
4. Discussion
5. Conclusions
- The original spectral data collected were preprocessed by nine preprocessing methods (SG, D1, SNV, MSC, CT, SG-D1, SG-SNV, SG-MSC, and SG-CT) and combined with six classification algorithms (SVM, KNN, LR, RF, BPNN, and CNN) to develop an SSC qualitative analysis model for longan. Among these methods, the SG-D1 preprocessing method paired with the BP neural network demonstrated the best prediction performance. The classification accuracy of the full-band model reached 69.10%, which is 7.02% higher than the accuracy of the original spectral model.
- The SPA and CARS algorithms were applied to extract feature wavelength spectra following data pretreatment. These were then combined with the BPNN model and the improved Brix-BPNN model to establish a qualitative analysis model for longan SSC, utilizing both the full band and the feature wavelength. The experimental results showed that the Brix-BPNN model, based on 78 feature wavelengths extracted via CARS, achieved the best performance, with a classification accuracy of 71.10%, which is 2.84% higher than that of the original BPNN model. The number of wavelengths was reduced by 92% compared to the full band, making this model lightweight and efficient for rapid field detection.
- The improved optimal Brix-BPNN model was implanted into the developed portable detection device and validated through field experiments. The SSC grade of 30 Chuliang longan samples was predicted, with 25 accurate predictions, resulting in a total classification accuracy of 83.33%. The results demonstrate that the portable detection system can effectively facilitate the rapid, nondestructive detection of longan SSC grading in the field. The portable detection can serve as a decision-making tool for longan production management and postharvest treatment, offering promising application prospects.
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Huang, S.; Lv, X.; Han, Y.; Han, D.; Wei, J.; Li, J.; Guo, D. Disrupted sugar transport and continued sugar consumption lead to sugar decline in ripe ‘Shixia’longan fruit. LWT 2024, 191, 115620. [Google Scholar] [CrossRef]
- Zeng, S.; Wang, K.; Liu, X.; Hu, Z.; Zhao, L. Potential of longan (Dimocarpus longan Lour.) in functional food: A review of molecular mechanism-directing health benefit properties. Food Chem. 2023, 437, 137812. [Google Scholar] [CrossRef] [PubMed]
- Shao, Y.; Ji, S.; Xuan, G.; Wang, K.; Xu, L.; Shao, J. Soluble solids content monitoring and shelf life analysis of winter jujube at different maturity stages by Vis-NIR hyperspectral imaging. Postharvest Biol. Technol. 2024, 210, 112773. [Google Scholar] [CrossRef]
- Guo, W.; Li, W.; Yang, B.; Zhu, Z.; Liu, D.; Zhu, X. A novel noninvasive and cost-effective handheld detector on soluble solids content of fruits. J. Food Eng. 2019, 257, 1–9. [Google Scholar] [CrossRef]
- Tian, X.; Fan, S.; Li, J.; Huang, W.; Chen, L. An optimal zone combination model for on-line nondestructive prediction of soluble solids content of apple based on full-transmittance spectroscopy. Biosyst. Eng. 2020, 197, 64–75. [Google Scholar] [CrossRef]
- Sirisomboon, P.; Tanaka, M.; Kojima, T.; Williams, P. Nondestructive estimation of maturity and textural properties on tomato ‘Momotaro’by near infrared spectroscopy. J. Food Eng. 2012, 112, 218–226. [Google Scholar] [CrossRef]
- Yang, X.; Zhu, L.; Huang, X.; Zhang, Q.; Li, S.; Chen, Q.; Wang, Z.; Li, J. Determination of the soluble solids content in korla fragrant pears based on visible and near-infrared spectroscopy combined with model analysis and variable selection. Front. Plant Sci. 2022, 13, 938162. [Google Scholar] [CrossRef]
- Qi, H.; Shen, C.; Chen, G.; Zhang, J.; Chen, F.; Li, H.; Zhang, C. Rapid and nondestructive determination of soluble solid content of crown pear by visible/near-infrared spectroscopy with deep learning regression. J. Food Compos. Anal. 2023, 123, 105585. [Google Scholar] [CrossRef]
- Yuan, W.; Zhou, H.; Zhou, Y.; Zhang, C.; Jiang, X.; Jiang, H. In-field and nondestructive determination of comprehensive maturity index and maturity stages of Camellia oleifera fruits using a portable hyperspectral imager. Spectrochim. Acta Part A 2024, 315, 124266. [Google Scholar] [CrossRef] [PubMed]
- Yu, Y.; Zhang, Q.; Huang, J.; Zhu, J.; Liu, J. Nondestructive determination of SSC in Korla fragrant pear using a portable near-infrared spectroscopy system. Infrared Phys. Technol. 2021, 116, 103785. [Google Scholar] [CrossRef]
- Yao, Y.N.; Ma, K.; Zhu, J.; Huang, F.; Kuang, L.; Wang, X.; Li, S. Nondestructive determination of soluble solids content in intact apples using a self-made portable NIR diffuse reflectance instrument. Infrared Phys. Technol. 2023, 132, 104714. [Google Scholar] [CrossRef]
- Mansuri, S.M.; Chakraborty, S.K.; Mahanti, N.K.; Pandiselvam, R. Effect of germ orientation during Vis-NIR hyperspectral imaging for the detection of fungal contamination in maize kernel using PLS-DA, ANN and 1D-CNN modeling. Food Control 2022, 139, 109077. [Google Scholar] [CrossRef]
- Shih, M.S.; Chang, K.C.; Chou, S.A.; Liu, T.S.; Ouyang, Y.C. The Automated Detection of Fusarium Wilt on Phalaenopsis Using VIS-NIR and SWIR Hyperspectral Imaging. Remote Sens. 2023, 15, 4174. [Google Scholar] [CrossRef]
- Qiao, S.; Tian, Y.; Gu, W.; He, K.; Yao, P.; Song, S.; Wang, J.; Wang, H.; Zhang, F. Research on simultaneous detection of SSC and FI of blueberry based on hyperspectral imaging combined MS-SPA. Eng. Agric. Environ. Food 2019, 12, 540–547. [Google Scholar] [CrossRef]
- Zheng, Y.; Cao, Y.; Yang, J.; Xie, L. Enhancing model robustness through different optimization methods and 1-D CNN to eliminate the variations in size and detection position for apple SSC determination. Postharvest Biol. Technol. 2023, 205, 112513. [Google Scholar] [CrossRef]
- Q/YNKG 12; 2020 Quality Grading Standard for Fresh Fruit of Chuliang Longan. Fruit Tree Research Institute of Guangdong Academy of Agricultural Sciences: Guangzhou, China, 2020.
- Ashtiani, S.H.M.; Javanmardi, S.; Jahanbanifard, M.; Martynenko, A.; Verbeek, F.J. Detection of mulberry ripeness stages using deep learning models. IEEE Access 2021, 9, 100380–100394. [Google Scholar] [CrossRef]
- Guo, P.; Li, T.; Gao, H.; Chen, X.; Cui, Y.; Huang, Y. Evaluating calibration and spectral variable selection methods for predicting three soil nutrients using Vis-NIR spectroscopy. Remote Sens. 2021, 13, 4000. [Google Scholar] [CrossRef]
- Ye, S.; Wang, D.; Min, S. Successive projections algorithm combined with uninformative variable elimination for spectral variable selection. Chemom. Intell. Lab. Syst. 2008, 91, 194–199. [Google Scholar] [CrossRef]
- Zhan, B.; Li, P.; Li, M.; Luo, W.; Zhang, H. Detection of Soluble Solids Content (SSC) in Pears Using Near-Infrared Spectroscopy Combined with LASSO–GWF–PLS Model. Agriculture 2023, 13, 1491. [Google Scholar] [CrossRef]
- Sohn, S.I.; Oh, Y.J.; Pandian, S.; Lee, Y.H.; Zaukuu, J.L.Z.; Kang, H.J.; Ryu, T.H.; Cho, W.S.; Cho, Y.S.; Shin, E.K. Identification of Amaranthus species using visible-near-infrared (vis-NIR) spectroscopy and machine learning methods. Remote Sens. 2021, 13, 4149. [Google Scholar] [CrossRef]
- Ryu, D.S.; Noh, S.H.; Hwang, I.G. Preprocessing effects on on-line SSC measurement of Fuji apple by NIR spectroscopy. Korean Soc. Agric. Mach. 2000, 11, 560–568. [Google Scholar]
- Cheng, T.; Guo, S.; Pan, Z.; Fan, S.; Ju, S.; Xin, Z.; Zhou, X.; Jiang, F.; Zhang, D. Near-infrared model and its robustness as affected by fruit origin for ‘dangshan’ pear soluble solids content and pH measurement. Agriculture 2022, 12, 1618. [Google Scholar] [CrossRef]
- Liu, Y.; Sun, X.; Ouyang, A. Nondestructive measurement of soluble solid content of navel orange fruit by visible–NIR spectrometric technique with PLSR and PCA-BPNN. LWT 2010, 43, 602–607. [Google Scholar] [CrossRef]
- Chen, Y.; Li, Y.; Williams, R.A.; Zhang, Z.; Peng, R.; Liu, X.; Xing, T. Modeling of soluble solid content of PE-packaged blueberries based on near-infrared spectroscopy with back propagation neural network and partial least squares (BP–PLS) algorithm. J. Food Sci. 2023, 88, 4602–4619. [Google Scholar] [CrossRef]
- Tian, S.; Liu, W.; Xu, H. Improving the prediction performance of soluble solids content (SSC) in kiwifruit by means of near-infrared spectroscopy using slope/bias correction and calibration updating. Food Res. Int. 2023, 170, 112988. [Google Scholar] [PubMed]
SSC % | ≥21.0 | 21.0~19.0 | <19.0 |
---|---|---|---|
Grade | Super-grade, first-grade, second-grade fruit | Third-grade fruit | Equal external fruit |
Grade labels | 0 | 1 | 2 |
Sample Set | Number of Samples | SSC % | ||
---|---|---|---|---|
Range | Average Value | Standard Deviation | ||
Training set | 244 | 14.67~24.00 | 20.71 | 1.68 |
Test set | 81 | 16.15~23.60 | 20.72 | 1.61 |
SVM | KNN | ||
---|---|---|---|
Parameters | Parameter Value | Parameters | Parameter Value |
C | 1.0 | n_neighbors | 5 |
kernel | ‘rbf’ | weights | ‘uniform’ |
gamma | scale | algorithm | ‘auto’ |
shrinking | True | p | 2 |
decision_function _shape | ‘ovr’ | metric | ‘minkowski’ |
LR | RF | ||
Parameters | Parameter value | Parameters | Parameter value |
C | 1.0 | n_estimators | 100 |
penalty | ‘l2’ | max_depth | 10 |
solver | ‘lbfgs’ | max_features | ‘auto’ |
max_iter | 100 | min_samples_split | 2 |
tol | 1 × 10−4 | min_samples_leaf | 1 |
Parameters | Model | ||
---|---|---|---|
CNN | BPNN | Brix-BPNN | |
batch_size | 2 | 2 | 2 |
epochs | 300 | 300 | 300 |
optimizer | SGD | SGD | SGD |
learning_rate | 0.001 | 0.001 | 0.001 |
loss function | Cross-Entropy | Cross-Entropy | Cross-Entropy |
Preprocessing | Accuracy% | |||||
---|---|---|---|---|---|---|
SVM | KNN | LR | RF | BPNN | CNN | |
Original spectral | 54.21 | 55.90 | 59.83 | 60.96 | 62.08 | 64.32 |
SG | 54.21 | 55.90 | 60.39 | 61.52 | 62.36 | 62.36 |
SNV | 53.09 | 57.30 | 64.33 | 60.39 | 63.20 | 60.39 |
MSC | 53.09 | 57.02 | 62.36 | 60.12 | 60.39 | 61.24 |
CT | 54.21 | 59.27 | 63.48 | 61.24 | 63.76 | 63.76 |
D1 | 61.24 | 56.46 | 63.76 | 63.76 | 67.13 | 67.13 |
SG-D1 | 61.24 | 60.96 | 66.29 | 65.17 | 69.10 | 67.41 |
SG-SNV | 53.09 | 57.58 | 63.76 | 60.39 | 63.48 | 62.36 |
SG-MSC | 53.09 | 57.30 | 63.76 | 60.96 | 61.52 | 62.08 |
SG-CT | 54.21 | 59.55 | 63.20 | 62.92 | 63.20 | 65.17 |
Variable Selection Method | Wavelength Number | Accuracy% | Precision% | Recall% | F1% |
---|---|---|---|---|---|
Full band | 974 | 69.10 | 68.43 | 67.82 | 67.20 |
SPA | 20 | 67.41 | 63.09 | 64.41 | 63.42 |
CARS | 78 | 68.26 | 67.07 | 67.42 | 66.71 |
Variable Selection Method | Wavelength Number | Accuracy% | Precision% | Recall% | F1% |
---|---|---|---|---|---|
Full band | 974 | 69.66 | 69.50 | 68.42 | 67.40 |
SPA | 20 | 68.25 | 66.02 | 66.85 | 65.12 |
CARS | 78 | 71.10 | 70.04 | 69.10 | 68.44 |
Number | Model | Accuracy% | Precision% | Recall% | F1% |
---|---|---|---|---|---|
1 | BPNN | 69.10 | 68.43 | 67.82 | 67.20 |
2 | CARS+BPNN | 68.26 | 67.07 | 67.42 | 66.71 |
3 | CARS+BPNN+BN | 69.10 | 64.47 | 65.73 | 64.84 |
4 | CARS+BPNN+ECA-Brix | 68.82 | 68.20 | 68.82 | 65.87 |
5 | CARS+BPNN+H-Swish | 68.54 | 65.15 | 66.01 | 62.13 |
6 | CARS+BPNN+Max-Pool | 68.53 | 67.13 | 67.52 | 66.48 |
7 | CARS+BPNN+CONV | 68.82 | 63.92 | 65.73 | 62.72 |
8 | CARS+BPNN +BN+ECA-Brix | 69.38 | 65.95 | 67.42 | 65.58 |
9 | CARS+BPNN+BN +ECA-Brix+H-Swish | 69.66 | 68.87 | 67.85 | 66.11 |
10 | CARS+BPNN+BN +ECA-Brix+H-Swish+Max-Pool | 70.50 | 68.66 | 68.82 | 67.83 |
11 | CARS+BPNN+Brix-Module | 70.86 | 69.47 | 68.56 | 67.93 |
12 | CARS+Brix-BPNN | 71.10 | 70.04 | 69.10 | 68.44 |
Model (CARS+) | Accuracy% | Precision% | Recall% | F1% |
---|---|---|---|---|
BPNN | 68.26 | 67.07 | 67.42 | 66.71 |
MLP | 69.38 | 65.98 | 66.85 | 63.67 |
Dropout-BPNN | 68.26 | 66.76 | 66.85 | 64.23 |
Residual-BPNN | 68.82 | 62.84 | 63.20 | 61.96 |
ResNet-BPNN | 68.15 | 66.12 | 66.01 | 61.90 |
Brix-BPNN | 71.10 | 70.04 | 69.10 | 68.44 |
SSC Grade | Grade Labels | Number of True Detections | Number of True Predictions | Number of False Predictions | Accuracy% |
---|---|---|---|---|---|
Super-grade, first-grade, second-grade fruit | 0 | 15 | 13 | 2 | 86.67% |
Third-grade fruit | 1 | 8 | 6 | 2 | 75% |
Equal external fruit | 2 | 7 | 6 | 1 | 85.71% |
Total | Total | 30 | 25 | 5 | 83.33% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, J.; Zhang, M.; Wu, K.; Chen, H.; Ma, Z.; Xia, J.; Huang, G. Field Grading of Longan SSC via Vis-NIR and Improved BP Neural Network. Agriculture 2024, 14, 2297. https://doi.org/10.3390/agriculture14122297
Li J, Zhang M, Wu K, Chen H, Ma Z, Xia J, Huang G. Field Grading of Longan SSC via Vis-NIR and Improved BP Neural Network. Agriculture. 2024; 14(12):2297. https://doi.org/10.3390/agriculture14122297
Chicago/Turabian StyleLi, Jun, Meiqi Zhang, Kaixuan Wu, Hengxu Chen, Zhe Ma, Juan Xia, and Guangwen Huang. 2024. "Field Grading of Longan SSC via Vis-NIR and Improved BP Neural Network" Agriculture 14, no. 12: 2297. https://doi.org/10.3390/agriculture14122297
APA StyleLi, J., Zhang, M., Wu, K., Chen, H., Ma, Z., Xia, J., & Huang, G. (2024). Field Grading of Longan SSC via Vis-NIR and Improved BP Neural Network. Agriculture, 14(12), 2297. https://doi.org/10.3390/agriculture14122297