Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drowsiness detector feature #808

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Gautham-s-n
Copy link

Type of change

  • Added new project
  • Bug fix
  • New features
  • Enhanced documentation

Changes proposed in this pull request

Project name: Drowsiness Detection

Short description:
This pull request introduces a Drowsiness Detection system that monitors a user's eye aspect ratio (EAR) to detect signs of drowsiness. It plays an alarm when drowsiness is detected and provides visual feedback to the user.


Changes Made

  • Incorporated logic to calculate the Eye Aspect Ratio (EAR) and trigger an alarm if it falls below a set threshold for consecutive frames.
  • Added a feature to draw contours around the eyes and display real-time EAR values on the screen for debugging.
  • Refactored portions of the code for improved readability and maintainability.

Why These Changes

  • Enhances safety by providing real-time drowsiness detection and alerts.
  • The visual feedback helps in testing and adjusting EAR thresholds for better accuracy.
  • Improves code readability, making future updates easier to implement.

Related Issues

  • No specific issues linked but addresses general safety concerns in drowsiness detection.

Testing Instructions

  1. Launch the program using a webcam.
  2. Ensure the facial landmark predictor file is properly linked.
  3. Simulate drowsiness by closing your eyes for an extended duration.
  4. Verify that an alarm sounds and the "DROWSINESS ALERT!" message appears on the screen.

Future Improvements

  • Add functionality to log drowsiness events for further analysis.
  • Include support for multiple languages in the alarm message.

Checklist

  • The code is Python 3 compatible.
  • I have added relevant comments in my file to make the code understandable.
  • I have added my project in a folder that includes all the necessary files.

Copy link
Contributor

Greetings! This is an automated message from GitHub Actions. 🤖
Your pull request has been received and is awaiting for a review by the repository owner or a maintainer. This may take some time, so please be patient.
While you wait, you can continue to work on other issues or pull requests, or explore the project further. Or you can simply relax and enjoy your day.
Thank you for your contribution to this project! You are awesome! ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant