Deep learning using tensorflow on image dataset containing different healthy and unhealthy crop leaves.
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)
The external libraries required for running Train.ipynb are:
- numpy
- pandas
- matplotlib
- sklearn/scikit-learn
- tensorflow (Version 2.3.0 or higher preferred)
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.
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% |
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.
- Make sure to update the BASE_PATH constant in Train.ipynb to reflect the location where your dataset is stored.
Developed by - Mayur Garg