LeafXNet is a lightweight, explainable image model for detecting disease on fruit leaves, published in the journal Plant Direct on 22 October 2026 by researchers at the University of Asia Pacific in Dhaka, with a co-author from American International University-Bangladesh. It combines a small convolutional network with multi-head self-attention and has just 79,717 parameters, about 0.30MB of storage.
How LeafXNet works
- Convolution layers pick up the textures and shapes on a leaf photo.
- A multi-head self-attention layer works like several reviewers each marking the patches that matter, so the network focuses on disease regions and ignores the background.
- Three explainability methods, CAM, Grad-CAM and Grad-CAM++, draw heat maps showing which parts of the leaf pushed the model toward its answer.
Results reported in the paper
The authors tested LeafXNet on three fruit leaf datasets, grape, watermelon and guava, and compared it with six pretrained image models including Xception, DenseNet and InceptionV3.
- Test accuracy of 100% on watermelon, 99.80% on grape and 97.33% on guava, ahead of all six baselines on every metric.
- Guava shows the widest gap: the best large baselines reached only about 81–82%.
- Size: 0.30MB, against roughly 17 to 84MB for the comparison models.
- Speed: the lowest inference time on all three datasets, measured on a desktop workstation GPU.
Expert check: a senior scientist from a regional horticulture research station scored heat maps for 300 leaf images (100 per crop), and Grad-CAM++ came out best on every criterion.
Limitations
The paper is clear about scope. LeafXNet separates diseased leaves from healthy ones; it cannot tell a disease from a harmless look-alike, and the authors recommend it as decision support, not a standalone diagnosis. The on-device claim is about suitability: the model is small enough for web, mobile and IoT use, but its timings were measured on a workstation, not a phone or a field deployment.
Why it matters
Tiny, explainable models are what make AI usable on a real farm: cheap hardware, no server, and a heat map a grower can check. The next step is field testing on phones with look-alike conditions. Our course on how LLMs and modern AI models work covers the basics behind attention.
