e-candeloro/Driver-State-Detection

A real time, webcam based, driver attention state detection/monitoring system in Python3 using OpenCV and Mediapipe

42
/ 100
Emerging

Detects five distinct driver states (normal, tired, asleep, looking away, distracted) by computing Eye Aspect Ratio, gaze direction, and head pose from 478 Mediapipe face keypoints and iris landmarks. Uses OpenCV's solvePnP for 3D head pose estimation against a canonical face model, then applies rolling PERCLOS (percentage of eyelid closure over time) with decay-based temporal smoothing to reduce false positives. Includes configurable thresholds via command-line arguments for production adaptation across different vehicle setups.

143 stars. No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 2 / 25
Adoption 10 / 25
Maturity 9 / 25
Community 21 / 25

How are scores calculated?

Stars

143

Forks

36

Language

Python

License

MIT

Last pushed

Apr 10, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/computer-vision/e-candeloro/Driver-State-Detection"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.