Detection of Pesticide Residue Level in Grape Using Hyperspectral Imaging with Machine Learning
Abstract
:1. Introduction
2. Materials and Methods
2.1. Samples Preparation
2.2. Hyperspectral Image Acquisition and Correction
2.3. Spectral Data Preprocessing and Extraction
2.4. Data Analysis Method
2.4.1. Principal Component Analysis (PCA)
2.4.2. Support Vector Machine (SVM)
2.4.3. Logistic Regression (LR)
2.4.4. Random Forest (RF)
2.4.5. Convolutional Neural Network (CNN)
2.4.6. Residual Neural Network (ResNet)
2.5. Saliency Map
2.6. Software and Model Evaluation
3. Results
3.1. Spectral Profiles
3.2. Principal Component Analysis (PCA)
3.3. Classification Models
3.4. Visualization for Discovering the Wavelength Importance
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Moeder, M.; Bauer, C.; Popp, P.; Van Pinxteren, M.; Reemtsma, T. Determination of pesticide residues in wine by membrane-assisted solvent extraction and high-performance liquid chromatography-tandem mass spectrometry. Anal. Bioanal. Chem. 2012, 403, 1731–1741. [Google Scholar] [CrossRef] [PubMed]
- Popp, J.; Peto, K.; Nagy, J. Pesticide productivity and food security. A review. Agron. Sustain. Dev. 2013, 33, 243–255. [Google Scholar] [CrossRef]
- Grewal, A.S.; Singla, A.; Kamboj, P.; Dua, J.S. Pesticide Residues in Food Grains, Vegetables and Fruits: A Hazard to Human Health. J. Med. Chem. Toxicol. 2017, 2, 1–7. [Google Scholar] [CrossRef]
- Bouagga, A.; Chaabane, H.; Toumi, K.; Hamdane, A.M.; Nasraoui, B.; Joly, L. Pesticide residues in Tunisian table grapes and associated risk for consumer’s health. Food Addit. Contam. Part B-Surveill. 2019, 12, 135–144. [Google Scholar] [CrossRef]
- Narenderan, S.T.; Meyyanathan, S.N.; Babu, B. Review of pesticide residue analysis in fruits and vegetables. Pre-treatment, extraction and detection techniques. Food Res. Int. 2020, 133, 109141. [Google Scholar] [CrossRef]
- Simonetti, G.; Castellani, F.; Di Filippo, P.; Riccardi, C.; Pomata, D.; Risoluti, R.; Buiarelli, F.; Sonego, E. Determination of Mancozeb, a Pesticide Used Worldwide in Agriculture: Comparison among GC, LC, and CE. Curr. Anal. Chem. 2020, 16, 1041–1053. [Google Scholar] [CrossRef]
- Grimalt, S.; Dehouck, P. Review of analytical methods for the determination, of pesticide residues in grapes. J. Chromatogr. A Incl. Electrophor. Other Sep. Methods 2016, 1433, 1–23. [Google Scholar] [CrossRef]
- Perez-Navarro, J.; Izquierdo-Canas, P.M.; Mena-Morales, A.; Martinez-Gascuena, J.; Chacon-Vozmediano, J.L.; Garcia-Romero, E.; Hermosin-Gutierrez, I.; Gomez-Alonso, S. Phenolic compounds profile of different berry parts from novel Vitis vinifera L. red grape genotypes and Tempranillo using HPLC-DAD-ESI-MS/MS: A varietal differentiation tool. Food Chem. 2019, 295, 350–360. [Google Scholar] [CrossRef]
- Zhang, X.Z.; Zhao, Y.C.; Cui, X.Y.; Wang, X.R.; Shen, H.S.; Chen, Z.M.; Huang, C.; Meruva, N.; Zhou, L.; Wang, F.; et al. Application and enantiomeric residue determination of diniconazole in tea and grape and apple by supercritical fluid chromatography coupled with quadrupole-time-of-flight mass spectrometry. J. Chromatogr. A 2018, 1581, 144–155. [Google Scholar] [CrossRef]
- Gowen, A.A.; O’donnell, C.P.; Cullen, P.J.; Downey, G.; Frias, J.M. Hyperspectral imaging-an emerging process analytical tool for food quality and safety control. Trends Food Sci. Technol. 2007, 18, 590–598. [Google Scholar] [CrossRef]
- Fernandez-Novales, J.; Garde-Cerdan, T.; Tardaguila, J.; Gutierrez-Gamboa, G.; Perez-Alvarez, E.P.; Diago, M.P. Assessment of amino acids and total soluble solids in intact grape berries using contactless Vis and NIR spectroscopy during ripening. Talanta 2019, 199, 244–253. [Google Scholar] [CrossRef] [PubMed]
- Xiao, H.; Li, F.; Song, D.J.; Tu, K.; Peng, J.; Pan, L. Grading and sorting of grape berries using visible-near infrared spectroscopy on the basis of multiple inner quality parameters. Sensors 2019, 19, 2600. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Kanchanomai, C.; Ohashi, S.; Naphrom, D.; Nemoto, W.; Nakano, K. Non-destructive analysis of japanese table grape qualities using near-infrared spectroscopy. Hortic. Environ. Biotechnol. 2020, 61, 725–733. [Google Scholar] [CrossRef]
- Baca-Bocanegra, B.; Hernandez-Hierro, J.M.; Nogales-Bueno, J.; Heredia, F.J. Feasibility study on the use of a portable micro near infrared spectroscopy device for the “in vineyard” screening of extractable polyphenols in red grape skins. Talanta 2019, 192, 353–359. [Google Scholar] [CrossRef]
- Lemos, A.M.; Machado, N.; Egea-Cortines, M.; Barros, A.I. ATR-MIR spectroscopy as a tool to assist ‘Tempranillo’ clonal selection process: Geographical origin and year of harvest discrimination and oenological parameters prediction. Food Chem. 2020, 325, 126938. [Google Scholar] [CrossRef]
- Fernández-Novales, J.; Tardáguila, J.; Gutiérrez, S.; Diago, P.M. On-the-go vis + sw nir spectroscopy as a reliable monitoring tool for grape composition within the vineyard. Molecules 2019, 24, 2795. [Google Scholar] [CrossRef] [Green Version]
- Costa, D.D.; Mesa, N.F.O.; Freire, M.S.; Ramos, R.P.; Mederos, B.J.T. Development of predictive models for quality and maturation stage attributes of wine grapes using vis-nir reflectance spectroscopy. Postharvest Biol. Technol. 2019, 150, 166–178. [Google Scholar] [CrossRef]
- Sun, J.; Cong, S.L.; Mao, H.P.; Wu, X.H.; Yang, N. Quantitative detection of mixed pesticide residue of lettuce leaves based on hyperspectral technique. J. Food Process Eng. 2018, 41, e12654. [Google Scholar] [CrossRef]
- Jia, Y.G.; He, J.R.; Fu, H.F.; Shao, X.T.; Li, Z.K. Apple Surface Pesticide Residue Detection Method Based on Hyperspectral Imaging. Intell. Sci. Big Data Eng. 2018, 11266, 539–556. [Google Scholar] [CrossRef]
- Mohite, J.; Karale, Y.; Pappula, S.; Shabeer, T.P.A.; Sawant, S.D.; Hingmire, S. Detection of pesticide (Cyantraniliprole) residue on grapes using hyperspectral sensing. In Sensing for Agriculture and Food Quality and Safety IX; SPIE: Bellingham, WA, USA, 2017; Volume 10217, pp. 192–199. [Google Scholar] [CrossRef]
- Ren, Z.Q.; Rao, Z.H.; Ji, H.Y. Identification of Different Concentrations Pesticide Residues of Dimethoate on Spinach Leaves by Hyperspectral Image Technology. Ifac Pap. Online 2018, 51, 758–763. [Google Scholar] [CrossRef]
- Sun, J.; Zhou, X.; Mao, H.; Wu, X.; Zhang, X.; Li, Q. Discrimination of pesticide residues in lettuce based on chemical molecular structure coupled with wavelet transform and near infrared hyperspectral. J. Food Process Eng. 2017, 40, e12509. [Google Scholar] [CrossRef]
- Jiang, S.; Sun, J.; Xin, Z.; Mao, H.; Wu, X.; Li, Q. Visualizing distribution of pesticide residues in mulberry leaves using NIR hyperspectral imaging. J. Food Process Eng. 2017, 40, e12510.1–e12510.6. [Google Scholar] [CrossRef]
- Petersson, H.; Gustafsson, D.; Bergstrom, D. Hyperspectral image analysis using deep learning—A review. In Proceedings of the 2016 Sixth International Conference on Image Processing Theory, Tools and Applications (IPTA), Oulu, Finland, 12–15 December 2016; pp. 1–6. [Google Scholar] [CrossRef]
- Wang, C.; Liu, B.; Liu, L.; Zhu, Y.; Hou, J.; Liu, P.; Li, X. A review of deep learning used in the hyperspectral image analysis for agriculture. Artif. Intell. Rev. 2021, 54, 5205–5253. [Google Scholar] [CrossRef]
- Signoroni, A.; Savardi, M.; Baronio, A.; Benini, S. Deep learning meets hyperspectral image analysis: A multidisciplinary review. J. Imaging 2019, 5, 52. [Google Scholar] [CrossRef] [Green Version]
- Li, S.; Song, W.; Fang, L.; Chen, Y.; Benediktsson, J.A. Deep learning for hyperspectral image classification: An overview. IEEE Trans. Geosci. Remote Sens. 2019, 57, 6690–6709. [Google Scholar] [CrossRef] [Green Version]
- Yamashita, R.; Nishio, M.; Do, R.K.G.; Togashi, K. Convolutional neural networks: An overview and application in radiology. Insights Imaging 2018, 9, 611–629. [Google Scholar] [CrossRef] [Green Version]
- Xie, L.; Chen, X.; Bi, K.; Wei, L.; Xu, Y.; Chen, Z.; Xiao, A.; Chang, J.; Zhang, X.; Tian, Q. Weight-sharing neural architecture search: A battle to shrink the optimization gap. ACM Comput. Surv. 2020, 54, 1–24. [Google Scholar] [CrossRef]
- Paoletti, M.E.; Haut, J.M.; Plaza, J.; Plaza, A. Deep learning classifiers for hyperspectral imaging: A review. ISPRS J. Photogramm. Remote Sens. 2019, 158, 279–317. [Google Scholar] [CrossRef]
- Yan, T.Y.; Duan, L.; Chen, X.P.; Gao, P.; Xu, W. Application and interpretation of deep learning methods for the geographical origin identification of Radix Glycyrrhizae using hyperspectral imaging. RSC Adv. 2020, 10, 41936–41945. [Google Scholar] [CrossRef]
- Jiang, B.; He, J.; Yang, S.; Fu, H.; Li, T.; Song, H.; He, D. Fusion of machine vision technology and alexnet-cnns deep learning network for the detection of postharvest apple pesticide residues. Artif. Intell. Agric. 2019, 1, 1–8. [Google Scholar] [CrossRef]
- Dreier, E.S.; Sorensen, K.M.; Lund-Hansen, T.; Jespersen, B.M.; Pedersen, K.S. Hyperspectral imaging for classification of bulk grain samples with deep convolutional neural networks. J. Near Infrared Spectrosc. 2022, 30, 107–121. [Google Scholar] [CrossRef]
- Gomes, V.; Mendes-Ferreira, A.; Melo-Pinto, P. Application of Hyperspectral Imaging and Deep Learning for Robust Prediction of Sugar and pH Levels in Wine Grape Berries. Sensors 2021, 21, 3459. [Google Scholar] [CrossRef]
- Li, M.; Lu, L.; Zhang, X. Qualitative Determination of Pesticide Residues in Purple Cabbage Based on Near Infrared Spectroscopy. J. Phys. Conf. Ser. 2021, 1884, 012015. [Google Scholar] [CrossRef]
- Soltani Nazarloo, A.; Rasooli Sharabiani, V.; Abbaspour Gilandeh, Y.; Taghinezhad, E.; Szymanek, M.; Sprawka, M. Feasibility of using VIS/NIR spectroscopy and multivariate analysis for pesticide residue detection in tomatoes. Processes 2021, 9, 196. [Google Scholar] [CrossRef]
- Özbey, A.; Karagöz, Ş.; Cingöz, A. Effect of Drying Process on Pesticide Residues in Grapes. Gida J. Food 2017, 42, 204–209. [Google Scholar] [CrossRef] [Green Version]
- Gorry, P.A. General least-squares smoothing and differentiation by the convolution (Savitzky-Golay) method. Anal. Chem. 1990, 62, 570–573. [Google Scholar] [CrossRef]
- Barnes, R.J.; Dhanoa, M.S.; Lister, S.J. Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra. Appl. Spectrosc. 1989, 43, 772–777. [Google Scholar] [CrossRef]
- Ringnér, M. What is principal component analysis? Nat. Biotechnol. 2008, 26, 303–304. [Google Scholar] [CrossRef]
- Bro, R.; Smilde, A.K. Principal component analysis. Anal. Methods 2014, 6, 2812–2831. [Google Scholar] [CrossRef] [Green Version]
- Cao, X.H.; Wang, D.; Wang, X.Z.; Zhao, J.; Jiao, L.C. Hyperspectral imagery classification with cascaded support vector machines and multi-scale superpixel segmentation. Int. J. Remote Sens. 2020, 41, 4528–4548. [Google Scholar] [CrossRef]
- Kuo, B.C.; Ho, H.H.; Li, C.H.; Hung, C.C.; Taur, J.S. A Kernel-Based Feature Selection Method for SVM With RBF Kernel for Hyperspectral Image Classification. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2014, 7, 317–326. [Google Scholar] [CrossRef]
- Divya, R.; Kumari, R.S.S.; Initia, A.D.N. Genetic algorithm with logistic regression feature selection for Alzheimer’s disease classification. Neural Comput. Appl. 2021, 33, 8435–8444. [Google Scholar] [CrossRef]
- Schauberger, G.; Tutz, G. Regularization Methods in Economic Forecasting. Springer Int. Publ. 2015, 48, 61–68. [Google Scholar] [CrossRef]
- Cheng, Q.; Varshney, P.K.; Arora, M.K. Logistic regression for feature selection and soft classification of remote sensing data. IEEE Geosci. Remote Sens. Lett. 2006, 3, 491–494. [Google Scholar] [CrossRef]
- Stephan, D.; Lucila, O.M. Logistic regression and artificial neural network classification models: A methodology review. J. Biomed. Inform. 2002, 35, 352–359. [Google Scholar] [CrossRef]
- Witten, I.H.; Frank, E.; Hall, M.A.; Pal, C.J. Ensemble learning. In Data Mining, 4th ed.; Elsevier: Amsterdam, The Netherlands, 2017; pp. 479–501. [Google Scholar] [CrossRef]
- Liaw, A.; Wiener, M. Classification and regression by randomForest. R News 2002, 23, 18–22. [Google Scholar]
- Cutler, A.; Cutler, D.R.; Stevens, J.R. Random forests. Mach. Learn. 2004, 45, 157–176. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef]
- Li, Z. A saliency map in primary visual cortex. Trends Cogn. Sci. 2002, 6, 9–16. [Google Scholar] [CrossRef]
- Simonyan, K.; Vedaldi, A.; Zisserman, A. Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps. arXiv 2014, arXiv:1312.6034. [Google Scholar] [CrossRef]
- Wang, X.; Li, Z.; Wang, W.; Wang, J. Chlorophyll content for millet leaf using hyperspectral imaging and an attention-convolutional neural network. Ciência Rural. 2020, 50, e20190713. [Google Scholar] [CrossRef]
- Yu, X.; Lu, H.; Wu, D. Development of deep learning method for predicting firmness and soluble solid content of postharvest korla fragrant pear using vis/nir hyperspectral reflectance imaging. Postharvest Biol. Technol. 2018, 141, 39–49. [Google Scholar] [CrossRef]
- Jin, B.C.; Zhang, C.; Jia, L.; Tang, Q.; Gao, L.; Zhao, G.; Qi, H. Identification of Rice Seed Varieties Based on Near-Infrared Hyperspectral Imaging Technology Combined with Deep Learning. ACS Omega 2022, 7, 4735–4749. [Google Scholar] [CrossRef] [PubMed]
- Xu, Z.; Fan, S.; Liu, J.; Liu, B.; Wu, Y. A calibration transfer optimized single kernel near-infrared spectroscopic method. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2019, 220, 117098–117105. [Google Scholar] [CrossRef]
- Jerry, W. The Handbook of Organic Compounds. NIR, IR, Raman, and UV-Vis Spectra Featuring Polymers and Surfactants; Elsevier: Amsterdam, The Netherlands, 2001. [Google Scholar]
- Zhang, L.; Rao, Z.; Ji, H. Nir hyperspectral imaging technology combined with multivariate methods to study the residues of different concentrations of omethoate on wheat grain surface. Sensors 2019, 19, 3147. [Google Scholar] [CrossRef] [Green Version]
- Cheng, Y.L.; Yang, S.Q.; Liu, X.; Zhang, E.Y.; Song, Z.S. Identification of wine grape varieties based on near-infrared hyperspectral imageing. Asabe Res. 2019, 35, 959–967. [Google Scholar] [CrossRef]
- Salvador, G.; Juan, F.N.; Diago, M.P.; Javier, T. On-the-go hyperspectral imaging under field conditions and machine learning for the classification of grapevine varieties. Front. Plant Ence 2018, 9, 1102. [Google Scholar] [CrossRef]
- Mohite, J.; Sawant, S.; Borah, K.; Pappula, S. Temporal Detection of Pesticide Residues in Tea Leaves Using Hyperspectral Sensing. In IGARSS 2019-2019 IEEE International Geoscience and Remote Sensing Symposium, Yokohama, Japan, 28 July–2 August 2019; IEEE: Piscataway, NI, USA, 2019. [Google Scholar]
- Liu, W.; Zeng, S.; Wu, G.; Li, H.; Chen, F. Rice Seed Purity Identification Technology Using Hyperspectral Image with LASSO Logistic Regression Model. Sensors 2021, 21, 4384. [Google Scholar] [CrossRef]
- Li, X.; Jiang, H.; Jiang, X.; Shi, M. Identification of geographical origin of chinese chestnuts using hyperspectral imaging with 1d-cnn algorithm. Agriculture 2021, 11, 1274. [Google Scholar] [CrossRef]
Category | Cabernet | Red | Munage | Total |
---|---|---|---|---|
Level 0 | 73 | 92 | 89 | 254 |
Level 1 | 84 | 99 | 78 | 261 |
Level 2 | 60 | 107 | 104 | 271 |
Level 3 | 71 | 113 | 101 | 285 |
Total | 288 | 411 | 372 | 1071 |
Category | Active Ingredients | Proportion | Efficacy |
---|---|---|---|
Jiatu | 50% tebuconazole (C16H22ClN3O) 25% trifloxystrobin (C20H19F3N2O4) | 4000 | Brown spot |
Huiyin | 80% procymidone (C13H11Cl2NO2) | 2400 | Botrytis |
Xishuangke | 56% cymoxanil (C7H10N4O3) 14% cyazofamid (C13H13ClN4O2S) | 6000 | Downy mildew |
Concentration | Jiatu | Xishuangke | Huiyin |
---|---|---|---|
Level 0 a (0%) | 0 | 0 | 0 |
Level 1 b(15%) | 0.0375 | 0.0250 | 0.0625 |
Level 2 c (30%) | 0.0750 | 0.0500 | 0.0125 |
Level 3 d (50%) | 0.1250 | 0.0834 | 0.2085 |
Standard solution(100%) | 0.2500 | 0.1667 | 0.4167 |
Models | Categ | Parameter | Vis-NIR (%) | Parameter | NIR (%) | ||||
---|---|---|---|---|---|---|---|---|---|
Train a | Val b | Test c | Train | Val | Test | ||||
SVM | 0 | 2.0, 0.1, poly | 95.9 | 94.8 | 91.4 | 6.6, 1.0, linear | 99.4 | 100.0 | 96.6 |
1 | 1.2, 0.1, poly | 98.4 | 96.3 | 92.7 | 1.0, 1.0, poly | 100.0 | 100.0 | 96.3 | |
2 | 1.0, 1.0, poly | 1.00 | 88.0 | 93.2 | 1.0, 1.0, poly | 100.0 | 100.0 | 95.9 | |
LR | 0 | 1 × 105, liblinear | 100.0 | 89.7 | 93.1 | 100, lbfgs | 99.4 | 93.1 | 98.3 |
1 | 1 × 105, liblinear | 100.0 | 98.8 | 93.9 | 1 × 105, liblinear | 100.0 | 100.0 | 100.0 | |
2 | 1 × 104, liblinear | 100.0 | 92.0 | 95.9 | 100, newton-cg | 100.0 | 98.7 | 97.3 | |
RF | 0 | 8, 450 | 100.0 | 77.6 | 79.3 | 6, 750 | 100.0 | 74.1 | 81.0 |
1 | 7, 500 | 99.6 | 72.3 | 73.2 | 5, 550 | 98.8 | 86.7 | 87.8 | |
2 | 8, 200 | 100.0 | 66.7 | 75.7 | 4, 250 | 99.1 | 98.7 | 93.2 | |
CNN | 0 | 500, 32, 0.001 | 99.4 | 98.3 | 93.1 | 500, 32, 0.001 | 100.0 | 100.0 | 98.3 |
1 | 500, 32, 0.001 | 97.6 | 97.6 | 92.7 | 500, 32, 0.001 | 100.0 | 100.0 | 98.8 | |
2 | 500, 32, 0.001 | 100.0 | 98.7 | 93.2 | 500, 32, 0.001 | 99.5 | 100.0 | 98.6 | |
ResNet | 0 | 1000, 32, 0.005 | 100.0 | 94.8 | 93.1 | 600, 32, 0.005 | 100.0 | 93.1 | 86.2 |
1 | 1000, 32, 0.005 | 100.0 | 100.0 | 98.8 | 1000, 32, 0.005 | 100.0 | 100.0 | 97.6 | |
2 | 1000, 32, 0.005 | 100.0 | 97.3 | 94.6 | 600, 32, 0.005 | 97.7 | 100.0 | 97.3 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Ye, W.; Yan, T.; Zhang, C.; Duan, L.; Chen, W.; Song, H.; Zhang, Y.; Xu, W.; Gao, P. Detection of Pesticide Residue Level in Grape Using Hyperspectral Imaging with Machine Learning. Foods 2022, 11, 1609. https://doi.org/10.3390/foods11111609
Ye W, Yan T, Zhang C, Duan L, Chen W, Song H, Zhang Y, Xu W, Gao P. Detection of Pesticide Residue Level in Grape Using Hyperspectral Imaging with Machine Learning. Foods. 2022; 11(11):1609. https://doi.org/10.3390/foods11111609
Chicago/Turabian StyleYe, Weixin, Tianying Yan, Chu Zhang, Long Duan, Wei Chen, Hao Song, Yifan Zhang, Wei Xu, and Pan Gao. 2022. "Detection of Pesticide Residue Level in Grape Using Hyperspectral Imaging with Machine Learning" Foods 11, no. 11: 1609. https://doi.org/10.3390/foods11111609
APA StyleYe, W., Yan, T., Zhang, C., Duan, L., Chen, W., Song, H., Zhang, Y., Xu, W., & Gao, P. (2022). Detection of Pesticide Residue Level in Grape Using Hyperspectral Imaging with Machine Learning. Foods, 11(11), 1609. https://doi.org/10.3390/foods11111609