Pedestrian Flow Prediction in Open Public Places Using Graph Convolutional Network

: Open public places, such as pedestrian streets, parks, and squares, are vulnerable when the pedestrians thronged into the sidewalks. The crowd count changes dynamically over time with various external factors, such as surroundings, weekends, and peak hours, so it is essential to predict the accurate and timely crowd count. To address this issue, this study introduces graph convolutional network (GCN), a network-based model, to predict the crowd ﬂow in a walking street. Compared with other grid-based methods, the model is capable of directly processing road network graphs. Experiments show the GCN model and its extension STGCN consistently and signiﬁcantly outperform other ﬁve baseline models, namely HA, ARIMA, SVM, CNN and LSTM, in terms of RMSE , MAE and R 2 . Considering the computation efﬁciency, the standard GCN model was selected to predict the crowd. The results showed that the model obtains superior performances with higher prediction precision on weekends and peak hours, of which R 2 are above 0.9, indicating the GCN model can capture the pedestrian features in the road network effectively, especially during the periods with massive crowds. The results will provide practical references for city managers to alleviate road congestion and help pedestrians make smarter planning and save travel time.


Introduction
With the ever-enriching city lives, open public places, such as pedestrian streets, commercial streets, parks, and squares, have gradually become an important part of people's lives [1]. These open places, without definite space boundary, are likely to cause overcrowding with the inrush of massive pedestrians in a short period, which could arise evacuation problems, leading to the occurrence of stampedes [2,3]. In stampedes, a huge crowd obstructs each other and people are crushed by the shock waves building up in the crowd, which may incur clogging effects at bottlenecks. The people who lose their balance and fall down become obstacles for others, which can produce piles of fallen people [4]. Therefore, it is a great concern to understand the dynamics of pedestrian flow in open public places. It can not only help city managers implement prevention strategies to alleviate road congestion, but also provide useful information for travelers to choose appropriate travel routes and improve travel efficiency.
The definition of pedestrian flow prediction can be considered as follows. Given a sequence of observed flow data in the road network, the task is to predict the pedestrian flow in the next moments [5][6][7][8]. The pedestrian can be affected by miscellaneous factors which pose great challenges to pedestrian prediction [9,10]. From the temporal dependencies, the crowd flow always repeats over time, such as weekends and weekdays and the rush ISPRS Int. J. Geo-Inf. 2021, 10, 455 2 of 21 hours in the day. Concerning the spatial dependencies, the flow in a region is similar and relevant with its neighborhood rather than the far regions. Besides, the weather condition has an influence on the pedestrian features [11].
There are three kinds of forecasting methods in existing research, namely traditional statistical model, machine learning-based model and deep learning-base model. In the early stages, classic forecasting approaches were mainly based on the assumption of linearity and stationarity to infer future pedestrian trends [12][13][14][15][16]. The models consider the dynamic change of historical data and extract the crowd features for the prediction task, and require large efforts on parameter inference, which may result in lower prediction accuracy and efficiency. Serval non-linear prediction models in the artificial intelligence field, such as Gaussian maximum likelihood model [17], Bayesian networks [18], decision trees [19,20], support vector machines (SVM) [21,22] and neural networks [23][24][25][26], have shown the great application prospect and received wide popularity in the field of crowd flow prediction. The machine learning-based models discover complex non-linearities in data and outperformed the traditional methods with a lower error rate and higher accuracy rate. Despite the above methods have produced compelling results, it remains unsatisfactory for the rapid development of intelligent transportation systems in practice. Recently, deep learning has made groundbreaking progress on classification tasks, pattern recognition, and natural language processing [27]. Due to its high computational efficiency and interpretability, deep learning models, such as convolutional neural network (CNN) [28][29][30][31][32] and recurrent neural network (RNN) [33][34][35][36], have been applied widely to capture the crowd flow features with a squared tessellation of tiles.
However, the above methods by assuming a convolution filter in the form of a grid structure and ignore modeling the physical roadway network topological structures. In the real world, the road network cannot be regarded as a regular gridded structure [37][38][39]. With the powerful ability to capture the spatio-temporal features of graph-structured data, graph convolutional network (GCN) and its extensions have been widely applied to prediction tasks [40][41][42][43][44][45][46]. By constructing the road network as a graph and aggerating the features of neighborhood, the GCN model can capture characteristics of the crowd data in the deep layer among the irregular regions. Many researchers used the trajectories of bicycle sharing [47,48], mobile phone positioning data [49,50], taxi GPS records data [51,52], or the number of passengers on public transportation systems (e.g., metro, railway or airport) [53][54][55][56][57] to predict the crowd flow in a city. It is relatively scarce on the pedestrian in open public spaces.
In this study, we introduce the GCN model to predict the pedestrian flow in a walking street in Shenzhen metropolitan area. The GCN model can handle the issues that CNN cannot be applied to graph structures of the road network. The graph is built based on the existed road structures to capture the spatial dependency of the crowd by calculating the coefficient between nodes. We further compare the GCN model with baseline methods to validate the performance of pedestrian flow prediction. The experiments show that the GCN model improves the prediction precision and decreased the prediction error. The accurate and timely pedestrian flow prediction results can help managers to take precautions in advance and ensure the public safety, which is beneficial for building a smart city. Since the pedestrian flow could be impacted by temporal dependencies and other factors, we conduct the sensitive analysis of the GCN model with the consideration of these related factors such as weekends and weekdays, the rush hours in the day and the weather conditions. It is found that the model has the ability to capture pedestrian congestion peaks with high accuracy. Understanding the dynamic of pedestrian flow can be beneficial for crowd control systems to manage and direct the optimal detours in advance.
The main contributions of this paper are as follows: (1) We employ the GCN model to predict the pedestrian flow. The graph-structurebased deep learning model, in which the detectors are regarded as nodes, and edges represent the relationship of the road network, can capture the complex topological dependency. Moreover, we assign different weights to road segments to identify the influence of road network structure to capture the spatial dependencies. (2) We compare the GCN model with baseline methods selected from the existing methods to validate the performance of pedestrian flow prediction in terms of three evaluation metrics. The experimental effectiveness of the GCN model show that proper integration of the road topology could considerably improve the pedestrian flow prediction precision in real-world applications. (3) We further conduct comparative experiments of pedestrian flow prediction between weekdays and weekends, and different hours during the day to capture the temporary dependencies. Sensitive analysis on the effect of weather conditions is also conducted. The robustness of the GCN model to predict the pedestrian flow would help practitioners and managers to improve road efficiency.
The remainder of this paper is organized as follows. Section 2 details the study area and the data preprocessing procedures. The detail of the GCN model is also formulated in this section. Section 3 shows the experimental results. Section 4 discusses the advantage and sensitivity of the model. The conclusions are presented in Section 5.

Study Area
This study predicts the pedestrian flow in an open public place in the city of Shenzhen. Shenzhen, being a vice-provincial level city of the Pearl River Delta, was designated as the first special economic zone in China on 26 August 1980 and has gradually become a pioneer international metropolitan area following the Reform and Open-up policy over the past 40 years. As one of the cities with the most economic viability and the fastest population growth in China, the gross domestic product of Shenzhen was 2692.7 billion RMB in 2019 and the population was 13.44 million and ranked third among all cities in China. It includes 10 administrative districts with an area of 1997.47 km 2 . In the downtown areas of Shenzhen, known as the Nanshan, Futian and Luohu districts, the population density is above 20 thousand people per kilometer.
The Dongmen walking street, located in the center of Luohu district and covering an area of 176 thousand square meters, is a time-honored and large-scale commercial area in the city of Shenzhen. As an open place with various public service functions of shopping, leisure and tourism, the Dongmen walking street is bustling with a large crowd of travelers during the peak hours. On a typical holiday, the crowd count can easily reach 300 thousand per day. For example, on 25 May 2014, a suspected man with mental disease ran away in a shopping mall after overthrowing the display shelves. The man ran and yelled, causing the pedestrian around to flee disorderly, which led dozens of people to suffer minor injuries before the security officers caught him. As a result, many retail shops on the prosperous commercial district were closed on weekends [58]. Thus, there has been a considerable safety concern and need for pedestrian flow prediction and management in this area.
As shown in Figure 1, the road network in this area is rather complex and contains many junctions. There are several office buildings and hotels in the southern of the walking street, where the flow is steady and risk-free of overcrowding. Comparing to the south areas, the northern regions are a mass of shopping malls, recreation facilities, snack bars and tourist sites, which attract a large number of visitors to sightsee. The high crowd counts in these areas are likely to induce the occurrence of stampedes. Taking this phenomenon into consideration, the landmarks along the main road and the crossroads in the north were considered to be the optimal locations to deploy the camera detectors. The metro stations and bus stops in the study area were also regarded as the installation locations, such as detector 1 and 25. Consequently, 25 camera detectors, denoted as 1, 2, . . . , 25, were equipped along the roads to catch the dynamic distribution of pedestrian.
Since the detectors covered different monitoring areas along the roads, the crowd count of each detector was normalized by dividing the monitoring area, as the number of pedestrians per 100 square meters. Figure 2 presents the variation of crowd count at the junctions and the average count of all the detectors, from 1 to 14 July 2020. It can be observed that the pedestrian flow has a marked periodicity during a week. Besides, there are more pedestrians thronged into the walking street on weekends (4 July 2020, 5 July 2020, 11 July 2020, and 12 July 2020) compared with the crowd count on weekdays.
To determine the optimal periodicity of the pedestrian flow rationally, we further calculate the relationship between phase difference and autocorrelation coefficient. The

Pedestrian Flow Data
The pedestrian flow data describes the pedestrian volume changes over time on each detector, denoted as the number of pedestrians within the definite monitoring area. During the study period from July 1 to September 30, 2020, we collect the pedestrian flow data with an interval of 1 min. Examples of the pedestrian flow records at the junctions (i.e., detectors 6, 8, 16, 21 and 24) are shown in Table 1. Since the detectors covered different monitoring areas along the roads, the crowd count of each detector was normalized by dividing the monitoring area, as the number of pedestrians per 100 square meters. Figure 2 presents the variation of crowd count at the junctions and the average count of all the detectors, from 1 to 14 July 2020. It can be observed that the pedestrian flow has a marked periodicity during a week. Besides, there are more pedestrians thronged into the walking street on weekends (4 July 2020, 5 July 2020, 11 July 2020, and 12 July 2020) compared with the crowd count on weekdays. of a week, whose value is 0.918. Besides, the pedestrian flow has a slightly periodicity on a daily basis. It can be found that the crowd shows the similar pattern from day to day when ignoring the difference of weekends. The correlation during an hour is second to the week periodicity, because of the pedestrian flow with the strong temporary dependencies. Therefore, the input sequence length is set to 60 in our experiments, which means we use the historical flow data in the past hour to predict the pedestrian flow in the next moments.

Methodology
The goal of pedestrian flow prediction is to forecast the pedestrian count on next moments ( , … , ) given previously collected moments data ( , … , ) from correlated detectors on the road network, as shown in Equation (1): where is a weighted adjacency matrix representing the road network structure, and (• ) is a mapping function from input to output to be learned.

The GCN Model for Pedestrian Flow Prediction
Before being put into the GCN model, the pedestrian flow data were grouped into two sets, the feature sets and the label sets. The feature set is used to predict the pedestrian flow in the next moments, while the label set is preserved for the validation of the model results. Besides, we built the road network graph based on the topological structure derived from Figure 1, that the road distance between each pair of nodes, represented as the detectors in this study. The adjacency matrix is constructed using a threshold Gaussian kernel weighting function [59][60][61]: To determine the optimal periodicity of the pedestrian flow rationally, we further calculate the relationship between phase difference and autocorrelation coefficient. The results are shown in Figure 2f. The correlation coefficient is strongest based on the cycle of a week, whose value is 0.918. Besides, the pedestrian flow has a slightly periodicity on a daily basis. It can be found that the crowd shows the similar pattern from day to day when ignoring the difference of weekends. The correlation during an hour is second to the week periodicity, because of the pedestrian flow with the strong temporary dependencies. Therefore, the input sequence length is set to 60 in our experiments, which means we use the historical flow data in the past hour to predict the pedestrian flow in the next moments.

Methodology
The goal of pedestrian flow prediction is to forecast the pedestrian count on next T moments X t+1 , . . . ,X t+T given previously collected T moments data (X t−T +1 , . . . , X t ) from correlated detectors on the road network, as shown in Equation (1): where A is a weighted adjacency matrix representing the road network structure, and f (·) is a mapping function from input to output to be learned.

The GCN Model for Pedestrian Flow Prediction
Before being put into the GCN model, the pedestrian flow data were grouped into two sets, the feature sets and the label sets. The feature set is used to predict the pedestrian flow in the next moments, while the label set is preserved for the validation of the model results. Besides, we built the road network graph based on the topological structure derived from Figure 1, that the road distance between each pair of nodes, represented as the detectors in this study. The adjacency matrix is constructed using a threshold Gaussian kernel weighting function [59][60][61]: where A i,j is the weight between detectors v i and v j . dist v i , v j denotes the distance between detectors v i and v j , and θ represents the standard deviation of distances. κ is the threshold to determine the connection. We use the adjacency matrix A to represent the graph. A normalized graph Laplacian matrix L sys is defined as: where L is the laplacian matrix, and I N is the identify matrix. D = ∑ j A ij is the degree matrix, and a spectral normalization is applied to the adjacency matrix by the inverse of the degree matrix (D − 1 2 AD − 1 2 ). Graph neural network was presented by Gori et al. [62] as the extension of recursive neural network by capturing neighboring spatial correlation, which needs to compute the eigenvectors of the Laplacian by repeated iteration until the nodes' feature converge to a stable value. Hammond et al. [63] designed a framework with fast localized convolutions. This network captures the nodes' feature on the kth-order neighborhood by stacking multiple graph convolutional layers. The polynomial parametrization for localized filters can be written as: where g θ is a filter in the Fourier domain, and θ k is the polynomial coefficients. λ max represents the largest eigenvalue of the laplacian matrix. Defferrard et al. [64] further used Chebyshev polynomial to reduce the computational complexity, named Chebyshev Graph Convolution. The Chebyshev polynomial T k (x) of order k is defined as follows: where Kipf and Welling [65] simplified the Chebyshev Graph Convolution by limiting the layers-wise convolution operation to k = 1, which means the central node is only determined by the nodes on its 1st-order neighborhood. This is the prototype of the graph convolutional networks (GCN) model. The simple form of layer-wise propagation of the GCN model is as shown in Equation (8): where A = A + I N represents the graph structure, calculated by adding the adjacency matrix A to the identity matrix I N , so it can transfer both the node's features and the features of its neighbor nodes. D ii = ∑ j A ij is the degree matrix. And a spectral normalization is applied to the adjacency matrix by the inverse of the degree matrix ( D − 1 2 A D − 1 2 ). H (l) represents the output matrix and the initial layer is set to H (0) = X. W (l) denotes trainable weight matrix in the lth layer. σ(·) is the activation function such as a rectified linear unit (ReLU). A feature matrix X and an adjacency matrix A are fed to GCN as input, and the model computes the features of nodes by multiple hidden layers.
The segmentation of the pedestrian flow data and the architecture of the GCN model is depicted in Figure 3. Note that the pedestrian flow data of all 25 detectors at time t is denoted by where N is the length of the observed time interval. The T moments data were grouped as the feature, and the following T moments data as the label, continuously. Then the feature sets and the adjacency matrix were input in the GCN architecture. The model performance can be evaluated by comparing the label sets and the model output, denoted as prediction sets. In our experiment, we stack two convolutional layers for pedestrian flow prediction given a weighted adjacency matrix A, as shown in Equation (9): where = , and (•) = max (0,•) denotes an activation function. ( ) ∈ × is an input-to-hidden weight matrix, and ( ) ∈ × is a hidden-to-output weight matrix. The model is operated by applying the Adam optimizer. Mean square error function is employed as the loss function of the model for predict pedestrian flow in open public places, which is formulated as:

Evaluation Metrics
There are three metrics selected as basic measures to evaluate the model performances.
(1) Root mean square error: In our experiment, we stack two convolutional layers for pedestrian flow prediction given a weighted adjacency matrix A, as shown in Equation (9): and ReLU(·) = max(0, ·) denotes an activation function. W (0) ∈ R T ×H is an input-to-hidden weight matrix, and W (1) ∈ R H×T is a hidden-tooutput weight matrix.
The model is operated by applying the Adam optimizer. Mean square error function is employed as the loss function of the model for predict pedestrian flow in open public places, which is formulated as:

. Evaluation Metrics
There are three metrics selected as basic measures to evaluate the model performances.
(1) Root mean square error: (2) Mean absolute error: (3) Coefficient of determination: where Y = y 1 , . . . , y N andŶ =ŷ 1 , . . . ,ŷ N are the ground truth pedestrian flow and predicted one, and y is the average of Y. N represents the number of the samples for prediction. RMSE and MAE measure the difference between ground-truth flow and predicted pedestrian flow. The smaller the value of RMSE and MAE are, and the closer the predicted values to the truth one. R 2 is a measure of how well the collected data explained by the forecasting model. The larger the value of R 2 , the better the prediction effect.
In our experiment, 80% of the data were used for the training process, and 20% of the data were reserved for testing and validation. The descriptive analyses of the two sub-groups, namely training and testing data, were summarized in Table 2. The mean values of training and testing data are 6.179 and 6.138, respectively, while the standard deviation values are 9.725 and 9.648, respectively. There are almost the same. The minimum, lower quartile and median values have also little difference, and the upper quartile and maximum values of testing data are greater than training data. From the mean and median values, we can easily find the collected data are concentrated in the low-value region. The difference in the high-value indices, namely upper quartile and maximum, are not dominant. Therefore, we can consider there is no obvious difference between the training and testing data, indicating the available data are sampled randomly. The model would avoid lose information by training only a subset of the pedestrian flow data. It could prove the robustness of the model.
We take prediction loss (Equation (10)) to measure the precision of the model. To illustrate the efficiency of the model, we also apply the computational time, the run time required to repeat 1000 epochs, to evaluate the model performances. All of our experiments were implemented under a computing environment with Intel(R) Core (TM) i7 CPU 870 @ 2.93 GHz with 8 GB RAM and NVIDIA GeForce GT 420 (1024 MB) GPU. The operating system and software platform are Windows 10 and Python 3.6. All the models are conducted with the open source frameworks, including scikit-learn (0.23.2 version), Keras (2.1.5 version), torch (1.5.0 version).

Hyperparameter Settings of the GCN Model
The input and output sequence lengths were set to 60 min and 1 min respectively, and the number of hidden units was 32. To compute the adjacency matrix and identify the effect of κ (Equation (3)) on the GCN model, we design the validation experiments for estimation accuracy with κ ∈ [0, 0.05, 0.1, 0.15, 0.2, 0.25] [66], and the results are summarized in Figure 4. The horizontal axis denotes the change of κ and the vertical is the value of different metrics.    Figure 5d depicts the changes of metrics on the test set, which presents the approximate trend with the train set.
According to the findings in Figure 5, we notice that the accuracy of the model can be improved by a moderate adjustment of the parameter of . More specifically, when is set to 0, the adjacency matrix is computed by all neighboring detectors, prediction accuracy is constraint by the repetitive computation. As the threshold increases, some nodes located far away from the center are excluded, leading to improvement in prediction efficiency and performance. Nonetheless, when the value of is larger than 0.1, those detectors with the strong relationships are also ignored, so the model performance starts to decrease. Therefore, the results reach the optimal condition when the value is 0.1.   Figure 5d depicts the changes of metrics on the test set, which presents the approximate trend with the train set.

Comparison between Weekdays and Weekends
As presented in Figure 2, the pedestrian flow has a marked weekly periodicity pattern that the crowd count on weekends is larger than on weekdays. In this section, we measure the performances of the GCN model on weekends and weekdays respectively. Further, to have a better understanding of the prediction performance, we sample the head 200 rows of the dataset and visualize the ground-truth and predicted crowd count, as shown in Figure 5. The values of on weekends and weekdays are all above 0.93, proving the effectiveness of the GCN model for pedestrian flow forecasting. Moreover, the weekend dataset, compared to the weekday dataset, achieves higher prediction precision in terms of . Since the pedestrian flow on weekends is much heavier than on weekdays, we can conclude that the GCN model has better prediction performances under larger flow volumes. The changes of and are opposite to that of , in which the weekend dataset occurs the higher error. This is mainly because and are absolute error metrics, and the greater crowd count on weekends results in a higher value of and . From the visualization results, we can see that the GCN model can accurately forecast the pedestrian flow in multiple local peaks and nadirs. And the model achieves satisfying results in predicting the variation trend of pedestrian flow in comparison with the ground-truth data.

Comparison between Different Hours of the Day
It must be noticed that the throng in open public place changes over time, with the characteristics of the high crowd count in the afternoon and evening and the low value at According to the findings in Figure 5, we notice that the accuracy of the model can be improved by a moderate adjustment of the parameter of κ. More specifically, when κ is set to 0, the adjacency matrix is computed by all neighboring detectors, prediction accuracy is constraint by the repetitive computation. As the threshold increases, some nodes located far away from the center are excluded, leading to improvement in prediction efficiency and performance. Nonetheless, when the value of κ is larger than 0.1, those detectors with the strong relationships are also ignored, so the model performance starts to decrease. Therefore, the results reach the optimal condition when the value is 0.1. Table 3 shows the adjacency matrix of 25 detectors, along with the road distance used for calculating the connection between each pair of nodes the strength of the relationship. It is noteworthy that the strong correlations are obtained when the distances between two detectors are close, such as the detectors 2 and 3. When the connection is weak than the threshold of 0.1, the adjacency matrix is set to 0 because they are too far away, such as the detectors 4 and 8.    559  483  465  507  550  451  403  362  400  329  369  448  412  287  363  377  403  248  111  57  77  1  0.735  25  820  681  646  570  578  594  637  538  490  449  487  416  456  535  499  374  450  464  490  335  198  144  164  87  1 Note: the upper triangular matrix is the adjacency matrix calculated by weighting function, and the lower triangular matrix is the distance matrix, of which the unit is the meter.

Baseline Models
Six baseline models selected from three kinds of existing models are used for pedestrian flow prediction to compare with the performance of the standard GCN model.
(1) Historical average (HA) [12]: It simply employs the average of previous periods as the prediction. (2) Autoregressive integrated moving average (ARIMA) [14]: It predicts the future trend of time series data. (3) Support vector machine (SVM) [21]: It uses a kernel function for the prediction task. (4) Convolutional neural network (CNN) [29]: It handles the traffic data by constraining the grid-structure. (5) Long short term memory (LSTM) [34]: It is a recurrent neural network (RNN) based model to capture temporal dependencies for traffic prediction. (6) Spatio-temporal graph convolutional networks (STGCN) [40]: It is a deep learning framework for traffic forecasting, solving the problem on graphs and build the model with complete convolutional structures.

Experimental Results
We conduct a quantitative evaluation of the GCN and six baseline models over the collected pedestrian flow and compare the changes of metrics results to validate the performance of the model. We choose the value of output sequence length from [1,5,10,15,20,25,30] [57,[66][67][68][69], and other simulation configurations are identical to the settings in the previous section to conduct the comparative experiments. The results are shown in Table 4. The values of metrics achieving the best performances are defined as the lowest of prediction error (RMSE and MAE) and the highest of prediction precision (R 2 ). It can be observed that the STGCN and GCN models consistently and significantly outperform the other baseline models in terms of three evaluation metrics for all output sequence length, and the prediction error increases and effectiveness decreases when adding the value of output sequence length. For 1 min pedestrian flow prediction, the HA model has the poorest results, of which RMSE and R 2 are 3.47 and 0.872 respectively, proving it is not good at capturing the pedestrian volume in a short time. When the output sequence length increases, the HA model outperforms the ARIMA and SVM model. It is worth pointing out that the SVM model has a satisfactory performance in forecasting the short sequence length, for example, the R 2 is 0.887 in 1 min and 0.874 in 5 min. However, the model efficiency drops rapidly when the augment of prediction length, mainly because it has difficulty in capturing the irregular and long-term data. Especially, R 2 is lower than 0.8 when the value of output sequence length is larger than 20 min. The ARIMA, CNN and LSTM model perform the crowd count prediction task with relatively good results, while the deep learning-based model such as CNN and LSTM outperforms slightly than the ARIMA model due to its high interpretability efficiency. The GCN model and its extension achieve the best performance with satisfactory results and improves the value of R 2 above 0.9 under 30 min output length, which demonstrates the superiority of capturing the pedestrian characteristics of road network structures.
The GCN and STGCN model can effectively utilize the graph structure to obtain the accurate results. Concerning the operational efficiency, we also compare the computation time between these two models for 1 min prediction task. The standard GCN model only consumes 48.995 min, while STGCN spends 92.047 min. The 2 times acceleration of running time benefits from the graph features rather than the double spatio-temporal convolutional blocks. Considering both prediction accuracy and computation efficiency, we determined the GCN model to be relatively suitable for forecasting the pedestrian flow in this study.

The Advantage of the GCN Model for Pedestrian Flow Prediction
Pedestrian flow spontaneously resides in the network topological structure of the road, and the network structure might fundamentally influence the distribution patterns of the crowd. The pedestrian flow of the road segments has a geographical association with the road which is connected. Road network-based prediction task is determined by not only the features of that road segment, but also the features of its neighbors. Normally, the stronger the relationship of the road junction is, the more people move from one junction to another. The distances between pairwise detectors were employed to describe this relationship. The crowd is most likely to move towards its neighborhood instead of the faraway places. The existing methods in pedestrian flow prediction lose sight of the topological structure of the road. Compared with other methods assuming the convolution filter as the grid structure, the GCN model is competent to capture the graph structure. The model, in which the detectors are regarded as nodes, and edges represent the relationship of the road network, can capture the pedestrian flow characteristics hidden in the topological structure. In order to identify the influence of road network structure, we employed the adjacent matrix by assigning different weights to road segments. The experimental effectiveness of the GCN model to capture the spatial dependencies was validated in terms of three prediction evaluation metrics. The lower error and higher accuracy rate of the model show that proper integration of the road topology could considerably improve the pedestrian flow prediction precision in real-world applications. To further illustrate the better and robust performance of the GCN model, we conducted comparative experiments of pedestrian flow prediction between weekdays and weekends, and different hours during the day to capture the temporary dependencies. We also analyzed the effect of weather conditions on the pedestrian features.

Comparison between Weekdays and Weekends
As presented in Figure 2, the pedestrian flow has a marked weekly periodicity pattern that the crowd count on weekends is larger than on weekdays. In this section, we measure the performances of the GCN model on weekends and weekdays respectively. Further, to have a better understanding of the prediction performance, we sample the head 200 rows of the dataset and visualize the ground-truth and predicted crowd count, as shown in Figure 5.
The values of R 2 on weekends and weekdays are all above 0.93, proving the effectiveness of the GCN model for pedestrian flow forecasting. Moreover, the weekend dataset, compared to the weekday dataset, achieves higher prediction precision in terms of R 2 . Since the pedestrian flow on weekends is much heavier than on weekdays, we can conclude that the GCN model has better prediction performances under larger flow volumes. The changes of RMSE and MAE are opposite to that of R 2 , in which the weekend dataset occurs the higher error. This is mainly because RMSE and MAE are absolute error metrics, and the greater crowd count on weekends results in a higher value of RMSE and MAE. From the visualization results, we can see that the GCN model can accurately forecast the pedestrian flow in multiple local peaks and nadirs. And the model achieves satisfying results in predicting the variation trend of pedestrian flow in comparison with the ground-truth data.

Comparison between Different Hours of the Day
It must be noticed that the throng in open public place changes over time, with the characteristics of the high crowd count in the afternoon and evening and the low value at midnight. To further evaluate the influence of the high or low pedestrian flow on the model performance, we compare the evaluation metrics under different hours during the day, and the results are listed in Table 5. For the table, we can find that the values of RMSE and MAE are quite small in the early morning (from 00:00-05:59), while the values are relatively big in the afternoon. It is noteworthy that the prediction accuracy (R 2 ) under various time intervals has no significant difference between weekdays and weekends. Specifically, no matter on weekends or weekdays, the model does not achieve satisfactory precision from 06:00 to 08:59. The value of R 2 during the evening peak (from 16:00 to 21:59) are all above 0.9, indicating the GCN model can predict the pedestrian flow accurately when there are massive travelers, which is beneficial for road managers to prevent or alleviate pedestrian congestion.
As previously mentioned, the value of crowd count has a significant impact on the value of RMSE and MAE. We depict the relationship between them in Figure 6, and further employ the scatter plot and linear regression analysis on these indices. There are a larger crowd of people thronged into the walking street in the afternoon and evening on weekends. The peak of pedestrians per 100 square meters on weekdays is about 15, while the number on weekends is above 20. On weekdays, the maximum value of RMSE and MAE occurs from 17:00 to 17:59, of which the values are 4.452 and 2.727, respectively. The peak error occurs from 15:00 to 17:59 on weekends, and the value is larger than the one on weekdays. More importantly, the slopes in the linear regression equations are positive, indicating the prediction error has a positive correlation with crowd count. The intercept on weekends is larger than the value on weekdays, reflecting the heavier pedestrian flow on weekends could lead to a higher prediction error compared to weekdays. And the fitness of regression equations are 0.9628, 0.9551, 0.9517 and 0.9506, respectively. It provides an insight that RMSE and MAE have a strong correlation with crowd count.  Therefore, the relative metric ( ) is adopted to measure the model effectiveness under different hours. We further investigate the reason why the model performances differ under various hours in the aspect of the interval distribution of datasets. The datasets of which is less than 0.8 (highlighted in bold) are selected as poor performance sets. And the remainder datasets, more than 0.8, are grouped as good performance sets. By considering the distribution characteristics of the collected ground-truth data, we partition the crowd count with an interval of 5, then calculate the proportion of the flow on the given interval. The statistical diagrams are pictured in Figure 7. Therefore, the relative metric (R 2 ) is adopted to measure the model effectiveness under different hours. We further investigate the reason why the model performances differ under various hours in the aspect of the interval distribution of datasets. The datasets of which R 2 is less than 0.8 (highlighted in bold) are selected as poor performance sets. And the remainder datasets, R 2 more than 0.8, are grouped as good performance sets. By considering the distribution characteristics of the collected ground-truth data, we partition the crowd count with an interval of 5, then calculate the proportion of the flow on the given interval. The statistical diagrams are pictured in Figure 7.
der different hours. We further investigate the reason why the model performances differ under various hours in the aspect of the interval distribution of datasets. The datasets of which is less than 0.8 (highlighted in bold) are selected as poor performance sets. And the remainder datasets, more than 0.8, are grouped as good performance sets. By considering the distribution characteristics of the collected ground-truth data, we partition the crowd count with an interval of 5, then calculate the proportion of the flow on the given interval. The statistical diagrams are pictured in Figure 7.  From the figure, it can be noticed that the good performance sets (R 2 ≥ 0.8) have a smaller proportion in the interval of from 0 to 5, where the pedestrian flow is quite low. On weekdays, about 60% of the crowd are lower than 5 in terms of good performance sets while the percent of poor performance sets is above 90%. This kind of phenomenon is more perceivable on weekends. The percentage of the two sets are 55% and 93%, respectively. More importantly, the poor performance sets reach the 99th percentile in the previous two intervals both on weekdays and weekends-that is, only 1 percent of crowd count is larger than 10. On the good performance sets, the percent of the previous two intervals account for 79% and 72% respectively on weekdays and weekends. It reaches the 99th percentile when the number of pedestrians per 100 square meters is above 50. It is concluded that the GCN model achieves a better prediction when the crowd count is high, which proves the effectiveness of the model to find the pedestrian flow peaks.

Comparison between Different Weather Conditions
It is known that the pedestrian flow fluctuates under various weather situations. Therefore, in this section, dealing with weather conditions data over the study period, we apply sensitive analysis to validate the model effectiveness. We used the weather and temperature data from Meteorological Bureau of Shenzhen Municipality (http://weather. sz.gov.cn/ (assessed on 1 March 2021)) and the data were obtained every day. The summary of the temperature and weather conditions is shown in Figure 8.
The temperature in the study area is stabilized during the third quarter (from 1 July 2020 to 30 September 2020). Overall, the highest and the lowest temperature are above 30 and 25 degrees Celsius respectively in most cases. From the statistical table, the cloudy weather accounted for more than half (50/92) of the study period and the temperature variation under diverse weather conditions has little difference. Comparing to the sunny days, it attracts more visitors in cloudy days. It is mainly because Shenzhen is the subtropics climate, and the cloudy days are suitable for people to travel along the road while the sunny days are too scorching heat to sightsee. Since the weather records are time-series data in every day, we embed weather features into pedestrian flow data. The time interval is 1 min in our experiment, which means the 1440 intervals share the recorded weather data in a day. We further conduct the comparative experiments under different weather conditions and the results are shown in Table 6.
It is known that the pedestrian flow fluctuates under various weather situations. Therefore, in this section, dealing with weather conditions data over the study period, we apply sensitive analysis to validate the model effectiveness. We used the weather and temperature data from Meteorological Bureau of Shenzhen Municipality (http://weather.sz.gov.cn/ (assessed on 1 March 2021)) and the data were obtained every day. The summary of the temperature and weather conditions is shown in Figure 8. The temperature in the study area is stabilized during the third quarter (from 1 July 2020 to 30 September 2020). Overall, the highest and the lowest temperature are above 30 and 25 degrees Celsius respectively in most cases. From the statistical table, the cloudy weather accounted for more than half (50/92) of the study period and the temperature variation under diverse weather conditions has little difference. Comparing to the sunny days, it attracts more visitors in cloudy days. It is mainly because Shenzhen is the subtropics climate, and the cloudy days are suitable for people to travel along the road while the sunny days are too scorching heat to sightsee. Since the weather records are timeseries data in every day, we embed weather features into pedestrian flow data. The time interval is 1 min in our experiment, which means the 1440 intervals share the recorded weather data in a day. We further conduct the comparative experiments under different weather conditions and the results are shown in Table 6.  Taking the mean crowd count in Figure 8 into consideration, we found that all three metrics have a positive correlation with the mean value. Specifically speaking, the heavy pedestrian flow may result in high prediction error (RMSE and MAE), and the model has a greater prediction precision (R 2 ) when the flow is heavier. The model achieves the best accuracy in cloudy days, and its prediction precision is 0.947, higher than the value of R 2 in other weather conditions. R 2 is the lowest in the overcast days, whose value is still above 0.92. It validates the model's effectiveness to predict the pedestrian flow in open public places, especially when there is a large crowd of pedestrians thronged into the walking street.

The Limitation and Prospects of the Study
There are some limitations of this study. The primary concern is that we employ the number of pedestrians within the monitoring area. As the detectors are installed on the pole by the road, the monitoring area may be blocked by the buildings or leaves, resulting in the underestimation of crowd count. Besides, we equipped 25 detectors to monitor the pedestrian in the walking street, covering the main road and crossroad but ignoring the throng in the sideway. High-density spatial sampling would capture the pedestrian features across the board. Finally, there are three dominated indices in the field of pedestrian traffic, i.e., density, speed and direction. This study concentrates on the crowd count within a definite area. It will be beneficial to improve the prediction precision considering the relationship between the three indices.
With respect to the prospects of the study, it can go in three directions. First, compared to the characteristics of vehicle flow in complying with specified roadway, the pedestrian could move freely and even change direction at any time. It would be meaningful to consider the features of pedestrian movement and construct the adjacency matrix besides the distances of pairwise detectors. In addition, the road topology is represented as a static graph in this study. The present model could be improved with an in-depth exploration of the dynamic graph based on variable matrices, further enhancing its accuracy and robustness for crowd count prediction. Finally, we applied a standard GCN model to predict the pedestrians in this study. Many GCN extensions addressing the prediction tasks are proposed to improve the computation accuracy. It is meaningful to utilize these state-of-the-art methods for practical application after decreasing the model complexity.

Conclusions
In this paper, we have introduced the GCN model to predict pedestrian flow in open public places. In contrast to traditional grid matrices, the model forecasts the crowd count depending on the road spatial topology relationship, and the graph is constructed to describe the relationships among detectors. Experimental results show that the GCN model consistently and significantly outperforms s baseline models, namely HA, ARIMA, SVM, CNN, LSTM and STGCN. For 1, 5, 10, 15, 20, 25, 30 min pedestrian flow prediction, the values of R 2 are 0.937, 0.928, 0.921, 0.916, 0.911, 0.906 and 0.902, respectively. We further analyze the sensitivity of the GCN model in pedestrian flow prediction. The model obtains superior performances with higher prediction precision on weekends and the precision during the evening peak is above 0.9, demonstrating the superiority of the model, especially when there is a large crowd of pedestrians thronged into the walking street.
The proliferation of various data mining technology creates unprecedented opportunities to better understand crowd distribution patterns using the collected data. The accurate prediction results help road managers take flexible and effective measures to meet the requirements for security management of open public places. More specifically, the massive crowds of pedestrians are similar to shock waves, and people may be crushed by the high pressure building up in the crowd, especially for the older, juvenile and women, who have the tendency to scream and cause psychological uneasiness, even lose their balance and fall down. The managers can shield or divert these vulnerable individuals into the vast square in advance to prevent the occurrence of stampedes. Besides, people often rely on their preferences to choose the route while neglecting the whole story in the walking street during the huge crowd. The regulators can release the road capacity information through public display screens and broadcast facilities, which is effective to avoid the crowd gathering due to the scarcity and distortion of information. It also has the potential to provide accurate and timely flow information for pedestrians to choose appropriate travel routes and decrease the travel time.  Data Availability Statement: Data support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest:
The authors declare no conflict of interest.