{"id":22878757,"url":"https://github.com/atharva309/drowsiness_detection_driving","last_synced_at":"2025-10-31T05:42:44.104Z","repository":{"id":167995960,"uuid":"643618587","full_name":"Atharva309/Drowsiness_detection_driving","owner":"Atharva309","description":"Detect drowsiness in drivers through eyes and yawns","archived":false,"fork":false,"pushed_at":"2024-08-16T21:40:08.000Z","size":7090,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T20:39:49.707Z","etag":null,"topics":["image-classification","image-detection","yolov5"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Atharva309.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}},"created_at":"2023-05-21T18:23:43.000Z","updated_at":"2024-08-16T21:40:43.000Z","dependencies_parsed_at":"2024-12-13T16:41:52.233Z","dependency_job_id":"a2932505-e98e-4114-87ff-03f00960b692","html_url":"https://github.com/Atharva309/Drowsiness_detection_driving","commit_stats":null,"previous_names":["atharva309/drowsiness_detection_driving"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atharva309%2FDrowsiness_detection_driving","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atharva309%2FDrowsiness_detection_driving/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atharva309%2FDrowsiness_detection_driving/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atharva309%2FDrowsiness_detection_driving/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atharva309","download_url":"https://codeload.github.com/Atharva309/Drowsiness_detection_driving/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246482731,"owners_count":20784759,"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":["image-classification","image-detection","yolov5"],"created_at":"2024-12-13T16:31:13.001Z","updated_at":"2025-10-31T05:42:44.012Z","avatar_url":"https://github.com/Atharva309.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drowsiness Detection for Driving\n\nThis project is aimed at detecting driver drowsiness by analyzing eye states (open/closed) and yawns using deep learning techniques. The model is based on YOLOv5 and performs both image classification and object detection to recognize drowsiness signs in real time.\n\n## Project Overview\n\nDrowsy driving is a significant factor in road accidents worldwide. Early detection of drowsiness can save lives by alerting the driver and taking appropriate preventive measures. This system identifies drowsiness by monitoring:\n\n1. **Eye State**: Whether the driver’s eyes are open or closed.\n2. **Yawns**: Detecting when the driver is yawning, which is a strong indicator of tiredness.\n\n## Dataset\n\nThis project utilizes two key datasets:\n\n- **[Eye Detection Dataset](https://universe.roboflow.com/ai-project-t1xm8/eye-detector-01g2k)**: Used for detecting eyes in different states (open or closed) with YOLOv5.\n- **[Eye and Yawn Classification Dataset](https://www.kaggle.com/datasets/dheerajperumandla/drowsiness-dataset)**: Used for classifying eye states and detecting yawns for drowsiness analysis.\n\n## How the Project Works\n\n1. **Eye State Classification**:\n   - The model classifies images as either \"eyes open\" or \"eyes closed\" to determine drowsiness.\n   - This classification is crucial as prolonged eye closure is a common sign of drowsiness.\n   - Two approaches were used for detecting eyes:\n     - **Eye Detection Dataset**: A bounding box is drawn around the eyes using a specialized eye detection dataset.\n     - **Face Detection Dataset**: A bounding box is drawn around the entire face, and the eyes are detected within that region.\n2. **Yawn Detection**:\n   - The YOLOv5 model is used to detect yawns, which often occur when a person is drowsy.\n   - The model continuously monitors the driver's face for signs of yawning.\n3. **Drowsiness Decision Logic**:\n   - The system integrates the results from both eye state classification and yawn detection to make a final drowsiness prediction.\n   - If the eyes are closed for a specified period or if yawns are detected frequently, the system triggers an alert.\n\n\n## YOLOv5 for Drowsiness Detection\n\nYOLOv5 (You Only Look Once) is a real-time object detection system. In this project, YOLOv5 is used for:\n- **Eye Detection**: Identifying the position and state of the eyes (open or closed).\n- **Yawn Detection**: Detecting when the driver is yawning using bounding boxes around the mouth region.\nThe model is trained to be lightweight and efficient, making it suitable for real-time deployment in vehicle systems.\n\n## Example Outputs\n\nHere are some sample outputs showing the detection of drowsiness indicators:\n\n### using Object detection for eyes and Classification for yawns\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images_outputs/Screenshot 2023-05-21 at 11.56.28 PM.png \"Title=\"using eye detection\"width=\"800\" height=\"auto\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images_outputs/Screenshot 2023-05-21 at 11.56.59 PM.png\"Title=\"using eye detection\"width=\"800\" height=\"auto\" /\u003e\n\u003c/p\u003e\n\n### using image classification with face detection bounding box\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images_outputs/Screenshot 2023-05-21 at 11.56.40 PM.png \"Title= \"using eye detection\"width=\"800\" height=\"auto\" /\u003e\n\u003c/p\u003e\n\n## using image classification with eye detection bounding box\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"images_outputs/Screenshot 2023-05-21 at 11.56.49 PM.png\" Title =\"using eye detection\" width=\"800\" height=\"auto\" /\u003e\n\u003c/p\u003e\n\n\n## Conclusion\n\nThis project highlights the application of deep learning for enhancing road safety. By integrating eye state and yawn detection, the system provides a robust method for detecting driver drowsiness and issuing timely alerts. Future improvements could involve adding more features like head pose estimation and facial landmark detection for even greater accuracy.\n\n## References\n\n- YOLOv5: [Ultralytics YOLOv5](https://github.com/ultralytics/yolov5)\n- Dataset 1: [Eye Detection](https://universe.roboflow.com/ai-project-t1xm8/eye-detector-01g2k)\n- Dataset 2: [Eye and Yawn Classification](https://www.kaggle.com/datasets/dheerajperumandla/drowsiness-dataset)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatharva309%2Fdrowsiness_detection_driving","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatharva309%2Fdrowsiness_detection_driving","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatharva309%2Fdrowsiness_detection_driving/lists"}