{"id":21363154,"url":"https://github.com/sanskaryo/driver-drowsiness-detection-alert","last_synced_at":"2025-12-31T00:20:51.945Z","repository":{"id":242235176,"uuid":"806451436","full_name":"sanskaryo/Driver-Drowsiness-detection-alert","owner":"sanskaryo","description":"Drowsiness detection system with alert message and voice","archived":false,"fork":false,"pushed_at":"2024-06-29T11:31:07.000Z","size":74443,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T07:12:11.014Z","etag":null,"topics":["computer-vision","dlib-face-detection","haarcascade-frontalface","numpy","opencv","pandas","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanskaryo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-05-27T08:18:45.000Z","updated_at":"2024-10-30T06:28:22.000Z","dependencies_parsed_at":"2024-11-22T06:28:11.370Z","dependency_job_id":null,"html_url":"https://github.com/sanskaryo/Driver-Drowsiness-detection-alert","commit_stats":null,"previous_names":["sanskaryo/drowsiness_detection_using_dlib_and_cv","sanskaryo/driver-drowsiness-detection-alert"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FDriver-Drowsiness-detection-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FDriver-Drowsiness-detection-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FDriver-Drowsiness-detection-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FDriver-Drowsiness-detection-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanskaryo","download_url":"https://codeload.github.com/sanskaryo/Driver-Drowsiness-detection-alert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243836025,"owners_count":20355616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","dlib-face-detection","haarcascade-frontalface","numpy","opencv","pandas","raspberry-pi"],"created_at":"2024-11-22T06:18:11.943Z","updated_at":"2025-12-31T00:20:51.935Z","avatar_url":"https://github.com/sanskaryo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drowsiness Detection System for yawning as well as sleepy eyes 😴 🚫 🚗\n\nA real-time drowsiness detection system using computer vision, OpenCV, and other relevant libraries. This system detects when a person is drowsy and alerts them to prevent accidents.\n\n## Features\n\n\n\n- Real-time drowsiness detection\n- Alerts the user with a sound when drowsiness is detected\n- Utilizes facial landmarks to detect eye closure and yawning\n\n## How It Works\n\n1. **Facial Landmark Detection**: Uses dlib’s pre-trained shape predictor model to detect facial landmarks. The landmarks around the eyes are used to compute the Eye Aspect Ratio (EAR).\n2. **Eye Aspect Ratio (EAR)**: The EAR is calculated based on the distances between the vertical eye landmarks and the horizontal eye landmarks. When the EAR falls below a certain threshold, it indicates that the eyes are closed.\n3. **Yawning Detection**: Measures the distance between upper and lower lips to detect yawning, another indicator of drowsiness.\n4. **Alert Mechanism**: When drowsiness or yawning is detected for a certain duration, the system triggers an alert sound to wake up the user.\n\n## Working images\n\n![Drowsiness Detection Alert](https://github.com/sanskaryo/Drowsiness_detection_using_dlib_and_cv/blob/main/images/WhatsApp%20Image%202024-06-29%20at%2016.21.34_cd625042.jpg)\n![Drowsiness Detection Alert](https://github.com/sanskaryo/Drowsiness_detection_using_dlib_and_cv/blob/main/images/WhatsApp%20Image%202024-06-29%20at%2016.25.00_30454b32.jpg)\n\n## Requirements\n\n- Python 3.x\n- OpenCV\n- dlib\n- imutils\n- scipy\n- numpy\n\n## Installation\n\n1. **Clone the repository**:\n   ```sh\n   git clone git@github.com:sanskaryo/Drowsiness_detection_using_dlib_and_cv.git\n   cd drowsiness-detection-system\n\n   python drowsiness_detection.py --webcam 0\n\n### Download the Pre-trained Shape Predictor:\n\n1. **Download the shape predictor and extract the .dat file.**\n2. **Place the `shape_predictor_68_face_landmarks.dat` file in the project directory.**\n\n\nThis version includes structured sections, improved readability, and direct instructions for installation and usage. Adjust paths and details as necessary for your specific setup.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanskaryo%2Fdriver-drowsiness-detection-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanskaryo%2Fdriver-drowsiness-detection-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanskaryo%2Fdriver-drowsiness-detection-alert/lists"}