
In this Article
APC
Publish With US
Become a Reviewer/Member
Open Access
Products and Services
Support and Policies
Full Research Article
Convolutional Neural Network Architectures for Enhanced Classification of Bacterial Leaf Spot and Early Blight Disease of Tomato using ResNet-101 and VGG16 Models
Submitted16-04-2026|
Accepted04-11-2026|
First Online 21-11-2026|
ABSTRACT
Background: Tomato leaf diseases significantly reduce tomato productivity and economic returns for farmers worldwide. Early and accurate detection of these diseases is essential for effective crop management and yield preservation. Traditional disease identification depends on manual inspection by agricultural experts, which can be time-consuming, subjective and difficult to scale across large farming areas. Recent advancements in deep learning have introduced automated and scalable solutions for plant disease detection. This study presents a comparative analysis of two pretrained CNN architectures, ResNet101 and VGG16, for binary classification of Tomato Bacterial Spot and Tomato Early Blight.
Methods: The dataset used in this study consists of 3,127 labeled tomato leaf images. It was divided into 80% training data (2,501 images), 10% validation data (313 images) and 10% testing data (313 images). Transfer learning was applied using pretrained convolutional backbones for both ResNet101 and VGG16. The convolutional layers were frozen to preserve learned feature representations and custom fully connected classification heads were added for the binary classification task. Model performance was evaluated using accuracy.
Result: ResNet101 demonstrated superior classification performance compared to VGG16. It achieved a test accuracy of 97.44%, indicating strong classification performance. VGG16 achieved a test accuracy of 82.75% under the same test conditions. These findings suggest that the residual architecture of ResNet101 provided better performance than VGG16 for the present binary tomato leaf disease classification task.
KEYWORDS
INTRODUCTION
Disease management in tomato farming traditionally depends on routine field scouting and expert-based visual diagnosis. Farmers inspect leaves for visible symptoms such as lesions, discoloration, or necrotic patterns (Mohammad et al., 2026; Özçelik et al., 2026; Paek et al., 2026; Souza et al., 2026; Sriram and Kumari, 2026). While this method is practical, it often leads to delayed or inaccurate identification, especially when symptoms overlap between diseases or appear at early stages (Jain et al., 2019; Trivedi et al., 2021). Misdiagnosis can result in improper pesticide use, increased production costs and environmental harm. Furthermore, large-scale farms and resource-limited regions may lack timely access to plant pathology expertise. These limitations emphasize the need for intelligent and automated disease detection systems that can assist farmers in real-time decision-making (Zhang et al., 2024; Kumar et al., 2026; Kim, 2026).
Advances in computer vision and artificial intelligence have opened new possibilities for precision agriculture. Machine learning and artificial intelligence are increasingly being applied in agriculture for data-driven decision-making and automated detection of agricultural pests and diseases, providing opportunities to improve crop monitoring, productivity and sustainable farm management (Taqvi, 2025). Deep learning, particularly convolutional neural networks (CNNs), has transformed image analysis by enabling models to learn discriminative features directly from raw pixel data. CNN-based approaches have achieved high performance in plant disease recognition tasks, often surpassing traditional machine learning methods that rely on handcrafted features (Gehlot and Saini, 2020; Kunduracioglu, 2024). Deep learning-based computer vision has demonstrated considerable potential for automated agricultural disease detection, with CNN architectures such as ResNet achieving high classification accuracy even under complex real-field conditions (Nirgude and Rathi, 2021). However, training deep networks from scratch typically requires large annotated datasets, which are not always available in agricultural applications. Transfer learning addresses this challenge by adapting pretrained models to domain-specific tasks. Models trained on large-scale datasets such as ImageNet capture general visual features that can be fine-tuned for agricultural image classification (Akhand, 2026). Among established CNN architectures, VGG16 and ResNet101 are frequently used due to their proven performance and availability of pretrained weights. VGG16 employs a straightforward deep architecture with stacked convolutional layers, whereas ResNet101 introduces residual connections that facilitate the training of very deep networks and improve gradient flow (Chettri et al., 2026).
Given these architectural differences, evaluating their effectiveness in tomato leaf disease classification is essential. This study adopts a comparative approach to assess the performance of ResNet101 and VGG16 under identical data splits and hyperparameter settings. The goal is to determine which architecture offers greater accuracy and reliability for binary classification of bacterial spot and early blight. Such findings can support the development of robust, AI-driven tools for sustainable tomato production and precision crop monitoring.
MATERIALS AND METHODS
The dataset used in this study was obtained from the plant Village repository, focusing exclusively on tomato leaf images. The use of the plant village dataset provided standardized images for controlled model comparison; however, the controlled imaging conditions may not fully represent natural field environments. This limitation was considered when interpreting the practical applicability of the findings. Only tomato samples were selected to ensure task-specific evaluation and model consistency.
The dataset included images of tomato bacterial spot and tomato early blight, representing two common and visually distinguishable foliar diseases. These images represent visually distinguishable symptoms associated with each disease class. To ensure reliable model evaluation, the dataset was randomly shuffled and divided into training, validation and testing subsets using an 80:10:10 ratio. The training set contained 2,501 images and was used for model learning. The validation set included 313 images and was used for hyperparameter tuning and monitoring model performance during training. The testing set also consisted of 313 images and was reserved for final performance evaluation. This structured split ensured unbiased assessment and minimized data leakage between subsets. Fig 1 displays the possible diseases in tomato.
Data preprocessing
All images were resized to 224 x 224 pixels to match the input requirements of the pretrained convolutional neural network architectures. A batch size of 32 was used during training to balance computational efficiency and memory usage. The label mode was set to categorical to support binary classification using softmax activation. A fixed random seed value of 42 was applied to maintain reproducibility of results. Data augmentation techniques were applied to both models to improve generalization performance. These included horizontal flipping, random rotation with a factor of 0.1 and random zoom with a range of 0.1. These transformations increased variability in the training data and reduced the risk of overfitting.
Model architectures
ResNet101 architecture
ResNet101 is a deep convolutional neural network that introduces residual connections to address the vanishing gradient problem in very deep models. Instead of directly learning a mapping H (x), the network learns a residual function F (x) = H (x) - x, which reformulates the original mapping as H (x) = F(x) + x. This identity shortcut connection allows gradients to propagate more effectively through deep layers and improves convergence during training. In this study, ResNet101 was initialized with pretrained ImageNet weights and the top classification layers were removed by setting include_top=False. A Global Average Pooling layer was applied to convert feature maps into a single feature vector, computed as:
Where,
H and W = Spatial dimensions.
The final dense layer contained two neurons with softmax activation defined as:
For binary classification. The model was optimized using the Adam optimizer with a learning rate of 5 x 10-5 and categorical crossentropy loss was used. Training was conducted for 25 epochs with early stopping (patience = 5) and the convolutional base was frozen to preserve pretrained features. Fig 2 shows the architecture of the ResNet 101 model.
VGG16 architecture
VGG16 is a classical deep CNN composed of sequential stacked convolutional layers using small 3 x 3 kernels (Fig 3). Each convolution operation is expressed as Y = W * X + b, where represents the filters, the input and the bias term. Non-linearity is introduced using the ReLU activation function defined as:
In this study, VGG16 was initialized with pretrained ImageNet weights and the convolutional base was frozen during training. A Global Average Pooling layer was added, followed by a dropout layer with rate 0.5 to reduce overfitting, where dropout can be expressed as:
The final dense layer contained two neurons with softmax activation for binary classification. Optimization was performed using Adam with a learning rate of 5 x 10-5 and the model was trained for 25 epochs. The architecture consisted of approximately 14.7 million total parameters, of which 1,026 were trainable.
Evaluation metrics
To comprehensively evaluate the performance of the proposed models, several standard classification metrics were used. These metrics provide a balanced assessment of model effectiveness, especially for binary classification tasks.Accuracy measures the overall proportion of correctly classified samples and is defined as:
Where,
TP and TN = true positives and true negatives.
While and denote false positives and false negatives.Precision evaluates the proportion of correctly predicted positive samples among all predicted positives
Recall, also known as sensitivity, measures the proportion of actual positive samples correctly identified
The F1-score provides a harmonic mean of precision and recall and is defined as:
RESULTS AND DISCUSSION
In contrast, VGG16 exhibited comparatively weaker training dynamics. The model achieved a final training accuracy of approximately 72%, which is significantly lower than that of ResNet101. Its best validation accuracy reached 82.74%, but the validation loss remained noticeably higher than that of ResNet101 throughout training. The learning curves showed slower progression and the model’s performance plateaued at an earlier stage. This indicates reduced feature learning efficiency under identical hyperparameter settings. Overall, ResNet101 demonstrated superior convergence behavior, lower validation loss and stronger generalization performance compared to VGG16.
A direct comparison of both confusion matrices clearly highlights the performance gap between ResNet101 and VGG16 (Table 1). ResNet101 demonstrates stronger diagonal dominance, indicating more accurate class predictions and fewer misclassifications. In contrast, VGG16 shows a higher number of off-diagonal values, particularly for the Early Blight class, where misclassification is more prominent.
ResNet101 correctly classified 208 Bacterial Spot and 97 Early Blight samples, with very few errors (2 and 6 respectively). VGG16 correctly classified 193 Bacterial Spot and only 66 Early Blight samples, while producing 17 and 37 misclassifications respectively. The higher false negatives for Early Blight in VGG16 suggest weaker feature discrimination and lower recall for that class.
The comparative analysis of ResNet101 and VGG16 demonstrates that ResNet101 achieves superior and more balanced performance across both tomato disease classes (Table 2). For Bacterial Spot, both models attain very high recall (0.9905), indicating strong capability in identifying actual infected samples. However, ResNet101 shows higher precision (0.9720) compared to VGG16 (0.8490), resulting in a better F1-score (0.9811 vs. 0.9143). This indicates that while both models detect most positive cases, VGG16 produces more false positives. For Early Blight, the performance gap becomes more significant. Although VGG16 achieves high precision (0.9706), its recall drops substantially to 0.6408, meaning it misses a considerable number of actual Early Blight cases. Consequently, its F1-score decreases to 0.7719. In contrast, ResNet101 maintains both high precision (0.9798) and strong recall (0.9417), yielding a robust F1-score of 0.9604. Overall, ResNet101 demonstrates better generalization and class balance, making it more reliable for accurate and consistent disease classification compared to VGG16.
The comparative analysis of tomato leaf disease classification studies indicates that most approaches achieved high accuracy using deep learning architectures on the PlantVillage dataset. However, performance obtained using controlled datasets should be interpreted cautiously because PlantVillage images generally have more uniform backgrounds and imaging conditions than natural field images. Therefore, high performance in the present study does not necessarily indicate equivalent performance under variable field conditions.
Guerrero-Ibañez and Reyes-Muñoz (2023) reported the highest performance by combining a 4-layer CNN with GAN-based augmentation using both PlantVillage and real field images, demonstrating that synthetic data generation can enhance robustness and reduce overfitting. Trivedi et al., (2021) employed an 8-layer deep neural network on the plant village tomato dataset and achieved strong performance, highlighting the effectiveness of deeper architectures for early disease detection.
In comparison, the present study utilized transfer learning with ResNet101 and VGG16 on a binary tomato dataset. The models were compared under the same dataset partition, preprocessing procedure, augmentation strategy and training conditions. ResNet101 and VGG16 were selected to represent two different CNN design strategies: VGG16 uses a conventional sequential convolutional architecture, whereas ResNet101 incorporates residual connections that facilitate learning in a substantially deeper network. This controlled comparison enabled the influence of architectural design on binary tomato disease classification performance to be examined.
ResNet101 achieved higher test accuracy and more balanced class-level performance than VGG16. However, these findings are limited to the present PlantVillage-based dataset and should not be generalized directly to field conditions without external validation. Future studies should therefore evaluate the models using field-collected images containing variations in illumination, background complexity, leaf orientation, disease severity and image acquisition conditions.
CONCLUSION
ACKNOWLEDGEMENT
This research received no external funding.
Authors’ contributions
All authors contributed toward data analysis, drafting and revising the paper and agreed to be responsible for all the aspects of this work.
Disclaimers
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.
Data availability
The data analysed/generated in the present study will be made available from corresponding authors upon reasonable request.
Availability of data and materials
Not applicable.
Use of artificial intelligence
Not applicable.
Declarations
Authors declare that all works are original and this manuscript has not been published in any other journal.
CONFLICT OF INTEREST
REFERENCES
- Adhikari, P., Adhikari, T.B., Louws, F.J. and Panthee, D.R. (2020). Advances and challenges in bacterial spot resistance breeding in tomato (Solanum lycopersicum L.). International Journal of Molecular Sciences. 21(5): 1734. https://doi. org/10.3390/ijms21051734.
- Akhand, A.S. (2026). A comparative study of custom CNNs, pre- trained models and transfer learning across multiple visual datasets. arXiv (Cornell University). https://doi.org/10. 48550/arxiv.2601.02246.
- Beg M.A., Ziya R., Mansoor F., Rahman S., Imtiyaz M. and Beg M.J. (2025). In vitro antifungal activity of weed plants of Eastern Uttar Pradesh against Fusarium oxysporum f. lycopersici (Sacc.) Snyder and Hansen. Bulletin of Pure and Applied Sciences-Botany. 44B(1): 23-29. https://bpasjournals. com/botany/index.php/journal/article/view/137/129.
- Chettri, K., Sen, B. and Ghosal, P. (2026). Deep learning for precision agriculture: A systematic review of methods, challenges and future directions. Knowledge and Information Systems. 68(1). https://doi.org/10.1007/s10115-025-02625-w.
- Cho, O.H. (2024). Machine learning algorithms for early detection of legume crop disease. Legume Research. 47(3): 463- 469. doi: 10.18805/LRF-788.
- Food and Agriculture Organization of the United Nations (FAO). (2022). FAOSTAT: Food and agriculture data. FAO, Rome, Italy.
- Gehlot, M. and Saini, M.L. (2020). Analysis of different CNN architectures for tomato leaf disease classification. In Proceedings of the 2020 5th IEEE International Conference on Recent Advances and Innovations in Engineering (ICRAIE) (pp. 1-6). IEEE. https://doi.org/10.1109/ICRAIE51050.2020. 9358279
- Guerrero-Ibañez, A. and Reyes-Muñoz, A. (2023). Monitoring tomato leaf disease through convolutional neural networks. Electronics. 12(1): 229. https://doi.org/10.3390/electronics12010229.
- Jain, A., Sarsaiya, S., Wu, Q., Lu, Y. and Shi, J. (2019). RETRACTED ARTICLE: A review of plant leaf fungal diseases and its environment speciation. Bioengineered. 10(1): 409-424. https://doi.org/10.1080/21655979.2019.1649520.
- Kim, S.Y. and AlZubi, A.A. (2024). Blockchain and artificial intelligence for ensuring the authenticity of organic legume products in supply chains. Legume Research. 47(7): 1144-1150. doi: 10.18805/LRF-786.
- Kim, T. (2026). Wild animal tracking for effective wildlife conservation using YOLOv8 and machine learning technologies. Indian Journal of Animal Research. 60(6): 1080-1087. doi: 10. 18805/IJAR.BF-2054.
- Kumar, S., Sharma, Y.K., Kumar, M., Lilhore, U.K., Aldossary, S.M.A., Simaiya, S., Khan, M.M., Hussien, S.A. and Ghith, E.S. (2026). A hybrid deep learning and fuzzy logic framework for robust tomato disease detection and classification. Scientific Reports. https://doi.org/10.1038/s41598-026- 36524-z.
- Kunduracioglu, I. (2024). Utilizing ResNet architectures for identification of tomato diseases. Journal of Intelligent Decision Making and Information Science. 1: 104-119. https://doi.org/10. 59543/jidmis.v1i.11949.
- Mohammad, A.A.S., Mohammad, S.I., Vasudevan, A. and Heindric, A. (2026). Intelligent decision support system for crop management using data analytics. Journal of Experimental Biology and Agricultural Sciences. 14(3): 9-14. https:// jebas.org/ojs/index.php/jebas/article/view/3796.
- Nirgude, V. and Rathi, S. (2021). A robust deep learning approach to enhance the accuracy of pomegranate fruit disease detection under real field condition. Journal of Experimental Biology and Agricultural Sciences. 9(6): 863-870. https:// doi.org/10.18006/2021.9(6).863.870.
- Özçelik, H., Saðlam, B. and Öcal, A.S. (2026). New natural methods for combating mold fungi in agricultural products: The Isparta example. Bulletin of Pure and Applied Sciences- Botany. 45B(2): 1-17. https://bpasjournals.com/botany/ index.php/journal/article/view/174/150.
- Paek, J.J., Kim, J., Bae, S., Paek, K. and Lee, Y. (2026). Chive-fortified fermentation enhances gamma-aminobutyric acid production by Levilactobacillus brevis PL9014. International Journal of Probiotics and Prebiotics. 21(1): 1-6. https://doi.org/ 10.37290/ijpp.v21i1.12.
- Panno, S., Davino, S., Caruso, A.G., Bertacca, S., Crnogorac, A., Mandic, A., Noris, E. and Matic, S. (2021). A review of the most common and economically important diseases that undermine the cultivation of tomato crop in the Mediterranean basin. Agronomy. 11(11): 2188. https:// doi.org/10.3390/agronomy11112188.
- Panthee, D.R., Pandey, A. and Paudel, R. (2024). Multiple foliar fungal disease management in tomatoes: A Comprehensive approach. International Journal of Plant Biology. 15(1): 69-93. https://doi.org/10.3390/ijpb15010007.
- Souza, K.F., Gonçalves, L.C.O. and Espindola, F.S. (2026). A broad overview of the multifaceted royal jelly and its applicability in health and performance. Current Topics in Nutraceutical Research. 24(1): 4-14. https://doi.org/10.37290/ctnr.v2 4i1.8.
- Sriram, P. and Kumari, Y. S. (2026). Game theory in urban birds: A Nash equilibrium analysis using crows and pigeons. Bio- Science Research Bulletin. 42(1): 1-6. https://bpasjournals. com/life-sciences/index.php/journal/article/view/150/140.
- Taqvi, S. (2025). Data-driven agricultural development in Assam through machine learning. Journal of Artificial Intelligence in Agriculture and Applied Research. 1(1): 34-48. https:// agrpjournals.com/journals/journal/index.php/jaiaar/article/ view/7/6.
- Trivedi, N.K., Gautam, V., Anand, A., Aljahdali, H.M., Villar, S.G., Anand, D., Goyal, N. and Kadry, S. (2021). Early detection and classification of tomato leaf disease using high-performance deep neural network. Sensors. 21(23): 7987. https://doi. org/10.3390/s21237987.
- Zhang, X., Vinatzer, B.A. and Li, S. (2024). Hyperspectral imaging analysis for early detection of tomato bacterial leaf spot disease. Scientific Reports. 14(1): 27666. https://doi.org/ 10.1038/s41598-024-78650-6.
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.
This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.