#329 · Primary category: Computer Vision

Drowsiness_Detection

alert computer-vision cv cv2 driver drowsiness-detection drowsy-driver-warning-system eyes opencv opencv3-python python3 raspberry-pi

A simple Drowsiness Detection module for humans. 😴 🚫 🚗

Project last updated:06/09/25

GitHub Stars

541

Forks

263

Contributors

7

License

MIT

Why we included this project

Driver fatigue detection is a classic computer vision problem, and this module shows how far you can get with a webcam and a few well-chosen libraries. It uses dlib's facial landmark model to track each eye, then computes the eye aspect ratio over a rolling window of frames. When that ratio stays low long enough to suggest closed or nearly closed eyes, it raises an alarm. The whole pipeline is short enough to read end to end, which makes it easy to adapt the threshold or swap in your own camera setup. Since it only needs cv2, imutils, dlib, and scipy, it can also run on a Raspberry Pi for an in-vehicle demo. It is a teaching-grade implementation rather than a hardened product, but that is exactly what makes it useful as a reference for learning how facial-landmark vision applies to a real safety use case.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category