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: saichethanavesireddy@gmail.com

About

Real-Time Driver Drowsiness and Yawn Detection System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages