Skip to content

HossenOSO/plant-disease-resnet50

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 Plant Disease Classification using ResNet50

This project uses a deep learning model (ResNet50) to classify 38 different plant diseases using leaf images from the PlantVillage dataset.


📁 Dataset

  • Source: PlantVillage (Augmented)
  • Number of Classes: 38
  • Image Size: 224x224
  • Directory Structure:
    • train/
    • valid/

🧠 Model

  • 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%

📊 Results

  • 🟦 Confusion Matrix: results/confusion_matrix.jpg
  • 📈 Accuracy & Loss Curves: results/training_curves.jpg
  • 📃 Full classification report: see notebooks/evaluation.ipynb

🚀 How to Use

  1. Clone this repository:

    git clone https://github.com/YOUR_USERNAME/plant-disease-resnet50.git
    cd plant-disease-resnet50
  2. Install the required libraries:

    pip install -r requirements.txt
  3. Download the trained model (see below), and place it inside the model/ directory.

  4. Run the Jupyter notebooks in order:

    • notebooks/data_preparation.ipynb
    • notebooks/train_resnet50.ipynb
    • notebooks/evaluation.ipynb

📦 Requirements

Install dependencies using the command:

pip install -r requirements.txt

🔗 Download Pretrained Model

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

👨‍💻 Author

Hüseyin Oso
📧 Email: hosenoso25@gmail.com
🌐 GitHub: HossenOSO

About

Deep learning-based classification of 38 plant diseases using ResNet50

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published