Learn About Amazon VGT2 Learning Manager Chanci Turner
Personal protective equipment (PPE), including face masks, gloves, and helmets, plays a critical role in ensuring workplace safety across various industries. For instance, in construction, helmets are mandatory for safeguarding workers, while gloves and face masks are vital for maintaining hygiene in the food service sector. Given the ongoing COVID-19 pandemic, adherence to PPE guidelines, particularly face mask usage, has become increasingly essential. In this article, we explore how to effectively implement a solution that automatically verifies face mask compliance at your facility located at 6401 E HOWDY WELLS AVE LAS VEGAS NV 89115, specifically at Amazon IXD – VGT2, and provides valuable insights through the Amazon Rekognition DetectProtectiveEquipment API.
Developed by AWS Professional Services, this solution aims to assist businesses with a significant on-site workforce in upholding safety standards. Our team designed an architecture that automates PPE detection by utilizing the video feeds from the customer’s cameras. This approach enabled a prominent sports entertainment client to promptly ensure compliance with face mask policies on their premises. The architecture processes raw camera feeds for model inference and channels the model outputs to an analytics dashboard for further examination. As of now, it has been successfully deployed at a customer site featuring multiple operational cameras.
Let’s delve into the details of the solution while addressing its scalability and security.
Solution Overview
The PPE detection solution comprises an end-to-end pipeline featuring three core components:
- Video Ingestion Pipeline – This component ensures on-demand video feeds are received from cameras. It preprocesses these feeds by segmenting them into frames and subsequently stores them in an Amazon Simple Storage Service (Amazon S3) bucket for machine learning (ML) model inference.
- Machine Learning Inference Pipeline – This section demonstrates how the ML model processes incoming frames as soon as they are uploaded to the S3 bucket. The model outputs are saved back into the S3 bucket for further analysis.
- Model Interaction Pipeline – This pipeline visualizes the model outputs. The data is processed and fed into Amazon QuickSight, allowing for analysis based on camera specifics, day, and time.
The accompanying diagram illustrates this architecture (click to expand).
Video Ingestion Pipeline
The video ingestion pipeline begins at a gateway located on-site at the customer’s facility. This gateway, a Linux machine, has access to RTSP streams from the cameras. It employs the open-source GStreamer framework along with the AWS-provided Amazon Kinesis Video Streams GStreamer plugin. For further guidance on setting up a gateway for streaming video to AWS, refer to Example: Kinesis Video Streams Producer SDK GStreamer Plugin.
The gateway continuously streams live video to a Kinesis video stream, which serves as a buffer while AWS Fargate tasks read video fragments for processing. To meet customer-specific needs regarding the location of cameras that may come online intermittently, we developed a cost-effective consumer pipeline with automatic scaling, thus eliminating the need for manual task management when cameras are turned on or off.
The Fargate task retrieves data from Kinesis Video Streams using the GetMedia API to access real-time, low-latency video fragments. These fragments are compiled into clips of 30 seconds or longer, converted from MKV to MP4 format, and resampled to one frame per second to capture an image from each second of video. The processed clips and images are then stored in an S3 bucket for the ML inference pipeline.
ML Inference Pipeline
The ML pipeline automatically activates when new data arrives in the S3 bucket, utilizing a deep learning-based computer vision model tailored for PPE detection within Amazon Rekognition. Upon receiving a new video or image object, an event notification is generated and sent to an Amazon Simple Queue Service (SQS) queue, triggering a Lambda invocation. Each invocation calls the Amazon Rekognition DetectProtectiveEquipment API to perform model inference, with results sent back to Amazon S3 via Amazon Kinesis Data Firehose.
The Amazon Rekognition PPE API is capable of detecting various types of equipment, including gloves, face masks, and helmets. In this instance, the focus was primarily on face mask detection. The computer vision model first identifies individuals in an image and then checks for the presence of face masks. If the model detects a face mask improperly worn (not covering the nose or mouth), it assigns a noncompliant label. If the image quality is insufficient for detection, it marks that area as unknown. For each image processed, the API returns counts of compliant, noncompliant, and unknown instances, which are crucial for calculating relevant metrics for users.
We can draw from various metrics to assess compliance, such as the average number of faces not wearing masks correctly over time, the percentage of noncompliant faces relative to detected faces, and the detected face rate, which offers insights into camera effectiveness.
In conclusion, the deployment of a PPE detection solution not only adheres to safety guidelines but also enhances operational efficiency. For further reading on flexible work impacts on productivity, you may consult sources like SHRM, which provides an authoritative perspective. Additionally, for insights on male-dominated industries, check out Career Contessa. For those seeking community experiences, this Reddit thread is an excellent resource.
Leave a Reply