A fine-grained traffic accident risk identification method in urban geographic space
Through deep learning technology, combined with urban satellite images and road network data, multi-scale features are extracted and spatial attention fusion is performed, which solves the problems of coarse granularity and low accuracy of traffic accident risk identification methods, and realizes the improvement of traffic accidents at low cost. Universality and scalability of risk assessment.
Patent Information
- Application Number
- CN202210079806.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-01-24
AI Technical Summary
Existing traffic accident risk identification methods have problems such as coarse granularity, low accuracy and low scalability. Especially in underdeveloped cities or regions, there is a lack of sufficient historical data, which makes it impossible to build an effective traffic accident risk assessment model.
A method based on deep learning is adopted, using urban high-resolution satellite images, urban road network and interest point distribution data, extracting multi-scale features through VGG-16 neural network, and combining spatial attention and channel attention modules to construct a detailed The granular traffic accident risk assessment model only requires traffic accident data in the target area during the training phase, and no longer relies on this data after the model training is completed.
It achieves improved universality and practicality of traffic accident risk prediction at low cost, can be applied in multiple cities, has high practicality and scalability, and is suitable for traffic accident risk assessment in data-deficient areas.
Smart Images

Figure BDA0003485635510000031 
Figure BDA0003485635510000034 
Figure BDA0003485635510000047
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent transportation systems and relates to a fine-grained traffic accident risk identification method in an urban geographic space. Background Art
[0002] Most existing traffic accident risk identification methods are based on a large amount of historical traffic accident data, from which high-accident areas are analyzed. Such methods have the following limitations:
[0003] 1. Collecting a large amount of traffic accident data is a very difficult task, especially for some underdeveloped cities or regions, which leads to the lack of sufficient historical traffic accident data in most areas and makes it impossible to build an effective traffic accident risk assessment model;
[0004] 2. Most studies only discover traffic accident hotspots from historical data without considering factors such as the surrounding environment and road network structure, which is not ideal in terms of prediction granularity and accuracy. Summary of the invention
[0005] The technical problem to be solved by the present invention is to overcome the problems of coarse granularity, low accuracy, and low scalability in the prior art in traffic accident prediction, and provide a fine-grained traffic accident risk identification method in an urban geographic space.
[0006] This application proposes a traffic accident risk assessment method in urban geographic space, which uses easily accessible urban static multi-source data, such as high-resolution urban satellite images, urban road networks, and distribution of points of interest, to achieve fine-grained traffic accident risk assessment, help provide more reasonable traffic accident prevention guidance measures, and has high practicality and scalability, which is of great significance for improving the universality and practicality of traffic accident risk prediction at a lower cost in practical applications.
[0007] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions, which are described as follows:
[0008] A fine-grained traffic accident risk identification method in an urban geographic space comprises the following steps:
[0009] Step 1: Build the dataset
[0010] The three-channel RGB city satellite image and the city road network binary image are fused into a 4-channel image;
[0011] Extract the number of different types of points of interest (POIs) within the target area and integrate the vector f e As external factors input;
[0012] Step 2: Extract multi-scale features
[0013] Extract target region I through VGG-16 neural network t and target neighborhood I s Multi-scale features (f1-f5);
[0014] Step 3: Calculate spatial attention
[0015] Capture the complex spatial correlation between low-level features and high-level features, and perform spatial feature fusion of the two-level features through the following formula:
[0016]
[0017] Among them, upsample4 means 4 times upsampling, conv means standard convolution operation, σ means sigmoid activation function, W h , W l They are trainable parameters for generating high-level and low-level features respectively; finally, the target area I is obtained respectively t and target neighborhood I s The high-level and low-level fusion features are expressed as and
[0018] Step 4: Calculate channel attention
[0019] Will and Spliced into an image with 2C channels, represented as The dimensions are d×d×2C;
[0020] Will Fusion with the feature vector of external factors in the target area;
[0021] Will Split along the channel direction, expressed as The i-th channel is represented by
[0022] The weight value calculation formula for the i-th channel is as follows:
[0023]
[0024] where α i is the weight corresponding to the i-th channel, and the weight vector is Features generated after merging The result is then passed through a convolution layer to finally obtain the traffic accident risk for each pixel in the target area image.
[0025] Step 5: Construct the loss function
[0026] The specific calculation formula of the loss function is as follows:
[0027]
[0028] Where d is the side length of the target area image, is the traffic accident risk prediction value corresponding to the i-th row and j-th column in the target area image, I r (i, j) is the corresponding position label value obtained through historical data statistics, θ represents all the training parameters in the model, and finally all parameters are solved by gradient descent.
[0029] Furthermore, the different types of POIs include hotels, schools, shops, and transportation stations. The integrated vector f e as external factors input.
[0030] Furthermore, the target region I is extracted by VGG-16 neural network. t and target neighborhood I s The multi-scale features (f1-f5) of
[0031] Five levels of features are generated from top to bottom through VGG-16. Four different dilated convolutional layers are used on each level of the generated features. The dilation rate r of the convolution kernel is set, the convolution kernel size is set to 3×3, and different dilation rates are set to r=1, r=3, r=5 and r=7 respectively; the features generated by the above four convolution kernels with different dilation rates are merged to finally obtain multi-scale features f1-f5 of different levels.
[0032] Furthermore, the specific method for generating low-level features is: upsampling f2 by 2 times, upsampling f3 by 4 times, merging f1 with the upsampled f2 and f3, and generating low-level features f through a convolution layer. l , the dimension is d×d×C, where C is a custom constant;
[0033] The specific method for generating high-level features is: upsample f4 by 2 times, upsample f5 by 4 times, then merge f3 with the upsampled f4 and f5, and then pass another convolutional layer to generate high-level features f h , the dimension is
[0034] Furthermore, the It is fused with the feature vector of external factors in the target area. The specific contents are as follows:
[0035] right Perform the maximum pooling operation to reduce the feature dimension, expand each channel into a vector, and use it as the input of the two-layer fully connected neural network FC. Use the ReLU activation function to obtain the output result vector v with a dimension of 1×C;
[0036] Each channel of is converted into a vector of dimension 1×C, and the 2C channel vectors are merged to finally obtain The dimension is 1×C×2C, and this process is expressed by the following formula:
[0037]
[0038]
[0039] Among them, concat means concatenating the two matrices in the brackets, pooling means pooling operation, FC means fully connected layer, W′ means all trainable parameters in the fully connected layer, and ReLU means ReLU activation function;
[0040] The POI features f in the target area e As the input of the two-layer fully connected network FC, f e Encoded as a latent vector, denoted as f′ e , with dimensions of 1×C.
[0041] Furthermore, the premise for constructing the loss function in step 5 is as follows:
[0042] Count the total number of traffic accidents that occurred within a certain range around the corresponding position of each pixel point, and map it to a limited value range through the correction coefficient, setting the value range to 0-100;
[0043] Construct labels and scan each pixel in the target area image. t (i, j) represents the i-th row and j-th column position of the target image, and the statistics I t The number of historical traffic accidents within 100 meters of the corresponding geographic space is used as the I t The risk value I corresponding to the pixel (i, j) r (i, j).
[0044] Furthermore, the loss function is defined as the product of the absolute error between the predicted value and the true value of the corresponding pixel point and the true value plus 1.
[0045] Further, the target area I is selected from the 4-channel image t and target neighborhood I s As the input of the model, I t is a 4-channel square image with dimensions d×d×4, I sThe center point and I t The same, square image with a side length of 2d, that is, a 4-channel image with a dimension of 2d×2d×4; where d is the target area I t The side length of .
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] The present invention proposes a fine-grained urban geographic space traffic accident risk assessment method based on deep learning, which uses RGB images of high-resolution urban satellite maps and binary images of urban road networks as basic inputs, and then integrates urban POI distribution information to achieve fine-grained traffic accident risk assessment in urban geographic space. The present invention only requires traffic accident data in the target area as training labels during the training phase. Once the model training is completed, traffic accident data is no longer required during the application phase, so it can be easily expanded to multiple cities. This is of great significance for improving the universality and practicality of traffic accident risk prediction at a lower cost in practical applications.
[0048] The VGG-16 network is used to extract different levels of features from the target area image and the target field image. Then, the multi-scale feature extraction module is used to extract multi-scale features from the outputs of the VGG-16 network at all levels, and further synthesizes them into two-level features (i.e., low-level features and high-level features). Finally, the spatial attention module (SpatialAttention, SA) is used to fuse the low-level features and high-level features. In addition, the model generates an external feature vector by using a fully connected neural network (FC) to convert the external factors of the point of interest (POI) through a fully connected neural network. This module can also be easily expanded to integrate more other available urban multi-source data. Finally, the channel-wisedAttention module (CA) is used to combine the external vector with the target area image and the final features containing the surrounding area image to obtain the final output. DETAILED DESCRIPTION
[0049] The present invention is described in detail below:
[0050] A fine-grained traffic accident risk identification method in an urban geographic space comprises the following steps:
[0051] Step 1: Build the dataset
[0052] The three-channel RGB city satellite image and the city road network binary image are fused into a 4-channel image, from which the target area I is selected. t and target neighborhood I s As the input of the model, I t is a 4-channel square image with dimensions d×d×4, I sThe center point and I t The same, square image with a side length of 2d, that is, a 4-channel image with a dimension of 2d×2d×4. Where d is the target area I t The side length of .
[0053] Secondly, the number of different types of points of interest (POI) within the target area is extracted, including 17 categories such as hotels, schools, shops, and transportation stations, and integrated into a 17-dimensional vector f e as external factors input.
[0054] Step 2: Multi-scale feature extraction
[0055] First, the target region I is extracted through the VGG-16 neural network t and target neighborhood I s Multi-scale features (f1-f5). Specifically, five levels of features are generated from top to bottom through VGG-16. Four different dilated convolution layers (not limited to four) are used on each level of generated features. The convolution kernel size is set to 3×3 by setting the dilation rate r (referring to the number of intervals between points in the convolution kernel). However, different dilation rates are set, which are r=1, r=3, r=5 and r=7 respectively. The features generated by the above four convolution kernels with different dilation rates are merged to finally obtain multi-scale features f1-f5 of different levels.
[0056] VGG is the abbreviation of Visual Geometry Group Network, which means: Visual Geometry Group Network in Chinese.
[0057] VGG-16 refers to a VGG network with 13 convolutional layers and 3 fully connected layers in the network structure.
[0058] Here, we use the intermediate results of different levels of VGG-16 and then use a variety of dilated convolutions to extract multi-scale features. "Multi" is an adjective and no specific number is set.
[0059] The size of the convolution kernel is fixed at 3*3. The so-called expansion rate refers to the interval between each element of the convolution kernel. If the interval is different, the features obtained are features of different scales.
[0060] The convolution kernel scans the input target image starting from the upper left corner of the original image, that is, the (0, 0) pixel point, and performs a convolution operation. The output results obtained at each level are of the same size, so they can be directly merged.
[0061] After that, f2 is upsampled by 2 times, f3 is upsampled by 4 times, and then f1 is merged with the upsampled f2 and f3, and a convolutional layer is passed to generate a low-level feature f l, with a dimension of d×d×C, where C is a custom constant. Similarly, f4 is upsampled by 2 times, f5 is upsampled by 4 times, and then f3 is merged with the upsampled f4 and f5, and then passed through another convolutional layer to generate a high-level feature f h , the dimension is
[0062] Step 3: Spatial Attention Calculation
[0063] Different spatial locations have different impacts on the assessment of traffic accident risks. In order to capture the complex spatial correlation between low-level features and high-level features, the following formula is used to perform spatial feature fusion on the two-level features:
[0064]
[0065] Among them, upsample4 means 4 times upsampling, conv means standard convolution operation, σ means sigmoid activation function, W h , W l are trainable parameters for generating high-level and low-level features respectively.
[0066] Taking the target area image and the target neighborhood image as input, two high-level and low-level fusion features are obtained through the above formula, which are expressed as and
[0067] Represents high- and low-level fusion features;
[0068] Represents high- and low-level fused features of the target region;
[0069] Represents high- and low-level fused features of the target neighborhood;
[0070] Finally, we get the target area I t and target neighborhood I s The high-level and low-level fusion features are expressed as and
[0071] Because the input consists of two parts, namely the image of the target area and the target domain image (that is, the center is the same as the target area and the side length is twice that of the target area image), these two input images are respectively extracted through multi-scale features to obtain and
[0072] Step 4: Channel attention calculation
[0073] Will and Spliced into an image with 2C channels, represented as The dimensions are d×d×2C. Different channels in the traffic accident risk assessment results have different semantic information, and therefore have different degrees of influence on the accuracy of traffic accident risk prediction results. In addition, under different external environments of the target area, the impact of different channels on the prediction results is also highly dynamic. Fusion with the feature vector of external factors in the target area.
[0074] Specifically, first The maximum pooling operation is performed to reduce the feature dimension, and then each channel is expanded into a vector as the input of the two-layer fully connected neural network (FC). Finally, the ReLU activation function is used to obtain the output result vector v, whose dimension is 1×C. Each channel of is converted into a vector of dimension 1×C, and the 2C channel vectors are merged to finally obtain The dimension is 1×C×2C, and this process is expressed by the following formula:
[0075]
[0076]
[0077] Among them, concat means concatenating the two matrices in the brackets, pooling means pooling operation, FC means fully connected layer, W′ means all trainable parameters in the fully connected layer, and ReLU means ReLU activation function.
[0078] Next, the POI features in the target area, i.e., f obtained in step 1, are e As the input of the two-layer fully connected network FC, f e Encoded as a latent vector, denoted as f′ e , with a dimension of 1 × C. For the external feature extraction process, if more available data is available, FC can be further expanded to receive more features.
[0079] After this, the Split along the channel direction, expressed as The i-th channel is represented by Finally, the weight value calculation formula of the i-th channel is as follows:
[0080]
[0081] where α i is the weight corresponding to the i-th channel, and we combine the weight vector with Features generated after merging The result is then passed through the convolution layer to finally obtain the traffic accident risk for each pixel in the target area image. represents f′ e The transpose of express The nth channel, n is a variable, ranging from 1 to 2C. The denominator of the above formula is a summation formula, which means that the summation is performed when n takes values from 1 to 2C.
[0082] Step 5: Construct the loss function
[0083] The total number of traffic accidents that occurred within a certain range around the corresponding position of each pixel is counted, and then mapped to a limited value range through the correction coefficient. Here, the value range is set to 0-100. When constructing the label, scan each pixel in the target area image, I t (i, j) represents the i-th row and j-th column position of the target image, and the statistics I t The number of historical traffic accidents within 100 meters of the corresponding geographic space is used as the I t The risk value I corresponding to the pixel (i, j) r (i, j).
[0084] In order to improve the model's sensitivity to prediction errors in accident-prone areas, the loss function is defined as the product of the absolute error between the predicted value and the true value of the corresponding pixel point and the true value plus 1. The addition of 1 is to make the weight of the pixel point with a true risk value of 0 be 1, so that the error has a greater weight for areas with higher risks. The specific calculation formula of the loss function is as follows:
[0085]
[0086] Where d is the side length of the target area image, is the traffic accident risk prediction value corresponding to the i-th row and j-th column in the target area image, I r (i, j) is the corresponding position label value obtained through historical data statistics, and θ represents all the training parameters in the model. Finally, all parameters are solved by gradient descent. Through gradient descent, the optimal parameters are continuously searched until the loss function is less than a certain threshold.
[0087] The method proposed in this application evaluates the risk of traffic accidents in urban geographic space from the perspective of the fusion of visual information and urban multi-source data. In view of the shortcomings of previous traffic accident prediction models in terms of prediction granularity and accuracy, this application uses easily accessible urban static big data such as urban satellite images, urban road network data, and POI distribution data to achieve fine-grained urban geographic space traffic accident risk assessment. This application only requires historical traffic accident data of the target area during the training process, and this data will no longer be needed after the model training is completed. Cities or regions with rich data are selected to complete model training, and then they can be applied to underdeveloped cities or regions with relatively scarce data. This makes this application more scalable and applicable, and is of great significance for popularizing the widespread application of traffic accident risk prediction models.
[0088] In summary, the method proposed in this application ultimately achieves fine-grained urban traffic accident risk assessment at a relatively low cost, which is of great significance for ensuring the safety of residents' travel and improving urban basic transportation construction.
[0089] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement and improvement made by any person skilled in the art within the technical scope disclosed by the present invention and within the spirit and principle of the present invention shall be covered within the protection scope of the present invention. At the same time, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
Claims
1. A fine-grained traffic accident risk identification method in an urban geographic space, characterized by: The following steps are involved: Step 1: Build the dataset The three-channel RGB city satellite image and the city road network binary image are fused into a 4-channel image; Extract the number of different types of points of interest (POIs) within the target area and integrate the vector f e As external factors input; Step 2: Extract multi-scale features Extract target region I through VGG-16 neural network t and target neighborhood I s Multi-scale features (f1-f5); Step 3: Calculate spatial attention Capture low-level features f l and high-level features f h The complex spatial correlation between the two levels of features is achieved by using the following formula to perform spatial feature fusion: Among them, upsample4 means 4 times upsampling, conv means standard convolution operation, σ means sigmoid activation function, W h , W l They are trainable parameters for generating high-level and low-level features respectively; finally, the target area I is obtained respectively t and target neighborhood I s The high-level and low-level fusion features are expressed as and Step 4: Calculate channel attention Will and Spliced into an image with 2C channels, represented as The dimensions are d×d×2C; Will Fusion with the feature vector of external factors in the target area; Will Split along the channel direction, expressed as The i-th channel is represented by The weight value calculation formula for the i-th channel is as follows: where α i is the weight corresponding to the i-th channel, and the weight vector is Features generated after merging The result is then passed through a convolution layer to finally obtain the traffic accident risk for each pixel in the target area image. Step 5: Construct the loss function The specific calculation formula of the loss function is as follows: Where d is the side length of the target area image, is the traffic accident risk prediction value corresponding to the i-th row and j-th column in the target area image, I r (i, j) is the corresponding position label value obtained through historical data statistics, θ represents all the training parameters in the model, and finally all parameters are solved by gradient descent.
2. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: The different types of POIs include hotels, schools, shops, and transportation stations, and the integration vector fe is used as an external factor input.
3. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: The target region I is extracted by VGG-16 neural network t and target neighborhood I s The multi-scale features (f1-f5) of Five levels of features are generated from top to bottom through VGG-16. Four different dilated convolutional layers are used on each level of the generated features. The dilation rate r of the convolution kernel is set, the convolution kernel size is set to 3×3, and different dilation rates are set to r=1, r=3, r=5 and r=7 respectively; the features generated by the above four convolution kernels with different dilation rates are merged to finally obtain multi-scale features f1-f5 of different levels.
4. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: The specific method for generating low-level features is: upsample f2 by 2, upsample f3 by 4, merge f1 with the upsampled f2 and f3, and generate low-level features f through a convolution layer. l , the dimension is d×d×C, where C is a custom constant; The specific method for generating high-level features is: upsample f4 by 2 times, upsample f5 by 4 times, then merge f3 with the upsampled f4 and f5, and then pass another convolutional layer to generate high-level features f h , the dimension is 5. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: The It is fused with the feature vector of external factors in the target area. The specific contents are as follows: right Perform the maximum pooling operation to reduce the feature dimension, expand each channel into a vector, and use it as the input of the two-layer fully connected neural network FC. Use the ReLU activation function to obtain the output result vector v with a dimension of 1×C; Each channel of is converted into a vector of dimension 1×C, and the 2C channel vectors are merged to finally obtain The dimension is 1×C×2C, and this process is expressed by the following formula: Among them, concat means concatenating the two matrices in the brackets, pooling means pooling operation, FC means fully connected layer, W′ means all trainable parameters in the fully connected layer, and ReLU means ReLU activation function; The POI features f in the target area e As the input of the two-layer fully connected network FC, f e Encoded as a latent vector, denoted as f′ e , with dimensions of 1×C.
6. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: The premise for constructing the loss function described in step 5 is as follows: The total number of traffic accidents occurring within a certain range around the corresponding position of each pixel is counted, and the value range is set to 0-100 through the correction coefficient. Construct labels and scan each pixel in the target area image. t (i, j) represents the i-th row and j-th column position of the target image, and the statistics I t The number of historical traffic accidents within 100 meters of the corresponding geographic space is used as the I t The risk value I corresponding to the pixel (i, j) r (i, j).
7. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: The loss function is defined as the product of the absolute error between the predicted value and the true value of the corresponding pixel point and the true value plus 1.
8. The method for identifying fine-grained traffic accident risks in urban geographic space according to claim 1 is characterized by: Select target area I from 4-channel image t and target neighborhood I s As the input of the model, I t is a 4-channel square image with dimensions d×d×4, I s The center point and I t The same, square image with a side length of 2d, that is, a 4-channel image with a dimension of 2d×2d×4; where d is the target area I t The side length of .
Citation Information
Patent Citations
Personalized traffic accident risk prediction and recommendation method based on depth learning
CN109117987A
Traffic scene risk assessment method and system based on multi-branch convolutional neural network
CN112016499A
Urban traffic accident risk prediction method based on road network
CN113283665A
Apparatus and method for automated traffic and driving pattern recognition and location-dependent measurement of absolute and / or relative risk probabilities for car accidents
US20190283745A1
Mitigating risk behaviors
US20210107501A1
