Skip to content

Detect sleep and drowsiness in real-time video streams via facial landmark analysis using OpenCV and Mediapipe. Designed for Python, fast integration, and applications in safety and productivity.

License

Notifications You must be signed in to change notification settings

rahul2002m/Sleep-and-Drowsiness-Detection-using-OpenCV-and-Mediapipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sleep and Drowsiness Detection using OpenCV and Mediapipe

Detect sleep and drowsiness in real-time video streams using advanced computer vision techniques with OpenCV and Mediapipe.

πŸ“Œ Overview

This project monitors facial landmarks and eye closure patterns to detect signs of sleep and drowsiness. Leveraging OpenCV for video capture and Mediapipe for facial landmark detection, it provides an accurate and efficient solution for driver safety, productivity monitoring, and wellness applications.

πŸš€ Features

  • Real-time face and eye tracking
  • Automatic detection of prolonged eye closure or drowsiness
  • Visual and audible alerts for sleep detection
  • Easy integration and customization

πŸ› οΈ Technologies

  • Python
  • OpenCV
  • Mediapipe
  • SciPy

✨ How it works

  1. Capture live video feed using OpenCV.
  2. Analyze face and eye landmarks with Mediapipe's Face Mesh.
  3. Calculate eye aspect ratio to detect closed eyes.
  4. Trigger alert if sleep or drowsiness is detected.

πŸ§‘β€πŸ’» Installation

git clone https://github.com/rahul2002m/Sleep-and-Drowsiness-Detection-using-OpenCV-and-Mediapipe.git
cd Sleep-and-Drowsiness-Detection-using-OpenCV-and-Mediapipe
pip install -r requirements.txt

🚦 Usage

python drowsy_detection.py

πŸ“‹ Applications

  • Driver monitoring systems
  • Workplace productivity solutions
  • Healthcare and wellness

🀝 Contributing

Pull requests and suggestions are welcome! For major changes, please open an issue first.

πŸ“ž Contact

For questions connect on LinkedIn.

πŸ”– License

MIT

About

Detect sleep and drowsiness in real-time video streams via facial landmark analysis using OpenCV and Mediapipe. Designed for Python, fast integration, and applications in safety and productivity.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages