Explainable Tomato and Pepper Leaf Disease Detection Using YOLOv12 and Grad-CAM

Authors

  • Balkis Tej Automatic Signal and Image Processing Research Laboratory, National Engineering School of Monastir, University of Monastir, Monastir, Tunisia.
  • Soulef Bouaafia Laboratory of Condensed Matter and Nanoscience, Faculty of Sciences of Monastir, University of Monastir, Tunisia.  Higher Institute of Applied Sciences and Technology of Kairouan, University of Kairouan, Kairouan, Tunisia
  • Mohamed Ali Hajjaji Research Laboratory in Algebra Numbers Theory and Intelligent Systems,University of Monastir, Tunisia. Higher Institute of Applied Sciences and Technology of Sousse, University of Sousse, Sousse, Tunisia
  • Abdellatif Mtibaa Systems Integration and Emerging Energies Laboratory, National Engineering School of Sfax, University of Sfax, Sfax, Tunisia

DOI:

https://doi.org/10.15837/ijccc.2026.3.7399

Keywords:

object detection, plant disease, YOLO architecture, explainable AI

Abstract

Deep learning–based object detection models have shown strong potential for automated plant disease detection from leaf images. Among these models, YOLO architectures are widely used due to their ability to achieve high detection accuracy while maintaining real-time performance. However, despite these advantages, the adoption of such systems in agricultural practice remains limited. One of the main reasons is that their predictions are often difficult to interpret, which can reduce the confidence of farmers and agricultural experts, who need to understand the basis of model predictions before relying on them for decision-making. To address this issue, this paper proposes an explainable deep learning framework that combines a YOLOv12-based detection model with explainable artificial intelligence techniques. The proposed approach is evaluated on a self-generated dataset of plant leaf images. The experimental results show that the proposed YOLO model achieves satisfactory detection performance, confirming its suitability for plant disease detection tasks. In addition to performance evaluation and to improve transparency, Gradient-weighted Class Activation Mapping is employed to generate visual explanations of the model’s predictions. The resulting heatmaps reveal that the network consistently concentrates on relevant diseased regions of the leaves, indicating that the detection decisions are guided by meaningful visual features. By combining accurate detection performance with visual explanations, the proposed framework aims to provide a more transparent and trustworthy solution for deep learning–based plant disease detection.

References

Romdhane, A.; Riahi, A.; Piro, G.; Lenucci, M.S.; Hdider, C. (2023). Agronomic performance and nutraceutical quality of a tomato germplasm line selected under organic production system, Horticulturae, 9(4), 490, 2023. https://doi.org/10.3390/horticulturae9040490

Ilahy, R.; R'him, T.; Tlili, I.; Hager, J. (2013). Effect of different shading levels on growth and yield parameters of a hot pepper (Capsicum annuum L.) cultivar 'Beldi' grown in Tunisia, Food, 7(Special Issue 1), 32-35, 2013.

Abderrazek, M.B. (2025). Défis et enjeux du secteur de la transformation des tomates en Tunisie, Tunisie Numérique, 2025. Available online: https://www.tunisienumerique.com/ defis-et-enjeux-du-secteur-de-la-transformation-des-tomates-en-tunisie/ (accessed on 16 December 2025).

Gupta, H.K.; Shah, H.R. (2023). Deep learning-based approach to identify the potato leaf disease and help in mitigation using IoT, SN Computer Science, 4(4), 333, 2023. https://doi.org/10.1007/s42979-023-01758-5

Brahimi, M.; Mahmoudi, S.; Boukhalfa, K.; Moussaoui, A. (2019). Deep interpretable architecture for plant diseases classification, in Proceedings of the Signal Processing: Algorithms, Architectures, Arrangements, and Applications (SPA), IEEE, 111-116, 2019. https://doi.org/10.23919/SPA.2019.8936759

Motiejauskas, M.; Dzemyda, G. (2024). Efficientnet convolutional neural network with gram matrices modules for predicting sadness emotion. International Journal of Computers Communications and Control, 19(5). https://doi.org/10.15837/ijccc.2024.5.6697

Kaur, R.; Mittal, U.; Wadhawan, A.; Almogren, A.; Singla, J.; Bharany, S.; Hussen, S.; Rehman, A.U.; Al-Huqail, A.A. (2025). YOLO-LeafNet: a robust deep learning framework for multispecies plant disease detection with data augmentation, Scientific Reports, 15(1), 28513, 2025. https://doi.org/10.1038/s41598-025-14021-z

Alhwaiti, Y.; Khan, M.; Asim, M.; Siddiqi, M.H.; Ishaq, M.; Alruwaili, M. (2025). Leveraging YOLO deep learning models to enhance plant disease identification, Scientific Reports, 15(1), 7969, 2025. https://doi.org/10.1038/s41598-025-92143-0

Talaat, F.M.; Salem, M.; Shehata, M.; Shaban, W.M. (2025). An efficient explainable AI model for accurate brain tumor detection using MRI images, Computer Modeling in Engineering & Sciences (CMES), 144(2), 2025. https://doi.org/10.32604/cmes.2025.067195

Nguyen, D.T.; Bui, T.D.; Ngo, T.M.; Ngo, U.Q. (2025). Improving YOLO-based plant disease detection using αSiLU: a novel activation function for smart agriculture, AgriEngineering, 7(9), 271, 2025. https://doi.org/10.3390/agriengineering7090271

Wang, X.; Liu, J. (2025). TomatoGuard-YOLO: a novel efficient tomato disease detection method, Frontiers in Plant Science, 15, 1499278, 2025. https://doi.org/10.3389/fpls.2024.1499278

Abulizi, A.; Ye, J.; Abudukelimu, H.; Guo, W. (2025). DM-YOLO: improved YOLOv9 model for tomato leaf disease detection, Frontiers in Plant Science, 15, 1473928, 2025. https://doi.org/10.3389/fpls.2024.1473928

Wang, Q.; Yan, N.; Qin, Y.; Zhang, X.; Li, X. (2025). BED-YOLO: an enhanced YOLOv10nbased tomato leaf disease detection algorithm, Sensors, 25(9), 2882, 2025. https://doi.org/10.3390/s25092882

Zheng, X.; Shao, Z.; Chen, Y.; Zeng, H.; Chen, J. (2025). MSPB-YOLO: high-precision detection algorithm of multi-site pepper blight disease based on improved YOLOv8, Agronomy, 15(4), 839, 2025. https://doi.org/10.3390/agronomy15040839

Jun, M.; Wang, K.; Liu, Z.; Fu, K.; Zhu, C.; Li, C.; Wang, Z.; Jia, G. (2025). P-YOLO11: an improved lightweight model for accurate detection of declining trees in poplar plantations, Smart Agricultural Technology, 101454, 2025. https://doi.org/10.1016/j.atech.2025.101454

Özüpak, Y.; Alpsalaz, F.; Aslan, E.; Uzel, H. (2025). Hybrid deep learning model for maize leaf disease classification with explainable AI, New Zealand Journal of Crop and Horticultural Science, 1-23, 2025. https://doi.org/10.1080/01140671.2025.2519570

Karimanzira, D. (2025). Context-aware tomato leaf disease detection using deep learning in an operational framework, Electronics, 14(4), 661, 2025. https://doi.org/10.3390/electronics14040661

Ozturk, O.; Sarica, B.; Seker, D.Z. (2025). Interpretable and robust ensemble deep learning framework for tea leaf disease classification, Horticulturae, 11(4), 437, 2025. https://doi.org/10.3390/horticulturae11040437

Karim, M.J.; Goni, M.O.F.; Nahiduzzaman, M.; Ahsan, M.; Haider, J.; Kowalski, M. (2024). Enhancing agriculture through real-time grape leaf disease classification via an edge device with a lightweight CNN architecture and Grad-CAM, Scientific Reports, 14(1), 16022, 2024. https://doi.org/10.1038/s41598-024-66989-9

Gopalan, K.; Srinivasan, S.; Singh, M.; Mathivanan, S.K.; Moorthy, U. (2025). Corn leaf disease diagnosis: enhancing accuracy with ResNet152 and Grad-CAM for explainable AI, BMC Plant Biology, 25(1), 440, 2025. https://doi.org/10.1186/s12870-025-06386-0

Balkis (2025). Leaf disease dataset, Available online via the Roboflow platform: https://app.roboflow.com/balkis/leaf_disease_dataset-ncmi5/browse?queryText=&pageSize=50&startingIndex=0&browseQuery=true (accessed on 04 December 2025).

Roboflow (2025). Roboflow: computer vision tools for developers and enterprises, Available online: https://roboflow.com (accessed on 07 December 2025).

Guo, D.; Yuan, G.; Liu, B.; Liu, Z.; Fen, L.; Zhang, D.; Wang, Z.; Tan, M.; Luo, D.; Guo, J. (2025). SMA-YOLO: an enhanced architecture for the detection of corn diseases based on YOLOv12, Smart Agricultural Technology, 101502, 2025. https://doi.org/10.1016/j.atech.2025.101502

El-Geneedy, M.; El-Din Moustafa, H.; Khater, H.; Abd-Elsamee, S.; Gamel, S.A. (2025). Advanced real-time detection of acute ischemic stroke using YOLOv12, YOLOv11, and YOLO-NAS: a comparative study for multi-class classification, Scientific Reports, 15(1), 32546, 2025. https://doi.org/10.1038/s41598-025-18997-6

Alif, M.A.R.; Hussain, M. (2025). YOLOv12: a breakdown of the key architectural features, arXiv preprint arXiv:2502.14740, 2025.

Bamaqa, A.; Alahamade, W.O. (2025). A multi-phase framework for enhancing diagnostic accuracy and transparency in renal cell carcinoma grading using YOLOv8 and Grad-CAM, Scientific Reports, 15(1), 35370, 2025. https://doi.org/10.1038/s41598-025-19342-7

Das, P.; Ortega, A. (2022). Gradient-weighted class activation mapping for spatio-temporal graph convolutional networks, in Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), IEEE, 4043-4047, 2022. https://doi.org/10.1109/ICASSP43922.2022.9746621

Miller, C.; Portlock, T.; Nyaga, D.M.; O'Sullivan, J.M. (2024). A review of model evaluation metrics for machine learning in genetics and genomics, Frontiers in Bioinformatics, 4, 1457619, 2024. https://doi.org/10.3389/fbinf.2024.1457619

Additional Files

Published

2026-05-26

Most read articles by the same author(s)

Obs.: This plugin requires at least one statistics/report plugin to be enabled. If your statistics plugins provide more than one metric then please also select a main metric on the admin's site settings page and/or on the journal manager's settings pages.