How krishnaik06/chicken-disease-classification-projects works
Project Type and Purpose
• This project is a full-stack machine-learning application with:
• An ML pipeline (data ingestion → preprocessing → model training → evaluation → prediction)
• A REST/HTML interface (app.py + templates) for inference
• Reproducibility via DVC (dvc.yaml, dvc.lock)
• Containerization (Dockerfile) and CI/CD (GitHub Actions, AWS/Azure)
A. Data & Configuration
– Raw data store (local folder, remote S3 if used)
– config/config.yaml, params.yaml, secrets.yaml (optional)
– src/cnnClassifier/config & entity modules (centralized config manager)
B. ML Pipeline (Python modules under src/cnnClassifier/components & pipeline)
1. Data Ingestion (components/data_ingestion.py → pipeline/stage_01_data_ingestion.py)
2. Base Model Preparation (components/prepare_base_model.py → pipeline/stage_02_prepare_base_model.py)
3. Callbacks Preparation (components/prepare_callbacks.py → pipeline/stage_03_prepare_callbacks)
4. Model Training (components/training.py → pipeline/stage_03_training.py)
5. Model Evaluation (components/evaluation.py → pipeline/stage_04_evaluation.py)
6. Prediction Service (pipeline/predict.py)
C. DVC Reproducibility
– dvc.yaml defines pipeline stages, artifacts, commands
– dvc repro & dvc dag for orchestration
D. Web Application
– app.py (Flask/FastAPI entry point)
– template.py & templates/index.html (UI layer)
E. Container & Deployment
– Dockerfile builds the app + dependencies
– GitHub Actions workflows (.github/workflows/*.yml) for CI/CD
– AWS components: ECR (artifact registry), EC2 (host), IAM roles
– Azure components (optional): Azure Container Registry, Web App
F. External Services
– (Optionally) S3 or other data storage
– (Optionally) Model registry if extended
Interactions & Data Flow
1. Config → ML Pipeline stages
2. Pipeline stages producing model artifacts (saved .pkl or .h5)
3. DVC tracking of inputs/outputs between stages
4. Prediction Service reading the trained model
5. Web App receiving HTTP requests → invokes prediction pipeline
6. CI/CD pipelines triggered by code pushes → build Docker image → push to ECR/Azure CR → deploy to EC2/Web App
Architectural Patterns & Principles
• Modular ML pipeline (each stage is its own component + script)
• Configuration-driven design (params.yaml + config manager)
• Infrastructure as code / reproducibility (DVC + Docker + GitHub Actions)
• Separation of concerns (data processing vs. model vs. serving layer)
Serving Layer (Flask app) loading the model + UI template
5. CI/CD Layer (GitHub Actions) building the Docker image → pushing to registry → deploying to host (EC2 or Azure Web App)