TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE

Page 1

TRAFFIC LIGHT PRIORITY FOR EMERGENCY VEHICLE

1234U.G. Scholar, Department of Electronics and Communication Engineering

BMS Institute of Technology and Management, Avalahalli, Yelahanka, Bengaluru-560064

5Associate Professor, Department of Electronics and Communication Engineering, BMS Institute of Technology and Management, Avalahalli, Yelahanka, Bengaluru-560064 ***

Abstract - Traffic Light Priority for Emergency Vehicles is a system that allows emergency vehicles to have priority at traffic signals by controlling the traffic lights in their favor. This system aims to reduce emergency service response times and improve the safety of both emergency responders and the public. This paper will explore the implementation of traffic light priority for emergency vehicles, including the benefits, challenges, and potential solutions for this technology. The study will also examine the impact of traffic light priority on traffic flow and the overall efficiency of emergency response systems. Finally, the paper will discuss the potential future developments of this technology and its potential to improve emergency services globally.

Key Words: Emergency, Ambulance, Traffic light, Machine Learning Model, Images, Green, Red

1. INTRODUCTION

Inemergencysituations,everysecondcounts,andtheability ofemergencyservicestorespondquicklyandefficientlycan bethedifferencebetweenlifeanddeath.Oneofthemajor challenges that emergency responders face is navigating throughtrafficandarrivingattheirdestinationasquicklyas possible. Traffic congestion and stoplights can cause significantdelays,whichcanbedetrimentaltoemergency responsetimes.

Traffic Light Priority for Emergency Vehicles is a system designedtohelpovercomethischallengebyprovidingaway for emergency vehicles to have priority at traffic signals. Whenactivated,thesystemcanoverridethestandardtraffic lightpattern,allowingemergencyvehiclestopassthrough theintersectionsafelyandefficiently.

Inthispaper,wewillexploretheimplementationofTraffic LightPriorityforEmergencyVehicles,includingthebenefits, challenges,andpotentialsolutionsforthistechnology.We willalsoexaminetheimpactoftrafficlightpriorityontraffic flow and the overall efficiency of emergency response systems. Finally, we will discuss the potential future developmentsofthistechnologyanditspotentialtoimprove emergencyservicesglobally.

1.1 Problem Statement

Emergency services play a critical role in saving lives and ensuringpublicsafety,andtheirabilitytorespondquickly and efficiently is of utmost importance. One of the major challenges faced by emergency responders is navigating through traffic and reaching their destination promptly. Traffic congestion and stoplights can cause significant delays, which can be detrimental to emergency response times.

As a result, there is a need for a solution that allows emergency vehicles to have priority at traffic signals to reduce response times and improve the safety of both emergencyrespondersandthepublic.

The problem statement of this study is to explore the implementation of traffic light priority for emergency vehicles, including the benefits, challenges, and potential solutionsforthistechnology,anditsimpactontrafficflow andtheoverallefficiencyofemergencyresponsesystems.

2. CONVENTIONAL SYSTEMS

2.1 Manual Controlling.

Manualcontrollingasthenamesuggestsrequiresmanpower tocontrolthetraffic.Thetrafficpoliceareallottedarequired area to control traffic. The traffic police carry sign board, signlightandwhistletocontrolthetraffic.

2.2 Automatic Controlling

The automatic traffic light is controlled by timers and electrical sensors. In a traffic light, a constant numerical value is loaded in the timer. The lights are automatically gettingONandOFFbasedonthetimervalue.

2.3 Electronic Controlling

Anotheradvancedmethodisplacingsomeloopdetectorsor proximitysensorsontheroad.Thissensorgivesdataabout the traffic on the road. According to the sensor data the trafficsignalsarecontrolled.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1810

2.4 Drawbacks of Conventional Systems

The manual controlling system requires a large amountof manpower.Conventionaltrafficlightsuseatimerforevery phase, which is fixed and does not adapt according to the real-timetrafficonthatroad.Electronicsensors/proximity sensorsorloopdetectorshavelessaccuracyandrequirea highbudget.

3. PROPOSED SYSTEM

Theproposedsystemfortrafficlightcontrolusingmachine learningforambulancedetectioncandetectanambulancein real-time using image processing techniques. The system willconsistofacameramountedattheintersection,which willcapturethelivevideofeedoftheintersection.

The captured images will then be processed using a pretraineddeep-learningmodel,whichwilldetectthepresence of an ambulance on the scene. Once an ambulance is detected,thesystemwillcommunicatewiththetrafficlight controllerandchangethetrafficlighttogreen,allowingthe ambulance to pass through the intersection quickly and safely.

module named train_test_split function which is a submoduleinthesci-kit-learnmodulerespectively.

Someothermodulesincludeconfigwhichisusedtohandle variablesandconstantsacrossthecode.NextisNumPywhich isusedtoperformnumericalcalculationsinthecode.

Thepathmoduleisusedtolocatethelocationofanyfolderor imagesinthemainfolder.Thepicklemoduleisusedtostore theprocesseddatainaparticularfolder.

VGG16 is a convolutional neural network model. The architectureoftheVGG16modelisbasedontheideaofusing verysmall(3x3)convolutionalfilterswithastrideof1,which allows the model to learn more complex features and patternsintheimages.

Math-plotlibisanothermodulethatisusedtoplotthegraph oftheresultprovidedbythemachinelearningmodel.Here results refer to the accuracy and loss of the model which recognizestheambulanceinthegivenimage.

Apart from these modules many other modules and submodulesarebeingusedinthemachinelearningmodel.

Fig-1

4. METHODOLOGY

Block

1: Importing Libraries

First, the libraries are imported to train the model and perform other tasks such are splitting the images into training sets and test sets, where this is done by using a

Block 2: Importing Images

Hereisblock2oftheflowchartofmethodology,theimages areimportedintothecode.Theseimagesofambulancesare takenfromdifferentcountries,differenttypesofambulances, fromdifferentanglesandscenariossothatwhenthemodelis madetoidentifyagivenimage,itcanidentifyiteasilyandin turn,itincreasestheaccuracyofthemachinelearningmodel.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1811
:FlowChartofProposedSystem Fig-2:FlowChartofMethodology

Block 3: Converting Images into Arrays

Here in block 3, the images which are being stored in the folder are pushed into the arrays. First empty arrays are initializedusingtheconfiglibraryandthenusingsomeofthe loops the images are pushed onto those arrays, which are usedtotrainthemachinelearningmodel.Throughthis,the modellearnsthepatternsoftheambulanceonebyone.

Block 4: Compressing Images

The next step is Compressing the images. Here the input pixelintensitiesarescaledfromtherange[0,255]to[0,1] usingtheNumPyarraydivisionoperation.Thedataarrayis converted to a float32 data type, while the labels array remainsasitis.

ConvertingthedataandlabelstoNumPyarraysandscaling the input pixel intensities from [0, 255] to [0, 1] are importantpreprocessingstepsinpreparingthedataforuse inamachine-learningmodel.

Scalingtheinputpixelintensitiestotherange[0,1]isalso important as it can help improve the performance of the machinelearningmodel.Thisisbecauselargeinputvalues cancausethemodeltoconvergeslowly,whilesmallinput valuescanleadtonumericalinstability.Byscalingtheinput pixelintensitiestoasmallerrange,themodelcanlearnmore effectivelyandconvergefaster.

Block 5: Partitioning Images

Thedataispartitionedintotrainingandtestingsplitsusing the train_test_split function from the sci-kit-learn library. Thefunctionsplitsthedataintotwosets-onefortraining themodelandanotherfortestingthemodel'sperformance. Thesizeofthetestingsetissetto10%ofthetotaldatausing thetest_sizeparameter,andtheremaining90%ofthedatais usedfortrainingthemodel.

Therandom_stateparameterissetto42,whichensuresthat the random splitting of the data is reproducible, and the shuffle parameter is set to True, which shuffles the data beforesplittingitintotrainingandtestingsets.

Block 6: Defining the Model

Itstartsbyloadingthepre-trainedVGG16model,whichwas trainedontheImageNetdataset,andfreezingallitslayersso theywillnotbeupdatedduringthetrainingprocess.Then, the code flattens the output of the VGG16 model and constructstwofullyconnectedlayers:oneforpredictingthe boundingboxcoordinatesoftheobjectintheimage,andthe otherforpredictingtheclasslabeloftheobject.

The bounding box outputlayerconsists of 4 neurons,and uses the sigmoid activation function, while the class label output layer consists of a number of neurons equal to the number of classes in the dataset and uses the SoftMax

activationfunction.Dropoutlayersarealsoaddedtoreduce overfitting.Thefinalmodeltakesaninputimageandoutputs both the predicted bounding box coordinates and the predictedclasslabeloftheobjectintheimage.

Block 7: Training the model

This code creates a Keras model with two inputs and two outputs.Theinputsareimagesofsizes(224,224,3),which willbepassedthroughapre-trainedVGG16convolutional neural network.TheoutputoftheVGG16network isthen passedthroughtwoseparatefullyconnectedlayers:oneto outputthepredictedboundingboxcoordinates,andanother tooutputthepredictedclasslabel.

Block 8: Performance of the Model

The model has two outputs - one for the class label and anotherfortheboundingboxcoordinates.Thelossfunction fortheclasslabeloutputiscategoricalcross-entropyandfor theboundingboxoutput,meansquarederrorisused.

Finally,twodictionariesareconstructed,oneforthetarget trainingoutputs(classlabelandboundingbox)andanother for target testing outputs (class label and bounding box). Thesewillbeusedduringthetrainingandevaluationprocess of the model. The summary of the compiled model is also printed

Block 9: Input Video

Nowthevideowillbeprovidedasinputtothemodel.Soas ourmodelistrainedtodetecttheambulanceusingimages, wemustconvertthevideointoimages.Thiscanbedoneby convertingthevideointoframessothatthemodelcandetect theambulanceandturntheredlightintogreenlight.

Block 10: Ambulance Detected?

After processing the images, we end up with the decision blockwhereiftheambulanceisdetectedthetrafficlightwill turngreenandthetrafficwillbereleased.Iftheambulance is not detected in the image, then the traffic lights work normallywithoutanychanges.

5. RESULTS

So,asourmodelistrainedwiththeambulanceimages,and whenthevideoisprovidedtoit,itdetectstheambulancein theframeanddrawsaboundarybox,andgivesalabelasan emergency if an ambulance is detected in that given boundarybox.Ifanambulanceisnotdetectedinthatgiven boundarybox,thenaclasslabelnamesnon-emergencywill begiven.Torepresentthisonagraphwehaveplottedthe accuracyandlossofthemodelwithrespecttoanumberof iterationsorepochs.Thegraphsforaccuracyandlossare mentionedbelow:

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1812

Fig-9: SimulationofReal-WorldTrafficusingPygame

Simulation: Hereweimplementedthesameinasimulation, whereweconsideredreal-worldtraffic.Theambulancewill appearinanyofthefourlanesrandomlyandwhenitcomes tothetrafficsignal,thetrafficlightturnsfromredtogreen fortherespectivelane.

AswecanobservefromFig-3,theaccuracyincreasesasthe number of iterations or epochs increases from 0 to 25. It includesboththeaccuracyoftheboundaryboxandtheclass label. We can say that number of epochs is directly proportionaltotheaccuracyofthemodel.

On the other hand, we can see the loss of the model. It basically tells us that the model has failed to identify the emergencyvehicleortheambulance.Itincludesthelossin boundary box identification and naming the class label, respectively.TheboundaryboxlossisrepresentedinFig-5 andclasslabellossisrepresentedinFig-4,wherethelossis drawnagainstthenumberofepochsoriterations.

From Fig-7 we can observe that the model has drawn a boundaryboxandgivenaclasslabelasanemergencyasan ambulanceisdetectedintheframe.

FromFig-8wecanseethatnoambulanceisdetected,soa class label as non-emergency is given by the model. The accuracydependsonthenumberofepochs.Inthiscase,we

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1813
Fig-3: TotalAccuracy Fig-4: LossforClassLabelLoss Fig-5: LossforBoundaryBoxLoss Fig-6: TotalLossoftheModel Fig-7: AmbulanceDetected(YellowColor) Fig-8: Ambulancenotdetected.

haveconsidereda total of25epochs. So, wecanconclude thattheaccuracyofthismodelliesbetween80%-85%.

6. ADVANTAGES OF THIS SYSTEM

Faster response time:Withtheprioritygiventoemergency vehicles,theycanreachtheirdestinationmuchfaster,which iscriticalinlife-threateningsituations.

Increased safety:Byallowingemergencyvehiclestopass throughintersectionswithoutstopping,theriskofaccidents isreduced.Thisisbecauseemergencyvehiclesoften must navigate through heavy traffic and allowing them to pass throughintersectionswithoutstoppingreducestheriskof collisions.

Improved response times for other emergency vehicles: Byreducingtheresponsetimeforoneemergencyvehicle, other emergency vehicles can also respond more quickly. Thisisbecauseemergencyvehiclesoftenoperateinteams, and by reducing the response time for one vehicle, the overallresponsetimefortheteamisalsoreduced.

Improved efficiency: By reducing the time it takes for emergency vehicles to reach their destination, emergency services can operate more efficiently, which can lead to betteroutcomesforpatients.

Increased public safety:Byallowingemergencyvehiclesto reachtheirdestinationfaster,thepublicisalsosafer.Thisis because emergency vehicles are often responding to lifethreateningsituations,andbyreducingtheresponsetime, livescanbesaved.

7. FUTURE SCOPE

Real-time tracking:Thecurrentmodelusesstaticimagesto detect and classify traffic lights. In the future, the model could be extended to work with real-time video streams, allowing for continuous monitoring and analysis of traffic lights.

Integration with GPS data:GPSdatacanbeusedtotrack the position of emergency vehicles in real time. By integrating this data with the model, the system could automatically detect when an emergency vehicle is approaching a traffic light and prioritize the signal accordingly.

Multi-object detection: In addition to detecting and classifying traffic lights, the model could be extended to detectotherobjectsontheroad,suchasothervehiclesor pedestrians. This could help emergency vehicles navigate throughtrafficmoresafelyandefficiently.

Integration with autonomous vehicles: As autonomous vehicles become more prevalent, the system could be extended to work with these vehicles. For example, an

autonomous emergency vehicle could use the model to detectandprioritizetrafficlightsasitnavigatesthroughcity streets.

Expansion to other emergency services:Thesystemcould beexpandedtoworkwithotheremergencyservices,suchas police or fire departments. By providing real-time traffic lightprioritization,emergencyservicescouldmorequickly andsafelyrespondtoemergencies.

8. CONCLUSION

Inconclusion,theimplementationofatrafficlightpriority systemforemergencyvehiclesusingmachinelearningcan greatlyimprovetheresponsetimeandsafetyofemergency services. The system can accurately detect and classify emergency vehicles and provide them with priority at intersections,reducingtheriskofaccidentsandincreasing the efficiency of emergency services. With further developmentandimprovementsintechnology,thissystem canbeintegratedintoexistingtrafficmanagementsystems, makingitanessential toolforemergencyservicesaround theworld.

9. REFERENCES

[1]ZhangH.,HeY.,WangY.(2021)“Real-TimeTrafficLight PriorityControlforEmergencyVehicles:RecentAdvances and Future Challenges.” IEEE Transactions on Intelligent TransportationSystems,vol.22,no.1,pp.358-377.

[2] Vashishtha, S., Aggarwal, S., Gupta, V., & Pandey, P. (2020). Intelligent traffic signal system for emergency vehicles.InternationalJournalofInnovativeTechnologyand ExploringEngineering,9(1),2621-2626.

[3]Javed,A.,Khan,R.U.A.,&Mughal,H.A.(2019).Traffic lightpriorityforemergencyvehiclesusingmachinelearning. International Journal of Advanced Computer Science and Applications,10(8),330-338.

[4] Hu, Z., & Wen, H. (2019). An intelligent traffic signal controlsystemforemergencyvehiclepriorityusingmachine learning.IEEEAccess,7,13666-13678.

[5]Lin,K.,Du,X.,He,Y.,&Jia,W.(2021).Amachinelearningbasedtrafficsignalcontrolstrategyforemergencyvehicles. Transportation Research Part C: Emerging Technologies, 127,103259.

[6] Lee, S., Lee, Y., Lee, S., Lee, J., & Kim, S. (2019). Development of emergency vehicle signal priority system usingmachinelearning.InternationalJournalofAdvanced ComputerScienceandApplications,10(9),73-77.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1814

BIOGRAPHIES

Dr.SaneeshCleatusThundiyil Associate Professor, Dept. of ECE, BMSIT&M. 14 years of teaching experience.Specializationin BiomedicalSignalProcessing.

Anandateertha,FourthYearStudent, Dept.ofECE,BMSIT&M,Bengaluru.

Abhishek B Kamble, Fourth Year Student, Dept. of ECE, BMSIT&M, Bengaluru.

ChennakeshavaReddyKM, FourthYearStudent,Dept.ofECE, BMSIT&M,Bengaluru.

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 10 Issue: 04 | Apr 2023 www.irjet.net p-ISSN: 2395-0072 © 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page1815
ManojKumarM,FourthYearStudent, Dept.ofECE,BMSIT&M,Bengaluru.

Turn static files into dynamic content formats.

Create a flipbook