This project uses a deep learning model (ResNet50) to classify 38 different plant diseases using leaf images from the PlantVillage dataset.
- Source: PlantVillage (Augmented)
- Number of Classes: 38
- Image Size: 224x224
- Directory Structure:
train/
valid/
- Base Model: ResNet50 (pretrained on ImageNet)
- Custom Layers:
- GlobalAveragePooling
- Dropout (0.3)
- Dense (128, ReLU)
- Dropout (0.3)
- Dense (Softmax - 38 classes)
- Training Strategy:
- Phase 1: Base model frozen (15 epochs)
- Phase 2: Fine-tuning (20 epochs)
- Optimizer: Adam
- Loss Function: Categorical Crossentropy
- Final Validation Accuracy: 99.69%
- 🟦 Confusion Matrix:
results/confusion_matrix.jpg
- 📈 Accuracy & Loss Curves:
results/training_curves.jpg
- 📃 Full classification report: see
notebooks/evaluation.ipynb
-
Clone this repository:
git clone https://github.com/YOUR_USERNAME/plant-disease-resnet50.git cd plant-disease-resnet50
-
Install the required libraries:
pip install -r requirements.txt
-
Download the trained model (see below), and place it inside the
model/
directory. -
Run the Jupyter notebooks in order:
notebooks/data_preparation.ipynb
notebooks/train_resnet50.ipynb
notebooks/evaluation.ipynb
Install dependencies using the command:
pip install -r requirements.txt
The trained model exceeds GitHub’s file size limit (100MB).
You can download it directly from Google Drive:
📥 Download Plant_38_model.keras
After downloading, place the file here:
plant-disease-resnet50/model/Plant_38_model.keras
Hüseyin Oso
📧 Email: hosenoso25@gmail.com
🌐 GitHub: HossenOSO