This project aims to develop a model (CNN) for recognizing plant diseases using deep learning. The model is trained on the PlantVillage dataset, and it classifies different plant diseases based on images of leaves.
- Python 3.12.3
- TensorFlow 2.17.0
- Poetry for dependency management.
-
Clone the repository:
git clone https://github.com/MilleXi/plant_diseases_recognition.git
-
Clone the PlantVillage dataset:
git clone https://github.com/gabrieldgf4/PlantVillage-Dataset.git
- Note: After downloading the dataset, delete the
x_Removed_from_Healthy_leaves
folder and the.git
folder inside thePlantVillage-Dataset
directory.
- Note: After downloading the dataset, delete the
-
Install the required Python dependencies:
poetry install
You can modify the configuration settings by editing the config.py
file located in the config
folder. This file contains various parameters related to model training and dataset paths.
To train the model, run the following command in the terminal:
python train.py
To evaluate the model, run the following command in the terminal:
python evaluate.py
The model will be trained and evaluated on the PlantVillage dataset, and the training output, including logs and model checkpoints, can be found in the output
folder.
If you want to see the feature maps, run the following command in the terminal:
python get_feature_maps.py
You can find the pictures in the output
folder.
To open the visual interface, run the following command in the terminal:
python gradio_interface.py
After you run the above code, you can find the following in the output
folder:
- Checkpoints
- Feature maps
- Logs
- Best model in the 'models' folder
- Other Visualizations
This project is licensed under the Apache-2.0 license - see the LICENSE file for details.