Adaptive Swin Transformer V2-Tiny Based Model for Classification of Bacteria, Fungus, Virus, and Healthy Fruit and Leaf Images
DOI:
https://doi.org/10.47852/bonviewAIA52026081Keywords:
fruit classification, leaf classification, fruit/leaf disease classification, Swin TransformerAbstract
The classification of fruits and leaves affected by bacteria, viruses, and fungi has made significant progress in the fields of artificial intelligence and image processing. However, most methods focus on particular categories of fruit and leaf diseases, but not on both fruit and leaf diseases caused by bacteria, viruses, and fungi. This study aimed to develop a model for the classification of the initial, intermediate, and final stages of bacterial, viral, and fungal diseases, irrespective of fruit and leaf types. To achieve this goal, inspired by the accomplishments of the Swin Transformer, the Swin Transformer V2-Tiny was explored for the classification of 10 classes, which included healthy and three stages of bacteria, virus, and fungus images of fruits and leaves. The stages of Swin Transformer V2-Tiny divide the image into patches, namely, linear projection, Window Multi-Head Self-Attention (W-MSA), and Shifted Window Multi-Head Self-Attention (SW-MSA) for local and global features, which were adapted to perform the plant disease classification. Experiments on authors’ curated and standard datasets and a comparative study with recent methods demonstrate effective classification and superiority over existing methods. To the best of our knowledge, this is the first study on the classification of fruit and leaf pathogens caused by bacteria, viruses, and fungi based on their development stages. The proposed model achieved an average classification rate of 91.04% on fruit datasets and 94.07% on leaf datasets, outperforming recent benchmark methods. It also demonstrated strong generalization on unseen public datasets with over 93% accuracy.
Received: 5 May 2025 | Revised: 15 August 2025 | Accepted: 17 October 2025
Conflicts of Interest
Shivakumara Palaiahnakote is the Editor-in-Chief for Artificial Intelligence and Applications, and he was not involved in the editorial review or the decision to publish this article. The authors declare that they have no conflicts of interest to this work.
Data Availability Statement
Data sharing is not applicable to this article as no new data were created or analyzed in this study.
Author Contribution Statement
Poornima Basatti Hanuma Gowda: Software, Data curation, Writing – original draft, Visualization. Basavanna Mahadevappa: Formal analysis, Investigation, Supervision, Project administration. Shivakumara Palaiahnakote: Conceptualization, Methodology. Muhammad Hammad Saleem: Validation, Writing – review & editing. Niranjan Mallappa Hanumanthu: Resources.
Metrics
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Authors

This work is licensed under a Creative Commons Attribution 4.0 International License.