Drowsy Driver Detection System
tripti-bhardwaj opened this issue · comments
Learning Goals
- Understand real-time computer vision applications.
- Gain experience with facial landmarks detection using dlib.
- Learn to calculate and utilize the eye aspect ratio (EAR) for blink detection.
- Explore how to implement an alert system for drowsiness detection.
- Practice working with real-time video feeds and OpenCV.
Exercise Statement
Title: Real-Time Blink Detection and Drowsiness Alert for Drivers
Description: In this exercise, you will work with a Python-based real-time blink detection and drowsiness alert system similar to the one implemented in the provided project. You will gain hands-on experience with computer vision techniques, facial landmarks detection, and alert mechanisms.
Tasks:
-
Setup: Set up the required Python environment with OpenCV, dlib, and other necessary libraries.
-
Code Review: Review the provided code for the blink detection and drowsiness alert system. Understand how it captures a video feed, detects facial landmarks, calculates the eye aspect ratio (EAR), and triggers an alert for drowsiness.
-
Run the System: Execute the provided code and observe how the system detects blinks and triggers drowsiness alerts in real-time.
-
Experiment: Experiment with different threshold values for blink detection (the
thresh
variable) and drowsiness detection (thedrowsyTime
andblinkTime
variables). Observe how changing these thresholds affects the system's performance. -
Dataset Integration: If you want to enhance the system's performance, you can integrate the dataset you mentioned (
shape_predictor_68_face_landmarks.dat
). Explore how using a more comprehensive facial landmarks model can improve accuracy. -
Challenge: Extend the system by implementing additional features, such as tracking the duration of drowsy episodes or customizing the alert mechanism.
Prerequisites
- Basic understanding of Python programming.
- Familiarity with computer vision concepts (e.g., image processing, object detection).
Data source/summary:
Data Source: Kaggle
Dataset: https://www.kaggle.com/datasets/sergiovirahonda/shape-predictor-68-face-landmarksdat