Skip to content

Anand-Kumar7/Plant_Disease_Detection_using_Tensorflow_and_OpenCV

Repository files navigation

🌿 Plant Disease Detection

A Flask web app that uses TensorFlow to detect diseases in plant leaf images and suggest treatments.

Setup

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

Train the Model

# 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.py

Place the PlantVillage dataset in Plant_Village/disease/ before training.

Run

python app.py

Open http://localhost:5000, upload a leaf image, and get an instant diagnosis.

API

Method Endpoint Description
GET /health Server & model status
POST /predict Upload image (file field) for prediction

Supported Plants

Tomato · Potato · Apple · Corn · Grape · Pepper


Author: Anand Kumar Maurya

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors