Castor (Ricinus communis L.) is a significant crop valued for its non-edible oil, yet its economic importance is compromised by insect pests causing substantial yield losses of 35-40%. This paper explores the efficiency of utilization of vision transformers for efficient pest classification. We propose CASTIPestViT, a Vision Transformer-based model specifically designed for insect pest detection in castor crops. The model integrates transfer learning and fine-tuning mechanisms, leveraging a pre-trained Vision Transformer (ViT) initially trained on ImageNet1k, and is fine-tuned on a custom dataset of castor insect pests. CASTIPestViT uses the self-attention mechanism of ViTs to capture global and local features of insect pests. The performance of CASTIPestViT is compared with six different pre-trained CNN models. The results obtained by the proposed model achieve a validation accuracy of 97.60% in insect pest detection and outperforming other state-of-the-art models in terms of precision, accuracy, and f1-score. The model offers a robust solution in early-stage insect pest detection to reduce yield losses. The efficiency and accuracy of the model make it suitable in sustainable crop management and smart agriculture systems for yield optimization.
Copyrights © 2026