Skip to content

This project focuses on identifying plant diseases using deep learning models, enhancing transparency with Grad-CAM (Gradient-weighted Class Activation Mapping). CNN model is trained on plant leaf images to classify diseases. Grad-CAM is then applied to generate heatmaps, helping in explainability.

Notifications You must be signed in to change notification settings

Prajwal-koundinya/Plant-Disease-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌿 Plant Disease Detection using AI and Grad-CAM for explainability 🔍

📌 Overview

This project leverages Deep Learning (CNNs) to detect plant diseases from images and provides explainability using Grad-CAM (Gradient-weighted Class Activation Mapping). The model highlights the most important regions in an image contributing to the classification decision.

🚀 Features

AI-Powered Disease Detection – Identifies plant diseases with high accuracy.
Grad-CAM Explanation – Visualizes important regions influencing the prediction.
Flask Web App – User-friendly web interface for disease detection.
Easy to Deploy – Run locally or on cloud platforms like AWS/GCP.

🖼️ Demo Grad-cam

image

Above: An example of a leaf image with Grad-cam highlighted disease regions.

⚙️ Technologies Used

Technology Logo
Python Python
PyTorch PyTorch
Flask Flask
HTML HTML
CSS CSS
JavaScript JavaScript
Matplotlib Matplotlib
GitHub GitHub

📂 Project Structure overview

📁 plant-disease-detection
│-- app.py                 # Flask application
│-- model.py               # AI model (CNN-based)
│-- static/
│   ├── uploads/           # Uploaded images
│   ├── results/           # Processed Grad-CAM images
│-- templates/
│   ├── index.html         # Main upload page
│   ├── result.html        # Prediction page
│-- requirements.txt       # Dependencies
│-- README.md              # Project documentation

🎯 How to Run

1️⃣ Clone the Repository

git clone https://github.com/yourusername/plant-disease-detection.git
cd plant-disease-detection

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Run the Flask Server

python app.py

4️⃣ Open in Browser

Visit http://127.0.0.1:5000 in your web browser.

📌 Example Usage

1️⃣ Upload an image of a plant leaf.
2️⃣ The model predicts the disease category.
3️⃣ Grad-CAM visualization shows affected regions.

🎨 UI Preview

image

📊 Results

Disease Model Prediction Confidence
Bacterial Spot ✅ Correct 95.2%
Late Blight ✅ Correct 97.6%

📖 Future Improvements

  • Improve dataset diversity.
  • Optimize model performance.
  • Deploy on Hugging Face or Streamlit Cloud.

🤝 Acknowledgments

Special thanks to the medical and AI communities for their valuable datasets and research.
Inspirational guidance from Dr. Victor Ikechukwu. Explore their work: Dr. Victor Ikechukwu.

📜 License

This project is licensed under the MIT License.


🔥 If you like this project, don't forget to ⭐ it on GitHub!

About

This project focuses on identifying plant diseases using deep learning models, enhancing transparency with Grad-CAM (Gradient-weighted Class Activation Mapping). CNN model is trained on plant leaf images to classify diseases. Grad-CAM is then applied to generate heatmaps, helping in explainability.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages