Cotton leaf disease classification using deep learning models for smart agriculture
Agriculture is a leading economical sector that contributes significantly to the livelihoods and the total Gross Domestic Product (GDP) of Pakistan. With cotton as a key crop, its production must be sustainable, and this becomes a challenge posed by environmental changes, pest infestations, and the increasing costs of cultivation. This study, situated in the context of smart agriculture and sustainable practices, aims at justifying how advanced AI techniques can help overcome these challenges and improve the management of cotton crop with a focus on disease detection and classification. In order to achieve it, this study provides a comparison between various powerful model including Convolutional Neural Network (CNN) architectures including ResNet, GoogleNet, MobileNet, AlexNet, VGG16, and VGG19 and some variants of Transformers; including Vision Transformer (ViT), Shifted Window Transformer (Swin Transformer), Convolutional Neural Networks & Transformer (CNN Transformer), Data-efficient Image Transformer (DeiT) and Pyramid Vision Transformer (PVT) for the classification of cotton leaf diseases, particularly targeting leaves infected by Caterpillar, Herbicide Burn, Leaf Variegation, Verticillium Wilt and Healthy leaves. As a result of the diseases affecting cotton crops, it is essential to create accurate, efficient, and reproducible diagnostic techniques for the sustainable agricultural practices. This study analyzes cotton leaf image acquired from Bahawalpur, Punjab, Pakistan to determine the ability of models to correctly classify diseases according to visible symptoms. An evaluation process followed by data annotation and augmentation procedures determined the accuracy and precision as well as recall and F1 score of the models. This research demonstrates that ViT achieve 78.40% accuracy on non-annotated dataset, followed by DeiT with 77.00%, and Swin Transformer with 75.40%. While for annotated data ViT has the accuracy of 79.20% which is followed by Swin Transformer with 77.20% and DeiT with 74.80%. However, the k-fold cross validation results (with k=5, 10, and 15) shows that Swin Transformer consistently outperforms other models on both non-annotated and annotated datasets. On the non-annotated dataset, it attain the highest accuracy of 90.83% in the 15 folds, while ViT also demonstrate high accuracy, average accuracy above 79%. Similarly, on the annotated dataset, Swin Transformer achieved the highest accuracy of 98.45% in the 15 folds, with ViT again demonstrating the competitive performance, averaging over 82% accuracy. These observations showcase the power of ViT, Swin Transformer and DeiT in cotton leaf disease classification, particularly for both annotated and non-annotated datasets, emphasizing their adaptability and precision. While models like VGG16 and VGG19 demonstrated competitive performance but lags behind in accuracy. Furthermore, model training emphasize the importance of well-annotated datasets in order to get the balanced precision and recall. The findings of this work will complement the integration of AI-based diagnostic tools in precision and smart agriculture; thereby improving the current disease management practices, promoting sustainable practices, and supporting sustainable crop production systems. This research aligns with several Sustainable Development Goals (SDGs), including SDG 2 (Zero Hunger), SDG 12 (Responsible Consumption and Production), and SDG 15 (Life on Land), by promoting smart agriculture, sustainable practices, and improved crop health for enhanced food security and responsible resource use.
Authors
- Muhammad Farrukh Shahid (ORCID: https://orcid.org/0009-0004-8787-1868)
- M. Hassan Tanveer (ORCID: https://orcid.org/0000-0001-9266-6368)
- Tariq Jamil Saifullah Khanzada (ORCID: https://orcid.org/0000-0003-1617-4403)
- Rehab Bahaaddin Ashari (ORCID: https://orcid.org/0000-0003-1225-7535)
- Arwa Mashat (ORCID: https://orcid.org/0000-0002-0612-6005)
- Hina Kiran Abbas (ORCID: https://orcid.org/0009-0008-1549-1160)
Institutions
- Kennesaw State University (US)
- Mehran University of Engineering and Technology (PK)
- King Abdulaziz University (SA)
- National University of Computer and Emerging Sciences (PK)
Publication Details
- Journal
- Agriculture & Food Security
- Published
- 2026-09-25
- DOI
- https://doi.org/10.1186/s40066-026-00610-2
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00