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_leavesfolder and the.gitfolder inside thePlantVillage-Datasetdirectory.
- 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.pyTo evaluate the model, run the following command in the terminal:
python evaluate.pyThe 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.pyYou can find the pictures in the output folder.
To open the visual interface, run the following command in the terminal:
python gradio_interface.pyAfter 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.