A real-time computer vision system that classifies driver states using multiple behavioral metrics to enhance road safety.
This system analyzes driver behavior in real-time and classifies the driver into one of the following states:
- 🟢 Alert - Normal driving behavior
- 🟡 Distracted - Driver is not focused on the road
- 🟠 Fatigued - Signs of tiredness and reduced alertness
- 🔴 Drowsy/Microsleep - Critical fatigue state with microsleep episodes
- ⚫ Unsafe - Seatbelt violation or other safety issues
- Multi-class driver state detection
- Continuous monitoring and scoring
- Immediate alert system
- PERCLOS (Percentage of Eye Closure) - Blink duration analysis
- Yawning Frequency - Mouth opening detection
- Distraction Duration - Head pose and gaze estimation
- Seatbelt Compliance - Safety equipment monitoring
- Hand Position Tracking - Steering wheel interaction
- Real-time inference with YOLO models
- Rule-based decision engine
- Text-to-Speech (TTS) alerts
- Configurable sensitivity thresholds
- Computer Vision: OpenCV, YOLO (v1.pt, v2.pt)
- Machine Learning: PyTorch, NumPy
- Audio Alerts: TTS integration
- Rule Engine: Custom rule-based system
- Python 3.8+
- Webcam or video input source
- CUDA-capable GPU (recommended)
- Clone the repository
git clone https://github.com/ghassenov/DMS.git
cd DMS- Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# OR
venv\Scripts\activate # Windows- Install dependencies
pip install -r requirements.txt