Recognize and classify illnesses on tomato leaves using E�cientNet's Transfer Learning Approach with different size dataset

This study focuses on the remarkable progress made by the agricultural sector in utilizing image processing techniques for early detection and classi�cation of leaf plant diseases. Timely identi�cation of diseases is crucial, but it often poses a challenge for the human eye to discern subtle differences. To address this issue, the researchers propose a novel approach that employs E�cientNet, a deep learning model, to accurately recognize various diseases affecting tomato plant leaves. Transfer learning is applied to three different datasets comprising 3000, 8000, and 10,000 images of diseased tomato leaves. The experimental results demonstrate impressive overall accuracies of 97.3%, 99.2%, and 99.5% when using 3000, 8000, and 10,000 images, respectively, for the detection of common tomato plant diseases. This research underscores the effectiveness of image processing and deep learning techniques in achieving precise and e�cient detection of tomato leaf diseases. It signi�cantly contributes to the advancement of precision agriculture and enhanced crop management practices.


I. Introduction
India's economy depends heavily on the agricultural sector, which generates a sizeable share of both employment and GDP.Plant diseases, on the other hand, present a signi cant problem by impeding organic development and harming leaves, stems, and seeds.It's essential to nd plant diseases early on to boost overall productivity.Specialist manual diagnosis of leaf diseases is antiquated, ineffective, and time-consuming.In order to increase agricultural output, effective methods for plant disease identi cation, particularly through leaf inspection, are crucial.
In order to identify and classify plant leaf diseases, this research provides a machine learning-based strategy using proposed model.The model facilitates the diagnosis and classi cation of plant illnesses by fusing machine learning with digital image processing techniques.By avoiding the problems associated with too large, deep models or high resolutions that may result in ine ciency and parameter saturation, E cientNet offers a more methodical scaling strategy.[9,12,15] The performance evaluation on the testing set utilizing the Plant Village dataset with growing dataset size and the development of a more accurate disease recognition model for tomato plant leaves are the main contributions of this study.This research proposes a novel method that makes use of a public dataset of 10,000 images of healthy and diseased tomato leaves, and with different size in contrast to earlier methods that rely on pre-trained models.On a different test set, the model correctly identi ed nine tomato leaf diseases with a 99.5% accuracy rate.The usefulness and practicality of the suggested approach in detecting illness on tomato plant leaves are strongly supported by these data.
An E cientNet with changes in training layer is used to categorize diseases into one of the classi cations.Using a dataset of tomato leaves, we put our suggested model to the test.It is structured as follows: The Literature Review is included in Section II.Section III looked at the proposed system for recognizing and classifying leaf diseases.Laboratory conditions are covered in Section IV. Results and discussion are included in Section V.The conclusion is covered in Section VI.

II. Literature Review
Numerous studies that have been conducted on identifying leaf diseases were covered in this section.The development of computer-aided leaf disease detection in a range of plants was the focus of this eld's study.Computer vision and machine learning have been widely used by researchers to identify plant leaf disease in earlier years.
Anil A. Bharate [1].In this article, they assess methods developed by several image processing researchers for the purpose of identifying plant diseases.Research on spotting plant diseases early in crops like tomato, apple, grapes, pepper, and pomegranate are covered in this article.
Jayme Garcia Arnal Barbedo [2]This essay analyses each of those di culties, focusing on the issues they could raise along with how they might have impacted earlier suggested solutions.There are a few suggested potential solutions that might perhaps overcome at least some of those di culties, but only under certain circumstances.
J.Nithiswara Reddy [3]With minimal computing effort, the proposed method can greatly support a precise diagnosis of leaf diseases.They developed framework software in Matlab to identify plant leaf diseases by using methods for processing images.The program is intended to enable even a person without prior knowledge of plants or their diseases to spot diseased leaves.By applying k-means clustering, the a icted portion of the plant leaf was located.Obtaining pictures, processing images before segmentation and feature extraction, and SVM classi cation are all included in the diseased recognition section.
Durjoy Sen Maitra [4]This paper aims to demonstrate a feature extraction approach that may accustomed to any character recognition problem.Here, we've demonstrated that a from any other character set, CNN the ability to extract characteristics after being trained on a su ciently big class issue, and the resulting system is still capable of delivering high recognition accuracies.
Nikhil Shah [5]The main goal of the study is to identify the various diseases that affect cotton using an arti cial neural network tool, which applies an image pre-processing approach to pictures.Based on color changes on the image, the main area of the affected leaf is highlighted, and the disease's type is determined using data.T. Rumpf [6] This work's main contribution a process for early diagnosisand isolation of sugar beet illnesses based on spectral vegetation indicators and Support Vector Machines.The objective of the research was to detect infections in sugar beet leaves before visible symptoms appeared.
MiaomiaoJi [7],Thisresearch suggests a hybrid PSO-based ANN model (PSO-ANN) for the problem of soybean diseases identi cation based on the condition of the environment and different features of the soybean, such as the plant stand, the leaves and the seed, etc.
Muzaiyanah Binti Ahmad Supian [8],For the bene t of agriculturalists working in the agrarian industry, this study investigates image processing methods a means to locate and categorization of leaf plant diseases.There are several phases included in it, including acquisition of images, image processing, extraction of features from segments, followed by categorization.Jayme G.A. Barbedo[9],The main elements that in uence this article which examines the construction and performance of deep neural networks used for plant pathology.Realistic conclusions on the topic should result from an extensive analysis of the issue that highlights its bene ts and drawbacks.
Bin Liu [10],This study demonstrates how the picture-generating technique suggested the ability to strengthen the convolutional neural network model and how the suggested deep learning model provides a better option for Disease prevention for apple leaf diseases with more precision and speedier convergence.

Model Scaling
According to the logic, scaling all three dimensions-width, depth, and picture resolution-while taking into account the various resources available, can best increase the model's performance overall.Scaling one dimension can help improve model performance.The compound scaling method is shown in gure.
1. Scaling Convnet-It can be described as modifying the network's dimensions to improve performance based on the most popular de nitions.Depth, width, and resolution make up the dimensions.
2. Compound scaling-The authors of E cientNet suggest starting with a baseline network (N) and concentrating on expanding its length (L), width (C), and resolution (W, H) while maintaining the baseline design.This differs from the typical method of looking for the ideal layer architecture.Thus, choosing the ideal width (w), depth (d), and resolution (r) coe cients within the constraints of the resources available to maximize the accuracy of the network (memory and number of feasible operations (FLOPS)) is the de nition of the optimization issue.
In order to further reduce the search space < L,C,W,H>, the authors also suggested to restrict that all layers must be scaled uniformly using a constant ratio.Thus, the dimensions of the network are de ned as: The compound coe cient Φ, controlled by the user, determines the number of available resources.α, β, and γ are constants found through grid search, which allocate these resources to the network's depth, width, and resolution respectively.
It is also important to mention that the authors noticed that the FLOPS of a regular convolution operation are proportional to d, w², r².Since convolution operations dominate the computation cost in ConvNets, using compound scaling on a Convnet increases the number of FLOPS by (α.β².γ²)Φ, thus the constraint α.β².γ²≈2, to increase the total FLOPS by 2Φ.

E cientNet architecture
Compound scaling, as previously said, enhances the network's width, depth, and resolution rather than altering the operations carried out within a layer of the network.Following is the architecture of the model-

MBConv
Skip connections are used by residual blocks to link a convolutional block's start and nish.The channels are wide at the start of the convolutional block, get smaller as the block depth rises, and then get wider again at the end due to the additional information.Wide->narrow->wide is the pattern for a typical residual block in terms of the number of channels. [18] The pattern of an inverted residual block, however, is the opposite of that of a regular residual block; it means narrow->wide->narrow. MBConv enhances e ciency and adaptability of CNNs for mobile platforms using Depth-wise Separable Convolution.The remaining channels are compressed at the beginning and end of the block using a 1x1 convolution, followed by a 3x3 depth-wise convolution to restrict the parameters.

Squeeze and Excitation (SE) Block
SE is a CNN component that improves interdependencies between channels by dynamic feature channelwise recalibration, giving relevant channels more weight than unimportant ones.View the illustration below.
The following structure is the result of E cientNet applying the SE block along with the MBConv block.The initial component of each network is its stem, after which all architecture experimentation, which is common to all eight models and the top layers, starts.
Following that, each of them has seven blocks.As we progress from E cientNetB0 to E cientNetB7, the number of these blocks' sub-blocks increases, with a different amount being present in each block.The architecture will be built using 5 modules.These modules are then joined to create sub-blocks, which will be utilized in the blocks in a particular manner.[11,21] IV.Experimental Settings The approach was used on a dataset from Plant Village that included 3000, 8000, and 10000 images of ten tomato leaf diseases.The model was created using Python's Keras neural network.Training used 2000, 7000, and 9000 images, while testing used 1000.On Google Colab, the tests were carried out using a GPU and an Intel Core i7-4010U processor.
In this study, we will use the E cientNet on the Plant Village dataset to do multi-class image classi cation.To implement it as a transfer learning model, we have used the E cientNet-B3.The Plant Village dataset is a publically available image data set.The dataset has 10,000 color images, 32x32 in size, divided into Where, the number of positive samples that actually turn out to be positive samples is known as the true positive rate (T p ), whereas the false positive rate (F p ) and false negative rate (F n ), respectively, re ect the number of negative samples that actually turn out to be negative samples.[8,12].
A function is de ned that takes a test generator and an integer test_steps and generates predictions on the test set including a confusion matrix and a classi cation report.[13,18,24] Analysis of Model Performance In order to reduce training time the number of samples per class was limited to 200 images then with 700 images and then nally with 900 images.We could have used the trim function with max_samples = 200 then 700 and then 900 to get different training accuracy.The image size of the original images was 600 X 600 but the model was trained with 200 X 200 images again to reduce training time.Overall the model did well with an average F1 score of 99.5%.We ran for 12 epochs and the validation loss was still decreasing with about a 8% reduction in epoch 12.So we could run more epochs and probably achieve a better F1 score.
Flowchart of Proposed Model Architecture of E cientNet 10 classes with 900 images training & 100 images validation in each category.The 10 different classes represent Bacterial_spot, Early_blight, Late_blight, Leaf_Mold, Septoria_leaf_spot, Spider_mites, Two-spotted_spider_mite, Target_Spot, Tomato_Yellow_Leaf_Curl_Virus, Tomato_mosaic_virus, healthy.There are 9000 training images and 1000 test images in this dataset.V. ResultsModules are imported, images are taken from the Plant Village dataset directory, and the trim function is used to balance the dataset.There are internal generators for training, testing, and validation.There are de ned operations for showing samples, training models, monitoring, charting predictions, Confusion Matrix, and Classi cation Report.A dataframe is trimmed using the max_samples and min_samples for each class in the trim function.Classes with fewer than min_samples images are excluded.The dataset is divided into three groups (2000, 7000, and 9000 photos), and each category is trained independently.Function that shows training imagesThe foundation model should initially not be trainable, according to experts.The model is then ne-tuned by making the underlying model trainable and running extra epochs after training for a certain number of them.It will converge faster and have a lower validation loss.Function that plot the training dataThe Evaluation Index& Predictions on the test set In order to evaluate the performance, average accuracy evaluation index recognized in the eld of image classi cation is used to evaluate the classi cation results, including Precision (PPV), Recall (TPR), F1 Score (F1).PPV = T p /T p + F p (2) TPR = T p /T p + F n (3) F1 = 2 x (PPV x TPR / PPV + TPR)(4)

Figure 8 Sample Image of Training Data Figure 9
Figure 8

Table 1
Comparison of research papersConvolution neural networks can be built up to increase accuracy by adding more layers, and their resource costs are xed.The standard approaches to model scaling, however, are inconsistent.Some models scale in depth, while others scale in width.Some models merely consume higher-resolution images to obtain better results.When models are scaled arbitrarily, it often results in little or no performance improvement and requires extensive human tweaking.E cientNet uses a technique known as compound coe cient to quickly and simply scale up models.Instead of arbitrarily growing width, depth, or resolution, compound scaling consistently scales each dimension with a preset xed set of scaling factors.By combining scaling with AutoML, the developers of E cientNet created seven models in various dimensions that outperformed state-of-the-art convolution neural networks in terms of accuracy and e ciency.

Table 2
Comparison of Results with different size dataset Indian agricultural industry heavily relies on tomato crops, making it crucial to identify and describe their diseases.This research aims to achieve this using a convolutional neural network model, E cientNet, and the Plant Village dataset.The proposed research utilized an E cientNet convolutional neural network model and the Plant Village dataset to identify and describe tomato leaf diseases.The model achieved impressive accuracies of 97.3%, 99.2%, and 99.5% with varying dataset sizes, showing its potential as a low-resource method for disease classi cation.The implementation's simplicity and smaller training images required minimal hardware and fewer parameters, yet delivered comparable results to conventional techniques.Further experiments may explore different learning rates and optimizers to enhance performance. The