This project focuses on building an end-to-end system for classifying chicken diseases using Convolutional Neural Networks (CNNs). The model is trained to distinguish between healthy chickens and those affected by Coccidiosis based on fecal images. The project includes deployment and testing workflows on AWS and Azure for practical usability.
Chicken diseases, especially Coccidiosis, are a significant challenge in poultry farming. Early and accurate detection is crucial to minimizing losses. This project leverages deep learning to automate the classification process, offering a scalable solution for poultry health management.
- Deep Learning Model: CNN-based classifier trained on chicken fecal images.
- End-to-End System: Includes model training, evaluation, deployment, and testing workflows.
- Multi-Cloud Deployment: Integrated deployment pipelines for AWS and Azure.
- DVC Integration: Tracks data and model versioning efficiently.
- Update
config.yaml - Update
secrets.yaml(optional) - Update
params.yaml - Define entities
- Configure the
ConfigurationManagerin thesrc/configdirectory - Implement core components
- Create and test the pipeline
- Update
main.py - Modify the
dvc.yamlfor pipeline versioning
git clone https://github.com/Monish-Nallagondalla/CNN_Classifier.git
cd CNN_ClassifierCreate and activate a Conda environment:
conda create -n cnncls python=3.12 -y
conda activate cnnclspip install -r requirements.txtpython app.pyOpen your browser and navigate to your local host and port as specified by the application.
-
Initialize DVC:
dvc init
-
Reproduce the pipeline:
dvc repro
-
Visualize the pipeline DAG:
dvc dag
-
Data Preprocessing:
- Cleanses and augments input images.
- Ensures data consistency for training.
-
Model Training:
- CNN architecture optimized for image classification.
- Trained on a labeled dataset of healthy and Coccidiosis-affected chicken fecal images.
-
Evaluation:
- Validates model performance using precision, recall, and accuracy metrics.
- Includes visualization of training and validation loss curves.
-
Deployment:
- Packaged as a Docker container.
- Tested on AWS (ECR + EC2) and Azure (Azure Container Registry + Web App).
- Build Docker image.
- Push the image to Amazon ECR.
- Launch an EC2 instance.
- Pull the image from ECR to the EC2 instance.
- Run the application in the EC2 instance.
- Build Docker image.
- Push the image to Azure Container Registry.
- Deploy the image to an Azure Web App Server.
- Launch the application from the container registry.
- Add support for additional chicken diseases.
- Optimize the model for real-time inference.
- Incorporate more advanced deployment pipelines (e.g., Kubernetes).
- Explore edge computing for on-site disease classification.
Contributions are welcome! Please fork this repository and submit a pull request with your proposed changes.
This project is inspired by the need for automated disease detection in poultry farming, ensuring healthier chickens and reducing economic losses.
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy Coding! 🐔