This repository contains a Python application for detecting potato leaf diseases using a pre-trained deep learning model. The application uses PyQt5 for the GUI and TensorFlow for model inference.
- Python 3.11.6
- PyQt5
- Pillow
- NumPy
- TensorFlow
Note: This code is designed to run without errors only in Python 3.11.6 version.
- Install the required packages:
pip install PyQt5 Pillow numpy tensorflow
- Download the pre-trained model here and place
potato_leaf_disease_model.h5
in the project directory.
-
Ensure that the pre-trained model
potato_leaf_disease_model.h5
is in the project directory. -
Run the application:
python app.py
-
Use the GUI to select an image of a potato leaf and detect the disease.
The dataset used for training the model can be downloaded from here.
The pre-trained model used for this application can be downloaded from this link.
Training the model is optional. The application comes with a pre-trained model, but if you wish to train the model yourself, follow these steps:
-
Download and extract the dataset from Kaggle.
-
Update the paths in
model_training.py
to point to your dataset directories. -
Run the training script:
python Model Training Code.py
-
The trained model will be saved as
potato_leaf.h5
.