Skip to content
Caleb.ee
Computer VisionCompleted2025

DriveGuard Driver Monitoring System

A real-time driver-monitoring application using OpenCV and MediaPipe for distraction and drowsiness cues.

Driver monitoring pipeline with face landmarks and alert logic

Role

Developer

Team

Individual

Status

Completed

Timeline

2025

OpenCVMediaPipePython
  • Eye closure detection
  • Gaze direction estimation
  • Head-position tracking
  • Yawning detection
  • Temporal warning logic
  • Audio alerts

Problem Statement

Driver distraction and drowsiness are safety-critical. A camera-based monitor can surface early cues—eye closure, gaze away from the road, head pose changes, and yawning—before they compound into risk.

Design Goals

  • Real-time facial landmark analysis
  • Multi-signal drowsiness / distraction heuristics
  • Temporal filtering to reduce false alarms
  • Audible warnings when thresholds are crossed

System Architecture

Webcam frames → MediaPipe Face Mesh / related landmarks → feature extractors (EAR, gaze proxy, head pose, mouth aspect) → temporal warning state machine → audio alert.

Software Design

Python application combining OpenCV capture with MediaPipe inference. Each cue contributes to a warning score; sustained cues trigger alerts rather than single-frame spikes.

Testing and Validation

Exercised with staged behaviors (eyes closed, looking aside, yawning) to tune thresholds and temporal windows.

Results

Produced a working real-time monitor with eye closure, gaze, head-position, and yawning cues plus audio alerts.

Challenges

  • Lighting sensitivity
  • False positives from brief natural blinks
  • Camera placement variability

Lessons Learned

Temporal logic is essential—raw landmark features are noisy without hysteresis and sustained-evidence rules.

Future Improvements

  • Better calibration UX
  • On-device optimization
  • Expanded dataset for threshold tuning

Questions about this project? Email Caleb.