Skip to content

Latest commit

Β 

History

History
100 lines (63 loc) Β· 2.29 KB

File metadata and controls

100 lines (63 loc) Β· 2.29 KB

🌱 Plant Disease Classifier - Streamlit App

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).



Trained Model Link is given below

https://drive.google.com/file/d/1rKh-IElSdHTqax7XdfSdZTn-r8T_qWPf/view?usp=drive_link)https://drive.google.com/file/d/1rKh-IElSdHTqax7XdfSdZTn-r8T_qWPf/view?usp=drive_link



πŸ” Features

  • 🌿 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.

πŸ“ Project Structure

.
β”œβ”€β”€ 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

πŸ”§ Installation

πŸ”Ή Clone the repository:

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

πŸ”Ή Install the dependencies:

pip install -r requirements.txt

Make sure Python 3.8+ is installed.


πŸš€ Running the App

streamlit run app.py
  • Upload a leaf image (JPG or PNG).
  • Click πŸ” Predict.
  • View the predicted class, confidence, and probability chart.

🧠 Model Details

  • βœ… 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

πŸ“š Example Classes

  • Apple___Black_rot
  • Grape___Esca_(Black_Measles)
  • Tomato___Late_blight
  • Potato___healthy
  • Pepper,_bell___Bacterial_spot
  • ...and 30+ more


πŸ“œ License

MIT License β€” use freely with attribution.