A Flask web app that uses TensorFlow to detect diseases in plant leaf images and suggest treatments.
git clone https://github.com/Anand-Kumar7/Plant_Disease_Detection_using_Tensorflow_and_OpenCV.git
cd Plant_Disease_Detection_using_Tensorflow_and_OpenCV
python -m venv .venv && .venv\Scripts\activate # Windows
pip install -r requirements.txt# Recommended (transfer learning, faster)
python train_model_pretrained.py
# Or train from scratch
python train_model.py
# Just testing? Create a mock model
python create_mock_model.pyPlace the PlantVillage dataset in
Plant_Village/disease/before training.
python app.pyOpen http://localhost:5000, upload a leaf image, and get an instant diagnosis.
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Server & model status |
| POST | /predict |
Upload image (file field) for prediction |
Tomato · Potato · Apple · Corn · Grape · Pepper
Author: Anand Kumar Maurya