This project is a real-time drowsiness detection system using OpenCV, Dlib, and Streamlit. It helps detect drowsiness in drivers or users by analyzing eye closure duration using the PERCLOS method.
- Real-time eye detection using Dlib's face landmark predictor
- PERCLOS Calculation for drowsiness detection
- Audio Alerts to warn the user when drowsiness is detected
- Live Streaming UI built with Streamlit for easy interaction
git clone https://github.com/ayushh0406/Drowsiness_-Detection.git
cd Drowsiness_-Detection
Ensure you have Python installed (recommended: Python 3.8+). Then, install dependencies:
pip install -r requirements.txt
Download the shape_predictor_68_face_landmarks.dat
file from:
🔗 Dlib Model Download
Extract the .bz2
file and place shape_predictor_68_face_landmarks.dat
inside the project folder.
python app.py
streamlit run app.py
This will launch a web-based UI where you can see the live video feed and drowsiness alerts.
To deploy the app online:
1️⃣ Go to Streamlit Cloud
2️⃣ Click "New App"
3️⃣ Select your GitHub repo
4️⃣ Choose app.py
as the entry file
5️⃣ Click "Deploy"
Feel free to fork this repo, make improvements, and submit a pull request! 😊
For queries, reach out to [Your Email or GitHub Profile].
⭐ If you like this project, please give it a star on GitHub! ⭐