Automatic Helmet Detector
Dr. Gayathri Monicka S1 , Roahith Kumar B2 , Mohamed Hafiz Khan K31Professor, Dept of Electrical and Electronics Engineering, SRM Institute of Science and Technology, Chennai, Tamil Nadu, India
2Student, Dept of Electrical and Electronics Engineering, SRM Institute of Science and Technology, Chennai, Tamil Nadu, India
3Student, Dept of Electrical and Electronics Engineering, SRM Institute of Science and Technology, Chennai, Tamil Nadu, India
Abstract - Loss of lives due to motorcycle accidents is increasing. The major reason for such incidents is due to severe head injuries which can be avoided by wearing safety things such as helmets. So we designed a device that detects the presence of a helmet automatically and allows the driver to switch on his vehicle only if he wears the helmet. In this paper, we presented a method to detect whether the rider wears a helmet or not. Here we used YOLO V5 which is an object detection algorithm mainly used for recognition purposes. Here the camera is fitted in such a manner that it focuses the rider automatically when he turnsonhisbike.In so far existing models they used single-shot multibox detectors which has a demerit of focusing on smaller objects and the problem is resolved in this paper. We programmed it with datasets of a person with helmets and without helmetsandwe used relays for switching on and off vehicles based on the output from raspberry pi. Our proposed model achieved 96% efficiency in detecting persons with and without helmets.
Keywords— Helmet, Object detection algorithm, Raspberrypi,Design,Analysis
1. Introduction
According to the report titled “Road Accident Analysis in TamilNaduMarch2019”,outofthe978personskilledinthe accidents involving two-wheelers, 508 riders and pillion ridersdidnotwearhelmets.“About52percentofthedeath intwo-wheelersoccurredduetonon-wearingofhelmets”.
1.1 General
AccordingtotheWorldHealthOrganization(WHO)reports, India ispronetoroadaccidentsand mostofthecasesare two-wheeler accidents. Hence to provide a safety and securitysystemforbikeriderswecameupwithasolution which is rider safety measures using raspberry pi. The devicewhichcheckshelmetisproperlywornornot.
AccordingtothesurveymadebyTransportationResearch& InjuryPreventionProgramme-RoadSafetyinIndiaStatus Report2020,MotorizedTwoWheeler(M.T.W)ownersare increasing rapidly day by day, this leads to heavy traffic creationandroadaccidents.Indiarecorded3,54,796casesof roadaccidentsduring2020inwhich1,33,201peopledied, In this 29.82% of people lost their lives because of not wearingahelmet.
To avoid such a problem, The Government of India made many awareness programs and rules, to make helmet mandatoryfortwo-wheeleruserseventhoughmanyofus fail to follow these rules and regulations. Hence to make helmets mandatory for riding in two-wheelers wemake a prototypeworkwhichisanautomatichelmetdetector.The major reason why we are not using helmets is because of carelessness. To overcome this we made an automatic helmetdetectorthatanalyseswhetherthepersonwearsa helmetornot.Ifthepersonwearsahelmetthenthedevice willallowhimtoswitchonhisvehicleifhedoesn’tweara helmetdevicewillnotallowhimtoswitchonhisvehicleand itwillglowaredLEDasawarningtotheriderwhichwill remindthemtowearahelmet.
Oncetheywearahelmet,thedevicewillrepeattheprocess again for helmet detection once the rider satisfies all the conditionsthebuzzerwillglowgreenandallowhimtoride thebike.
1.2. Motivation
Therearesomanyreasonsbehindnotfollowingthetraffic rules properly, even though the government keeps on insisting we follow by raising fine amounts and punishments,weareneglectingthem.Themajorreasonfor our negligence is our day-to-day stress, according to a survey, 40% of our population failed to think of wearing helmetsduetotheirbusyschedule.And30%ofpeoplewere avoidinghelmetssincetheyaretravelinglessdistance(for examplegoingtoshops,etc)whichwaspurecarelessness, wecannotpredictwhenwillaccidentshappenandwhatwill happennextsoit’soursoleresponsibilitytosaveourselves inanysituation.
Thisiswhatmotivatedustodesignadevicethatwillallow thepersontoridea bikeonlyifhewearsa helmet,sothe people who fail to think of wearing a helmet will be remindedaswellasthosewhotravelsmallerdistanceswill alsomandatorilywearahelmet.Hencewecansavelivesby implementingthisdeviceoneverymotorbike.
1.4 Literature Review
Byresearchingthismodel,whatwehavefoundis,mostof the authors preferred object detection algorithms such as SSD,CNN,YOLO,etc,forimagerecognitionwhichprovedto show high accuracy in object detection. In hardware, for helmetdetection,theyusedapulseratesensorthatanalyses thevibrationtherebyconfirmingthepresenceofthehelmet.
Theyalsoimplementedalcoholdetectionwhichisdoneby sensors such as MQ3 which will analyze the breath of the ridertherebyitconfirmsthepresenceofalcohol,iftherider wasidentifiedwithconsumptionofalcoholthenthedevice will not allow him to ride his vehicle, as well as vibration sensorsareusedtodetectaccidentsandthelocationofthe
vehiclewillbesenttosavedcontactsthroughGPSandGSM modulesplacedinthehelmet.
In some of the papers, they used CCTV cameras which is placedinpublicplaces,andtrafficsignalstofindpeoplewho werenotfollowingthetrafficrule.TheyusedSSDwhichis known as Single Shot Multibox Detector for image recognition. Using this software they can get information aboutthespeedofthevehicle,informationabouttheowner byscanningthenumberplates,etc.Thisiscurrentlyinuse bythepolicedepartmentwhichisverymuchusefultotrack vehicles and noting down who was misbehaving and violatingthetrafficrules.
2. Existing Model
ď‚· ExistingmodelconsistsoftwoIRsensorswhich areseparatedbyacertaindistance
ď‚· If a person wears a helmet there will be a signal breakage between the sensors by analyzing that signal,thesystemwillcometoaconclusionabout whetherthepersonwearsahelmetornot.
ď‚· Thismodelhasseveraldrawbacksasitshouldhave a battery to be connected to the helmet and all circuits and sensors are to be mounted in the helmet which causes discomfort to the person. In ourmodel,wehaveovercomethisdisadvantageas weareusingonlytheobjectdetectionalgorithm,so thereisnoneedofmountinganyboardsorsensors in the helmet. So there will be no comfortability issuesforthepersonwhodrives.
ď‚· This model has a transmitter and receiver part wherethetransmitterpartwillbeinthehelmetand itconsistsofIRsensorsandanRFtransmitterand receiverwherethereceiverpartwillbelocatedin the bike near the key circuit and this part will consistofRFreceiverandArduinoboard.
ď‚· Andinthisexistingmodelthereisnopossibilityof changingthehelmetsinceallthecircuitboardsare mountedinitwhereasinourmodelthereisnosuch problem. We can use whatever helmet we were comfortablewithit.
2.1 Issues in the Existing Model
1. This model requires batteries to support the workingandthesebatteriesaretobeplacedinthe helmetwhichmaycauseharmtothepersonincase ofrainysituations
2. The biker cannot change his helmet since the receiver cannot detect signals from other transmittersduetofrequencyvariationandthecost
ofsettingupthosecircuitsinanotherhelmetishigh alsofrequencymayvarydependingonthem
3. Even small damage can create a malfunction in helmetdetectionsinceallthecomponentsarejust embeddedso,incaseofanyaccidents,itwillcause seriousdamagetothecircuitwhichmayaffectits function.
4. These are the demerits to look upon and these demeritswererectifiedinourmodel.
2.2 Innovation
ď‚· The existing system has its circuit board and sensors mounted on the helmet as we cannot changethehelmetaswewish.
ď‚· Inourdeviceweusedaraspberrypiboardwhich actsasaminicomputerandtakesinputasImages fromthecamerawhichisconnectedtoit
ď‚· Afteranalyzingthoseimagesitwillsendanoutput totherelays whichwill actasa switchtothekey circuitanditwillallowthepersontoswitchonhis bikeonlyifhewearsthehelmetelseitwillglowthe buzzerforindication.
ď‚· In this model there is no need to mount a circuit boardinthehelmettheridercanwearanytypeof helmetandthereisnoriskforriderseveninrainy conditions as we are using only the image recognitionsystemandtheraspberrypiboardwill getitspowerfromthebatterylocatedinthebike.
Once the rider sits in his vehicle the camera placed in the vehicle will automatically scan for a human face. If the human face is detected the image will be sensed by raspberry pi which is programmed with datasets of the person with and without a helmet then the image recognitionwillhappen.
Afterimagerecognition,iftheridersatisfiesthecondition then the raspberry pi will send a signal to the relay to connecttothecircuitiftheriderdoesn’twearahelmetthe raspberry pi will send information to the relay which will disconnect the key circuit to the motor so that vehicle couldn’tbeuseduntiltheriderfulfilscondition.
In case the rider travels at night time there will be no adequate light for image sensing so we are using UV light whichwillthrowaflashontheriderduringnighttimewhich isindarktones.
TheavailabilityoflightwillbedetectedbyLight-dependent resistorwhichisconnectedtotheraspberrypi.ThisLDRwill sensetheamountoflightavailabilityandifthevalueisfound tobedecreasedthanthethresholdvaluethenitwillmake theUVlightswitchonforimagecapturing
Theinputimagewillbesensedanditwillbeaugmentedand the augmented image will be saved to the disk. The next processwillbeimagevalidation.Aftervalidatingtheimage thesoftwarewill check for helmet detection byextracting the ROI of the image then the load detector model will analyze the image and the result will be sent to the connectedparts.
3.3 Key Circuit Control
Fig
FlowChartofKeyCircuitControl
4. Components
4.2 Webcam
The Raspberry Pi Camera Board connects directly to the RaspberryPi'sCSIconnector.Itcancaptureasimple5MP image or a 1080p HD video at 30 frames per second. The module connects to the Raspberry Pi via a 15-pin Ribbon Cabletothededicated15-pinMIPICameraSerialInterface (CSI), which was developed specifically for camera interfacing.TheCSIbuscanhandleextraordinarilyhighdata speeds and only transports pixel data to the BCM2835 processor.
ThePicamboarditselfissmall,measuringapproximately 25mmx20mmx9mmandweighingjustover3g,makingit ideal for smartphones or any other application where the question is the size and weight. The camera has a native resolutionof5megapixelsandanonboardfixed-focuslens. Thecameracancapturestaticphotographswitharesolution of2592x1944pixels,anditalsosupports1080p@30fps, 720p @ 60fps, and 640x480p 60/90 video shooting. Raspbian,theRaspberryPi'sfavoriteoperatingsystem,now includessupportforthewebcam.
4.1 Raspberry PI
Arelayisanelectricallyoperatedswitch.Itconsistsofaset ofinputterminalsforsingleormultiplecontrolsignals,anda setofoperatingcontactterminals.Theswitchmayhaveany numberofcontactsinmultiplecontactforms,suchasmake contacts,breakcontacts;orcombinationsthereof.
Raspberry PI acts as a minicomputer which is useful for decision making purposes. Raspberry PI is used here to detectthepresenceofhelmetsbyanalyzingtheimagesfrom thewebcam.ItrunsontheRaspberryPiOSwhichincludesa series of GPIO (general purpose input/output) pins for controllingelectroniccomponentsforphysicalcomputing. Peopleuseittostudyandsolvechallengesbecauseitislowcostandhigh-performance.Intermsofresults:
a)Processor–Quad-core1.5GHz@64-bitSoC
b)RAM:4GBLPDDR4SDRAM
Itcanalsobeusedtobringsupercomputertechthroughits paces.
Relaysareusedwhereitisnecessarytocontrolacircuitby anindependentlow-powersignal,orwhereseveralcircuits mustbecontrolledbyonesignal.Relayswerefirstusedin long-distancetelegraphcircuits as signal repeaters: they refreshthesignalcominginfromonecircuitbytransmitting it on another circuit. Relays were used extensively in telephoneexchangesandearlycomputerstoperformlogical operations. Here relay is used in such a way that, If the condition is satisfied by raspberry pi then it will send a signaltotherelaytomakecontacttothekeycircuitthereby it allows to switch on the vehicle If the condition is not satisfiedrelaywillbreakcontactsousercannotswitchon hisvehicleunlesstheconditionisfulfilled.
5. Result
Oncetheridersitsonhisvehiclethecameraplacedinthe vehiclewill automaticallyscanfora humanface.Oncethe
human face is detected the image will be sensed by raspberrypiwhichisprogrammedwithdatasetsofaperson with and without helmets then the image recognition will happen.
Aftertheimagerecognitionprocess,theprogramwillcheck iftheridersatisfiestheconditionornotthentheraspberry piwillsendasignaltotherelaytoconnecttothecircuitif theriderdoesn’twearahelmettheraspberrypiwillsend informationtotherelaywhichwilldisconnectthekeycircuit tothemotorsothatvehiclecouldn’tbeuseuntiltherider fulfillscondition.
This the very crucial part of this device which was successfully executed and the rest will be carried over by hardwarecomponentswhichisconnectedtotheraspberry pi.
6. Prototype
Thedevicecanpredictaccidentsbyusingvibrationsensors whichareplacedinthehelmet,usingthiswecandetectthe occurrence of accidents and the device will share the locationoftheridertothenearbyhospitalsandpreferred contactswhichcansavealifeincaseofworstsituations.
Thedevicewillcapturetheimageofthepersonwhositsin thevehicleanditwillsenditforimagesensing.Thisdevice canalsobeusedtocontrolbiketheftssincethedevicewill recordtheimageofthepersonthereisapossibilitytofind thepersonwhoinvolvesinsuchactivities.
8. Conclusion
TheDevicehasbeentestedsuccessfullyandthetechnology iseasytoinstallinanytypeofbikeanditwon’tcauseany harmordiscomforttotherider.However,therearesome demeritssuchasinthecaseoftrafficthereisaproblemwith detecting the face of the rider since there will be a lot of personsinthecrowd.
Andtheotherthingisprocessingtime,thedeviceshouldbe capabletotakeovertheprocessatthemaximumofwithin1 minutewhichisthemajorthingtofocuson.Ourmodelwill take50secondsonaveragetofinishtheprocess.
9. References
[1] D. A. Preetham, M. S. Rohit, A. G. Ghontale and M. J. P. Priyadarsini,"Safetyhelmetwithalcoholdetectionandtheft control for bikers," 2017 International Conference on IntelligentSustainableSystems(ICISS),2017,pp.668-673, doi:10.1109/ISS1.2017.8389255.
Fig -8: PrototypeofProposedModel
This is the prototype of our device which consists of a camera,raspberrypi,etc
7. Future Scope
Thedevicewemadewilldetectwhetherthepersonwearsa helmetornot.Inthefuture,itcanbefurtherimprovedby implementing alcohol-detecting sensors such as MQ3 to avoiddrunken driving whichisthe major reason for road accidentsanditcanbefurtherenhancedbyimplementing GPS and GSM modules in the device which can be used to trackthelocationoftherider.
Using IoT we can connect the device to smartphones and thereby we can track the location of the rider. The device will sendinformationabout the riderconsisting including location,alcoholconsumption,etctothesavedcontacts.
[2] N. Boonsirisumpun, W. Puarungroj and P. Wairotchanaphuttha,"AutomaticDetectorforBikerswithno Helmet using Deep Learning," 2018 22nd International Computer Science and Engineering Conference (ICSEC), 2018,pp.1-4,doi:10.1109/ICSEC.2018.8712778.
[3] K. Han and X. Zeng, "Deep Learning-Based Workers Safety Helmet Wearing Detection on Construction Sites UsingMulti-ScaleFeatures,"inIEEEAccess,vol.10,pp.718729,2022,doi:10.1109/ACCESS.2021.3138407.
[4]A.Jesudoss,R.VybhaviandB.Anusha,"DesignofSmart Helmet for Accident Avoidance," 2019 International Conference on Communication and Signal Processing (ICCSP), 2019, pp. 0774-0778, doi: 10.1109/ICCSP.2019.8698000.
[5] X. Long, W. Cui and Z. Zheng, "Safety Helmet Wearing Detection Based On Deep Learning," 2019 IEEE 3rd Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), 2019, pp. 24952499,doi:10.1109/ITNEC.2019.8729039.
[6] P. Pathak, "Smart Helmet with Motorbike unit for Accident and Rash Driving Detection," 2020 IEEE InternationalConferenceonAdvancesandDevelopmentsin ElectricalandElectronicsEngineering(ICADEE),2020,pp.16,doi:10.1109/ICADEE51157.2020.9368914.
[7]D.Singh,C.VishnuandC.K.Mohan,"Real-TimeDetection of Motorcyclist without Helmet using Cascade of CNNs on Edge-device,"2020IEEE23rdInternationalConferenceon IntelligentTransportationSystems(ITSC),2020,pp.1-8,doi: 10.1109/ITSC45102.2020.9294747.
[8] F. Zhou, H. Zhao and Z. Nie, "Safety Helmet Detection BasedonYOLOv5,"2021IEEEInternationalConferenceon PowerElectronics,ComputerApplications(ICPECA),2021, pp.6-11,doi:10.1109/ICPECA51329.2021.9362711.