Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
5.43.1
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
- Find the app: Look for
SafetyMaster Pro.app
in your download folder - Double-click: Just double-click the app icon
- Grant permissions: Allow camera access when prompted
- 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
- Find the file: Look for
START_SafetyMaster_Mac.command
- Double-click: This will open Terminal and start the app
- Follow prompts: The script will guide you through setup
๐ป Method 3: Manual Terminal (Advanced)
โ For developers and advanced users
- Open Terminal (Applications โ Utilities โ Terminal)
- Navigate to folder:
cd /path/to/SafetyMasterPro_folder
- Install dependencies:
python3 -m pip install -r requirements.txt
- Run the application:
python3 web_interface.py
- Open browser: Go to http://localhost:8080
๐ณ Method 4: Docker (IT/Enterprise)
โ For IT teams and containerized deployment
- Install Docker Desktop from https://docker.com
- Open Terminal and navigate to the project folder
- Build and run:
docker-compose up --build
- 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
brew install python3
๐ฅ Camera Permissions
First time setup:
- When you first run the app, macOS will ask for camera permission
- Click "OK" to allow camera access
- 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:
# Install Python 3
brew install python3
# Or download from python.org
"Permission denied" error:
# Make the script executable
chmod +x START_SafetyMaster_Mac.command
"App can't be opened" security warning:
- Right-click the app
- Select "Open"
- Click "Open" in the dialog
Camera not working:
- Check System Preferences โ Security & Privacy โ Camera
- Make sure SafetyMaster Pro has permission
- Try a different camera source in the web interface
Dependencies won't install:
# 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:
# 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:
- Open browser: Go to http://localhost:8080
- Start monitoring: Click "Start Monitoring" button
- Grant camera access: Allow when prompted
- Position camera: Make sure people and safety equipment are visible
- 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:
- Check the console: Look for error messages in Terminal
- Verify requirements: Make sure Python 3.8+ is installed
- Test camera: Try other camera apps to verify hardware
- 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