Non-Destructive Detection of Soybean Pest Based on Hyperspectral Image and Attention-ResNet Meta-Learning Model
Abstract
:1. Introduction
- (1)
- By combining the ResNet network with Attention, the feature vector which can better express the sample can be obtained to improve the model performance.
- (2)
- The step of feature stitching was abandoned, and the classifier was simplified and designed as a multi-class support vector machine to reduce over-fitting.
- (3)
- In order to optimize the model, and improve the training stability of the model and the prediction performance on the testing set, Layer Normalization was used to replace the traditional Batch Normalization, and the Label Smoothing method was used to punish the original loss.
2. Materials and Methods
2.1. Sample Preparation
2.2. Hyperspectral Imaging System
2.3. Image Collection
2.4. Image Preprocessing
2.4.1. Black-and-White Calibration
2.4.2. Region of interest Extraction
2.4.3. Savitzky–Golay (SG) [17]
2.4.4. Principal Component Analysis (PCA) [18]
2.5. Methods
2.5.1. Meta-Learning
2.5.2. Feature Extraction Network
- (1)
- Attention first initializes three different weight matrices for the input vector, and multiplies the input data by the above three weight matrices to obtain three input vectors of the same latitude of Query, Key and Value.
- (2)
- In order to enable the model to learn the attention scores of different dimensions of the sample features, multiply the Query and Key values to calculate the attention scores of each dimension feature. The formula is:
- (3)
- Finally, multiply the value with Value to obtain the final weighting matrix A. The structure of Attention is shown in Figure 6b.
2.5.3. Multi-Class SVM Classifier
2.5.4. A-ResNet Meta-Learning Model
2.6. The Optimization of A-ResNet Meta-Learning Model
2.6.1. Layer Normalization [19]
2.6.2. Inactivation Strategy of Dropout Neurons [20]
2.6.3. Label Smooth [21]
3. Results and Analysis
3.1. Dataset
3.2. Experimental Results and Analysis
- (1)
- Under the same shot, the accuracy of the same model with the learning rate of 0.01 was higher than 0.001, especially in MN, PN, and 3D-RN meta-learning models, with the difference of accuracy higher than 10%. This phenomenon showed that this kind of model was greatly influenced by the learning rate hyperparameter. When the learning rate was low, the loss function of the model changed slowly, so it stayed at the local optimal saddle point in advance.
- (2)
- It can be seen that the detection result of 5-shot was always better than that of 1-shot no matter what model, and the accuracy of A-ResNet model achieved the highest accuracy of 94.57% ± 0.19% in the case of 5-shot, which was better than the 3D-RN model, MAML, MN and PN models. It showed that when the number of test samples was large, the model can better learn the feature vectors representing the characteristics of the samples, thus improving the detection performance.
- (3)
- The effect of large learning rate was always better than that of small learning rate, which indicated that when the sample size was small, the small learning rate will lead to the slow convergence of the model, resulting in the decline of the model performance.
- (4)
- The performance of multi-class SVM classifier was better than that of using convolution as classifier, which indicated that the nonlinear classifier may cause over-fitting in the case of small sample, while the multi-class SVM linear classifier combined with Label Smooth method can effectively avoid over-fitting and improve the performance of the model, and the stability of the model was better than that of other models.
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Tetila, E.C.; Machado, B.B.; Astolfi, G.; de Souza Belete, N.A.; Amorim, W.P.; Roel, A.R.; Pistori, H. Detection and classification of soybean pests using deep learning with UAV images. Comput. Electron. Agric. 2020, 179, 105836. [Google Scholar] [CrossRef]
- Yu, Z. Research on the development and trend of soybean food processing industry. Food Saf. Guide 2017, 44, 32. (In Chinese) [Google Scholar]
- Roy, S. Detection and biochemical characterization of acaricide resistance in field populations of tea red spider mite, Oligonychus coffeae (Acari: Tetranychidae), in Assam tea plantation of India. Int. J. Acarol. 2019, 45, 470–476. [Google Scholar] [CrossRef]
- Tanaka, F.; Magariyama, Y.; Miyanoshita, A. Volatile biomarkers for early-stage detection of insect-infested brown rice: Isopentenols and polysulfides. Food Chem. 2020, 303, 125381. [Google Scholar] [CrossRef] [PubMed]
- Young, R.G.; Milián-García, Y.; Yu, J.; Bullas-Appleton, E.; Hanner, R.H. Biosurveillance for invasive insect pest species using an environmental DNA metabarcoding approach and a high salt trap collection fluid. Ecol. Evol. 2021, 11, 1558–1569. [Google Scholar] [CrossRef] [PubMed]
- Rustia, D.J.A.; Lin, C.E.; Chung, J.Y.; Zhuang, Y.J.; Hsu, J.C.; Lin, T.T. Application of an image and environmental sensor network for automated greenhouse insect pest monitoring. J. Asia-Pac. Entomol. 2020, 23, 17–28. [Google Scholar] [CrossRef]
- Rasheed, S.U.; Muhammad, W.; Qaiser, I.; Irshad, M.J. A Multispectral Pest-Detection Algorithm for Precision Agriculture. Eng. Proc. 2021, 12, 46. [Google Scholar]
- Desmedt, W.; Jonckheere, W.; Nguyen, V.H.; Ameye, M.; De Zutter, N.; De Kock, K.; Debode, J.; Van Leeuwen, T.; Audenaert, K.; Vanholme, B.; et al. The phenylpropanoid pathway inhibitor piperonylic acid induces broad-spectrum pest and disease resistance in plants. Plant Cell Environ. 2021, 44, 3122–3139. [Google Scholar] [CrossRef]
- Iost Filho, F.H.; de Bastos Pazini, J.; de Medeiros, A.D.; Rosalen, D.L.; Yamamoto, P.T. Assessment of Injury by Four Major Pests in Soybean Plants Using Hyperspectral Proximal Imaging. Agronomy 2022, 12, 1516. [Google Scholar] [CrossRef]
- Sulaiman, N.; Che’Ya, N.N.; Mohd Roslim, M.H.; Juraimi, A.S.; Mohd Noor, N.; Fazlil Ilahi, W.F. The Application of Hyperspectral Remote Sensing Imagery (HRSI) for Weed Detection Analysis in Rice Fields: A Review. Appl. Sci. 2022, 12, 2570. [Google Scholar] [CrossRef]
- Yan, T.; Xu, W.; Lin, J.; Duan, L.; Gao, P.; Zhang, C.; Lv, X. Combining Multi-Dimensional Convolutional Neural Network (CNN) With Visualization Method for Detection of Aphis gossypii Glover Infection in Cotton Leaves Using Hyperspectral Imaging. Front. Plant Sci. 2021, 12, 74. [Google Scholar] [CrossRef] [PubMed]
- Xi, B.; Li, J.; Li, Y.; Song, R.; Hong, D.; Chanussot, J. Few-shot learning with class-covariance metric for hyperspectral image classification. IEEE Trans. Image Process. 2022, 31, 5079–5092. [Google Scholar] [CrossRef] [PubMed]
- Zuo, X.; Yu, X.; Liu, B.; Zhang, P.; Tan, X. FSL-EGNN: Edge-Labeling Graph Neural Network for Hyperspectral Image Few-Shot Classification. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5526518. [Google Scholar] [CrossRef]
- Gomes, J.C.; Borges, D.L. Insect Pest Image Recognition: A Few-Shot Machine Learning Approach including Maturity Stages Classification. Agronomy 2022, 12, 1733. [Google Scholar] [CrossRef]
- Yang, J.; Ma, S.; Li, Y.; Zhang, Z. Efficient data-driven crop pest identification based on edge distance-entropy for sustainable agriculture. Sustainability 2022, 14, 7825. [Google Scholar] [CrossRef]
- Ouyang, A.-G.; Liu, H.; Chan, J.; Jiang, X.; Li, X.; Hu, X. The application of hyperspectral image features combined with spectral features to the classification of bruise time of peach. Spectrosc. Spectr. Anal. 2021, 41, 2598–2603. (In Chinese) [Google Scholar]
- Savitzky, A.; Golay, M.J.E. Smoothing and differentiation of data by simplified least squares procedures. Anal. Chem. 1964, 36, 1627–1639. [Google Scholar] [CrossRef]
- Lever, J.; Krzywinski, M.; Altman, N. Points of significance: Principal component analysis. Nat. Methods 2017, 14, 641–643. [Google Scholar] [CrossRef] [Green Version]
- Ba, J.L.; Kiros, J.R.; Hinton, G.E. Layer normalization. arXiv 2016, arXiv:1607.06450. [Google Scholar]
- Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
- Lukasik, M.; Bhojanapalli, S.; Menon, A.; Kumar, S. Does label smoothing mitigate label noise? In Proceedings of the 37th International Conference on Machine Learning, PMLR, Vienna, Austria, 13–18 July 2020; pp. 6448–6458. [Google Scholar]
- Yasuma, F.; Mitsunaga, T.; Iso, D.; Nayar, S.K. Generalized Assorted Pixel Camera: Post-Capture Control of Resolution, Dynamic Range and Spectrum; Department of Computer Science Columbia University: New York, NY, USA, 2008. [Google Scholar]
- Arad, B.; Ben-Shahar, O. Sparse recovery of hyperspectral signal from natural rgb images. In European Conference on Computer Vision; Springer: Cham, Switzerland, 2016; pp. 19–34. [Google Scholar]
- Nguyen RM, H.; Prasad, D.K.; Brown, M.S. Training-based spectral reconstruction from a single RGB image. In European Conference on Computer Vision; Springer: Cham, Switzerland, 2014; pp. 186–201. [Google Scholar]
- Yun, S.; Han, D.; Oh, S.J.; Chun, S.; Choe, J.; Yoo, Y. Cutmix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 6023–6032. [Google Scholar]
- Finn, C.; Abbeel, P.; Levine, S. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning, PMLR, Sydney, Australia, 6–11 August 2017; pp. 1126–1135. [Google Scholar]
- Vinyals, O.; Blundell, C.; Lillicrap, T.; Wierstra, D. Matching networks for one shot learning. arXiv 2016, arXiv:1606.04080. [Google Scholar]
- Snell, J.; Swersky, K.; Zemel, R.S. Prototypical networks for few-shot learning. arXiv 2017, arXiv:1703.05175. [Google Scholar]
- Sung, F.; Yang, Y.; Zhang, L.; Xiang, T.; Torr, P.H.; Hospedales, T.M. Learning to compare: Relation network for few-shot learning. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 1199–1208. [Google Scholar]
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. |
© 2023 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
Gui, J.; Xu, H.; Fei, J. Non-Destructive Detection of Soybean Pest Based on Hyperspectral Image and Attention-ResNet Meta-Learning Model. Sensors 2023, 23, 678. https://doi.org/10.3390/s23020678
Gui J, Xu H, Fei J. Non-Destructive Detection of Soybean Pest Based on Hyperspectral Image and Attention-ResNet Meta-Learning Model. Sensors. 2023; 23(2):678. https://doi.org/10.3390/s23020678
Chicago/Turabian StyleGui, Jiangsheng, Huirong Xu, and Jingyi Fei. 2023. "Non-Destructive Detection of Soybean Pest Based on Hyperspectral Image and Attention-ResNet Meta-Learning Model" Sensors 23, no. 2: 678. https://doi.org/10.3390/s23020678
APA StyleGui, J., Xu, H., & Fei, J. (2023). Non-Destructive Detection of Soybean Pest Based on Hyperspectral Image and Attention-ResNet Meta-Learning Model. Sensors, 23(2), 678. https://doi.org/10.3390/s23020678