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.
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
- Python
- TensorFlow/Keras
- OpenCV
- NumPy
- Matplotlib
- Scikit-learn
📂 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
The model was trained using a CNN architecture with multiple convolutional layers, batch normalization, and dropout for regularization.
- Data Preprocessing: Image resizing, normalization, and augmentation.
- Model Training: Using a CNN with ReLU activation and Softmax output.
- Evaluation: Checking accuracy and loss using validation data.
- Testing: Running predictions on test images.
| Model | Training Accuracy | Validation Accuracy |
|---|---|---|
| CNN | 98.34% | 96.3% |
Here is a screen recording demonstrating the project in action:
🎥 Download and Watch the Screen Recording
- Clone the repository:
git clone https://github.com/your-username/Plant_Disease_Detection.git
- Navigate to the project folder:
cd Plant_Disease_Detection - Install dependencies:
pip install -r requirements.txt
- Run inference on a sample image:
python main.py --image sample.jpg
Feel free to fork and contribute to this project! Open a pull request with improvements or bug fixes.