gimseng / 99-ML-Learning-Projects

A list of 99 machine learning projects for anyone interested to learn from coding and building projects
MIT License
690 stars 191 forks source link

Drowsy Driver Detection System #200

Open tripti-bhardwaj opened 1 year ago

tripti-bhardwaj commented 1 year ago

Learning Goals

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:

  1. Setup: Set up the required Python environment with OpenCV, dlib, and other necessary libraries.

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

  3. Run the System: Execute the provided code and observe how the system detects blinks and triggers drowsiness alerts in real-time.

  4. Experiment: Experiment with different threshold values for blink detection (the thresh variable) and drowsiness detection (the drowsyTime and blinkTime variables). Observe how changing these thresholds affects the system's performance.

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

  6. Challenge: Extend the system by implementing additional features, such as tracking the duration of drowsy episodes or customizing the alert mechanism.

Prerequisites

Data source/summary:

Data Source: Kaggle Dataset: https://www.kaggle.com/datasets/sergiovirahonda/shape-predictor-68-face-landmarksdat