๐ฑ Plant Disease Prediction
Plant Disease Prediction is a deep learning project designed to classify plant diseases from leaf images using Convolutional Neural Networks (CNNs). It provides a simple Streamlit web app where users can upload an image of a leaf and instantly get a prediction about the plantโs health.
This project aims to assist farmers, researchers, and agricultural experts in early disease detection to improve crop yield and reduce losses.
โจ Features
๐ง CNN-based model trained on the PlantVillage Dataset
๐ Supports multiple plant types and disease categories
๐ธ Image upload & classification via Streamlit
โก Real-time prediction with accuracy & confidence scores
๐ Training history visualization (accuracy & loss plots)
๐พ Model + class mapping saved for easy deployment
๐ Project Structure Plant_disease_prediction/ โโโ app/ # Streamlit app files โโโ model_training_notebook/ # Jupyter notebooks for training โโโ test_images/ # Sample test images โโโ Plant-Model/ # Trained models & class indices โ โโโ plant_disease_prediction_model.h5 โ โโโ class_indices.json โ โโโ model-training.py โโโ README.md โโโ LICENSE
๐ Getting Started โ Prerequisites
Python 3.7+
TensorFlow / Keras
NumPy, Pandas
Matplotlib, Pillow
Streamlit
โ๏ธ Setup Instructions
Clone the repository:
git clone https://github.com/shraddhagreddy/Plant_disease_prediction.git cd Plant_disease_prediction
Install dependencies:
pip install -r requirements.txt
Download the PlantVillage Dataset and place it inside your working directory.
๐๏ธ Model Training
Run the training script:
python Plant-Model/model-training.py
This will:
Train the CNN on the dataset
Save the trained model as plant_disease_prediction_model.h5
Generate class_indices.json for mapping predictions
๐ Running the Streamlit App
Run the web app with:
streamlit run app/app.py
Upload a leaf image (.jpg, .jpeg, .png)
Get instant disease predictions ๐
๐ Example Results Training Performance
Model achieves ~92% validation accuracy (update after training).
Sample Prediction
Upload a leaf image โ Prediction: Apple Scab ๐๐
๐ฎ Future Improvements
Add Grad-CAM visualizations for explainable AI
Deploy model to cloud (AWS/GCP/Heroku)
Improve accuracy with transfer learning (ResNet, EfficientNet)
Add mobile app integration for farmers
๐ Tech Stack
Language: Python
Frameworks: TensorFlow, Keras, Streamlit
Data: PlantVillage Dataset
Libraries: NumPy, Pandas, Matplotlib, Pillow
๐ฉโ๐ป Author
Shraddha Reddy ๐ง [email protected]
๐ก Always open to collaboration & feedback!
๐ License
This project is licensed under the MIT License ยฉ 2025 Shraddha Reddy. See the LICENSE file for details.