Revealing the Power of Deep Learning in Quality Assessment of Mango and Mangosteen Purée Using NIR Spectral Data
Abstract
1. Introduction
2. Materials and Methods
2.1. Samples Preparation
2.2. Spectra Acquisition
2.3. SSC and TA Measurement
2.4. Spectra Preparation
2.5. Convolutional Neural Networks (CNN)
2.5.1. Data Augmentation and Cross-Validation
2.5.2. Modeling
2.6. Partial Least Squares Regression (PLSR)
2.7. Statistical Analysis
3. Results
3.1. Spectral Characteristics
3.2. Statistical Results of SSC and TA
3.3. Performance of Model
3.4. SHapley Additive exPlanations (SHAP)
4. Discussions
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
SSC | Soluble solid content |
TA | Titratable acidity |
NIR | Near-infrared |
PLSR | Partial least squares regression |
DL | Deep learning |
AI | Artificial intelligence |
CNN | Convolutional neural networks |
FT | Fourier transform |
MSC | Multiplicative scatter correction |
ILSVRC | ImageNet Large Scale Visual Recognition Challenge |
NAS | Neural architecture search |
MSE | Mean squared error |
R2 | Coefficient of determination |
RMSE | Root mean square error |
RPD | Ratio of prediction to deviation |
Coefficient of determination of cross-validation | |
RMSECV | Root mean square error of cross-validation |
RPDCV | Ratio of prediction to deviation of cross-validation |
SHAP | SHapley Additive exPlanations |
Appendix A
Appendix B
References
- Laophongphit, A.; Wichiansri, S.; Siripornadulsil, S.; Siripornadulsil, W. Enhancing the nutritional value and functional properties of mango pulp via lactic acid bacteria fermentation. LWT 2024, 197, 115878. [Google Scholar] [CrossRef]
- Chinnasaen, T.; Jitjuk, U.; Khamkula, K.; Wetchakama, N. Production of “maha chanok” mangoes for export to the Japanese market: The case study of nong bua chum village, nong hin sub-district, nong kung Si district, kalasin Province. Thai J. East Asian Stud. 2020, 24, 36–52. [Google Scholar]
- Pornchaloempong, P.; Sharma, S.; Phanomsophon, T.; Srisawat, K.; Inta, W.; Sirisomboon, P.; Prinyawiwatkul, W.; Nakawajana, N.; Lapcharoensuk, R.; Teerachaichayut, S. Non-Destructive Quality Evaluation of Tropical Fruit (Mango and Mangosteen) Purée Using Near-Infrared Spectroscopy Combined with Partial Least Squares Regression. Agriculture 2022, 12, 2060. [Google Scholar] [CrossRef]
- Zhao, J.; Tian, G.; Qiu, Y.; Qu, H. Rapid quantification of active pharmaceutical ingredient for sugar-free Yangwei granules in commercial production using FT-NIR spectroscopy based on machine learning techniques. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2021, 245, 118878. [Google Scholar] [CrossRef] [PubMed]
- Lan, W.; Jaillais, B.; Chen, S.; Renard, C.M.; Leca, A.; Bureau, S. Fruit variability impacts puree quality: Assessment on individually processed apples using the visible and near infrared spectroscopy. Food Chem. 2022, 390, 133088. [Google Scholar] [CrossRef]
- Lan, W.; Jaillais, B.; Leca, A.; Renard, C.M.; Bureau, S. A new application of NIR spectroscopy to describe and predict purees quality from the non-destructive apple measurements. Food Chem. 2020, 310, 125944. [Google Scholar] [CrossRef] [PubMed]
- Lan, W.; Baeten, V.; Jaillais, B.; Renard, C.M.; Arnould, Q.; Chen, S.; Leca, A.; Bureau, S. Comparison of near-infrared, mid-infrared, Raman spectroscopy and near-infrared hyperspectral imaging to determine chemical, structural and rheological properties of apple purees. J. Food Eng. 2022, 323, 111002. [Google Scholar] [CrossRef]
- Lan, W.; Bureau, S.; Chen, S.; Leca, A.; Renard, C.M.; Jaillais, B. Visible, near-and mid-infrared spectroscopy coupled with an innovative chemometric strategy to control apple puree quality. Food Control 2021, 120, 107546. [Google Scholar] [CrossRef]
- Sun, D.; Cruz, J.; Alcalà, M.; Romero del Castillo, R.; Sans, S.; Casals, J. Near infrared spectroscopy determination of chemical and sensory properties in tomato. J. Near Infrared Spectrosc. 2021, 29, 289–300. [Google Scholar] [CrossRef]
- Ren, J.; Xiong, Y.; Chen, X.; Hao, Y. Comparative analysis of machine learning and deep learning algorithms for assessing agricultural product quality using NIRS. Sensors 2024, 24, 5438. [Google Scholar] [CrossRef]
- Huang, Y.; Zheng, Y.; Liu, P.; Xie, L.; Ying, Y. Enhanced prediction of soluble solids content and vitamin C content in citrus using visible and near-infrared spectroscopy combined with one-dimensional convolutional neural network. J. Food Compos. Anal. 2025, 139, 107131. [Google Scholar] [CrossRef]
- Zeng, S.; Zhang, Z.; Cheng, X.; Cai, X.; Cao, M.; Guo, W. Prediction of soluble solids content using near-infrared spectra and optical properties of intact apple and pulp applying PLSR and CNN. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2024, 304, 123402. [Google Scholar] [CrossRef] [PubMed]
- Shi, Q.; Li, Y.; Zhang, F.; Ma, Q.; Sun, J.; Liu, Y.; Mu, J.; Wang, W.; Tang, Y. Whale optimization algorithm-based multi-task convolutional neural network for predicting quality traits of multi-variety pears using near-infrared spectroscopy. Postharvest Biol. Technol. 2024, 215, 113018. [Google Scholar] [CrossRef]
- Tan, M.; Le, Q. Efficientnet: Rethinking model scaling for convolutional neural networks. In Proceedings of the International Conference on Machine Learning, Long Beach, CA, USA, 9–15 June 2019; pp. 6105–6114. [Google Scholar]
- Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.; Duan, Y.; Al-Shamma, O.; Santamaría, J.; Fadhel, M.A.; Al-Amidie, M.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. J. Big Data 2021, 8, 1–74. [Google Scholar] [CrossRef]
- Zhang, X.; Han, N.; Zhang, J. Comparative analysis of VGG, ResNet, and GoogLeNet architectures evaluating performance, computational efficiency, and convergence rates. Appl. Comput. Eng. 2024, 44, 172–181. [Google Scholar] [CrossRef]
- Yu, Y.; Huang, J.; Wang, L.; Liang, S. A 1D-inception-ResNet based global detection model for thin-skinned multifruit spectral quantitative analysis. Food Control 2025, 167, 110823. [Google Scholar] [CrossRef]
- Liu, X.; Wang, D.; Wang, R.; Hu, B.; Wang, J.; Liu, Y.; Wang, C.; Guo, J.; Yang, S.; Nie, C. Integrating progressive screening strategy-based continuous wavelet transform with EfficientNetV2 for enhanced near-infrared spectroscopy. Talanta 2025, 284, 127188. [Google Scholar] [CrossRef]
- McHardy, R.G.; Antoniou, G.; Conn, J.J.; Baker, M.J.; Palmer, D.S. Augmentation of FTIR spectral datasets using Wasserstein generative adversarial networks for cancer liquid biopsies. Analyst 2023, 148, 3860–3869. [Google Scholar] [CrossRef]
- Shang, L.W.; Bao, Y.L.; Tang, J.L.; Ma, D.Y.; Fu, J.J.; Zhao, Y.; Wang, X.; Yin, J.H. A novel polynomial reconstruction algorithm-based 1D convolutional neural network used for transfer learning in Raman spectroscopy application. J. Raman Spectrosc. 2022, 53, 237–246. [Google Scholar] [CrossRef]
- Zhu, J.; Sharma, A.S.; Xu, J.; Xu, Y.; Jiao, T.; Ouyang, Q.; Li, H.; Chen, Q. Rapid on-site identification of pesticide residues in tea by one-dimensional convolutional neural network coupled with surface-enhanced Raman scattering. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2021, 246, 118994. [Google Scholar] [CrossRef]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet Classification with Deep Convolutional Neural Networks. Commun. ACM 2017, 60, 84–90. [Google Scholar] [CrossRef]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.-C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar]
- Xie, S.; Girshick, R.; Dollár, P.; Tu, Z.; He, K. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1492–1500. [Google Scholar]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar] [CrossRef]
- Osborne, B.G.; Fearn, T.; Hindle, P.H. Practical NIR Spectroscopy with Applications in Food and Beverage Analysis; Longman Scientific and Technical: Harlow, UK, 1993. [Google Scholar]
- Workman, J., Jr.; Weyer, L. Practical Guide to Interpretive Near-Infrared Spectroscopy; CRC Press: Boca Raton, FL, USA, 2007. [Google Scholar]
- Williams, P.; Antoniszyn, J.; Manley, M. Near Infrared Technology: Getting the Best out of Light, 1st ed.; African Sun Media: Stellenbosch, South Africa, 2019. [Google Scholar]
- Lundberg, S.M.; Lee, S.-I. A unified approach to interpreting model predictions. Adv. Neural Inf. Process. Syst. 2017, 30, 4766–4777. [Google Scholar]
- Zhong, L.; Guo, X.; Ding, M.; Ye, Y.; Jiang, Y.; Zhu, Q.; Li, J. SHAP values accurately explain the difference in modeling accuracy of convolution neural network between soil full-spectrum and feature-spectrum. Comput. Electron. Agric. 2024, 217, 108627. [Google Scholar] [CrossRef]
- Li, L.; Cao, R.; Zhao, L.; Liu, N.; Sun, H.; Zhang, Z.; Sun, Y. Near-Infrared Spectroscopy Combined with Explainable Machine Learning for Storage Time Prediction of Frozen Antarctic Krill. Foods 2025, 14, 1293. [Google Scholar] [CrossRef]
- Ahmed, M.W.; Alam, S.; Khaliduzzaman, A.; Emmert, J.L.; Kamruzzaman, M. Nondestructive Prediction of Eggshell Thickness Using NIR Spectroscopy and Machine Learning with Explainable AI. ACS Food Sci. Technol. 2025, 5, 822–832. [Google Scholar] [CrossRef]
- Haghi, R.; Pérez-Fernández, E.; Robertson, A. Prediction of various soil properties for a national spatial dataset of Scottish soils based on four different chemometric approaches: A comparison of near infrared and mid-infrared spectroscopy. Geoderma 2021, 396, 115071. [Google Scholar] [CrossRef]
- Passos, D. Deep tutti-frutti II: Explainability of CNN architectures for fruit dry matter predictions. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2025, 337, 126068. [Google Scholar] [CrossRef]
- Simeone, M.L.F.; Parrella, R.A.; Schaffert, R.E.; Damasceno, C.M.; Leal, M.C.; Pasquini, C. Near infrared spectroscopy determination of sucrose, glucose and fructose in sweet sorghum juice. Microchem. J. 2017, 134, 125–130. [Google Scholar] [CrossRef]
- Osborne, B.G.; Douglas, S. Measurement of the degree of starch damage in flour by near infrared reflectance analysis. J. Sci. Food Agric. 1981, 32, 328–332. [Google Scholar] [CrossRef]
- Hao, Q.; Zhou, J.; Zhou, L.; Kang, L.; Nan, T.; Yu, Y.; Guo, L. Prediction the contents of fructose, glucose, sucrose, fructo-oligosaccharides and iridoid glycosides in Morinda officinalis radix using near-infrared spectroscopy. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2020, 234, 118275. [Google Scholar] [CrossRef]
- Paradkar, M.; Sakhamuri, S.; Irudayaraj, J. Comparison of FTIR, FT-Raman, and NIR spectroscopy in a maple syrup adulteration study. J. Food Sci. 2002, 67, 2009–2015. [Google Scholar] [CrossRef]
- Xie, L.; Ye, X.; Liu, D.; Ying, Y. Quantification of glucose, fructose and sucrose in bayberry juice by NIR and PLS. Food Chem. 2009, 114, 1135–1140. [Google Scholar] [CrossRef]
- Zaccari, F.; Puerto, M.D.; Cabrera, M.C. Butia: Physical, nutritional and antioxidant properties of red, orange and yellow fruits. Agrociencia Urug. 2021, 25, NSPE2. [Google Scholar] [CrossRef]
- Kader, A.A. Flavor quality of fruits and vegetables. J. Sci. Food Agric. 2008, 88, 1863–1868. [Google Scholar] [CrossRef]
- Martelo-Vidal, M.J.; Vázquez, M. Application of artificial neural networks coupled to UV–VIS–NIR spectroscopy for the rapid quantification of wine compounds in aqueous mixtures. CyTA-J. Food 2015, 13, 32–39. [Google Scholar] [CrossRef]
- Theanjumpol, P.; Self, G.; Rittiron, R.; Pankasemsuk, T.; Sardsud, V. Selecting variables for near infrared spectroscopy (NIRS) evaluation of mango fruit quality. J. Agric. Sci. 2013, 5, 146–159. [Google Scholar] [CrossRef]
- Cozzolino, D.; Cynkar, W.; Shah, N.; Smith, P. Quantitative analysis of minerals and electric conductivity of red grape homogenates by near infrared reflectance spectroscopy. Comput. Electron. Agric. 2011, 77, 81–85. [Google Scholar] [CrossRef]
- Martelo-Vidal, M.J.; Vazquez, M. Evaluation of Ultraviolet, Visible, and Near Infrared Spectroscopy for the Analysis of Wine Compounds. Czech J. Food Sci. 2014, 32, 37–47. [Google Scholar] [CrossRef]
- Shen, F.; Yang, D.; Ying, Y.; Li, B.; Zheng, Y.; Jiang, T. Discrimination between Shaoxing wines and other Chinese rice wines by near-infrared spectroscopy and chemometrics. Food Bioprocess Technol. 2012, 5, 786–795. [Google Scholar] [CrossRef]
- Tian, G.; Zhao, J.; Qu, H. A Novel CNN-LSTM Model with Attention Mechanism for Online Monitoring of Moisture Content in Fluidized Bed Granulation Process Based on Near-Infrared Spectroscopy. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2025, 340, 126361. [Google Scholar] [CrossRef]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
Sample | N | Min | Max | Mean | SD |
---|---|---|---|---|---|
Mango | |||||
SSC (% Brix) | 96 | 14.2 | 23.2 | 18.5 | 2.2 |
TA (% malic acid) | 0.023 | 0.668 | 0.187 | 0.104 | |
Mangosteen | |||||
SSC (% Brix) | 88 | 13.3 | 16.4 | 14.8 | 0.8 |
TA (% malic acid) | 0.374 | 0.573 | 0.493 | 0.048 |
Model | RMSECV | RPDCV | Model File Size (MB) | |
---|---|---|---|---|
SSC of mango purée (% Brix) | ||||
PLSR | 0.844 ± 0.092 b | 0.845 ± 0.267 a | 2.923 ± 1.267 ab | - |
Simple-CNN | 0.914 ± 0.046 b | 0.688 ± 0.200 a | 3.367 ± 1.313 b | 80.708 |
AlexNet | 0.454 ± 0.296 a | 1.743 ± 0.595 b | 1.401 ± 0.735 a | 68.951 |
EfficientNet-B0 | 0.838 ± 0.225 b | 0.709 ± 0.589 a | 5.285 ± 3.460 c | 0.556 |
MobileNetV2 | 0.566 ± 0.173 a | 1.616 ± 0.271 b | 1.333 ± 0.219 a | 0.693 |
ResNeXt | 0.532 ± 0.282 a | 1.679 ± 0.464 b | 1.369 ± 0.466 a | 49.837 |
TA of mango purée (% malic acid) | ||||
PLSR | 0.528 ± 0.324 a | 0.055 ± 0.020 b | 2.036 ± 1.667 a | - |
Simple-CNN | 0.762 ± 0.196 a | 0.037 ± 0.008 a | 2.864 ± 1.869 a | 80.708 |
AlexNet | 0.585 ± 0.315 a | 0.056 ± 0.027 b | 2.023 ± 1.144 a | 68.951 |
EfficientNet-B0 | 0.512 ± 0.316 a | 0.061 ± 0.010 b | 1.649 ± 0.883 a | 0.556 |
MobileNetV2 | 0.498 ± 0.299 a | 0.060 ± 0.014 b | 1.801 ± 1.290 a | 0.693 |
ResNeXt | 0.628 ± 0.223 a | 0.053 ± 0.015 b | 1.892 ± 0.800 a | 49.837 |
SSC of mangosteen purée (% Brix) | ||||
PLSR | 0.416 ± 0.279 ab | 0.600 ± 0.153 ab | 1.290 ± 0.403 ab | - |
Simple-CNN | 0.564 ± 0.262 bc | 0.527 ± 0.187 a | 1.528 ± 0.554 b | 80.708 |
AlexNet | 0.702 ± 0.258 c | 0.471 ± 0.109 a | 1.666 ± 0.527 b | 68.951 |
EfficientNet-B0 | 0.300 ± 0.181 a | 0.696 ± 0.141 bc | 1.073 ± 0.219 a | 0.556 |
MobileNetV2 | 0.285 ± 0.258 a | 0.806 ± 0.242 c | 0.960 ± 0.263 a | 0.693 |
ResNeXt | 0.321 ± 0.219 a | 0.707 ± 0.194 bc | 1.091 ± 0.307 a | 49.837 |
TA of mango purée (% malic acid) | ||||
PLSR | 0.196 ± 0.207 a | 0.048 ± 0.017 a | 0.979 ± 0.184 a | - |
Simple-CNN | 0.332 ± 0.327 a | 0.048 ± 0.022 a | 1.083 ± 0.415 a | 80.708 |
AlexNet | 0.360 ± 0.260 a | 0.045 ± 0.021 a | 1.111 ± 0.396 a | 68.951 |
EfficientNet-B0 | 0.188 ± 0.175 a | 0.056 ± 0.027 a | 0.922 ± 0.302 a | 0.556 |
MobileNetV2 | 0.226 ± 0.190 a | 0.054 ± 0.021 a | 0.910 ± 0.271 a | 0.693 |
ResNeXt | 0.200 ± 0.193 a | 0.049 ± 0.015 a | 0.935 ± 0.183 a | 49.837 |
Model | Mean ± SD of RMSECV | p-Value (One-Tailed Test) |
---|---|---|
SSC of mango purée (% Brix) | ||
PLSR | 0.845 ± 0.267 | 0.029 |
Simple-CNN | 0.688 ± 0.200 | |
TA of mango purée (% malic acid) | ||
PLSR | 0.055 ± 0.020 | 0.001 |
Simple-CNN | 0.037 ± 0.008 | |
SSC of mangosteen purée (% Brix) | ||
PLSR | 0.600 ± 0.153 | 0.006 |
AlexNet | 0.523 ± 0.168 | |
TA of mango purée (% malic acid) | ||
PLSR | 0.048 ± 0.017 | 0.292 |
AlexNet | 0.045 ± 0.021 |
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
Pornchaloempong, P.; Sharma, S.; Phanomsophon, T.; Sirisomboon, P.; Lapcharoensuk, R. Revealing the Power of Deep Learning in Quality Assessment of Mango and Mangosteen Purée Using NIR Spectral Data. Horticulturae 2025, 11, 1047. https://doi.org/10.3390/horticulturae11091047
Pornchaloempong P, Sharma S, Phanomsophon T, Sirisomboon P, Lapcharoensuk R. Revealing the Power of Deep Learning in Quality Assessment of Mango and Mangosteen Purée Using NIR Spectral Data. Horticulturae. 2025; 11(9):1047. https://doi.org/10.3390/horticulturae11091047
Chicago/Turabian StylePornchaloempong, Pimpen, Sneha Sharma, Thitima Phanomsophon, Panmanas Sirisomboon, and Ravipat Lapcharoensuk. 2025. "Revealing the Power of Deep Learning in Quality Assessment of Mango and Mangosteen Purée Using NIR Spectral Data" Horticulturae 11, no. 9: 1047. https://doi.org/10.3390/horticulturae11091047
APA StylePornchaloempong, P., Sharma, S., Phanomsophon, T., Sirisomboon, P., & Lapcharoensuk, R. (2025). Revealing the Power of Deep Learning in Quality Assessment of Mango and Mangosteen Purée Using NIR Spectral Data. Horticulturae, 11(9), 1047. https://doi.org/10.3390/horticulturae11091047