This repository contains a Flask web application that predicts diseases in cotton plants based on uploaded images using a pre-trained deep learning model. The model identifies the disease from a set of predefined classes and provides the corresponding disease name.
- Upload cotton plant images for disease prediction.
- View the result with the predicted disease class and the uploaded image.
- Displays the prediction on a web page after processing the image.
To run the project, you need to have the following installed:
- Python 3.x
- Flask
- TensorFlow (for loading the
.h5
model) - Keras
- PIL (Pillow for image handling)
You can install the necessary Python packages using pip
:
pip install -r requirements.txt
- Clone the repository and navigate to the project directory:
git clone "https://github.com/sonalisrisivani/cotton-plant-disease-detection"
cd cotton-plant-disease-detection
- Install Virtual Environment Packages
python -m venv venv
- Activate Virtual Environment # For Windows
venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Run application
python app.py
or
flask run
Go to - localhost/5000
- deactivate
deactivate
This project is licensed under the MIT License - see the LICENSE file for details.