Skip to content

AWS cloud application ☁️ for automated PPE detection 😷 using cloudformation 🌥️, serverless lambda λ, and rekognition 👁️

License

Notifications You must be signed in to change notification settings

adamdon/cloud-ppe-detection

Repository files navigation

cloud-ppe-detection

A cloud application that deploys a fully automated AWS system, this system scans images using pre-trained models to provide both Personal Protective Equipment (PPE) and item Label detection. The results report on Labels found as well as if any detected persons are wearing full PPE correctly on both hands and face.

System Architecture

Systems Architecture

CloudFormation Design

CloudFormation Design

Installation

With Python and boto3 installed, the application can be run from anywhere with access to your aws credentials. The simplest way to do this if from the Cloud9 IDE.

pip install boto3
git clone https://github.com/adamdon/cloud-ppe-detection.git
cd cloud-ppe-detection

Environment

The only AWS setup required is to have a IAM Role with permissions for CreateRole and AttachRolePolicy. A valid RSA key pair must also be in place for use with the EC2

If the permissions aren't in place you can add the IAM policy bellow to any Role.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "iam:AttachRolePolicy",
        "iam:CreateRole"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

To use the optional SMS alert feature, ensure that your account is out of SNS Sandbox. If this is not the case you can just pre-authorise your cell phone number and make sure the budget is set to at least $1.

Usage

There are three parameters configuration options for running the application.

Default values (suitable for AWS Academy Learner Lab)

python3 start.py

Custom values ("tagSuffix" is the unique name to add to all resources)

python3 start.py [tagSuffix] [iamName] [KeyName]

Custom values (optional) ("alertNumber" is a mobile number for PPE violation alerts)

python3 start.py [tagSuffix] [iamName] [KeyName] [alertNumber]

examples

python3 start.py
python3 start.py s1025475 LabRole vockey
python3 start.py s1025475 LabRole vockey +447700900000

The output is viewable from the DynamoDB Table resource.

License

MIT

About

AWS cloud application ☁️ for automated PPE detection 😷 using cloudformation 🌥️, serverless lambda λ, and rekognition 👁️

Topics

Resources

License

Stars

Watchers

Forks

Languages