- Introduction
- Flask App
- How To Run?
- Main Files of Structure
- Deployment
- Continuous Integration and Continuous Deployment (CI/CD)
Link to Video Explanation of Project - https://youtu.be/wsyCQOQOwuc?si=Ys4MtYWFtxNy47oJ
This project aims to create a Flask web application for the detection of pneumonia using X-ray images. With a 22-layered neural network model, we have achieved an accuracy rate of 91%. The project is designed with a modular approach, with different files dedicated to data ingestion, preparing callbacks, training, and prediction. Deployment was carried out on AWS using Docker containerization, and we have established a CI/CD pipeline through GitHub Actions.
Clone the repository
https://github.com/sandesh0202/Xray-for-Pneumonia
conda create -n xray python=3.11.3 -y
conda activate xray
pip install -r requirements.txt
#Finally run the following command
python app.py
Now, open up you local host and port
dvc init
dvc repro
dvc dag
#with specific access
1. EC2 access : It is virtual machine
2. ECR: Elastic Container registry to save your docker image in aws
#Description: About the deployment
1. Build docker image of the source code
2. Push your docker image to ECR
3. Launch Your EC2
4. Pull Your image from ECR in EC2
5. Lauch your docker image in EC2
#Policy:
1. AmazonEC2ContainerRegistryFullAccess
2. AmazonEC2FullAccess
Create and Download the Access Key and Secret Access Key from IAM -> Settings
Save the URI - demo > 691258540533.dkr.ecr.ap-south-1.amazonaws.com/xray
#optional
sudo apt-get update -y
sudo apt-get upgrade
#required
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker
setting>actions>runner>new self hosted runner> choose os> then run command one by one
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION = ap-south-1
AWS_ECR_LOGIN_URI = demo>> 691258540533.dkr.ecr.ap-south-1.amazonaws.com
ECR_REPOSITORY_NAME = xray
- config.yaml - Contains location of files
- params.yaml - Adjust Project Parameters as per Requirements
- entity - Update the Configuration
- configuration manager in src config - Reads configuration & creates directories.
- components - Main Functions of Project
- pipeline - Pipeline for End-to-End Processing
- main.py - Main file for Final Execution
- dvc.yaml - Execution using DVC
- app.py - Flask Web App File
- templates/index.html - Design of Web App
The application has been deployed on AWS using Docker containerization. This allows users to access the pneumonia detection service over the internet. The Docker container ensures that the application and its dependencies are isolated and can be easily deployed and scaled.
We have established a CI/CD pipeline using GitHub Actions. This pipeline automates the process of building, testing, and deploying the application whenever changes are pushed to the repository. This ensures that the application remains up to date and reliable.
Thank you for your interest in our Pneumonia Detection Using X-Ray Images project. If you have any questions or feedback, please don't hesitate to reach out.
Happy coding!