How to Use AI to Detect PPE Compliance in Edge Environments

For organizations deploying edge AI applications for safety monitoring, significant challenges exist, including provisioning and managing edge devices, deploying Kubernetes runtimes and ensuring real-time inference.
These challenges are typically faced by IT and operational technology (OT) teams responsible for deploying and managing edge infrastructure in industries where worker safety is critical. These industries include construction, manufacturing, mining, oil and gas, and other sectors requiring compliance with personal protective equipment (PPE) regulations.
The consequences of not addressing these challenges include delays in implementing safety measures, increased risk of accidents and injuries due to lack of real-time monitoring, and potential difficulties in meeting safety regulations and compliance requirements.
About the Demo
This demo addresses these challenges and showcases how an edge computing platform simplifies the deployment of a PPE-detection edge AI application as a Kubernetes workload. The solution leverages ZEDEDA for edge device management, Rancher for Kubernetes orchestration and Terraform for automation, enabling streamlined deployment and management of distributed edge nodes.
It uses YOLOv8-based AI models for real-time hard-hat detection on multiple video streams simultaneously. It also demonstrates a feedback loop mechanism that captures low-confidence predictions for retraining the AI model over time.
Follow along with the demo to explore how an edge computing platform simplifies edge AI deployment for PPE detection.
Prerequisites
To execute this demo, several technical prerequisites are necessary:
- An edge device running EVE-OS, an open source, Linux-based operating system for distributed edge computing equipped with a GPU (e.g., HP Edge Device).
- A ZEDEDA tenant account managing the edge device.
- Preprovisioned K3s (lightweight Kubernetes) runtime with GPU drivers and NVIDIA container runtime.
- Access to a Rancher Kubernetes management server.
- Terraform for automation.
- A Helm chart repository (e.g., GitHub) containing the PPE detection application.
The demo setup involves:
- Automated deployment of a K3s cluster runtime on a ZEDEDA-managed edge node with GPU support using Terraform, including preprovisioning with GPU drivers and the NVIDIA container runtime.
- Automatic attachment of the newly created K3s cluster to a Rancher management server using Terraform.
- Adding the Helm chart for the PPE detection application (stored in a repository like GitHub) to the Rancher marketplace using Terraform.
- Deploying the PPE detection application as a pod onto the Kubernetes cluster managed by Rancher, utilizing the Helm chart. This involves pulling the container image (which can be large, around 10GB).
- Demonstrating the application receiving multiple video streams, performing real-time inference to detect hard hats, and generating metrics about the detections.
- Showing how frames with low confidence in the AI model’s prediction are captured and stored for potential retraining.
- The availability of a “kubeconfig” file for local management of the Kubernetes cluster.
Key Capabilities in the Demo
This demonstration highlights three key technical features:
- Automated deployment: Terraform automates the deployment of Kubernetes-based edge AI applications across managed devices and Rancher-managed workloads, simplifying the management of both the edge infrastructure and the Kubernetes workloads.
- Real-time inference: The PPE detection application performs real-time analysis on multiple video streams to detect hard hats, enabling immediate analysis and feedback at the source.
- Continuous improvement: A feedback loop captures low-confidence predictions for retraining the AI model, improving accuracy over time.
The demo highlights metrics such as the number of people detected, how many are wearing helmets and confidence levels for each detection.
How the Technology Works
The solution integrates multiple technologies to address deployment complexities:
- ZEDEDA: Simplifies edge device management and deployment of K3s runtime.
- Kubernetes (K3s): Lightweight Kubernetes distribution deployed on the edge device for container orchestration.
- Rancher: Manages Kubernetes workloads and orchestrates application deployment via Helm charts.
- Terraform: Automates deployment processes across ZEDEDA and Rancher platforms, enabling the automated deployment of the K3s cluster, attachment to Rancher and deployment of the PPE detection application.
- YOLOv8 Model: Retrained open source object detection model used for hard hat classification.
- NVIDIA runtime: Enables GPU acceleration for AI inference.
The workflow involves deploying the K3s runtime on an edge device using Terraform, attaching it to Rancher for workload orchestration, adding the PPE detection Helm chart to Rancher’s marketplace and deploying the application as a pod. The application processes video streams locally on the device, enabling real-time inference.
Benefits of This Approach
Immediate benefits for organizations adopting an edge computing platform include:
- Simplified and faster deployment of edge AI applications due to automation.
- Real-time insights into PPE compliance at the edge, enabling quicker identification of safety violations.
- Reduced latency in detection compared to cloud-based processing, as inference happens locally.
Long-term benefits include:
- Enhanced worker safety and a stronger safety culture through consistent and real-time monitoring.
- Continuous improvement in the accuracy and reliability of the PPE detection system through the model retraining mechanism.
- Future-proofing of infrastructure by leveraging Kubernetes for application deployment and management at the edge.
Use Cases
Industries that can benefit from this solution include:
- Construction: Cameras on site can check for hard hats, high-visibility vests, safety boots and harnesses.
- Manufacturing: Edge nodes on the manufacturing floor can verify safety glasses, cut-resistant gloves, shields and respirators when required.
- Oil and gas: Cameras on drill floors, refineries and confined-space hatches detect flame-resistant coveralls, hearing protection and self-contained breathing apparatus (SCBA) masks in hazardous environments.
- Any industry requiring compliance with PPE regulations: Benefits include proactive safety monitoring, automating compliance logging and reducing labor costs of manual spot-checks from safety teams.
Specific use cases demonstrated in the demo include:
- Hard-hat detection in industrial environments.
- Real-time safety monitoring across distributed sites.
- Continuous improvement of safety systems through AI model retraining.
ZEDEDA enables organizations to overcome the challenges of deploying edge AI applications for safety monitoring, providing simplified deployment, real-time insights and continuous improvement that enhance worker safety and streamline operations. Learn more about how to unlock the power of distributed AI with ZEDEDA.