0% found this document useful (0 votes)
9 views32 pages

Plant Leaf Disease Classifier Using CNN

The Plant Leaf Disease Classifier utilizes a CNN model to accurately detect and classify various plant leaf diseases from images, providing detailed disease descriptions and treatment suggestions. The system aims to support sustainable agriculture by enabling early disease detection, thus reducing crop losses. Future enhancements include expanding the dataset, integrating mobile applications, and implementing real-time prediction systems.

Uploaded by

anonymous IV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views32 pages

Plant Leaf Disease Classifier Using CNN

The Plant Leaf Disease Classifier utilizes a CNN model to accurately detect and classify various plant leaf diseases from images, providing detailed disease descriptions and treatment suggestions. The system aims to support sustainable agriculture by enabling early disease detection, thus reducing crop losses. Future enhancements include expanding the dataset, integrating mobile applications, and implementing real-time prediction systems.

Uploaded by

anonymous IV
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

PLANT LEAF DISEASE CLASSIFIER

USING CNN

Bsc. CSIT Final year Project Defense


Bhaktapur Multiple Campus, TU
INTRODUCTION
Our Plant leaf disease classifier system offers following
features:

● Automated Disease Detection: Classifies plant leaf


disease based on leaf images with high accuracy.
● Deep Learning-Based Model: Uses a CNN architecture
trained on the PlantVillage dataset for feature extraction
and classification.
● Disease Description & Remedy Suggestions: After
classification, the system also provides detailed
information about the predicted disease along with
recommended treatments and preventive measures.
OBJECTIVES
● To develop a CNN model that can accurately detect and classify common plant leaf
diseases ,such as early blight, late blight, mold, bacteria spot and so on .
● To contribute to sustainable agriculture by providing a cost-effective solution to
identify different plant leaf diseases at an early stage, thereby enabling farmers to
take preventive measures and reduce crop losses.
METHODOLOGY

User-Friendly Image-Based Utilize User Waterfall


Interface Design Disease convolutional Registration and Software
Detection neural networks Profile Development
(CNNs) for the Management Methodology
core prediction
model,
SYSTEM ANALYSIS AND DESIGN
Functional Requirements: Non-Functional Requirements:

1. User Registration: Users must be able to create an 1. Performance: Quick responses to user
account by providing a unique username, password, queries,
and email address. 2. Usability:User friendly interface to
2. User Authentication: Users must be able to log in navigate, even for users with limited
using their registered credentials. technical knowledge.
3. Image Upload: Users must be able to upload 3. Accuracy: High accuracy in disease
images of plant leaves for disease diagnosis. prediction, aiming for an accuracy rate of at
4. Disease Prediction and Remedy: The system must least 90%.
analyze the uploaded images and predict the plant
disease using a trained model.
SYSTEM ANALYSIS

Fig: Use Case Diagram


SYSTEM ANALYSIS

Fig: Class and Object Diagram


SYSTEM ANALYSIS

Fig: Activity Diagram


SYSTEM ANALYSIS

Fig: Sequence Diagram


SYSTEM DESIGN

Frontend Tools
HTML,CSS,JS

Fig:Component Diagram
ALGORITHM DESCRIPTION
Convolutional Neural Network(CNN):

● The project utilizes Convolutional Neural Networks (CNNs) for image-based plant leaf disease
classification.

● CNNs are widely used for image classification tasks due to their ability to extract meaningful patterns.

● The model is trained to classify plant leaf diseases using labeled images.
ALGORITHM DESCRIPTION

Fig: CNN Layer Architecture


ALGORITHM DESCRIPTION
CNN Architecture Used:

1. Convolutional Layers: Detect edges, colors, and textures in leaf images.


2. ReLU Activation Function: Applies non-linearity to prevent the vanishing gradient problem and
speed up training.
3. Batch Normalization: Stabilizes training and accelerates convergence.
4. Pooling Layers: Reduce feature map size while preserving key information.
5. Fully Connected (Dense) Layers: Classify extracted features into specific diseases.
6. Softmax Activation: Converts final outputs into class probabilities.
ALGORITHM DESCRIPTION
1.Convolutional Layer:
It extract key features like edges, textures, and patterns from
images.
How It Works?
➢ Applies filters (kernels) to input images using matrix
multiplications to detect specific
features(edges,textures).
➢ Produces feature maps, highlighting important
regions.
Fig: Convolutional Operation
ALGORITHM DESCRIPTION
2.ReLU Activation:
Helps CNN learn complex patterns and avoids vanishing
gradients.

How It Works?
➔ ReLU replaces negative values with 0 to introduce non-linearity.
➔ Keeps only important features while filtering out noise.
Formula : ReLU(x) = max(0,x)
Fig: Feature map getting mapped
by ReLU function
ALGORITHM DESCRIPTION
3. Batch Normalization: Batch Normalization formula
Speeds up training, prevents overfitting, and ensures stable activations
reducing internal covariate shift.
How It Works?
➔ Normalizes activations to zero mean & unit variance.
➔ Applies learnable parameters γ (scale) and β (shift).
ALGORITHM DESCRIPTION
4. Pooling Layer
Reduces computational complexity while keeping
essential features.

Type of pooling uses in the CNN architecture?


➔ Max Pooling: Selects the highest value in a region.

Figure: Pooling Operation


ALGORITHM DESCRIPTION
5.Fully Connected (Dense) Layers:
A Fully Connected (FC) Layer, also known as a Dense Layer, is a layer
in a neural network where every neuron is connected to every neuron in
the previous and next layer. It transforms the extracted spatial features
into a final decision or prediction.
Why is it Used?
🔹 Converts high-dimensional feature maps into a flat vector for
classification.
🔹 Acts as a classifier after convolution and pooling layers extract
features.
🔹 Enables the network to learn complex relationships between
features.
🔹 Helps in decision-making by assigning weights to different features.
ALGORITHM DESCRIPTION
6.Softmax activation:
● Converts raw output scores (logits) from the network into a probability distribution over classes.
● Enables the model to predict class probabilities, where the sum of all probabilities equals 1.
Mathematical Calculation :-
Where,
zi​: The iiith logit (raw output) from the final layer.
K: Total number of classes.
ALGORITHM DESCRIPTION
Adam optimizer:
Combines Momentum and RMSprop techniques for adaptive
learning.
Efficient for large datasets and complex models, ensuring faster
convergence.

Categorical Cross Entropy:


Used for multi-class classification tasks when labels are one-hot
encoded.
Measures the difference between the true probability distribution y
and the predicted probability distribution Ŷ
IMPLEMENTATION AND TESTING
Tools Used:
Front End: HTML, CSS, Java Script
Backend: Django
Database: SQLITE
IDE: Visual Studio Code
Diagram tool: draw.io
IMPLEMENTATION AND TESTING
Implementation Details of Modules:
1. Authentication Module
● Manages user registration and login securely.
● Ensures unique usernames and credential validation.
● Handles authentication errors and session management.
2. Upload & Prediction Module
● Allows users to upload an image for disease classification.
● Uses a pre-trained CNN model to analyze the uploaded image.
● Fetches disease details (description & remedy) from the database.
IMPLEMENTATION AND TESTING
Unit Testing :
Test ID Description Action Expected Result Actual Result Test Status

UT1 Register with the Open register page then User should be User is registered Pass
correct data provide valid username, registered.
password and email

UT2 Registering with Open register page then User should not be User is not registered Pass
incorrect or already provide taken username, registered
taken username password and email

UT3 Login with correct Open Login /sign in Page, User must be User is successfully pass
data enter valid data and click successfully logged in logged in
signin

UT4 Login with incorrect Enter the correct username User must not be User isn't logged in pass
data and incorrect password and logged in
click sign in.
IMPLEMENTATION AND TESTING
System Testing :

Test ID Test Scenario Expected Result Actual Result Test Status

ST1 User clicks on the Predict Plant Should be redirect to Redirected to image upload Pass
Disease button from home image upload section section
dashboard

ST2 User clicks on the choose file Desired image must be Selected image is uploaded and Pass
option in image upload form uploaded and shown displayed

ST3 User drag and drops the image in Desired image should be Selected image is uploaded and Pass
drag and drop section uploaded and shown displayed

ST4 User clicks on the ‘Predict Disease‘ Prediction result along Prediction result along with Pass
Button with description and description and remedy is
remedy should be displayed
displayed
RESULT ANALYSIS
Our model’s performance was evaluated using a detailed classification report and a confusion matrix,
providing comprehensive insights into its classification capabilities.
1.Classification Report:
The report summarizes key metrics for each class:

○ Precision: Indicates the accuracy of positive predictions; high precision means that when the
model predicts a disease, it is often correct.
○ Recall: Measures the model’s ability to identify all instances of a class; higher recall implies
fewer missed cases.
○ F1-score: The harmonic mean of precision and recall, balancing the two to reflect overall class
performance.
○ Support: Represents the number of actual samples for each class.
RESULT ANALYSIS

Fig: Model’s Classification Report


RESULT ANALYSIS
Confusion Matrix:
This visual tool compares the model’s predictions with the true labels on the test set:
● Diagonal Entries: Show the number of correctly classified instances for each class.
● Off-Diagonal Entries: Reveal misclassifications, indicating which diseases are commonly confused
with others.
By analyzing the confusion matrix, we can pinpoint specific classes with lower recall or higher
misclassification rates, which may benefit from additional data augmentation or model fine-tuning.
RESULT ANALYSIS
LIMITATIONS
The model only classifies diseases from the PlantVillage dataset, limiting its scope to specific crops like
tomato, potato, apple, cherry, orange, and peach.
It cannot detect new or uncommon diseases outside this dataset.
Accuracy depends on input image quality—poor lighting, blurriness, or partial leaves can lead to
misclassification.
Our model trained on controlled datasets may struggle with real-world variations and unseen conditions.
Continuous updates and retraining with diverse agricultural data are necessary for improved performance.
CONCLUSION
The Plant Leaf Disease Classifier using CNN effectively detects and classifies plant diseases with high
accuracy. Trained on a diverse dataset, the model demonstrates strong performance, as validated by accuracy,
precision, recall, and loss curves. Integrated with Django, it enables easy web-based image uploads and real-
time predictions. This project offers a practical solution for early disease detection, helping farmers and
agricultural experts take timely actions to prevent crop loss.
FUTURE RECOMMENDATIONS

● Enhancing the Dataset: Increasing the diversity and volume of training data can further improve the
model’s generalization ability, reducing misclassifications.
● Transfer Learning: Incorporating pre-trained models like EfficientNet or ResNet could enhance
performance while reducing computational costs.
● Mobile Application Integration: Deploying the model in a mobile app would provide farmers and
agricultural professionals with a more accessible tool for disease detection.
● Real-Time Prediction System: Integrating IoT-based smart farming techniques with real-time plant
disease detection could automate the monitoring process.
Thank You !!

Aashish Adhikari (25712/077)


Sudip Dhungana (25773)/077
Sumit Gelal (25774/077)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy