Skip to content

AdMub/Chicken-Disease-Classification-End-to-End-Project

Repository files navigation

πŸ” Chicken Disease Classification – End-to-End Project

Build Status
Docker
AWS
MLflow
Python
License


πŸ“Œ Project Overview

Poultry farming is one of the most important agricultural practices worldwide, providing protein and livelihood for millions of people. However, poultry diseases like Coccidiosis pose a major threat to healthy chicken production.

Coccidiosis is a parasitic disease caused by protozoa of the genus Eimeria. It affects the intestinal tract of chickens, leading to symptoms such as diarrhea, weight loss, reduced egg production, and even death in severe cases. Early detection is crucial to prevent economic loss and improve food security.

This project provides an AI-powered solution using Deep Learning (VGG16 pre-trained model) to automatically classify chicken images into:

  • βœ… Healthy
  • ❌ Coccidiosis Infected

By integrating CI/CD pipelines, GitHub Actions, DVC (Data Version Control), and a Flask Web App, this project demonstrates a full-stack MLOps workflow for real-world deployment.


πŸš€ Features

  • πŸ“‚ Data Ingestion

  • 🧠 Model Building – VGG16 pre-trained model fine-tuned for classification

  • πŸ”„ Training Pipeline – Includes callbacks, checkpoints, and logging

  • πŸ“Š Evaluation – Reports model performance with metrics

    Example Output:

    {
        "loss": 1.2301383018493652,
        "accuracy": 0.9568965435028076
    }
    
    

βš™οΈ Key Features

  • βš™οΈ Custom Exception Handling – With BoxValueError for robust error tracking
  • πŸ“ Logger – Centralized logging for all project components
  • πŸ”— CI/CD – Continuous integration & deployment using GitHub Actions
  • πŸ“¦ DVC – Data & model version control for reproducibility
  • 🌐 Web App – Flask application with HTML, CSS, and JavaScript (Home, Form, Result pages placeholders included)

πŸ“ Project Structure

Chicken-Disease-Classification-End-to-End-Project
│── .dvc/ # DVC metadata
│── artifacts/ # Stored models, metrics, etc.
│── config/ # YAML configuration files
│── datasets/ # Raw and processed datasets
│── logs/ # Training & pipeline logs
│── research/ # Experiment notebooks
│── src/ # Source code
β”‚ β”œβ”€β”€ components/ # Data ingestion, training, evaluation, etc.
β”‚ β”œβ”€β”€ config/
β”‚ β”œβ”€β”€ constants/
β”‚ β”œβ”€β”€ entity/
β”‚ β”œβ”€β”€ logging/
β”‚ β”œβ”€β”€ pipeline/
β”‚ β”œβ”€β”€ utils/
β”‚ └── init.py
│── static/ # CSS, JS files for web app
│── templates/ # HTML templates (home.html, form.html, result.html)
│── app.py # Flask application entry point
│── .github/ # GitHub workflows (CI/CD)
│── .gitignore
│── .dvcignore
│── README.md

--

πŸ–ΌοΈ Screenshots

Home – Project introduction

home

Form - Upload chicken image for prediction

form

Result - Displays prediction result

coccidiosis

βš™οΈ Tech Stack

  • Deep Learning: TensorFlow / Keras (VGG16 Pre-trained Model)
  • MLOps Tools: DVC, GitHub Actions, Logging, Custom Exception
  • Web Framework: Flask (HTML, CSS, JavaScript frontend)
  • Version Control: Git, GitHub
  • Deployment Ready: CI/CD pipeline

πŸ“Š Model Performance

Metric Value
Loss 1.2301
Accuracy 95.69%

πŸ–₯️ How to Run

  1. Clone the repository

    git clone https://github.com/AdMub/Chicken-Disease-Classification-End-to-End-Project.git
    cd Chicken-Disease-Classification-End-to-End-Project
  2. Create and activate a virtual environment

python -m venv venv
source venv/bin/activate    # Linux/Mac
venv\Scripts\activate       # Windows
  1. Install dependencies
pip install -r requirements.txt
  1. Run DVC pipeline
dvc repro
  1. Start the Flask app
python app.py
  1. Open in browser
http://127.0.0.1:8080

🐳 Docker Setup

Build and run backend in Docker:

docker build -t chicken-disease-classifier .
docker run -p 8080:8080 chicken-disease-classifier

⚑ CI/CD (GitHub Actions)

This project uses GitHub Actions for automation:

  • βœ… Code linting & testing
  • 🐳 Build & push Docker image
  • ☁️ Deploy to AWS

Workflow file: .github/workflows/main.yml

CI-CD

πŸ“œ License

This project is licensed under the MIT License – see the LICENSE file for details.


✨ Acknowledgments

  • TensorFlow & Keras for deep learning framework

  • DVC for experiment tracking and reproducibility

  • GitHub Actions for CI/CD automation

  • Poultry farmers & veterinary experts for inspiring this solution


πŸ‘¨β€πŸ’» Author

Mubarak Adisa

  • πŸŽ“ Civil Engineering + Computer Science (Data Science & AI Focus)
  • πŸ”— GitHub: AdMub
  • πŸ’Ό LinkedIn: Mubarak Adisa

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors