CoolFace
Apppublic

Neylton/ppe-safety-inspector

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

๐Ÿฆบ IMSafe PPE Compliance Inspector

Professional AI-powered workplace safety system for Personal Protective Equipment (PPE) compliance detection.

![Hugging Face Spaces](https://huggingface.co/spaces/YOUR_USERNAME/ppe-safety-inspector)

๐ŸŽฏ Overview

IMSafe PPE Inspector is an advanced computer vision system designed to automatically detect and verify Personal Protective Equipment compliance in workplace environments. The system ensures workers are wearing both safety helmets and high-visibility safety vests before granting access to hazardous work areas.

โœจ Key Features

  • โ€”๐Ÿ” Real-time PPE Detection: Instant analysis of worker safety compliance
  • โ€”๐ŸŽฏ High Accuracy: Trained on professional workplace safety datasets
  • โ€”โš™๏ธ Configurable Thresholds: Adjustable confidence levels for different safety requirements
  • โ€”๐Ÿšจ Clear Decision Making: Immediate ALLOW/DENY decisions with detailed reasoning
  • โ€”๐Ÿ“Š Detailed Analytics: Confidence scores and probability breakdowns
  • โ€”๐ŸŒ Web Interface: Easy-to-use Streamlit interface for immediate deployment

๐Ÿ›ก๏ธ Safety Requirements

โœ… SAFE (Access Granted)

  • โ€”Worker wearing safety helmet on head
  • โ€”Worker wearing high-visibility safety vest/jacket
  • โ€”Both items clearly visible and properly worn
  • โ€”Confidence level above configured threshold

โŒ UNSAFE (Access Denied)

  • โ€”Missing safety helmet
  • โ€”Missing safety vest/jacket
  • โ€”Either item improperly worn
  • โ€”Low confidence in detection

๐Ÿš€ Quick Start

Option 1: Use Online (Recommended)

Visit our live demo: IMSafe PPE Inspector

Option 2: Local Installation

bash
# Clone the repository
git clone https://huggingface.co/spaces/YOUR_USERNAME/ppe-safety-inspector
cd ppe-safety-inspector

# Install dependencies
pip install -r requirements.txt

# Run the application
streamlit run app.py

๐Ÿ“– How to Use

  1. 1.Upload Image: Click "Choose an image of a worker..." and select a photo
  2. 2.Automatic Analysis: The system immediately analyzes the uploaded image
  3. 3.View Results: Get instant ALLOW/DENY decision with confidence scores
  4. 4.Adjust Settings: Use the sidebar to modify confidence thresholds

๐Ÿ”ง Technical Details

Model Architecture

  • โ€”Type: Custom Convolutional Neural Network (CNN)
  • โ€”Input: RGB images (224x224 pixels)
  • โ€”Output: Binary classification (Safe/Unsafe PPE)
  • โ€”Framework: PyTorch
  • โ€”Inference: CPU-optimized for fast deployment

Training Data

  • โ€”Dataset Size: 156+ professionally verified images
  • โ€”Classes: Safe PPE (helmet + vest) vs Unsafe PPE (missing equipment)
  • โ€”Validation: Stratified train/test split with balanced accuracy metrics
  • โ€”Augmentation: Color-blind training to prevent bias toward specific colors

Performance Metrics

  • โ€”Overall Accuracy: 84.4%+
  • โ€”Safe PPE Detection: 88.2%+
  • โ€”Unsafe PPE Detection: 80.0%+
  • โ€”Inference Time: <1 second per image

โš ๏ธ Important Safety Notice

This AI system is designed to assist with PPE compliance checking but should not be the sole method for ensuring workplace safety. Always combine with:

  • โ€”Human oversight and verification
  • โ€”Regular safety training programs
  • โ€”Compliance with local safety regulations
  • โ€”Organization-specific safety protocols

๐Ÿ—๏ธ Use Cases

  • โ€”Construction Sites: Entry gate monitoring
  • โ€”Manufacturing Facilities: Production floor access control
  • โ€”Industrial Plants: Hazardous area compliance checking
  • โ€”Warehouses: Safety zone entry verification
  • โ€”Mining Operations: Equipment area access control

๐Ÿ”ฌ Model Development

The PPE detection model was developed using:

  • โ€”Balanced Training: Equal emphasis on both safe and unsafe detection
  • โ€”Color-Blind Augmentation: Prevents bias toward specific vest colors
  • โ€”Shape-Focused Learning: Emphasizes helmet and vest shapes over colors
  • โ€”Professional Validation: Verified against real workplace safety scenarios

๐Ÿ“Š Confidence Thresholds

Recommended settings based on safety requirements:

  • โ€”High Security (0.85+): Critical safety areas, zero tolerance
  • โ€”Standard Security (0.75): Regular workplace monitoring
  • โ€”Monitoring Mode (0.65): Training and awareness applications

๐Ÿค Contributing

We welcome contributions to improve workplace safety through AI:

  1. 1.Dataset Expansion: Additional verified PPE images
  2. 2.Model Improvements: Enhanced detection algorithms
  3. 3.Feature Requests: New safety compliance features
  4. 4.Bug Reports: Issues and edge cases

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • โ€”Workplace safety professionals who validated our training data
  • โ€”Open source computer vision community
  • โ€”PyTorch and Streamlit development teams

๐Ÿ“ž Support

For questions, issues, or deployment assistance:

  • โ€”Create an issue in this repository
  • โ€”Contact: [Your contact information]

<div align="center">

๐Ÿ›ก๏ธ Protecting Workers Through AI-Powered Safety Compliance

Built with โค๏ธ for workplace safety

</div>