Skip to content

Repository files navigation

LeafDetect

Overview

This project focuses on detecting plant diseases using deep learning. A Convolutional Neural Network (CNN) model is trained to classify plant leaves into diseased or healthy categories based on image data.

Dataset

The dataset consists of labeled images of healthy and diseased plant leaves. These images are preprocessed and fed into the model for training. 📂 Download Dataset: Click Here

Technologies Used

  • Python
  • TensorFlow/Keras
  • OpenCV
  • NumPy
  • Matplotlib
  • Scikit-learn

Project Structure

📂 Plant_Disease_Detection
├── 📂 train/  # Training dataset
├── 📂 valid/  # Validation dataset
├── 📂 test/   # Test dataset
├── 📂 venv/   # Virtual environment (excluded in .gitignore)
├── main.py    # Script for inference
├── train-plant-disease-notebook.ipynb  # Model training
├── testing-plant-disease-notebook.ipynb # Model testing
├── trained_model.h5  # Saved model file
├── training_history.pkl  # Model training history
├── Home.jpg  # Sample image (excluded in .gitignore)
├── README.md  # Project documentation
├── .gitignore # Ignored files/folders
└── Screen Recording.mp4  # Project demo

Model Training

The model was trained using a CNN architecture with multiple convolutional layers, batch normalization, and dropout for regularization.

Steps:

  1. Data Preprocessing: Image resizing, normalization, and augmentation.
  2. Model Training: Using a CNN with ReLU activation and Softmax output.
  3. Evaluation: Checking accuracy and loss using validation data.
  4. Testing: Running predictions on test images.

Model Performance

Model Training Accuracy Validation Accuracy
CNN 98.34% 96.3%

Demo

Here is a screen recording demonstrating the project in action:

🎥 Download and Watch the Screen Recording

How to Run the Project

  1. Clone the repository:
    git clone https://github.com/your-username/Plant_Disease_Detection.git
  2. Navigate to the project folder:
    cd Plant_Disease_Detection
  3. Install dependencies:
    pip install -r requirements.txt
  4. Run inference on a sample image:
    python main.py --image sample.jpg

Contribution

Feel free to fork and contribute to this project! Open a pull request with improvements or bug fixes.

About

Project focuses on detecting plant diseases using deep learning and will Add other pre-trained models to it later on

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages