Skip to content

Commit

Permalink
Merge pull request #779 from Arihant-Bhandari/plant-pathogen
Browse files Browse the repository at this point in the history
[Project Addition] Plant Pathogen Detection using DL
  • Loading branch information
abhisheks008 authored Jun 11, 2024
2 parents e4d0473 + a3e6d69 commit 5da8d60
Show file tree
Hide file tree
Showing 24 changed files with 152 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Plant Pathogen Detection using DL/Dataset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The link for the dataset used in this project: https://www.kaggle.com/datasets/kanishk3813/pathogen-dataset

The dataset consists of 5 subdirectories dealing with Healthy, Virus, Bacteria, Fungi and Pests: each carrying approximately 8000 images totalling to approximately 40000 images.

We downsampled to approximately 1000 images per class totalling to 5000 images.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Plant Pathogen Detection using DL/Images/EDA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions Plant Pathogen Detection using DL/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
## **Plant Pathogen Detection using DL**

### 🎯 **Goal**

The objective of this project is to classify images of Plants into 5 categories: Healthy, Virus, Bacteria, Fungi and Pests.

### 🧵 **Dataset**

The dataset consists of 5 subdirectories dealing with Healthy, Virus, Bacteria, Fungi and Pests: each carrying approximately 8000 images totalling to approximately 40000 images.

We downsampled to approximately 1000 images per class totalling to 5000 images.

### 🧾 **Description**

The project deals with multiclass classification, classifying images of Plants into 5 categories: Healthy, Virus, Bacteria, Fungi and Pests.

### 🧮 **What I had done!**

To achieve our goals, the following steps were implemented:

- Images were loaded using keras.utils and normalized to the range 0 to 1.

- Turned Labels into probability distributions.

- Images were resized to a fixed size of 224x224 pixels.

- Custom and pre-trained models were used for this task.

### 🚀 **Models Implemented**

models used:

- NASNetMobile
- Xception
- VGG16
- CNN
- InceptionV3
- DenseNet-121
- MobileNet

### 📚 **Libraries Needed**

- Keras

- Tensorflow

- Numpy

- Matplotlib

### 📊 **Exploratory Data Analysis Results**


- #### **EDA**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Bacteria.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Fungi.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Pests.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Virus.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Healthy.png" height="400px" width="400px" />
</p>

<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/EDA.png"/>

- #### **DenseNet-121**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/DENSENET121%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/DENSENET121%20Loss.png" height="400px" width="400px" />
</p>

- #### **CNN**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/CNN%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/CNN%20Loss.png" height="400px" width="400px" />
</p>

- #### **InceptionV3**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/InceptionV3%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/InceptionV3%20Loss.png" height="400px" width="400px" />
</p>

- #### **VGG16**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/VGG16%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/VGG16%20Loss.png" height="400px" width="400px" />
</p>

- #### **MobileNet**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/MobileNet%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/MobileNet%20Loss.png" height="400px" width="400px" />
</p>

- #### **NASNetMobile**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/NASNetMobile%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/NASNetMobile%20Loss.png" height="400px" width="400px" />
</p>

- #### **Xception**

<p align="center">
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Xception%20Accuracy.png" height="400px" width="400px" />
<img src="https://github.com/Arihant-Bhandari/DL-Simplified/blob/plant-pathogen/Plant%20Pathogen%20Detection%20using%20DL/Images/Xception%20Loss.png" height="400px" width="400px" />
</p>

### 📈 **Performance of the Models based on the Accuracy Scores**

#### Metrics:

We used Validation **Loss** and **Accuracy** as metrics.

| Models | Accuracy | Loss |
|--------|---------------------|--------------------------|
| NASNetMobile | 94.67% | 0.1586 |
| InceptionV3 | 93.47% | 0.2511 |
| CNN | 91.20% | 0.2696 |
| VGG16 | 97.20% | 0.1099 |
| MobileNet | 97.33% | 0.0917 |
| DenseNet-121 | 97.73% | 0.0754 |
| Xception | 95.20% | 0.1823 |

### 📢 **Conclusion**

We conclude the following:

All models worked exceptionally well on the task, and the ideal models for this are: **Xception**, **VGG16**, **MobileNet** and **DenseNet-121**.

### ✒️ **Your Signature**

Original Contributor: Arihant Bhandari [https://github.com/Arihant-Bhandari]
7 changes: 7 additions & 0 deletions Plant Pathogen Detection using DL/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tensorflow
keras
numpy
skLearn
pandas
matplotlib
seaborn

0 comments on commit 5da8d60

Please sign in to comment.