Traditional tomato disease detection often relies on visual inspection by humans, making the process subjective, time-consuming, and susceptible to inconsistencies. This study proposes an automated image-based tomato leaf disease detection system using an ensemble learning approach that combines a Convolutional Neural Network (CNN) and a Vision Transformer (ViT) to improve classification performance. The model was developed to classify three categories of tomato leaves: Healthy, Leaf Mold, and Septoria Leaf Spot. The dataset was preprocessed through image resizing, normalization, and augmentation to improve model generalization. Predictions from the CNN and ViT models were integrated using a weighted ensemble strategy and deployed as a real-time web-based application using Gradio, enabling users to upload tomato leaf images and receive instant diagnostic results. Performance evaluation was conducted using accuracy, precision, recall, and F1-score. The proposed system achieved an overall accuracy of 81.60%. The model demonstrated excellent performance in identifying Healthy leaves, achieving 100% recall, and showed strong classification capability for Septoria Leaf Spot with an F1-score of 0.84. However, the system exhibited lower performance in detecting Leaf Mold, obtaining a recall of 0.46, indicating that this class remains challenging to distinguish from healthy leaves. Overall, the study demonstrates the feasibility of integrating deep learning models into an accessible diagnostic application while highlighting opportunities for future improvements in ensemble optimization and disease classification performance.
Copyrights © 2026