omarlahkim / TFX-Pipeline-Plant-Disease-Detection

🌱 Pipeline Implementation using TFX for Plant Disease Detection Model. The Repository includes the keras model code, pipeline implementation for local Deployment & Airflow Noteebooks, a Minimalistic Client for testing the model after Serving it (TFX Serving REST-API), and a Simple Proxy Server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌱TensorFlow Extended Pipeline Plant Disease Detection🌱

This project utilizes TensorFlow Extended (TFX) to implement a machine learning pipeline for detecting plant diseases. The pipeline includes data ingestion, preprocessing, model training, evaluation, and serving. It aims to provide a scalable and efficient solution for plant disease detection, which is crucial for enhancing crop production and management.

TensorFlow Python Keras React Flask Machine Learning

Dataset

The dataset used in this project is New Plant Diseases, which consists of leaf images of various plants, including healthy and diseased samples. The dataset includes:

  • Number of Classes: 38 (including healthy and diseased conditions)
  • Total Images: Approximately 87,000
  • Image Size: 256x256 pixels
  • Split: 80/20

Model

I have fined tuned a convolutional neural network (CNN) model for plant disease detection. The model architecture is designed to extract and learn from the visual patterns of plant leaf images effectively.

Model Features:

  • Input Size: 256x256 pixels
  • Layers: Customized layers including convolutional, pooling, and dense layers
  • Output: Classification/Type of Disease

TensorFlow Components

The project leverages several TensorFlow Extended (TFX) components to streamline the machine learning pipeline:

  • ExampleGen: Ingests and imports data into the TFX pipeline.
  • StatisticsGen: Computes statistics for data analysis and validation.
  • SchemaGen: Infers a schema for the data.
  • ExampleValidator: Identifies and highlights anomalies and missing values in the dataset.
  • Transform: Performs feature engineering on the dataset.
  • Trainer: Trains the model using TensorFlow.
  • Evaluator: Evaluates the trained model against a test set.
  • Pusher: Deploys the model to a production environment.

Demo

Step 1

Step 2

Step 3

This section details how to interact with the project through a web interface or API, showcasing the detection capabilities in real-time.

For a web-based demo:

  • Navigate to <demo-url> to access the interactive web application built with React and Flask.
  • Upload an image of a plant leaf to get an instant prediction of its health status.
# To run the demo locally, follow these steps:

# Clone the repository
git clone <repository-url>

# Install dependencies
pip install -r requirements.txt

# Run the Flask server
python app.py

# In a separate terminal, start the React frontend
cd frontend
npm install
npm start

About

🌱 Pipeline Implementation using TFX for Plant Disease Detection Model. The Repository includes the keras model code, pipeline implementation for local Deployment & Airflow Noteebooks, a Minimalistic Client for testing the model after Serving it (TFX Serving REST-API), and a Simple Proxy Server.


Languages

Language:Python 55.4%Language:JavaScript 30.8%Language:CSS 8.9%Language:HTML 4.9%