This is a web-based deep learning app built using Streamlit that allows users to detect plant diseases from leaf images. It leverages a trained Convolutional Neural Network (CNN) model on the PlantVillage dataset to identify 38 different plant conditions (including healthy and diseased states).
- πΏ Detect plant diseases from uploaded leaf images.
- π§ͺ Shows prediction confidence.
- π Displays class probabilities as a horizontal bar chart.
- π‘ Clean dark theme with Orbitron animated UI.
- π· Image is resized and previewed before prediction.
.
βββ app.py # Streamlit web app
βββ plant_disease_prediction_model.h5 # Trained Keras CNN model
βββ class_indices.json # Label dictionary (class index to class name)
βββ requirements.txt # List of required Python packages
βββ README.md # This file
git clone https://github.com/yourusername/plant-disease-classifier.git
cd plant-disease-classifierpip install -r requirements.txtMake sure Python 3.8+ is installed.
streamlit run app.py- Upload a leaf image (JPG or PNG).
- Click π Predict.
- View the predicted class, confidence, and probability chart.
- β Trained on: PlantVillage dataset
- π’ Classes: 38 (healthy + diseased conditions of crops)
- ποΈ Architecture: CNN with 3 Conv2D layers + MaxPooling + Dense layers
- π― Accuracy: ~95% on validation data
- Apple___Black_rot
- Grape___Esca_(Black_Measles)
- Tomato___Late_blight
- Potato___healthy
- Pepper,_bell___Bacterial_spot
- ...and 30+ more
MIT License β use freely with attribution.