Hybrid AI Model With CNNs and Vision Transformers for Precision Pest Classification in Crops
Open Access
- 9 November 2025
- journal article
- Published by Wiley in Food Science & Nutrition
- Vol. 13 (11)
Abstract
Crop pests pose a significant threat to agricultural productivity, making it essential to develop effective pest management techniques. Prompt and accurate identification of pests is necessary for effective pest management and preventing significant damage. This paper proposes HyPest‐Net, a hybrid deep learning architecture that integrates convolutional neural networks (CNNs) for local feature extraction, channel and spatial attention mechanisms for refining salient features, and a vision transformer (ViT‐B/16) module for modeling long‐range dependencies. This integrated hybrid architecture enables accurate pest classification by resolving challenges posed by visually similar species, background clutter, and varied illumination issues that standalone CNNs or ViTs inadequately address. Preprocessing and augmentation have been used to enhance the generalizability of the proposed model over the dataset. The proposed model was evaluated on two benchmark datasets: a rice pest dataset (5 classes) and the dangerous farm insects dataset (15 classes). Experimental results demonstrate that HyPest‐Net achieved an accuracy of 0.95 on the rice pest dataset. The proposed model achieved a precision of 0.95, a sensitivity of 0.95, a specificity of 0.94, and an F1 score of 0.94. The proposed model achieved an accuracy of 0.93 on the dangerous farm insects dataset. The proposed HyPest‐Net model offers a lightweight yet powerful solution for real‐time, explainable pest classification, supporting practical applications in precision agriculture.Keywords
This publication has 21 references indexed in Scilit:
- Enhancing crop productivity and sustainability through disease identification in maize leaves: Exploiting a large dataset with an advanced vision transformer modelExpert Systems with Applications, 2023
- Deep learning based automated disease detection and pest classification in Indian mung beanMultimedia Tools and Applications, 2022
- Advanced multi-class deep learning convolution neural network approach for insect pest classification using TensorFlowInternational Journal of Environmental Science and Technology, 2022
- Classification of crop pests based on multi-scale feature fusionComputers and Electronics in Agriculture, 2022
- Citrus pests classification using an ensemble of deep learning modelsComputers and Electronics in Agriculture, 2021
- Crop pest classification with a genetic algorithm-based weighted ensemble of deep convolutional neural networksComputers and Electronics in Agriculture, 2020
- Insect pest image detection and recognition based on bio-inspired methodsEcological Informatics, 2020
- Crop pest classification based on deep convolutional neural network and transfer learningComputers and Electronics in Agriculture, 2019
- Multi-level learning features for automatic classification of field crop pestsComputers and Electronics in Agriculture, 2018
- Deep learning in agriculture: A surveyComputers and Electronics in Agriculture, 2018