Skip to content

srushtiipatel/driver-drowsiness-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Driver Drowsiness Detection using OpenCV

This project detects driver drowsiness in real-time using computer vision. It monitors the Eye Aspect Ratio (EAR) to determine whether the driver's eyes are closed and triggers an alert if drowsiness is detected.

Features

  • Real-time webcam monitoring
  • Eye Aspect Ratio (EAR) calculation
  • Drowsiness alert using sound
  • Face landmark detection
  • Real-world safety application

Technologies Used

  • Python
  • OpenCV
  • dlib
  • NumPy
  • imutils
  • scipy

Download Required Model

Download the shape predictor file from: https://github.com/davisking/dlib-models

After downloading, place the file: shape_predictor_68_face_landmarks.dat

inside the project folder.

Installation

Install dependencies using: pip install -r requirements.txt

Download Required Model

This project requires the facial landmark predictor file.

Download it from the official dlib model repository: https://github.com/davisking/dlib-models

Download: shape_predictor_68_face_landmarks.dat.bz2

Extract it and place: shape_predictor_68_face_landmarks.dat

inside the project folder before running the code.

How to Run

Run the project using: python main.py

Use Case

This project helps detect driver fatigue and can be used to improve road safety.

About

Real-time driver drowsiness detection using OpenCV and EAR

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages