File | Purpose | Description |
---|---|---|
๐ LICENSE | Legal Protection | Non-commercial use license preventing unauthorized commercial usage |
๐ .gitignore | Version Control | Comprehensive exclusion rules for Python, AI models, and temporary files |
๐ README.md | Documentation | Complete project guide, setup instructions, and feature overview |
๐ Project_Picture/ | Visual Assets | Application screenshots and interface previews for documentation |
๐ UI/ | Main Application | Core application code, models, and resources |
This project is protected under a Non-Commercial License which:
- โ Permits: Personal use, educational purposes, research, and open-source contributions
- โ Prohibits: Commercial use, business applications, revenue generation, and corporate deployment
- ๐ Requires: Attribution to original authors and license inclusion in distributions
The comprehensive .gitignore file excludes:
- Python cache files and virtual environments
- AI model files (*.pt, *.pth) to prevent large file commits
- Generated detection images and temporary files
- IDE-specific files and OS-generated files
- Sensitive configuration and log files
The P8GP-G01 system features a modern, intuitive interface designed for seamless safety monitoring:
Screenshot showcasing the main application interface with real-time detection capabilities
- Live Video Feed: Real-time camera stream with detection overlays
- Detection Status Panel: Visual indicators for safety equipment monitoring
- Control Dashboard: Comprehensive monitoring and statistics display
- Interactive Elements: User-friendly buttons and navigation controls
๐ธ More Screenshots: Additional project images and interface previews are available in the
Project_Picture/
directory
Real-time object detection in action - showcasing helmet, mask, and smoking detection capabilities
P8GP-G01 is a cutting-edge real-time object detection system engineered for safety monitoring applications. Leveraging state-of-the-art YOLO models (YOLOv5n and custom-trained variants), the system provides intelligent detection capabilities for critical safety equipment and hazardous situations including Helmets, Smoking, Fire, Smoke, and Face Masks.
The system features an intuitive PyQt6-powered graphical user interface that delivers seamless user experience with real-time monitoring, automated image saving, and comprehensive detection analytics. Built for cross-platform compatibility, it supports multiple camera sources and includes an elegant animated welcome interface.
๐ Real-Time Detection
๐ฅ๏ธ Intelligent GUI
|
๐น Camera Management
๐พ Smart Data Management
|
Detection Type | Description | Use Case |
---|---|---|
๐ฆบ Safety Helmets | Hard hat and protective headgear detection | Construction sites, industrial facilities |
๐ท Face Masks | Medical and protective mask identification | Healthcare, public safety compliance |
๐ฌ Smoking Detection | Cigarette and smoking activity recognition | No-smoking zone enforcement |
๐ฅ Fire Detection | Flame and fire hazard identification | Emergency response, safety monitoring |
๐จ Smoke Detection | Smoke plume and vapor detection | Early warning systems |
Component | Minimum Requirement | Recommended |
---|---|---|
Operating System | Windows 10, Linux (Ubuntu 18.04+), macOS 10.15+ | Latest stable versions |
Python Version | Python 3.10+ | Python 3.11+ |
RAM | 4 GB | 8 GB+ |
Storage | 2 GB free space | 5 GB+ |
Camera | USB 2.0 webcam | USB 3.0 HD webcam |
CPU | Dual-core 2.0 GHz | Quad-core 2.5 GHz+ |
- Python 3.10+ (Tested extensively with Python 3.10; compatible with newer versions including 3.12.4)
- pip (Python package manager)
- Compatible webcam or video capture device
- (Optional) Raspberry Pi for embedded deployment
All dependencies are precisely defined in UI/requirements.txt
with tested version compatibility:
torch==2.3.1 # PyTorch deep learning framework
opencv-python==4.9.0.80 # Computer vision and image processing
numpy==1.26.4 # Numerical computing foundation
ultralytics==8.1.0 # YOLOv5/YOLOv8 implementation
PyQt6==6.6.1 # Modern GUI framework (stable as of March 2025)
pygrabber==0.2 # Enhanced Windows camera detection (DirectShow)
These are included with Python standard library - no installation required:
platform
- System platform detectionos
- Operating system interfacesubprocess
- Process managementsys
- System-specific parameterstime
- Time-related functions
# Clone the repository (if applicable)
git clone <repository-url>
cd P8GP_G01
# Create isolated environment
python -m venv venv
# Activate environment
# On Windows:
venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate
# Verify activation (prompt should show (venv))
cd UI
# Install all required packages
pip install -r requirements.txt
# Verify installation
pip list
Ensure all pre-trained models are present in UI/Models/
:
Model File | Purpose | Status |
---|---|---|
Fire_Detection.pt |
Fire and flame detection | โ Required |
Helmet_Detection.pt |
Safety helmet identification | โ Required |
Mask_Detection.pt |
Face mask detection | โ Required |
Smoking_Detection.pt |
Smoking activity detection |
Note: If model files are missing, contact the development team or download from the official model repository.
Confirm the following structure exists within your project:
P8GP_G01/
โโโ ๐ LICENSE # Non-commercial license file
โโโ ๐ .gitignore # Git exclusion rules
โโโ ๐ README.md # Main documentation
โโโ ๐ Project_Picture/ # Project screenshots
โ โโโ amin1.png # Application interface screenshot
โโโ ๐ UI/ # Main application directory
โโโ ๐ Codes/ # Python source code
โโโ ๐ Imgs/ # Application assets
โ โโโ P1.png # Welcome background
โ โโโ icon.png # App icon
โโโ ๐ Images/ # Detection output storage
โ โโโ ๐ masks/ # Mask detection saves
โ โโโ ๐ Helmets/ # Helmet detection saves
โ โโโ ๐ smoke/ # Smoke detection saves
โ โโโ ๐ Fire/ # Fire detection saves
โ โโโ ๐ Cigarettes/ # Cigarette detection saves
โ โโโ ๐ smoking/ # Smoking activity saves
โโโ ๐ Models/ # AI model files
โโโ requirements.txt # Dependencies
โโโ README.md # UI-specific documentation
๐ Important: Ensure the
Project_Picture/
folder contains your application screenshots for proper documentation display.
# Ensure you're in the UI directory
cd UI
# Start the application
python Codes/Application.py
- Startup: Application begins with an animated welcome screen displaying "P8GP-G01"
- Navigation: Click "Get Started" to proceed to the main detection interface
- Animation: Enjoy the smooth transition effects and professional branding
- Live Feed: Real-time camera stream with AI-powered object detection
- Detection Overlays: Colored bounding boxes around detected objects
- Confidence Scores: Percentage accuracy displayed for each detection
- Multi-object Support: Simultaneous detection of multiple object types
- Real-time Status: Live detection monitoring with visual indicators
- Object Counters: Dynamic count of detected objects by category
- Statistics Table: Comprehensive "Have" vs "Don't Have" metrics
- Future Plans: Expandable table for additional monitoring features
- Active Cameras: Click to browse and select from detected camera devices
- Multi-platform Detection: Automatic recognition across different operating systems
- Hot-swapping: Switch between cameras without restarting the application
- Save Toggle: Enable/disable "Save Detected Images" functionality
- Gallery Access: Browse categorized galleries (Masks, Safety Hats, Smoking, Fire, Smoke)
- Preview Mode: Click any saved image for full-size preview
- Organized Storage: Automatic categorization by detection type
โถ๏ธ Play - Start/resume video feed
โธ๏ธ Pause - Temporarily pause detection
โน๏ธ Stop - Completely stop video feed and detection
- Status Indicators: Real-time visual feedback for each detection type
- Alert System: Notifications for new detections
- Statistics Dashboard: Comprehensive detection analytics
- Historical Data: Track detection patterns over time
- Automatic Saving: Enable in "Member's Images" dialog
- Categorized Storage: Images automatically sorted by detection type
- Gallery Browser: Intuitive interface for viewing saved detections
- Preview System: Click thumbnails for enlarged preview
P8GP_G01/
โ
โโโ ๐๏ธ venv/ # Virtual environment (optional)
โโโ ๐ LICENSE # ๐ Non-commercial use license
โโโ ๐ .gitignore # ๐ซ Git exclusion rules
โโโ ๐ README.md # ๐ Main project documentation
โ
โโโ ๐๏ธ Project_Picture/ # ๐ธ Project Screenshots & Media
โ โโโ amin1.png # Main application interface
โ โโโ [additional screenshots] # Other project images
โ
โโโ ๐๏ธ UI/ # ๐ Main Project Hub
โ
โโโ ๐ Codes/ # ๐ง Core Application Logic
โ โโโ __init__.py # Package initialization
โ โโโ Application.py # ๐ Entry point & app launcher
โ โโโ MainWindow.py # ๐ข Main application window
โ โโโ WelcomeScreen.py # ๐ Animated welcome interface
โ โโโ Dashboard.py # ๐ Central monitoring dashboard
โ โโโ VideoPlayer.py # ๐น Video feed & playback controls
โ โโโ ControlPanel.py # ๐๏ธ Detection monitoring panel
โ โโโ Notification.py # ๐ Alert & notification system
โ โโโ Dialogs.py # ๐ฌ Dialog windows & modals
โ โโโ DetectionEngine.py # ๐ค AI detection core logic
โ โโโ CameraManager.py # ๐ท Camera handling & management
โ โโโ Utilities.py # ๐ ๏ธ Helper functions & utilities
โ
โโโ ๐ Imgs/ # ๐จ Visual Assets
โ โโโ P1.png # Welcome screen background
โ โโโ icon.png # Application icon
โ
โโโ ๐ Images/ # ๐พ Detection Output Storage
โ โโโ ๐ Masks/ # Saved face mask detections
โ โโโ ๐ Safety_hats/ # Saved helmet detections
โ โโโ ๐ Smoking/ # Saved smoking detections
โ โโโ ๐ Fire/ # Saved fire detections
โ โโโ ๐ smoke/ # Saved smoke detections
โ โโโ ๐ Cigarettes/ # Saved cigarette detections
โ
โโโ ๐ Models/ # ๐ง AI Model Repository
โ โโโ Mask_Detection.pt # Face mask detection model
โ โโโ Smoking_Detection.pt # Smoking activity model
โ โโโ Fire_Detection.pt # Fire detection model
โ โโโ Helmet_Detection.pt # Safety helmet model
โ
โโโ ๐ README.md # ๐ UI-specific documentation
โโโ ๐ requirements.txt # ๐ฆ Python dependencies
Amin Moniry Full-Stack Development, Programming & User Interface Design Responsible for: โข Core application architecture โข AI model integration โข GUI design & implementation โข Cross-platform compatibility โข User experience optimization |
Saeed Shokraneh Academic Supervision & Technical Guidance Responsible for: โข Project oversight & guidance โข Technical review & validation โข Academic supervision โข Quality assurance โข Strategic direction |
Attribute | Value |
---|---|
Version | 2.1 |
Release Date | April 25, 2025 |
Development Location | Tabriz, Iran ๐ฎ๐ท |
Project Type | Open Source Safety Monitoring System |
Primary Language | Python |
GUI Framework | PyQt6 |
AI Framework | YOLO (Ultralytics) |
- Camera Connection: Ensure your webcam is properly connected and accessible before launching
- Windows Users: Install
pygrabber
for enhanced DirectShow camera detection capabilities - Linux Users: Optional
v4l2-ctl
installation for advanced camera detection (generic detection available as fallback) - Raspberry Pi: Additional GPIO and hardware setup may be required for embedded deployment
- CPU Usage: Monitor system resources during detection operations
- Memory Management: Close unused applications for optimal performance
- Camera Resolution: Higher resolutions improve detection accuracy but increase processing load
- Model Selection: Different models have varying computational requirements
- Local Processing: All detection occurs locally - no data transmitted externally
- Image Storage: Saved images remain on local device storage
- Camera Access: Application requests camera permissions as needed
We welcome contributions from the community! Here's how you can help improve the project:
- Fork the repository to your GitHub account
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request with detailed description
- Use the GitHub Issues template
- Include system information and error logs
- Provide steps to reproduce the issue
- Attach relevant screenshots if applicable
- Describe the proposed feature in detail
- Explain the use case and benefits
- Consider implementation complexity
- Discuss potential impacts on existing functionality
For questions, support, or collaboration opportunities:
๐ GitHub Repository: https://github.com/Amin-moniry-pr7
๐ง Email Support: Available through GitHub profile
๐ Issue Tracker: Use GitHub Issues for bug reports and feature requests
๐ฌ Discussions: Join project discussions on GitHub