WHO launched Global report on road safety in December 2018 which says traffic deaths increased to 1.35 million, an major reason of killer of people aged 5-29 years. Jams are not only frustrating, they are also a major contributor to air pollution, and thats bad not just for our climate, but everybodys health too. Congestion in 83 largest areas in US caused more than 2000 deaths, US drivers are stuck in 42 hours in traffic costing $121bn in time and fuel 
This and all related problems can be overcome with the use of IoT and Machine Learning. The aim of this paper is to build a suitable model for solving such problems, with integration of Raspberry Pi, an microcontroller, along with CCTV cameras mounted on significant places with Image processing algorithms. In previous papers canny edge detection algorithms was used, the main drawback of this algorithm was it takes lots of time due to it’s reach computations and it is very complex to be implemented on real time data. We are using HAAR Cascade algorithm, the main reason behind it is it’s computation speed, it is faster than Canny edge detection, around 60 microprocessor instructions are required to calculate a 2 rectangular feature.
We already have some of the very advanced systems to help management of traffic. Thus, this study is focuses not only on traffic congestion, but also focuses various other aspects such as emergency vehicle rescue, culprit catching etc. The CCTV camera mounted on signals used for traffic surveillance can be used for various other purposes such as number plate identification and culprit catching. Several ways can be used to manage traffic, we are primarily working on IoT integration with Machine Learning to understand traffic patterns, extraction of knowledge from the same, and future prediction of traffic patterns to help drivers finding optimal route.
2. Literature Survey
Traffic congestion is a major problem in many cities, main reason is increased interest in buying private vehicles, less wide roads and management failures. Traffic management is currently handled by human resource with the help of traffic police and CCTV camera mounted on significant places for surveillance. This surveillance is carried out manually by humans sitting in control station. The main defect in human resource use is its lack in efficiency and effectiveness. Many people tried may solutions using IoT and Machine learning to tackle this problems.
Before designing our system we surveyed on various papers, following is their overview and some flaws that found:
First paper that we studied was Automated Traffic Monitoring Using Image Vision by R. Krishnamoorthy, Sethu Manickam published in 2018. The main drawback in this proposed system was canny edge detection the algorithm was bit complex due to its computation and take more time, hence not suitable for real time data computation. Second paper was IoT based smart traffic signal monitoring system using vehicles counts published in 2018, in this author used IR sensors. The main drawback was the used IR sensor. IR sensor was counting vehicles by disturbance in IR signal. Laser of IR signal can get disturbed by many other entities such as animals, pedestrians.
Last paper was IoT Based Traffic Management System by Mahesh Lakshminarasimhan in 2016, the main drawback of this paper was it consumes more costs. It requires RFID mechanisms to get installed in every car to get tracked and needs to install IR sensor to get installed on road with required substations.
3. Proposed System
Our proposed system consists of mainly 2 modules, one is calculating optimal time for signal by calculating density of traffic on each road section and second module is identification of emergency vehicles using real time traffic data.
First module is to calculate optimal time for signal. We are going to use CCTV cameras mounted on signals and various regions for collection of real time traffic data collection. This real time traffic data is then processed with the help of Raspberry pi and cloud based server for faster calculation. Various Machine learning algorithms will get used for understanding traffic patterns for further deep study and future traffic predictions. Round robin algorithm can be used to scheduling traffic signals. A threshold time will get allocate to each junction after understanding traffic pattern. After that density will get calculated, if the calculated density is less than that of threshold density then the traffic signal will get released, if the calculated traffic density is more than threshold density then more time will get allocate to that respected signal.
Second module is identification an classification of vehicles. Thus module will help in density calculation as without identifying vehicles we will be unable to count density. For identification and verification of vehicles we are going to use HAAR cascade algorithm. HAAR cascade is more efficient than canny edge detection is several ways, it has complex calculation but is able to work with real time data. HAAR classifier will get trained by number of vehicle images, so that it will easily identify emergency vehicles such as Ambulances and Police Vehicles. This will be helpful for emergency timings.
4.1 Vehicle Identification.
Figure 4.1: Vehicle Identification
Step 1: Collection of labeled dataset of vehicles.
Step 2: Design HAAR Classifier.
Step 3: Train Classifier on labeled dataset.
Step 4: Identify vehicles with Classifier.
4.2 Optimal Time Calculation.
Figure 4.2: Optimal Time Calculation
Step 1: Calculate density of real time traffic.
Step 2: Compare density with threshold density.
Step 3: If density is less than threshold density then allocate
time less than threshold time, else allocate time
greater than threshold time.
Step 4: Release Signal.
The efficient algorithms are used to design the modules. The proposed system will be a smart and intelligent that will monitor, analyze, and will take decisions according to the steps mentioned. It will minimize the time for vehicle delay and will help the society in various methods. It will consume minimum power. The battery issue for this proposed system can be solved by using solar panels or the energy generated from the steps generated by people.
 WHO News, Violence and Injury Prevention, Global status report on road safety 2018,
 BBC News, Can a city be traffic jam free ? 2014
 R. Krishnamoorthy, Sethu Manickam, Automated Traffic Monitoring Using Image Vision, IEEE Xplore Compliant – Part Number: CFP18BAC-ART; ISBN:978-1-5386-1974-2(ICICCT 2018)