An Intelligent Traffic Light System Using Object Detection and Evolutionary Algorithm for Alleviating Traffic Congestion in Hong Kong
- DOI
- 10.2991/ijcis.d.200522.001How to use a DOI?
- Keywords
- Intelligent traffic light system; Traffic congestion; Object detection; Evolutionary algorithm
- Abstract
High traffic flow is a typical characteristic of a mobilized city with a high population. Efficient traffic management is a proper solution to reduce the stress and anxiety associated with driving or traveling. The road users can have better timing for traveling as they will not experience journey delays due to traffic congestion. In Hong Kong, until September 2017, over 2,100 kilometers long roads around Hong Kong Island, Kowloon Peninsula, and New Territories are serving over 762,000 vehicles. However, the current traffic signal control systems used in Hong Kong are mainly pre-defined fixed-cycle traffic light systems. These systems do not consider too much about the real traffic situations such as vehicle and pedestrian counts, delay and waiting time of the road users. They respond slowly to regulate traffic flow especially when there is a high volume of traffic. A study of effective optimization technologies in controlling traffic signals is conducted which aims to relief the congestion problem and increase road efficiency according to the specific needs of Hong Kong. In this paper, a new traffic light system using machine learning with object detection and analyzing by the evolutionary algorithm that aims to perform a real-time strategic signal switching arrangement to traffic lights at the intersection was designed to reduce the waiting time of pedestrians and vehicles, and provide better traveling experience to road users.
- Copyright
- © 2020 The Authors. Published by Atlantis Press SARL.
- Open Access
- This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).
1. INTRODUCTION
In city development, well infrastructure and management of the roads will allow the citizens to travel efficiently from one place to another, especially during peak hours, to improve the traveling experiences and enjoy safety traveling. Designing an intelligent traffic light system (ITLS) that 100% fulfills the city’s requirement is critically hard for governors and stakeholders.
Traffic congestion is a serious issue, not just affecting the citizens, but also reducing the interests of the business activities. Although no statistics are reflecting the economic loss by traffic congestion in Hong Kong, but there are some proofs from the United States and European countries that traffic congestion inferred serious economic loss. In United States, a report released in 2014 [1] that US$124 billion was spent in a year due to traffic congestion. In European Union, traffic congestion costs about 1% of its GDP [2]. It shows that traffic congestion will lead to huge economic loss.
In addition to the economic issue, traffic congestion will damage human health. Although many vehicles are using environmental fuels, for example, liquefied petroleum gas that emits fewer pollutants, some public transport vehicles like buses, trucks and other heavy vehicles are using diesel as the fuel, so nitrogen oxides and large amounts of particulates are emitted. These pollutants are trapped easily in urban because polluted air cannot be dissipated by many tall buildings and high usage of roads. Hence, poor air quality will cause much illness, mainly in the respiratory system. Charpin and Caillaud [3] proved that PM2.5, nitrogen oxides, and related pollutants caused the nasal allergic reaction to people, and ease to aggravate other respiratory diseases like asthma, rhinosinusitis, and middle ear disease. Also, mental illness such as traffic stress syndrome will be induced when people trapped in a narrow area with long traffic queues.
Traffic congestion is common to be seen on roads in Hong Kong. However, compared to other cities, the fixed-cycle traffic light (FCTL) system is currently in use for many years. Without considering the real-time conditions of the road to maintain a suitable traffic arrangement, pedestrians and vehicles are usually in competitive status in using the cross side, so dangerous situations are easy to occur because both of them do not want to wait in a junction. Hsieh and You [4] proposed a scheme by applying an evolutionary algorithm in managing visitor routines to exhibition rooms in the museum. The scheme successfully realized the flow management in the museum to have the best experience for all visitors. Similar to the traffic control, vehicles can be considered as the visitors in entering the exhibition room, and intersections are the exhibition rooms that can perform the best traffic management. In reducing traffic congestion, an ITLS was developed by applying object detection and evolutionary algorithm. Classification and determination of the real-time situations captured on camera set at the junctions were accomplished by object detection. Data were analyzed and then performed a strategic arrangement to the traffic lights by the evolutionary algorithm that aims to reduce the waiting time of vehicles and pedestrians at in intersection to increase efficiency of road usage.
2. LITERATURE REVIEW
2.1. Current Situation of Traffic Signal Control in Hong Kong
2.1.1. Fixed-cycle traffic light system
The system only uses a fixed-cycle time in switching the traffic lights at each junction, which does not consider the real-time condition of the corresponding intersection, such as the number of vehicles and pedestrians at the junction. And it does not take care of their needs, especially the waiting time and pass-through time. Even the government carried out a research project about extending the crossing time for the elderly [5], the results of the on-site trial may not reflect the actual traffic conditions since almost of them are placed in old districts or under-saturated junctions.
2.1.2. Area traffic control system
Area Traffic Control (ATC) system has been applied to Hong Kong since 1977, which is the first computerized adaptive traffic signal control system [6]. The system deployed two different adaptive traffic control technologies, namely, Split Cycle Offset Optimization Technique (SCOOT) and Sydney Coordinated Adaptive Traffic System (SCATS) [7] in which traffic signal was controlled by detecting the number of vehicles and calculating their speed when they passed through the detector loops set on the vehicle lanes. The data are then transferred to the control server to adjust the parameters to the adaptive control algorithm that result to an optimal duration of green lights to release the vehicles, thus reducing traffic congestion. However, the system focuses on management of the vehicles passing through the junction, but sacrifices the benefits of pedestrians that shortened the crossing time for pedestrians which increase the risk for people trying to cross the road when the red light is on pedestrians. Besides, Ref. [7] stated that SCOOT and SCATS cannot provide rapid responses to traffic fluctuations at various intersections.
2.1.3. Smart traffic light system
Smart traffic light system set up for Tai Tam Road (dam section) was developed and implemented by Cheng and his research team at The Chinese University of Hong Kong in the year 2018 [8]. The type of vehicle will be detected by eight sets of cameras installed at the street lamps on Tai Tam Road. It will then calculate the green signal time, according to the data received by all cameras analyzing the traffic queue of each side of the dam and the presence of heavy vehicles in the line resulting into an efficient light arrangement to avoid the traffic congestion at the dam because the design of the dam cannot hold two heavy vehicles like a double-decker bus and fire engine in parallel. This system is a pioneer in Hong Kong applies video analytic technology by real-time traffic data collection to optimize traffic control. It provides much valuable information to other researchers to develop an adaptive traffic control system effectively. On Tai Tam Road (dam section), there is a specific traffic condition, and fewer traffic situations occur due to lack of traffic control systems to perform the signal timing optimization at junctions in urban districts, especially in Central, Mong Kok, and Tsim Sha Tsui in Hong Kong. Based on the available open data, such as street-facing surveillance cameras and navigation applications like the street view function in Google Maps, real-time detecting the number of vehicles and density of pedestrians in waiting or crossing the road at a specific intersection can be realized. This information describes the real-time traffic conditions of road intersections more clearly, which could be a useful resource to drive the development of intelligent traffic signal control for cities.
2.2. Review of Current Technologies
2.2.1. Object detection of machine learning technology
From Ref. [8] that applied object detection to classify the type of vehicle when the vehicle passes through the checkpoints in Tai Tam Road, object detection is applicable in determining the type of object and also locating its position by quoting a bounding box around it. Furthermore, it also presents the information of the detected object in an image once classified [9]. Hence, object detection is well in use for detecting vehicles and pedestrians in the real scenario by setting up cameras at intersections.
2.2.2. Simulation
A simulation is an imitation of a model based on a system in reality. A simulation model can change different parameters, then perform testing for a system that is costly or difficult to be constructed. A simulation model can be used to investigate different states [10].
A simulation environment can be built to show the scenario by using the new traffic light application, comparing with the current FCTL system. Moreover, it can simulate the operations in different traffic conditions by using the new application.
2.3. Review of Existing Solutions
Smith et al. [11] proposed a scalable urban traffic control system in 2013 that monitors the number of vehicles in real-time by installing detectors at intersection by scanning the sensors installed in vehicles. The traffic data are gathered that transferred to traffic control to set up the scheduled scheme then apply to intersections. Chavan et al. [12] proposed an intelligent traffic light controller using an embedded system in 2009. The driver receives route suggestions as a reference to the destination by processing unit, which connecting with analyzing the traffic flow data came from sensors set of intersections. Nie [13] developed an intelligent traffic lights system using object detection to find out the number of vehicles at an intersection by cameras. Then fine-tune the traffic light switching by the results of the traffic density. Although those systems performed well, they gave up other vital elements like the precision that an incorrect vehicle queue was detected by a container truck. Also, they may be costly, especially in Ref. [11], that needs to install an extra component to vehicles which means the system cannot be operated if vehicles pass through the road without installing sensors.
According to the old-styled applications that cannot satisfy the requirements in modern cities, Emami et al. [14] suggested that machine learning technology is a way to solve the problem. Applying to traffic control is increasing the efficiency in processing a large amount of data while data of traffic conditions are sets of images. Furthermore, in using deep learning, more precise information such as the type and speed of the vehicle can be realized. Fuzzy expert systems are introduced by Hawi et al. [15] in 2015 and they stated that the fuzzy logic controller proposed by Khiang et al. by implementing fuzzy logic started by Zadeh [16]. Fahmy [17] presented with another system called FLATSC included waiting time as a criterion in managing four intersection roundabout. Besides, Hawi et al. also showed wireless sensor networks proposed by Yousef et al. [18] in 2010 that the traffic data are shared between intersections to optimize the traffic flow. While fuzzy logic and wireless technologies become famous in solving this type of issue, the fundamental problem has not been resolved. That is, sensors are required to maintain the detection; hence much more costs will be required based on the well-developed traffic network such as Hong Kong. Furthermore, to conduct the data sharing between intersections, and massive power to support the data exchange is also needed.
While performing site testing may not be permitted in Hong Kong, simulation can perform different conditions virtually that will not affect the real traffic, especially in high traffic flow districts. SUMO [19] simulator is applied to generate the actual scenario in Mong Kok. It creates the road map according to the online maps. Then, the traffic flow is made and imported to the simulator. Although SUMO can generate traffic flow very well, it cannot fulfill the needs of this paper. The traffic map cannot be modified once created so that there is a barrier to making a change to the road according to rapid constructions made or new facilities being implemented.
In summary, sensors are frequently used in different solutions in detecting traffic conditions. However, limited data gathering and maintenance of these devices become complicated [13]. In improving traffic control, object detection technology becomes more flexible and more practicable.
3. METHODOLOGY
3.1. Overview of Methodology
This paper applies a build-test methodology for the solution and evaluation design. For the solution design, the system is developed for an intelligent traffic light to control the traffic light signal automatically based on the machine learning with object recognition on the number of vehicles and pedestrians passing through a road intersection in Hong Kong.
For the evaluation design, the simulation demonstrated the comparison between the current FCTL system and the proposed ITLS.
3.2. Design of the Solution
There were five components of the design shown in Figure 1. Videos for different traffic conditions were taken at an intersection. The object detection application analyzed the video footage. The data of video footage analyzed were used for building traffic models. The traffic models were used to simulate the situation so that the current FCTL system and the proposed ITLS were implemented at the intersection. Finally, the simulation displayed traffic models visually.
3.3. Traffic Condition Videos
Videos for different traffic conditions were recorded as sources for the object detection application. Cameras were set at positions in which traffic flow of the intersection can be seen clearly. The footage was used for the object detection applications.
3.4. Object Detection Application
The system applies object detection technology using Tensorflow [20] to analyze the video footage. As shown in Figure 2, the system can recognize the object type appeared in the footage. It can be used to calculate the number of vehicles and pedestrians near an intersection in a specific period of time.
3.5. FCTL Traffic Model
This traffic model simulated the traffic flow of the current FCTL at an intersection. After the simulation, the traffic model generated the average waiting time of the pedestrians and vehicles at an intersection. The data were stored for algorithm development and testing purposes.
3.6. Intelligent Traffic Light Traffic Model
The intersection was simulated with ITLS. The simulation was based on the number of pedestrians and vehicles estimated from the object detection application. The traffic light signal will be switched dynamically due to different traffic conditions. This traffic model aims to improve the efficiency of the traffic lights system currently used in Hong Kong.
3.7. Simulation
The pygame application simulates the above traffic models visually. It used the data on traffic models to build a simulation that visualized the concept of the traffic light system as shown in Figure 3.
There were several features to improve the realistic situation of the traffic model:
The number of pedestrians and vehicles was set according to the output of the object detection application.
The traffic light signal switching method was based on the analyzed data from the video footage.
The road map was drawn according to the actual intersection in Prince Edward in Kowloon, Hong Kong.
The speed of pedestrians and vehicles were simulated to real-life situation. There was also a probability that a person will walk slower than average to simulate the movement of elderly.
Vehicle movement. The vehicle slowed down if it is too close to a vehicle in front of it. The vehicle stopped either the traffic light is red or enforced to stop while a barrier was detected, such as another vehicle or a pedestrian was detected at the front side of it.
There were different types of vehicles at the intersection.
3.8. Detailed Design of Algorithms
The traffic light control algorithms were shown in Figures 4 and 5. Figure 4 shows the algorithm design of the ITLS. Figure 5 shows the current FCTL system used in Hong Kong. The conditions determine the flow of intelligent traffic light switching. The “threshold” in the figure were the parameter thresholds of ITLS. These parameter thresholds determine how the light signals were switched based on different situations.
The parameters thresholds were
carMaxNumAtJunction—The maximum number of vehicles at the junction.
carLightGreenMinTime—The minimum time of a vehicle green signal should last.
carMaxWaitingtimeAtJunction—The maximum waiting time for a vehicle at the junction.
pedMaxNumAtJunction—The maximum number of pedestrians at the junction.
pedLightGreenMinTime—The minimum duration time of the pedestrian green signal.
pedMaxWaitingtimeAtJunction—The maximum waiting time for a pedestrian at the junction.
pedLightFlashLongerTime—The time limit to extend the pedestrian flashing green signal when there are still pedestrians crossing the street.
The default traffic light signal for vehicles and pedestrians was green and red, respectively. When the value of input parameters was higher than the threshold values, the traffic light signals will be triggered to change. There was three seconds for the vehicle traffic light to change from green to yellow, and from yellow to red to let the pedestrians cross the road by switching the red pedestrian light to green.
The cross-time for pedestrians was also based on the parameters. Before the pedestrian traffic light becomes blinking green, the system would keep checking if vehicle queue is less than the threshold or the number of waiting pedestrians are more than the threshold, then the time of green pedestrian traffic light would be extended. If not, the pedestrian traffic light would change to blinking green.
While the green pedestrian traffic light is extended, the system would keep checking if the vehicle queue is more than the threshold, the pedestrian traffic light would then change to blinking green immediately and let the vehicles move quickly.
Evolutionary algorithm is used to find the best set of parameter thresholds for the system to improve the performance of the ITLS.
Before using the evolutionary algorithm, a regression model was built to predict the simulator outcome based on the parameter set. Several simulation runs have generated the average waiting time of pedestrians and vehicles. The simulation data were used for training a regression model to predict the simulation output when the ITLS was implemented with different sets of parameter thresholds.
After the regression model was built, the evolutionary algorithm was used to find the optimal set of parameter thresholds in order to achieve the best fitness with minimum average waiting time of pedestrians and vehicles.
The best parameter set by evolutionary algorithm will be determined by following steps:
Randomly generate a set of parameter thresholds (as stated in Section 3.8) for vehicles and pedestrians as initial values.
Evaluate the fitness by the average waiting time for vehicles and pedestrians using the parameter coefficient. Each coefficient is the weighting factor for the parameter while the value is set in the range according the actual conditions at the junction.
Sum up all partial values of the waiting period of the different pedestrians and vehicles to become the waiting time for vehicles and pedestrians.
Compare the new value with the current best value of the waiting time (fitness), then pick the parameter set with the goal of minimizing the fitness.
Repeat Steps 2 to 4 for various conditions at the junction to perform the suitable fitness.
4. RESULT OF IMPLEMENTATION
The purpose of ITLS was to find a solution to alleviate traffic congestion in Hong Kong. The implementation result of ITLS is presented in this section. It is used to evaluate the performance of ITLS in improving the efficiency of road usage.
To evaluate the model, several traffic condition videos were recorded, including non-peak and peak traffic periods. Each video recorded the traffic condition at the intersection between Prince Edward Road West and Embankment Road in Hong Kong for one hour to perform the simulation.
The results were the comparison between the simulations that are using the ITLS for traffic control and the FCTL system. If the ITLS decreased the waiting time of cars and pedestrians at junctions, the efficiency of road space usage increased. The simulations using ITLS to manage the regular traffic hours were run many times. The results were stated in Sections 4.1 and 4.2.
4.1. Results of Non-peak Traffic Hours
In Hong Kong, non-peak traffic hours are considered as the periods between 10:00 to 17:00 and 20:00 to 07:00 (the next day) in working days.
Table 1 shows the simulation results of 4 test cases with different time slots. By applying the ITLS at non-peak traffic hours, the average waiting time of all road users reduced from around 50 seconds to less than 30 seconds in all cases. It reflected that the efficiency in terms of the throughputs of the road can be increased 44% to over 60% by using ITLS. Test cases 2 and 3 resulted in a lower increment of efficiency because case 2 falls in the lunch hour that there are probably more pedestrians and vehicles on the road. And the time is close to commuter time and cut-off time of trucks for cargoes delivery.
Overall Average Waiting Time (in Seconds) | ||||
---|---|---|---|---|
Case | Time Slot | FCTL | ITLS | Efficiency Gained by ITLS (%) |
1 | 10:30–11:30 | 48 | 21 | 56.25 |
2 | 13:00–14:00 | 47 | 25 | 48.89 |
3 | 16:00–17:00 | 45 | 25 | 44.44 |
4 | 20:30–21:30 | 53 | 20 | 62.26 |
FCTL, fixed-cycle traffic light; ITLS, intelligent traffic light system.
Simulation results on non-peak traffic hours.
4.2. Results of Peak Traffic Hours
Peak hours are the periods between 07:00 to 10:00 and 17:00 to 20:00 in working days.
Table 2 shows the simulation results of 4 peak traffic periods in working days. Since there are many vehicles and pedestrians waiting on the road intersection during peak hours. ITLS greatly reduced the total waiting time of road users. The overall efficiency (in terms of reduction in total waiting time) has been increased 54% to 57% for all four cases. It reflected that the throughput at the intersection has been increased a lot.
Overall Average Waiting Time (in Seconds) | ||||
---|---|---|---|---|
Case | Time Slot | FCTL | ITLS | Efficiency Gained by ITLS (%) |
1 | 07:30–08:30 | 52 | 23 | 55.77 |
2 | 09:00–10:00 | 49 | 21 | 57.14 |
3 | 17:30–18:30 | 48 | 22 | 54.17 |
4 | 19:00–20:00 | 50 | 22 | 56.00 |
FCTL, fixed-cycle traffic light; ITLS, intelligent traffic light system.
Simulation results on peak traffic hours.
From the result generated by the evolutionary algorithm as shown in Figure 6, there was a decreasing trend of the average waiting time for vehicles and pedestrians at the junction after each generation of the evolutionary algorithm. There was a decrease of 44% to over 60% of the total waiting time with the optimal set of parameter thresholds that fulfills the requirements, for both peak and non-peak hours.
4.3. Optimal Set of Parameter Thresholds
With the use of evolutionary algorithm, an optimal set of parameter thresholds was found. The optimal set worked on both peak and non-peak traffic hours. The results showed that even drivers or pedestrians were waiting in peak hours, the waiting period was close to the time in non-peak traffic hours. By the results, the system enhanced the efficiency when crossing the road or traffic light.
By using the optimal set of parameters, the average waiting time of drivers was about 10 seconds, and the average waiting time of pedestrians was approximately 13 seconds in non-peak traffic hours.
The average waiting time of drivers was about 10.81 seconds, and the average waiting time of pedestrians was approximately 14 seconds in peak traffic hours.
According to the results simulated, the optimal set of parameter thresholds were determined as listed in Table 3.
Parameter | Value |
---|---|
Maximum number of vehicles at junction | 12 |
Minimum time a car green signal should last | 21 |
Maximum waiting time for a car at junction | 12 |
Maximum number of pedestrians at junction | 11 |
Minimum time a pedestrian green signal should last | 40 |
Maximum waiting time for a pedestrian at junction | 40 |
Time limit to extend the pedestrian flashing green signal | |
when there are still pedestrians crossing the street | 5 |
Optimal set of parameter thresholds.
5. EVALUATION
5.1. Evaluation of Object Detection Model
The dataset were divided into a training set and a testing set for the evaluation. Intersection over Union (IoU) was applied to determine the accuracy. We referred to the actual bounding box, and the predicted bounding box and calculated the overlapped area of the two bounding boxes. Table 4 shows the related outcomes.
AP | Accuracy (%) |
---|---|
0.5 IoU for vehicle | 56.78 |
0.5 IoU for pedestrian | 15.48 |
AP, average precision; IoU, Intersection over Union.
Average Precision(AP) of vehicle and pedestrian.
The average precision (AP) of the vehicle was 56% and for the pedestrian was 15%. The reason for AP of pedestrians resulting in low accuracy is that both the ground-truth and prediction bounding box are small; therefore, they are challenged to have a high overlapping rate. Also, concerning more on the counting of objects rather than the IoU in implementation. The result meets the expectation for the ITLS with further improvements.
5.2. Evaluation of the Evolutionary Algorithm
The result of the evolutionary algorithm reduces the average waiting time of vehicles and pedestrians.
Figure 6 shows the results of each generation of the evolutionary algorithm. The average waiting time of pedestrians and vehicles were reduced by each generation. The average waiting time by combining the pedestrian and vehicle was about 65.92 seconds in the first generation. It became lower, with approximately 22.84 seconds in the tenth generation. The total average waiting time was reduced by 65% by using evolutionary algorithm in finding the optimal set of parameter thresholds.
The evolutionary algorithm initialized the parent parameter set and then calculated the fitness of average waiting time of pedestrians and vehicles. After that, the process determined the parameter set and calculated the eligibility of the parameter thresholds. When compared the current fitness with the best fitness value, the result optimized the choice of parameter set in each generation. The ITLS applied the optimal set of parameter thresholds to model the traffic conditions in peak hour and non-peak hours in controlling the traffic flow.
6. CONCLUSION
In this paper, the ITLS based on machine learning with object detection and the evolutionary algorithm was presented. An object detection model was built to analyze traffic video footage. It outputted the number of vehicles and pedestrians in the video footage. A simulation was built for the comparison between the ITLS and the current FCTL system. It included features to improve the realism of the simulation. Besides, the evolutionary algorithm was developed to optimize the parameter thresholds and control the best traffic light signal switching method for the ITLS. The average waiting time of the pedestrians and the vehicles was used in finding the optimal set of thresholds by using evolutionary algorithm. With the use of ITLS, it was shown that the efficiency of the road usage has been improved, and hence the congestion problem can be alleviated.
CONFLICT OF INTEREST
No potential conflict of interest was reported by the authors.
AUTHORS' CONTRIBUTIONS
Ng designed and performed the experiments, derived the models and analysed the data. Kwok summarized the results and wrote the manuscript with the consultation of Ng.
Funding Statement
This project does not contain any funding supports.
ACKNOWLEDGMENTS
The authors would like to express our great appreciation to Mr. Yui-Chung Fung, Mr. Chun-Yung So and Mr. Yuen-Ho Lam for collecting data and performing experiments of this research works.
REFERENCES
Cite this article
TY - JOUR AU - Sin-Chun Ng AU - Chok-Pang Kwok PY - 2020 DA - 2020/06/16 TI - An Intelligent Traffic Light System Using Object Detection and Evolutionary Algorithm for Alleviating Traffic Congestion in Hong Kong JO - International Journal of Computational Intelligence Systems SP - 802 EP - 809 VL - 13 IS - 1 SN - 1875-6883 UR - https://doi.org/10.2991/ijcis.d.200522.001 DO - 10.2991/ijcis.d.200522.001 ID - Ng2020 ER -