نوع مقاله : مقاله پژوهشی
عنوان مقاله English
نویسنده English
Accurate and timely detection of tomato leaf diseases is essential for reducing crop losses, improving productivity, and supporting sustainable agriculture. Despite the growing success of deep learning approaches in this field, most existing studies report results based on a single training run and primarily focus on peak accuracy, while neglecting statistical stability. This limitation weakens the reliability and real-world applicability of many proposed models. To address this gap, this study introduces a stability-oriented evaluation framework for a comprehensive comparison of deep learning architectures for tomato leaf disease classification. A baseline convolutional neural network trained from scratch was systematically compared with state-of-the-art transfer learning models from the ResNet, GoogLeNet, EfficientNet, and DenseNet families using a standard benchmark dataset. To ensure a fair and realistic assessment, all models were trained under 25 fully independent runs with random initialization. Performance was evaluated using multiple metrics, including accuracy, precision, recall, F1-score, Matthews correlation coefficient, area under the ROC curve, and the standard deviation of results across repeated runs. The results demonstrate that transfer learning models consistently outperform the baseline CNN not only in terms of average accuracy but also in statistical stability. Among all evaluated architectures, DenseNet-121 achieved the most reliable performance, with a mean accuracy of 0.996 and the lowest standard deviation (0.0011). Qualitative analysis of confusion matrices further confirmed reduced inter-class misclassifications. These findings highlight the importance of multi-run stability analysis for selecting dependable deep learning models in practical smart agriculture systems.
کلیدواژهها English
Tomato (Solanum lycopersicum) is one of the most important agricultural crops worldwide and plays a critical role in food security and agricultural sustainability. However, tomato production is continuously threatened by a wide range of fungal, bacterial, and viral diseases that can significantly reduce yield and quality if not detected at early stages. Timely and accurate disease diagnosis is therefore essential for effective crop management, reduction of economic losses, and minimization of excessive pesticide usage. Conventional disease identification based on visual inspection relies heavily on expert knowledge, is time-consuming, subjective, and often unreliable, particularly when different diseases exhibit visually similar symptoms.
Recent advances in precision agriculture have accelerated the adoption of artificial intelligence and computer vision techniques for automated plant disease detection. Deep learning, and especially convolutional neural networks (CNNs), has demonstrated strong capability in learning discriminative features directly from leaf images. Nevertheless, many existing studies primarily report results from a single training run and focus mainly on accuracy, while overlooking the statistical stability and reliability of model performance. This limitation raises concerns regarding the robustness and practical applicability of proposed models. To address this gap, the present study provides a systematic comparative evaluation of a baseline CNN trained from scratch and several transfer learning architectures, with a particular emphasis on performance consistency across multiple independent runs.
The experiments were conducted using the tomato subset of the publicly available PlantVillage dataset, which includes RGB images of healthy leaves and nine common tomato diseases, namely Bacterial Spot, Early Blight, Late Blight, Leaf Mold, Septoria Leaf Spot, Two‑Spotted Spider Mites, Target Spot, Tomato Mosaic Virus, and Tomato Yellow Leaf Curl Virus. After data refinement, the dataset was divided into training, validation, and test sets following a standard split protocol.
A total of six deep learning models were implemented using the PyTorch framework. These models included a custom Baseline CNN trained from scratch and five transfer learning architectures—ResNet-18, ResNet-34, ResNet50, EfficientNet‑B0, and DenseNet-121—initialized with ImageNet pre-trained weights. All input images were resized to 224×224 pixels and normalized using ImageNet statistics. Data augmentation techniques, including random rotations and horizontal flips, were applied to enhance generalization.
To ensure statistical reliability and reduce the influence of random weight initialization, each model was trained and evaluated under 25 fully independent runs. Model performance was assessed using accuracy, precision, recall, F1-score, Matthews correlation coefficient (MCC), area under the ROC curve (AUC), and confusion matrices. Mean values and standard deviations across the repeated runs were reported to capture both performance level and stability.
The experimental results revealed a pronounced performance gap between the baseline model and transfer learning architectures. The Baseline CNN exhibited clear signs of overfitting and high variability across runs, leading to inferior generalization and unstable classification behavior. In contrast, all transfer learning models achieved substantially higher accuracy and more consistent performance.
Among the evaluated architectures, DenseNet-121 emerged as the most reliable model, achieving the highest average accuracy and F1-score while exhibiting the lowest standard deviation across the 25 independent runs. This indicates a high degree of statistical stability and robustness to random initialization. Qualitative analysis of confusion matrices further showed that DenseNet-121 significantly reduced misclassifications among visually similar disease classes, demonstrating superior class-level discrimination. While other transfer learning models such as ResNet and EfficientNet also delivered strong performance, their variability across runs was slightly higher compared to DenseNet-121.
This study presents a comprehensive and statistically reliable evaluation of deep learning architectures for tomato leaf disease classification. The findings confirm that transfer learning is crucial for achieving both high accuracy and robust generalization in agricultural image analysis. The baseline CNN trained from scratch failed to deliver consistent and dependable results, whereas pre-trained deep architectures showed clear advantages. DenseNet-121, in particular, provided the best balance between classification accuracy and statistical stability across repeated executions. The main contribution of this work lies in highlighting the importance of multi-run stability analysis and qualitative confusion matrix evaluation as essential criteria for selecting reliable models in real-world smart agriculture applications. Future research will explore extending this framework to field-acquired datasets and investigating transformer-based models with an emphasis on improving generalization and stability.
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
there is nothing to disclose.
Data available on request from the authors.
The authors would like to express their sincere appreciation to the Vice-Chancellor for Research of the University of Tehran for the moral support provided during the implementation of this study. The authors also thank the respected reviewers for their constructive structural and scientific comments.
The authors avoided data fabrication, falsification, and plagiarism, and any form of misconduct.
The authors declare no conflict of interest.