Submitted:
31 July 2024
Posted:
02 August 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Theory and Algorithm
2.1. Gramian Angular Field (GAF)
2.2. PLS-DA
2.3. Random Forest (RF)
2.4. Coordinated Attention Convolutional Neural Networks (CACNN)
3. Datasets and Experiments
3.1. Datasets
3.1.1. Wheat Kernel Dataset
3.1.2. Yali Pear Dataset
3.2. Model Evaluation
3.3. Experiments
4. Results and Analysis
4.1. Spectral Analysis and GAF Converting
4.2. Spectra Discriminative Model Analysis
4.2.1. Wheat Kernel Dataset
4.2.2. Yali Pear Dataset
4.3. Advantages of Image in Modeling
4.4. Optimal Model Analysis
4.5. Robustness Analysis of the Models
5. Conclusion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Mishra, P.; Woltering, E. Semi-supervised robust models for predicting dry matter in mango fruit with near-infrared spectroscopy. Postharvest Biology and Technology 2023, 200. [Google Scholar] [CrossRef]
- Esquerre, C.A.; Achata, E.M.; Garcia-Vaquero, M.; Zhang, Z.; Tiwari, B.K.; O'Donnell, C.P. Use of an NIR MEMS spectrophotometer and visible/NIR hyperspectral imaging systems to predict quality parameters of treated ground peppercorns. Lwt-Food Science and Technology 2020, 131. [Google Scholar] [CrossRef]
- Chadalavada, K.; Anbazhagan, K.; Ndour, A.; Choudhary, S.; Palmer, W.; Flynn, J.R.; Mallayee, S.; Pothu, S.; Prasad, K.V.S.V.; Varijakshapanikar, P.; et al. NIR Instruments and Prediction Methods for Rapid Access to Grain Protein Content in Multiple Cereals. Sensors 2022, 22. [Google Scholar] [CrossRef] [PubMed]
- Cozzolino, D. The Ability of Near Infrared (NIR) Spectroscopy to Predict Functional Properties in Foods: Challenges and Opportunities. Molecules 2021, 26. [Google Scholar] [CrossRef] [PubMed]
- Rahmawati, L.; Widodo, S.; Kurniadi, D.P.; Daud, P.; Triyono, A.; Sriharti; Susanti, N. D.; Mayasti, N.K.I.; Indriati, A.; Yulianti, L.E.; et al. Determination of colorant type in yellow tofu using Vis-NIR and SW-NIR spectroscopy. Food Science and Technology 2023, 43, e112422–e112422. [Google Scholar] [CrossRef]
- Zareef, M.; Chen, Q.; Hassan, M.M.; Arslan, M.; Hashim, M.M.; Ahmad, W.; Kutsanedzie, F.Y.H.; Agyekum, A.A. An Overview on the Applications of Typical Non-linear Algorithms Coupled With NIR Spectroscopy in Food Analysis. Food Engineering Reviews 2020, 12, 173–190. [Google Scholar] [CrossRef]
- Assi, S.; Arafat, B.; Lawson-Wood, K.; Robertson, I. Authentication of Antibiotics Using Portable Near-Infrared Spectroscopy and Multivariate Data Analysis. Applied Spectroscopy 2021, 75, 434–444. [Google Scholar] [CrossRef] [PubMed]
- Bec, K.B.; Grabska, J.; Huck, C.W. NIR spectroscopy of natural medicines supported by novel instrumentation and methods for data analysis and interpretation. Journal of Pharmaceutical and Biomedical Analysis 2021, 193. [Google Scholar] [CrossRef] [PubMed]
- Yin, L.; Zhou, J.; Chen, D.; Han, T.; Zheng, B.; Younis, A.; Shao, Q. A review of the application of near-infrared spectroscopy to rare traditional Chinese medicine. Spectrochimica Acta Part a-Molecular and Biomolecular Spectroscopy 2019, 221. [Google Scholar] [CrossRef] [PubMed]
- Pasquini, C. Near infrared spectroscopy: A mature analytical technique with new perspectives – A review. Analytica Chimica Acta 2018, 1026, 8–36. [Google Scholar] [CrossRef] [PubMed]
- Zhang, J.; Li, B.; Hu, Y.; Zhou, L.; Wang, G.; Guo, G.; Zhang, Q.; Lei, S.; Zhang, A. A parameter-free framework for calibration enhancement of near-infrared spectroscopy based on correlation constraint. Analytica Chimica Acta 2021, 1142, 169–178. [Google Scholar] [CrossRef] [PubMed]
- Jiao, Y.; Li, Z.; Chen, X.; Fei, S. Preprocessing methods for near-infrared spectrum calibration. Journal of Chemometrics 2020, 34. [Google Scholar] [CrossRef]
- Cai, W.; Li, Y.; Shao, X. A variable selection method based on uninformative variable elimination for multivariate calibration of near-infrared spectra. Chemometrics and Intelligent Laboratory Systems 2008, 90, 188–194. [Google Scholar] [CrossRef]
- Li, H.; Liang, Y.; Xu, Q.; Cao, D. Key wavelengths screening using competitive adaptive reweighted sampling method for multivariate calibration. Analytica Chimica Acta 2009, 648, 77–84. [Google Scholar] [CrossRef] [PubMed]
- Wang, W.; Yun, Y.; Deng, B.; Fan, W.; Liang, Y. Iteratively variable subset optimization for multivariate calibration. RSC Advances 2015, 5, 95771–95780. [Google Scholar] [CrossRef]
- Yun, Y.-H.; Li, H.-D.; Deng, B.-C.; Cao, D.-S. An overview of variable selection methods in multivariate analysis of near-infrared spectra. TrAC Trends in Analytical Chemistry 2019, 113, 102–115. [Google Scholar] [CrossRef]
- Shi, S.J.; Zhao, D.; Pan, K.Q.; Ma, Y.Y.; Zhang, G.Y.; Li, L.A.; Cao, C.G.; Jiang, Y. Combination of near-infrared spectroscopy and key wavelength-based screening algorithm for rapid determination of rice protein content. Journal of Food Composition and Analysis 2023, 118. [Google Scholar] [CrossRef]
- Fu, D.; Li, Q.; Chen, Y.; Ma, M.; Tang, W. Assessment of integrated freshness index of different varieties of eggs using the visible and near-infrared spectroscopy. International Journal of Food Properties 2023, 26, 155–166. [Google Scholar] [CrossRef]
- Hu, L.; Yin, C.; Ma, S.; Liu, Z. Vis-NIR spectroscopy Combined with Wavelengths Selection by PSO Optimization Algorithm for Simultaneous Determination of Four Quality Parameters and Classification of Soy Sauce. Food Analytical Methods 2019, 12, 633–643. [Google Scholar] [CrossRef]
- Chen, H.; Lin, Z.; Tan, C. Random subspace-based ensemble modeling for near-infrared spectral diagnosis of colorectal cancer. Analytical Biochemistry 2019, 567, 38–44. [Google Scholar] [CrossRef] [PubMed]
- Zhao, L.M.; Liu, S.M.; Chen, X.F.; Wu, Z.W.; Yang, R.; Shi, T.T.; Zhang, Y.L.; Zhou, K.W.; Li, J.G. Hyperspectral Identification of Ginseng Growth Years and Spectral Importance Analysis Based on Random Forest. Applied Sciences-Basel 2022, 12. [Google Scholar] [CrossRef]
- Azad, M.; Khaled, F.; Pavel, M. A NOVEL APPROACH TO CLASSIFY AND CONVERT 1D SIGNAL TO 2D GRAYSCALE IMAGE IMPLEMENTING SUPPORT VECTOR MACHINE AND EMPIRICAL MODE DECOMPOSITION ALGORITHM. International Journal of Advanced Research 2019, 7, 328–335. [Google Scholar] [CrossRef] [PubMed]
- Yilmaz, B.H.; Yilmaz, C.M.; Kose, C. Diversity in a signal-to-image transformation approach for EEG-based motor imagery task classification. Medical & Biological Engineering & Computing 2020, 58, 443–459. [Google Scholar] [CrossRef]
- Naz, M.; Shah, J.H.; Khan, M.A.; Sharif, M.; Raza, M.; Damaševičius, R. From ECG signals to images: a transformation based approach for deep learning. PeerJ. Computer science 2021, 7, e386. [Google Scholar] [CrossRef] [PubMed]
- Hao, Y.; Zhang, C.; Li, X.; Lei, Z. Establishment of online deep learning model for insect-affected pests in “Yali” pears based on visible-near-infrared spectroscopy. Frontiers in Nutrition 2022, 9. [Google Scholar] [CrossRef] [PubMed]
- Pu, H.; Yu, J.; Sun, D.-W.; Wei, Q.; Li, Q. Distinguishing pericarpium citri reticulatae of different origins using terahertz time-domain spectroscopy combined with convolutional neural networks. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy 2023, 299, 122771. [Google Scholar] [CrossRef] [PubMed]
- Hou, Q.; Zhou, D.; Feng, J. Coordinate Attention for Efficient Mobile Network Design. Available online: (accessed on. (: Available online.
- Wang, Z.; Oates, T. Imaging Time-Series to Improve Classification and Imputation. AAAI Press 2015. [Google Scholar]
- Lee, L.C.; Liong, C.-Y.; Jemain, A.A. Partial least squares-discriminant analysis (PLS-DA) for classification of high-dimensional (HD) data: a review of contemporary practice strategies and knowledge gaps. Analyst 2018, 143, 3526–3539. [Google Scholar] [CrossRef] [PubMed]
- Breiman, L. Random Forests. Machine Learning 2001, 45, 5–32. [Google Scholar] [CrossRef]
- Liaw, A.; Wiener, M. Classification and Regression by randomForest. R News 2002, 23. [Google Scholar]
- Lee, S.; Choi, H.; Cha, K.; Chung, H. Random forest as a potential multivariate method for near-infrared (NIR) spectroscopic analysis of complex mixture samples: Gasoline and naphtha. Microchemical Journal: Devoted to the Application of Microtechniques in all Branches of Science 2013. [Google Scholar] [CrossRef]
- Yao, G.; Lei, T.; Zhong, J. A review of Convolutional-Neural-Network-based action recognition. Pattern Recognition Letters 2019, 118, 14–22. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. Available online: (accessed on.
- 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. Frontiers in Plant Science 2020, 11. [Google Scholar] [CrossRef] [PubMed]
- Liu, Y.; Chen, M.; Hao, Y. Spectral diagnostic technology and its application in agricultural product quality testing. Journal of East China Jiaotong University 2018, 35, 1–7. [Google Scholar] [CrossRef]
- Wadood, S.A.; Guo, B.; Zhang, X.; Wei, Y. Geographical origin discrimination of wheat kernel and white flour using near-infrared reflectance spectroscopy fingerprinting coupled with chemometrics. International Journal of Food Science & Technology 2019. [Google Scholar]
- Xiaobo, Z.; Jiewen, Z.; Povey, M.J.W.; Holmes, M.; Hanpin, M. Variables selection methods in near-infrared spectroscopy. Analytica Chimica Acta 2010, 667, 14–32. [Google Scholar] [CrossRef]








| Layers | Size | Number | Activation | Output |
| Input | 64*64*1 | - | - | - |
| Conv1 | 3*3 | 32 | ReLU | 64*64*32 |
| Conv2 | 3*3 | 32 | ReLU | 64*64*32 |
| Max-Pooling1 | 2*2 | - | - | 32*32*32 |
| Conv3 | 3*3 | 64 | ReLU | 32*32*64 |
| Max-Pooling2 | 2*2 | - | - | 16*16*64 |
| Conv4 | 3*3 | 128 | ReLU | 16*16*128 |
| Max-Pooling3 | 2*2 | - | - | 8*8*128 |
| GlobalMaxPooling2D | - | - | 128 | |
| Dense1 | 128 | - | ReLU | 128 |
| Dense2 | 2 | - | Softmax | 2 |
| Classifier | Pretreatment | Accuracy (%) | RP (%) | RN (%) |
| PLS-DA | None | 94.70 | 96.88 | 92.65 |
| SG-1st | 96.21 | 96.88 | 95.59 | |
| SNV | 97.73 | 98.44 | 97.06 | |
| MSC | 97.73 | 98.44 | 97.06 | |
| CWT | 96.97 | 96.88 | 97.06 | |
| - | 96.67±1.27 a | 97.50±0.85 | 95.88±1.92 | |
| RF | None | 96.21 | 96.88 | 95.59 |
| SG-1st | 96.97 | 98.44 | 95.59 | |
| SNV | 97.73 | 98.44 | 97.06 | |
| MSC | 96.97 | 96.88 | 97.06 | |
| CWT | 96.21 | 96.88 | 95.59 | |
| - | 96.82±0.64 | 97.50±0.85 | 96.18±0.81 | |
| CNN | None | 96.97 | 98.44 | 95.59 |
| SG-1st | 96.97 | 98.44 | 95.59 | |
| SNV | 97.73 | 98.44 | 97.06 | |
| MSC | 97.73 | 98.44 | 97.06 | |
| CWT | 96.97 | 96.88 | 97.06 | |
| - | 97.27±0.42 | 98.13±0.70 | 96.47±0.81 | |
| a: Mean±SD of evaluation indicators | ||||
| Classifier | Pretreatment | Accuracy (%) | RP (%) | RN (%) |
| PLS-DA | None | 84.24 | 80.26 | 87.64 |
| SG-1st | 89.70 | 90.79 | 88.76 | |
| SNV | 95.78 | 94.73 | 96.63 | |
| MSC | 95.15 | 94.08 | 98.07 | |
| CWT | 93.03 | 93.42 | 92.70 | |
| - | 91.58±4.74 a | 90.66±6.00 | 92.76±4.62 | |
| RF | None | 87.27 | 86.84 | 87.64 |
| SG-1st | 86.67 | 87.50 | 85.69 | |
| SNV | 88.48 | 88.16 | 88.76 | |
| MSC | 87.27 | 86.84 | 87.64 | |
| CWT | 87.88 | 88.81 | 87.08 | |
| - | 87.51±0.69 | 87.63±0.86 | 87.36±1.12 | |
| CNN | None | 95.15 | 95.39 | 94.94 |
| SG-1st | 95.78 | 94.74 | 96.63 | |
| SNV | 96.39 | 96.71 | 96.07 | |
| MSC | 95.15 | 96.05 | 96.63 | |
| CWT | 95.78 | 94.74 | 96.63 | |
| - | 95.65±0.52 | 95.53±0.86 | 96.18±0.73 | |
| a: Mean±SD of evaluation indicators | ||||
| Model | Wheat kernel Dataset | Yali pear Dataset | ||||
| Accuracy (%) | RH (%) | RB (%) | Accuracy (%) | RH (%) | RB (%) | |
| G-PLS-DA | 95.45 | 96.88 | 94.12 | 90.91 | 92.31 | 88.24 |
| G-RF | 94.96 | 95.31 | 95.45 | 96.88 | 94.12 | 88.52 |
| G-CNN | 96.97 | 97.06 | 96.35 | 97.98 | 98.46 | 97.06 |
| G-CACNN | 98.48 | 98.44 | 98.53 | 99.39 | 100 | 98.36 |
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 (http://creativecommons.org/licenses/by/4.0/).