{"id":47808805,"url":"https://github.com/byigitt/no-sleep","last_synced_at":"2026-04-03T18:01:04.059Z","repository":{"id":341433224,"uuid":"1141367321","full_name":"byigitt/no-sleep","owner":"byigitt","description":"Real-time drowsiness detection system using webcam eye tracking. Monitors Eye Aspect Ratio (EAR) via MediaPipe and triggers an alarm when eyes stay closed for too long.","archived":false,"fork":false,"pushed_at":"2026-01-24T18:32:16.000Z","size":3325,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-01T19:47:39.031Z","etag":null,"topics":["computer-vision","driver-safety","drowsiness-detection","eye-tracking","face-detection","mediapipe","opencv","python","safety","webcam"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byigitt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-24T18:22:26.000Z","updated_at":"2026-01-24T18:37:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/byigitt/no-sleep","commit_stats":null,"previous_names":["byigitt/no-sleep"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/byigitt/no-sleep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byigitt%2Fno-sleep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byigitt%2Fno-sleep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byigitt%2Fno-sleep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byigitt%2Fno-sleep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byigitt","download_url":"https://codeload.github.com/byigitt/no-sleep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byigitt%2Fno-sleep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31368156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","driver-safety","drowsiness-detection","eye-tracking","face-detection","mediapipe","opencv","python","safety","webcam"],"created_at":"2026-04-03T18:00:25.933Z","updated_at":"2026-04-03T18:01:04.013Z","avatar_url":"https://github.com/byigitt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# No Sleep\n\nDrowsiness detection system that monitors your eyes via webcam and triggers an alarm if you fall asleep.\n\n## How It Works\n\n1. Captures video from your webcam\n2. Uses MediaPipe Face Landmarker to detect 478 facial landmarks\n3. Calculates Eye Aspect Ratio (EAR) from 6 points per eye\n4. When EAR drops below threshold (eyes closed) for \u003e2 seconds, alarm beeps repeatedly\n5. Alarm stops when you open your eyes\n\n## Requirements\n\n- Python 3.10+\n- Webcam\n- Windows (uses `winsound` for alarm)\n\n## Installation\n\n```bash\nuv sync\n```\n\nThe face landmarker model (~4MB) downloads automatically on first run.\n\n## Usage\n\n```bash\nuv run main.py\n```\n\nPress `q` to quit.\n\n## Status Indicators\n\n| Color | Status | Meaning |\n|-------|--------|---------|\n| Green | Awake | Eyes open, all good |\n| Orange | Eyes Closed (Xs) | Eyes closing, timer counting |\n| Red | DROWSY! | Eyes closed \u003e2s, alarm active |\n| Gray | No Face Detected | Camera can't see your face |\n\n## Configuration\n\nEdit these values at the top of `main.py`:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `EAR_THRESHOLD` | 0.2 | Eye aspect ratio threshold. Lower = more sensitive |\n| `CLOSED_DURATION_THRESHOLD` | 2.0 | Seconds before alarm triggers |\n| `ALARM_FREQUENCY` | 2500 | Beep frequency in Hz |\n| `ALARM_DURATION` | 500 | Beep duration in ms |\n\n## How EAR Works\n\nEye Aspect Ratio measures how \"open\" your eyes are:\n\n```\nEAR = (|p2-p6| + |p3-p5|) / (2 * |p1-p4|)\n\n    p2    p3\np1          p4\n    p6    p5\n```\n\n- Eyes open: EAR ≈ 0.25-0.35\n- Eyes closed: EAR \u003c 0.2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyigitt%2Fno-sleep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyigitt%2Fno-sleep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyigitt%2Fno-sleep/lists"}