Detection of Soluble Solid Content in Citrus Fruits Using Hyperspectral Imaging with Machine and Deep Learning: A Comparative Study of Two Citrus Cultivars
Abstract
1. Introduction
2. Materials and Methods
2.1. Sample Preparation
2.2. Hyperspectral Spectrometer and Spectra Acquisition
2.2.1. Hyperspectral Data Acquisition
2.2.2. Spectra Extraction
2.3. Measurement of Soluble Solid Content
2.4. Spectra Preprocessing
2.5. Data Analysis Methods
2.5.1. PLSR
2.5.2. SVR
2.5.3. CNNs
2.5.4. LSTM
2.5.5. CNN–LSTM and LSTM–CNN
2.5.6. Transformer
2.5.7. CNN–Transformer and Transformer–CNN
2.6. Software and Model Evaluation Metrics
2.6.1. SHAP Analysis
2.6.2. Model Evaluation Metrics and Software Environment
3. Results
3.1. Spectral Profiles and Outlier Removal
3.2. Prediction Results of Regression Models
3.2.1. Traditional Machine Learning Models for SSC Prediction
3.2.2. Deep Learning Models for SSC Prediction
3.2.3. Comparison Between the Traditional Machine Learning and Deep Learning Models
3.3. Model Visualization
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Zhao, Y.; Zhou, L.; Wang, W.; Zhang, X.; Gu, Q.; Zhu, Y.; Chen, R.; Zhang, C. Visible/near-infrared Spectroscopy and Hyperspectral Imaging Facilitate the Rapid Determination of Soluble Solids Content in Fruits. Food Eng. Rev. 2024, 16, 470–496. [Google Scholar] [CrossRef]
- Kalopesa, E.; Karyotis, K.; Tziolas, N.; Tsakiridis, N.; Samarinas, N.; Zalidis, G. Estimation of Sugar Content in Wine Grapes via In Situ VNIR–SWIR Point Spectroscopy Using Explainable Artificial Intelligence Techniques. Sensors 2023, 23, 1065. [Google Scholar] [CrossRef] [PubMed]
- Kim, S.-Y.; Hong, S.-J.; Kim, E.; Lee, C.-H.; Kim, G. Application of ensemble neural-network method to integrated sugar content prediction model for citrus fruit using Vis/NIR spectroscopy. J. Food Eng. 2023, 338, 111254. [Google Scholar] [CrossRef]
- Xu, X.; Chen, Y.; Yin, H.; Wang, X.; Zhang, X. Nondestructive detection of SSC in multiple pear (Pyrus pyrifolia Nakai) cultivars using Vis-NIR spectroscopy coupled with the Grad-CAM method. Food Chem. 2024, 450, 139283. [Google Scholar] [CrossRef]
- Yang, J.; Luo, X.; Zhang, X.; Passos, D.; Xie, L.; Rao, X.; Xu, H.; Ting, K.; Lin, T.; Ying, Y. A deep learning approach to improving spectral analysis of fruit quality under interseason variation. Food Control 2022, 140, 109108. [Google Scholar] [CrossRef]
- Qi, H.; Shen, C.; Chen, G.; Zhang, J.; Chen, F.; Li, H.; Zhang, C. Rapid and non-destructive 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]
- Li, C.; He, M.; Cai, Z.; Qi, H.; Zhang, J.; Zhang, C. Hyperspectral Imaging with Machine Learning Approaches for Assessing Soluble Solids Content of Tribute Citru. Foods 2023, 12, 247. [Google Scholar] [CrossRef]
- Kim, M.J.; Yu, W.H.; Song, D.J.; Chun, S.W.; Kim, M.S.; Lee, A.; Kim, G.; Shin, B.S.; Mo, C. Prediction of Soluble-Solid Content in Citrus Fruit Using Visible-Near-Infrared Hyperspectral Imaging Based on Effective-Wavelength Selection Algorithm. Sensors 2024, 24, 1512. [Google Scholar] [CrossRef] [PubMed]
- Martins, J.A.; Guerra, R.; Pires, R.; Antunes, M.D.; Panagopoulos, T.; Brázio, A.; Afonso, A.M.; Silva, L.; Lucas, M.R.; Cavaco, A.M. SpectraNet-53: A deep residual learning architecture for predicting soluble solids content with VIS-NIR spectroscopy. Comput. Electron. Agric. 2022, 197, 106945. [Google Scholar] [CrossRef]
- Xu, M.; Sun, J.; Cheng, J.; Yao, K.; Wu, X.; Zhou, X. Non-destructive prediction of total soluble solids and titratable acidity in Kyoho grape using hyperspectral imaging and deep learning algorithm. Int. J. Food Sci. Technol. 2023, 58, 9–21. [Google Scholar] [CrossRef]
- Qi, H.; Li, H.; Chen, L.; Chen, F.; Luo, J.; Zhang, C. Hyperspectral Imaging Using a Convolutional Neural Network with Transformer for the Soluble Solid Content and pH Prediction of Cherry Tomatoes. Foods 2024, 13, 251. [Google Scholar] [CrossRef] [PubMed]
- Shen, L.; Wang, H.; Liu, Y.; Liu, Y.; Zhang, X.; Fei, Y. Prediction of Soluble Solids Content in Green Plum by Using a Sparse Autoencoder. Appl. Sci. 2020, 10, 3769. [Google Scholar] [CrossRef]
- Sneha, S.; Panmanas, S.; Sumesh, K.C.; Anupun, T.; Kittisak, P.; Bahadur Kshetri, T.; Peerapong, S. Near-infrared hyperspectral imaging combined with machine learning for physicochemical-based quality evaluation of durian pulp. Postharvest Biol. Technol. 2023, 200, 112334. [Google Scholar] [CrossRef]
- He, C.; Jiang, X.; Liu, Y. Research on the upgrade and maintenance method of apple soluble solids content models. J. Food Process Eng. 2024, 47, e14560. [Google Scholar] [CrossRef]
- Gomes, V.; Reis, M.S.; Rovira-Más, F.; Mendes-Ferreira, A.; Melo-Pinto, P. Prediction of Sugar Content in Port Wine Vintage Grapes Using Machine Learning and Hyperspectral Imaging. Processes 2021, 9, 1241. [Google Scholar] [CrossRef]
- Dixit, Y.; Al-Sarayreh, M.; Craigie, C.R.; Reis, M.M. A global calibration model for prediction of intramuscular fat and pH in red meat using hyperspectral imaging. Meat Sci. 2021, 181, 108405. [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]
- Zhao, Y.; Deng, J.; Chen, Q.; Jiang, H. Near-infrared spectroscopy based on colorimetric sensor array coupled with convolutional neural network detecting zearalenone in wheat. Food Chem. X 2024, 22, 101322. [Google Scholar] [CrossRef]
- Tarandeep, S.; Mittal Garg, N.; Iyengar, S.R.S.; Vishavpreet, S. Near-infrared hyperspectral imaging for determination of protein content in barley samples using convolutional neural network. J. Food Meas. Charact. 2023, 17, 3548–3560. [Google Scholar] [CrossRef]
- Houngbo, M.E.; Desfontaines, L.; Diman, J.; Arnau, G.; Mestres, C.; Davrieux, F.; Rouan, L.; Beurier, G.; Marie-Magdeleine, C.; Meghar, K.; et al. Convolutional neural network allows amylose content prediction in yam (Dioscorea alata L.) flour using near infrared spectroscopy. J. Sci. Food Agric. 2024, 104, 4915–4921. [Google Scholar] [CrossRef]
- Xiao, Y.; Li, C.; Jin, C.; Luo, J.; Qi, H.; Zhang, C. Detection of soluble solid content in citrus fruit using near-infrared spectroscopy with machine learning regression: An exploration of the influence of sampling positions. J. Food Compos. Anal. 2025, 142, 107554. [Google Scholar] [CrossRef]
- Geladi, P.; Kowalski, B.R. Partial least-squares regression: A tutorial. Anal. Chim. Acta 1986, 185, 1–17. [Google Scholar] [CrossRef]
- Smola, A.; Scholkopf, B. A tutorial on support vector regression. Stat. Comput. 2004, 14, 199–222. [Google Scholar] [CrossRef]
- Purwono, P.; Ma’arif, A.; Rahmaniar, W.; Fathurrahman, H.I.K.; Frisky, A.Z.K.; Haq, Q.M.u. Understanding of Convolutional Neural Network (CNN): A Review. Int. J. Robot. Control Syst. 2023, 2, 739–748. [Google Scholar] [CrossRef]
- Dey, B.; Ahmed, R.; Ferdous, J.; Haque, M.M.U.; Khatun, R.; Hasan, F.E.; Uddin, S.N. Automated plant species identification from the stomata images using deep neural network: A study of selected mangrove and freshwater swamp forest tree species of Bangladesh. Ecol. Inform. 2023, 75, 102128. [Google Scholar] [CrossRef]
- Zhao, Z.; Chen, W.; Wu, X.; Chen, P.C.Y.; Liu, J. LSTM network: A deep learning approach for short-term traffic forecast. IET Intell. Transp. Syst. 2017, 11, 68–75. [Google Scholar] [CrossRef]
- Turner, R.E. An Introduction to Transformers. arXiv 2024, arXiv:2304.10557. [Google Scholar]
- Mosca, E.; Szigeti, F.; Tragianni, S.; Gallagher, D.; Groh, G. SHAP-Based Explanation Methods: A Review for NLP Interpretability. In Proceedings of the 29th International Conference on Computational Linguistics, Gyeongju, Republic of Korea, 12–17 October 2022; pp. 4593–4603. [Google Scholar]
- Zhang, T.; Zhang, L.; Payne, P.R.O.; Li, F. Synergistic Drug Combination Prediction by Integrating Multiomics Data in Deep Learning Models. Methods Mol. Biol. 2021, 2194, 223–238. [Google Scholar] [CrossRef]
- Bai, Y.; Xiong, Y.; Huang, J.; Zhou, J.; Zhang, B. Accurate prediction of soluble solid content of apples from multiple geographical regions by combining deep learning with spectral fingerprint features. Postharvest Biol. Technol. 2019, 156, 110943. [Google Scholar] [CrossRef]
- Zhu, S.; Zhou, L.; Gao, P.; Bao, Y.; He, Y.; Feng, L. Near-Infrared Hyperspectral Imaging Combined with Deep Learning to Identify Cotton Seed Varieties. Molecules 2019, 24, 3268. [Google Scholar] [CrossRef]
- Zhou, L.; Zhang, C.; Taha, M.F.; Wei, X.; He, Y.; Qiu, Z.; Liu, Y. Wheat Kernel Variety Identification Based on a Large Near-Infrared Spectral Dataset and a Novel Deep Learning-Based Feature Selection Method. Front. Plant Sci. 2020, 11, 575810. [Google Scholar] [CrossRef] [PubMed]
- Bejani, M.M.; Ghatee, M. A systematic review on overfitting control in shallow and deep neural networks. Artif. Intell. Rev. 2021, 54, 6391–6438. [Google Scholar] [CrossRef]
- Zhang, H.; Zhan, B.; Pan, F.; Luo, W. Determination of soluble solids content in oranges using visible and near infrared full transmittance hyperspectral imaging with comparative analysis of models. Postharvest Biol. Technol. 2020, 163, 111148. [Google Scholar] [CrossRef]
- Cai, L.; Li, J.; Zhang, H.; Zhang, Y.; Zhang, J.; Hao, H. Determination of the SSC in oranges using Vis-NIR full transmittance hyperspectral imaging and spectral visual coding: A practical solution to the scattering problem of inhomogeneous mixtures. Food Chem. 2025, 474, 143239. [Google Scholar] [CrossRef]
- Torres, I.; Sanchez, M.T.; de la Haba, M.J.; Perez-Marin, D. LOCAL regression applied to a citrus multispecies library to assess chemical quality parameters using near infrared spectroscopy. Spectrochim. Acta A Mol. Biomol. Spectrosc. 2019, 217, 206–214. [Google Scholar] [CrossRef] [PubMed]
- Ruslan, R.; Ehsani, R.; Lee, W.S. Quantification of Total Soluble Solids and Titratable Acidity for Citrus Maturity Using Portable Vis-Nir Spectroradiometer. Appl. Eng. Agric. 2012, 28, 735–743. [Google Scholar] [CrossRef]
- Qing, J.; Deng, X.; Lan, Y.; Li, Z. GPT-aided diagnosis on agricultural image based on a new light YOLOPC. Comput. Electron. Agric. 2023, 213, 108168. [Google Scholar] [CrossRef]
Training Set (%) | Validation Set (%) | Testing Set (%) | |||||||
---|---|---|---|---|---|---|---|---|---|
Number | Min | Max | Number | Min | Max | Number | Min | Max | |
Ponkan | 184 | 10.3 | 15.8 | 46 | 10.4 | 15.3 | 46 | 10.8 | 14.7 |
Tianchao | 180 | 8.8 | 14.1 | 44 | 7.6 | 13.1 | 44 | 8.1 | 13.1 |
Training Set | Validation Set | Testing Set | |||||
---|---|---|---|---|---|---|---|
rc | RMSEC | rv | RMSEV | rp | RMSEP | ||
PLSR | Ponkan | 0.899 | 0.432 | 0.845 | 0.591 | 0.820 | 0.562 |
Tianchao | 0.836 | 0.582 | 0.796 | 0.678 | 0.749 | 0.728 | |
SVR | Ponkan | 0.782 | 0.623 | 0.743 | 0.689 | 0.719 | 0.769 |
Tianchao | 0.794 | 0.643 | 0.732 | 0.768 | 0.712 | 0.831 |
Training Set | Validation Set | Testing Set | |||||
---|---|---|---|---|---|---|---|
rc | RMSEC | rv | RMSEV | rp | RMSEP | ||
CNN | Ponkan | 0.742 | 1.413 | 0.706 | 1.477 | 0.687 | 1.432 |
Tianchao | 0.846 | 0.612 | 0.760 | 0.744 | 0.754 | 0.746 | |
LSTM | Ponkan | 0.718 | 0.691 | 0.659 | 0.755 | 0.653 | 0.832 |
Tianchao | 0.687 | 0.858 | 0.619 | 1.009 | 0.613 | 1.024 | |
Transformer | Ponkan | 0.713 | 0.759 | 0.703 | 0.760 | 0.650 | 0.869 |
Tianchao | 0.713 | 0.795 | 0.656 | 0.972 | 0.641 | 0.905 | |
CNN–LSTM | Ponkan | 0.806 | 0.5934 | 0.723 | 0.669 | 0.723 | 0.773 |
Tianchao | 0.793 | 0.724 | 0.734 | 0.780 | 0.709 | 0.843 | |
LSTM–CNN | Ponkan | 0.749 | 0.667 | 0.742 | 0.791 | 0.717 | 0.694 |
Tianchao | 0.759 | 0.810 | 0.701 | 0.878 | 0.690 | 0.832 | |
CNN–Transformer | Ponkan | 0.754 | 0.773 | 0.676 | 0.821 | 0.654 | 0.943 |
Tianchao | 0.748 | 1.567 | 0.660 | 1.574 | 0.648 | 0.726 | |
Transformer–CNN | Ponkan | 0.738 | 0.672 | 0.692 | 0.709 | 0.690 | 0.804 |
Tianchao | 0.746 | 1.021 | 0.659 | 1.251 | 0.646 | 1.265 |
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. |
© 2025 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
Xiao, Y.; Zhai, Y.; Zhou, L.; Yin, Y.; Qi, H.; Zhang, C. Detection of Soluble Solid Content in Citrus Fruits Using Hyperspectral Imaging with Machine and Deep Learning: A Comparative Study of Two Citrus Cultivars. Foods 2025, 14, 2091. https://doi.org/10.3390/foods14122091
Xiao Y, Zhai Y, Zhou L, Yin Y, Qi H, Zhang C. Detection of Soluble Solid Content in Citrus Fruits Using Hyperspectral Imaging with Machine and Deep Learning: A Comparative Study of Two Citrus Cultivars. Foods. 2025; 14(12):2091. https://doi.org/10.3390/foods14122091
Chicago/Turabian StyleXiao, Yuxin, Yuanning Zhai, Lei Zhou, Yiming Yin, Hengnian Qi, and Chu Zhang. 2025. "Detection of Soluble Solid Content in Citrus Fruits Using Hyperspectral Imaging with Machine and Deep Learning: A Comparative Study of Two Citrus Cultivars" Foods 14, no. 12: 2091. https://doi.org/10.3390/foods14122091
APA StyleXiao, Y., Zhai, Y., Zhou, L., Yin, Y., Qi, H., & Zhang, C. (2025). Detection of Soluble Solid Content in Citrus Fruits Using Hyperspectral Imaging with Machine and Deep Learning: A Comparative Study of Two Citrus Cultivars. Foods, 14(12), 2091. https://doi.org/10.3390/foods14122091