Skip to content

salmamuhammede/Plant_disease_detection_Image_Processing_Project

Repository files navigation

🌱 Plant Disease Detection Project

Project Background

📋 Project Overview

This project is an innovative approach to leveraging cutting-edge image processing, machine learning, and deep learning techniques for the detection of plant diseases from leaf images. By creating a comprehensive and efficient pipeline, we aim to revolutionize agricultural diagnostics.

Key Features:

  • End-to-End Solution: From preprocessing to deployment.
  • Accurate Predictions: Achieving state-of-the-art results with machine learning and deep learning models.
  • User-Friendly Deployment: A fully functional web application for real-time disease detection.

🛠️ Pipeline Breakdown

Preprocessing

  • 🖼️ Image Augmentation: Enhances dataset diversity to improve model generalization.
  • ❌ Noise Removal: Filters out irrelevant artifacts for cleaner inputs.
  • 🌟 Contrast Enhancement: Boosts the visibility of critical features.

Texture Analysis

Sophisticated feature extraction techniques:

  • 📊 GLCM (Gray Level Co-occurrence Matrix): Captures textural patterns.
  • 🖼️ LBP (Local Binary Patterns): Extracts local texture descriptors.
  • 🌈 RGB Histogram: Analyzes color distribution.
  • 🎨 HSV Histogram: Captures hue, saturation, and value properties.

Machine Learning Models

Modeling Workflow

Hyperparameter tuning conducted with Optuna on:

  • 🌟 XGBoost: Delivered the best results.
  • 🌳 Random Forest
  • 📈 KNN
  • 📉 SVM
  • 🌲 Decision Tree

Best Results:

  • XGBoost with HSV features:
    • ✅ Validation Accuracy: 96%
    • ✅ Test Accuracy: 84%

Deep Learning with MobileNet

  • Achieved exceptional results:
    • ✅ Test Accuracy: 95%

🚀 Deployment Details

Deployment Process

The project integrates a powerful backend and an intuitive frontend:

  • 🔧 Backend: Flask, providing a robust API for model inference.
  • 🌐 Frontend: React, ensuring a seamless user experience.

📂 Dataset

The dataset used for this project is publicly available and can be downloaded from: 🔗 Plant Disease Dataset


🚀 How to Operate the Project

🛠️ Step 1: Start the Backend (Flask)

  1. Install the required libraries:
    pip install -r requirements.txt
  2. Run the Flask app:
    python app.py

🌐 Step 2: Start the Frontend (React)

  1. Navigate to the frontend directory:
    cd frontend
  2. Install the required packages:
    npm install
  3. Run the React app:
    npm start

🖼️ Step 3: Test with Images

  1. Open your browser and navigate to http://localhost:3000.
  2. Upload an image of a plant leaf.
  3. View predictions and analysis in real-time with detailed results.

📊 Key Results

Machine Learning (XGBoost + HSV Features)

  • ✅ Validation Accuracy: 96%
  • ✅ Test Accuracy: 84%

MobileNet

  • ✅ Test Accuracy: 95%

Deployment

  • 🌟 Fully functional web application combining Flask backend and React frontend.
  • 🌟 Real-time predictions with a user-friendly interface.

💡 Future Enhancements

  • 🌍 Multi-Language Support: Expand the application to support multiple languages for global accessibility.
  • 📱 Mobile App: Develop a mobile version for on-the-go disease detection.
  • 📈 Continuous Learning: Implement a feedback loop to improve model accuracy with user-uploaded images.
  • 🌟 Cloud Integration: Deploy on cloud platforms for scalable and fast inference.

🤝 Contributing

We welcome contributions to enhance the project. Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature.
  3. Submit a pull request with detailed explanations.

👥 Contributors

Salma Muhammed
Salma Muhammed
Mostafa Rabie
Mostafa Rabie
Abdulrahman Mostafa
Abdulrahman Mostafa
Mukhaled
Mohamed Khaled

📝 License

This project is licensed under the MIT License. Feel free to use, modify, and distribute this project as per the license terms.


Thank you for exploring the Plant Disease Detection Project. Together, let's make agriculture smarter and more sustainable!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages