The Schréder lighting and beyond lighting solutions bring meaningful moments to people by enhancing safety, well-being and sustainability in public spaces.
An Insight into Traffic Analysis with Computer Vision
WHITE PAPER
Table of contents
Abstract
•
Introduction
•
Methods
•
Results and Discussion
•
Observations Conclusion References
•
•
•
Supporting Information
•
2
3
Abstract
connected urban infrastructure that will serve as the backbone for the implementation of enabling technologies and equipment for the transition to a smart city. Three demonstration pilots were installed in the municipalities of Cascais, Loures, and Oeiras, covering 9 intersections. The results show that this solution is suitable for traffic monitoring and will be a source of information for future projects in the studied locations.
According to the United Nations, 68% of the world’s population will live in urban areas by 2050 . This will have a major impact on the way cities will have to plan and run public spaces. Understanding traffic flow insights will be key to optimise mobility in those public spaces. In this project, urban lighting infrastructure was used to test a solution for measuring traffic flow at key intersections. An AI-powered edge computing device was used and installed in public light poles. These devices feature two vision sensors that are used for multiple traffic applications. This project aims to develop a new paradigm of localisable, interoperable, cyber-secure, resilient, distributed, autonomous,
3 pilots
projects
9 intersections
30 days
of data
4
According to the United Nations, 68% of the world’s population will live in urban areas by 2050. This will have a major impact on the way cities will have to plan and run public spaces. Understanding traffic flow insights will be key to optimise mobility in those public spaces. In this project, urban lighting infrastructure was used to test a solution for measuring traffic flow at key intersections. An AI- powered edge computing device was used and installed in public light poles. These devices feature two vision sensors that are used for multiple traffic applications. This project aims to develop a new paradigm of localisable, interoperable, cyber- secure, resilient, distributed, autonomous, and connected urban infrastructure that will serve as the backbone for the implementation of enabling technologies and equipment for the transition to a smart city. Three demonstration pilots were installed in the municipalities of Cascais, Loures, and Oeiras, covering 9 intersections. The results show that this solution is suitable for traffic monitoring and will be a source of information for future projects in the studied locations.
Introduction
The United Nations predicts that by 2050, urban areas will be home to 68% of the global population [1] . This will affect how cities will have to organise and manage public spaces, as they accommodate distinct traits of human behaviour, such as, play, social interaction, creativity, economic activities, and entertainment. When planning for new areas, many sustainable development principles can be readily implemented as information is available to make informed decisions. However, this is more challenging in historic and consolidated areas. In urban contexts, public space plays a key role in making cities liveable. Public space is not easy to define and has very different features and elements, depending on cultural and geographical contexts. Public space is any accessible place that brings people together on a public basis. It includes public squares, market places, monuments, parks, public beaches, riverbanks as well as pavements and streets.It is not enough for a city to provide sufficient space for public use; it must also ensure that the space is well-maintained and managed so that it can serve its purpose effectively.
This raises further questions about the quality of the public space, such as how to make it safe and accessible to all users, and how to finance the costs of creating and maintaining such spaces. Cities will use new technologies and innovation to deal with current and future problems in areas like transport and mobility or citizen engagement making them digital (or "smart"). Cities will also need to become more connected to make timely use of high- quality data to improve urban management and take quick corrective action to mitigate conflicts in urban spaces [2] . One of the main challenges facing smart cities is how to manage traffic congestion and improve mobility for their citizens. Traffic affects not only the efficiency and productivity of urban life, but also the environment, health, and safety of people. Therefore, it is crucial for smart cities to monitor and optimise traffic flow using innovative solutions based on data and technology. In this research, we developed a prototype specifically designed for smart city applications. This prototype, hosted in the public lighting infrastructure, measured traffic flow at key intersections of three municipalities in the Lisbon metropolitan area.
5
Methods
The traffic solution was tested in three different municipalities: Cascais, Loures, and Oeiras. Nine locations were identified (L1- L9) with a total of seventeen vision sensors deployed in the public lighting infrastructure (see Figure S1 in the Supporting Information section). With the objective of measuring the total traffic flow, three locations have power available 24 hours a day (L1-3) and correspond to key intersections where high traffic flow and conflicts are expected, especially during rush hours. The other locations, L4-9, only have energy available during the night (powered by switched grids) and correspond to individual roads. These locations correspond to residential areas – or accesses to residential areas – where the goal was to identify moments of potential excess noise pollution.
Data was collected over two months (April and May) with random interruptions due to unexpected down time of the devices. Nevertheless, approximately 30 days of data was collected per device. The vision sensors were connected to Jetson Xavier NX devices running Jetpack 5.0.2 GA with all software deployed and managed via docker containers. Inferencing is performed by a modified version of the YOLO-v7 model [3, 4] that was adapted for improved performance when fed with the top-down video streams, typical when sensors are deployed on lighting poles. The Deep SORT algorithm [5] was used to track objects detected by the vision model. These objects are then counted when they cross a barrier configured for each camera perspective. For this purpose, we consider the sum of all vehicles (cars, buses, trucks, motorbikes, and bicycles).
6
DATA ANALYSIS All data analyses were performed using Python 3, processing blocks of one hour and, as we have sparse data in some cases, median values were used. Rush hours were defined using data from Tuesday, Wednesday and Thursday and are defined as:
• Morning period: from 7 am to 9 am • Afternoon period: from 4 pm to 7 pm. For the devices powered only at night: • Early night period: from 9 pm to 11 pm • Night period: from 2 am to 4 am • Early morning period: from 5 am to 6 am.
7
Methods Results and Discussion
With the solution deployed in the field, anonymised detection data was collected at the above locations whenever the devices were powered. This meant full days for the devices in locations L1 to L3, as they are on a permanent grid, and around 10 hours per day for the devices in locations L4 to L9, as they are on a switched grid tied to the public lighting schedule. Our approach to evaluate traffic counting was done by calculating median values per hour per weekday (Figure 1 and S2). Observations In terms of image quality, a first observation is that the reduced visibility at night did not affect the viability of the solution. It did degrade the quality of the camera’s video stream, producing video frames with much more noise than during the day, but still allowing for detections to be made. This image degradation was better or worse depending on the lighting conditions at each location, with locations with High-Intensity Discharge (HID) lamps, especially sodium-based ones (both HPS and LPS) produced the most degraded streams. Before diving into the details of the results, we observed some general trends that, although expected, should be mentioned.
1. 2. 3.
There is a significant reduction in traffic volume during nighttime hours, a trend that aligns with expectations for residential zones and their access roads, such as those under study.
There is less traffic at weekends and during holidays. This difference is smaller than that observed between day and night, but the trend is clear.
Rush hour traffic is very common in cities and their suburbs and is quite noticeable in the data collected at all locations. Data shows a peak in traffic for a period in the morning (from 7 am to 9 am) and in the afternoon (from 4 pm to 7 pm).
8
Comparing Locations The comparison of the traffic flow in different locations is a good source of information to understand the quality of our results and to highlight the different behaviour of traffic in different scenarios. Considering locations L1 to L3, we have:age degradation was better • L1 is a national road that connects to the main accesses to and from the Lisbon metropolitan area, and as such is expected to have the highest traffic volume. • L2 is a national/large road that is expected to have a high volume of traffic, although less than in L1. • L3 is a residential area and should therefore have the lowest traffic volumes. This difference in the scenarios is observed in our results, which also validates the expectations as follows: • L1 and L2 show traffic volume peaks in the order of 600 to 1000 vehicles per hour, while in L3, the traffic volume peaks only exceed 500 for barrier B3.3, and are around 200 to 300 for all the others.
• Between, L1 and L2, the difference between high and low traffic volumes is also observed: barriers in L1, and barriers B2.1 and B2.3 have much higher traffic volumes than barrier B2.2, since this latter is already a tertiary road within a residential area. • The overall higher volumes are observed for L1. The residential area (L3), which includes a roundabout with four exits and a small intersection, is further detailed. The patterns observed here are heterogeneous between the barriers, as we are monitoring several relatively small streets with heavy traffic. In addition, the camera perspectives are also heterogeneous for this location, which could affect the results obtained (the evaluation of this effect is beyond the scope of this work). There are, however, some interesting details, that further support the quality of this solution. For example, at barrier B3.2 an abnormal peak towards the north is observed on Saturdays. This peak is similar to the values observed during rush hour, although a little later (the peak lasts until 11am) which probably corresponds to cars going to the shopping centre that is located a few meters north of the roundabout.
Figure 1. .Colour code representation of median values of traffic per hour for all weekdays (‘hol’ stands for national holidays and ‘bri’ for days between holidays and weekends). Colour code goes from blue (less cars) to green and red (more cars).
9
Rush hour Rush hour traffic is visible, in the morning and afternoon of weekdays, for all the barriers, as indicated by the red zones in the heatmaps (Figure S2). This effect is more evident on Tuesdays, Wednesdays and Thursdays probably because people commute from their homes, which are closer to their workplaces as opposed to Mondays and Fridays, which, being closer to the weekend, allow people to travel to/from different places and/or at different times (e.g. beach/ country house).
The heatmap data also shows that rush hour traffic tends to change from morning to afternoon at the same location, but in the opposite direction. For example, for B1.1 North the red heatmap cells are in the afternoon whereas for South they are observed in the morning. From these results, the specific rush hour traffic observed was calculated by taking the median number of vehicles per hour for both the morning (7 am to 9 am) and afternoon (4 pm to 7 pm) periods (Figure 2-Figure 4).
AFTERNOON
MORNING
Figure 2. Comparison between morning and afternoon traffic during rush hours for location L1. Barrier names and median traffic counting per hour for each direction are depicted in the pictures.
As mentioned, L1 is a large road with a lot of traffic with significant differences between morning and afternoon (Figure 2). In the morning, most of the vehicles in both barriers are heading south. This tendency is partially reversed in the afternoon.
For B1.2 there are more vehicles going north, whereas for B1.1, this is not observed, but there is a decrease in the vehicles going south and an increase in the other direction. These observations confirm that we have captured the rush hour effect and that this is an area with high traffic volumes that are maintained beyond 7 pm.
MORNING
AFTERNOON
10
Figure 3. Comparison between morning and afternoon traffic during rush hours for location L2. Barrier names and median traffic counting per hour for each direction are depicted in the pictures.
L2 is also a location with high traffic volume, but it is adjacent to a residential area. For these reasons, the rush hour trend (Figure 3) is similar to that observed for L1 (the trend is reversed between morning and afternoon). However, since B2.2 is already in a residential area, it shows much less traffic than the other two and the inversion is not evident in this case, suggesting that it is mainly residents who use this route. Interestingly, there is a very large difference between the counts going north on B2.3 and B2.1 (587 -> 316 in the morning and 998 -> 281 in the afternoon), indicating that most cars are turning west at this intersection. The same applies to the counts going south, which are much higher on B2.3 than on B2.1, suggesting that some of these cars may be coming from the west.
The residential area (L3) also shows the same rush hour inversion for most of the barriers (Figure 4). However, this effect is not so evident as in the first two locations, probably for the same reasons mentioned above (heterogeneous intersection types and camera angles). In these areas, especially during rush hours, people tend to try different (and unexpected) routes to avoid congestion, most likely using different options in the morning and afternoon. Despite the higher complexity of this location, there are some observations that are consistent with expected behaviour, such as B3.3 in the morning shows much more traffic going south (away from the residential area), and B3.5 in the afternoon shows much more traffic going north (coming back from work).
Figure 4. Comparison between morning and afternoon traffic during rush hours for location L3. Barrier names and median traffic counting per hour for each direction are depicted in the pictures.
11
Noise pollution during the night
According to the Environmental Noise Directive, environmental noise is defined as unwanted or harmful sound derived from human activity, including noise emitted by means of transport-road, rail and air traffic, and from sites of industrial activity (Directive 2002/49/EC 2002). This directive identifies road traffic noise as the predominant source of day-evening-night noise [6]. For locations L4 to L9, where devices were only powered during the night (in accordance with public lighting schedules), the traffic volume was compared between three defined periods (see Table 1): • Early night period: from 9 pm to 11 pm • Night period: from 2 am to 4 am • Early morning period: from 5 am to 6 am. The number of vehicles follows the expected trend, with more vehicles observed during the early hours of the night compared to the night and early morning periods. The values obtained for the early morning periods are smaller than those obtained during the night, suggesting that a higher volume of traffic starts after 7 am. The only location where this is not observed is L9, however the numbers are too small, and the difference is not significant (2 -> 5). The magnitude of the computed values is also as expected; locations L4 to L6 have higher traffic volumes, as they are all close to entry points to the city. On the other hand, the numbers for locations L7 to L9 are much lower, as they are closer to residential areas. This suggests that within residential areas, traffic noise is not a problem and residents can enjoy a peaceful and quiet night. It is worth noting that for L7, the poor lighting conditions (old sodium vapour lamps) affect the results and may explain the very low numbers observed for this location).
Location Early night Night
Early morning
L4
436
48
15
L5
254
14
4
L6
178
11
3
L7
20
2
2
L8
6
4
2
L9 5 Table 1. Median traffic counting per hour for locations L4-L9 for early night, night, and early morning. 34 2
12
Conclusion
In conclusion, this work presents a successful implementation of an AI-powered edge computing device for measuring traffic flow at key intersections based on vision sensors. The solution was tested in three municipalities, covering nine intersections and the results show that it is suitable for traffic monitoring. The data collected can be used as a source of information for future projects in the studied locations. The solution was able to capture the impact of rush hour traffic and provide valuable insights into traffic flow patterns. In addition, the solution was able to retrieve meaningful data during both day and night, demonstrating its feasibility. Overall, this project represents a step towards the development of a new paradigm of connected urban infrastructure for the implementation of smart city technologies.
André GlÓria Research Scientist Schréder Hyperion
Diogo Vila Viçosa Data Scientist Schréder Hyperion
With the participation of: Alexandre Bento, Lourenço Bandeira, Michael Steurer and Helmut Schröder
13
References
[1] United Nations, Department of Economic and Social Affairs, Population Division (2019). World Urbanization Prospects: The 2018 Revision (ST/ESA/SER.A/420). New York: United Nations. [2] “Smart cities: background paper,” UK Department for Business, Innovation & Skills, Tech. Rep., 2013. [3] M. Goulão, L. Bandeira, B. Martins, et al. Training environmental sound classification models for real-world deployment in edge devices. Discov Appl Sci 6, 166 (2024). https:// doi.org/10.1007/s42452-024-05803-7 [4] J. P. Novo, M. Goulão, L. Bandeira, et al. Augmentation-Based Approaches for Overcoming Low Visibility in Street Object Detection. 2023 International Conference on Machine Learning and Applications (ICMLA), Jacksonville, FL, USA (2023), pp. 1943-1948, https://doi.org/10.1109/ICMLA58977.2023.00294. [5] N. Wojke, A. Bewley, D. Paulus. (2017). Simple Online and Realtime Tracking with a Deep Association Metric. https://arxiv.org/abs/1703.07402 [6] A. Arregi, O. Vegas, A. Lertxundi, et al. Road traffic noise exposure and its impact on health: evidence from animal and human studies—chronic stress, inflammation, and oxidative stress as key components of the complex downstream pathway underlying noise-induced non-auditory health effects. Environ Sci Pollut Res 31, 46820–46839 (2024). https://doi.org/10.1007/s11356-024-33973-9
14
Supporting information
Locations
Fig S1. Satellite (google maps) view of location L1. Magenta bars represent the places where the traffic flow was measured.
Fig S1. (cont) Location L2.
Fig S1. (cont) Location L3.
15
Fig S1. (cont) Location L4.
Fig S1. (cont) Location L8.
Fig S1. (cont) Location L5.
Fig S1. (cont) Location L5.
Fig S1. (cont) Location L9.
Fig S1. (cont) Location L6.
Fig S1. (cont) Location L7.
16
Traffic Charts Per Barrier
Fig S2. Colour code representation of median values of traffic per hour for all weekdays (‘hol’ stands for national holidays and ‘bri’ for days between holidays and weekends). Colour code goes from blue (less cars) to green and red (more cars). The colour scale changes for each location (since the counting change as well). Barrier code and direction are indicated in the title.
Fig S2. (cont)
17
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
18
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
19
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
20
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
21
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
22
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
23
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
Fig S2. (cont)
24
Fig S2. (cont)
www.schreder.com
Copyright ©Schréder S.A. 2024
Page 1 Page 2 Page 3 Page 4 Page 5 Page 6 Page 7 Page 8 Page 9 Page 10 Page 11 Page 12 Page 13 Page 14 Page 15 Page 16 Page 17 Page 18 Page 19 Page 20 Page 21 Page 22 Page 23 Page 24 Page 25Powered by FlippingBook