Accident pre-collision dangerous scene generation method, system and equipment
Patent Information
- Application Number
- CN202411394917.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-28
AI Technical Summary
When the existing technology generates dangerous scenarios, the selection of scene elements is subjective and cannot objectively and comprehensively reflect the real traffic accident scene elements. It also requires manual cleaning of data, with high error rate and long time. The generated typical scene cannot cover real road traffic. Dangerous scenarios.
By collecting cases of real traffic accidents, based on aerial maps, the static scene of the accident is reappeared, and the road is automatically encoded. The pre -built VGG16 network recognition model is used to extract the information features of the multi -dimensional accident scene element, and the dangerous dynamic scene of the pre -collision of the accident is generated.
Reduce the unclear logic and inconspicuous risks that occur during artificially handling accident data, save labor and time costs, improve work efficiency and data quality, and generate high -coverage, high -precision Open format dangerous scenes data.
Smart Images

Figure CN119380218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle test verification scenario construction, and in particular to a method, system and device for generating an accident pre-collision danger scenario. Background Art
[0002] Scenario-based virtual testing technology has the characteristics of high test efficiency, strong repeatability and low cost. Therefore, scenarios are an important means of testing and verifying autonomous vehicles in the future. The test method for verifying vehicle safety performance based on natural driving scenarios and dangerous scenarios is widely recognized by the industry, and mainly uses scene data in openX format. The current method for generating dangerous scenarios is mainly to select scene elements from a large number of accidents for cluster analysis. The generated typical dangerous scenarios cannot be automatically loaded into various simulation test software, and it is necessary to manually build vehicle models, road models, etc. in the simulation software.
[0003] Problems with existing technologies:
[0004] At present, the method of generating dangerous scene data by analyzing and reconstructing a large number of existing traffic accident scene elements has the following problems:
[0005] (1) The selection of scene elements is relatively subjective and cannot objectively and comprehensively reflect the elements of real traffic accident scenes.
[0006] (2) The selected traffic accident scene data needs to be manually cleaned, which has a high error rate and is time-consuming.
[0007] (3) The typical dangerous scenarios derived from typical scenarios generated by clustering and other methods cannot cover the dangerous scenarios in real road traffic. Summary of the invention
[0008] In order to solve the above technical problems, the present invention proposes a method, system and device for generating accident pre-collision danger scenes. The present invention collects real traffic accident cases, proposes to reproduce the static scene of the accident based on aerial photos, and automatically encodes the roads, which can reduce the risk of unclear logic and unclear classification errors when manually processing accident data, save labor and time costs, and thus improve work efficiency and data quality.
[0009] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0010] A method for generating a pre-collision accident danger scene, the method comprising the following steps:
[0011] Receiving an aerial photo of the accident scene sent by a user, and processing the aerial photo to generate image data of the accident scene to be analyzed;
[0012] Inputting the accident scene image data into a pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features;
[0013] Generate accident pre-collision danger dynamic scene based on the extracted multi-dimensional accident scene element information features;
[0014] The pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the multi-layer perceptron is composed of two classifier layers, two batch normalization layers, and two fully connected layers;
[0015] Two fully connected layers consist of 512 neurons and Leaky ReLU activation function, and a batch normalization layer is connected after each fully connected layer.
[0016] According to the above technical means, in order to realize the generation of dynamic scene data from the acquired static image data, a VGG16 network recognition model is constructed, and the model is trained to realize the classification output of the data.
[0017] Furthermore, the steps of pre-building the VGG16 network recognition model specifically include:
[0018] Initialize the VGG16 network model and load the pre-trained weights of the VGG16 network model;
[0019] The last layer of the VGG16 network is replaced with a multi-layer perception layer to generate a VGG16 network recognition architecture;
[0020] Obtain aerial images based on multi-dimensional scene element information data, and generate static scene road data after preprocessing;
[0021] Analyze the data type in the static scene road data, process the data type based on the encoding mode, generate a data set, divide the data set into a training set and a test set, input the data set into a VGG16 network recognition architecture for training and testing, and generate a pre-built VGG16 network recognition model;
[0022] The data types include road type data, intersection data, lane data, lane dividing line data and road network data.
[0023] According to the above technical means, in order to achieve more accurate scene reproduction, it is necessary to collect and classify various types of data in the static scene when constructing the model data set, so as to achieve the purpose of high restoration.
[0024] Further, the step of analyzing the data type in the static scene road data and processing the data type based on the encoding mode includes:
[0025] Analyze the data types in the static scene road data, extract road type data, intersection data, lane data, lane dividing line data and road network data respectively, and generate coded data corresponding to different data types;
[0026] The road type data is set to road coding data representing an intersection, a composite road section and a common road section respectively;
[0027] The intersection data is set to intersection coding data indicating the number of intersections;
[0028] The lane data is set to lane line coding data indicating the number of lanes and ground indication signs;
[0029] The lane line data is set to lane line coding data indicating the number of lane lines;
[0030] The road network data is set to road network logic coding data based on intersection coding data and lane line coding data.
[0031] According to the above technical means, in order to achieve static and clear data of the acquired aerial images, the aerial images need to be processed.
[0032] Furthermore, the steps of receiving an aerial photo of the accident scene sent by a user, and processing the aerial photo to generate image data of the accident scene to be analyzed include: receiving an aerial photo of the accident sent by a user, removing shadows and marking the aerial photo, and generating image data of the accident scene to be analyzed.
[0033] According to the above technical means, after obtaining the aerial image, it is necessary to extract various image features in the aerial image and encode the extracted features to generate a dynamic scene.
[0034] Furthermore, the step of inputting the accident scene image data into the pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features is specifically as follows:
[0035] The accident scene image data is input into the pre-built VGG16 network recognition model, the accident occurrence features in the accident scene image data are extracted, and the following steps are performed:
[0036] Identify the road type, which includes intersections, composite sections and ordinary sections, and extract the corresponding road coding data according to different road types;
[0037] Determine whether the accident occurred outside the intersection. If so, set the intersection where the accident occurred as the first code, and encode the remaining intersections in a clockwise manner to generate the intersection-outside code data. If the accident occurred inside the intersection, extract the intersection data that the parties drove into when the accident occurred and set it as the second code. Encode the remaining intersections in a clockwise manner to generate the intersection-inside code data.
[0038] Extract the road section information of the accident location. If it is a composite road section, the road section where the lane of the accident party has not changed is used as the assumed intersection and coded as "roadid=1", and the road section after the change is coded as "roadid=2"; if it is an ordinary road section, the front of the lane where the accident party is located is used as the assumed intersection and coded as "roadid=1";
[0039] Respectively extracting lanes and lane dividing lines in the accident scene image data;
[0040] The lanes entering the intersection are coded as "negative", and the lanes leaving the intersection are coded as "positive", and the codes are increased from left to right based on the median of the road;
[0041] The lane dividers are based on the center divider, the center divider of the two-way lane is coded as "lineid=0", and the lane dividers entering the intersection are all coded as "negative", and the lane dividers leaving the intersection are all coded as "positive". The lane dividers are numbered from left to right from the center divider, and the markings of the lane dividers on the right side of each lane are consistent with the lane markings;
[0042] The road network logic information of the accident location is extracted, wherein the road network logic information includes an exit intersection data code, an exit lane line code, ground marking data, an entry intersection data code, and an exit lane line code.
[0043] Furthermore, the fully connected layer includes 512 neurons and a Leaky ReLU activation function, a batch normalization layer is connected after each fully connected layer, and the classifier layer uses a Softmax function to classify the input data.
[0044] Furthermore, the step of analyzing the data type in the static scene road data and processing the data type based on the encoding mode also includes converting the data in the static scene road data into an XODR file for processing using XML language.
[0045] Furthermore, the step of generating a pre-collision hazard dynamic scene according to the extracted multi-dimensional accident scene element information features includes:
[0046] The extracted multi-dimensional accident scene element information features are input into a dynamic scene generation model to generate an accident pre-collision danger dynamic scene, wherein the dynamic scene data output by the accident pre-collision danger dynamic scene is converted into an XOSC file using XML language.
[0047] According to the purpose of the present invention, the present invention also proposes a system for generating a pre-collision accident danger scene, the system is applied to the method for generating a pre-collision accident danger scene as described above, and the system comprises:
[0048] A receiving module, used to receive the aerial photo of the accident scene sent by the user;
[0049] A processing module, used to process the aerial image to generate accident scene image data to be analyzed;
[0050] An extraction module, used for inputting the accident scene image data into a pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features;
[0051] A dynamic scene generation module is used to generate a pre-collision accident hazard dynamic scene based on the extracted multi-dimensional accident scene element information features;
[0052] The pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the multi-layer perceptron is composed of two classifier layers, two batch normalization layers, and two fully connected layers;
[0053] Two fully connected layers consist of 512 neurons and Leaky ReLU activation function, and a batch normalization layer is connected after each fully connected layer.
[0054] The present invention further provides an electronic device, comprising:
[0055] The memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the above-mentioned method steps.
[0056] Beneficial effects of the present invention:
[0057] This patent uses an in-depth accident investigation method to collect real traffic accident cases, proposes to reproduce the static scene of the accident based on aerial photos, and automatically encodes the roads, which can reduce the risk of errors caused by unclear logic and unclear classification when manually processing accident data, save labor and time costs, and thus improve work efficiency and data quality. It is proposed to integrate the scene parameters of real traffic accidents and convert the scene data to generate open format dangerous scene data with high coverage and high precision, which can guide the technical method of dangerous scene generation and increase the application value of accident data. Based on the generated open standard format accident scene data, it can promote the fluidity, interoperability and use efficiency of traffic accident data in different simulation software and systems. It can guide OEMs to develop new safety technologies, which is convenient for OEMs to improve the efficiency of vehicle active safety performance testing, shorten the test cycle and save testing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flow chart of the method for generating accident pre-collision danger scenarios proposed by the present invention;
[0059] Figure 2 A coding schematic diagram of the accident pre-collision danger scenario generation method proposed by the present invention;
[0060] Figure 3 This is a diagram showing an embodiment of a method for generating a pre-collision risk scenario according to the present invention;
[0061] Figure 4 This is a framework diagram of the accident pre-collision danger scenario generation system proposed by the present invention. DETAILED DESCRIPTION
[0062] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0063] This embodiment provides a method for generating a pre-collision accident danger scene, the method comprising the following steps:
[0064] Step S101: receiving an aerial photo of the accident scene sent by a user, and processing the aerial photo to generate accident scene image data to be analyzed;
[0065] Step S102: Input the accident scene image data into a pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features;
[0066] Step S103. Generate an accident pre-collision danger dynamic scene based on the extracted multi-dimensional accident scene element information features;
[0067] The pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the multi-layer perceptron consists of two classifier layers, two batch normalization layers and two fully connected layers.
[0068] In this embodiment, the steps of pre-building the VGG16 network recognition model specifically include:
[0069] Initialize the VGG16 network model and load the pre-trained weights of the VGG16 network model;
[0070] The last layer of the VGG16 network is replaced with a multi-layer perception layer to generate a VGG16 network recognition architecture;
[0071] Obtain aerial images based on multi-dimensional scene element information data, and generate static scene road data after preprocessing;
[0072] Analyze the data type in the static scene road data, process the data type based on the encoding mode, generate a data set, divide the data set into a training set and a test set, input the data set into a VGG16 network recognition architecture for training and testing, and generate a pre-built VGG16 network recognition model;
[0073] The data types include road type data, intersection data, lane data, lane dividing line data and road network data.
[0074] It should be noted that the VGG16 network recognition architecture of this embodiment improves the original network model by introducing a multi-layer perceptron (MLP). Specifically, the improved multi-layer perceptron MLP replaces the last layer of the VGG16 model to generate a VGG16 network recognition model. The VGG network contains 13 convolutional layers and 3 fully connected layers; the improved VGG16 introduces a multi-layer perceptron, and the multi-layer perceptron (MLP) consists of two classifier layers, two batch normalization layers, and two fully connected layers.
[0075] In this embodiment, the configuration of the multilayer perceptron includes:
[0076] For each fully connected layer, 512 neurons and Leaky ReLU activation function are used. A batch normalization layer and a Dropout layer are connected after each fully connected layer to prevent overfitting. The image classification result is output through the Softmax activation function.
[0077] The formula for the Leaky ReLU activation function is as follows:
[0078]
[0079] In order to eliminate the difficulty in model training caused by different trends in the partial derivatives of model parameters, the feature vector of each sample needs to be standardized. Since calculating the mean and mean square error of all samples at one time requires high computer hardware performance, in order to reduce hardware requirements, batch normalization is introduced by introducing Batch. First, the batch is divided into smaller batches, and then the mean and mean square error of the samples in the batch need to be calculated, and then the feature vectors of the samples in the batch are standardized to update the parameters.
[0080] For the classifier layer, the Softmax function is used. The category prediction value output by the network needs to be converted into a probability form through the softmax function. The predicted probability value of each category is obtained and then passed to the cross entropy loss function for calculation. The calculation formula of the softmax function is as follows:
[0081]
[0082] Among them, i represents the i-th category, z i Indicates the score of category i predicted by the network, the numerator is the exponential of the i-th fraction predicted by the network, and the denominator is the sum of the exponentials of the fractions of all categories predicted by the network, with a total of k categories. Because the exponential function is non-negative, and the output of the network is positive and negative, the softmax function can be used to map the output to between (0, 1), and the sum of these values is 1.
[0083] Use weighted cross entropy as the network model loss function. In image classification tasks, the cross entropy loss function is generally used to calculate the difference between the output and the labeled label value. The formula of the cross entropy loss function is as follows:
[0084]
[0085] Among them, y i is the true value of category i, p i is the probability value of category i, and k is the number of categories.
[0086] The model is trained with the minimum cross entropy loss function as the training goal until the set number of iterations epoch is reached, and the trained semantic segmentation model trained-model is saved.
[0087] The aerial image that needs to be recognized for static environmental information is taken as input and passed into the trained-model to complete the classification and recognition of the static environmental information of the aerial image.
[0088] Analyze the data types in the static scene road data, extract road type data, intersection data, lane data, lane dividing line data and road network data respectively, and generate coded data corresponding to different data types;
[0089] The road type data is set to road coding data representing an intersection, a composite road section and a common road section respectively;
[0090] The intersection data is set to intersection coding data indicating the number of intersections;
[0091] The lane data is set to lane line coding data indicating the number of lanes and ground indication signs;
[0092] The lane line data is set to lane line coding data indicating the number of lane lines;
[0093] The road network data is set to road network logic coding data based on intersection coding data and lane line coding data.
[0094] In this embodiment, the training of the network model is implemented based on the data set, and a large amount of pre-collected road data is classified and encoded to achieve the integrity of the scene construction. In this process, the purpose is to realize the representation of different features in the scene. The coded data can be Arabic data or various characters. It only needs to be able to determine in the model that different characters represent different meanings. For example, the intersection data can be encoded as Arabic numerals such as 1, 2, 3, or can be represented in Greek alphabetical order. The present invention does not make specific restrictions. It should be noted that the implementation of this step can make it possible to extract a corresponding feature in the picture after inputting the image data and represent it with a unique corresponding code, so that when constructing a dynamic scene reproduction, it only needs to be restored in the scene construction model according to the coded data extracted from the input image.
[0095] In step S101, an aerial photo of the accident scene sent by a user is received and processed to generate image data of the accident scene to be analyzed. In this process, the aerial photo needs to be processed to make the image clearer and the feature extraction more accurate. In this embodiment, the aerial image shadow removal processing can utilize Adobe Lightroom software to change the light and dark relationship, fill the corresponding pixels, and remove the shadow by adjusting properties such as color, brightness or contrast.
[0096] It should be noted that after a traffic accident occurs, if it is judged that the collection conditions are met, the accident that meets the collection conditions is collected by marking the on-site information, aerial photography, 360-degree environmental photography, measurement and post-event tracking. The collection content includes basic information of roads around the accident, traffic infrastructure information, environmental information, and motion interaction information. If it is judged that the aerial photo meets the collection requirements, the collected information is archived. The actual operation of this embodiment is also carried out under the condition of accident restoration, and not for other purposes.
[0097] In step S102, after obtaining the aerial image, it is necessary to extract various image features in the aerial image and encode the extracted features to generate a dynamic scene. The steps of inputting the accident scene image data into the pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features are as follows:
[0098] The accident scene image data is input into the pre-built VGG16 network recognition model, the accident occurrence features in the accident scene image data are extracted, and the following steps are performed:
[0099] Identify the road type, which includes intersections, compound sections and ordinary sections, and extract the corresponding road coding data according to different road types.
[0100] It should be noted that in reality, lanes may widen or narrow. Therefore, the composite road section in this embodiment refers to a road section where the lane is widened or narrowed, and the ordinary road section is a road section where the lane itself does not change and is a straight road. The division of road sections is also based on different road conditions in reality. In reality, some roads will narrow or widen at a certain section of the road according to different driving requirements. Therefore, corresponding coding for whether the road changes can achieve a high degree of restoration of the scene reproduction.
[0101] Determine whether the accident occurred outside the intersection. If so, set the intersection where the accident occurred as the first code, and encode the remaining intersections in a clockwise manner to generate the intersection-outside code data. If the accident occurred inside the intersection, extract the intersection data that the parties drove into when the accident occurred and set it as the second code. Encode the remaining intersections in a clockwise manner to generate the intersection-inside code data.
[0102] Extract the road section information of the accident location. If it is a composite road section, the road section where the lane of the accident party has not changed is used as the assumed intersection and coded as "roadid=1", and the road section after the change is coded as "roadid=2"; if it is an ordinary road section, the front of the lane where the accident party is located is used as the assumed intersection and coded as "roadid=1";
[0103] Respectively extracting lanes and lane dividing lines in the accident scene image data;
[0104] The lanes entering the intersection are coded as "negative", and the lanes leaving the intersection are coded as "positive", and the codes are increased from left to right based on the median of the road;
[0105] The lane dividers are based on the center divider, the center divider of the two-way lane is coded as "lineid=0", and the lane dividers entering the intersection are all coded as "negative", and the lane dividers leaving the intersection are all coded as "positive". The lane dividers are numbered from left to right from the center divider, and the markings of the lane dividers on the right side of each lane are consistent with the lane markings;
[0106] The road network logic information of the accident location is extracted, wherein the road network logic information includes an exit intersection data code, an exit lane line code, ground marking data, an entry intersection data code, and an exit lane line code.
[0107] The following is an embodiment of the present invention, used to illustrate the specific implementation process of the technical solution of the present invention.
[0108] The static road traffic network is coded, covering the modeling description of roads, lanes, intersections, etc. This code is composed of 10 digits, such as Figure 2 As shown, it can be divided into the following aspects:
[0109] Road type classification code: Indicates the type of the coded object. This position is filled with 1-3. 1 indicates an intersection; 2 indicates a composite road section; 3 indicates an ordinary road section.
[0110] Intersection number code: Indicates the number of intersections, this position is filled with 1-8. If the accident collision point is outside the intersection, it is coded according to the intersection coding method ①; if the accident collision point is inside the intersection, it is necessary to read the participant number and encode it according to the intersection coding method ②; if the accident collision point is a road section, it is necessary to read the participant code, assuming that the intersection is coded according to the intersection coding method ③.
[0111] ① For accidents that occur outside intersections, the intersection where the first collision point is located is coded as "roadid=1", and the remaining intersections are coded in a clockwise order, such as 1, 2, 3, 4.
[0112] ② For accidents occurring at intersections, the intersection through which the parties entered is coded as “roadid=1”, and the remaining intersections are numbered in ascending order in a clockwise manner, such as 1, 2, 3, 4.
[0113] ③ For accidents occurring on a composite road section, the section where the lane of participant 1 has not changed is the "hypothetical intersection" and is coded as "roadid=1", and the section where the lane has changed is coded as "roadid=2"
[0114] ④ For an accident occurring on an ordinary road section, the lane in front of participant 1 in the driving direction is taken as the “hypothetical intersection” and is coded as “roadid=1”.
[0115] Lane code: Indicates the number of lanes. Fill this position with -6--1,1-6. If the accident collision point is an intersection, the lane coding method ① is used for coding along the road driving direction; if the accident collision point is a composite road section, the lane coding method ② is used for coding; if the accident collision point is an ordinary road section, the lane coding method ③ is used for coding.
[0116] ① The lanes entering the intersection are all coded with "negative" codes, and the lanes leaving the intersection are all coded with "positive" codes; the lane codes increase from left to right from the center isolation point.
[0117] ② For accidents occurring in a composite road section, the direction and number of lane changes are identified, and the section where the lanes of the participating parties have not changed is regarded as the “assumed intersection”. The lanes entering the intersection are all coded “negative”, and the lanes leaving the intersection are all coded “positive”. The specific method is the same as above.
[0118] ③ For an accident occurring on a normal section of a lane, the lanes entering the “hypothetical intersection” in the direction of travel of the participating parties are coded “negative” and the lanes exiting the intersection are coded “positive”. The specific method is the same as above.
[0119] Lane dividing line code: Indicates the number of lane dividing lines. Fill in -6-6. If the accident collision point is an intersection, the lane dividing line coding method ① is used for coding; if the accident collision point is a road section, the lane dividing line coding method ② is used for coding.
[0120] ① The lane line coding is based on the center dividing line. The center dividing line of the two-way lane is coded "lineid=0", the lane lines entering the intersection are coded "negative" and the lane lines leaving the intersection are coded "positive". The lane line numbers are coded from left to right in increasing order from the center dividing line. The ID of the lane line on the right side of each lane is consistent with the lane ID.
[0121] ② For accidents occurring in a composite road section, the lane change direction and number are identified. The section where the lane of participant 1 has not changed is taken as the “assumed intersection”. The lane dividing line coding is based on the center dividing line. The center dividing line of the two-way lane is coded as “lineid=0”. The lane dividing lines entering the intersection are coded as “negative”, and the lanes leaving the intersection are coded as “positive”. The specific method is the same as above.
[0122] ③ For an accident occurring on a normal section of a lane, the lane dividing line coding is based on the “hypothetical intersection” in front of the lane where participant 1 is traveling in the same direction. The middle dividing line of the two-way lane is coded as “lineid=0”, and the lanes entering the intersection are coded as “negative”, and the lanes leaving the intersection are coded as “positive”. The specific method is the same as above.
[0123] Road network logic code: describes the road network logic. The road network logic is defined by the intersection code, lane number code and ground sign. This bit consists of 5 bits of code. The first bit indicates the intersection code of the exit intersection, the second bit indicates the exit lane line code, the third bit indicates the ground sign, the fourth bit indicates the entrance intersection code, and the fifth bit indicates the exit lane line code. Among them, the straight sign is represented by 1; the left turn sign is represented by 2; the right turn sign is represented by 3; and the U-turn sign is represented by 4.
[0124] ①In the intersection, code according to the above method.
[0125] ② For composite road sections, it is necessary to identify the direction of road section changes and specific changes in signs based on ground signs, and then encode the logical connection relationship of the driving path within the road. The encoding method is the same as above.
[0126] ③Compound road section, the logical connection relationship of the driving path within the road is "connection = 0"
[0127] The following is a static road network modeling based on specific cases. Figure 3 :
[0128] A. Encoding road geometry:
[0129] The first step is to determine the road type and encode the road type. Encoding 1 indicates an intersection.
[0130] The second step is to determine the location of the first collision point of the accident and encode the intersection number. The first collision point location includes outside the intersection, inside the intersection, composite section and ordinary section. The intersection where the first collision point is located is coded as "roadid=1". In a clockwise direction, the "roadid" of other intersections are 2, 3, and 4 respectively;
[0131] The third step is to determine the central partition and encode the lane number. The lane coding is from left to right from the central partition, increasing in sequence; the lane entering the intersection is coded as "negative", and the lane leaving the intersection is coded as "positive"; the "negative" coding is -1, -2, -3, -4..., and the "positive" coding is 1, 2, 3, 4...
[0132] The fourth step is to encode the lane lines. The lane line coding is based on the central divider. The central divider of the two-way lane is coded as "laneid=0", and the code increases from the central divider from left to right. That is, facing the direction of the road, the lane lines of the lane entering the intersection are numbered 0, -1, -2, -3, -4... from left to right, and the lane lines of the lane leaving the intersection are numbered 0, 1, 2, 3, 4... from left to right.
[0133] The road network logic coding is calculated based on the road type and the road network logic coding method of the intersection. For example,
[0134] “connection=1-1-2-2-1” means turning left from lane 1 of intersection 1 to lane 1 of intersection 2.
[0135] This method encodes the road geometry and road network logic according to the open scene format requirements, solves the problem of unclear classification of scene elements such as lane lines, edge lines, road surface arrows, and unclear logical links, and saves labor costs.
[0136] It should be noted that the above encoding method allows various types of feature encoding data to be output after the aerial photos are acquired and feature extraction is performed according to the VGG16 network recognition model, and the extracted multi-dimensional accident scene element information features are input into the dynamic scene generation model to generate an accident pre-collision hazard dynamic scene.
[0137] In this embodiment, according to the scene description method specified by the open standard:
[0138] The first step is to convert the static scene data into an XODR file using XML language, which mainly includes road elements, geometric shapes, road network logic, etc.
[0139] The second step is to convert the output dynamic scene data into a XOSC file using XML language, which mainly includes action sets, operations, events, etc.
[0140] An open format accident pre-collision scenario is formed based on the reconstruction of multi-dimensional scene elements driven by accident data, while ensuring the interoperability required for data exchange between different applications, thereby improving the efficiency of scene data use.
[0141] The static scene data XODR file and dynamic scene data XOSC file generated in the open format are stored.
[0142] It should be noted that, in this embodiment, in the process of data collection to train the VGG16 model and the information collection process for feature extraction of aerial photos, analysis can be performed according to the actual situation. Since the present invention does not specifically limit the technical scheme for collecting information, and the method of obtaining information clearly meets the requirements, it is not repeated. At the same time, after the modeling is completed, the model can be compared and analyzed with the video of the actual accident to determine the feasibility of model construction. The purpose of the present invention is the overall construction process of the scene generation solution. Therefore, the data collection and data verification links are not the content that needs to be protected by the present invention, but those skilled in the art should know that these processes can be realized through existing technical solutions.
[0143] According to the purpose of the present invention, the present invention also proposes a system for generating accident pre-collision danger scenarios, such as Figure 4 As shown, the system is applied to the accident pre-collision danger scene generation method as described above, and the system 40 includes:
[0144] The receiving module 401 is used to receive the aerial photo of the accident scene sent by the user;
[0145] A processing module 402 is used to process the aerial image to generate accident scene image data to be analyzed;
[0146] An extraction module 403 is used to input the accident scene image data into a pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features;
[0147] A dynamic scene generation module 404 is used to generate an accident pre-collision danger dynamic scene according to the extracted multi-dimensional accident scene element information features;
[0148] The pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the multi-layer perceptron consists of two classifier layers, two batch normalization layers and two fully connected layers.
[0149] The present invention further provides an electronic device, comprising:
[0150] The memory is used to store computer programs; the processor is used to execute the programs stored in the memory to implement the above-mentioned method steps.
[0151] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated.
[0152] It should be noted that there is no specific restriction on the method for measuring the displacement of the dummy model, and it only needs to meet the displacement measurement requirements in practice.
[0153] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
Claims
1. A method for generating a pre-collision risk scenario, characterized in that: The method comprises the following steps: Receive an aerial photo of the accident scene sent by a user, process the aerial photo to generate accident scene image data to be analyzed; input the accident scene image data into a pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features; Generate accident pre-collision danger dynamic scene based on the extracted multi-dimensional accident scene element information features; The pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the multi-layer perceptron is composed of two classifier layers, two batch normalization layers, and two fully connected layers; Two fully connected layers consist of 512 neurons and Leaky ReLU activation function, and a batch normalization layer is connected after each fully connected layer.
2. The method for generating accident pre-collision danger scenarios according to claim 1, characterized in that: The steps to pre-build the VGG16 network recognition model include: Initialize the VGG16 network model and load the pre-trained weights of the VGG16 network model; The last layer of the VGG16 network is replaced with a multi-layer perception layer to generate a VGG16 network recognition architecture; Obtain aerial images based on multi-dimensional scene element information data, and generate static scene road data after preprocessing; Analyze the data type in the static scene road data, process the data type based on the encoding mode, generate a data set, divide the data set into a training set and a test set, input the data set into a VGG16 network recognition architecture for training and testing, and generate a pre-built VGG16 network recognition model; The data types include road type data, intersection data, lane data, lane dividing line data and road network data.
3. The method for generating accident pre-collision danger scenarios according to claim 2, characterized in that: The step of analyzing the data type in the static scene road data and processing the data type based on the encoding mode comprises: Analyze the data types in the static scene road data, extract road type data, intersection data, lane data, lane dividing line data and road network data respectively, and generate coded data corresponding to different data types; The road type data is set to road coding data representing an intersection, a composite road section and a common road section respectively; The intersection data is set to intersection coding data indicating the number of intersections; The lane data is set to lane line coding data indicating the number of lanes and ground indication signs; The lane line data is set to lane line coding data indicating the number of lane lines; The road network data is set to road network logic coding data based on intersection coding data and lane line coding data.
4. The method for generating accident pre-collision danger scenarios according to claim 3, characterized in that: The steps of receiving an aerial photo of the accident scene sent by a user and processing the aerial photo to generate image data of the accident scene to be analyzed include: receiving an aerial photo of the accident sent by a user, removing shadows and marking the aerial photo, and generating image data of the accident scene to be analyzed.
5. The method for generating accident pre-collision danger scenarios according to claim 4, characterized in that: The step of inputting the accident scene image data into the pre-built VGG16 network recognition model to extract the multi-dimensional accident scene element information features is specifically: inputting the accident scene image data into the pre-built VGG16 network recognition model, extracting the accident occurrence features in the accident scene image data, and entering the following steps: Identify the road type, which includes intersections, composite sections and ordinary sections, and extract the corresponding road coding data according to different road types; Determine whether the accident occurred outside the intersection. If so, set the intersection where the accident occurred as the first code, and encode the remaining intersections in a clockwise manner to generate the intersection-outside code data. If the accident occurred inside the intersection, extract the intersection data that the parties drove into when the accident occurred and set it as the second code. Encode the remaining intersections in a clockwise manner to generate the intersection-inside code data. Extract the road section information of the accident location. If it is a composite road section, the road section where the lane of the accident party has not changed is used as the assumed intersection and coded as "roadid=1", and the road section after the change is coded as "roadid=2"; if it is an ordinary road section, the front of the lane where the accident party is located is used as the assumed intersection and coded as "roadid=1"; Respectively extracting lanes and lane dividing lines in the accident scene image data; The lanes entering the intersection are coded as "negative", and the lanes leaving the intersection are coded as "positive", and the codes are increased from left to right based on the median of the road; The lane dividers are based on the center divider. The center divider of the two-way lane is coded as "lineid=0". The lane dividers entering the intersection are all coded as "negative" and the lane dividers leaving the intersection are all coded as "positive". The lane divider numbers are coded from left to right from the center divider. The markings of the lane dividers on the right side of each lane are consistent with the lane markings. The road network logic information of the accident location is extracted, wherein the road network logic information includes an exit intersection data code, an exit lane line code, ground marking data, an entry intersection data code, and an exit lane line code.
6. The method for generating accident pre-collision danger scenarios according to claim 5, characterized in that: The fully connected layer includes 512 neurons and a Leaky ReLU activation function. A batch normalization layer is connected after each fully connected layer. The classifier layer uses a Softmax function to classify the input data.
7. The method for generating accident pre-collision danger scenarios according to claim 2, characterized in that: The step of analyzing the data type in the static scene road data and processing the data type based on the encoding mode also includes converting the data in the static scene road data into an XODR file for processing using XML language.
8. The method for generating accident pre-collision danger scenarios according to claim 1, characterized in that: The steps of generating a pre-collision hazard dynamic scene according to the extracted multi-dimensional accident scene element information features include: The extracted multi-dimensional accident scene element information features are input into a dynamic scene generation model to generate an accident pre-collision danger dynamic scene, wherein the dynamic scene data output by the accident pre-collision danger dynamic scene is converted into an XOSC file using XML language.
9. An accident pre-collision danger scene generation system, characterized in that: The system is applied to the method for generating an accident pre-collision danger scenario according to any one of claims 1 to 8, and the system comprises: A receiving module, used to receive the aerial photo of the accident scene sent by the user; A processing module, used to process the aerial image to generate accident scene image data to be analyzed; An extraction module, used for inputting the accident scene image data into a pre-built VGG16 network recognition model to extract multi-dimensional accident scene element information features; A dynamic scene generation module is used to generate an accident pre-collision hazard dynamic scene based on the extracted multi-dimensional accident scene element information features; wherein the pre-built VGG16 network recognition model includes a multi-layer perceptron, wherein the multi-layer perceptron is composed of two classifier layers, two batch normalization layers and two fully connected layers.
10. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer programs; a processor for executing the programs stored in the memory to implement the method steps as described in any one of claims 1 to 8.