Loading repository data…
Loading repository data…
tyrerodr / repository
The Drowsiness Detection System uses YOLOv8 models to monitor drowsiness in real-time by detecting eye states and yawning. Built with Python and leveraging the GroundingDINO library for bounding box generation, this project offers real-time alerts through a PyQt5 interface.
The Drowsiness Detection System is a project designed to monitor a person's alertness in real-time by analyzing facial features.
By utilizing computer vision and machine learning techniques, the system aims to detect signs of drowsiness and provide timely alerts — particularly useful for applications like driver monitoring.
This repository focuses on illustrating the full development process, including data capture, auto-labeling, model training, and detection pipeline integration.
AutoLabelling.py: Script for automated bounding box labeling using GroundingDINO.CaptureData.py: Records and logs video data for analysis or training.DrowsinessDetector.py: Core detection script integrating real-time inference and alerts.LoadData.ipynb: Loads and preprocesses datasets.RedirectData.ipynb: Organizes and redirects captured data for training.train.ipynb: Notebook for training the YOLO models.Clone the repository:
git clone https://github.com/tyrerodr/Real_time_drowsy_driving_detection.git
cd Real_time_drowsy_driving_detection
Create a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Run the detection system:
python DrowsinessDetector.py
DrowsinessDetector.py with a connected webcam to monitor drowsiness.CaptureData.py to collect video frames for training or testing.train.ipynb to retrain the models on your custom datasets.The system uses two separate YOLOv8 models:
Eye Detection Model:
Yawning Detection Model:
Auto Labeling:
GroundingDINO was used to generate bounding boxes for YOLO training to improve dataset quality.
Once trained, the models' predictions are combined with confidence thresholds and visualized in a PyQt5 GUI.
This repository is intended primarily to showcase the development process of a drowsiness detection system — including data collection, model training, and real-time integration.
The uploaded model weights are preliminary and not fully trained to convergence.
They are mainly for demonstration purposes, and final production-ready models are maintained separately.
We appreciate any feedback and contributions to improve the system.
Eng. Tyrone Eduardo Rodriguez Motato
Computer Vision Engineer
Guayaquil, Ecuador
Email: tyrerodr@hotmail.com