An intelligent real-time system that monitors driver drowsiness and wellness using computer vision and machine learning techniques.
This system uses a cabin-facing camera to detect driver drowsiness, distraction, and stress in real-time through facial landmark analysis and behavioral pattern recognition. It provides timely alerts to prevent accidents caused by driver fatigue.
- Real-time Face Detection: 468 facial landmarks using MediaPipe Face Mesh
- Drowsiness Detection:
- Eye Aspect Ratio (EAR) for eye closure detection
- Blink rate monitoring
- Prolonged eye closure detection
- Yawning Detection: Mouth Aspect Ratio (MAR) analysis
- Head Pose Estimation: Detects head nodding and looking away
- Multi-level Alert System: Audio and visual alerts with severity levels
- Data Logging: Session metrics and analytics
- Performance Optimized: Real-time processing at 30 FPS
- Python 3.8 or higher
- Webcam or video file
- Windows/Linux/macOS
- Clone the repository
git clone https://github.com/TejasS1233/AI-Enhanced-Driver-Wellness-Monitoring.git
cd AI-Enhanced-Driver-Wellness-Monitoring- Create virtual environment (recommended)
python -m venv venv
.\venv\Scripts\Activate.ps1- Install dependencies
pip install -r requirements.txtpython src/main_pipeline.pypython src/main_pipeline.py --video path/to/video.mp4python src/main_pipeline.py --config path/to/config.yaml- Q: Quit application
- P: Pause/Resume monitoring
- R: Reset system state
Edit config/config.yaml to customize:
- Camera settings: Resolution, FPS, device ID
- Detection thresholds: EAR, MAR, head pose limits
- Alert behavior: Cooldown periods, escalation
- Logging: Metrics saving, session logs
- Performance: GPU usage, threading
- Live video feed with facial landmarks
- EAR and MAR values
- Head pose angles
- Drowsiness probability
- Alert banners
data/metrics.csv: Frame-by-frame metricsdata/logs/session_*.json: Session summaries- Alert history and statistics
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
- Tejas S - TejasS1233