Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 816 Bytes

File metadata and controls

25 lines (20 loc) · 816 Bytes

🚗 Driver Drowsiness Detection using OpenCV & Dlib

A real-time computer vision system that monitors a driver's eye aspect ratio (EAR) to detect signs of drowsiness and alert them with a warning sound.

🧠 Tech Stack

  • Python 3.x
  • OpenCV
  • Dlib
  • SciPy
  • playsound

🖼️ How It Works

  • Uses facial landmarks to locate eyes
  • Calculates Eye Aspect Ratio (EAR)
  • Triggers an alert if eyes remain closed too long

📁 Dataset

  • shape_predictor_68_face_landmarks.dat is required. Download it here and extract it in the project root.
  • A sample video/image dataset can be placed inside the dataset/ folder for testing.

▶️ How to Run

  1. Clone the repo
  2. Install dependencies:
    pip install -r requirements.txt