A smart eye break reminder that enforces the 20-20-20 rule using real-time camera head tracking
Every 20 minutes, look at something 20 feet away for 20 seconds. This rule reduces eye fatigue and digital eye strain.
EyeGuard automates this โ when break time comes, it locks your screen and uses your camera to verify you're actually looking away.
| Feature | Description |
|---|---|
| ๐ท Camera Tracking | Uses MediaPipe to measure head angle and verify you're looking away |
| ๐ Sound Alerts | Customizable sounds 60s before, at start, and at end of each break |
| ๐ Statistics | Daily/weekly break history with GitHub-style calendar heatmap |
| ๐ฎ Game Mode | Pause breaks for a set duration or indefinitely |
| ๐ Scheduler | Enable/disable by day and time range |
| ๐ Auto-start | Launches automatically at Windows startup |
| ๐ Bilingual | Turkish and English support |
| ๐จ Modern UI | Dark theme, fullscreen panel |
- Download
EyeGuard.exefrom the Releases page - Place the
notificationsfolder in the same directory as the EXE - Double-click to run
Requirements:
- Python 3.12
- Windows 10/11
# Clone the repo
git clone https://github.com/Omerkaygisiz/eyeguard.git
cd eyeguard
# Create virtual environment (recommended)
python -m venv venv
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run
python eyeguard.pypip install pyinstaller
pyinstaller eyeguard.spec
# EyeGuard.exe will be in the dist/ foldereyeguard/
โโโ eyeguard.py # Main application
โโโ eyeguard.spec # PyInstaller configuration
โโโ requirements.txt # Python dependencies
โโโ notifications/ # Sound files
โ โโโ warning.wav # 60s warning sound
โ โโโ break.wav # Break start sound
โ โโโ done.mp3 # Break complete sound
โโโ eyeguard_stats.json # Statistics data (auto-created)
โโโ eyeguard_schedule.json # Schedule settings (auto-created)
| Setting | Default | Description |
|---|---|---|
| Work Duration | 20 min | Time between breaks |
| Break Duration | 20 sec | How long to look away |
| Sensitivity | Medium | Head turn angle threshold |
Sensitivity options:
- Wide โ Triggers only on large head movements
- Medium โ Balanced
- Narrow โ Triggers on small movements
- Head tracking: MediaPipe Face Mesh โ yaw/pitch via 2D landmark geometry
- UI: Tkinter + Canvas
- Tray: pystray
- Audio: pygame
- Data: JSON files
Pull requests are welcome!
- Fork the repo
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0.
In short: you can use, modify, and distribute this software โ but derivative works must also be GPL-licensed.
รmer Kaygฤฑsฤฑz โ GitHub
Protect your eyes ๐๏ธ





