Skip to content

Ecole 42 machine learning project for plant disease detection and leaf analysis using computer vision and deep learning techniques.

Notifications You must be signed in to change notification settings

alpardayalman/Leaffliction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaffliction

Ecole 42 machine learning project for plant disease detection and leaf analysis using computer vision and deep learning techniques.

Overview

Leaffliction is designed to identify and classify plant diseases through leaf image analysis. The project implements advanced machine learning models with preprocessing, augmentation, and embedding techniques to achieve accurate disease detection.

Developers

Timur Çakmakoğlu
Timur Çakmakoğlu

Alp A. Yalman
Alp A. Yalman

Project Structure

Leaffliction/
├── assets/                    # Project assets and documentation
│   └── en.subject.pdf
├── src/                       # Source code
│   ├── analysis/             # Data analysis modules
│   │   └── Distribution.py   # Distribution analysis
│   ├── model/                # Machine learning models
│   │   ├── dataset.py        # Dataset handling
│   │   ├── hnsw_model.py     # HNSW (Hierarchical Navigable Small World) model
│   │   ├── network.py        # Neural network architecture
│   │   ├── predict.py        # Prediction pipeline
│   │   └── train.py          # Training pipeline
│   └── preprocessing/        # Data preprocessing
│       ├── Augmentation.py   # Data augmentation techniques
│       ├── Embedding.py      # Feature embedding
│       └── Transformation.py # Image transformations
├── model_webapp.py           # Web application interface
├── requirements.txt          # Python dependencies
├── Makefile                  # Build and deployment commands
└── README.md                 # Project documentation

Features

  • Plant Disease Detection: Automated identification of various plant diseases from leaf images
  • Data Preprocessing: Comprehensive image preprocessing pipeline including augmentation and transformations
  • Machine Learning Models: Implementation of neural networks and HNSW algorithms for efficient classification
  • Web Application: User-friendly web interface for disease prediction
  • Embedding Analysis: Advanced feature extraction and embedding techniques
  • Distribution Analysis: Statistical analysis of dataset distributions

Installation

Setup

  1. Clone the repository:
git clone https://github.com/alpardayalman/Leaffliction.git
cd Leaffliction
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Using Makefile

The project includes a Makefile for convenient setup and deployment:

# Install dependencies
make install

# Run tests
make test

# Start the application
make run

# Clean build artifacts
make clean

Usage

Training the Model

To train the disease detection model:

python src/model/train.py

Making Predictions

For single image prediction:

python src/model/predict.py --image path/to/leaf/image.jpg

Web Application

Launch the web interface:

python model_webapp.py

Then open your browser and navigate to http://localhost:5000 to use the web interface.

Data Preprocessing

To preprocess your dataset:

python src/preprocessing/Transformation.py --input data/ --output processed_data/

Model Architecture

The project implements several key components:

  • Neural Network: Custom architecture optimized for leaf image classification
  • HNSW Model: Hierarchical Navigable Small World algorithm for efficient similarity search
  • Data Augmentation: Techniques to expand training data and improve model robustness
  • Feature Embedding: Advanced representation learning for better classification performance

Data Requirements

  • Input Format: RGB images of plant leaves
  • Supported Formats: JPG, PNG, BMP
  • Recommended Resolution: 224x224 pixels (images will be automatically resized)
  • Dataset Structure: Organized by disease class in separate directories

Configuration

Key configuration parameters can be adjusted in the respective Python files:

  • Model hyperparameters in src/model/network.py
  • Training settings in src/model/train.py
  • Preprocessing options in src/preprocessing/

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Create a Pull Request

Development

Code Structure

  • Analysis: Statistical and exploratory data analysis
  • Model: Core machine learning algorithms and architectures
  • Preprocessing: Data preparation and augmentation pipelines

Testing

Run the test suite:

python -m pytest tests/

Note: This is an Ecole 42 project, designed for educational and research purposes in plant pathology and computer vision.

About

Ecole 42 machine learning project for plant disease detection and leaf analysis using computer vision and deep learning techniques.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •