File size: 2,589 Bytes
0469d65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
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.