Skip to content

kunalmishravitb/End-to-End-Waste-Detection-Using-YOLOv5

Repository files navigation

🗑️ End-to-End Waste Detection Using YOLOv5

⚙️ Workflows

  1. 📂 constants
  2. 📂 entity
  3. 📂 components
  4. 📂 pipelines
  5. 👷️ app.py

✨ How to Run?

✔️ STEPS:

💿 Clone the repository

https://github.com/kunalmishravitb/End-to-End-Waste-Detection-Using-YOLOv5.git

♻️ STEP 01 - Create a conda environment

conda create -n waste python=3.10 -y
conda activate waste

💪 STEP 02 - Install the requirements

pip install -r requirements.txt

🚀 Run the application:

python app.py

👀 Open your local host and port


🚀 AWS CICD Deployment with GitHub Actions

1. 🌐 Login to AWS Console

2. 🧠 Create IAM User for Deployment

🔒 With Specific Access:

  1. EC2 Access: Virtual machine setup
  2. 🏢 ECR: Store Docker images in AWS

✅ Deployment Workflow:

  1. 🎨 Build Docker image of the source code
  2. 💾 Push Docker image to ECR
  3. 🚀 Launch EC2 instance
  4. 🏢 Pull image from ECR in EC2
  5. 🏰 Launch Docker image in EC2

🛠️ Required Policies:

  1. 🔧 AmazonEC2ContainerRegistryFullAccess
  2. 🏢 AmazonEC2FullAccess

3. 🏢 Create ECR Repo to Store Docker Image

- Save the URI: `566373416292.dkr.ecr.ap-south-1.amazonaws.com/waste`

4. 🏢 Create EC2 Machine (Ubuntu)

5. 🚒 Install Docker in EC2 Machine

sudo apt-get update -y
sudo apt-get upgrade
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker

6. 🧱 Configure EC2 as Self-Hosted Runner

Go to Settings > Actions > Runner > New Self-Hosted Runner and follow the instructions.

7. 🔐 Setup GitHub Secrets

AWS_ACCESS_KEY_ID=xxxxx
AWS_SECRET_ACCESS_KEY=xxxxx
AWS_REGION=us-east-1
AWS_ECR_LOGIN_URI=566373416292.dkr.ecr.ap-south-1.amazonaws.com
ECR_REPOSITORY_NAME=simple-app

📀 Azure CICD Deployment with GitHub Actions

🔒 Save Password

s3cEZKH5***************ACRCZ7JD6

🛠️ Run from Terminal

docker build -t chickenapp.azurecr.io/chicken:latest .
docker login chickenapp.azurecr.io
docker push chickenapp.azurecr.io/chicken:latest

✅ Deployment Steps

  1. 🎨 Build Docker image of the source code
  2. 💾 Push Docker image to Container Registry
  3. 🏢 Launch Web App Server in Azure
  4. 🛠️ Pull the Docker image from the container registry to Web App server and run

About

Waste detection system using YOLOv5 for real-time object detection and classification of waste types.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published