PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
March 29, 2026Scientific Reports3 citationsOpen Access

MaizeFormerX: a lightweight vision transformer with cross-scale attention for explainable maize leaf disease diagnosis

MRMd Mostafizur RahmanMGMd Najmul GonyMUMd Shafiq Ullah

Key Points

  • To develop a lightweight and explainable vision-based model for early detection of maize leaf diseases.
  • Developed MaizeFormerX using multi-scale patch embeddings and Cross-Scale Attention Fusion module.
  • Implemented robust preprocessing and dataset-specific augmentations to enhance feature extraction.
  • Utilized Grad-CAM for interpretability through pixel-level saliency mapping in a web application.
  • Achieved 97.8% accuracy on Dataverse, 97.5% on Tanzania, and 96.9% on Plagues Maiz datasets, outpacing Swin Transformer V2 by 2–3%.
  • Cross-domain testing yielded 88.9% accuracy when trained on Dataverse and tested on Tanzania, outperforming baselines by 3–6%.
  • F1 scores over 98% for Healthy and MLB classes with 6× augmentation, and over 97% for MSV.

Abstract

Early detection of maize leaf diseases is essential to prevent yield losses. Existing vision-based models face challenges in real-world environments due to data imbalance, lighting variations, and interpretability. This study presents MaizeFormerX, a lightweight Vision Transformer designed for cross-domain, explainable maize disease detection on resource-limited settings. MaizeFormerX employs multi-scale patch embeddings and a Cross-Scale Attention Fusion (CSAF) module to capture both detailed lesion textures and larger disease patterns. The CSAF output is processed through a transformer encoder stack using multi-head self-attention to model long-range dependencies. Robust preprocessing and dataset-specific augmentations were applied to improve feature extraction and address class imbalances in the Dataverse, Tanzania, and Plagues Maiz datasets. For interpretability, Grad-CAM was used for pixel-level saliency mapping in an efficient web application. When benchmarked against MobileViT, EfficientFormer, TinyViT, and Swin Transformer, MaizeFormerX achieved 97.8% accuracy on Dataverse, 97.5% on Tanzania, and 96.9% on Plagues Maiz, outperforming Swin Transformer V2 by 2–3%. Cross-domain testing yielded 88.9% accuracy when trained on Dataverse and tested on Tanzania, surpassing baseline performance by 3–6%. Class-wise analysis revealed F1 scores over 98% for Healthy and MLB classes with 6× augmentation, and over 97% for MSV. Ablation studies highlighted the significance of the cross-scale attention module for high MCC during domain shifts. This study introduces a precise, explainable, and efficient image-based method for classifying maize diseases, which could aid in more targeted crop management, reduce unnecessary agrochemical use, and promote sustainable maize production in future decision-support environments.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Rahman et al. (2026) studied this question.

synapsesocial.com/papers/69c8c195de0f0f753b39bdfchttps://doi.org/10.1038/s41598-026-44550-0
Ask AI
Helpful
Bookmark
Share
View Full Paper