This repository contains a Deep Learning model for the classification of rice leaf diseases. This model is designed to help farmers and agricultural researchers identify common diseases affecting rice plants by analyzing images of rice leaves. By automating the disease identification process, it can assist in early detection and intervention, ultimately improving crop yield and food security.
Rice is one of the most important staple crops in the world, providing food for billions of people. However, rice plants are susceptible to various diseases that can significantly reduce yield and quality. Early detection and treatment of these diseases are crucial to prevent crop loss.
This Deep Learning model leverages Convolutional Neural Networks (CNNs) to classify rice leaf images into different disease categories, such as Brown Spot, Bacterial Leaf Blight, and Leaf Smut. It has been trained on a labeled dataset to make accurate predictions based on input images.
The dataset used for training and testing this model is not included in this repository due to its large size. You can obtain the dataset from a trusted source or use your own dataset following the same directory structure as described in the data
folder. The dataset should be divided into training and testing sets.
To run this Deep Learning model, you will need the following dependencies:
- Python 3.x
- TensorFlow (2.x recommended)
- NumPy
- Matplotlib (for visualization)
- Pandas (for data manipulation)
- scikit-learn (for model evaluation)
- Jupyter Notebook (for running training and inference notebooks)
You can install these dependencies using pip:
pip install tensorflow numpy matplotlib pandas scikit-learn jupyter
To use this model, follow these steps:
- Clone this repository to your local machine:
git clone https://github.com/your-username/rice-leaf-disease-classification.git
cd rice-leaf-disease-classification
-
Prepare your dataset or obtain the dataset from a trusted source.
-
Organize the dataset into the
data
directory with subdirectories for each disease class. The directory structure should look like this:
data/
├── train/
│ ├── class1/
│ ├── class2/
│ ├── ...
│ └── classN/
└── test/
├── class1/
├── class2/
├── ...
└── classN/
-
Train the model (see the next section).
-
Perform inference on new images (see the inference section).
To train the model, you can use the provided Jupyter Notebook or Python script. Open the train_model.ipynb
notebook or run the train.py
script.
In the notebook/script, you can adjust hyperparameters, choose a pre-trained model (e.g., MobileNetV2, ResNet50), and specify the dataset paths. Training logs and model checkpoints will be saved in the logs
directory.
To perform inference using the trained model, you can use the provided Jupyter Notebook or Python script. Open the inference.ipynb
notebook or run the inference.py
script.
Inference allows you to classify new rice leaf images into disease categories.
To evaluate the model's performance, you can use the provided Jupyter Notebook or Python script. Open the evaluate_model.ipynb
notebook or run the evaluate.py
script. This will provide metrics such as accuracy, precision, recall, and F1-score on the test dataset.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Make your changes and test them thoroughly.
- Commit your changes with descriptive commit messages.
- Push your branch to your fork:
git push origin feature-name
- Create a pull request to merge your changes into the main branch of this repository.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to reach out if you have any questions or need further assistance. Happy classifying rice leaf diseases!