Identification of distinguishing characteristics of intersections based on statistical analysis and data from video cameras

The article discusses the issues of improving the collection of traffic information using video cameras and the statistical processing of collected data. The aim of the article was to identify the main patterns of traffic at intersections in traffic congestion and to develop an analysis technique to improve traffic management at intersections. In modern conditions, there is a sharp increase in the number of vehicles, which leads to negative consequences, such as an increase in travel time, additional fuel consumption, increased risk of traffic accidents and others. To solve the problem of improving traffic control at intersections, it is necessary to have a reliable information collection system and apply modern effective methods of processing the collected information. The purpose of this article is to determine the most important traffic characteristics that affect the throughput of intersections. As a criterion for the cross-pass ability of the intersection, the actual number of passing cars during the permission signal of the torch light is taken. Using multivariate regression analysis, a model was developed to predict intersection throughput taking into account the most important traffic characteristics. Analysis of the throughput of intersections using the fuzzy logic method confirmed the correctness of the developed model. In addition, based on the results of processing information collected at 20 intersections and including 597 observations, a methodology was developed for determining the similarity of traffic intersections. This allows us to identify homogeneous types of intersections and to develop typical traffic management techniques in the city, instead of individually managing each node of the city’s transport network individually. The results obtained lead to a significant reduction in costs for the organization of rational traffic flows.

respond to traffic incidents and fluctuations in the intensity of traffic. The greatest success in working with real-time video was achieved using the Faster R-CNN [5] and YOLO [6] neural networks. The latest version of YOLO v3 [7] surpasses previous versions due to the high speed and accuracy of detection, location. We used this method in our work as an algorithm for detecting objects, together with the SORT algorithm for their further tracking.
To detect and classify vehicles, the YOLOv3 neural network and the sorting tracker, modified to return an object class, were selected. It was decided to abandon the use of R-CNN, since it requires large computing power. However, YOLOv3 compared with older versions and R-CNN shows a better balance between speed and detection accuracy. The latest version of YOLOv3 surpasses previous versions due to the high accuracy of detection and positioning, and also to some extent overcomes the difficulties of detecting small objects. This method is used in this article as an algorithm for detecting objects, as well as a sorting algorithm for their further tracking. The system is capable of processing more than 25 frames per second with a resolution of 960 × 480. For training the neural network, a dataset of more than 7000 original images was assembled. Using augmentation, the dataset has been enlarged to over 100,000 images. Video was collected from 25 intersections from existing surveillance cameras with different viewing angles. As a result of video processing, an occlusion problem was discovered when a static object in the video, such as a pole or tree, blocks the road. It is not uncommon for some vehicles to block others in the received video stream, which creates significant difficulties in detecting and, accordingly, counting vehicles in the queue for processing images by a neural network. To solve this problem, part of the road before or after the static object was masked. Thus, the visibility of the traffic flow was ensured in all traffic areas. To determine the trajectory of vehicles for cases when any of the zones was not defined, a method was applied based on the determination and calculation of the object's motion vector.
The paper describes in detail the proposed algorithm for collecting data on the queue of vehicles: the number of vehicles in the queue and their classes, the transit time of the stop line and the intersection of the intersection, as well as determining the direction of movement. We analyzed the collected data on the structure of the queue and the time of its unloading and demonstrated their direct relationship. In contrast to the existing analytical approaches, this paper proposes a new practical approach to the analysis of the dependence of the intersection time on the position of the transport in the queue formed in the traffic lane. The system collects data automatically and in real time, that allows us to accumulate an extensive database for further analysis of the effect of the queue structure on the time required to increase the traffic capacity of the intersection.
The SORT (Simple Online Realtime Tracker) [8], which is a simple Hungarian algorithm with a Kalman filter that predicts the position of an object on the next frame, showed real-time capabilities [9,10].
The developed data collection algorithm allows you to obtain the following parameters: the number of vehicles in the queue and their classes, the transit time of the stop line and the intersection of the intersection, as well as determining the direction of movement. The main algorithm is presented in Fig. 1 and consists of several blocks. The "Initialization" block starts by loading a configuration in which all parameters for a specific intersection and neural network parameters are configured. After loading all the configurations, we initialize the video stream, which will allow us to receive frames from the video camera in real time. The next step is to initialize the SORT tracker and the vehicle identification areas, the coordinates for which we took from previously loaded configurations.
The entire intersection is divided into areas (direction areas) to obtain various information about objects. You can study the structure of the markup in detail in Fig. 2.
The algorithm for assigning a queue identifier to each object can be seen in the "Determining queue id" block in Fig. 3.
After the start of movement, objects leave the queue area and fall into one of the direction areas, which are conditionally divided into "input" and "weekend". As a result, we determine where and where the object moves, when it enters the entrance zone, the object is assigned a type and serial number in the queue, the time it takes to cross the stop line and leave the functional area of the intersection is recorded.

Literature review
Currently the calculation and categorization of road transport is an important task, as evidenced by many publications on this subject. Collision avoidance is an important feature of modern systems to ensure timely and reliable warning measures before an imminent collision. In [11], a set of measures was developed and implemented with the interaction of SCANeR and Matlab/Simulink computer programs. The self-tuning methodology of the LiDAR sensor network and its implementation are presented in [12]. Reliability of sensors is one of the most important problems for using IoT data in the automotive and manufacturing sectors [13,14]. Tang et al. in their paper [15] they propose using a convolutional neural network for the direct generation of randomly oriented detection results. Their approach, called Ori-ented_SSD (Single Shot MultiBox Detector, SSD), uses a set of default blocks with different scales at each location on the object map to create bounding detection blocks. Zhang et al. introduced the Chinese traffic sign detection algorithm [16], based on a deep convolution network. To detect Chinese road signs in real time, the authors proposed an end-to-end convolutional network based on YOLOv2. The highest detection rate was 0.017 s per image. You can note the methods of object detection based on regression. For example, the YOLO regression method [17] splits the input image into several grids and predicts a bounding box and reliability directly in each grid. The improved YOLOv2 model [18] uses an anchor cell to provide a compromise between speed and accuracy.
Buch et al. presented a brief overview of intelligent traffic monitoring systems using road cameras [19]. Daigavane and Bajaj [20] developed a background recording and segmentation method using a morphological operator. In this study, a system was developed for the dynamic detection and counting of objects on highways. Chen et al. in their work [21] consider problems associated with uncontrolled image segmentation and object modeling using multimedia inputs to describe the spatial and temporal behavior of an object to monitor traffic. Gupte et al. in their work [22] suggested some algorithms for detecting and classifying vehicles based on monocular images of motion scenes are presented.
A new method for detecting a single RefineDet object is presented in [23]. This method simultaneously optimizes the modules for updating the anchor and object detection, which allows you to effectively detect the object. The paper [24] describes the structural logical network (SIN) and proposes to consider the detection of objects as a problem of displaying the graph structure and obtaining the desired result. To solve the problem of scaling when detecting an object, the paper [25] presents a scalable network for detecting an object based on a dense convolutional network.
Li in [26] proposed processing several adjacent frames to better cope with blur and short-term occlusions. Wang et al. [27] investigated the use of focal loss. Lin et al. in [28] they controlled vehicles and showed that loss of focus provides a significant improvement in performance. Hu et al. [29] focused on increasing the reliability of scaling.
Paper [30] is devoted to statistical university network traffic using self-similarity methods and chaos analysis. In this case, the measurement results are processed by calculating the Hurst index. Assessment of the reliability of the analysis results is given on the basis of statistical methods. Note that reliable results based on chaos methods are difficult to obtain.
In [31], a network traffic model is proposed, in which it is suggested to substantiate the normal operation of the network using the asymptotic distribution of the difference between successive estimates of the model parameters. Experimental results showed that the system is able to detect unusual changes in the characteristics of network traffic. In [32] it is presented a method for detecting anomalies through a neural network with controlled long-term memory (LSTM). The mean, median and M-score are often used in statistical tests for the detection of anomalies [33]. The aim of the study [34] was to model the structure and functioning of a complex information system that takes into account operators and users [35].

Objective and scope
The parameters of pedestrian flows and regulated intersections to varying degrees affect the bandwidth when turning right. Existing methods do not take into account the number of pedestrians, the length of the intersection arc, or the place for markingstop-line and the crosswalk in the adaptive traffic light settings. All these factors, to one degree or another, affect the bandwidth of the lane at an adjustable intersection with movement only to the right. The most common way to solve the increase in throughput is to limit the allowance for pedestrian traffic to the time required to cross the road. This solution is uncomfortable for pedestrians, due to the increase in the waiting time for the enabling signal. Interpretation of big data obtained on the basis of a computer vision of the patterns of drivers and pedestrians, taking into account the geometry of the intersection and the location of the marking lines, allows one to determine the most effective solutions to the problems of increasing the intersection throughput (Fig. 4).
The novelty of the approach presented is the presentation of a correlation between the behavior of pedestrians and drivers of vehicles on the basis of the task of using fuzzy controllers, in order to reduce time losses when crossing intersections.
This study is aimed at collecting, processing and analyzing information about the traffic situation and the movement of vehicles at congested street intersections. The proposed system can calculate and classify vehicles by driving directions with an average percentage error that is less than 10%. A distinctive feature is the consideration of pedestrians crossing the intersections in different directions. Information processing is performed using the SPSS computer program. When processing the information, the characteristic of the traffic flow is as follows: "The actual number of passing cars. " This variable is the dependent one (the last one in Table 1). The independent variables are all the others indicated in Table 1. The purpose of this study in this paper is to develop a methodology that allows us to identify the main factors affecting the throughput of intersections in a congested environment.
Analysis of the results of information processing allows us to do this. In addition, clustering intersections provides a visual representation of the source data. Achieving this goal will allow taking the right steps to improve road and transport logistics. It is important to note that the results obtained make it possible to make predictions about throughput of an intersection under given conditions. Examples of such predictions are given in this work.

Research methodology
The developed system based on trained neural networks uses video images to calculate the speed and orientation of objects that appear on the road scene. The work is focused on the use of a fuzzy logic controller for receiving and processing information for making decisions about the operation of a pedestrian traffic light. In turn, the quantitative Table 1 Variable  The actual number of passing cars one unit and qualitative characteristics of the movement of vehicles has a place of marking the "stop line" of the intersected pedestrian crossing and the length of the rounded turn.
The system detects the presence of vehicles by means of object recognition and determines dynamic windows in the pedestrian flow sufficient for the passage of transport.
The accumulation of such data makes it possible to obtain a powerful tool for adapting the work of traffic lights to meet the interests of pedestrian and automobile traffic. The proposed approach is a more comfortable and safer way to organize pedestrian traffic while maintaining the capacity of the regulated intersection.
The research methodology in this paper includes the selection of variables for which data is collected, the method of data collection, the use of statistical methods for processing the collected information, and the interpretation of the results obtained.
A free window means the time sufficient for the passage of transport when pedestrians are not present at the pedestrian crossing and do not interfere with traffic on the lane with permitted traffic only to the right. The first free window-when transport begins to move on the allowing signal of the traffic light at turn to the right, pedestrians are absent. The second open window is when pedestrians leave the intersected lane, with the permitted traffic only to the right, at the pedestrian crossing on the allowing signal of the traffic light and release it for the passage of transport.
A crossroad is the place of intersection, junction, or fork of roads at the same level, limited by imaginary lines connecting the opposite, farthest from the center of the intersection, the beginning of curvature of the carriageway. The geometry of the intersection, especially the length of the arc when turning right and the place of marking (stop lines, crosswalks), largely determines its throughput. Pedestrian exit times and the start of vehicles at regulated intersections are usually the same. This does not take into account the time during which the vehicle travels from the stop line to the pedestrian crossing and the parameters of pedestrian traffic. Studies have shown that pedestrian and car traffic are heterogeneous at different intersections. In our investigation it was tried to establish the effect of the length of the arc, the location of the marking and the parameters of pedestrian traffic on the traffic capacity of the intersection. L1 is the distance from the stop line to the border of the intersection with the conflicting direction, m; L2 is the curvature of the carriageway when turning right, m; and L3 is the distance from the end point of the curvature of the carriageway (intersection border) to the pedestrian crossing when turning right, m.

Statistical methods
In our paper, they were widely used the statistical methods for processing and analyzing information obtained from road sensory surveillance cameras for road situations at intersections. These methods characterize the quantitative laws of transport flows in close connection with their qualitative content.
The problems of statistics in our study are most closely related to real life and are associated with the detection of trend characteristics of road traffic at intersections under traffic congestion conditions. In this paper they were used such modern statistical analysis methods as: multiple regression analysis and methods of multidimensional scaling, and others.
The use of statistical methods in our work is due to our desire to show that in the study of traffic flows it is important not only to collect data from video cameras quickly and accurately, but also to be able to process the collected information using appropriate statistical methods. Today, given the wide distribution of high-performance sensor systems, the collection of information does not present significant difficulties. The foreground is the ability to process the received information properly. It was processed the information using the SPSS (Statistical Package for Social Sciences) computer program. The use of statistical data contributes to familiarization of specialists in transport logistics with the situation on the roads, provides adaptation to changing conditions and making the right management decisions.

Multiple linear regression
In this section, it will be carried out statistical processing of the data obtained from the multi-touch video surveillance systems in conditions of traffic congestion. The processing is carried out using the computer program SPSS. The applied statistical methods include multidimensional regression.
Multiple regression analysis allows us to select from the totality of the initial variables those that have the most significant impact on the throughput of intersections under traffic congestion conditions. In addition, this analysis makes it possible to rank the selected variables according to the degree of their influence on the throughput of intersections and to quantify the degree of this influence. The multiple regression, constructed as a result of the analysis, makes it possible to predict the throughput of the intersection in terms of specific values of its initial characteristics. It is very important from a practical point of view.
As the dependent variable, it is taken "The actual number of passing cars, " since this variable is the criterion of the intersection capacity. The remaining variables from Table 1 are taken as independent ones. For the analysis in the package of statistical computer programs SPSS, it is chosen the option "Multiple linear regression analysis".
The coefficient of multiple correlation R (Table 2) reflects the connection of the dependent variable "The actual number of passing cars" with a set of the independent variables and is equal to 0.958. It is found that the adjusted R 2 of our model is 0.409 with the coefficient of multiple determination R 2 = 0.902. This means that the linear regression explains 90.2% of the variance in the data, which is a very good result. The Durbin-Watson d = 1.533, which is between the two critical values of 1.5 < d < 2.5. It can be assumed that there is no first order linear autocorrelation in our multiple linear regression data.
In Table 3 we present the results of the multidimensional regression. The standardized regression coefficients (Table 3) allow us to identify the most significant independent variables (factors) that affect the actual number of passing cars. From the table it follows that the variable Duration of the resolving signal of a traffic light has the greatest effect on the dependent variable. Further, in a descending order, the variables follow such as: Sampling for the maximum possible number of vehicles driving without pedestrians, L2-the curvature of the carriageway when turning right, t4-time of leaving the 1st vehicle of the pedestrian crossing, taking into account the distance of 1 m to the pedestrian crossing and its release, Number of vehicles driven in the 2nd window, etc. By the ratio of the corresponding standardized coefficients, one can judge the strength of this influence of one variable compared to another. In addition, the constructed regression allows us to make predictions for the dependent variable. For example, suppose that there is the following set of values for the inde-

Fuzzy logic method
In the previous sections it was noted that The actual number of passing cars (Output) is taken as the dependent variable. In our studies, it varies from 0 to 20. As shown by multiple regression analysis, the dependent variable is most affected by the independent variable Duration of the resolving signal of a traffic light (Input1), which varies from 16 to 60. Then the independent variables go Sampling for the maximum possible number of vehicles driving without pedestrians (Input2) ranging from 0 to 30 and L2-the curvature of the carriageway when turning right (Input3) ranging from 7 to 40. The obtained results make it possible to construct a model based on fuzzy mathematical method and fuzzy TECH computer program for predicting the values of the dependent variable Output depending on the values of the independent variables Input1, Input2, Input3. The block diagram of the constructed model is shown in Fig. 5.
For the independent variables Input1, Input2, Input3 number of terms is taken equal to 3 (low, medium, high). For the dependent variable, Output number of terms is set to 5 (very low, low, medium, high, very high). The distribution of the values of the independent variable Input1 is shown in Fig. 6a. Similar distribution of values takes place for the independent variables Input2 and Input3. For the dependent variable Output, the distribution of values is shown in Fig. 6b.
By setting the relationship among the dependent and independent variables using the Speadsheet rule editor block (Fig. 7), the fuzzy logic model for predicting the values of the dependent variable was developed.
For example, if there are the values Input1 = 49, Input2 = 22, Input3 = 15, then the value of the dependent variable will be Output = 13.5 (Fig. 8). Note that when we performed multiple regression analysis with the same values of independent variables Duration of the resolving signal of a traffic light (Input1), Sampling for the maximum possible number of vehicles driving without pedestrians (Input2) and L2-the curvature of the carriageway when turning right (Input3), we got that The actual number of passing cars (Output) was equal to 13. As you can see, the results are very close and the difference in the results does not exceed 5 percent. Figure 9 shows a three-dimensional graph of the function Output (Input1, Input2). Similarly, it is possible to get graphs of the functions Output (Input1, Input3) (Fig. 10) and Output (Input2, Input3) (Fig. 11). Using the constructed surfaces, one can also make predictions for the values of the dependent variable Output.

Methodology for the analysis of similarities/differences for many intersections of the transport road system of Chelyabinsk (Russia)
The studies were conducted on the basis of data obtained for 20 the most important intersections of the city of Chelyabinsk. A total of 597 observations were made, which indicates the representativeness of the sample. The data received for the study from video cameras are presented in the Table 4. The research methodology is as follows: 1. Check the difference/similarity of the time taken by vehicles for 20 intersections. 2. Group intersections into homogeneous groups. 3. All results and conclusions are confirmed by levels of statistical reliability. In the source data, we deleted observations with vehicles that are typical outliers. We also remove part of the data in the observations that are absent in essence of the "queue structure".
To conduct a preliminary comparison of 6 intersections, the average time values of 4 parameters for vehicles were calculated:  The calculated values of the selected variables are presented in the Table 5. Figure 12 gives the graphical representation of the calculated values. Visually, there is a visible high consistency in the intersection by vehicles of a multitude of analyzed intersections. This is confirmed by a statistical analysis of the relationships between the observed time values, showing the statistical reliability of high correlations even at a significance level of 0.01 ( Table 6).
The comparison of the intersections themselves by the average times of their passage by vehicles is presented below on the graph (Fig. 13). Here, the grouping of intersections by the nature of their passage by vehicles is explicitly visible, which is the purpose of further research. For statistical confirmation of the reliability of the results of the study on the similarities-differences of the selected twenty intersections, we use a non-parametric research method-"Friedman's test" with an additional check of data consistency-"Kendall's W-test of consistency".
(1) According to the Friedman criterion, it follows: there is a statistically significant difference among the intersections in terms of their transit time by vehicles at a level of less than 0.001 (Table 7). (2) According to the W-Kendall criterion, the Kendall concordance coefficient is understood as the multiple correlation coefficient (determination coefficient) between the 4 parameters of the crossing time of vehicles (Table 8). This value (0.95) refers to the level of "very high" correlation. Therefore, in the source data there is a high level of the same nature of the passage of intersections by vehicles.
Based on the results of the analysis, we can draw conclusions regarding the difference/ similarity of intersections: (1) the nature of the intersection of the same type; (2) the difference in the travel time of vehicles at various intersections is significant.
Therefore, further research is needed to identify homogeneous intersection groups (by the nature of their passage by vehicles).
We use the Cluster Analysis method with the settings: • measures of the distance between objects−the square of the Euclidean distance; • measures of distance between clusters−Ward's method.
The further analysis of the difference between the groups is carried out for these three groups. Comparison of clusters is carried out according to the method of "Comparison of means". The results are presented in Table 9. The calculation results demonstrate the following. The significance of differences in the passage of the intersections of the selected three groups is manifested for all four fixed time parameters (at a level of less than 0.001). This confirms the legitimacy of the division of the studied intersections into three groups.
The amount of information taken in real time from street video cameras is very large, and it is difficult for statistical methods of information considered in the article to handle the processing of such initial volumes. However, the proposed algorithms for statistical analysis provide for the presence of an implicit "virtual" block that displays the input stream of numerical information in the on-line mode and assumes a non-automated way to obtain it. Moreover, the amount of such information used for the statistical processing methods indicated in the article has a minimum sufficient level that cannot be compared with the flow of information received on-line from street video cameras. On such volumes of input data, such as in the Table 5 of this paper, statistical methods provide the required level of reliability of the analysis results.

Results
Based on a large amount of information about the movement of vehicles at intersections obtained from video cameras, various methods of statistical processing were performed. Multiple regression analysis revealed the most important intersection characteristics that determine their traffic capacity. The model developed by the fuzzy logic method confirmed the correctness of the results. The research performed in the article allows one to obtain forecasts for the traffic capacity of intersections taking into account traffic flow parameters. The parameters of intersections and traffic affecting the throughput of intersections include the following: "The duration of the traffic light permits the greatest influence on the dependent variable"; "Sampling for the maximum possible number of cars traveling without pedestrians"; "Curvature of the roadway when turning right"; "The time of exit of the 1st vehicle from the pedestrian crossing, taking into account the distance of 1 m to the pedestrian crossing and its release"; and "Number of vehicles driven in the second window. " The new results have been obtained to identify the most significant factors affecting the throughput of intersections. This, in turn, allows for the management of traffic flows in the most optimal way, and to make forecasts of possible traffic stresses. The cluster and correlation methods carried out in the study revealed the similarities/ differences of intersections. The similarity of travel times of different intersections on vehicles is confirmed by a high level of statistical reliability. Three internally homogeneous intersection groups have been identified that differ from each other. The difference between the identified three groups of intersections is provided by four experimentally fixed time parameters with a high level of statistical reliability.

Discussion
This article discusses the developed system of collecting information from video cameras to track traffic at intersections. The most important task, therefore, is to analyze video information in real time. The solution to this problem allows you to quickly respond to changes in road conditions by the criterion of the highest traffic capacity of intersections. As described in this paper, the most effectively posed problem can be solved using Faster R-CNN and YOLO neural networks. The latest version of YOLOv3 works the best. This version, unlike previous ones, is characterized by high speed and accuracy of determining vehicles. Therefore, we used this method in our investigation as an algorithm for detecting objects together with the SORT algorithm. For the detection and classification of vehicles, the neural network YOLOv3 was chosen. In our paper we abandoned the use of R-CNN, since it requires large computing power. While YOLOv3 compared with older versions and R-CNN shows a better balance between speed and detection accuracy. The latest version of YOLOv3 is highly accurate in detecting and positioning objects, and also overcomes the difficulties of detecting small objects. This method is used in this article as an algorithm for detecting objects, as well as a sorting algorithm for their further tracking.
In contrast to the existing analytical approaches, this article proposes a new practical approach to the analysis of the dependence of the intersection time on the position of the transport in the queue formed in the traffic lane. The system collects data automatically and in real time, which will allow us to accumulate an extensive database for further analysis of the effect of the queue structure on the time required to increase the traffic capacity of the intersection.
To explain the principles of this algorithm, the paper provides some block diagrams that allow you to have a more accurate description of the functioning of this algorithm.

Conclusion
In the paper, studies are carried out on the basis of new data obtained for the 20 most important intersections of the city of Chelyabinsk. A total of 597 observations were made, which indicates the representativeness of the sample.
The statistical analysis of the collected information made it possible to identify the most important characteristics of the intersections that affect their throughput under traffic congestion conditions. They are the following: • Duration of the resolving signal of a traffic light has the greatest effect on the dependent variable. • Sampling for the maximum possible number of vehicles driving without pedestrians.
• The curvature of the carriageway when turning right. • Time of leaving the 1st vehicle of the pedestrian crossing, taking into account the distance of 1 m to the pedestrian crossing and its release. • Number of vehicles driven in the 2nd window.
An analysis of the results of the regression analysis made it possible to develop a model of vehicle traffic at intersections based on the methods of fuzzy mathematical logic and the corresponding computer program. The developed model allows you to make forecasts of the throughput of intersections, depending on their initial parameters. Besides, this analysis allows you to provide the implementation of segmentation of the intersections by initial characteristics and visualization of the results obtained. Studies have shown that by obtaining data on the patterns of drivers and pedestrians at a particular intersection, it is possible to reduce the waiting time for a traffic light signal for pedestrians by up to 30% compared to conventional adaptive systems.
The identification of homogeneous intersection groups in the transport network of the city of Chelyabinsk allows us to develop a small set of standard methods for organizing and managing the traffic light network of the city-based on the similarity of road intersections. This leads to a reduction in costs in relation to the individual autonomous control of each node of the transport network of the city.