Here's a README file that you can use for your GitHub repository:
This project demonstrates a basic plant disease classification application using TensorFlow for the model and Tkinter for the GUI. The model classifies images of plants into three categories: Bacterial Blight
, Healthy
, and Red Rot
. This application allows users to load an image, classify it using the trained model, and display the result along with the image.
-
Clone the repository:
git clone https://github.com/yourusername/plant-disease-classification.git cd plant-disease-classification
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Download the pre-trained model and save it in the
models
directory:- Place your model in the
models
directory with the filenamesugercane_model.h5
(for sugarcane classification) ormaize_model.h5
(for maize classification).
- Place your model in the
-
To run the application, execute the following command:
python app.py
-
The application window will open. Click on "Browse Image" to select an image from your local machine.
-
The selected image will be displayed in the application window along with the predicted class.
tensorflow
: For building and running the machine learning model.tensorflow-hub
: For using pre-trained models.PIL
: For image processing.Tkinter
: For creating the GUI.numpy
: For numerical operations.seaborn
,matplotlib
: For visualization (if needed).
Install the dependencies with:
pip install tensorflow tensorflow-hub pillow numpy matplotlib seaborn
plant-disease-classification/
│
├── models/
│ ├── sugercane_model.h5 # Model for sugarcane classification
│ └── maize_model.h5 # Model for maize classification
│
├── app.py # Main application code
└── README.md # Project documentation
The model used in this application is a pre-trained MobileNetV2 model from TensorFlow Hub, fine-tuned for plant disease classification. It accepts an input image of size 224x224 and outputs a probability distribution across three classes: Bacterial Blight
, Healthy
, and Red Rot
.