๐ด Driver Drowsiness Detection Using CNN High-Accuracy Real-Time Fatigue Monitoring with Deep Learning
A real-time Driver Drowsiness Detection System built using custom Convolutional Neural Networks (CNNs) to enhance road safety by monitoring driver alertness. The system independently analyzes facial state and eye state using deep learning models and triggers alerts when fatigue is detected.
๐ Key Highlights
๐ฌ Designed, trained, and evaluated 15+ custom CNN architectures
๐ Final model performance:
๐น Face State Model Accuracy: 98.4%
๐น Eye State Model Accuracy: 98.71%
๐ง Researched and curated driver-focused datasets from Kaggle
๐ฅ Real-time video processing using OpenCV
โ๏ธ MediaPipe-based face cropping during dataset preparation to remove background noise
๐จ Intelligent alert system with user acknowledgment
โก Optimized for real-time inference
๐ง System Architecture & Workflow
Live video feed captured using webcam
Face & eye detection using Haar Cascades
Preprocessed inputs:
Grayscale conversion
Resizing
Normalization
Independent CNN inference:
Eye State Model โ Open / Closed
Face State Model โ Alert / Drowsy
Decision logic with temporal smoothing
Threshold-based alert activation
User acknowledgment required to resume monitoring
๐งช Dataset Preparation
๐ฆ Datasets sourced from Kaggle
โ๏ธ MediaPipe Face Detection used to:
Crop only the driverโs face
Remove background clutter
Improve model generalization
๐งผ Cleaned, labeled, and balanced datasets for robust training
๐งฐ Tech Stack
Programming Language: Python 3.x
Deep Learning: TensorFlow, Keras
Computer Vision: OpenCV, Haar Cascades
Face Processing: MediaPipe
Data Handling: NumPy
Visualization: Matplotlib
๐จ Alert Mechanism
Maintains a drowsiness score across frames
Triggers alarm if threshold is exceeded
Requires manual user confirmation to prevent false positives
Ensures continuous and reliable monitoring
๐ก Applications
๐ In-vehicle driver monitoring systems
๐ Fleet safety and fatigue management
๐ง AI-based behavioral analysis
๐ฃ๏ธ Accident prevention systems
๐ฎ Future Enhancements
๐๏ธ Facial activity monitoring
Trigger alerts when facial movement falls below a threshold
๐ฏ Driver attention & distraction detection
Detect gaze diversion and prolonged inattention
๐ Audio & vibration-based alert systems
๐ฑ Edge deployment for mobile and embedded systems
๐ Conclusion
This project demonstrates a robust, real-time AI-powered drowsiness detection system combining deep learning and computer vision. Its modular design, high accuracy, and intelligent alerting logic make it suitable for real-world safety applications.