- Overview
- Features
- Dataset
- Kaggle Code for Training
- Model Metrics
- Technologies Used
- How It Works
- Installation
- Future Enhancements
The Driver Monitoring System is designed to detect various states of driver unresponsiveness, including drowsiness, sleep, or even if the driver is unresponsive (dead). Using a YOLOv8-based model for real-time detection, the system identifies signs of these conditions.
When the system detects potential drowsiness, sleep, or unresponsiveness, it triggers an alert prompting the driver to press a button for 3 seconds to confirm they are awake. If the driver presses the button within this time frame, the system determines that the driver is alert. However, if the driver fails to respond within the 3-second window, the system automatically triggers a call to emergency services or a pre-designated contact, including the driver's location to ensure prompt assistance.
- Real-time drowsiness detection using a YOLOv8 custom-trained model.
- Audible alarm to notify the driver.
- Intuitive GUI for user interaction, allowing the driver to cancel the alert.
- Automated emergency call alert system with the driver's location and details if the driver fails to respond. using Twilio and LocationIQ.
The model was trained on a custom dataset of 10,000+ images, including:
- Drowsy driver images: Captured under various lighting conditions and angles.
- Non-drowsy driver images: Covers a wide range of normal driving behaviors.
This code provides the training process using YOLOv8, You can view and run the code directly from this link: https://www.kaggle.com/code/ahmedsaleh627/notebook001d26f6f9
- YOLOv8: For real-time object detection.
- OpenCV: To capture and process video frames.
- Tkinter: For GUI implementation.
- Twilio API: To send emergency alerts via calls/SMS.
- LocationIQ API: For reverse geocoding to get the driver's location.
-
Real-Time Monitoring: The system captures video frames via webcam and runs inference using the YOLOv8 model.
-
Drowsiness Detection: If drowsy behavior is detected for more than 3 seconds, an audible alarm is triggered.
-
Driver Interaction:
- A GUI is displayed, allowing the driver to cancel the alert within 10 seconds.
- If the driver fails to respond, an emergency alert with the location is sent via Twilio.
- Python 3.8+
- Install the required libraries:
pip install ultralytics opencv-python requests twilio Location
git clone https://github.com/<your-username>/Driver-Monitoring-System.git
cd Driver-Monitoring-System
Place the YOLOv8 model file (best.pt) in the root directory. Run the script:
python DMS.py
- Incorporate more robust environmental handling (e.g., low light, occlusions).
- Handling Wearing Sun Glasses
- Integrating this into our Infotainment system instead of using Tkinter as our GUI.