PlantLeafDiseaseDetection
PlantLeafDiseaseDetection copied to clipboard
Deep learning using CNN in tensorflow on Kaggle image dataset containing 87,900 different healthy and unhealthy crop leaves spanning 38 unique classes.
Plant Leaf Disease Detection
Deep learning using tensorflow on image dataset containing different healthy and unhealthy crop leaves.
Dataset
The dataset for this project can be downloaded from:
This dataset consists of 87,900 images of leaves spanning 38 classes. Each class denotes a combination of the plant the leaf is from and the disease (or lack thereof) present in the leaf. All images are 256*256 in resolution.
The dataset is divided into three parts as follows:
- train - 70,295 images divided into 38 classes with 1,642 to 2,022 images per class.
- valid - 17,572 images divided into 38 classes with 410 to 505 images per class.
- test - 33 images (These images are not divided into their respective classes but the class can be inferred from the image filename)
Project Requirements
The external libraries required for running Train.ipynb are:
- numpy
- pandas
- matplotlib
- sklearn/scikit-learn
- tensorflow (Version 2.3.0 or higher preferred)
Model
The model used is a deep Convolutional Neural Network with skip connections and was created using tensorflow.keras Functional API.
The different layers used in this model are as follows:
- Input
- Depthwise Convolution 2D
- Convolution 2D
- Max Pooling 2D
- Global Average Pooling 2D
- Concatenation
- Dropout
- Dense
The model makes sure of Early Stopping and Tensorboard callbacks to prevent overfitting and monitor training respectively.
Structure

Accuracy and Loss

Confusion Matrix for Validation data

Metrics
| Train | Validation | Test | |
|---|---|---|---|
| Count of Records | 70,295 | 17,572 | 33 |
| Categorical Cross-entropy | 0.1908 | 0.186 | - |
| Categorical Accuracy | 93.70% | 93.91% | 93.93% |
TensorBoard
Use the command tensorboard --logdir tensorboard_logs/fit using the command line from the project's root directory to open the TensorBoard GUI in your browser.
Notes
- Make sure to update the BASE_PATH constant in Train.ipynb to reflect the location where your dataset is stored.
Developed by - Mayur Garg