View Demo

Driver Drowsiness Detection System โ€” Real-Time Monitoring

A comprehensive Deep Learning and Computer Vision project designed to detect and alert instances of driver drowsiness in real-time. The system leverages multiple detection mechanisms, including a Custom Convolutional Neural Network (CNN), MediaPipe Face Mesh for Eye Aspect Ratio (EAR), and Haar Cascades. It provides a robust and hybrid detection approach hosted on a responsive Flask-based web application.

๐ŸŒŸ Features

๐Ÿ› ๏ธ Technologies Used

๐Ÿ“‚ Project Structure

The project follows a standard and modular structure structure:

๐Ÿš€ Getting Started & How It Works

1. The Tracking Mechanism

The system uses MediaPipe's Face Mesh to extract precise facial landmarks. It isolates the region of the eyes (LEFT_EYE and RIGHT_EYE coordinates) and calculates the Eye Aspect Ratio (EAR) based on Euclidean distances.

2. Neural Network Classification

If CNN mode is enabled, the system crops the precise location of the eyes, normalizes the frame, resizes it to 64x64, and passes it through the trained Keras CNN. The output accurately informs the system whether both eyes are closed.

3. Real-Time Processing

Captured webcam frames are converted into base64 images, sent via HTTP POST to the Flask server, processed for drowsiness detection, and returned alongside status markers and visual bounding boxes over the eyes.

๐Ÿงช Try It Live & View Code

Click here to try the Driver Drowsiness System Demo

View the source code on GitHub

๐Ÿ“Œ Final Thoughts

This project underscores the immense potential of integrating distinct machine learning techniques into a single, cohesive unit. Combining deep learning classifiers with classical computer vision and heuristic frameworks (EAR) provides a highly reliable safety system.


๐Ÿ”— Connect with Me
๐ŸŒ www.tauqueeralam.com
๐Ÿ“ฑ LinkedIn | GitHub

View a live demo below:

View Demo

Discussion