The experiment was conducted at MES College Marampally, Aluva, Kerala during the period 2024-25. The dataset used for this study is the Plant Village dataset taken from Kaggle data repository. This paper presents a comprehensive approach to the diagnosis and detection of plant diseases using transfer learning techniques. The overall workflow of the analysis is illustrated in Fig 1. The subsequent subsections provide a detailed, step-by-step explanation of the methodology employed. Based on the survey findings, we selected nine transfer learning models for this comparative study, using the plant village dataset.
Dataset
The Plant Village dataset serves an important role in the field of agricultural computer vision, containing 54,309 images of both healthy and diseased leaves from 14 distinct crops, such as apple, potato, tomato, maize, grape, peach, strawberry, pepper, soybean and so on. Each image is labelled by crop type and disease condition. For every crop, there are images of different diseases as well as healthy samples, making the dataset useful for training and testing deep learning models. For this study, we utilize three subsets of plant village dataset
(Ashmafee et al., 2023), namely apple, potato and peach. The apple dataset comprises 3,181 images split into three disease categories and one healthy group. The potato dataset comprises 3,251 images, grouped into two disease categories and one healthy category. The peach dataset includes 2,657 images organized into one disease category and one healthy group.
Data scaling/resizing
Data scaling is an essential pre-processing step when working with CNNs. This process standardizes all images in the dataset by adjusting their sizes to match the input requirements of the model
(Kumari et al., 2025). Resizing the images before training also helps reduce memory usage, making the training process more efficient
(Shree et al., 2025).
Data augmentation
Image augmentation is a technique used to artificially expand the dataset, enhancing the performance and generalization of the neural network. This method applies various transformations to training images, such as zooming, rotating, shifting, or flipping. In this study, the augmented image generator was implemented using the ImageDataGenerator API in the Keras deep learning framework. Four types of augmentations were applied: rotation, zooming, shearing and horizontal flipping. Data augmentation is applied using rotations of up to 40°, zoom levels of 20%, shear transformations of 20% and horizontal flipping to increase variability in the training dataset.
Data split
After preprocessing the images, the dataset is divided into three subsets: the training set is used for learning patterns and adjusting weights, the validation set helps tune hyperparameters and prevent overfitting and the test set provides a final unbiased evaluation on unseen data. For this study 80% of the images are used for training, 10% for validation and 10% for testing.
Model building and training
For building the model and training the datasets, this study employs transfer learning techniques.
Transfer learning is a technique in deep learning where pre-trained models are used to solve new tasks with limited labelled data. The first step towards using this pretrained model for transfer learning is to remove the final classification layer of the pretrained model and add a new classifier layer at the end and train it on the target dataset. During training, all layers of the pretrained model are frozen and only the newly added classifier layer is trained. As a result, very few parameters are getting trained and therefore, training happens fast. Since most of the pretrained weights are frozen, only the final layer weights are optimized to the new dataset.
Transfer learning architecture
Fig 2 illustrates the general architecture of transfer learning for plant disease detection. It is divided into two main parts:
Pre-trained model
The top section shows a convolutional neural network (CNN) originally trained on the ImageNet dataset. The network consists of convolutional layers for feature extraction and a fully connected dense layer for classification. This pre-trained model has learned general image features, such as edges, shapes and textures, from a large dataset.
Transfer learning for plant disease detection
The lower section shows how the pre-trained CNN is adapted to detect plant diseases. The convolutional layers from the pre-trained model are retained with their learned parameters indicated by Transfer Trained Parameters to leverage the previously learned features. The original fully connected layer is replaced with a new dense layer, which is specifically trained on the plant disease dataset. This new layer classifies images into plant disease class or the plant healthy class.
Transfer learning models
The models used for this study include VGG16, VGG19, ResNet50, ResNet101V2, MobileNetV2, InceptionV3, DenseNet121, InceptionResNetV2 and Xception, all of which are pretrained on ImageNet and subsequently fine-tuned for recognizing plant diseases.
VGG16 and VGG19 are deep CNNs with 16 and 19 layers, using small 3×3 convolutions, max-pooling and fully connected layers, with VGG19 offering more depth for better feature learning
(Sakkarvarthi et al., 2022). ResNet50 introduces residual skip connections, allowing stable training of very deep networks with 50 layers. ResNet101V2, similar to ResNet50 but deeper, enhances representational power while maintaining training stability. InceptionV3
Sakkarvarthi et al., (2022) improves efficiency and accuracy using parallel convolutions, auxiliary classifiers and reduction blocks. InceptionResNetV2 combines Inception modules with residual connections for powerful feature extraction (
Jain and Periyasamy, 2022). Xception extends Inception by replacing standard convolutions with depthwise separable ones for greater efficiency (
Jain and Periyasamy, 2022). MobileNetV2 is designed for lightweight use, employing inverted residual blocks with linear bottlenecks, making it suitable for mobile and edge devices. DenseNet121 connects each layer to all later layers for better gradient flow and feature reuse, achieving high accuracy with fewer parameters (
Jain and Periyasamy, 2022).
The three datasets apple, peach and potato were trained using nine transfer learning models, which has to be tested to evaluate their performance.
Model testing
After training the models using transfer learning, the next step involves model testing to evaluate their performance and generalization capability. During testing, the trained models are applied to unseen images from the apple, potato and peach datasets to determine how accurately they can classify leaves as healthy or diseased. This phase assesses the models’ effectiveness in recognizing various plant diseases based on the features learned during training.
Model evaluation
After testing the model with the new classifier, its performance is evaluated using four key metrics accuracy, precision, recall and F1-score, to assess how effectively it detects plant diseases
(Sakkarvarthi et al., 2022).
Accuracy
Accuracy represents the proportion of correctly classified images out of the total number of samples. In other words, it is the ratio of correct predictions to the total predictions made, as expressed in Equation (1):
Here,
TP= True positives.
TN= True negatives.
FP= False positives.
FN= False negatives.
Precision
Precision is the ratio of correctly classified positive samples (True positives) to the total number of samples predicted as positive. It indicates how many of the identified instances are actually relevant. Precision is computed by dividing the number of true positives by the total predicted positives, as shown in Equation (2):
F1-score
The F1-score is a key evaluation metric in machine learning that provides a single measure of a model’s predictive performance by combining precision and recall, which often have a trade-off between them. The F1-score is computed as shown in Equation (4):