Skip to main content

Driver Drowsiness Detection System

Page 1


International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 09 | Sep 2025 www.irjet.net p-ISSN: 2395-0072

Driver Drowsiness Detection System

Manikrao M.1 , Azra Farheen2

1Professor, Dept. of Computer Science and Engineering, Guru Nanak Dev Engineering College, Karnataka, India

2Student, Dept. of Computer Science and Engineering, Guru Nanak Dev Engineering College, Karnataka, India

Abstract - Accidents happen during drowsy road trips and are becoming more frequent; it is a well-known fact that fatigue and distractionofthe driverleadtonumerousmishaps and injuries, and this research is primarily focused on increasing awareness of drowsiness. The main objective of drowsiness detection systems is to reduce these accidents. Previous studies onsystems for detecting drowsiness were the focus of secondary data, and several methods were used to identify drowsiness or inattentive riding. Our motive is the creation of a system that can detect the driver's drowsiness and prevent accidents by analyzing the image of a person captured through the webcam and aiming at how this data can be used to enhance safety measures. This car protection mission aims to save you from injuries caused by the driver's sleepiness. Essentially, youare collecting human photographs from the internet camera stream and exploring how to improve safety usingthat information.Thisinvolves gathering snapshots from the live webcam stream and training the system to recognize the drowsiness of the driving force. Basically, this process involves the collection of the images from the live webcam and applying the machine learning algorithms to them to identify if the driver is drowsy or not. If the driver is drowsy a buzzer alarm is played, and the sound is increased to wake the driver up. Therefore, this utility goes beyond the effort of detecting drowsiness while driving. Face extraction, eye extraction with dlib.

Key Words: Driver Drowsiness Detection, Driver Monitoring, Road Safety, Convolutional Neural Network (CNN), Facial feature, Drowsy identification,Alarm

1.INTRODUCTION

Numerouscollisionscanbeattributedtodriverfatigue.Itis believed that around 1200 fatalities and 76,000 injuries annuallyarecausedbyexhaustion-relatedaccidents,asper previous estimates. Numerous automobile accidents are causedbydriverdrowsinessandfatigue.Asignificantstepin thesubjectofaccidentpreventionsystemsisdevelopingand maintainingeffectivetechnologiesthatcanaccuratelydetect or alert the driver before a disaster occurs. To avoid accidentscausedbytirednessontheroads,certainactions mustbeimplemented.Withtheadvancementoftechnology andtheuseofcamerasforfiltering,wecanpreventmajor catastrophes and alert drivers who are experiencing drowsinessthroughafatiguedetectionsystem.Thisproject aimstoincreasethemodel'spopularity.Amachinecanbe

setuptoconstantlymonitorthedriver'seyestoshowtheir state. Early detection of driver fatigue can be achieved by observingtheeyes,whichcanhelppreventaminorcollision. Aseriesofimagesofafacecanbeusedtomeasuretheeye movements and squint patterns by the machine. Driver fatiguecanbemonitoredusingdigitalcameras,andthedata collectedcanbeutilizedtoconstructframeworksinplace. Themaintechniquereliesonfacialrecognitiontechnology that examines a driver's facial expressions captured by cameras.

2. OBJECTIVE

ThesuggestedpapercomplieswiththeDriver’sdrowsiness detectiontechnology whichisdesignedtoenhancevehicle safetybypreventingaccidentscausedbysleepydrivers.The primarygoalistoremindthedrivertogetashortbreakto avoidanymishapbysignalingthemusinganalarmorbuzzer ifdrowsy. Thesystemcontinuouslymonitorsthedriver’seye retina to identify the signs of drowsiness. The system identifiesthebenthead,closedorsquintedeyes,andyawning asanindicationofdrowsiness.Upondetectingdrowsiness, the system promptly alerts the driver through an audible buzzer or alarm. By minimizing accidents, this technology contributes to better traffic flow and overall road safety management.

3.SYSTEM

ANALYSIS

Existing System:

Research indicates that nearly 25% of severe traffic accidents are linked to driver fatigue, highlighting that drowsiness contributes to more crashes than incidents caused by driving under the influence. This study aims to implement a driver fatigue monitoring system through advanced image processing techniques. The drowsiness detection mechanism relies on vision-based technology, primarily using a compact camera focused on the driver’s face.Thiscameracontinuouslymonitorseyemovementsto identifysignsofsleepiness.Thethreemostgeneralmethods to detect driver’s drowsiness are: a) vehicle-based b) behavior- and c) physiological-based methods. Vehiclebased: The steering wheel movement, the accelerator of vehicle or pattern of vehicle brakes, vehicle’s speed, and deviationinpositionoflanearemonitoredcontinuouslyin the method which is based on vehicle. If there is any deviationinthe valuesdetected,itisconsideredasdriver drowsiness.Thesensorsarenotconnectedtothedriver,and this measurement is nonintrusive. Behavior-based: Visual behavior like blinking of eye, closing of eye, yawning,

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 09 | Sep 2025 www.irjet.net p-ISSN: 2395-0072

bendingofheadetc.areexaminedfordrowsinessdetection inbehavioralbasedmethod.Asimplecameraisusedtosend inputimagestoSVMalgorithmtoidentifytheabovefeatures and are called nonintrusive measurement. Physiological based:Monitoring the physiological signalslike EOG,ECG, the heartbeat, EEG, pulse rate etc. helps in detecting the fatigue of the driver based on physiological method and hence are intrusive measurement because of the direct connectionofsensorstothedriver.Thecurrentdetectionof the drowsiness method primarily relies on the machine learningalgorithms.

Proposed System:

Theproposedsystemcomprisesofdlib,pygameandOpenCV libraries for deep learning-based face landmark detection, audioalertsandimageprocessing,respectively.Thecamera, the face detector, and the alarm system. Proposed System Features: a) Tracking of visual objects in real-time b) Detection and mapping of facial landmarks c) Monitoring driveralertnesstoidentifydrowsinessd)Identificationofeye andmouthregionstoassessfatiguelevelse)Analyzingeye state byutilizingconvolutional neural networks(CNN)and angularmeasurementsf)Recognitionofmouthmovements andstatusg)ActivationofaudiblealarmsforalertsAlmostall drivers have experienced this drowsiness problem while driving. Youngsters and professional drivers are mostly affectedbythisdrowsydrivingbecauseofcontinuoushours ofdrivingwithoutanyrest.Inmanycities,autodriversand cab drivers drive continuously overtime sometimes to completetheirtargetsorattimestogetbonusprofit.Manyof thepoorworkersintomeettheirdailyexpensesandforthe sakeoftheirlovedonestendtoworkinnightshiftsforlong periods,whichbecomesoneofthemainreasonsforaccidents takingplacebecauseofdrowsydriving.orderAwebcamhas beenusedtorecordthevideoofthedriver.Thewebcamis arrangedinawaythatcapturesthefrontfacialimageofthe driver.

4.SYSTEM DESIGN

The system design involves outlining the architectural components and their interactions. Here is a high –level overviewofthesystemdesign:

Fig-1:SchematicDiagramofConvolutionalNeuralNetwork (CNN)
Fig-2:GeneralSchemeforDrowsinessDetection
Fig-3:GeneralSchemeforDistractionDetection

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 09 | Sep 2025 www.irjet.net p-ISSN: 2395-0072

5. METHODOLOGY

ThemethodsectionofaprojectreportonDriverDrowsiness Detectionoutlinestheactivitiesandproceduresrequiredin carryingouttheproject

TECHNOLOGIES USED:

a) Python: An interpreted, programming language famous for its high-level syntax and readability. Python'suniqueindentationenhancescodeclarity, leading to simpler writing and maintenance. It supportsvariousstylesofprogramming,including procedural, object-oriented, and functional paradigms, and is dynamically typed, allowing flexiblecodingforprojectsofanyscale

b) PyCharm IDE: It supports open-source software creation, promote open standards, and facilitate interactive computing various programming languages.

c) Image Processing: This field involves applying computer algorithms to manipulate and analyze

digitalimages,enablingtaskssuchasenhancement, restoration,andfeatureextraction.

d) Machine Learning: A branch of artificial intelligence that develops algorithms to perform tasksbysupervisedlearningratherthanfollowing explicitinstructions.

ALGORITHM USED:

Convolutional Neural Network (CNN) is a strong contender for this project because of how often they are usedinpictureclassificationjobs.Inavarietyofcomputer vision applications, CNN has demonstrated proficiency in independently extracting relevant characteristics from images.

LIBRARIES USED:

OpenCV:

OpenCVisafundamentallibraryforcomputervisiontasks. ThesystemreliesonOpenCVforcapturingvideofeedfrom the camera, performing image processing tasks, and displayingvisualfeedback.

dlib:

Thedliblibraryprovidesfunctionalityfordetectingfaceand faciallandmarkdetectionsystemtoidentifykeyfacialeyes, nose,andmouth.

Pygame:

Pygame is used to play alert sounds when drowsiness is detected. It provides an easy-to-use interface for audio playback and can be integrated seamlessly into Python applications.

NumPy: In Python, it provides support for large fields, extensivelyinimageprocessingtasks.

Visual Studio (Windowsonlyforbuildingdlib):

OnWindows,VisualStudiowiththeC++workloadisrequired tobuilddlibfromsource.Thisincludesthenecessarytools andlibrariesforcompilingC++code.

The activitiesandproceduresfollowedhere are asshown below:

PERCLOS (PERCENTAGE OF EYE CLOSURE)

To sense the drowsy state of the driver, this system uses PERCLOS(percentageofeyeclosure)techniquetomeasure the drowsy level. PERCLOS is a scientifically recognized metricoftirednesslinkedtodelayedeyeclosure.

Fig -4:Flowchartdepictingdriverfatiguedetectionsystem
Fig-5:Use-casediagram

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 09 | Sep 2025 www.irjet.net p-ISSN: 2395-0072

Fig-6:PERCLOS

EYE ASPECT RATIO

(EAR):

TheEyeAspectRatio(EAR)providesaquantitativemeasure of how open the eye is at any given moment. This ratio is calculatedusingtheformulabelow,

EAR=[{||P2-P6||+||P3-P5||}/{2*||P1-P4||}]

whichcomparesdistancesbetweenspecificeyelandmarks. WhentheEARdropsbeneathapredefinedlimit,itindicates thattheeyesarelikelyclosed,enablingprogramstodetect blinkingordrowsiness.

Fig-6:EyeAspectRatio(EAR)

FACIAL FEATURE IDENTIFICATION:

Facial feature identification employs a built-in HOG SVM classifier to pinpoint 68 precise (x, y) coordinates that correspondtokeyfacialfeatures.Thistechniqueiswidely appliedinimageandvideoanalysistasks,includingobject and face recognition. These landmarks help accurately identifyandoutlinecriticalfacialareassuchas:Themouth· Theeyes·Theeyebrows

Fig-7:Facialfeatureidentification

MOUTH

ASPECT RATIO (MAR):

TodeterminetheMouthAspectRatio,weanalyzethefacial structureusing68distinct(x,y)landmarkpoints.Themouth itselfisdefinedby20ofthesepoints.Specifically,wefocus onpoints62,64,66,and68tomeasuredistances,applyinga method similar to how the Eye Aspect Ratio (EAR) is calculated.

TheformulaforMARisgivenby

MAR = [{|CD| + |EF| + |GH|} / {3* |AB|}]

wherethespacebetweenthegivenpointsrepresentsvertical andhorizontalmouthmeasurements.

Fig-8: MouthAspectRatio(MAR)

Drowsinesscanberecognizedbytheeyesquintsandlevelof eyeconclusion(PERCLOS)

Fig-9: FiguredemonstratingthePERCLOSlevel

Asaresult,whenthedriveryawnsorshutstheireyes,an alertbeepsoundstoregaintheirattention.

6.IMPLEMENTATIONS:

The Implementation sectionofthisprojectreportoutlines thestepsandproceduresinvolvedinbuildingandtraining thepredictivemodel.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 09 | Sep 2025 www.irjet.net p-ISSN: 2395-0072

Theimplementationstepsare:

a) Importing necessary libraries – OpenCV, NumPy, Dlib,imutils,andpygame.

b) Initializingthecameraandthefacedetector.

c) Defining a function to compute the distance betweenthetwopointsusingtheNumpylibrary.

d) Definingthefunctiontodetectifthepersonblinked theireyesornot.

e) Initializing the Pygame mixer to load the alert sound.

f) In the main loop, capturing the frames from the camera.

g) Ifthepersonisblinkingtheireyesataslowrate, the code assumes that the person is drowsy and playsthealertsound.

h) Ifthepersonisactiveandnotblinkingtheireyes, thecodeassumesthatthepersonisalert.

i) Displaying the status of the person on the frame usingOpenCV.

j) Showingthecapturedframeandthedetectedface inaseparatewindow.

k) Exiting the program when the user presses the “ctrl-c”keys.

7.OUTPUT:

Thedevelopeddriveranomalydetectionsystemefficiently identifies signs of drowsiness, intoxication, and inattentiveness within a short timeframe. Our fatigue or drowsinessdetectionmodeleffectivelyrecognizessignsof drowsinessbehindthewheel.Thisinnovativedevicehelps preventaccidentscausedbydriversleepiness,providedthe digitalcameradeliverssufficientimagequality.Thesystem gathers data on head and eye positions using a suite of proprietary image processing algorithms, enabling it to determine whether the driver's eyes are open or closed during monitoring. If the eyes remain closed beyond a criticalduration,thesystemtriggersanalert,assessingthe driver's alertness level based on sustained eye closure patterns.

Fig-10:chronologicalexchangeoftheprocess
Fig-11: SimplifiedWorkflowDiagram
Fig:OutputresultforDrowsystate
Fig:OutputresultforActivestate
Fig:InitialconditionoftheDriver
Fig:Drowsycondition basedonclosedeyes

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 12 Issue: 09 | Sep 2025 www.irjet.net p-ISSN: 2395-0072

8.FUTURE SCOPE:

Thissystemcanbeusedinanycountryfordriversafetyand accidentprevention.Lotsoffinanciallossesanddeathscan bepreventedusingthissystem.Trafficoccurrenceafterthe accident will also be eliminated. Monitoring drivers on trucksandcontainers,largetrolleyswillbedoneinthebest way. Roadways and transport companies can use this system. Collaborations with automotive manufacturers, regulatoryagencies,andresearchinstitutionscanfacilitate the integration of drowsiness detection systems into standardsafetyprotocolsandregulations.

Lookingahead,futureresearchanddevelopment effortscan

a) the detection can be improved by using an infraredcameraforlow-lightsituations.

b) Utilize a multi-model machine-learning approach and include additional modalities such as the audio channel in addition to the videoframestoenhanceperformance.

c) focusonrefiningthesystem'salgorithms

d) improvingitsrobustness

e) exploring additional features to enhance its capabilitiesfurther.

9.

CONCLUSIONS

Thedevelopeddriveranomalydetectionsystemidentifies signsoffatigue,intoxication,andinattentivenessinashort span. Our eye-closure-based fatigue detection model distinguishes between normal blinking and genuine drowsiness, effectively recognizing driver lethargy. This innovative solution 1 helps prevent the camera quality is sufficient. accidents caused by driver sleepiness provided Thesystemgathersdataonheadandeyepositionsthrougha suiteofcustomimageprocessingalgorithms.Itcontinuously monitorsiftheeyesareopenorclosed.Iftheeyesremain shutbeyondasafethreshold,thesystempromptlyissuesan alert. timely Driver alertness is assessed by analyzing the durationandfrequencyofeyeclosuresenablingwarningsto enhance road safety. The importance of detecting drowsiness in real-time cannot be overstated, given its

potential to prevent accidents, save lives, and enhance overall road safety. By continuously monitoring driver alertness and promptly their drowsy state, the proposed alertingdrivertosystemaddressescriticalgapsinexisting safetymeasures.Thesuccessoftheproject,faciallandmark analysisandeyeblinkpatternssignsofdrowsiness,evenin challenging real-world conditions. Through rigorous experimentation and evaluation, the system has demonstratedeffectivenessinaccuratelyidentifyingdrowsy driversandtriggeringtimelyinterventions.Moreover,the proposedsolutionoffersscalabilityandversatility,vehicle platformsandadvanceddriverasSystems.Thisintegration open support unities for wide spreader option and deployment,furtherenhancingitsimpactonroadsafety.

REFERENCES

[1] ResearchPapers:Youcanfindrelevantacademicpapers by searching databases like Google Scholar or IEEE explore using key words like" driver drowsiness detectionsystem"or"drowsinessdetectiontechniques". These resources will provide in-depth studies on the topic.

[2] "https://www.researchgate.net/publication/37010517 8_DRIVER_DROWSINESS_DETECTION"(DriverDrowsine ssDetectionSystems–ResearchGate) offers a downloadable PDF discussing various drowsiness detectionsystems.

[3] Report on Drowsiness Detection System: "https://www.slideshare.net/vigneshwarvs/driverdrowsiness-detection" Drowsiness Detection report | (Driver Drowsiness Detection Report | PDF – Slide Share) provides a presentation on driver drowsiness detection systems that you can reference for an overviewofthetopic.

[4] BibliographiesonDrowsinessDetection: "https://www.grafiati.com/en/literatureselections/driver-drowsinessdetection/"(Bibliographies:'DriverDrowsinessDetection' -Grafiati)curatesalistofrelevantreferencesondriver drowsinessdetection,includingjournalarticles,thesis, andconferencepapers.

[5] Project Implementation Example: While not a formal report,thisYouTubevideodemonstratesaDrowsiness Detection System using OpenCV [YouTube driver drowsinessdetectionsystemusingopencv.Itcanbea helpful resource to understand the practical implementationofthesystem.

Fig:Drowsyconditionbasedonbenthead

Turn static files into dynamic content formats.

Create a flipbook