Driver fatigue detection application using a Soft-Voting Ensemble of EfficientNetB3 deep neural networks to evaluate facial state metrics.
Driver Drowsiness Detector analyzes facial image streams by ensembling output probabilities from two fine-tuned EfficientNetB3 networks:
- Model A (Drowsiness): Focused on eye closure dynamics and micro-sleep indicators.
- Model B (Fatigue): Focused on facial muscle relaxation and head pose metrics.
The system averages class probability distributions independently to generate a combined safety risk score.
ext Input Video Frame / Webcam │ ├──────────────────────────┐ ▼ ▼ Model A (Drowsiness) Model B (Fatigue) EfficientNetB3 (300x300) EfficientNetB3 (300x300) │ │ [Danger_P1, Safe_P1] [Danger_P2, Safe_P2] │ │ └────────────┬─────────────┘ ▼ Soft-Voting Integrator Danger_Avg = (P1_Danger + P2_Danger) / 2 Safe_Avg = (P1_Safe + P2_Safe) / 2 │ ▼ Streamlit Safety Dashboard
- Dual Input Stream Support: Process static uploaded photos or live webcam streams.
- Soft Voting Ensemble: Averages class probabilities across both EfficientNetB3 models.
- Visual Safety Status: Displays alert state (SAFE vs DANGER / DROWSY) with confidence percentages.
- Streamlit Dashboard: Interactive monitoring interface.
| Specification | Value |
|---|---|
| Base Network | EfficientNetB3 (ImageNet pre-trained + transfer learned) |
| Input Shape | 300 × 300 × 3 RGB |
| Ensemble Logic | Soft Voting (Probability Averaging) |
| Evaluated Metrics | Eye Closure Ratio, Facial Fatigue State |
- Language: Python 3.10+
- Machine Learning: TensorFlow / Keras
- Processing: NumPy, Pillow
- Dashboard: Streamlit
`�ash
git clone https://github.com/wajahat2005/drowsiness-detector.git cd drowsiness-detector
pip install -r requirements.txt
streamlit run app.py `
Distributed under the MIT License.