Skip to content

ShrijalShrestha/Crop-Disease-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crop Disease Detection Using Deep Learning 🌱🧪

This repository contains a deep learning-based solution for detecting crop diseases from images using transfer learning. The goal is to assist farmers in identifying crop diseases early, improving yields, and reducing economic losses. The project leverages the ResNet50V2 architecture and the PlantVillage dataset for training and evaluation.


🌟 Project Overview

  • Objective: To classify 39 different crop disease categories using smartphone-captured images.
  • Model: Convolutional Neural Network (CNN) with transfer learning using ResNet50V2.
  • Dataset: The publicly available PlantVillage dataset from Kaggle.
  • Deployment: The model is intended to be deployed as a mobile/web app for real-time disease detection.

🚀 Key Features

  • Real-Time Disease Detection: Upload an image and get instant disease diagnosis.
  • Transfer Learning: Utilizes pretrained VGG16 for feature extraction and classification.
  • Data Augmentation: Enhances training with transformations like rotation, flipping, and zooming.
  • Regularization: Implements early stopping and dropout to prevent overfitting.
  • Evaluation Metrics: Achieved 94% test accuracy, with a precision of 92.9% and an F1-score of 92.5%.

📂 Project Structure

├── data/
│   ├── train/                # Training images
│   ├── validation/           # Validation images
│   └── test/                 # Test images
├── crop_disease_model.h5     # Saved trained model
├── transfer_learning.ipynb   # Jupyter notebook for training
├── static/
│   ├── css/                  # CSS files for styling (if applicable)
│   └── uploads/              # Folder for uploaded images
├── templates/
│   └── index.html            # HTML template for the web interface
├── app.py                    # Flask application script
├── gem.py                    # Additional utility script (if applicable)
├── requirements.txt          # Required Python libraries
└── README.md                 # Project documentation

⚙️ Setup & Installation

  • Clone the repository:
git clone https://github.com/yourusername/crop-disease-detection.git
cd crop-disease-detection
  • Install dependencies:
pip install -r requirements.txt
  • Download the dataset: PlantVillage Dataset

  • Run the transfer_learning.ipynb to train the model

  • Run the app

python app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published