This project involves a Jupyter notebook for detecting plant diseases using a deep learning model. The notebook leverages a pre-trained Faster R-CNN model fine-tuned on a dataset of images of common plant diseases and pests in Taiwan.
Link to research: https://docs.google.com/document/d/1n786LkKaFmz_qqqdL6AAu1BLEJ1duCOAj83fhd8zKeY/edit?usp=sharing
- Data Preprocessing: Steps to clean and prepare image datasets for training.
- Model Training: Fine-tuning a pre-trained Faster R-CNN model with custom datasets.
- Disease Detection: Real-time identification of pests and plant diseases from input images.
- Evaluation: Assess the model's performance and accuracy.
Ensure you have the following installed:
- Python 3.8 or higher
- Jupyter Notebook
- Required Python libraries (listed in
requirements.txt
)
Access via google colab: https://drive.google.com/file/d/1wzNaimKnKTA57igvEvFaxiaASHD6P73m/view?usp=sharing
Or
-
Clone the repository:
git clone https://github.com/yourusername/plant_disease_detection.git
-
Navigate to the project directory:
cd plant_disease_detection
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Launch Jupyter Notebook:
jupyter notebook
-
Open the notebook
Plant_Disease_Detection.ipynb
and follow the instructions within.
- Introduction: Overview of the project and objectives.
- Data Preprocessing: Steps to load and preprocess the dataset.
- Model Training: Code to fine-tune the Faster R-CNN model.
- Disease Detection: Using the trained model to detect diseases in new images.
- Evaluation: Assessing the model's performance.
The dataset should be organized as follows:
data/
├── raw/
│ ├── aphid/
│ │ ├── image1.jpg
│ │ ├── image2.jpg
│ │ └── ...
│ ├── leafworm/
│ │ ├── image1.jpg
│ │ ├── image2.jpg
│ │ └── ...
│ └── ...
-
Data Preparation:
- Place your training images in the
data/raw
directory. - Follow the notebook steps to preprocess the data.
- Place your training images in the
-
Model Training:
- Run the cells in the notebook to train the model using the prepared dataset.
-
Disease Detection:
- Use the notebook cells to detect diseases in new images.
- The notebook includes sections for evaluating the model's performance and visualizing the results.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Special thanks to the Taoyuan District Agricultural Research and Extension Station for providing the dataset.
- Inspired by various open-source projects and research papers on plant disease detection.