Loading repository data…
Loading repository data…
Moh-Tayyab / repository
AI-powered focus assistant that tracks eye and mouth movements to alert you when you're losing focus.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Stay focused and alert during your study sessions with AI-powered attention monitoring! Study Buddy is an innovative Python application that leverages computer vision technology to enhance your study experience. Using advanced facial recognition, it monitors your attention levels in real-time and helps you maintain peak focus. 🎯
requirements.txt)requirements.txtpip install -r requirements.txt
Run the application with default settings:
python study_buddy.py
Study Buddy accepts several command-line arguments to customize its behavior:
usage: study_buddy.py [-h] [--camera CAMERA] [--eye-threshold EYE_THRESHOLD] [--yawn-threshold YAWN_THRESHOLD] [--log LOG] [--sound SOUND]
Study Buddy - Attention Monitoring System
optional arguments:
-h, --help show this help message and exit
--camera CAMERA Camera device ID (default: 0)
--eye-threshold EYE_THRESHOLD
Eye closure threshold in seconds (default: 2.0)
--yawn-threshold YAWN_THRESHOLD
Yawn detection threshold (ratio, default: 0.5)
--log LOG Log file path (default: study_buddy_log.txt)
--sound SOUND Path to custom alert sound file (.wav)
Examples:
# Use camera ID 1 (external webcam)
python study_buddy.py --camera 1
# Increase eye closure threshold to 3 seconds
python study_buddy.py --eye-threshold 3.0
# Change log file location
python study_buddy.py --log my_study_session.txt
# Use custom alert sound
python study_buddy.py --sound my_alert.wav
Study Buddy uses MediaPipe's Face Mesh to detect facial landmarks in real-time. From these landmarks, it calculates:
When the application detects that your eyes have been closed for too long or that you're yawning, it triggers visual and audio alerts to help you regain focus.
q to quit the applicationThe application logs all alert events to a CSV-like text file with the following format:
Timestamp, Event Type, Duration (s)
2023-06-12 14:32:45, eye_closure, 2.34s
2023-06-12 14:40:12, yawn, 3.56s
For optimal performance, consider these calibration tips:
MIT License