Abstract
Crop pest classification is essential for a strong and sustainable agricultural economy and food safety. However, the classification of pests is a time-consuming process that requires domain knowledge and relies on expertise. Therefore, automation of the classification process can reduce cost, improve accuracy, and facilitate analysis. In recent years convolutional neural networks (CNNs) and transfer learning fine-tuning methods have gained popularity in solving many computer vision problems in agriculture. The main advantage of pre-trained CNN models is instead of designing and training a model from scratch to solve various classification problems utilizing pre-trained models via transfer learning fine-tuning methods. However, it is important to determine transfer learning and fine-tuning hyperparameters of a pre-trained CNN model to achieve a successful classification performance. But this is a challenging task that requires experience, knowledge, and a lot of effort. This study proposed a new genetic algorithm-based hyperparameter optimization strategy for pre-trained CNN models in insect pest type classification. The proposed method was tested with three CNN models at different scales (MobileNetV2, DenseNet121, and InceptionResNetV2) on three insect datasets; Deng’s dataset with 10 classes, Xie2’s dataset named D0 with 40 classes, and Wu’s dataset named IP102 with 102 classes. The optimized CNN models have achieved state-of-the-art accuracies on D0 (99.89%) and Deng (97.58%) datasets and showed the closest performance to the literature on the IP102 (71.84%) dataset. According to the test results, the proposed method effectively classifies various crop pests and can be used in farming to save crop fields.
Similar content being viewed by others
References
Kasinathan, T.; Singaraju, D.; Uyyala, S.R.: Insect classification and detection in field crops using modern machine learning techniques. Inf. Process. Agric. 8, 446–457 (2021)
Kandalkar, G.; Deorankar, A.; Chatur, P.: Classification of agricultural pests using dwt and back propagation neural networks. Int. J. Comput. Sci. Inf. Technol. res. 5, 4034–4037 (2014)
Santangelo, G.D.: The impact of FDI in land in agriculture in developing countries on host country food security. J. World Bus. 53, 75–84 (2018)
Bures, B.L.; Donohue, K.V.; Roe, R.M.; Bourham, M.A.: Nonchemical dielectric barrier discharge treatment as a method of insect control. IEEE Trans. Plasma Sci. 34, 55–62 (2006)
Liu, H.; Lee, S.-H.; Chahl, J.S.: A multispectral 3-D vision system for invertebrate detection on crops. IEEE Sens. J. 17, 7502–7515 (2017)
Berenstein, R.; Edan, Y.: Automatic adjustable spraying device for site-specific agricultural application. IEEE Trans. Autom. Sci. Eng. 15, 641–650 (2017)
Bakkay, M.C.; Chambon, S.; Rashwan, H.A.; Lubat, C.; Barsotti, S.: Automatic detection of individual and touching moths from trap images by combining contour-based and region-based segmentation. IET Comput. Vis. 12, 138–145 (2018)
Júnior, T.D.C.; Rieder, R.: Automatic identification of insects from digital images: a survey. Comput. Electron. Agric. 178, 105784 (2020)
Thenmozhi, K.; Reddy, U.S.: Crop pest classification based on deep convolutional neural network and transfer learning. Comput. Electron. Agric. 164, 104906 (2019)
Martineau, M.; Conte, D.; Raveaux, R.; Arnault, I.; Munier, D.; Venturini, G.: A survey on image-based insect classification. Pattern Recognit. 65, 273–284 (2017)
Janiesch, C.; Zschech, P.; Heinrich, K.: Machine learning and deep learning. Electron. Mark. 31, 685–695 (2021)
Bisen, D.: Deep convolutional neural network based plant species recognition through features of leaf. Multimed. Tools Appl. 80, 6443–6456 (2021)
Borhani, Y.; Khoramdel, J.; Najafi, E.: A deep learning based approach for automated plant disease classification using vision transformer. Sci. Rep. 12, 11554 (2022)
Saleem, M.H.; Potgieter, J.; Arif, K.M.: Plant disease detection and classification by deep learning. Plants. 8, 468 (2019)
Dadashzadeh, M.; Abbaspour-Gilandeh, Y.; Mesri-Gundoshmian, T.; Sabzi, S.; Hernández-Hernández, J.L.; Hernández-Hernández, M.; Arribas, J.I.: Weed classification for site-specific weed management using an automated stereo computer-vision machine-learning system in rice fields. Plants. 9, 559 (2020)
Xia, D.; Chen, P.; Wang, B.; Zhang, J.; Xie, C.: Insect detection and classification based on an improved convolutional neural network. Sensors. 18, 4169 (2018)
Wu, X.; Zhan, C.; Lai, Y.-K.; Cheng, M.-M.; Yang, J.: Ip102: A large-scale benchmark dataset for insect pest recognition. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8787–8796 (2019)
Ren, F.; Liu, W.; Wu, G.: Feature reuse residual networks for insect pest recognition. IEEE Access. 7, 122758–122768 (2019)
Nanni, L.; Maguolo, G.; Pancino, F.: Insect pest image detection and recognition based on bio-inspired methods. Ecol. Inform. 57, 101089 (2020)
Ayan, E.; Erbay, H.; Varçın, F.: Crop pest classification with a genetic algorithm-based weighted ensemble of deep convolutional neural networks. Comput. Electron. Agric. 179, 105809 (2020)
Chen, J.; Chen, W.; Zeb, A.; Zhang, D.; Nanehkaran, Y.A.: Crop pest recognition using attention-embedded lightweight network under field conditions. Appl. Entomol. Zool. 56, 427–442 (2021)
Rahat, M.; Hasan, M.; Hasan, M.; Islam, M.; Rahman, M.; Islam, A.; Rahman, M.M.: Deep CNN-based mango insect classification. In: Computer Vision and Machine Learning in Agriculture, pp. 67–85. Springer (2021)
Ung, H.T.; Ung, H.Q.; Nguyen, B.T.: An efficient insect pest classification using multiple convolutional neural network based models. arXiv (2021)
Nanni, L.; Manfè, A.; Maguolo, G.; Lumini, A.; Brahnam, S.: High performing ensemble of convolutional neural networks for insect pest image detection. Ecol. Inform. 67, 101515 (2022)
Liu, J.; Zhao, T.; Liu, K.; Sun, B.; Bai, C.: Optimization of structure parameters in a coal pyrolysis filtration system based on CFD and quadratic regression orthogonal combination and a genetic algorithm. Eng. Appl. Comput. Fluid Mech. 15, 815–829 (2021)
Aszemi, N.M.; Dominic, P.: Hyperparameter optimization in convolutional neural network using genetic algorithms. Int. J. Adv. Comput. Sci. Appl. 10, (2019)
Ghalandari, M.; Ziamolki, A.; Mosavi, A.; Shamshirband, S.; Chau, K.-W.; Bornassi, S.: Aeromechanical optimization of first row compressor test stand blades using a hybrid machine learning model of genetic algorithm, artificial neural networks and design of experiments. Eng. Appl. Comput. Fluid Mech. 13, 892–904 (2019)
Kazemi, S.; Minaei, B.B.; Shamshirband, S.; Karimi, S.M.; Ghorbani, M.A.; Chau, K.-W.; Kazem Pour, R.: Novel genetic-based negative correlation learning for estimating soil temperature. Eng. Appl. Comput. Fluid Mech. 12, 506–516 (2018)
Katoch, S.; Chauhan, S.S.; Kumar, V.: A review on genetic algorithm: past, present, and future. Multimed. Tools Appl. 80, 8091–8126 (2021)
Jeong, J.-C.; Yu, G.-H.; Song, M.-G.; Vu, D.T.; Anh, L.H.; Jung, Y.-A.; Choi, Y.-A.; Um, T.-W.; Kim, J.-Y.: Selective layer tuning and performance study of pre-trained models using genetic algorithm. Electronics 11, 2985 (2022)
Li, C.; Jiang, J.; Zhao, Y.; Li, R.; Wang, E.; Zhang, X.; Zhao, K.: Genetic algorithm based hyper-parameters optimization for transfer convolutional neural network. In: International Conference on Advanced Algorithms and Neural Networks (AANN 2022), vol. 12285, pp. 232–241. SPIE (2022)
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 (CVPR), pp. 4510–4520. (2018)
Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q.: Densely connected convolutional networks. In: Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), pp. 4700–4708. (2017)
Szegedy, C.; Ioffe, S.; Vanhoucke, V.; Alemi, A.A.: Inception-v4, inception-resnet and the impact of residual connections on learning. In: Thirty-first AAAI Conference on Artificial Intelligence (AAAI). (2017)
Deng, L.; Wang, Y.; Han, Z.; Yu, R.: Research on insect pest image detection and recognition based on bio-inspired methods. Biosyst. Eng. 169, 139–148 (2018)
Xie, C.; Wang, R.; Zhang, J.; Chen, P.; Dong, W.; Li, R.; Chen, T.; Chen, H.: Multi-level learning features for automatic classification of field crop pests. Comput. Electron. Agric. 152, 233–241 (2018)
Krizhevsky, A.; Sutskever, I.; Hinton, G.E.: Imagenet classification with deep convolutional neural networks. Commun. ACM. 60, 84–90 (2017)
Bhatt, D.; Patel, C.; Talsania, H.; Patel, J.; Vaghela, R.; Pandya, S.; Modi, K.; Ghayvat, H.: CNN variants for computer vision: History, architecture, application, challenges and future scope. Electronics 10, 2470 (2021)
Shorten, C.; Khoshgoftaar, T.M.: A survey on image data augmentation for deep learning. J. Big Data. 6, 1–48 (2019)
Tan, C.; Sun, F.; Kong, T.; Zhang, W.; Yang, C.; Liu, C.: A survey on deep transfer learning. In: International Conference on Artificial Neural Networks (ICAN), pp. 270–279. Springer (2018)
Yosinski, J.; Clune, J.; Bengio, Y.; Lipson, H.: How transferable are features in deep neural networks? Adv. Neural Inf. Process. Syst. 27, (2014)
Golberg, D.E.: Genetic algorithms in search, optimization, and machine learning. Addion Wesley. 1989, 36 (1989)
John, H.: Holland. Genetic algorithms. Sci. Am. 267, 44–50 (1992)
Hassan, E.; Shams, M.Y.; Hikal, N.A.; Elmougy, S.: The effect of choosing optimizer algorithms to improve computer vision tasks: a comparative study. Multimed. Tools Appl. 1–43 (2022)
Haji, S.H.; Abdulazeez, A.M.: Comparison of optimization techniques based on gradient descent algorithm: a review. PalArch’s J. Archaeol. Egypt/Egyptol. 18, 2715–2743 (2021)
Yadav, S.L.; Sohal, A.: Study of the various selection techniques in genetic algorithms. Int. J. Adv. Eng. Sci. Math. 6, 198–204 (2017)
Aldallal, A.: Avoiding premature convergence of genetic algorithm in informational retrieval systems. Int. J. Intell. Syst. Appl. Eng. 2, 80–85 (2014)
Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D.: Grad-cam: Visual explanations from deep networks via gradient-based localization. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 618–626. (2017).
Funding
The authors declare that no funds were received during the preparation of this manuscript.
Author information
Authors and Affiliations
Contributions
EA contributed to conceptualization, methodology, data curation, software, writing—original draft, visualization, validation, and writing—review and editing.
Corresponding author
Ethics declarations
Conflict of Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Ayan, E. Genetic Algorithm-Based Hyperparameter Optimization for Convolutional Neural Networks in the Classification of Crop Pests. Arab J Sci Eng 49, 3079–3093 (2024). https://doi.org/10.1007/s13369-023-07916-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s13369-023-07916-4