Accurate grapevine cultivar identification and leaf disease diagnosis are important for precision viticulture but remain challenging due to variation in cultivar morphology, disease symptoms, imaging conditions, and dataset sources. This study developed an application-oriented, explainable, two-stage deep learning framework for grapevine leaf analysis that uses a standard Swin-Tiny backbone without architectural modifications. In Stage 1, representative CNN, transformer, and hybrid models were benchmarked on a 16-class grapevine cultivar dataset to learn cultivar-related features. In Stage 2, Swin-Tiny was fine-tuned on a unified 7-class grape leaf disease dataset to evaluate cultivar-to-disease transfer learning. Expanded benchmarking showed that MobileViT-S, MaxViT-Tiny, ResNet50, ConvNeXtV2-Tiny, and InceptionV3 performed strongly across tasks. On the fixed cultivar split used for detailed analysis, Swin-Tiny achieved 85.00% test balanced accuracy, 83.44% F1-score, and 0.8428 MCC; repeated-split analysis gave a higher mean test balanced accuracy of 96.50 ± 3.11%, confirming split sensitivity. For disease classification, the two-stage Swin-Tiny model achieved 99.07% validation accuracy and 99.53% test accuracy, with corresponding balanced accuracies of 99.01% and 99.71%, respectively. However, direct ImageNet-pretrained disease-only Swin-Tiny fine-tuning reached 100.00% test balanced accuracy, indicating that cultivar-stage pretraining did not numerically improve Swin-Tiny in this setting. Multi-backbone comparisons showed that cultivar-to-disease transfer was architecture-dependent rather than uniformly beneficial. Explainable AI visualisations highlighted morphology-related regions for cultivar recognition and symptom-related regions for disease classification. The implementation is available at doi:https://doi.org/10.5281/zenodo.18937849. Overall, the framework provides a transparent and reproducible benchmark baseline for grapevine leaf analysis.
Explainable AI-based two-stage Swin transformer for grapevine leaf-based variety and disease classification / Shah, S.T.H., Shah, S.A.H., Godio, S., Kassem, K., Ahmad Qureshi, S., Bilal Hussain, S., Deriu, M.A.. - In: INFORMATION PROCESSING IN AGRICULTURE. - ISSN 2214-3173. - (2026), pp. -1. [10.1016/j.inpa.2026.07.010]
Explainable AI-based two-stage Swin transformer for grapevine leaf-based variety and disease classification
Syed Taimoor Hussain Shah;Syed Adil Hussain Shah;Silvia Godio;Karim Kassem;Marco Agostino Deriu
2026
Abstract
Accurate grapevine cultivar identification and leaf disease diagnosis are important for precision viticulture but remain challenging due to variation in cultivar morphology, disease symptoms, imaging conditions, and dataset sources. This study developed an application-oriented, explainable, two-stage deep learning framework for grapevine leaf analysis that uses a standard Swin-Tiny backbone without architectural modifications. In Stage 1, representative CNN, transformer, and hybrid models were benchmarked on a 16-class grapevine cultivar dataset to learn cultivar-related features. In Stage 2, Swin-Tiny was fine-tuned on a unified 7-class grape leaf disease dataset to evaluate cultivar-to-disease transfer learning. Expanded benchmarking showed that MobileViT-S, MaxViT-Tiny, ResNet50, ConvNeXtV2-Tiny, and InceptionV3 performed strongly across tasks. On the fixed cultivar split used for detailed analysis, Swin-Tiny achieved 85.00% test balanced accuracy, 83.44% F1-score, and 0.8428 MCC; repeated-split analysis gave a higher mean test balanced accuracy of 96.50 ± 3.11%, confirming split sensitivity. For disease classification, the two-stage Swin-Tiny model achieved 99.07% validation accuracy and 99.53% test accuracy, with corresponding balanced accuracies of 99.01% and 99.71%, respectively. However, direct ImageNet-pretrained disease-only Swin-Tiny fine-tuning reached 100.00% test balanced accuracy, indicating that cultivar-stage pretraining did not numerically improve Swin-Tiny in this setting. Multi-backbone comparisons showed that cultivar-to-disease transfer was architecture-dependent rather than uniformly beneficial. Explainable AI visualisations highlighted morphology-related regions for cultivar recognition and symptom-related regions for disease classification. The implementation is available at doi:https://doi.org/10.5281/zenodo.18937849. Overall, the framework provides a transparent and reproducible benchmark baseline for grapevine leaf analysis.| File | Dimensione | Formato | |
|---|---|---|---|
|
1-s2.0-S2214317326001058-main.pdf
accesso aperto
Tipologia:
2. Post-print / Author's Accepted Manuscript
Licenza:
Creative commons
Dimensione
9.49 MB
Formato
Adobe PDF
|
9.49 MB | Adobe PDF | Visualizza/Apri |
Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/11583/3013827
