Hybrid Deep Learning and Machine Learning Framework for Automated Tomato Leaf Disease Classification
Main Article Content
Abstract
Tomato leaf diseases significantly impact crop productivity, necessitating accurate and efficient diagnostic tools. This study proposes a hybrid framework that integrates deep learning-based localization and segmentation with handcrafted feature extraction and classical machine learning for tomato leaf disease classification. Specifically, YOLOv8 is used for object detection and SAM for segmenting diseased regions. Features are then extracted using HSV color space, GLCM, and LBP descriptors. To address class imbalance, the SMOTE technique was applied, expanding the original 48,243 image dataset to 102,465 balanced samples across 11 disease categories. Multiple classifiers were evaluated, with Random Forest achieving the highest performance over 90% accuracy and a macro F1-score of 0.90. Importantly, recall for minority classes improved markedly after balancing. The proposed system demonstrates strong potential for deployment in real-world agricultural environments due to its low computational cost and robustness under varying conditions. Future work will explore multi-crop generalization, real-time inference, and eld validation under challenging conditions such as lighting variation and occlusion.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
References
A. Das, F. Pathan, J. R. Jim, M. M. Kabir and M. Mridha, “Deep learning-based classification, detection, and segmentation of tomato leaf diseases: A state-of-the-art review,” Artificial Intelligence in Agriculture, vol. 15, no. 2, pp. 192–220, 2025. [Online]. Available: https://www.sciencedirect.com/ science/article/pii/S258972172500025X
M. Shahid, U. B. Singh, T. Ilyas, D. Malviya, S. K. Vishwakarma, Z. Shafi, B. Yadav and H. V. Singh, “Bacterial inoculants for control of fungal diseases in solanum lycopersicum l.(tomatoes): a comprehensive overview,” Rhizosphere microbes: biotic stress management, pp. 311–339, 2022.
S. N. Ong, S. Taheri, R. Y. Othman and C. H. Teo, “Viral disease of tomato crops (solanum lycopesicum l.): an overview,” Journal of Plant Diseases and Protection, vol. 127, pp. 725–739, 2020.
A. Bhargava, A. Shukla, O. P. Goswami, M. H. Alsharif, P. Uthansakul and M. Uthansakul, “Plant Leaf Disease Detection, Classification, and Diagnosis Using Computer Vision and Artificial Intelligence: A Review,” in IEEE Access, vol. 12, pp. 37443-37469, 2024.
L. C. Ngugi, M. Abelwahab and M. AboZahhad, “Recent advances in image processing techniques for automated leaf pest and disease recognition–a review,” Information processing in agriculture, vol. 8, no. 1, pp. 27–51, 2021.
N. V. Hung, N. A. Quan, N. Tan, T. T. Hai, D. T. Trung, L. M. Nam, B. T. Loan and N. T. T. Nga, “Building predictive smell models for virtual reality environments,” Computer Science and Automation, vol. 24, no. 2, pp. 556–582, 2025.
H. Tian, T. Wang, Y. Liu, X. Qiao and Y. Li, “Computer vision technology in agricultural automation—a review,” Information processing in agriculture, vol. 7, no. 1, pp. 1–19, 2020.
R. S. L. Kakarla et al., “An implementation and design framework of disease detection and prediction of tomato plant leaves using gray level cooccurrence and convolutional neural networks,” International Information and Engineering Technology:Revue d’Intelligence Artificielle, vol. 38, no.2, pp. 603-611, 2024.
S. A. Kumar and S. Sasikala, “Disease Detection in Tomato Leaves using Machine Learning and Statistical Feature Fusion,” 2021 International Conference on Advancements in Electrical, Electronics, Communication, Computing and Automation (ICAECA), Coimbatore, India, pp. 1-6, 2021.
S. Sladojevic, M. Arsenovic, A. Anderla, D. Culibrk and D. Stefanovic, “Deep neural networks based recognition of plant diseases by leaf image classification,” Computational intelligence and neuroscience, vol. 2016, no. 3289801, 2016.
J. G. A. Barbedo, “Digital image processing techniques for detecting, quantifying and classifying plant diseases,” SpringerPlus, vol. 2, no. 1, pp. 1–11, 2013.
K. P. Ferentinos, “Deep learning models for plant disease detection and diagnosis,” Computers and Electronics in Agriculture, vol. 145, pp. 311–318, 2018.
A. Kamilaris and F. X. Prenafeta-Bold´u, “Deep learning in agriculture: A survey,” Computers and Electronics in Agriculture, vol. 147, pp. 70–90, 2018.
S. U. Islam, G. Ferraioli and V. Pascazio, “Tomato leaf detection, segmentation, and extraction in real-time environment for accurate disease detection,” AgriEngineering, vol. 7, no. 4, p. 120, 2025.
A. Bochkovskiy, C.-Y. Wang and H.-Y. M. Liao, “Yolov4: Optimal speed and accuracy of object detection,” in arXiv preprint arXiv:2004.10934, 2020.
A. Kirillov et al., “Segment anything,” arXiv preprint arXiv:2304.02643, 2023.
H. P, C. MK, L. RH, R. C, S. K. G and S. K, “Thermal canopy segmentation in tomato plants: A novel approach with integration of yolov8-c and fastsam,” Smart Agricultural Technology, vol. 10, p. 100806, 2025. [Online]. Available: https://www.sciencedirect.com/ science/article/pii/S2772375525000401
Y. Li, D. Wang, C. Yuan, H. Li and J. Hu, “Enhancing agricultural image segmentation with an agricultural segment anything model adapter,” Sensors, vol. 23, no. 18, 2023. [Online]. Available: https://www.mdpi.com/1424-8220/23/ 18/7884
S. A. A. Qadri, N. -F. Huang, T. M. Wani and S. A. Bhat, “Advances and Challenges in Computer Vision for Image-Based Plant Disease Detection: A Comprehensive Survey of Machine and Deep Learning Approaches,” in IEEE Transactions on Automation Science and Engineering, vol. 22, pp. 2639-2670, 2025.
A. ALIMAGNIDOKPO, “Tomato leaf disease detection using yolov8,” https: //github.com/Arix-ALIMAGNIDOKPO/ Tomato-Leaf-Disease-Dection-using-Yolov8, 2023, accessed: 2025-10-16.
F. Research, “segment-anything-2,” https://github.com/facebookresearch/ segment-anything-2, 2024, accessed: 2025-1016.
C. Cortes and V. Vapnik, Support-vector networks. Springer, 1995, vol. 20, no. 3.
T. Cover and P. Hart, “Nearest neighbor pattern classification,” in IEEE Transactions on Information Theory, vol. 13, no. 1, pp. 21-27, January 1967.
L. Breiman, “Random forests,” Machine learning, vol. 45, no. 1, pp. 5–32, 2001.
I. Rish, An empirical study of the naive Bayes classifier, 2001, vol. 3, no. 22.
M. Gehlot, R. K. Saxena, and G. C. Gandhi, “tomato-village”: a dataset for end-to-end tomato disease detection in a real-world environment,” Multimedia Systems, vol. 29, no. 6, pp. 3305–3328, 2023.
H. Nguyen, T. N. Dao, N. S. Pham, T. L. Dang, T. D. Nguyen and T. H. Truong, “An accurate viewport estimation method for 360 video streaming using deep learning,” EAI Endorsed Trans. Ind. Networks Intell. Syst., vol. 9, no. 4, p. e2, 2022.
S. P. Mohanty, D. P. Hughes and M. Salath´e, “Using deep learning for image-based plant disease detection,” Frontiers in plant science, vol. 7, p. 01419, 2016.
H. F. Nweke, Y. W. Teh, M. A. Al-Garadi and U. R. Alo, “Machine learning for cognitive internet of things: A survey,” in IEEE Access, vol. 6, pp. 35794–35817, 2018.