Skip to content

Bamwesigye-Calvin-Kiiza/pest-and-disease-predictoin-using-transfer-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Introduction

This repository contains code and data for a pest and disease prediction project using transfer learning. The project aims to classify images into 38 different classes representing various pests and diseases affecting plants. By leveraging transfer learning, we can utilize the knowledge learned from pre-trained models on a large dataset and adapt it to our specific task with a relatively smaller dataset, thereby achieving higher accuracy and efficiency.

Dataset

The dataset used for this project consists of labeled images of plants affected by different pests and diseases. It comprises 38 classes, each representing a specific pest or disease category. The images are collected from diverse sources and preprocessed to ensure consistency and data quality.

Dependencies

Before running the code, ensure you have the following dependencies installed: Python 3.10+ TensorFlow Keras NumPy Pandas Matplotlib Scikit-learn Jupyter Notebook (optional, for running the provided notebook) You can install the required packages using pip:

Model Architecture

The transfer learning approach utilizes a pre-trained deep learning model as the backbone and adds a few layers on top to adapt it to the specific classification task. For this project, we have chosen the ResNet-50 architecture as our pre-trained model due to its proven effectiveness in image recognition tasks.

Usage

Clone the repository to your local machine: git clone https://github.com/your-username/pest-disease-prediction.git Acquire the dataset and place it in the appropriate folder:

Place the images in the 'data' folder with the following directory structure:

Adjust hyperparameters (e.g., learning rate, batch size, etc.) in the configuration file if needed. Train the model Evaluate the model on the validation dataset: Make predictions on new images:

Results

After training the model, the evaluation metrics, such as accuracy, precision, recall, and F1 score, will be displayed. Additionally, you can visualize the training and validation loss and accuracy curves in the provided Jupyter Notebook.

Conclusion

This project demonstrates how to employ transfer learning to build an accurate pest and disease prediction model, even with limited data. By utilizing a pre-trained model like ResNet-50V2, we can efficiently learn and classify various plant health issues. Researchers and enthusiasts can further extend this work with larger datasets, different pre-trained models, or explore fine-tuning options to improve the model's performance.

contributing

Kindly contact [email protected]

About

Pest and diseases prediction model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published