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.
✅ 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.
Above: An example of a leaf image with Grad-cam highlighted disease regions.
| Technology | Logo |
|---|---|
| Python | |
| PyTorch | |
| Flask | |
| HTML | |
| CSS | |
| JavaScript | |
| Matplotlib | |
| GitHub |
📁 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
git clone https://github.com/yourusername/plant-disease-detection.git
cd plant-disease-detectionpip install -r requirements.txtpython app.pyVisit http://127.0.0.1:5000 in your web browser.
1️⃣ Upload an image of a plant leaf.
2️⃣ The model predicts the disease category.
3️⃣ Grad-CAM visualization shows affected regions.
| Disease | Model Prediction | Confidence |
|---|---|---|
| Bacterial Spot | ✅ Correct | 95.2% |
| Late Blight | ✅ Correct | 97.6% |
- Improve dataset diversity.
- Optimize model performance.
- Deploy on Hugging Face or Streamlit Cloud.
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.
This project is licensed under the MIT License.
🔥 If you like this project, don't forget to ⭐ it on GitHub!

