Skip to content

saichethana28/DriveAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

DriveAlert 🚗💤

Real-time Driver Drowsiness & Yawning Detection using MediaPipe, OpenCV, and Text-to-Speech.
DriveAlert monitors a driver’s eyes and mouth through a webcam feed to detect signs of sleepiness or fatigue and issues both on-screen and voice alerts.


📹 Demo

Watch the Demo

📸 Screenshots

Demo Image 1
Demo Image 2


🛠 Tech Stack

  • Python: Main programming language.
  • OpenCV: For video stream processing.
  • MediaPipe: For robust facial landmark detection.
  • NumPy: For efficient numerical computations.
  • pyttsx3: For text-to-speech alerts.

📋 Features

  • Real-time detection of drowsiness and yawning
  • Works offline (no internet required)
  • Voice alerts for better safety
  • Easy to run on any webcam-enabled device

⚙️ How It Works

  1. Capture — The webcam feed is read in real-time using OpenCV.
  2. Detect Landmarks — MediaPipe detects facial landmarks (eyes, mouth).
  3. Calculate EAR & MAR
    • EAR < threshold → eyes closed for a certain duration → drowsiness alert.
    • MAR > threshold → mouth wide open for a certain duration → yawn alert.
  4. Alert — Visual and voice alerts are triggered using pyttsx3.

🚀 Installation & Usage

Clone the repository

git clone https://github.com/saichethana28/DriveAlert.git
cd DriveAlert

Install dependencies

pip install opencv-python mediapipe numpy pyttsx3

Run the program

python main.py

Press 'q' to quit the program.

📜 License

This project is licensed under the MIT License – see the LICENSE file for details.

📬 Contact

Created by V. Sai Chethana 📧 Email: [email protected]

About

Real-Time Driver Drowsiness and Yawn Detection System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages