Skip to content

sevilayerkan/driver-sleep-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Driver Sleep Detection

Project Details

🎯 The Driver Sleep Detection App is a web-based application that uses computer vision techniques to track alertness based on eye and mouth movement. It detects closed eyes and yawning in real-time using OpenCV and dlib libraries.

Features

  • Real-time video feed with alertness tracking
  • Alert notifications for closed eyes and yawning

Prerequisites

  • Python 3.7 or higher
  • Webcam connected to the system

Installation

Make sure Python and pip is installed by using this commands in your command line

python --version
pip --version

If they are installed use this to install the requirements:

pip install -r requirements.txt

Download the shape predictor model:

  • Download the shape predictor model (shape_predictor_68_face_landmarks.dat) from this link: shape_predictor_68_face_landmarks.dat.
  • Extract the downloaded file.
  • Copy the shape_predictor_68_face_landmarks.dat file and paste it into the project directory.

Usage for Flask Web App

Requirements

  • Python 3.6 or higher

Installation

  1. Clone repo in your device

  2. Navigate to the project directory:

    cd docker-file-generator
  3. Create a virtual environment (optional but recommended):

    python3 -m venv venv
  4. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Run the Flask application:

    flask run
  2. Open your web browser and go to http://localhost:5000.

  3. You will see the video feed with real-time alertness tracking. The application will display alerts on the video when closed eyes or yawning are detected.

  4. Press Ctrl+C in the terminal to stop the application.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published