Smart Control of Traffic Light System using Artificial Intelligence

Ғылым және технология

The congestion of urban traffic is becoming one of the critical issues with increasing population and automobiles in cities. Traffic jams not only cause extra delay and stress for the drivers, but also increase fuel consumption, add transportation costs, and increase air pollution. Although it seems to pervade everywhere, megacities are the ones most affected by it. And it's ever increasing nature makes it imperative to know the road traffic density in real-time for better signal control and effective traffic management. The traffic controller is one of the critical factors affecting traffic flow. The current traffic management systems that are in place are generally static, which means that they do not adjust according to the needs of the traffic flow. Our proposed system aims to design a traffic light controller based on Computer Vision that can adapt to the current traffic situation. It uses live video feed from the CCTV cameras at traffic junctions for real-time traffic density calculation by detecting the vehicles at the signal and setting the green signal time accordingly. The vehicles are classified as car, bike, bus/truck, or rickshaw to obtain a more accurate estimate of the green signal time. We have used object detection techniques like YOLO in order to detect the number of vehicles for each direction. We then set the timers of these traffic signals according to vehicle density in each direction and hence the system becomes adaptive. This helps to optimize the green signal times, and traffic is cleared at a much faster rate than a static system, thus reducing the unwanted delays, congestion, and waiting time, which in turn will reduce the fuel consumption and pollution.
Source Code: github.com/mihir-m-gandhi/Ada...
Research Paper: ieeexplore.ieee.org/document/...
Email: mihir.mg@somaiya.edu
LinkedIn: / mihir-m-gandhi
#gpmcoonlineproject

Пікірлер: 130

  • @stephenmarende3334
    @stephenmarende33342 жыл бұрын

    Great thinking, thanks man, bring the idea to Kenya, where traffic jam is used as an excuse for arriving late in every function

  • @crashcoursebysaurov6976
    @crashcoursebysaurov6976 Жыл бұрын

    Can you give a hint about the scheduling how you did that? Match the flow the data with singal switching

  • @aspirinemaga
    @aspirinemaga Жыл бұрын

    Artificial inteligence made from IF ELSE 😄😄

  • @pritisalunke9789
    @pritisalunke97895 ай бұрын

    Which software did you guys used for the writing code ?

  • @syedimtiazhussain2682
    @syedimtiazhussain26827 ай бұрын

    which software we used for the simulation of this ..? and which one is best ??

  • @gimbaldhari
    @gimbaldhari9 ай бұрын

    Which Software you used for simulation in macbook

  • @hamadadrahim
    @hamadadrahim Жыл бұрын

    Good work congratulations! You used machine learning to detect number of vehicles in the camera How did you connect 4 traffic lights together? Did you use IOT? What are other techniques you used?

  • @hashimmahamerul8857
    @hashimmahamerul88572 жыл бұрын

    Thanks for the information, i came to see this video after notice my home state perak launch this Artificial intelligence Traffic Light.

  • @muhammadridhwan1075

    @muhammadridhwan1075

    2 жыл бұрын

    Same haha

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Hashim! That's great. In which city?

  • @onesport735
    @onesport735 Жыл бұрын

    can I make this artificial into a real 3d model I just want to know which adapter to use to maintain the exact time to avoid accident

  • @kazeemsanusi6673
    @kazeemsanusi66735 ай бұрын

    Good... Keeping it simple... Hope you are making progress

  • @kowshik348
    @kowshik348 Жыл бұрын

    The yolo weights file is missing if I use some other yolo weight from internet it is showing over read can you share the weights fit for the project

  • @NewBuildmini
    @NewBuildmini2 ай бұрын

    You could also do away with all the fancy AI stuff, and instead have a timer that measures the gaps between cars, and switches the light once it exceeds a certain value (and the queue is considered to have discharged). That's what's most commonly used in real life (vehicle-actuated control). A disadvantage of using cameras as sensors is that it's affected by weather conditions (rain, wind, snow, extreme temperatures, sun glare, etc), and can potentially be damaged by vandals (e.g throwing rocks). All of this can reduce the accuracy of the data. Inductive loops are the most reliable detection method.

  • @TallamJayaram
    @TallamJayaram5 ай бұрын

    Whether you used any dataset in this project or not?

  • @diwashpoudel
    @diwashpoudel6 ай бұрын

    i which software have you done simulation?

  • @simonkalman8302
    @simonkalman83022 жыл бұрын

    Hi Mihir! I write my thesis about a similiar project of yours, but I think more about this one. I imagined that not only the crossroads would be controlled by AI, but the whole city would be connected, So that the traffic waves could be even more controlled. I write my project from a different perspective. From a pont of view of economy. How the less fuel consumption would effect inflation internationally. Do you have an estimated data, which approximatlely tells how less fuel is going to be consumed this way? I am looking forward to your answer!

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Simon! Your thesis idea sounds very interesting. In fact, we thought about synchronizing multiple intersections to control traffic waves. However, we did not think about it from the fuel consumption perspective. So we do not have any data related to that. I am sure there must be research papers studying the fuel consumption in various classes of vehicles per unit time at different speeds, as well as fuel wastage idling at a traffic signal. You can try looking for those for your project. Good luck!

  • @CIVIL_ENGINEER2845

    @CIVIL_ENGINEER2845

    Жыл бұрын

    @@mihirgandhi0706 hlw sir please sir help us

  • @swatidivatankar5578
    @swatidivatankar55782 жыл бұрын

    Hello Mihir. You showed the comparsion of current system & adaptive system. What value of green time you have considered for current system in simulation?

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Swati! The simulation was tested with various values of green signal time in the static case. You can use 30 seconds for each direction, or 30 seconds for 2 directions and 20 seconds for the remaining two. The latter is a slightly optimized static case which is used at many intersections nowadays.

  • @luqmanharits1456
    @luqmanharits14562 жыл бұрын

    Thankyou for your explantion sir, i hope you always happy

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Thanks!

  • @janssenpedrola2331
    @janssenpedrola2331 Жыл бұрын

    What software did you guys use for the simulation of the traffic?

  • @adityavardhanjain

    @adityavardhanjain

    8 ай бұрын

    They mentioned the use of PyGames

  • @mostcreativerudra6749
    @mostcreativerudra67493 ай бұрын

    thank you sir

  • @SVajrapuPrathyusha
    @SVajrapuPrathyusha Жыл бұрын

    can you plz give me directions to run the code which is available in the git repository

  • @joaopauloeloy7355
    @joaopauloeloy73553 жыл бұрын

    Which program did you use to make these simulations?

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    We have developed the simulation ourselves using Pygames library.

  • @joaopauloeloy7355

    @joaopauloeloy7355

    3 жыл бұрын

    @@mihirgandhi0706 thanks

  • @reddydinesh1161
    @reddydinesh11612 жыл бұрын

    In your research paper you have mentioned current static system, what is that means?

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    It means having fixed green signal times for signals regardless of the traffic density. For example, a green signal of 30 seconds for all directions at an intersection.

  • @t209_pranalideokate9
    @t209_pranalideokate92 жыл бұрын

    Best explanation ever

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Thanks!

  • @piyushaggarwal4820
    @piyushaggarwal48203 жыл бұрын

    Congratulation on the wonderful work! Have you considered using the online maps to gather the real time traffic data at the traffic intersections?

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi Piyush! We had considered the idea. However, using an image of the intersection in real-time proved to be the better idea. This is because of 2 things: 1. If we just look at the data i.e. traffic density (like the Red, Yellow, or Blue colour on Google Maps used to indicate whether the traffic density is very high, medium, or low), then we cannot differentiate among the different classes of vehicles to compute a better estimate of green signal time. 2. Instead, if we use satellite view from an online map service, it will involve a lot of processing, which is not really necessary. What do you think about it? Is there some other idea that you are thinking of?

  • @piyushaggarwal4820

    @piyushaggarwal4820

    3 жыл бұрын

    Hello Mihir, I will agree that real time data will be best captured by camera installed on the intersections. But there is always the issues of maintenance, cost and scaling up for multiple intersections. Google maps as you said provides just the colour marking for the traffic congestion, which might not give the accurate indication of the congestion. There are few more maps service like HERE maps which do have an API for traffic congestion, on the scale of 0-10. But they also lack the clear documentation if one needs to model it during simulation . Though I am not aware of any satellite based live imaging service which could provide the images for the intersections. As most of the earth observation (EO) satellites are in low orbits and are not geo stationary. Do you have any plans of deploying this project ? Thanks.

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    @@piyushaggarwal4820 Yes, the maintenance cost and issues need to be thought of. Regarding deployment, yes, we were in discussion with Mumbai Traffic Police to get live CCTV footage and test our system on it. In addition, we were planning to train our model with some of the live data added to improve its performance. However, due to the lockdown, we haven't been able to go through with the meeting.

  • @abbotantony4460

    @abbotantony4460

    3 ай бұрын

    can you give me your contacts, i want to discuss on the issue of real time traffic data using google map API

  • @sadychowdhury3895
    @sadychowdhury3895 Жыл бұрын

    Hello sir i would like work with this project and want to introduce it on a city town called sylhet in Bangladesh.

  • @user-vv8gq1it7b
    @user-vv8gq1it7b3 ай бұрын

    I have to make a practical project how should i do it?

  • @pvmlvamsi2768
    @pvmlvamsi27683 жыл бұрын

    Actually my academic project also similar to your project iam using yolov3 Trained weights for predicting count of vehicles in image but iam facing problem of finding the accuracy . Could you please help me?

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi! Sure, I'll try to help. Please send me some more details on mihir.mg@somaiya.edu and we can try to figure out how to improve accuracy of your model.

  • @md.rayhanuddin7905

    @md.rayhanuddin7905

    Жыл бұрын

    @@mihirgandhi0706 sir weight file is missing.Can you please upload it??

  • @YAKAHUB
    @YAKAHUB2 жыл бұрын

    What is the python version. I want do this in jupyter notebook. so I want to know the python version for make new environment........

  • @kevinronald7171
    @kevinronald71714 жыл бұрын

    Super 👍👍

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Thanks!

  • @macrotecHN
    @macrotecHN3 жыл бұрын

    Will this be ready to implement in a small city, lets say at least 10 intersections ?

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    The primary issue when implementing this practically would be the accuracy of detection. A good way to go about this would be training the vehicle detection model using a large dataset consisting of images from traffic signal cameras of that area. With an accurate model like this and some minor tweaks to configuration according to intersections, it will be good to go!

  • @mohdmushtaq6774

    @mohdmushtaq6774

    3 жыл бұрын

    Kindly contact me. I m interested in ur project. Whatsapp me at 9719003322

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    @@mohdmushtaq6774 Hi, please reach out to me via mail at mihir.mg@somaiya.edu

  • @md.rayhanuddin7905
    @md.rayhanuddin7905 Жыл бұрын

    Sir can you upload the weight file.It shown it is missing... please response sir

  • @mohitbisht2495
    @mohitbisht24952 жыл бұрын

    HII I HAVE A MINI PROJECT ON THIS TOPIC HOW SHOULD I DO IT. IAM NOT ABLE TO UNDERSTAND ANYTHING IN CODE

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Mohit! You can refer to the documentation on the Github page to understand the code to some extent. Good luck with your project!

  • @user-if8is6ve7p
    @user-if8is6ve7p4 ай бұрын

    supper

  • @sahidahmed5960
    @sahidahmed59602 жыл бұрын

    List of components

  • @user-pc3yk8pg4n
    @user-pc3yk8pg4n7 ай бұрын

    Can anyone expalin me how to demonstrate this through model or how to program it to show in real world.

  • @SVajrapuPrathyusha
    @SVajrapuPrathyusha Жыл бұрын

    sir,I tried to contact you through your mail .....but unfortunetly i didn't get any respose 😞

  • @bhargavpatel1936
    @bhargavpatel19368 ай бұрын

    bro i need your help related this project can you help me???

  • @siddhantparmar6063
    @siddhantparmar60633 жыл бұрын

    can you please share the algorithm to give the green light timings to the signal.

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi Siddhant, you can find the source code in the description.

  • @olumidebenjami4
    @olumidebenjami43 жыл бұрын

    Great work bro

  • @olumidebenjami4

    @olumidebenjami4

    3 жыл бұрын

    @@mihirgandhi4682 Please can I have a one on one conversation with you via your email address

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    @@olumidebenjami4 Sure!

  • @allegiancemuturi
    @allegiancemuturi2 жыл бұрын

    Great work 👏

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Thanks!!

  • @pradnyeshdeo1295
    @pradnyeshdeo12952 жыл бұрын

    Can someone help me out with cloning this project ? I am not able to do it.

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Pradnyesh! Can you elaborate on the issue that you are facing? I can try to help.

  • @surabhibtech
    @surabhibtech2 жыл бұрын

    hello Mihir , I am following your git link ,but while I am running requirement.txt it will produce error, help out me to eliminate the error.

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Surabhi! Sure, I'll try to help. What is the error?

  • @thuanha9933
    @thuanha99332 жыл бұрын

    Can you send me the .pdf file of this project? Thanks!!

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi, you can find the documentation on GitHub. The link is in the description.

  • @AlaEddine19176
    @AlaEddine191763 жыл бұрын

    Can you explain to me how i run it

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi! You can find the instructions to run the code along with the source code in the GitHub link in description.

  • @mohammadrahatakand
    @mohammadrahatakand Жыл бұрын

    Hey Bro, I didnt find your weights file. Could you please give me that ?

  • @md.rayhanuddin7905

    @md.rayhanuddin7905

    Жыл бұрын

    I faced the same problem

  • @charankumar6688
    @charankumar66882 жыл бұрын

    Hey Mihar..Really great work done by you Why don’t you try to make this project works in real time for our traffic signalling system😊

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Sure Charan, thanks!

  • @saurabhpatel7391
    @saurabhpatel73913 жыл бұрын

    I am also working on this....have you tested this in real time.....?? i have done mine of real time and the results were not as expected....(you know india's traffic and indian people)......although we improved it and have given for the approval to the state authorities govt authorities.

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi Saurabh! We were in discussions with Mumbai Traffic Police to get some CCTV footage and test the system on real images. However, due to the pandemic, we have not been able to schedule an appointment to visit their office again. If you do have some test images that you can share, please send them to me on my email: mihir.mg@somaiya.edu. Also, I would love to know more about your project as well.

  • @fredrickofori363

    @fredrickofori363

    2 жыл бұрын

    Please I need the practical video of the project work

  • @CIVIL_ENGINEER2845

    @CIVIL_ENGINEER2845

    Жыл бұрын

    Saurabh Patel kya Apne ye project complete kr liya h?

  • @aditijaiswal6968
    @aditijaiswal69683 жыл бұрын

    Concepts got easily

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Thanks!

  • @sarithachinnari5710
    @sarithachinnari57103 жыл бұрын

    How do I get IEEE paper of your project sir

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi Saritha, the link of the paper is in the description. If you have any issue in accessing it, you can contact me via LinkedIn or Email.

  • @sahidahmed5960
    @sahidahmed59602 жыл бұрын

    Where is list of components

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi! I didn't understand your question. What components are you talking about?

  • @epicplayz0716
    @epicplayz07162 жыл бұрын

    I have a interview and I want to explain this project so please contact me bro

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Desh, you can find the documentation of the code on GitHub. The link is in the description. I have also explained the entire code of the simulation part in Towards Data Science articles. You can find find the links to those on other videos of this channel. Hope it helps.

  • @Rameshram-ge7no
    @Rameshram-ge7no Жыл бұрын

    Hello Mihir, While running vehicle_detection.py file im facing this error : ModuleNotFoundError: No module named 'darkflow.cython_utils.cy_yolo_findboxes' could you please help me to solve this error..? Thank you...

  • @Rameshram-ge7no

    @Rameshram-ge7no

    Жыл бұрын

    @@CIVIL_ENGINEER2845 yes it's completed and Sir appreciated very well for this project, And Thanks to @Mihir Gandhi sir

  • @Rameshram-ge7no

    @Rameshram-ge7no

    Жыл бұрын

    @@CIVIL_ENGINEER2845 ok

  • @rayschindler7451

    @rayschindler7451

    3 ай бұрын

    Hey , tomorrow morning I have to show this project , can you leave you socials to help me run it please?

  • @Rameshram-ge7no

    @Rameshram-ge7no

    3 ай бұрын

    @@rayschindler7451 I only Worked on Pygame simulation model, I run that project By following steps from the readme file. U can also Do like that. And make Sure that U have python 7.0 version , It will not run in python extended versions.

  • @deepikadeepu3166
    @deepikadeepu3166 Жыл бұрын

    Can u send source code link

  • @ugosoft13
    @ugosoft133 жыл бұрын

    Wonderful. I'm doing a project like this. I just found your video. Can I have your email, Whatsapp or anything I can use to contact you

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi! That's great. Feel free to contact me via mail or LinkedIn. Links are in the description.

  • @ugosoft13

    @ugosoft13

    Жыл бұрын

    @@CIVIL_ENGINEER2845 it's been 2 years, brother

  • @ugosoft13

    @ugosoft13

    Жыл бұрын

    @@CIVIL_ENGINEER2845 just seeing this. is it too late?

  • @AhmedMohamed-xu2od
    @AhmedMohamed-xu2od3 жыл бұрын

    Code please

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    The link to the source code has been added to the description. github.com/mihir-m-gandhi/Adaptive-Traffic-Signal-Timer/

  • @nikhilkommanaboyina6398
    @nikhilkommanaboyina63983 жыл бұрын

    hello bro can you share the code

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    We are working on finalizing the code. Link to the Github Repo will be made available soon.

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    The link to the source code has been added to the description. github.com/mihir-m-gandhi/Adaptive-Traffic-Signal-Timer/

  • @OBULAMNITHISHKUMARREDDY
    @OBULAMNITHISHKUMARREDDY3 жыл бұрын

    code please

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    The link to the source code has been added to the description. github.com/mihir-m-gandhi/Adaptive-Traffic-Signal-Timer/

  • @mustaphasemma6872
    @mustaphasemma68723 жыл бұрын

    Email pleas

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Mustapha! My email is mihir.mg@somaiya.edu.

  • @CricketDream111
    @CricketDream1112 жыл бұрын

    Please codeing send

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    You can find the code here: github.com/mihir-m-gandhi/Adaptive-Traffic-Signal-Timer/.

  • @md.rayhanuddin7905

    @md.rayhanuddin7905

    Жыл бұрын

    Bro weight file is missing.can you please upload it???

  • @hemasingh8033
    @hemasingh80332 жыл бұрын

    Bro actually I am working on quite similar project , I need a small guidence of your , it would mean world to me ... how can I contact you ? Is there any possible way?

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Hema, you can email me at mihir.mg@somaiya.edu.

  • @nepteacher
    @nepteacher2 жыл бұрын

    Hi Mihir, I'm trying to run your code but keep getting these errors. File "vehicle_detection.py", line 2, in from darkflow.net.build import TFNet File "/content/Adaptive-Traffic-Signal-Timer/Code/YOLO/darkflow/darkflow/net/build.py", line 5, in from .ops import op_create, identity File "/content/Adaptive-Traffic-Signal-Timer/Code/YOLO/darkflow/darkflow/net/ops/__init__.py", line 1, in from .simple import * File "/content/Adaptive-Traffic-Signal-Timer/Code/YOLO/darkflow/darkflow/net/ops/simple.py", line 1, in import tensorflow.contrib.slim as slim ModuleNotFoundError: No module named 'tensorflow.contrib' Would be great if you could help out for these.

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi, it may be because you have the incorrect TensorFlow version. The newer versions of TensorFlow do not have this module. Switching to the previous version (as mentioned in requirements.txt in the GitHub repo) should solve the issue.

  • @tanyagarg7172
    @tanyagarg71722 жыл бұрын

    Hi Mihir, i need ur help in my phd work regarding the same area. Please contact

  • @mihirgandhi0706

    @mihirgandhi0706

    2 жыл бұрын

    Hi Tanya! Happy to help. Send me an email on mihir.mg@somaiya.edu.

  • @tusharbadhe
    @tusharbadhe3 жыл бұрын

    How do I get IEEE paper of your project sir

  • @pvmlvamsi2768

    @pvmlvamsi2768

    3 жыл бұрын

    Try sci-hub

  • @mihirgandhi0706

    @mihirgandhi0706

    3 жыл бұрын

    Hi Tushar, the link of the paper is in the description. If you have any issue in accessing it, you can contact me via LinkedIn or Email.

Келесі