# A lightweight hybrid CNN and transformer model for medicinal leaf disease classification with explainable AI

**Authors:** Jalal Ahmmed, Md Alamgir Kabir, Atiq ur Rehman, Amine Bermak

PMC · DOI: 10.1038/s41598-026-39182-3 · Scientific Reports · 2026-02-11

## TL;DR

A new lightweight AI model called LSeTNet accurately detects leaf diseases in medicinal plants and can be used in real-time with minimal resources.

## Contribution

LSeTNet is a novel hybrid CNN-Transformer model with SE blocks that achieves high accuracy and efficiency for leaf disease classification.

## Key findings

- LSeTNet achieved 99.72% accuracy with only 9.38 M parameters and 2.50 GFLOPs.
- The model outperformed DenseNet169, ViT-B16, and LW-CNN+SE with statistically significant results.
- Explainable AI techniques confirmed biologically meaningful attention on disease regions.

## Abstract

Medicinal plants including Ocimum tenuiflorum L. (Tulsi), Azadirachta indica A. Juss. (Neem), and Kalanchoe pinnata (Lam.) Pers. (Patharkuchi) are essential sources of bioactive compounds, yet leaf diseases threaten their yield and phytochemical integrity. This study proposes LSeTNet, a lightweight hybrid CNN (Convolutional Neural Network) Transformer architecture with Squeeze-and-Excitation (SE) blocks, achieving 99.72% accuracy, 1.00 macro F1-score, and AUC = 1.00 across 12 disease classes (1,000 images/class post-augmentation) using only 9.38 M parameters and 2.50 GFLOPs. Five-fold cross-validation yielded 99.74% ± 0.14% accuracy, with rapid convergence and no overfitting. Explainable Artificial Intelligence (XAI) via Gradient-weighted Class Activation Mapping (Grad-CAM) (mean intensity: 0.1664–0.2702), Local Interpretable Model-agnostic Explanations (LIME), and t-distributed Stochastic Neighbor Embedding (t-SNE) (silhouette score: 0.87) confirmed biologically meaningful attention on pathological regions. External validation on the independent BD-MediLeaves dataset (8 classes, 8,000 samples) achieved 99.42% accuracy and 0.99 macro F1. With 6.98 ms/image inference latency and 35.81 MB memory, LSeTNet enables real-time, edge-based deployment. It significantly outperforms DenseNet169 (95.56%), ViT-B16 (95.61%), and LW-CNN+SE (95.39%) (\documentclass[12pt]{minimal}
				\usepackage{amsmath}
				\usepackage{wasysym} 
				\usepackage{amsfonts} 
				\usepackage{amssymb} 
				\usepackage{amsbsy}
				\usepackage{mathrsfs}
				\usepackage{upgreek}
				\setlength{\oddsidemargin}{-69pt}
				\begin{document}$$p < 10^{-7}$$\end{document}, paired t-tests), establishing a transparent, efficient, and generalizable benchmark for precision phytopathology and sustainable medicinal plant cultivation.

## Full-text entities

- **Diseases:** leaf disease (MESH:D004194)
- **Species:** Ocimum tenuiflorum (holy basil, species) [taxon 204149], Azadirachta indica (Indian-lilac, species) [taxon 124943]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12963492/full.md

## Figures

12 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12963492/full.md

## References

9 references — full list in the complete paper: https://tomesphere.com/paper/PMC12963492/full.md

---
Source: https://tomesphere.com/paper/PMC12963492