REPOSITORY OVERVIEWLive repository statistics
★ 1Stars
⑂ 1Forks
◯ 0Open issues
◉ 1Watchers
59/100
OPENREPOHUB HEALTH SIGNALMixed signals
A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
90 Community adoption25% weight
0 Maintenance state20% weight
100 License clarity10% weight
0 Project information10% weight
75 This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview
DriverDrowsinessDetection
This Python project detects driver drowsiness in real time using eye aspect ratio (EAR) from facial landmarks. If eyes stay closed beyond a threshold, it triggers an alert sound. Built with OpenCV, dlib, and pygame, it enhances road safety by monitoring driver alertness via webcam.
🔍 Features
- Real-time video monitoring
- Eye Aspect Ratio (EAR) calculation
- Facial landmark detection using dlib
- Audio alert when drowsiness is detected
- Visual feedback with eye contours and warning messages
🛠️ Technologies Used
- Python
- OpenCV
- dlib
- scipy
- pygame
- imutils
🚀 Getting Started
1. Prerequisites
Make sure you have Python installed on your system. You will also need to install the required libraries.
2. Installation
-
Clone the repository:
git clone https://github.com/your-username/DriverDrowsinessDetection.git
cd DriverDrowsinessDetection
-
Install dependencies:
Create a requirements.txt file with the following content:
opencv-python
dlib
scipy
pygame
imutils
Then, run the following command to install the required packages:
pip install -r requirements.txt
(Note: If you encounter issues installing dlib, you may need to install CMake first.)
-
Download the Dlib Model:
The script requires a pre-trained facial landmark model. Create a models directory and download the file into it by running:
mkdir models
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 -P models/
bzip2 -d models/shape_predictor_68_face_landmarks.dat.bz2
3. Running the Detector
Make sure your webcam is connected and not in use by another application. Run the script from the project's root directory:
python Drowsiness_Detection.py
A window will appear showing your webcam feed, with green contours around your eyes and the real-time Eye Aspect Ratio (EAR) displayed in the top-right corner.
To exit, ensure the video window is active and press the 'q' key.
ALGORITHMICALLY RELATEDSimilar Open-Source Projects
Selected from shared topics, language and repository description—not editorial ratings.
This project implements a real-time driver drowsiness detection system using a Raspberry Pi equipped with an OV camera module. The system employs computer vision (OpenCV) and machine learning techniques (NumPy, pre-trained models) to monitor the driver's facial landmarks—particularly eye and head movement.
50/100 healthActive repositoryHas homepage
PythonNo license#3dprinting#blender3d#computer-vision#embedded-systems
⑂ 0 forks◯ 0 issuesUpdated Mar 31, 2026
Project homepage ↗This project implements a real-time driver drowsiness detection system using a Raspberry Pi equipped with an OV camera module. The system employs computer vision (OpenCV) and machine learning techniques (NumPy, pre-trained models) to monitor the driver's facial landmarks—particularly eye and head movement.
51/100 health