Adaptive Swin Transformer V2-Tiny Based Model for Classification of Bacteria, Fungus, Virus, and Healthy Fruit and Leaf Images

Authors

  • Poornima Basatti Hanuma Gowda Department of Studies in Computer Science, Davangere University, India https://orcid.org/0009-0007-0569-2527
  • Basavanna Mahadevappa Department of Studies in Computer Science, Davangere University, India https://orcid.org/0000-0001-9404-4183
  • Shivakumara Palaiahnakote School of Science, Engineering, and Environment, University of Salford and Data Science and Artificial Intelligence Hub, University of Salford, United Kingdom https://orcid.org/0000-0001-9026-4613
  • Muhammad Hammad Saleem School of Science, Engineering, and Environment, University of Salford and Data Science and Artificial Intelligence Hub, University of Salford, United Kingdom https://orcid.org/0000-0002-3625-3021
  • Niranjan Mallappa Hanumanthu Department of Studies in Biotechnology, Davangere University, India https://orcid.org/0000-0002-8440-9270

DOI:

https://doi.org/10.47852/bonviewAIA52026081

Keywords:

fruit classification, leaf classification, fruit/leaf disease classification, Swin Transformer

Abstract

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

Metrics Loading ...

Downloads

Published

2025-12-17

Issue

Section

Online First Articles

How to Cite

Gowda, P. B. H., Mahadevappa, B., Palaiahnakote, S., Saleem, M. H., & Hanumanthu, N. M. (2025). Adaptive Swin Transformer V2-Tiny Based Model for Classification of Bacteria, Fungus, Virus, and Healthy Fruit and Leaf Images. Artificial Intelligence and Applications. https://doi.org/10.47852/bonviewAIA52026081