Update README.md
Browse files
README.md
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
---
|
2 |
license: gpl-3.0
|
3 |
---
|
4 |
-
# Potato & Tomato Disease Classification Web Application
|
5 |
|
|
|
6 |
|
7 |
-
### Overview
|
8 |
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.
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
18 |
-
|
19 |
- **Python:** Core programming language used for model development and Flask backend.
|
20 |
- **Flask:** Web framework for developing the web application.
|
21 |
- **PyTorch:** Deep learning framework used to develop and train the models.
|
@@ -23,59 +23,41 @@ This project is a web application developed using Flask that allows users to upl
|
|
23 |
- **PIL (Pillow):** For image processing.
|
24 |
- **OpenCV:** For image display and preprocessing.
|
25 |
- **Torchvision:** For image transformation utilities.
|
|
|
26 |
|
27 |
-
|
28 |
-
### Models
|
29 |
- **Potato Disease Classification Model**
|
30 |
-
- **Classes:**
|
31 |
-
Potato Early Blight,
|
32 |
-
Potato Late Blight,
|
33 |
-
Potato Healthy
|
34 |
-
- **Techniques Used:**
|
35 |
-
- Convolutional layers for feature extraction.
|
36 |
-
- Batch normalization and max pooling for enhanced training stability and performance.
|
37 |
-
- Dropout layers to prevent overfitting.
|
38 |
|
39 |
-
- **
|
40 |
-
- **Classes:**
|
41 |
-
Tomato Early Blight,
|
42 |
-
Tomato Late Blight,
|
43 |
-
Tomato Healthy
|
44 |
- **Techniques Used:**
|
45 |
-
|
46 |
-
|
|
|
47 |
|
|
|
48 |
|
49 |
-
|
50 |
-
- **
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
- **Prediction Logic:** Depending on the selected plant type (potato or tomato), the corresponding model is used to predict the disease class.
|
55 |
-
- **Dynamic Background:** The background image on the frontend changes based on the selected plant type, enhancing user experience.
|
56 |
-
|
57 |
-
- **Frontend**
|
58 |
-
The frontend is developed using HTML and CSS, with Bootstrap for responsive design.
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
63 |
|
64 |
|
65 |
-
|
66 |
-
1. Install the required dependencies using ```pip install -r requirements.txt```.
|
67 |
-
2. Download the pre-trained model weights and place them in the `models/` directory.
|
68 |
-
3. Run the Flask web application using ```python app.py```.
|
69 |
-
4. Access the application in your web browser at `http://localhost:5000`.
|
70 |
|
71 |
-
### Outcome
|
72 |
- **Performance**
|
73 |
- **Potato Model:** Achieved an accuracy of 98% on the validation set, with strong performance in classifying Early Blight, Late Blight, and Healthy leaves.
|
74 |
- **Tomato Model:** Achieved an accuracy of 97% on the validation set, effectively distinguishing between Early Blight, Late Blight, and Healthy leaves.
|
75 |
- **Benefits**
|
76 |
- **Disease Detection:** Helps farmers and agriculturists detect diseases in potato and tomato plants early, potentially preventing crop losses.
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
|
79 |
-
|
80 |
-
![Uploading Screenshot (234).png…](https://huggingface.co/hassaanik/Plant_Disease_Classification/blob/main/Webapp/Screenshot%20(234).png)
|
81 |
-
![Uploading Screenshot (235).png…](https://huggingface.co/hassaanik/Plant_Disease_Classification/blob/main/Webapp/Screenshot%20(235).png)
|
|
|
1 |
---
|
2 |
license: gpl-3.0
|
3 |
---
|
|
|
4 |
|
5 |
+
# Potato & Tomato Disease Classification Web Application
|
6 |
|
|
|
7 |
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.
|
8 |
|
9 |
+
## Features
|
10 |
+
|
11 |
+
- Image Upload: Users can upload images of potato or tomato leaves.
|
12 |
+
- Disease Prediction: The application predicts whether the leaf is healthy or affected by specific diseases.
|
13 |
+
- Dynamic Background: The background image of the web page dynamically changes based on whether the user selects potato or tomato.
|
14 |
+
- Probability Display: The probability of the predicted class is displayed as a percentage.
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
+
## Technologies
|
18 |
+
|
19 |
- **Python:** Core programming language used for model development and Flask backend.
|
20 |
- **Flask:** Web framework for developing the web application.
|
21 |
- **PyTorch:** Deep learning framework used to develop and train the models.
|
|
|
23 |
- **PIL (Pillow):** For image processing.
|
24 |
- **OpenCV:** For image display and preprocessing.
|
25 |
- **Torchvision:** For image transformation utilities.
|
26 |
+
## Models
|
27 |
|
|
|
|
|
28 |
- **Potato Disease Classification Model**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
- **Classes:** Potato Early Blight, Potato Late Blight, Potato Healthy
|
|
|
|
|
|
|
|
|
31 |
- **Techniques Used:**
|
32 |
+
- Convolutional layers for feature extraction.
|
33 |
+
- Batch normalization and max pooling for enhanced training stability and performance.
|
34 |
+
- Dropout layers to prevent overfitting.
|
35 |
|
36 |
+
- **Tomato Disease Classification Model**
|
37 |
|
38 |
+
- **Classes:** Tomato Early Blight, Tomato Late Blight, Tomato Healthy
|
39 |
+
- **Techniques Used:**
|
40 |
+
- Similar architecture to the potato model with appropriate adjustments for tomato disease classification.
|
41 |
+
- Batch normalization, max pooling, and dropout layers are also used here.
|
42 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
- Install the required dependencies using `pip install -r requirements.txt`.
|
45 |
+
- Download the pre-trained model weights and place them in the `models/` directory.
|
46 |
+
- Run the Flask web application using `python app.py`.
|
47 |
+
- Access the application in your web browser at `http://localhost:5000`.
|
48 |
|
49 |
|
50 |
+
## Outcome
|
|
|
|
|
|
|
|
|
51 |
|
|
|
52 |
- **Performance**
|
53 |
- **Potato Model:** Achieved an accuracy of 98% on the validation set, with strong performance in classifying Early Blight, Late Blight, and Healthy leaves.
|
54 |
- **Tomato Model:** Achieved an accuracy of 97% on the validation set, effectively distinguishing between Early Blight, Late Blight, and Healthy leaves.
|
55 |
- **Benefits**
|
56 |
- **Disease Detection:** Helps farmers and agriculturists detect diseases in potato and tomato plants early, potentially preventing crop losses.
|
57 |
+
- **User-Friendly Interface:** The web application provides a simple interface for non-technical users to diagnose plant diseases.
|
58 |
+
|
59 |
+
## App
|
60 |
+
![App Screenshot](https://huggingface.co/datasets/hassaanik/Plant_Disease_App_Images/blob/main/Potato.png)
|
61 |
+
|
62 |
|
63 |
+
![App Screenshot](https://huggingface.co/datasets/hassaanik/Plant_Disease_App_Images/blob/main/Tomato.png)
|
|
|
|