Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Driver Drowsiness Detector — Soft-Voting Ensemble

Status Python 3.10+ TensorFlow 2.x Streamlit License: MIT

Driver fatigue detection application using a Soft-Voting Ensemble of EfficientNetB3 deep neural networks to evaluate facial state metrics.


Overview

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.


Architecture & Pipeline

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


Implemented Features

  • 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.

Model Specifications

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

Tech Stack

  • Language: Python 3.10+
  • Machine Learning: TensorFlow / Keras
  • Processing: NumPy, Pillow
  • Dashboard: Streamlit

Installation & Setup

`�ash

Clone repository

git clone https://github.com/wajahat2005/drowsiness-detector.git cd drowsiness-detector

Install requirements

pip install -r requirements.txt

Run app

streamlit run app.py `


License

Distributed under the MIT License.

About

Driver drowsiness & fatigue detection system using a Soft-Voting Ensemble of EfficientNetB3 neural networks and Streamlit UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages