https://github.com/hitthecodelabs/drowsinessdetectorstream
A real-time drowsiness detection Flask system using a webcam feed
https://github.com/hitthecodelabs/drowsinessdetectorstream
dlib flask opencv pil pillow pygame python
Last synced: about 2 months ago
JSON representation
A real-time drowsiness detection Flask system using a webcam feed
- Host: GitHub
- URL: https://github.com/hitthecodelabs/drowsinessdetectorstream
- Owner: hitthecodelabs
- License: mit
- Created: 2023-11-13T06:50:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-13T17:53:32.000Z (over 2 years ago)
- Last Synced: 2025-03-29T10:47:28.032Z (about 1 year ago)
- Topics: dlib, flask, opencv, pil, pillow, pygame, python
- Language: Python
- Homepage:
- Size: 3.23 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Drowsiness Detector Stream

## Description
DrowsinessDetectorStream is a real-time drowsiness detection system using a webcam feed. It utilizes OpenCV for image processing, Dlib for facial landmark detection, and Pygame for alarm notifications. The application is built on Flask for easy web streaming of the video feed.
## Features
- Real-time drowsiness detection using webcam feed.
- Facial landmark analysis to detect eyes, mouth, and nose positions.
- Eye Aspect Ratio (EAR) algorithm for detecting closed eyes.
- Audio alerts for detected drowsiness.
- Web interface for streaming the video feed.
## Installation
### Prerequisites
- Python 3.x
- OpenCV
- Dlib
- Pygame
- Pillow
- Flask
### Setup
1. Clone the repository:
```bash
git clone https://github.com/hitthecodelabs/DrowsinessDetectorStream.git
```
2. Install the required packages:
```bash
pip install -r requirements.txt
```
## Usage
To start the application, run the following command in your terminal:
```bash
python app_cv2.py
```
Open a web browser and navigate to `http://localhost:5000` to view the streaming video feed.
## Contribution
Contributions to DrowsinessDetectorStream are welcome. Please ensure to follow best practices and code standards when contributing.
## License
[MIT License](LICENSE)
## Acknowledgments
- Haar Cascades for face and eye detection.
- Dlib's facial landmark predictor.
- Pygame for audio playback.
- Flask for web framework capabilities.
## Contact
For any inquiries, please contact [e-mail](mailto:jpaul@hitthecodelabs.com).