The “Driver Drowsiness and Distraction Detection System” is an AI-powered safety solution developed using Python. It uses a laptop camera to monitor the driver’s eye activity in real time through computer vision techniques like OpenCV and Dlib or Mediapipe. The system intelligently detects eye closure duration to assess drowsiness levels — triggering alerts when eyes remain closed beyond a safe threshold. If drowsiness is detected for over 5 seconds, a visual popup is displayed to alert the driver. The system will send an SMS alert & location to a registered family member’s mobile number.Additionally, the system logs essential details such as driver ID, timestamp, alert status, ear value, vehicle id, location and map link into a local Excel file or Google Sheet for monitoring purposes. This paper offers an efficient and low-cost driver fatigue detection system that supports proactive road safety interventions through real-time automation and digital record-keeping.
Introduction
a smart driver drowsiness detection system designed to prevent road accidents caused by fatigue during long-distance driving. The system uses a laptop/webcam-based setup with Python, OpenCV, and DLIB to monitor the driver’s face in real time. It detects eye closure using the Eye Aspect Ratio (EAR) method and identifies drowsiness when eyes remain closed beyond a set threshold (around 5 seconds). When drowsiness is detected, the system triggers on-screen alerts, such as “Drowsiness Detected,” while showing “You Are Safe” when the driver is alert. It also sends SMS alerts with location details and logs all events (time, status, vehicle ID, etc.) into a cloud-based spreadsheet (Google Sheets) for monitoring by fleet managers.
DLIB facial landmark detection (68 points) is used to track eye movements accurately, making the system reliable in real-time conditions. The workflow includes continuous video capture, face detection, EAR calculation, threshold checking, alert generation, and cloud logging.
Conclusion
The “Driver Drowsiness and Distraction Detection System” presents a powerful and intelligent approach to enhancing road safety by continuously monitoring driver alertness using a simple webcam and advanced facial landmark detection through the DLIB algorithm. By calculating the Eye Aspect Ratio (EAR), the system accurately distinguishes between open and closed eyes to detect signs of drowsiness in real time. When drowsiness is detected, immediate alerts in the form of an on-screen warning ensure the driver is made aware and can take corrective action and the system will send an SMS alert & location to a registered family member’s mobile number .
Additionally, the system logs every event—safe or drowsy—to a cloud-based spreadsheet along with the date, time, vehicle id, location, map link & status, enabling fleet owners and transport supervisors to track driver behavior over time and take preventive measures if necessary. Running seamlessly throughout the entire journey, this system not only acts as a real-time safety mechanism but also as a long-term data-driven solution. Its affordability, ease of implementation, and scalability make it an ideal tool for both individual drivers and commercial fleets to reduce fatigue-related accidents and promote responsible driving habits.
References
[1] S. Sathasivam, A. K. Mahamad, S. Saon, A. Sidek, M. M. Som and H. A. Ameen, \"Drowsiness Detection System using Eye Aspect Ratio Technique,\" 2020 IEEE Student Conference on Research and Development (SCOReD), Batu Pahat, Malaysia, 2020, pp. 448-452, doi: 10.1109/SCOReD50371.2020.9251035.
[2] Sanam Narejo, Saima Siraj Soomro, Bushra Naz, Aqsa Noreen, Nadia Memon, “Development Of Vehicle Driver Drowsiness Detection System Using Eye Aspect Ratio”, PJAEE, 17 (9) (2020).
[3] Sukrit Mehta, Sharad Dadhich, Sahil Gumber, Arpita Jadhav Bhatt, “Real-Time Driver Drowsiness Detection System Using Eye Aspect Ratio and Eye Closure Ratio” In Proceedings of international conference on sustainable computing in science, technology and management (SUSCOM), Amity University Rajasthan, Jaipur-India. 2023.
[4] Dewi, Christine, Rung-Ching Chen, Chun-Wei Chang, Shih-Hung Wu, Xiaoyi Jiang, and Hui Yu. \"Eye aspect ratio for real-time drowsiness detection to improve driver safety.\" Electronics 11, no. 19 (2022): 3183.
[5] Rahul K, Raj Suriyan G, Rajesh S, Udhayakumar G, “Driver’s Drowsiness Detection by Analyzing Yawning and Eye Closure”, International Research Journal of Engineering and Technology (IRJET), May 2022.
[6] Alshaqaqi, Belal, Abdullah Salem Baquhaizel, Mohamed El Amine Ouis, Meriem Boumehed, Abdelaziz Ouamri, and Mokhtar Keche. \"Driver drowsiness detection system.\" In 2020 8th international workshop on systems, signal processing and their applications (WoSSPA), pp. 151-155. IEEE, 2020.
[7] Deng, Wanghua, and Ruoxue Wu. \"Real-time driver-drowsiness detection system using facial features.\" Ieee Access 7 (2021): 118727-118738.
[8] Saini, Vandna, and Rekha Saini. \"Driver drowsiness detection system and techniques: a review.\" International Journal of Computer Science and Information Technologies 5, no. 3 (2021): 4245-4249.
[9] Albadawi, Yaman, Maen Takruri, and Mohammed Awad. \"A review of recent developments in driver drowsiness detection systems.\" Sensors 22, no. 5 (2022): 2069.
[10] Kolus, Ahmet. \"A systematic review on driver drowsiness detection using eye activity measures.\" IEEE Access (2024).