Spaces:
Runtime error
Runtime error
File size: 5,490 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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# SafetyMaster Pro - Mac Setup Guide ๐
## ๐ Quick Start for Mac Users
There are now **4 easy ways** to run SafetyMaster Pro on your Mac:
---
## ๐ฏ Method 1: Double-Click App Bundle (EASIEST)
### โ
**Recommended for most Mac users**
1. **Find the app**: Look for `SafetyMaster Pro.app` in your download folder
2. **Double-click**: Just double-click the app icon
3. **Grant permissions**: Allow camera access when prompted
4. **Wait**: The app will automatically open your browser to http://localhost:8080
### ๐ **If you get a security warning:**
- Right-click the app โ "Open" โ "Open" (this bypasses Gatekeeper)
- Or go to System Preferences โ Security & Privacy โ "Open Anyway"
---
## ๐ฅ๏ธ Method 2: Terminal Command File
### โ
**For users comfortable with Terminal**
1. **Find the file**: Look for `START_SafetyMaster_Mac.command`
2. **Double-click**: This will open Terminal and start the app
3. **Follow prompts**: The script will guide you through setup
---
## ๐ป Method 3: Manual Terminal (Advanced)
### โ
**For developers and advanced users**
1. **Open Terminal** (Applications โ Utilities โ Terminal)
2. **Navigate to folder**:
```bash
cd /path/to/SafetyMasterPro_folder
```
3. **Install dependencies**:
```bash
python3 -m pip install -r requirements.txt
```
4. **Run the application**:
```bash
python3 web_interface.py
```
5. **Open browser**: Go to http://localhost:8080
---
## ๐ณ Method 4: Docker (IT/Enterprise)
### โ
**For IT teams and containerized deployment**
1. **Install Docker Desktop** from https://docker.com
2. **Open Terminal** and navigate to the project folder
3. **Build and run**:
```bash
docker-compose up --build
```
4. **Access**: Open http://localhost:8080
---
## ๐ง Prerequisites
### **Required:**
- **macOS 10.14+** (Mojave or newer)
- **Python 3.8+** - Install from https://python.org/downloads/macos/
- **Webcam or USB camera**
- **4GB RAM minimum** (8GB recommended)
### **Optional but recommended:**
- **Homebrew** for easier Python management: https://brew.sh
```bash
brew install python3
```
---
## ๐ฅ Camera Permissions
### **First time setup:**
1. When you first run the app, macOS will ask for camera permission
2. Click **"OK"** to allow camera access
3. If you accidentally denied it:
- Go to **System Preferences** โ **Security & Privacy** โ **Camera**
- Check the box next to **Terminal** or **SafetyMaster Pro**
---
## ๐ Troubleshooting
### **"Python not found" error:**
```bash
# Install Python 3
brew install python3
# Or download from python.org
```
### **"Permission denied" error:**
```bash
# Make the script executable
chmod +x START_SafetyMaster_Mac.command
```
### **"App can't be opened" security warning:**
1. Right-click the app
2. Select "Open"
3. Click "Open" in the dialog
### **Camera not working:**
1. Check System Preferences โ Security & Privacy โ Camera
2. Make sure SafetyMaster Pro has permission
3. Try a different camera source in the web interface
### **Dependencies won't install:**
```bash
# Upgrade pip first
python3 -m pip install --upgrade pip
# Then try installing requirements again
python3 -m pip install -r requirements.txt
```
### **Port 8080 already in use:**
```bash
# Kill any existing processes
sudo lsof -ti:8080 | xargs kill -9
# Or use a different port
python3 web_interface.py --port 8081
```
---
## ๐ฎ Using SafetyMaster Pro
### **Once running:**
1. **Open browser**: Go to http://localhost:8080
2. **Start monitoring**: Click "Start Monitoring" button
3. **Grant camera access**: Allow when prompted
4. **Position camera**: Make sure people and safety equipment are visible
5. **Monitor compliance**: Watch real-time detection and statistics
### **Features:**
- โ
**Real-time PPE detection**: Hard hats, safety vests, face masks
- โ
**High performance**: 30+ FPS optimized
- โ
**Clean interface**: Only shows equipment when worn
- โ
**Violation tracking**: Real-time compliance monitoring
- โ
**Statistics**: People count, compliance rate, violation log
---
## ๐ Privacy & Security
### **Your data stays local:**
- โ
All AI processing happens on your Mac
- โ
No data sent to external servers
- โ
Camera feed never leaves your device
- โ
Optional violation image storage (local only)
---
## ๐ Support
### **If you need help:**
1. **Check the console**: Look for error messages in Terminal
2. **Verify requirements**: Make sure Python 3.8+ is installed
3. **Test camera**: Try other camera apps to verify hardware
4. **Restart**: Close and restart the application
### **Common solutions:**
- Update to latest macOS version
- Install latest Python from python.org
- Grant all necessary permissions
- Check internet connection for first-time model download
---
## ๐ฏ Performance Tips
### **For best results:**
- **Close other applications** to free up resources
- **Use good lighting** for better AI detection accuracy
- **Position camera** to clearly see people and safety equipment
- **Stable internet** for initial model downloads (first run only)
---
## โ
Quick Checklist
Before running SafetyMaster Pro:
- [ ] Python 3.8+ installed
- [ ] Camera connected and working
- [ ] Camera permissions granted
- [ ] Internet connection available (first run)
- [ ] At least 4GB free RAM
---
**SafetyMaster Pro v1.0** - Professional AI-powered safety monitoring for Mac
๐ Optimized for macOS with native app bundle support |