safetyMaster / README_HF.md
mrvero's picture
Upload folder using huggingface_hub
0469d65 verified

A newer version of the Gradio SDK is available: 5.43.1

Upgrade
metadata
title: SafetyMaster Pro
emoji: πŸ›‘οΈ
colorFrom: blue
colorTo: red
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
license: mit

πŸ›‘οΈ SafetyMaster Pro - AI Safety Monitoring

Real-time PPE detection and safety compliance monitoring using YOLOv8

🎯 Features

  • πŸ” Hard Hat Detection - Identifies workers wearing/missing hard hats
  • 🦺 Safety Vest Detection - Detects high-visibility safety vests
  • 😷 Face Mask Detection - Monitors mask compliance
  • πŸ‘“ Safety Glasses Detection - Identifies protective eyewear
  • πŸ“Ή Real-time Monitoring - Live camera feed analysis
  • πŸ“‹ Violation Logging - Track safety compliance history
  • 🚨 Instant Alerts - Immediate violation notifications

πŸš€ How to Use

πŸ“· Image Analysis

  1. Go to the "Image Analysis" tab
  2. Upload an image or drag & drop
  3. Click "Analyze Safety Compliance"
  4. View detection results with bounding boxes

πŸ“Ή Live Camera Monitoring

  1. Go to the "Live Camera Monitoring" tab
  2. Click "Start Monitoring"
  3. Allow camera access when prompted
  4. Watch real-time safety detection

πŸ“‹ View Violations

  1. Go to the "Violation Log" tab
  2. See recent safety violations
  3. Monitor compliance trends

πŸ€– AI Technology

  • Model: YOLOv8 specialized for PPE detection
  • Detection Classes: Person, Hard Hat, Safety Vest, Face Mask, Safety Glasses
  • Violation Detection: Missing PPE identification
  • Performance: Real-time inference on CPU

πŸ›‘οΈ Safety Equipment Detected

  • βœ… Hard Hats / Helmets
  • βœ… Safety Vests / High-Vis Clothing
  • βœ… Face Masks / Respirators
  • βœ… Safety Glasses / Goggles
  • βœ… Hearing Protection
  • βœ… Safety Gloves

⚠️ Violations Detected

  • πŸ”΄ Missing Hard Hat
  • πŸ”΄ Missing Safety Vest
  • πŸ”΄ Missing Face Mask
  • πŸ”΄ Person without Required PPE

🎨 Interface

The app features a modern, tabbed interface:

  • Image Analysis: Upload and analyze photos
  • Live Monitoring: Real-time camera detection
  • Violation Log: Safety compliance history
  • Model Info: AI model details and capabilities

πŸ”§ Technical Details

  • Framework: Gradio + YOLOv8
  • Languages: Python, OpenCV
  • Deployment: Hugging Face Spaces
  • License: MIT

πŸ“ž Support

Built with ❀️ for workplace safety. This tool helps ensure workers are properly equipped with safety gear to prevent accidents and maintain compliance.


⚠️ Note: For camera monitoring, please allow camera access when prompted by your browser.