Skip to content

This project utilizes deep learning and Haar cascade files for driver drowsiness detection. Analyzing real-time facial expressions and eye movements, it alerts drivers to signs of drowsiness, enhancing road safety by issuing timely warnings and reducing the risk of accidents caused by fatigue.

Notifications You must be signed in to change notification settings

adityajai25/driver-drowsiness-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Driver Drowsiness Detection

A system that alarms the driver as soon as it detects that the driver is becoming drowsy to prevent any accidents.

Quick Start 🚀

Clone the Repository

git clone https://github.com/adityajai25/driver-drowsiness-detection.git

Then

cd driver-drowsiness-detection

Dataset

We used a dataset downloaded from Kaggle.

Creating Virtual Environment

Using a virtual environment isolates dependencies, manages library versions, keeps the global Python environment clean, and ensures consistent setups.

On Windows

Creating a virtual environment:

Open Command Prompt and navigate to the project directory

cd project/directory/

Create a Virtual Environment:

python -m venv env

To Activate the Virtual Environment:

.\env\Scripts\activate

On mac/Linux

Creating a virtual environment:

Open terminal and navigate to the project directory

cd project/directory/

Create a Virtual Environment:

python -m venv env

To Activate the Virtual Environment:

source env/bin/activate

Installing Required Packages

Once the virtual environment is activated, install the required packages using the following commands:

1. Install pygame

pip install pygame==2.4.0

2. Install openCV-Python

pip install opencv-python==4.6.0.66

3. Install numpy

pip install numpy==1.23.0

4. Install keras

pip install keras==2.12.0

5. Install tensorflow

pip install tensorflow==2.13.0

Execution

After installing the packages required, the project can be executed using the following command.

python main.py 

This will initiate the application, and it may take a few moments to activate the webcam and begin detection.

About

This project utilizes deep learning and Haar cascade files for driver drowsiness detection. Analyzing real-time facial expressions and eye movements, it alerts drivers to signs of drowsiness, enhancing road safety by issuing timely warnings and reducing the risk of accidents caused by fatigue.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages