Skip to main content

Analyzing various CNN architectures for the detection of plant diseases

 

ABSTRACT

 

Diseases in potato plants cause tremendous damage to the yield. CNN constitutes a possible solution for the early detection of early and late blight diseases. This paper does a detailed comparison based on the performance and suitability of a new model and a Pre-Trainemodel   I cont ext of detecting an early blight or a late blight in Potato Crops. This investigation comprises a comparative analysis including their accuracy and loss. Through meticulous testing and training, this study aims to provide cognizance into the efficiency of these architectures the for automated identification of blight diseases in potatoes, important for crop disease management. The images after adequate preprocessing and augmentation (by using techniques such as Random Flip and Random Rotatiofede fed to the five pre-trained models-InceptionV3, ResNet152V2, MobileNetV2, DESNET12,1 and VGG16 neural network architectures and one custom CNN model over a total of 10 epochs; out of which MobileNetV2 gives out the best accuracy of over 99.99%

 

 

KEYWORDS- DeepLearning · Convolutional Neural Networks(CNN) · Hyperparameters · Transfer Learning.



INTRODUCTION

Indian economy’s backbone, agriculture contributes 17% to the nation’s cumulative GDP. It employs an approximate 58% of the nation’s population. Its contribution to the economy rose from 17.8% in the year 2019-20 to 19.9% in the year 2020-21. Crop failures can have serious detrimental effects on the nation. It can shoot up the unemployment rate or lead to food shortages to name a few. Diseases in plants can be caused by various factors: pathogens, soil health, environmental conditions, genetics of the plants, etc. Potato plants are prone to two such diseases that can be detected from their effect on the leaves of the plant. They are called early-blight and late-blight infections . Early-blight is primarily caused by the fungus Alternaria solani. Its symptoms include dark lesions with concentric rings on leaves, starting from lower leaves and progressing upward. Early-blight can result in a loss of the crop up to 30% annually and can affect the storability and the crop quality.



Methodology

4 Methodology

Hence, there’s a growing need for smart methods to diagnose plant diseases  effectively. Currently, various approaches exist to automatically identify these  diseases, reducing human involvement. A thorough review of published papers  exploring methods aiming to detect and categorize leaves by their type, color,  texture, and size using a substantial sample size was conducted. This system’s  outcomes hold potential for automating the tedious jobs of identification, which  is then followed with classification of leaf diseases in agriculture.

4.1 Dataset

The dataset that has been taken is from Kaggle called “PlantVillage” by  Arjun Tejaswi. It has a total of 15 directories within it that contains images of  pepper bell bacterial spots among others that include potato leaves’ im- ages  and tomato leaves’ images. Procurement and extraction of 3 directories,  namely, the directories with potato leaves - ‘Potato Early_blight’ (1000 files),  ‘Potato Late_blight’ (1000 files), ‘Potato healthy’ (152 files) that are early  blight, late blight and healthy potato leaves’ images respectively were done.  Hence, the models were initially feeded a dataset comprising a total of 2152  images.

4.2 Image Preprocessing

Preprocessing was applied for a better feature extraction to improve the classification findings’ consistency. Label Encoding and Categorical transform and fit  was used as well.

4.3 Data Augmentation

To create a robust and reliable model that can easily detect, with utmost  certainty, early and late blight diseases; sophisticated data augmentation  practices were employed to enhance the initial image data available. Two key  techniques, namely Random Rotation and Random Flip were used for the data  augmentation process. Random Rotation applies random ro- tations to the  images during training and hence helps at introducing variability. Similarly,  Random Flip was employed to create mirrored versions of the images by  flipping them horizontally and to add diversity to the data. Furthermore, the  model is trained on images that were deliberately zoomed, tilted and rotated.

 

4.4 CNN Model: GreenNet101

In this research, a custom Convolutional Neural Network (CNN), GreenNet101, was devised  using the Keras Sequential API to analyze images and differentiate between  diseased and healthy leaves of the potato plant. A comparison of this new  method is made with traditional computer learning techniques. Convolutional  and max pooling layers are the first layers in the architecture, and then fully  connected layers come next. A layer that uses resizing and rescaling is used for  preprocessing the input data. Reversed linear unit (ReLU) activation functions  are used in the convolutional layers to introduce nonlinearity. 32 filters with a  kernel size of (3,3) make up the first convolutional layer. Max pooling, with a  pool size of (2,2), comes next. Similar configurations and 64 filters characterize  subsequent convolutional layers.

The network architecture is further enriched by max pooling layers after  each convolutional layer to downsample the spatial dimensions.The output  layer with 'n classes' units and softmax activation for multiclass classification,  a densely linked layer with 64 units and ReLU activation, and flattening the  output are the last layers. During training, the model is optimized using  categorical cross loss, and validation accuracy and loss are monitored to assess  generalization performance. The Adam optimizer is employed, and the model  undergoes training for multiple epochs, with early stopping to prevent  overfitting


Figure 1 illustrates the proposed convolutional neural community (CNN) structure hired for early blight and past due blight detection in potato plants. The input layer accepts RGB potato plant snap shots of length 128x128 pixels. These pics then pass through three convolutional layers, every followed by using a rectified linear unit (ReLU) activation feature and a max pooling layer. The first convolutional layer extracts 8 characteristic maps of length 64x64 pixels, whilst the second and third layers extract 24 and 24 function maps of step by step smaller sizes (48x48 and 16x16 pixels, respectively). These convolutional and pooling layers steadily lessen the spatial dimensions of the function maps at the same time as extracting increasingly more complicated capabilities relevant to blight detection. Finally, a completely related layer with 128 neurons accompanied with the aid of a softmax activation characteristic outputs the anticipated blight magnificence (early blight, overdue blight, or healthy).

                           Fig. 1. CNN Model with detailed convolutional and pooling layers.

 

 

4.5 Model Training Configurations

Hyperparameters:

1.     Number of epochs: Total iterations over the dataset during training.

2.     Early stopping, a practice endorsed to avoid overfitting.  Evaluation Metrics for Performance Assessment:

3.     Accuracy: The proportion of correctly classified instances in a potato blight  detection image dataset.

4.     Loss: A measure of the dissimilarity between predicted and actual classes  in the potato blight image dataset.

5.     Validation Accuracy: The percentage of correctly classified instances on a  separate validation set for potato blight leaves images, indicating model  generalization performance.

6.     Validation Loss: A measure of dissimilarity between predicted and actual  classes on a validation set for potato blight detection images, helping assess  model performance during validation.

 

 

 

4.6 Neural Network Architectures

Transfer learning enables the transferring of the knowledge learnt or gained by an already existing pre-trained model to a new one. It has been used for various  applications like sentiment analysis, text classification, spam email detection,  and many other generic natural language processing and image processing  applications. There are several architectures available. The models chosen  to be analyzed for this study were:

1. InceptionV3

InceptionV3 is a convolutional neural network (CNN) structure comprising  48 layers, at the side of convolutional, pooling, and completely associated  layers. It incorporates Inception modules offering 1x1, 3x3, and 5x5  convolutions and makes use of global common pooling in advance before  the fully connected layers, culminating in approximately 23 million  trainable parameters. Known for its depth and multi-scale feature  extraction, InceptionV3 aims to balance computational efficiency and  accuracy in image classification tasks.

2. RESNET152V2

ResNet152V2 stands out as an advanced form of the ResNet framework,  known for its Residual Neural Networks. With a staggering 152 layers, it  uses special connections to tackle issues with gradients disappearing during  training, making the learning process smoother. By incorporating skip  connections and bottleneck designs, ResNet152V2 achieves top-notch  performance in various computer vision tasks, demonstrating its depth  while also managing the computational load effectively.

3. MobileNetV2

MobileNetV2 is a neural network architecture that is lightweight and finds  its application in mobiles and cell phone devices.It has 53 layers, and it uses  special connections to tackle issues with gradients being divided into  training and testing.It has about

3.4 million parameters and it behaves as an efficient image classifier and  detector.

4. VGG16

VGG16, a CNN architecture, which consists of 16 weight layers, which  features mostly 3X3 convolutional filters stacked on top of each other which  culminates in approx 138 million parameters. It is a simple and uniform  structure which has 5 convolutional blocks followed by fully connected  layers. It is a high computation model due to its depth and parameter count.

5. DenseNet121

DenseNET121 is a convolutional neural network with densely connected  layers.It has 121 layers, which are closely connected and give rise to about 8  million parameters. It reduces redundancy, enhances feature propagation  and it maintains efficiency.

After running 10 epochs of each of the above 5 models and the custom neural  network, the results have been noted into Table 1 as follows.


Table 2. Comparison Of Various CNN Models At The End Of 10 Epochs.

 

Sr. No.

Name

Accuracy

Loss

Validation Accuracy

Validation Loss

 

1.

2.

3.

4.

5.

6.

InceptionV3

RESNET152V2 MobileNetV2

VGG16

DenseNet121 GreenNet101

98.61% 98.84%

99.99%

99.88%

99.88%

98.24%

3.83%

3.98%

0.05%

0.44%

0.77%

5.61% 

90.95%

92.11%

97.22%

96.29%

96.75%

97.40%

31.36%

38.96%

10.4%

12.04%

8.79%

5.21%

 

 

Fig. 3. Plotting InceptionV3’s Training and validation accuracy during the 10 epochs

 


Fig 3 is a graph that indicates the training accuracy and validation accuracy achieved via the Inception V3 version throughout a ten-epoch training run. Training accuracy (orange line) regularly increases over a path of epochs, achieving about 98% accuracy by means of the stop of epoch 10. The validation accuracy (blue line), which shows the model's relevancy, additionally shows a growing fashion. It peaks at round 95% at epoch 8. This hole inside the various 2 traces highlights the importance of validation accuracy for the model's actual basic usual performance.


Fig. 4. Graph of Training and validation accuracy of RESNET152V2 after 10 epoch

Fig 4 is a plot that shows the training accuracy and validation accuracy achieved via the  RESNET152V2 version throughout a ten-epoch training run. Training accuracy (orange line) regularly increases over a path of epochs, achieving about 99% accuracy by means of the stop of epoch 10. The validation accuracy (blue line), which shows the model's relevancy, additionally shows a growing fashion. It peaks at around 94% at epoch 6. Interestingly, the validation accuracy upland after epoch 6, while the training accuracy continues to climb slightly

 

 

Fig. 5. Plot of the Training accuracy and the validation accuracy of the model  MobileNetV2 over 10 epochs

 


Fig 5 is a graph that indicates the training accuracy and validation accuracy achieved via the  MobileNetV2 version throughout a ten-epoch training run. Training accuracy (orange line) regularly increases over a path of epochs, achieving about 99.99% accuracy by means of the stop of epoch 10. The validation accuracy (blue line), which shows the model's relevancy, additionally shows a growing fashion. It peaks at around 95% at epoch 6. Interestingly, the validation accuracy upland after epoch 6, while the training accuracy continues to climb slightly.This observation highlights the importance of careful meta parameters,to optimize the model's  relevancy while maintaining high training accuracy

 

 

Fig. 6. Graph of VGG16’s Training accuracy and validation accuracy over the 10  epoch



 

Fig 6 is a plot that shows the training accuracy and validation accuracy of VGG16 spanning across ten epochs. The training accuracy (orange line) almost always increases along a range of epochs, reaching close to 99% by the tenth epoch. The validation accuracy (blue line) in addition demonstrates an increasing trend showing the model’s relevancy. It reaches about 95% during epoch number six. After the sixth epoch, validation accuracy upland drops after eight; while training and still increases slightly. This implies that model is over fit in respect to lab data hence requiring further tuning for relevance/validation significance

Fig. 7. Graph of Training and validation accuracy of DenseNet121 after 10 epochs

 


Fig 7 is a graph that indicates the training and validation accuracy obtained through the DenseNet121 version over a ten-epoch training run. Training accuracy (orange line) frequently goes up over a route of epochs, hitting practically 99.8% precision at the end of era eight. The growing fashion is also displayed by the blue line as validation accuracy represents relevancy of model. Reaches about 97.4% approximately at epoch 6. Interestingly, the validation accuracy upland after epoch 6 while training continues to gradually improve slightly.

 

Fig. 8. Graph of Training and validation accuracy of custom neural network, GreenNet101,  after 10  epochs

 


Fig 8 is a plot that shows the performance of a custom CNN model for training and validation accuracy after 10 epochs, on early and late blight detection applied to potato plants. The two models show a gradually increasing trend, which gives evidence to the fact that they possess learning capabilities. Validation accuracy is always lower than the training one during the whole process, thus indicating overfitting. Nevertheless, the two curves are very close together to show that there is generality in this model besides lowering concerns about overfitting. These findings therefore offer preliminary evidence of the performance efficacy in distinguishing healthy and diseased potato plants by means of using the proposed CNN architecture.

 

APPLICATIONS OF PLANT PLANT DISEASE DETECTION

 

Field Scouting and Monitoring: CNNs can be deployed to continuously monitor fields, identifying potential disease outbreaks at an early stage.

Precision Agriculture Practices: By providing early disease detection, CNNs can inform targeted application of pesticides or fungicides, minimizing waste and environmental impact.

Crop Yield Prediction: Early disease detection allows for informed decisions about crop management and potential yield forecasts.

Research and Development: CNNs can be used to analyze vast image datasets for faster identification of new plant diseases or studying disease progression.

Educational Tools: Mobile apps with CNN-based disease detection can empower farmers to identify problems in their fields and learn about potential solutions.


CONCLUSION


For many years, plant diseases have been a major problem in precision farming. By making optimal decisions based on the outcomes of DL techniques, precision farming has made it possible to detect diseases early and  minimize losses. New developments in deep learning yield very accurate results, and quick processing has been made possible by hardware being easily available. The decision-making procedure can be enhanced, though. When evaluated in real-world conditions, the models that are now available do not yield results that are up to the mark.This served as motivation, and following up on the authors' earlier research, a novel method for plant disease detection was put forth in an effort to get beyond the main obstacles to its practical application.

The dataset used in the paper contains photos of leaves in their natural surroundings, in diverse weather conditions and at different angles.As a result, the dataset becomes more extensive, which improves the model's classification accuracy and practical utility. However, an insufficient number of instances is a universal problem since it causes overfitting. To address this issue, numerous augmentation strategies were applied.In this paper, a new custom neural network model was created to address the specific challenges in the given domain. The model was meticulously crafted and trained extensively on the same dataset. It gave an accuracy of 98.24% and loss of 5.61% with a validation accuracy of 97.40%  and validation loss of 5.21%.

Finally, the MobileNetV2, a  two-stage design, was presented for detecting plant diseases efficiently. The trained model attained an accuracy of 99.9% and loss of 0.05% with a validation accuracy of 97.22%  and validation loss of 10.4%  on the PlantDisease dataset. The main advantage of using this model is that the user can directly apply this model on their dataset. This model doesn’t have to be built. It is a pre-existing and a pre-trained model. It is easy to use and yields high accuracy with less loss.

Further research should focus on identifying diseases on different locations of the plant as well as at the different stages of the diseases. MobileNetV2 is recommended to identify diseases easily and accurately.

Comments

Popular posts from this blog

Revolutionizing Agriculture: Analyzing Trends in CNN for Plant Disease Detection

Revolutionizing Agriculture: Analyzing Trends in CNN for Plant Disease Detection Introduction: The agricultural sector, a cornerstone of the Indian economy, faces a constant battle against plant diseases that threaten crop health and yield. Traditionally, manual inspection has been the primary method for detecting these diseases, but advancements in technology, particularly Convolutional Neural Networks (CNNs), are revolutionizing this process. In this blog, we delve into the significance of CNNs in plant disease detection, exploring their advantages, methodologies, and the implications for agriculture. Advantages of CNN-based Detection: CNNs offer several advantages over traditional methods: 1. Early Detection: CNNs can identify diseases before visible symptoms appear, enabling timely interventions to prevent widespread damage. 2. Accuracy: With vast datasets, CNNs can achieve higher accuracy in disease identification compared to human inspectors. 3. Automation: CNNs automate the dete...