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.
-
π 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 }
- βοΈ Custom Exception Handling β With
BoxValueErrorfor 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)
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--
Home β Project introduction
Form - Upload chicken image for prediction
Result - Displays prediction result
- 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
| Metric | Value |
|---|---|
| Loss | 1.2301 |
| Accuracy | 95.69% |
-
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 -
Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
- Install dependencies
pip install -r requirements.txt
- Run DVC pipeline
dvc repro
- Start the Flask app
python app.py
- Open in browser
http://127.0.0.1:8080
Build and run backend in Docker:
docker build -t chicken-disease-classifier .
docker run -p 8080:8080 chicken-disease-classifierThis project uses GitHub Actions for automation:
- β Code linting & testing
- π³ Build & push Docker image
- βοΈ Deploy to AWS
Workflow file: .github/workflows/main.yml
This project is licensed under the MIT License β see the LICENSE file for details.
-
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
Mubarak Adisa
- π Civil Engineering + Computer Science (Data Science & AI Focus)
- π GitHub: AdMub
- πΌ LinkedIn: Mubarak Adisa