Smart Traffic Signals in India using Deep Reinforcement Learning and Advanced Computer Vision
Ujwal Tewari
Bengaluru, Karnataka
- 0 Collaborators
This project deals with the deployment of Deep Reinforcement Learning and Computer Vison models for creating smart traffic signals for Indian traffic conditions. We have used Sumo as our simulator and Intel Devcloud for the training of the RL models. ...learn more
Project status: Published/In Market
Internet of Things, Artificial Intelligence
Groups
Student Developers for AI,
DeepLearning,
Artificial Intelligence India
Intel Technologies
AI DevCloud / Xeon,
Intel Python,
Intel Opt ML/DL Framework
Overview / Usage
With a growth in the economic sector since the early 1990s, India has been undergoing a paradigm shift in the domain of transportation as well. With the explosion in the number of road-vehicles, the surge in traffic density (especially in metropolitan cities like Bangalore and Delhi) has become a major cause of concern. It has, therefore, become really important to develop Intelligent traffic signals and systems in order to optimise the escalating traffic flow. For a developing country like India where the majority of motorists are still negligent of traffic laws and are often seen breaking them, for e.g, driving in opposite lanes, violating an indicator near turns and turning in a wrong direction, and many more such instances which eventually lead to traffic jams.
In such Indian scenarios, the power of reinforcement learning applied on traffic behaviour can be leveraged to greatly reduce these traffic jams. We have designed a script for applying Deep Reinforcement Learning using SUMO simulator in the repository being run on intel devcloud. We have used DQN+Target Network+Experience Replay in our project and processed frames from simulator using computer vision.
We have used Intel Devcloud for training our deep learning script and later on for processing simulator frames.Not only that using Intel distribution for Python 3.6 we were able to achieve faster application performance in comparison to normally running the code on our laptops. We learned how this distribution could actually help us in utilising the intel architectures for running tensorflow for CPU even faster. Since we were using NumPy and SciPy, the intel data analytics acceleration library did give us a boost in processing frames of simulator
Methodology / Approach
We have used DQN+Target Network+Experience Replay in our project and processed frames from simulator using computer vision
We have used SUMO as our running environment and have experimented with number of scenarios and agents.
Scenarios tested on single intersection.
a) Equal traffic is supplied to all the carriageways.
b) Equal traffic is supplied to two of the carriageways, the other two carriageways are kept empty.
In (c), the traffic in the two non-empty carriageways is made unequal.
In (d), an obstacle (labelled in red) is introduced in one of the carriageways.
We also worked with Two junctions for multi agent RL setup- Dual intersection
Computer Vision Module-
We have used background subtraction for calculation of queue length of vehicles in a lane or section and four of these make a junction which acts as our state space.
Background subtraction in real life
The same we have done by taking in the frames from the simulator by recording the screen and then extracting each lane frame from the four lanes and then processing it to get the queue lengths.
Simulator background queue calculation
Here after getting a simulator frame, we convert it bird eye view so it looks like an image taken from a traffic camera and then perform background subtraction to get the queue length.
RL model-
The Queue length obtained from the CV module goes into the RL model. We have used Queue length as our state space and the decision to switch green signal to the next lane or not is decided by the RL model.
State space - Queue lengths+ Phases
Action Space - Switch || Not Switch
Technologies Used
- Keras
- Tensorflow
- SUMO
- Aimsun
- DQN
- Deep RL
- Pycharm
- Intel devcloud
- Intel DL framework