A Python Based Driver Drowsiness Detection
A Python Based Driver Drowsiness Detection
Mrs. M. Rajeswari1,Palepu Bhanusri2,Korrayi Akhil3,Peethala Bhavani4,Chandramahanthi Sai
Shanmukha5
1 Assistant Professor, Computer Science and Engineering, Visakha Institute of Engineering &
Technology(A), Narava, Visakhapatnam, India.
2,3,4,5, B.Tech Student, Computer Science and Engineering (Aritificial Intelligence and Machine Learning),
Visakha Institute of Engineering & Technology(A), Narava, Visakhapatnam, India
Abstract:Driver drowsiness is one of the leading causes of road accidents worldwide, particularly during long-distance travel and night-time driving. This paper presents a real-time, non-intrusive Driver Drowsiness Detection System developed using Python and computer vision techniques. The proposed system continuously monitors the driver's facial features through a standard webcam and detects early signs of fatigue by analyzing eye closure patterns using the Eye Aspect Ratio (EAR) metric. The system integrates powerful libraries including OpenCV for video capture and processing, MediaPipe for precise facial landmark detection, and TensorFlow/Keras for Convolutional Neural Network (CNN)-based driver state classification. When the system determines that the driver is drowsy, an immediate audio alarm is triggered to alert the driver and prevent potential accidents. A Flask-based web interface displays the live video feed and real-time detectionstatus, making the system interactive and user-friendly. The system is designed to run on standard hardware such as a laptop or embedded device, making it cost-effective and easily deployable. Experimental evaluations demonstrate that the system performs reliably under normal operating conditions and accurately identifies prolonged eye closure as a primary indicator of fatigue, contributing meaningfully to intelligent transportation safety. Keywords:Driver Drowsiness Detection, Eye Aspect Ratio, Convolutional Neural Network, OpenCV, MediaPipe, Flask, RoadSafety, Computer Vision, Real-Time Monitoring