Detection of Non-Wearing Helmet Riders Using Yolov4

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Detection Of Non-Wearing Helmet

Riders Using YoloV4


S.M. Sameer Ali |Khawer |M. Siraj Khan |Hussain Ahmed

Sir Syed University of Engineering and Technology (2021). DETECTION OF NON-WEARING HELMET RIDERS
USING YOLOV4

ABSTRACT

Bikeaisatheasimpleaandacheapawayaofatransportation,aasathere’saaaquickadevelopmentainaVehicleaover
theaalongatime,anumberaofamishapsamoreoveraexpandedainawhichaaapartaofaindividualsagetaharmed or
killed.aMostaofatheapassingsaareacausedabyaheadadamage.aDueatoaburden,asluggishnessaoraotherareasons
motorcyclistadoesanotawearaheadaprotector.aThosealivesacanabeasparedafairabyaguaranteeingaadjust utilize-
ationaofaProtectiveacapsabyathearider.aRecognizingaandapenalizingathearidersawithoutaHeadaprotectoraseem
essentiallyaprogressathisacircumstance.aBeathataasaitamay,aitaisaillogicalatoautilizeaactivityapoliceafacultyaona
eachastreetatoacheckacompliance.aThisaventureaaddressesathisaissueabyarecognizinganonhelmetedamotor-
cyclistsainareal-timeaorafromavideoafilmasourcedafromaaaactivityareconnaissanceacamera.

INTRODUCTION PROBLEMaSTATEMENT

ConcurringatoatheaWorldaWellbeingaOrganization, Wearingaheadaprotectoraisatheaessentialalineaof
eachayeara1.35amillionaindividualsapassaonasince of boundaryaagainstawoundsasinceaofastreetaincidentsa
streetaactivityacrashes.aThereaare numerous causes foramotorcyclists.aInaPakistana70 or 85%a casualty
ofastreetaactivityafatalities,aparticularlyahuman ofamotorcyclistsaisasinceaofaincidentahappenaona
mistakeaoraterribleabehaviorabyadrivers.aNumerous accountaofanotawearingaprotectiveacap.aWeacan'ta
ofatheseacrashesaincludeabikes.aAabikearider,abya Controlatheaoccasionsaofadisasters butaableatoatakea
wearingaaaheadaprotector,acanadiminishahisaoraher Securityasafetyameasuresatoamaintainaaastrategica
chanceaofaaalethaladamageabya42%aandaheada distanceafromawoundsaduetoastreetamishaps.aThea
harmabya69%.aWithoutaaalegitimateaframework,a significantaexplanationapeopleadoanotawearahelmeta
theaactivityapoliceastaffaareaconveyedatoachecka inaPakistan,couldabeaaacoordinatearesultaofatheira
whetheratheamotorcyclistsaareawearingatheahelmet hagglingmien.aTheyafavoraconsolationaoverasecurity.a
oranot.aProgrammedalocationaofanonhelmeteda Subsequentlyatheaissueaisatoahandleathisatenacious-
motorcyclistawillaofferaassistanceatoadiminishathea mienaofapeopleaandaguaranteeathatatheyawearaheada
burdenaconfrontedabyatheaactivityapolice.aAsaana protectoraconsistently.
electiveacomputeravisionacanaempoweraprogressed
arrangementsaempoweringausatoamoveaforwarda OBJECTIVES
theacircumstanceathroughamechanizedaprotectivea
capalocation.aInathisapaper,aweaconsideratheaissuea Ourafundamentalaobjectiveaisatoarecognizeathearider
ofaobservingaforamotorcyclistsaridingawithoutaaa whoaisatravelingawithoutawearingaaaheadaprotector,
protectiveacapautilizingaYoloV4abasedaonagenuinea andatoaassistatheaauthorizationaorganizations to force
timeadiscoveryaandavideoaexamination. headaprotectoralaw.aTheasafetyaofaaarideraisaalso one
ofaouraessentialagoals.
DETECTION OF NON-WEARING
HELMETaRIDER METHODS

OVERVIEW

Foradetectingathearidersawithoutahelmet,awea use
YOLOv4awhichaisaaavariantaforaobjectadetection.a
itsamethodologyainclude:
• BoundingaBoxaPrediction
• ClassaPrediction
• PredictionaacrossaScales
• FeatureaExtractor
• Training

BOUNDINGaBOXaPREDICTION

Theanetworkapredictsa4acoordinatesaforaeacha Boundingaboxesawithadimensionsapriorsaandalocationaprediction.
boundingabox,atx,aty,atw,ath.aIfatheacellaisaoffsetta Weapredictatheawidthaandaheightaofatheaboxaasaoffsetasafroma
clusteracentroids.aWeapredictatheacenteracoordinatesaofatheabox
fromatheatopaleftacorneraofatheaimageabya(cx,acy) relativeatoathealocationaofafilteraapplicationausingaaasigmoid
andatheaboundingaboxapriorahasawidthaandaheight function.
pw,aph,aandathenatheapredictionsacorrespondato:
bxa=aσa(tx)a+acxabya=aσa(ty)a+acyabwa=apwetw
bha=apheth CLASSaPREDICTION

Duringatrainingaweauseasumaofasquaredaerror Eachaboxapredictsatheaclassesatheaboundingabox may


loss.aIfatheagroundatruthaforasomeacoordinatea containautilizingamultilabelaclassification.aWeadon'ta
eapredictionaisatˆ*aouragradientaisatheagrounda utilizeaaasoftmaxaasaweahaveafoundait isasuperfluousa
truthavaluea(computedafromatheagroundatruthaha foragreataexecution,ainstepawe essentially utilize auto-
box)aminusaouraprediction:atˆ*a−at*.aThisagrounda nomousacalculatedaclassifiers. Amid preparing we utilize
truthavalueacanabeaeasilyacomputedabyainvertinga two foldacrossaentropy misfortune for the course expect-
theaequationsaabove. ations.aThisadetailingamakesaaadifferenceawhenawe
YOLOv4apredictsaobjectascoreaforaeachabound- move toamoreacomplexadomainsajustalikeatheaOpen
ingaboxausingalogisticaregression.aThisashoulda be Pictures Dataset . In this dataset there are numerous
1aifatheaboundingaboxaprioraoverlapsaaagrounda coversapinganames.aEmployingaaasoftmaxaforcesathea
truthaobjectabyamoreathanaanyaotheraboundinga suspicionathataeachaboxahasapreciselyaoneacourseawhicha
boxaprior.aIfatheaboundingaboxaprioraisanotathea isaregularlyanotatheacase.aAamultilabelaapproachawaya
bestabutadoesaoverlapaaagroundatruthaobjectabya betteramodelsatheainformation.
moreathanasomeathreshold,aweaignoreatheapredic-
tion.aWeauseatheathresholdaofi.5.aOurasystemaonly PREDICTIONaACROSSaSCALES
assignsaoneaboundingaboxaprioraforaeachagrounda
truthaobject.aIfaaaboundingaboxaprioraisanotaassig- YOLOv4apredictsaboxesaata3adiverseascales.aOuraframe-
nedatoaaagroundatruthaobjectaitaincursanoalossafora workaextricatesaincludeafromathoseascalesaemployingaaa
coordinateaoraclassapredictions,aonlyaobject. comparableaconceptatoaincludeapyramidasystems.aFroma
ourabaseahighlightaextractor,aweaincludeaaafewaconvo-
lutionalalayers.aTheafinalaofatheseapredictsaaa3- d
tensoraencodingaboundingabox,aprotest,aanda ORCaBLOCKaDIAGRAM
lessonaexpectations.

FEATUREaEXTRACTOR

Weautilizeaaaunusedaarrangeaforaperformingain-
cludeaextraction.aOuraunusedaarrangeamay be a
halfabreedaapproachabetweenatheasystemsautilizea
inaDarknet19,awhichaunusedafangledaleftover
arrangeastuff.aOuraorganizeaemploymentsasuccess
ivei3×3aanda1×1aconvolutionalalayersabutapresent
lyahasaaafewaalternatearouteaassociationsaasawell
andaisaaltogetherabigger.aItahasa53aconvolutional
layersasoaweacallaitaDarknet-53.

IMPLEMENTATION

Theaimplementationaofayolov4aonacustomadataseta
beginsawithatheainstallationaofaMicrosoftaVisualaStudio,a
CudNN,aCudaaandaDarkneta repository.aThenabuildathea
Darknetabyaplacingacorrectaenvironmentalavariables,a
nowatoafollowatheathreeastepsathataareabelow:

• BuildaDarknet
• DrawaBoundingaBox
• TrainingaandaTesting

RESULTS

TRAINING

Weastillatrainaonafullaimagesawithanoahardaneg-
ativeaminingaoraanyaofathatastuff.aWeauseamulti-
scaleatraining,alotsaofadataaaugmentation,abatcha
normalization,aallatheastandardastuff.aWeauseathea
Darknetaneuralanetworkaframeworkaforatraininga
and testing.
Figurea04:aDetectedaNon-WearingaHelmetaRider
Figurea05:aDetectedaNon-WearingaHelmetaRider

Figurea08:aDetectedaNon-WearingaHelmetaRider

Figurea06:aDetectedaNon-WearingaHelmetaRiders

Figurea09:aComparisonaGraphaBetweenaOuraDetectionaTechnique
VsaOtheraTechniques

CONCLUSIONaANDaFUTUREaSCOPE

Throughathisaventureareadyatoaeffectivelyaidentifya
theariderawithoutaheadaprotectoraandaguaranteea
streetasecurityaandaforceaprotectiveacapalawsaonanon
wearingaprotectiveacapariders.aItamakesaeasieratraffic
policeaforadistinguishingathearider.aInafutureareadyato
expandathisaventureafromaidentifyingariderawithouta
protectiveacapatoaproducingaEaChallan,aencourageaina
Figurea07:aDetectedaNon-WearingaHelmetaRiders
seatbeltalocation,aVehiclesafollowingaandadistinguisha haveahelpedainaavoidingasignificantamajoraset
anyavehicleathataareaabusingaactivityalaws. backsaduringatheacourseaofathisastudy.

ACKNOWLEDGMENT

WeawouldalikeatoathankaourainternalaSiraTahir
Fataniaforaguidingausathroughoutatheaprojecta
developmentaandaimplementationaphase.aHisa
consistentasupportaandatechnicalaexpertisea

REFERENCES

[1]aaahttp://www.searo.who.int/roadsafety/en/,a2015.aa
[2]aaJ.aRedmon,aS.aDivvala,aR.aGirshicak,aandaA.aFarhadi,a“Youaonlyalookaonce:aUnified,areal-
timeaobjectaaaaaaaaaadetection,”ainaCVPR,a2016
[3]aaZ.aCao,aT.aSimon,aS.-E.aWei,aandaY.aSheikh,a“Real-timeamulti-
persona2daposeaestimationausingapartiofafinityafields,”ainaCVPR,a2017.
[4]aaZ.aYangiandaR.aNevatia,a“Aamulti-
ascaleacascadeafullyaconvolutionalanetworkafaceadetector,”ainaICPR,a2016.
[5]aP.aF.aFelzenszwalb,aR.aB.aGirshick,D.aMcallester,aandaD.aRamanan,a“Objectadetectionawithadiscri
minativelyatrainedapart-
basedamodels,”aIEEEaTrans.aPatternaAnaal.aMach.aIntell.,avol.a32,ano.a9,ap.a1627,2010.
[6]aK.aK.aSungaandaT.aPoggio,a“Example-basedalearningaforaview-
basedahumanafaceadetection,”aIEEEaTrans.aaPatternaAnal.aMach.aIntell.,avol.a20,ano.a1,app.a39–
51,a2002.
[7]aaC.aWojek,aP.aDollar,aB.aSchiele,aandaP.aPerona,a“Pedestrianadetection:aAnaeavaluationaofatheas
tateaofatheaart,”aIEEEaTrans.aPatternaAnal.aMach.aIntell.,avol.a34,ano.a4,ap.a743,a2012.
[8]aH.aKobatakeaandaY.aYoshinaga,a“Detectionaofispiculesaonamammogramabasedaonaskeletonaanalysis.
”aIEEEaTrans.aMed.aImag.,avol.a15,ano.a3,app.a235–a245,a1996.

You might also like