pip install opencv-python-headless mediapipe==0.10.13 numpypython eye_guard_2020.pypython eye_guard_2020.py --camera 1python eye_guard_2020.py --ear-open 0.18 --ear-closed 0.12q — Quitr — Reset the 20-minute timert — Test mode (force alert immediately)EAR = (||P2-P6|| + ||P3-P5||) / (2 * ||P1-P4||)ear_closed (default 0.18)ear_open (default 0.22)python test_eyeguard_synthetic.py| Parameter | Default | Description |
|---|---|---|
ear_open | 0.22 | EAR threshold to mark eye as open |
ear_closed | 0.18 | EAR threshold to mark eye as closed |
SCREEN_TIME_ALERT_SECONDS | 1200 | 20 minutes in seconds |
REST_DURATION_SECONDS | 20 | Rest duration in seconds |
MIN_CONSECUTIVE_CLOSED_FRAMES | 15 | Minimum frames (~0.5s) to count as rest start |