This project explores various techniques for detecting driver drowsiness and evaluates their effectiveness to determine the optimal approach. The primary focus is on detecting the driver's face, specifically analyzing the eyes and head movements to assign a score based on the degree of eye openness and head tilt. The project leverages computer vision and deep learning technologies, utilizing the YOLO (You Only Look Once) model for real-time detection.
Driver drowsiness is a significant factor contributing to road accidents, with severe consequences for both drivers and passengers. Detecting drowsiness early can prevent accidents and save lives. This project aims to develop a robust driver drowsiness detection system by analyzing different techniques and identifying the most effective one. The system focuses on detecting the driver's face, particularly the eyes and head movements, to determine the level of drowsiness.
Data Collection
Images and videos of drivers in both awake and drowsy states were collected using a webcam. The dataset was labeled accordingly to train the model on distinguishing between the two states.
Preprocessing
The collected images were preprocessed to ensure uniformity, including resizing and normalization. Data augmentation techniques were applied to increase the diversity of the training dataset.
Model Selection
The YOLOv5 model was chosen due to its efficiency in real-time object detection. The model was fine-tuned on the custom dataset to detect the driver's eyes and head movements.
Model Training
The model was trained using the labeled dataset, with the following parameters:
Image size: 320
Batch size: 16
Number of epochs: 500
Real-time Detection
The trained model was deployed for real-time detection using a webcam. The system continuously monitors the driver's face, analyzing eye openness and head tilt to determine the drowsiness score.
Setup
The experiments were conducted using a standard webcam for data collection and real-time detection. The dataset included images and videos of drivers in various lighting conditions and angles to ensure robustness.
Evaluation Metrics
The model's performance was evaluated based on accuracy, precision, recall, and F1-score. Additionally, the system's real-time performance was assessed to ensure it could effectively monitor the driver without significant latency.
The YOLOv5 model demonstrated high accuracy in detecting the driver's face and analyzing eye openness and head tilt. The model achieved the following performance metrics:
Accuracy: 95%
Precision: 92%
Recall: 90%
F1-score: 91%
The real-time detection system performed efficiently, providing continuous monitoring with minimal latency.