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

A newer version of the Gradio SDK is available: 5.43.1

Upgrade

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:
    cd /path/to/SafetyMasterPro_folder
    
  3. Install dependencies:
    python3 -m pip install -r requirements.txt
    
  4. Run the application:
    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:
    docker-compose up --build
    
  4. Access: Open http://localhost:8080

๐Ÿ”ง Prerequisites

Required:

Optional but recommended:

  • Homebrew for easier Python management: https://brew.sh
    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:

# 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:

  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:

# 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:

  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