Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassava Leaf Disease Classification #547

Merged
merged 11 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cassava Leaf Disease Classification/Dataset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://drive.google.com/drive/folders/1KLfnDtRlBaVWG_5xMfst-d9M9GhYTLno

Uploaded due to GITHUB limit.
Binary file added Cassava Leaf Disease Classification/Images/1.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.
368 changes: 368 additions & 0 deletions Cassava Leaf Disease Classification/Model/CNN (1).ipynb

Large diffs are not rendered by default.

483 changes: 483 additions & 0 deletions Cassava Leaf Disease Classification/Model/Misc_Models.ipynb

Large diffs are not rendered by default.

276 changes: 276 additions & 0 deletions Cassava Leaf Disease Classification/Model/UnderSampled.ipynb

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions Cassava Leaf Disease Classification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# CASSAVA LEAF DISEASE CLASSIFICATION

## GOAL
Developing various computer vision models to classify leaf diseases.

## DATASET
https://www.kaggle.com/datasets/nirmalsankalana/cassava-leaf-disease-classification

## MODELS USED
- CNN
- VGG16
- Inception
- ResNet50
- AlexNet

## LIBRARIES
- Pandas
- Numpy
- TensorFlow
- OS,Shutil
- Matplotlib
- Scikit-Learn
- Seaborn

## IMPLEMENTATION
1. Load dataset (21,000 entries and 5 columns)
2. Implemented Deep learning models.
3. Applied data augmentation and undersampling of dataset separately for comparison.
4. Alexnet and undersampled models werent trained fully due to computational and time constraints but their expected accuracy is mapped logically.


## Models and Accuracies

| Model | Accuracy | Validation Loss |
| ----------------- |:----------:|:---------------:|
| CNN | 0.70 | 0.808 |
| VGG16 | 0.61 | 0.911 |
| CNN(Data Aug) | 0.66 | 0.865 |
| ResNet | 0.61 | 1.099 |
| InceptionV3 | 0.69 | 0.833 |
| AlexNet | ~0.62 | ~1.000 |
| CNN(Undersampled) | ~0.5 | ~1.00 |


**VISUALISATION**

![Alt Text](./Images/1.png)

EDA Analysis as Bar Graph(Before Undersampling)

![Alt Text](./Images/2.png)

EDA Analysis as Pie Chart(Before Undersampling)

![Alt Text](./Images/Plot.png)

After Effective Undersampling from 17k to 2k ish in last class of mosaic_disease.

![Alt Text](./Images/Example.png)

Example of Mismatch for demonstration purpose.

**CONCLUSION**

CNN Model is the best out of all models(accuracy and validation loss).In this database undersampling and data augmentation were found to not have any significant impact.

**NAME**

Keshav Arora
6 changes: 6 additions & 0 deletions Cassava Leaf Disease Classification/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pandas==1.3.3
matplotlib==3.4.3
numpy==1.21.2
tensorflow==2.6.0
torch==1.9.1
transformers==4.10.3