Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,67 @@
|
|
1 |
-
---
|
2 |
-
license: gpl-3.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: gpl-3.0
|
3 |
+
---
|
4 |
+
---
|
5 |
+
# Potato and Tomato Disease Classification Web Application
|
6 |
+
---
|
7 |
+
|
8 |
+
## Overview
|
9 |
+
This project is a web application developed using Flask that allows users to upload images of potato or tomato leaves and receive predictions regarding potential diseases. The application utilizes two deep learning models: one trained to classify potato leaf diseases and another for tomato leaf diseases. Both models were trained using convolutional neural networks (CNNs) and implemented using PyTorch.
|
10 |
+
|
11 |
+
## Key Features
|
12 |
+
- Image Upload: Users can upload images of potato or tomato leaves.
|
13 |
+
- Disease Prediction: The application predicts whether the leaf is healthy or affected by specific diseases.
|
14 |
+
- Dynamic Background: The background image of the web page dynamically changes based on whether the user selects potato or tomato.
|
15 |
+
- Probability Display: The probability of the predicted class is displayed as a percentage.
|
16 |
+
-
|
17 |
+
## Technologies Used
|
18 |
+
- Python: Core programming language used for model development and Flask backend.
|
19 |
+
- Flask: Web framework for developing the web application.
|
20 |
+
- PyTorch: Deep learning framework used to develop and train the models.
|
21 |
+
- HTML/CSS: For creating the frontend of the web application.
|
22 |
+
- PIL (Pillow): For image processing.
|
23 |
+
- OpenCV: For image display and preprocessing.
|
24 |
+
- Torchvision: For image transformation utilities.
|
25 |
+
-
|
26 |
+
## Models
|
27 |
+
1. Potato Disease Classification Model
|
28 |
+
- Classes:
|
29 |
+
Potato Early Blight
|
30 |
+
Potato Late Blight
|
31 |
+
Potato Healthy
|
32 |
+
- Techniques Used:
|
33 |
+
Convolutional layers for feature extraction.
|
34 |
+
Batch normalization and max pooling for enhanced training stability and performance.
|
35 |
+
Dropout layers to prevent overfitting.
|
36 |
+
|
37 |
+
2. Tomato Disease Classification Model
|
38 |
+
- Classes:
|
39 |
+
Tomato Early Blight
|
40 |
+
Tomato Late Blight
|
41 |
+
Tomato Healthy
|
42 |
+
- Techniques Used:
|
43 |
+
Similar architecture to the potato model with appropriate adjustments for tomato disease classification.
|
44 |
+
Batch normalization, max pooling, and dropout layers are also used here.
|
45 |
+
|
46 |
+
## Web Application
|
47 |
+
- Backend
|
48 |
+
The backend of the application is powered by Flask. It loads the trained models, handles image uploads, processes images, and returns predictions to the frontend.
|
49 |
+
|
50 |
+
-- Model Loading: Both models (potato and tomato) are loaded at the start of the application to minimize latency during prediction.
|
51 |
+
-- Prediction Logic: Depending on the selected plant type (potato or tomato), the corresponding model is used to predict the disease class.
|
52 |
+
-- Dynamic Background: The background image on the frontend changes based on the selected plant type, enhancing user experience.
|
53 |
+
|
54 |
+
- Frontend
|
55 |
+
The frontend is developed using HTML and CSS, with Bootstrap for responsive design.
|
56 |
+
|
57 |
+
-- File Upload Interface: Users can upload an image of a leaf.
|
58 |
+
-- Prediction Display: After processing, the application displays the predicted disease class and the associated probability.
|
59 |
+
-- Dynamic Background: The background image changes depending on whether the user is predicting for potato or tomato.
|
60 |
+
|
61 |
+
## Outcome
|
62 |
+
- Performance
|
63 |
+
-- Potato Model: Achieved an accuracy of 95% on the validation set, with strong performance in classifying Early Blight, Late Blight, and Healthy leaves.
|
64 |
+
-- Tomato Model: Achieved an accuracy of 93% on the validation set, effectively distinguishing between Early Blight, Late Blight, and Healthy leaves.
|
65 |
+
- Benefits
|
66 |
+
-- Disease Detection: Helps farmers and agriculturists detect diseases in potato and tomato plants early, potentially preventing crop losses.
|
67 |
+
-- User-Friendly Interface: The web application provides a simple interface for non-technical users to diagnose plant diseases.
|