PrivacyGuard is an intelligent desktop security application that protects your screen from unauthorized viewers by continuously monitoring the surroundings using computer vision.
Unlike traditional screen-locking software, PrivacyGuard actively detects suspicious activity such as shoulder surfing, unknown faces and user absence. It provides real-time alerts, automatically captures faces and helps users maintain privacy while working in public or shared environments.
Modern laptops contain sensitive personal and professional information, yet they remain vulnerable to:
- Shoulder surfing attacks
- Unauthorized screen viewing
- Identity theft
- Privacy leakage in public places
- Lack of intelligent monitoring while users are away
PrivacyGuard addresses these challenges using AI-powered face detection, gaze tracking, and real-time threat analysis.
The goal of PrivacyGuard is to build a smart desktop privacy assistant capable of:
- Monitoring nearby individuals in real time
- Detecting unauthorized viewers
- Identifying known and unknown faces
- Alerting users about privacy threats
- Capturing evidence of suspicious activity
- Providing privacy analytics and activity logs
- Detects multiple faces in real time
- Identifies authorized users
- Recognizes unknown visitors
- Detects prolonged screen observation
- Identifies suspicious viewing behavior
- Real-time privacy alerts
- Estimates viewing direction
- Detects attention toward the screen
- Improves threat detection accuracy
- AI-based privacy risk analysis
- Unknown face detection
- Suspicious behavior monitoring
- Automatic event logging
- Saves screenshots during security events
- Captures intruder images
- Stores incident history
- Threat statistics
- Event history
- User activity monitoring
- Privacy insights dashboard
- Authorized user registration
- Settings management
- Configurable alert system
π’ Low β Only authorized user present π‘ Medium β Multiple people nearby π΄ High β Unknown person staring at screen
Webcam
β
βΌ
Frame Capture Engine
β
βΌ
Face Detection
β
ββββββββββββββββΊ Face Recognition
β
ββββββββββββββββΊ Gaze Tracking
β
βΌ
Threat Detection Engine
β
βΌ
Privacy Decision
β
ββββββββββΊ Alerts
ββββββββββΊ Screenshot Capture
ββββββββββΊ Database Logging
ββββββββββΊ Analytics Dashboard
- Python
- PyQt6
- OpenCV
- MediaPipe
- Face Recognition
- NumPy
- SQLite
- Plyer
- Pillow
- Threading
- JSON
- OS Utilities
- Matplotlib
- ReportLab
git clone https://github.com/yourusername/PrivacyGuard.git
cd PrivacyGuardpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtSimply run:
python main.pyPrivacyGuard will initialize the camera, load settings, and launch the desktop monitoring interface.
- Launch PrivacyGuard.
- Complete the initial setup.
- Register authorized users.
- Allow webcam access.
- PrivacyGuard continuously monitors the environment.
- Receive instant alerts whenever suspicious activity is detected.
- Review captured incidents and analytics from the dashboard.
PrivacyGuard/
β
βββ alerts/
β βββ notification.py
β
βββ assets/
β βββ icons/
β βββ alert_sound.wav
β
βββ core/
β βββ capture_engine.py
β βββ face_engine.py
β βββ frame_processor.py
β βββ gaze_tracker.py
β βββ threat_engine.py
β
βββ data/
β βββ authorized_faces/
β βββ intruder_captures/
β βββ screenshots/
β βββ settings.json
β
βββ database/
β βββ db_manager.py
β βββ privacy_guard.db
β
βββ gui/
β βββ analytics_panel.py
β βββ log_viewer.py
β βββ main_window.py
β βββ overlay_window.py
β βββ settings_panel.py
β βββ setup_wizard.py
β βββ tray_manager.py
β βββ user_manager.py
β
βββ main.py
βββ requirements.txt
βββ README.md
- Real-time face monitoring
- Unknown user detection
- Shoulder surfing alerts
- Automatic screenshot capture
- Event history logging
- Authorized user management
- Privacy-focused local processing
Contributions, suggestions and improvements are welcome.
To contribute:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your branch
- Submit a Pull Request