🎯 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.
- Real-time video feed with alertness tracking
- Alert notifications for closed eyes and yawning
- Python 3.7 or higher
- Webcam connected to the system
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.
- Python 3.6 or higher
-
Clone repo in your device
-
Navigate to the project directory:
cd docker-file-generator
-
Create a virtual environment (optional but recommended):
python3 -m venv venv
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Flask application:
flask run
-
Open your web browser and go to
http://localhost:5000
. -
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.
-
Press Ctrl+C in the terminal to stop the application.