Welcome! Here’s how you can contribute and set up the project locally.
- Fork this repository on GitHub.
- Clone it to your local machine:
git clone <your-forked-repo-url>
cd <repo-folder>Open a terminal in the project folder and run:
python -m venv venvActivate it:
- Windows:
venv\Scripts\activate- Mac/Linux:
source venv/bin/activateWith the virtual environment activated, install dependencies:
pip install tensorflow flask flask-babel opencv-python matplotlib
⚠️ Optional:numpyandwerkzeugmay be required, but they’re usually installed automatically.
If you don’t already have pearl_millet_ergot_model.h5, train the model:
python train.pyThis will:
- Train the CNN on the dataset
- Save the trained model as
pearl_millet_ergot_model.h5
If you already have this file, you can skip this step.
To verify the model works:
python test.pyEnsure there’s a
test.jpgimage in your folder. Output will be something like:
Diseased: Ergot
or
Healthy
Start the Flask server:
python app.pyYou should see:
* Running on http://127.0.0.1:5000 (Press CTRL+C to quit)
Go to:
You’ll see the homepage (index.html). Navigate to /identify to upload an image and get results.