Social Distancing Detection, Monitoring and Management Using OpenCV

Page 1

Social Distancing Detection, Monitoring and Management Using OpenCV

Sivathej.S.G1 , Dr. MIR AADIL 2

1PG student, Department of Computer Application, JAIN University, Karnataka, India

2Assistant professor, Department of Computer Application, JAIN University, Karnataka, India

***

Abstract The COVID 19 pandemic has unmistakably brought the planet to an end. The world we lived in only a few months ago is nothing like the world we live in now. The illness is rapidly spreading and poses a threat to humanity. Seeing the seriousness of the requirement, one should continually avoid the risk of being socially removed. Maintaining friendly removal during COVID 19 is an obvious prerequisite to ensure a halt in the rate of new case development. Our original draught focuses on determining whether or not the people in the area are interested in friendly removal. They are classified as protected or dangerous using our own self developed model, SocialdistancingNet 19, for recognizing an individual's casing and displaying names. If the distance does not have a precise value This framework can be used to observe people using video surveillance in a CCTV system. Our model achieved a precision of 92.8 percent.

Key Words: Social Distance Detector, OpenCV, tracking, monitoring, verification.

1. INTRODUCTION

Covid is an infectious disease caused by a crown infection that causes a severe respiratory illness. The infection was first discoveredinWuhan,China,inDecember,andhassincespreadaroundtheglobe.Duringpeopleareincloseproximity,the illnessisconveyedmostlybetweenthem,especiallythroughlittlebeadsshapedwhensnifflingorhacking.Beadsthatfalltothe ground will travel through the airandintoa human's body. The length of recoveryfor persons with severesideeffects is determinedbytheseverityaswellastheperson'sresistancecapabilities.Themajordemonstrationtechnologyisaconstant switch record polymerase chain reaction from an anasopharyngeal swab (RRTPCR). In view of the increased chance of contamination,chestCTimagingisalsousefulfortheevaluationofpersonswithahigherriskofcontamination,Numerous warningindicatorsandriskfactorsBecauseofthedisease'srapidspread,theWorldHealthOrganization(WHO)suggestedthat theterm"socialseparating"beusedinstead.Itiscriticaltomaintainactualdistanceinordertoslowthespreadofthedisease. Maintainingatwo meterbarrierbetweentwopersonsisessentialforstayingsafeandreturningtotheworldweleftbehinda few months ago.Following the COVID 19 pandemic, the CDC redefined social separation as staying out of gather settings, avoidingpublicgatherings,andprotecting,whenpossible,asix footortwo meterholefromeveryone.Beadsfromawheezeora fullbreathcantravelmorethansixmetresduringexercise,accordingtolaterresearch.Furthermore,maintainingahighquality ofsocialseparationisbothnecessaryandadvantageousinordertoliveamoresecureandbetterexistence.Ourprojectaimsto determinewhetherornotapersonadherestothesocialseparation

Thefindingsareexaminedusingbothalivetransferandavideostream.Wecandeterminewhetheranindividualislookingafter friendlyseparatingbyestimatingtheholeoftwocasingsofindividualsfromthecentroids.They'realsolabelledasprotectedand dangerous.

2. RELATED WORK

Withthebeliefthatsocialdistanceisthemostreliableapproachforpreventingthespreadofinfectiousdisease,itwaschosenas anunprecedentedmeasureonJanuary23,2020,againstthebackdropofDecember2019,whenCOVID 19aroseinWuhan, China.TheoutbreakinChinareachedaclimaxinthefirstweekofFebruary,with2,000to4,000newconfirmedcaseseachday, inlessthanamonth.Forthefirsttimesincetheoutbreakbegan,therewasasignofreliefwhennonewconfirmedcaseswere reportedforfivedaysinarow,fromMarch23toMarch23,2020.ThisisseenintheuseofsocialdistancingtacticsinChina, whichwereeventuallyappliedgloballytoregulateCOVID 19.

Prem and colleagues researched how social distancing strategies affected the spread of the COVID 19 outbreak. Using susceptible exposed infected removed(SEIR)models,theauthorsemployedsyntheticlocation specificcontactpatternsto mimictheoutbreak'scontinuoustrajectory.Itwasalsoindicatedthatliftingsocialdistancingtooquicklycouldleadtoanearlier secondaryhigh,whichcouldbelevelledbygraduallyrelaxingtheinterventions.Asweallknow,socialseparationisanimportant butfinanciallycostlymeasuretoflattentheinfectioncurve.Adolphetal.drewattentiontotheissueintheUnitedStatesof America,wherepolicycouldnotbeadoptedatanearlystageduetoa lack ofconsensusamongpolicymakers,resultingin ongoingpublichealthconsequences.

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056 Volume: 09 Issue: 04 |April 2022 www.irjet.net p ISSN: 2395 0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1405

Journal of Engineering and Technology (IRJET)

Volume: 09 Issue: 04 |April 2022 www.irjet.net

e ISSN: 2395 0056

p ISSN: 2395 0072

Despitethefactthatsocialdistancehasanegativeinfluenceoneconomicproductivity,manyacademicsareworkinghardto compensatefortheloss.Inlightofthis,Kylieetal.investigatedtherelationshipbetweenthedegreeofsocialseparationandthe region'seconomiclevel.Accordingtothestudy,moderateamountsofactivitycouldbetoleratedwhilepreventingacatastrophic outbreak.Sincethebreakoutofthenewcoronavirus,numerouscountrieshavereliedontechnology basedsolutionsinvarious capacitiestocontaintheoutbreak.Manydevelopedcountries,suchasIndiaandSouthKorea,useGPStofollowthemovements ofsuspectedorsickpeopleinordertomonitoranyriskofinfectionamonghealthypeople.InIndia,thegovernmentusesthe ArogyaSetuApp,whichwascreatedwiththehelpofartificialintelligence.UsingGPSandBluetooth,wewereabletodetect COVID 19patientsintheneighbourhood.Italsoaidsothersinmaintainingasafedistancefromtheinfectedindividual.Somelaw enforcementagencies,ontheotherhand,havebeenemployingdronesandothersurveillancecamerastoidentifylargecrowds andtakingregulatoryactiontodispersethem.Suchphysicalinterventioninthesekeymomentsmayhelptoflattenthecurve, butitalsoposesauniquesetofriskstothepublicandisdifficultfortheworkforcetoimplement.

Objectidentificationalgorithmsbasedondeepmodelshavemadeamazingdevelopmentincomputervisioninrecentyears,and they are potentially more capable than shallow models in tackling complicated problems. Person detection deep models emphasisefeaturelearning,contextualinformationlearning,andocclusionhandling.Objectdetectionmodelsbasedondeep learningcannowbeseparatedintotwogroups:two stagedetectorssuchasR CNN[9],FastR CNNandFasterR CNNandtheir variants.

One stagedetectorssuchasYOLOandSSD.Intwo stagedetectorsdetectionisperformedinstages,inthefirststage, computedproposalsandclassifiedinthesecondstageintoobjectcategories.

However,somemethods,suchasYOLO,SSDMultibox,considerdetectionasaregressionissueandlookattheimage oncefordetection.

Itemdetectionsystemsmaybetrainedtorecognizeanyobject,althoughtheyaremostcommonlyusedforfacialrecognition sincetheyaremoreaccurateandfaster.SupervisedlearningisexemplifiedbytheViolaandJonesprocedure.Anotherwidely usedfacialdetectiontechnologythatZhuprovidedisaneuralnetwork baseddetector.It'sonlyeffectiveonthefront,upright face.AMultiviewFaceDetectorwithSurfCapabilitieswasproposedbyLietal.asanothermodelforfacialdetection.Onthe GTX470,Oroetal.suggestedafacedetectionapproachbasedonahaar likecharacteristicthatenhancedthespeedby2.5times. Theydid,however,justemployCUDA,aGPUprogrammingtoolforNVIDIAGPUs.IncomparisontoOpenCL,whichisemployed inavarietyofapplications Itisunabletotackletheimbalancedworkloadissueencounteredduringtheimplementationofthe viola jonesfaceidentificationalgorithminGPUsduetocomputedcomponents.Glassetal.(2006)discussedtheimportanceof socialdifferentiationandhow,withouttheuseofvaccinationsorantiviralmedications,thedangerofpandemicspreadcanbe slowlyreducedbysuccessfullymaintainingsocialisolation.Inordertodemonstrateadropinthegrowthrate,theauthors conductedanextensiveinvestigationinbothruralandurbanregions.Z.,Luoinvestigateshowpeoplewithfull faceorpartial occlusionmightbeidentified.

Thismethoddividespeopleintotwogroups: thosewhohavetheirhandsovertheirfacesandthosewhohavetheirfaces obstructedbyitems.Thismethodisunsuitableforourcase,whichnecessitatesdetectingfaceswiththeirlipshiddenbehind maskssuchasscarves,mufflers,handkerchiefs,andsoon.

3. ANALYSIS / INTERPRETATION:

MachineLearningAlgorithms:

Machine learning has become much more common in recent years as a result of increased demand and technological breakthroughs.Machinelearning'sabilitytoextractvaluefromdatahasmadeitappealingtocompaniesacrossawiderangeof industries. The majority of machine learning solutions are created and implemented using off the shelf machine learning algorithmswithsmalltweaks.Therearethreemajorcategoriesofmachinelearningalgorithms:

Given a series of observations, supervised learning algorithms simulate the relationship between features (independent variables)andalabel(target).Usingthefeatures,themodelisthenusedtopredictthelabelofadditionalobservations.Itmight beaclassification(discretetargetvariable)oraregression(continuoustargetvariable)task,dependingonthefeaturesofthe targetvariable.

•Unsupervisedlearningalgorithmstrytofindthestructureinunlabeleddata.

•Reinforcement learning works based on an action reward principle. An agent learns to reach a goal by iteratively calculatingtherewardofitsactions.

International Research
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1406

4. PROBLEM STATEMENT:

With the assistance of computer vision and deep learning algorithms, this model focuses on identifying the person on an image/videostreamanddeterminingifsocialdistanceismaintainedornotutilizingtheOpenCV,Tensorflowlibrary.

4.1 Approach:

1.Detecthumansintheframewithyolov3.

2.Calculatesthedistancebetweeneveryhumanwhoisdetectedintheframe.

3.ShowshowmanypeopleareatHigh,LowandNotatrisk.

Fig 1: Working Process

5. PROPOSED SOLUTION:

WiththehelpofcomputervisionanddeeplearningalgorithmsandtheOpenCV, Tensorflowlibrary,thesuggestedsystem focusesonidentifyingthepersononanimage/videostreamanddeterminingifsocialdistanceismaintainedornot.Method1: Useyolov3todetecthumansintheframe.2.Calculatesthedistancebetweeneverypeopleinthepicturethathasbeendetected. 3.Indicatesthenumberofpeoplewhoareathigh,low,ornorisk.

Becausetheinputvideomightbeshotfromanyperspective,thefirststepistotransformtheperspectiveofviewtoabird's eye (top down)view.ThesimplesttransformationapproachentailsselectingfourpointsintheperspectiveviewthatdefineROI wherewewanttomonitorsocialdistancingandmappingthecornersofarectangleinthebird's eyeviewbecausetheinput framesaremonocular(collectedfromasinglecamera).

Intherealworld,thesepointsshouldcreateparallellineswhenviewedfromabove(bird'seyeview).Thispresupposesthat everyoneisstandingonthesamelevelground.Thepointsarescattereduniformlyhorizontallyandverticallyinthistopviewor bird'seyeview(scaleforhorizontalandverticaldirectionwillbedifferent).Wemayextractatransformationthatcanbeapplied tothefullperspectiveimagefromthismapping.

Fig-2: Working of app

International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056 Volume: 09 Issue: 04 |April 2022 www.irjet.net p ISSN: 2395 0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1407

e ISSN: 2395 0056

ISSN: 2395 0072

5.1 Detection

Thenextstageistoidentifypedestriansanddrawaboundingboxaroundeachone.Toreducetheriskofoverfitting,weuse minimumpost processingtechniquesincludingnon maxsuppression(NMS)andseveralrule basedheuristicstocleanupthe outputboundingboxes.

5.2 Calculation of Distance

Eachindividualintheframenowhasaboundingbox.Weneedtofigureoutwherepeopleareintheframe.i.e.,wecanusethe bottomcenterpointoftheboundingboxasthelocationofthepersonintheframe.Then,byapplyingtransformationtothe bottomcenterpointofeachperson'sboundingbox,weestimate(x,y)locationinbird'seyeview,resultingintheirpositioninthe bird'seyeview.Thefinalstepistocalculatethebird'seyeviewdistancebetweeneachpairofpersonsandscalethedistancesin bothhorizontalandverticaldirectionsusingthescalingfactorcalculatedviacalibration.

5.3 Working

Whenyouruntheapplication,youwillbegivenaframe(thefirstframe)whereyoumustdrawtheROIanddistancescale.From thefirstframe,obtaintheROIanddistancescalepoints.InBird'seyeviewROIandScalepointsselectionforfirstframe,codeto convertperspectivetoBird'seyeview(Topview)andcomputehorizontalandvertical180cmdistanceinBird'seyeviewROI. Thenextstageistoidentifypedestriansanddrawaboundingboxaroundeachone.Inordertodetecthumansinvideoand obtainbounding boxing formation.

Eachindividualintheframenowhasaboundingbox.Weneedtofigureoutwherepeopleareintheframe.i.e.,wecanusethe bottomcenterpointoftheboundingboxasthelocationofthepersonintheframe.Then,byapplyingtransformationtothe bottomcenterpointofeachperson'sboundingbox,weestimate(x,y)locationinbird'seyeview,resultingintheirpositioninthe bird'seyeview.Todeterminethelowestcenterpointforallboundingboxesandprojectthosepointsinabird'seyeview.The next step is tocalculate thebird's eye view distance between each pair of persons(Point)andscale the distances in both horizontalandverticaldirectionsusingthescalingfactorcalculatedviacalibration.

International Research Journal of Engineering and Technology (IRJET)
Volume: 09 Issue: 04 |April 2022 www.irjet.net p
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1408

Engineering and Technology (IRJET)

Volume: 09 Issue: 04 |April 2022 www.irjet.net

6. CONCLUSION:

e ISSN: 2395 0056

p ISSN: 2395 0072

WeareonlyattemptingtoassistsocietyincombatingCOVID 19inourstudy.IntheabsenceofaCOVID 19vaccination,social distanceistheonlyoptionavailabletohumans.WhenweconsidertheworldaftertheCOVID 19epidemic,theneedforself responsibilitybecomesundeniable.Thescenariowouldprimarilyfocusonembracingandfollowingthesafeguardsandrules thattheWHOhasenforced,withtheindividualtakingfullresponsibilityforhimselfratherthanthegovernment.BecauseCOVID 19spreadsbyclosecontactwithinfectedpeople,socialdistancingwouldsurelybethemostsignificantaspect.Aneffective methodforsupervisinghugecrowdsiscritical,andthissurveystudyfocusesonthat.Authoritiescankeepcheckofthingsusing mountedCCTVanddrones.Humanactivitiesandcrowdcontroltobringpeopletogetherandavoidbreakingthelaw.Aslong whenindividualskeepasafedistance,theywillbeindicatedwithagreenlight;but,astheCCTVcapturesmoreandmorecrowd gatherings,aredlightwillappear,alertingthelocal policeandallowingthesituationtobebroughtundercontrol quickly Becausecontrollingalargemobisdifficult,thispollcanhelpmanagetheproblembeforeitspiralsoutofcontrol.Asaresultof applyingthisproposal,thepolice'son the groundeffortswillbereduced,andtheywillbeabletofocussolelyonsupervising conditionsinplaceswhereconditionsarebad,allowingthemtospendtheirtimewiselyandsaveenergyforequaloutcomes.

REFERENCES

[1] WHO, "Who chief commanders introductory statements at the mediapreparation on Coronavirus 11 walk 2020." https://www.who.int/dg/addresses/detail/,2020,[Online;gottoMarch12,2020].

[2] ECDPC, "Contemplations identifying with social separating measures in light of COVID 19 second update," https://www.ecdc.europa.eu/en/distributionsinformation/contemplations,2020,[Online;gottoMarch23,2020].

[3]W.H.Association,"WHOCovids(COVID19),"https://www.who.int/crises/illnesses/novelCovid2019,2020,[Online;gotto May02,2020].

[4]M. Everingham, L. Van Gool, C. K.Williams,J. Winn, andA.Zisserman,"Thepascalvisual itemclasses(voc)challenge," InternationaldiaryofPCvision,vol.88,no.2,pp.303 338,2010

[5]M.ZhaoandH.Zhao,"Asymptoticconductofworldwidepositiveanswerforastochasticsirmodelconsolidatingmedia inclusion,"AdvancesinDifferenceEquations,vol.2016,no.1,pp.1 17,2016.

[6]W.O.KermackandA.G.McKendrick,"CommitmentstothenumericalhypothesisofscourgesI.1927."1991.

[7]L.Hensley,"Socialseparatingisout,physicalremovingisinhereshowtodoit,"GlobalNews Canada(27March2020), 2020.

[8] P. Alto, "Landing AI Named an April 2020 Cool Vendor in the Gartner Cool Vendors in AI Core Technologies," https://www.yahoo.comwayoflife/landing ai named april 2020 152100532.html,2020,[Online;gottoApril21,2020].

[9]M.W.Fong,H.Gao,J.Y.Wong,J.Xiao,E.Y.Shiu,S.Ryu,andB.J.Cowling,"Nonpharmaceuticalmeasuresforpandemicfluin nonhealthcaresettingssocialseparatingmeasures,"2020.

[10]C.Eksin,K.Paarporn,andJ.S.Weitz,"Methodicalinclinationsinillnessanticipatingthejobofconductchange,"Epidemics, vol.27,pp.96 105,2019.

[11]F.Ahmed,N.Zviedrite,andA.Uzicanin,"Adequacyofworkenvironmentsocialremovingmeasuresindiminishingflu transmission:anorderlysurvey,"BMCgeneralwellbeing,vol.18,no.1,p.518,2018.

International Research Journal of
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1409

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.