A system that alarms the driver as soon as it detects that the driver is becoming drowsy to prevent any accidents.
git clone https://github.com/adityajai25/driver-drowsiness-detection.git
Then
cd driver-drowsiness-detection
We used a dataset downloaded from Kaggle.
Using a virtual environment isolates dependencies, manages library versions, keeps the global Python environment clean, and ensures consistent setups.
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
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
Once the virtual environment is activated, install the required packages using the following commands:
pip install pygame==2.4.0
pip install opencv-python==4.6.0.66
pip install numpy==1.23.0
pip install keras==2.12.0
pip install tensorflow==2.13.0
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.