Traffic Signal Management using Machine Learning Algorithm

— Traffic clog is one of the significant issues in India and it is particularly prevalent in the metropolitan urban areas of the nation. Clogged streets can be viewed for instance of the awfulness of the lodge. Since streets in many spots are free at the purpose of use, there is minimal money related motivation for drivers not to over-use them, up to where traffic falls into a jam, whenever request gets constrained by circumstance cost. Privatization of interstates and street estimating have both been proposed as measures that may decrease clog through monetary motivating forces and disincentives. Blockage can likewise occur due to non-repeating parkway occurrences, for example, an accident or roadworks, which may lessen the street's ability underneath ordinary levels.While clog is a likelihood for any method of transportation, greater part of the systems included spotlight on car blockage on open streets. Image processing techniques have been generally utilized in the control and the executives of traffic frameworks. To evacuate the extravagance and infeasibility of these picture preparing frameworks, this paper proposes an elective methodology, an algorithm, that would help circulate the traffic equitably whilst controlling the signal by utilizing HERE maps API.


I. INTRODUCTION
India gloats of being the second-biggest street organize on earth. The complete stretch of the Indian street systems remain at an astounding 5.4 million km! Thus, it shapes a gigantic final proposal for the Indian Government to give impeccable streets at each progression. For any Indian, be it normal or millennial, passing through the Indian lanes is absolutely an issue that no might want to experience. As request moves toward the limit of a street (or of the convergences along the street), outrageous traffic blockage sets in. At the point when vehicles are completely halted for timeframes, this is known as a traffic jam or (casually) a traffic growl up. Traffic blockage can prompt drivers getting baffled and participating in street rage.
Numerically, clog is normally taken a gander at as the quantity of vehicles that go through a point in a window of time, or a stream. A portion of the standard traffic issues incorporate • Poor street quality because of over the top traffic-The outrageous clog of urban streets because of intensely utilized private vehicles prompts the corruption of the nature of the streets. This prompts ceaseless traffic issues more often than not.
• Noise and Air pollution especially in urban areas-The sheer magnitude of traffic problems also gives rise to other health-damaging issues such as the air and sound pollution.
So, we propose a solution which controls the traffic dynamically based on various important factors like time of day, climate, condition of roads etc. The system enables to distribute the traffic congestion evenly throughout the area.
II. BACKGROUND Adaptive signal control system were implemented using deep learning and reinforcement learning algorithm (RL). Instead of a real traffic operation, the present study utilized Vissim, a commercial traffic simulator, as an environment. A real intersection located in Seoul, Korea was chosen as a testbed for the simulation. that showed both a real photo and an animation image of the test-bed. [1] Complex backgrounds should be eliminated from real photos prior to being inputted for the CNN model. Simple image-processing skills can accommodate this process when adopting real photos in the future. The algorithm was trained for 20,000 simulation seconds (= about 5 hours 30 minutes) for each episode. There were 50 episodes simulated for training the model. Thus, the total simulation time was tantamount to 1,000,000 seconds. [1] Another project that was acted upon was one based on google map java app which used data from google maps. Google maps provide real time traffic density.The core of the idea lies on Image Processing of the already existing Traffic API provided by Google. Google Traffic API provides the real-time data of the traffic conditions for any given coordinates, which gives color-coded traffic density data, which can be further processed to analyze the traffic flow at a given traffic junction and hence, the traffic lights can be dynamically controlled to regulate the traffic. [6] This system works to make sure that there is not an uneven distribution of "Wait Time" and therefore uneven accumulation of traffic at a junction. [6] Another real-time traffic-adaptive signal control system referred to as RHODES [12] was also taken into consideration. The system takes as input detector data for real-time measurement of traffic flow, and "optimally" controls the flow through the network. The system utilizes a control architecture that (1)  subproblems that are interconnected in an hierarchical fashion, (2) predicts traffic flows at appropriate resolution levels (individual vehicles and platoons) to enable pro-active control, (3) allows various optimization modules for solving the hierarchical subproblems, and (4) utilizes a data structure and computer/communication approaches that allow for fast solution of the subproblems, so that each decision can be downloaded in the field appropriately within the given rolling time horizon of the corresponding subproblem.

III PROPOSED SOLUTION
The basis for our proposed solution proceeds as follows-The HERE maps API enables us to extract the traffic density of a particular road. API provides us with jam factor of particular road. The extraction of API from maps leads us to the lane where we want to check congestion.
After extracting the API, we check the congestion of vehicles.
The congestion tends to be more in bottleneck areas. Also, we check the surrounding roads as well to distribute the congestion from one crowded road to less crowded ones.
\According to the best factor which can be chosen at that time, the system selects it. The priority list will be set in it. The system will execute the algorithm and dynamically handle the traffic density.
If one lane has much less traffic than the other, half of the traffic will be diverted to the other empty lanes and the density will be distributed accordingly throughout the area.

IV. METHODOLOGY
The proposed framework means to progressively change the hour of the traffic signal in view of a predetermined objective to lessen the blockage of traffic out and about thus diminishing the time an individual needs to hold up in rush hour gridlock. The framework depends on AI calculation which will push us to progressively change the hour of the traffic signal. The framework will show the recreation of the traffic clog changing persistently dependent on the dynamic time that is being given to the traffic signal dependent on noteworthy forecasts of traffic on that street Product functions and features-Initially, data preprocessing was performed by storing only those attributes(obtained from the api) that were prescriptory for further implementation of our model. Also, the immediate and vital preprocessing gait which is data cleaning was performed by getting rid of inconsistent values such as empty strings and zero-based values. The dynamic of our model would then function as follows-1 After the user ingresses the coordinates of the junction, the website would extract details of the particular junction using HERE Maps api. These details are primarily provided in the JSON(JavaScript Object Notation) format.
2. These details include the average speed of the vehicle, length of the road, the maximum speed of any vehicle on the road and the jam factor (i.e traffic density) on that particular stretch of road. 3. The distinct value proposition of the product would lie in the data which would be defined accordingly, as per the assumed direction of the traffic. This defined data would be segregated into multiple classes. 4. Using the self-implemented algorithm, the basis of which would lie in Naive Bayes, the traffic would get distributed to the surrounding lanes based on the threshold of the jam factor. This area would help us decide the number of vehicles extant for a given time. 5. The timer of the signal would be handled by calculating the amount of time required for a vehicle to pass which would ultimately depend on the area of the particular junction. 5. The output for the same would be demonstrated using a simulation of the junction.
Hardware Interfaces include-Devices that support web browsers such as PC, laptops and handheld devices.
Software Interfaces include-•The GUI that we will utilize is PyCharm which is a Python IDE used to compose and investigate Python code • To spare the information for preparing the model, we will utilize MySQL Database • The Graphical User Interface (GUI) execution will be done in Django.
• We have picked Windows as our Operating System for improvement for its best help and ease of use.

User interface
The Adaptive Traffic Control System screen displays shall conform to the Process Impact Internet Application User Interface Standard, Version 2.0. The Web pages shall permit complete navigation and data selection and display using the keyboard alone, in addition to using mouse and keyboard combinations. To execute our objectives and targets we first concentrate information from HERE Maps API, which gives us the traffic density information as JSON or XML position. We get different highlights with respect to the traffic out and about, for example, the normal speed of any vehicle on that specific street, the length of the street, the most extreme speed of any vehicle out and about and the jam factor (the traffic density) on that stretch of street.

International
Our underlying advance was to arrange our condition for information assortment from the API and putting it into the database. During the assortment of information, we prehandled information, putting away just the traits that were required for additional execution of our model. We even performed cleaning of the information to dispose of conflicting information, for example, zero qualities.
To quantify the proficiency of our framework, regardless of whether we have figured out how to decrease the traffic clog on the streets utilizing our mimicked model, we will contrast our reproduced qualities and the constant qualities got from the API. We will quantify the distinction between these qualities, and this distinction when communicated as far as rate will characterize how better traffic can be overseen/controlled utilizing our actualized model.
VI. CONCLUSION Thus, our fundamental aim is to control the traffic flags powerfully dependent on the present traffic density and considering the memorable traffic density esteems. Among the streets that we have considered, the street having the most noteworthy jam factor (traffic density) will be viewed as first and in our recreation run the jam factor will be decreased dependent on the surmised normal speed of any vehicle on that specific street and the traffic on the ensuing street. Time for a specific activity, ie, a red light or a green light will be given dependent on different elements, basically the jam factor.
Accordingly, with the expanding traffic in our everyday life, the need to oversee it has become a need now Our model gives an ideal answer for the intersections at top occasions just as different occasions. In this venture, we have proposed a strategy to forestall blockage of traffic by wiping out the customary picture handling technique utilized by the past frameworks and by controlling the traffic lights powerfully.