Comprehensive Index Calculation Method for Autonomous Driving Scenario Library
Through multi-sensor data fusion and completion technology, combined with dynamic lane width and collision risk indicator calculation, the problems of data loss and inaccuracy in autonomous driving are solved, and the safety and efficiency of the system are improved.
Patent Information
- Application Number
- CN202510398109.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-04-01
AI Technical Summary
In autonomous driving technology, it is difficult for existing methods to effectively integrate different sensor data, resulting in missing or inaccurate trajectory data, and the inability to timely and accurately calculate dynamic lane width and collision risk indicators, affecting the safety and efficiency of autonomous driving.
Data is obtained through the on-board GNSS module, wheel speed sensor and front-view camera, data fusion is used to fusion, timing convolution network and microgated loop unit network cascade structure for trajectory data completion, and dynamic collision risk indicators are generated by combining Frenet frames and dynamic lane width calculations.
It improves the integrity and accuracy of trajectory data, enhances the grasp of the vehicle's movement status of the autonomous driving system, promptly warns and reduces collision accidents, and improves the smoothness and comfort of driving.
Smart Images

Figure CN119903310B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous driving. More specifically, the present invention relates to a comprehensive index calculation method for an autonomous driving scenario library. Background Art
[0002] In the development process of autonomous driving technology, accurately constructing a scenario library and calculating comprehensive indexes are crucial for realizing safe and efficient autonomous driving.
[0003] Currently, the data collection of autonomous vehicles mainly relies on multiple sensors, such as in-vehicle GNSS modules, wheel speed sensors, and front-view cameras. However, there are errors and instabilities in the data of different sensors. For example, the in-vehicle GNSS module may have inaccurate positioning in certain environments (such as urban canyons with high-rise buildings, tunnels, etc.), resulting in deviations in three-dimensional positioning data; the wheel speed pulse data obtained by the wheel speed sensor may be affected by factors such as tire wear and road conditions, thus generating errors; the image data obtained by the front-view camera may be interfered by conditions such as light and weather, causing the image quality to decline and affecting subsequent analysis and processing.
[0004] In terms of data fusion, existing methods often fail to fully utilize the advantages of different sensor data, resulting in missing or inaccurate fused trajectory data. When there are consecutive null value regions in the fused trajectory data, how to accurately mark and fill in these missing data is an urgent problem to be solved. Traditional data filling methods may not be able to consider the temporal characteristics of the data, resulting in a large deviation between the filled trajectory data and the actual situation.
[0005] For the calculation of lane width, most existing methods use fixed values or simple averages and cannot be dynamically adjusted according to the actual driving situation. In actual driving, the lane width may change due to factors such as road construction and vehicle lane changes. If the dynamic lane width cannot be calculated accurately and in a timely manner, it may lead to dangerous situations such as the autonomous vehicle running over the line or deviating from the lane during driving.
[0006] In terms of collision risk assessment, existing index calculation methods often only consider a single factor, such as longitudinal distance or lateral distance, while ignoring other important factors such as road curvature. The change of road curvature affects the driving trajectory and speed of the vehicle, thus having an important impact on the collision risk. Therefore, how to comprehensively consider multiple factors and accurately calculate the dynamic collision risk index is the key to improving the safety of autonomous driving.
[0007] In addition, in terms of scene classification, existing methods lack comprehensive consideration of multiple metrics, resulting in inaccurate scene classification. The characteristics of following scenarios, lane-changing scenarios, and intersection scenarios are complex and diverse, and it is difficult to accurately distinguish these scenarios relying solely on a single metric. Therefore, a method that can comprehensively consider multiple factors is needed to achieve accurate classification of autonomous driving scenarios. Summary of the Invention
[0008] One object of the present invention is to solve at least the above problems and provide at least the advantages described hereinafter.
[0009] Through a series of steps, including data acquisition, fusion, completion, processing, as well as metric calculation and scene classification, the present invention aims to improve the accuracy of comprehensive metric calculation and the reliability of scene classification.
[0010] To achieve these objects and other advantages according to the present invention, there is provided a method for calculating comprehensive metrics for an autonomous driving scenario library, characterized by including the following steps:
[0011] S1. Obtain three-dimensional positioning data through an in-vehicle GNSS module, obtain wheel speed pulse data through a wheel speed sensor, and obtain image data through a front-view camera;
[0012] S2. Input the three-dimensional positioning data and wheel speed pulse data of step S1 into an extended Kalman filter to generate fused trajectory data;
[0013] S3. Detect consecutive null value regions in the fused trajectory data of step S2 to generate missing trajectory marker data;
[0014] S4. Input the fused trajectory data of step S2 and the missing trajectory marker data of step S3 into a cascaded structure of a temporal convolutional network and a micro gated recurrent unit network to output completed trajectory data;
[0015] S5. Perform ROI region cropping and grayscale processing on the image data of the front-view camera in step S1 to generate preprocessed image data;
[0016] S6. Fuse the preprocessed image data of step S5 with a historical trajectory database and map data to calculate dynamic lane width data, and the output formula is W real =0.6W cam +0.4W hist , where W real represents the true value of the lane width, W cam represents the value measured by the camera, and W hist represents the historical value of the lane width;
[0017] S7. Based on the completed trajectory data in step S4 and the dynamic lane width data in step S6, calculate and generate the local coordinate system parameters through the Frenet frame;
[0018] S8. Project the completed trajectory data in step S4 onto the local coordinate system in step S7 and decompose it into the longitudinal velocity component v x and the lateral velocity component v y ;
[0019] S9. According to v x , v y in step S8 and the relative distances Δx, Δy from the target object, calculate the longitudinal time to collision TTC x =Δx / v x and the lateral time to collision TTC y =Δy / v y ;
[0020] S10. Fuse the TTC x , TTC y in step S9 and the road curvature κ extracted from the map, and generate a dynamic collision risk index through the formula where α(κ)+β(κ)=1 and α(κ)=0.95 - 0.5κ, and α(κ) and β(κ) represent the weight coefficients related to the road curvature κ;
[0021] S11. Judge based on the preset threshold the DRC index in step S10 and the variance of the lateral velocity component, and output the classification labels for the following - vehicle scenarios, lane - change scenarios, and intersection scenarios.
[0022] Preferably, the construction method of the temporal convolutional network includes:
[0023] S401. Configure three - level cascaded dilated convolution modules. The dilation rates of the first - level dilated convolution module, the second - level dilated convolution module, and the third - level dilated convolution module are set to 1, 2, and 4 respectively. Preset 64 convolution kernels with a size of 3×3 for each dilated convolution module, set the convolution sliding step to 1, and adopt the time - dimension symmetric padding method to maintain the size of the feature map;
[0024] S402. Input the feature map output by the pre - neural network into the first - level dilated convolution module to generate a primary feature map, input the primary feature map into the second - level dilated convolution module to generate an intermediate feature map, and input the intermediate feature map into the third - level dilated convolution module to generate a high - level feature map;
[0025] S403. Group the 64 convolutional kernels of the first-level dilated convolutional module, the second-level dilated convolutional module, and the third-level dilated convolutional module. Split the 64 convolutional kernels of each level of the dilated convolutional module into 4 groups, with each group containing 16 convolutional kernels, and share the parameters within the group;
[0026] S404. Perform structured pruning on the grouped 64 convolutional kernels. Retain the top 50% of the highly activated convolutional kernels in each level of the module through L1 norm analysis, and set the remaining 50% of the convolutional kernels to zero;
[0027] S405. Compress the channels of the high-level feature map output by the pruned third-level dilated convolutional module through 1×1 convolution to generate a compressed high-level feature map;
[0028] S406. Fuse the features of the compressed high-level feature map and the input feature map of the micro gated recurrent unit network through tensor addition operation to generate a residual connection feature map;
[0029] S407. Apply the leaky rectified linear unit activation function to the output feature map of each dilated convolutional module, where the leak factor of the leaky rectified linear unit is set to 0.01;
[0030] S408. Output the residual connection feature map to the micro gated recurrent unit network to output the completed trajectory data.
[0031] Preferably, the configuration method of the micro gated recurrent unit network includes:
[0032] S409. Construct a micro gated recurrent unit network with a hidden layer using a 16-node topology structure, and initialize the weights of the gated units to follow the Xavier normal distribution;
[0033] S410. Perform 8-bit integer quantization on the 32-bit floating-point weights Wfloat32 of the network to convert them into 8-bit integer weights Wint8. Recalculate the quantization parameters μ and σ every 1000 training iterations, where μ and σ are the mean and standard deviation of Wfloat32 respectively;
[0034] S411. Perform inverse quantization reconstruction on Wint8 to obtain the dequantized floating-point weights W dequant ,
[0035] ;
[0036] S412. Use the straight-through estimator (STE) to approximate the gradient in the backpropagation stage, and keep the gradient of the rounding operation as 1.
[0037] Preferably, the method for calculating α(κ) and β(κ) based on road curvature includes:
[0038] S1001. Obtain the road curvature κ;
[0039] S1002. Judge the range of κ:
[0040] If , calculate α(κ) according to the formula , and then calculate β(κ) according to ;
[0041] If , force α(κ) to be set to 0.4 ± 0.02, and β(κ) to be 0.6. The correction coefficient 0.02 is dynamically adjusted through the Kalman filter residual variance.
[0042] Preferably, in the calculation of the historical lane width in the dynamic lane width data in step S6, the exponentially weighted moving average algorithm is adopted, and the decay factor is set to 0.85; the initial historical lane width value is taken from the nominal lane width value of the corresponding section in the map; when the confidence of the camera is lower than the preset threshold for several consecutive frames, the historical lane width is forced to be reset to the map reference value, and the lane line re-detection process based on color space segmentation is activated.
[0043] Preferably, in the calculation of the Frenet frame in step S7, the control point interval of the cubic spline interpolation of the road center line is dynamically adjusted according to the real-time curvature: when the real-time curvature is greater than 0.1 per meter, the control point interval is shortened to 2 meters; when the real-time curvature is less than or equal to 0.1 per meter, the control point interval is extended to 10 meters; the curvature is calculated by taking the second derivative of the parametric equation of the road center line using the central difference method.
[0044] Preferably, the parameter configuration of the extended Kalman filter satisfies:
[0045] The state vector is defined as a two-dimensional vector X, including the longitudinal position s and the longitudinal velocity v;
[0046] The process noise covariance matrix Q is configured as a diagonal matrix diag(0.1, 0.05), reflecting the process noise variances of the longitudinal position and velocity;
[0047] The observation noise covariance matrix R is configured as a diagonal matrix diag(0.2, 0.1), characterizing the measurement noise intensities of the longitudinal position and velocity;
[0048] The state transition matrix F adopts a uniform motion kinematic model: F = [[1, Δt], [0, 1]], where Δt = 0.1 second is the discretization time step;
[0049] The observation matrix H is configured as a 2×2 identity matrix I to achieve full-dimensional observation of the state vector.
[0050] Preferably, the ROI area and processing flow of the image preprocessing module include:
[0051] S501. Preset in the pixel coordinate system of the front camera, select a rectangular area from the upper left corner coordinate to the lower right corner coordinate that covers the road detection range of 100 meters in front of the vehicle as the ROI area;
[0052] S502. Obtain the input image, convert it from the RGB format to the YUV420 format, where the chrominance component uses the 4:2:0 subsampling mode, and generate a YUV420 format image with a 30% reduction in chrominance data volume;
[0053] S503. Perform the CLAHE algorithm with grid division on the Y component of the YUV420 format image in S502, set an 8×8 pixel grid unit, set the contrast limit threshold to 2.0, and use bilinear interpolation to eliminate the grid boundary effect to generate the processed Y component;
[0054] S504. Perform bilateral filtering on the U / V components of the YUV420 format image in S502, set the spatial domain standard deviation σ s = 1.5 pixels, the color domain standard deviation σ c = 15 gray levels, and the filter window diameter d = 5 pixels to generate the filtered U / V components;
[0055] S505. Combine the processed Y component generated in S503 with the filtered U / V components generated in S504, and output the YUV420 format preprocessed image data;
[0056] Among them, the Y component represents the luminance component, the U component represents the difference between the blue chrominance information and the luminance information in the image, and the V component represents the difference between the red chrominance information and the luminance information in the image.
[0057] The present invention has at least the following beneficial effects:
[0058] First, the missing trajectory is completed through the adversarial network model, enabling the autonomous driving system to comprehensively grasp the vehicle motion state and avoid decision-making mistakes. The multi-dimensional collision risk assessment considers factors such as road curvature, and can give early warnings and braking in a timely manner under complex road conditions. For example, on high-curvature sections, the lateral risk recognition rate is greatly improved, and the emergency braking trigger delay is significantly shortened, effectively reducing collision accidents and ensuring the safety of personnel.
[0059] Second, based on the dynamic time warping algorithm, the driving mode is recognized, and the scene features are accurately extracted and classified, enabling the autonomous driving system to quickly recognize scenarios such as lane changes and following, understand the driving intention, optimize the driving path and speed planning, improve the smoothness and comfort of driving, and reduce unnecessary acceleration, deceleration, and lane change operations.
[0060] Thirdly, the trajectory data processing mechanism is improved, reducing the speed data noise and enhancing the data accuracy and reliability. The high-quality data provides a solid foundation for the algorithm training and model optimization of the autonomous driving system, enhancing the system's adaptability and stability to different scenarios and reducing the interference of abnormal data to the system.
[0061] Fourthly, the scene metric credibility evaluation model can effectively identify low-confidence data and abnormal working conditions, preventing the system from making decisions using unreliable data. Meanwhile, the accurate risk scene marking and confidence interval output enable the system to make preparations in advance, reducing the probability of misjudgment and incorrect decisions and improving the stability and reliability of the system operation.
[0062] Fifthly, the key technical problems in the industry are solved, providing a more scientific index calculation method for the construction of the autonomous driving scenario library, promoting the research and innovation of autonomous driving technologies, accelerating the transformation of autonomous driving technologies from theoretical research to practical applications, and driving the development process of the entire autonomous driving industry.
[0063] Other advantages, objectives, and features of the present invention will be partially reflected by the following description and partially understood by those skilled in the art through the research and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flow framework diagram of the comprehensive index calculation method for the autonomous driving scenario library. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0065] The following further describes the present invention in detail with reference to the drawings so that those skilled in the art can implement it according to the description in the specification.
[0066] It should be noted that, unless otherwise specified, the experimental methods in the following embodiments are all conventional methods, and the reagents and materials, unless otherwise specified, can all be obtained from commercial channels; in the description of the present invention, the orientation or positional relationship indicated by the terms is based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention.
[0067] As Figure 1 shown, the present invention provides a comprehensive index calculation method for an autonomous driving scenario library, including the following steps:
[0068] S1. Obtain three-dimensional positioning data through an in-vehicle GNSS module, obtain wheel speed pulse data through a wheel speed sensor, and obtain image data through a front-view camera;
[0069] S2. Input the 3D positioning data and wheel speed pulse data from step S1 into an extended Kalman filter to generate fused trajectory data;
[0070] S3. Detect consecutive null value regions in the fused trajectory data from step S2 to generate missing trajectory marker data;
[0071] S4. Input the fused trajectory data from step S2 and the missing trajectory marker data from step S3 into a cascaded structure of a temporal convolutional network and a micro gated recurrent unit network to output completed trajectory data;
[0072] S5. Crop and grayscale the image data of the front view camera from step S1 to generate preprocessed image data;
[0073] S6. Fuse the preprocessed image data from step S5 with the historical trajectory database and map data to calculate the dynamic lane width data. The output formula is W real =0.6W cam +0.4W hist , where W real represents the true value of the lane width, W cam represents the value measured by the camera, and W hist represents the historical value of the lane width;
[0074] S7. Based on the completed trajectory data from step S4 and the dynamic lane width data from step S6, calculate and generate local coordinate system parameters through the Frenet frame;
[0075] S8. Project the completed trajectory data from step S4 onto the local coordinate system from step S7 and decompose it into a longitudinal velocity component v x and a lateral velocity component v y ;
[0076] S9. According to the relative distances Δx and Δy between v x , v y from step S8 and the target object, calculate the longitudinal time to collision TTC x =Δx / v x and the lateral time to collision TTC y =Δy / v y ;
[0077] S10. Fuse TTC x , TTC y from step S9 and the road curvature κ extracted from the map, and generate a dynamic collision risk index through the formula , where α(κ)+β(κ)=1 and α(κ)=0.95 - 0.5κ. Here, α(κ) and β(κ) represent the weight coefficients related to the road curvature κ;
[0078] S11. Judge the DRC index of step S10 and the variance of the lateral velocity component based on a preset threshold, and output classification labels for the following-following scenario, lane-changing scenario, and intersection scenario.
[0079] In the above technical solution, by integrating various sensor data, performing data fusion, complementation, and multi-step calculations, a dynamic collision risk index is finally obtained and scenario classification is achieved. The comprehensive utilization of multi-sensor data improves the comprehensiveness and accuracy of the data, and can more realistically reflect the environment in which the autonomous vehicle is located. By fusing the positioning and wheel speed data through an extended Kalman filter, the influence of single-sensor errors is effectively reduced. Completing the trajectory data provides a complete data basis for subsequent analysis. The calculation of the dynamic lane width takes into account real-time images and historical data, which is more in line with the actual road conditions. The dynamic collision risk index generated by comprehensively considering the longitudinal and lateral collision times and the road curvature can more accurately evaluate the collision risk. The finally achieved scenario classification helps the autonomous driving system make more reasonable decisions according to different scenarios, improving the safety and reliability of autonomous driving.
[0080] Specifically, in an actual autonomous driving scenario, the vehicle first needs to use different on-vehicle sensors to obtain relevant data. The on-vehicle GNSS module obtains the three-dimensional positioning data of the vehicle by receiving satellite signals, and this data contains the position information of the vehicle in space. The wheel speed sensor obtains the wheel speed pulse data by detecting the rotation of the wheels, and then the driving speed of the vehicle can be calculated. The front-view camera captures the road image in front of the vehicle in real time to obtain image data.
[0081] Input the obtained three-dimensional positioning data and wheel speed pulse data into an extended Kalman filter. The extended Kalman filter is a commonly used data fusion algorithm. It can estimate and update the state of the vehicle according to the motion model of the vehicle and the measurement values of the sensors, so as to generate fused trajectory data. In this process, the extended Kalman filter will continuously adjust the estimation of the vehicle position and speed according to new measurement values to reduce errors.
[0082] Next, check the fused trajectory data and detect the null value regions in several consecutive frames. These null value regions may be caused by sensor failures, signal losses, etc. Once a null value region is detected, missing trajectory marker data will be generated to mark the positions of these missing data.
[0083] The fused trajectory data and missing trajectory marker data are input into the cascaded structure of a temporal convolutional network and a micro gated recurrent unit network. The temporal convolutional network can extract the temporal features of the data, while the micro gated recurrent unit network can handle the long-term dependencies in the sequence data. Through the collaborative work of these two networks, the missing trajectory data can be completed, and the completed trajectory data is output.
[0084] For the image data obtained by the front-view camera, preprocessing is required. First, ROI region cropping is performed, and a specific range of the road area in front of the vehicle is selected as the region of interest, which can reduce the interference of irrelevant information. Then, grayscale processing is carried out to convert the color image into a grayscale image for subsequent analysis and processing. After these processes, the preprocessed image data is generated.
[0085] The preprocessed image data is fused with the historical trajectory database and the map data. The historical trajectory database records the relevant information of the vehicle during past driving, and the map data contains the basic information of the road, such as lane width, road curvature, etc. By fusing these data, the dynamic lane width data can be calculated using the formula W real =0.6W cam +0.4W hist to comprehensively consider the lane width detected by the camera and the historical lane width.
[0086] Based on the completed trajectory data and the dynamic lane width data, the local coordinate system parameters are calculated using the Frenet frame. The Frenet frame is a coordinate system based on the road centerline, which can transform the vehicle's trajectory and position into a local coordinate system for convenient subsequent analysis and processing.
[0087] The completed trajectory data is projected into the local coordinate system. According to the definition of the coordinate system, the trajectory data can be decomposed into the longitudinal velocity component v x and the lateral velocity component v y . These two velocity components can respectively describe the vehicle's motion in the longitudinal and lateral directions.
[0088] According to the longitudinal velocity component v x 、the lateral velocity component v y 、as well as the relative distances Δx and Δy between the target object and the vehicle, the longitudinal time to collision TTC x =Δx / v x and the lateral time to collision TTC y =Δy / v y are respectively calculated. These two times can be used to evaluate the possibility of the vehicle colliding with the target object in the longitudinal and lateral directions.
[0089] Finally, by integrating the longitudinal collision time, the lateral collision time, and the road curvature κ extracted from the map, through the formula a dynamic collision risk index is generated. Among them, α(κ) and β(κ) are coefficients determined according to the road curvature κ, and α(κ) + β(κ) = 1. The DRC index and the variance of the lateral velocity component are judged based on a preset threshold, and classification labels for the following - vehicle scenario, lane - change scenario, and intersection scenario are output according to the judgment result. In this way, the autonomous driving system can make corresponding decisions according to different scenarios.
[0090] In another technical solution, the construction method of the temporal convolutional network includes:
[0091] S401. Configure three - level cascaded dilated convolution modules. The dilation rates of the first - level dilated convolution module, the second - level dilated convolution module, and the third - level dilated convolution module are set to 1, 2, and 4 respectively. Preset 64 convolution kernels of size 3×3 for each dilated convolution module, set the convolution sliding step size to 1, and use the time - dimension symmetric padding method to maintain the feature map size;
[0092] S402. Input the feature map output by the pre - neural network into the first - level dilated convolution module to generate a primary feature map, input the primary feature map into the second - level dilated convolution module to generate an intermediate feature map, and input the intermediate feature map into the third - level dilated convolution module to generate a high - level feature map;
[0093] S403. Group the 64 convolution kernels of the first - level dilated convolution module, the second - level dilated convolution module, and the third - level dilated convolution module. Split the 64 convolution kernels of each level of dilated convolution module into 4 groups, with each group containing 16 convolution kernels, and share the parameters within the group;
[0094] S404. Perform structured pruning on the grouped 64 convolution kernels. Retain the top 50% of the highly activated convolution kernels in each level of module through L1 - norm analysis, and set the remaining 50% of the convolution kernels to zero;
[0095] S405. Compress the channels of the high - level feature map output by the pruned third - level dilated convolution module through 1×1 convolution to generate a compressed high - level feature map;
[0096] S406. Perform feature fusion on the compressed high - level feature map and the input feature map of the micro gated recurrent unit network through tensor addition operation to generate a residual connection feature map;
[0097] S407. Apply the leaky rectified linear unit activation function to the output feature map of each dilated convolution module, where the leakage factor of the leaky rectified linear unit is set to 0.01;
[0098] S408. Output the residual connection feature map to the micro gated recurrent unit network to output the completed trajectory data.
[0099] In the above technical solution, by setting a three-level cascaded dilated convolution module with different dilation rates, it is possible to extract time series features at different scales, enrich the feature expression, and improve the feature capture ability for complex time series data. Compared with a single dilation rate, it can mine data information more comprehensively. Grouping and structured pruning of the convolutional kernels reduce the number of network parameters, reduce the computational amount and memory occupancy, improve the model running efficiency, and retain the key convolutional kernels, avoiding the performance degradation caused by parameter reduction to a certain extent, and balancing the model complexity and performance. Fusing the compressed high-level feature map with the input feature map of the micro gated recurrent unit network and using residual connection enable the network to better learn the differences and connections between features, improve the feature utilization efficiency, help to more accurately output the completed trajectory data, and enhance the accuracy of the model in processing trajectory data. Using the leaky rectified linear unit activation function and setting an appropriate leakage factor can effectively solve the problem of neuron death of the traditional ReLU function in the negative half-axis, enable the network to better transmit gradients during the training process, accelerate convergence, and improve the model training effect.
[0100] Specifically, the configuration of the dilated convolution module: When constructing the network, first create a three-level cascaded dilated convolution module. The setting of the dilation rate of the dilated convolution module is the key. The dilation rate of the first level is set to 1, which is similar to ordinary convolution and can capture local and relatively fine features. The dilation rate of the second level is set to 2. At this time, the convolutional kernel will skip some positions during the convolution process, and the receptive field becomes larger, and it can capture features in a slightly larger range. The dilation rate of the third level is set to 4 to further expand the receptive field and obtain more global feature information. Configure 64 convolutional kernels with a size of 3×3 for each dilated convolution module. The size of 3×3 has a good balance between the computational amount and the feature extraction ability. Set the convolutional sliding step size to 1, so that the feature map can be scanned carefully without missing information. Adopt the time dimension symmetric padding method, that is, fill the same number of data before and after the time series to ensure that the size of the feature map in the time dimension remains unchanged after the convolution operation, maintain the time continuity of the data, and facilitate subsequent processing.
[0101] Feature map generation process: The feature map output by the pre - neural network is used as the input and enters the first - level dilated convolution module. Inside this module, 64 convolutional kernels perform convolution operations on the input feature map according to the set parameters to generate a primary feature map. The primary feature map contains the feature information of the input data after being processed by the first - level dilated convolution. The primary feature map is then input into the second - level dilated convolution module, where 64 convolutional kernels also perform convolution operations with a dilation rate of 2 to generate an intermediate feature map. The intermediate feature map integrates the information of the primary feature map and the broader features brought by the second - level dilated convolution. The intermediate feature map is then input into the third - level dilated convolution module, and after convolution operations with a dilation rate of 4, a high - level feature map is generated. The high - level feature map integrates the features of the previous levels and has richer and more global information.
[0102] Convolutional kernel grouped processing: For the 64 convolutional kernels in each level of the dilated convolution module, they are split into 4 groups, with each group containing 16 convolutional kernels. After such grouping, the 16 convolutional kernels within the group share parameters. The advantage of sharing parameters is that it reduces the total number of parameters that the network needs to learn and lowers the computational complexity. In the actual calculation process, for the convolutional kernels within the same group, when performing convolution operations on the feature map, the same weight parameters are used, which greatly improves the computational efficiency and also helps to enhance the generalization ability of the model.
[0103] Structured pruning operation: After grouping, structured pruning is performed on the 16 convolutional kernels in each group (i.e., a total of 64 convolutional kernels in each level). Through L1 - norm analysis, the L1 - norm of each convolutional kernel is calculated. The L1 - norm reflects the sum of the absolute values of the convolutional kernel parameters. The convolutional kernels are sorted according to the L1 - norm size, and the top 50% of the highly activated convolutional kernels in each level module are retained, while the remaining 50% of the convolutional kernels are set to zero. This can remove the convolutional kernels that contribute less to the model performance, reduce redundant parameters, further reduce the computational amount and memory occupancy, and at the same time avoid having too much negative impact on the model performance, ensuring that the model can still maintain good feature extraction ability while reducing parameters.
[0104] Channel compression and feature fusion: The high - level feature map output by the third - level dilated convolution module after pruning has a relatively large number of channels. To further optimize the calculation and feature expression, channel compression is performed through 1×1 convolution. The role of the 1×1 convolutional kernel is to adjust the number of channels without changing the spatial size of the feature map. After 1×1 convolution, a compressed high - level feature map is generated, with a reduced number of channels, which is more convenient for subsequent processing. The compressed high - level feature map and the input feature map of the micro - gated recurrent unit network are subjected to a tensor addition operation. Tensor addition is the addition of elements at corresponding positions. Through this method, features from different sources are fused to generate a residual connection feature map. Residual connections help the network better learn the differences between features, prevent problems such as gradient disappearance in deep networks, and improve the feature utilization efficiency.
[0105] Activation function application: Apply the Leaky Rectified Linear Unit (Leaky ReLU) activation function to the output feature map of each dilated convolution module. Based on the traditional ReLU function, Leaky ReLU does not set the output to zero when the input is negative, but multiplies it by a small leakage factor (set to 0.01 here). In actual calculations, for the feature map output by the dilated convolution module, each element is calculated according to the Leaky ReLU function rule. This can avoid the problem of gradient disappearance caused by neurons not being activated at all when the input is negative during the training process, enabling the network to transmit gradients more effectively during training, accelerating the convergence speed, and improving the training effect of the model.
[0106] Final output: The generated residual connection feature map is output to the micro gated recurrent unit network. The micro gated recurrent unit network further processes the residual connection feature map and finally outputs the completed trajectory data according to the internal structure of the network and the trained parameters. In this process, the micro gated recurrent unit network utilizes the feature information extracted and fused by the previous temporal convolutional network and combines its own processing ability for time series data to complete the task of completing the trajectory data and output the completed trajectory data that meets the requirements.
[0107] In another technical solution, the configuration method of the micro gated recurrent unit network includes:
[0108] S409. Construct a micro gated recurrent unit network with a hidden layer using a 16-node topology structure, and initialize the weights of the gated units according to the Xavier normal distribution.
[0109] S410. Perform 8-bit integer quantization on the 32-bit floating-point weights Wfloat32 of the network to convert them into 8-bit integer weights Wint8, and recalculate the quantization parameters μ and σ every 1000 training iterations. μ and σ are the mean and standard deviation of Wfloat32 respectively.
[0110] S411. Perform inverse quantization reconstruction on Wint8 to obtain the floating-point weights W after inverse quantization. dequant ,
[0111] ;
[0112] S412. Use the straight-through estimator (STE) to approximate the gradient in the backpropagation stage, and keep the gradient of the rounding operation as 1.
[0113] In the above technical solution, a micro gated recurrent unit network with a 16-node topological structure is constructed for the hidden layer, and the weights of the gated units are initialized according to the Xavier normal distribution, enabling the network to effectively process time series data on a reasonable scale. The 16-node topological structure strikes a balance between computational complexity and model performance. Initializing the weights according to the Xavier normal distribution helps the network converge quickly in the initial stage of training, avoiding the problems of vanishing or exploding gradients caused by improper weight initialization and improving the network training efficiency. Performing 8-bit integer quantization on 32-bit floating-point weights significantly reduces the memory space required for network storage and computation, increases the operation speed, and is especially suitable for resource-constrained environments. Recalculating the quantization parameters every 1000 training iterations can adapt to the change in weight distribution during network training, making the quantization more accurate, minimizing the impact on model performance while reducing the precision, and maintaining the model accuracy. Dequantizing and reconstructing the quantized 8-bit integer weights can restore the floating-point representation of the weights when high-precision computation is required. The dequantization and reconstruction ensure the reversibility of the quantization process, enabling the network to flexibly use weights with different precisions at different stages, enjoying both the computational and storage advantages brought by quantization and being able to return to high-precision computation when necessary to guarantee the overall performance of the model. In the backpropagation stage, the straight-through estimator is used to approximate the gradient and keep the gradient of the rounding operation as 1, simplifying the gradient calculation process. Since the rounding operation in the quantization process is non-differentiable, the STE enables the network to smoothly perform backpropagation training in the quantization environment, ensuring the normal progress of training, accelerating model convergence, improving training efficiency, enabling the network to quickly optimize the weights, and enhancing the training effect.
[0114] Specifically, the construction of the micro gated recurrent unit network and weight initialization: When constructing the micro gated recurrent unit network, first determine that the hidden layer adopts a 16-node topological structure. This structure is selected according to the specific application scenario and data characteristics. The 16 nodes can better capture the features and dependencies in the time series data without excessively increasing the computational load. In the actual construction process, according to the basic structure of the gated recurrent unit, these 16 nodes are interconnected to form a hidden layer structure capable of processing time series. The initialization of the gated unit weights follows the Xavier normal distribution. The parameters of the Xavier normal distribution are set with a mean of 0, and the standard deviation is calculated according to the number of input and output neurons. For the 16-node structure of the hidden layer, assuming the number of input layer neurons is n and the number of output layer neurons is also 16, the standard deviation is set to , and the initial weight matrix is generated using a random number generation function according to the parameters of the Xavier normal distribution to initialize each weight in the gated unit. After such initialization, the weights can make the signal propagate more evenly in the network at the beginning of training, facilitating the faster convergence of the network.
[0115] 8-bit Integer Quantization and Parameter Update of 32-bit Floating-point Weights: Perform 8-bit integer quantization on the 32-bit floating-point weights Wfloat32 of the network. The basic principle of quantization is to map continuous 32-bit floating-point values to a finite range of 8-bit integer values. First, calculate the dynamic range of the 32-bit floating-point weights, that is, find the maximum and minimum values in the weights. Then, convert each 32-bit floating-point weight value to an 8-bit integer value according to the quantization formula. For example, assuming the weight value range is [min v alue,max v alue], the quantization formula can be , where round represents the rounding operation. Recalculate the quantization parameters μ and σ every 1000 training iterations. In each recalculation, traverse the current 32-bit floating-point weights Wfloat32 and calculate their mean μ and standard deviation σ. The recalculated quantization parameters are used in the next round of quantization process to adapt to the change of weight distribution during the network training process and ensure the accuracy of quantization.
[0116] Inverse Quantization Reconstruction Operation: Reconstruct Wint8 through inverse transformation for inverse quantization. Inverse quantization is the inverse process of quantization, and its purpose is to restore the 8-bit integer weights to 32-bit floating-point weights. First, perform inverse quantization according to the previously calculated and updated quantization parameters μ and σ, and the inverse operation of the quantization formula. In actual calculation, for each 8-bit integer weight Wint8, calculate according to the inverse quantization formula to obtain the floating-point weight W dequant . In this way, when high-precision calculation is required, such as in the calculation of certain specific layers or before the final output, the floating-point weights after inverse quantization can be used to ensure the accuracy of the calculation results.
[0117] Gradient Approximation in the Backpropagation Stage: Adopt the Straight-Through Estimator (STE) to approximate the gradient in the backpropagation stage, and keep the gradient of the rounding operation as 1. Since the rounding operation in the quantization process is non-differentiable, problems will be encountered when calculating the gradient in the backpropagation. STE solves this problem through an approximation method. For the rounding operation, when calculating the gradient, directly set its gradient to 1. For example, when calculating the gradient with respect to a certain weight, if this weight has gone through the rounding operation during the quantization process, when calculating the gradient in the backpropagation, regard the gradient part related to the rounding operation as 1, rather than dealing with it as a non-differentiable operation according to the convention. This can make the gradient pass through the quantization part smoothly, ensure the normal progress of the backpropagation process, enable the network to perform effective training in the quantization environment, continuously optimize the weights, and improve the model performance.
[0118] In another technical solution, the method for calculating α(κ) and β(κ) based on road curvature includes:
[0119] S1001. Obtain the road curvature κ;
[0120] S1002. Determine the range of κ:
[0121] If , calculate α(κ) according to the formula , and then calculate β(κ) according to ;
[0122] If , forcibly set α(κ) = 0.4 ± 0.02 and β(κ) = 0.6, and the correction coefficient 0.02 is dynamically adjusted through the Kalman filter residual variance.
[0123] In the above technical solution, different calculation methods are adopted for different κ ranges, which enhances the flexibility and accuracy of the calculation. In the range, α(κ) is calculated through a specific exponential formula, and β(κ) is obtained accordingly, which can more precisely reflect the variation relationship of relevant factors within this curvature interval. When , α(κ) and β(κ) are forcibly set, and the correction coefficient of α(κ) is dynamically adjusted through the Kalman filter residual variance, which can meet the requirements for the stability and accuracy of the calculation results under complex road conditions, ensuring that the system can have reasonable outputs under different road curvature conditions. Dynamically adjusting the correction coefficient 0.02 using the Kalman filter residual variance can optimize the calculation results in real time according to the error feedback during the system operation. In the actual scenario where road conditions are changeable, the Kalman filter can fuse multi-source data, dynamically adjust the value range of α(κ) according to the residual variance, make the calculation results more conform to the actual road condition changes, and improve the adaptability and reliability of the entire calculation method.
[0124] Specifically, obtain the road curvature κ: In practical applications, there are various ways to obtain the road curvature κ. For existing high-precision map data, the curvature information of the corresponding road section can be directly read from the map database. When the map is drawn, through means such as measurement and modeling, the geometric shape of the road is accurately recorded, which includes curvature data. For example, some professional navigation maps will conduct detailed surveys of roads at different levels and store the curvature data in the database. The accurate curvature κ of the road section can be obtained by inputting the relevant identifiers of the road section through the map API interface. If there is no ready-made map data support, the sensor data on the vehicle can be used for calculation. For example, the combined data of the inertial measurement unit (IMU) and the global positioning system (GPS) can be used. The IMU can measure information such as the acceleration and angular velocity of the vehicle, and the GPS can provide the position information of the vehicle. By processing the position and attitude data over a period of time and using mathematical algorithms (such as the method based on curve fitting) to estimate the road curvature. Assume that the vehicle is driving on a section of road. A series of position coordinates at different time points are obtained through the GPS, combined with the attitude information measured by the IMU, these data are fitted into a curve, and then the curvature is calculated according to the mathematical properties of the curve.
[0125] Calculate α(κ) and β(κ) according to the κ range: After obtaining the road curvature κ, first determine its range. If , calculate according to the formula . Then, calculate β(κ) according to . If , force α(κ) = 0.4 ± 0.02 and β(κ) = 0.6. Here, the value range of α(κ) is a dynamic interval, with the lower limit being 0.38 and the upper limit being 0.42. In practical applications, the correction factor 0.02 is dynamically adjusted through the Kalman filter residual variance.
[0126] Adjust the correction factor with the Kalman filter residual variance: In this scenario, use the Kalman filter to estimate the system state related to the road curvature, and adjust the correction factor according to the residual variance. First, establish a state space model related to the road curvature, with the road curvature and related parameters as state variables, and vehicle sensor measurement data, etc. as observation variables. In each iteration process, the Kalman filter calculates the state estimate value and the estimation error covariance at the current moment based on the state estimate at the previous moment and the current observation data. The residual variance is part of the estimation error covariance. When the residual variance is large, it indicates that the current estimate value deviates greatly from the actual value. At this time, appropriately increase the correction factor 0.02 to make the value range of α(κ) wider to better adapt to road condition changes; when the residual variance is small, decrease the correction factor 0.02 to make the value of α(κ) more accurate. For example, after calculating for a period of time, it is found that the residual variance gradually increases, which may be due to a sudden change in road conditions resulting in an increase in sensor measurement errors. At this time, increase the correction factor from 0.02 to 0.03, and the value range of α(κ) becomes 0.37 to 0.43, so as to dynamically adjust the calculation result.
[0127] In another technical solution, the historical lane width in the dynamic lane width data described in step S6 is calculated using the exponentially weighted moving average algorithm, and the decay factor is set to 0.85; the initial historical lane width value is taken from the lane width nominal value of the corresponding section in the map; when the camera confidence of several consecutive frames is lower than the preset threshold, force the historical lane width to be reset to the map reference value and activate the lane line re-detection process based on color space segmentation.
[0128] In the above technical solution, the exponentially weighted moving average algorithm can effectively integrate historical data and current data, giving higher weights to recent data, and better fitting the real-time change trend of the lane width. The decay factor is set to 0.85, which is reasonable in balancing the influence of old and new data. It neither overly relies on old data and becomes insensitive to new changes, nor overly emphasizes new data and ignores historical trends, improving the accuracy and real-time performance of lane width calculation, and providing a reliable lane width reference for relevant systems. Using the nominal value of the lane width of the corresponding section in the map as the initial historical lane width value provides a reliable starting point for the calculation. The map data is obtained through professional surveying and mapping, and its nominal value is authoritative and accurate. It enables the calculation to be based on a reasonable basis at the system startup or data initialization stage, avoiding subsequent calculation deviations caused by unreasonable initial values, and ensuring the stability of dynamic lane width calculation. By determining that the confidence of the camera is lower than the preset threshold for several consecutive frames, the unreliable situation of the data collected by the camera can be detected in a timely manner. At this time, the historical lane width is forcibly reset to the map reference value, which can prevent incorrect data from continuously affecting the calculation result and ensure the reliability of the lane width data in abnormal situations. At the same time, the lane line re-detection process based on color space segmentation is activated to try to obtain more accurate lane line information, recalibrate the lane width, enhance the system's ability to handle complex environments and data anomalies, and ensure the safety and stability of relevant applications (such as autonomous driving assistance).
[0129] Specifically, the exponentially weighted moving average algorithm calculates the historical lane width: In the actual calculation process, the exponentially weighted moving average algorithm reflects the change of the lane width by continuously updating the historical lane width value. Let the current time be t, the historical lane width value at the previous time be , and the lane width value measured at the current time be C t . The calculation formula of the exponentially weighted moving average algorithm is , where α is the decay factor, which is set to 0.85 here. For example, during the vehicle's driving process, every time a frame of image is collected (assuming the collection interval for each frame is a fixed time), a new current lane width measurement value C t is obtained. First, the historical lane width value calculated at the previous time is obtained, and then C t and are substituted into the above formula for calculation. Assume that the historical lane width value at the previous time is 3 meters, and the currently measured lane width value C t is 3.2 meters. Then, according to the formula, the current historical lane width value is 3.17 meters. As the vehicle continues to drive, this calculation process is continuously repeated to update the historical lane width value in real time, enabling it to quickly respond to the change of the lane width.
[0130] Obtain the initial historical lane width value: To obtain the nominal lane width value of the corresponding section in the map as the initial historical lane width value, it is first necessary to clarify the section where the vehicle is located. The position information of the vehicle can be obtained through the vehicle's positioning system (such as GPS), and then combined with the map matching algorithm to determine the exact section where the vehicle is currently located. After determining the section, use the map data interface, input the unique identifier of this section (such as section ID), and query the corresponding nominal lane width value from the map database. Different map providers may have different data structures and interface methods, but the basic principle is to retrieve relevant information through the section identifier. After obtaining this value, use it as the initial historical lane width value for the first calculation of the subsequent exponential decay moving average algorithm.
[0131] Camera confidence determination and subsequent operations: Camera confidence is an indicator to measure the reliability of the data collected by the camera. In the actual system, the camera will analyze each frame of the collected image and generate a confidence value. The system will set a preset threshold, for example, 0.6. When the camera confidence is lower than this threshold for several consecutive frames (assuming set to 5 frames), it is determined that the data collected by the camera is unreliable. Once it is determined to be unreliable, first forcibly reset the historical lane width to the reference value obtained from the map before. This step is controlled by the program, and directly updates the current historical lane width value to the map reference value. For example, if the map reference value is 3 meters, no matter what the current historical lane width value is, it is directly set to 3 meters. At the same time, activate the lane line re-detection process based on color space segmentation. In the color space segmentation algorithm, first convert the image from the RGB color space to a color space more conducive to lane line segmentation (such as the HSV space), and then according to the color characteristics of the lane line (such as the specific color range of white or yellow lane lines in the HSV space), extract the possible lane line areas through methods such as threshold segmentation, and then through morphological processing (such as erosion, dilation operations) and contour detection and other steps, accurately determine the lane line position, and then recalculate the lane width to provide accurate basic data for subsequent calculations.
[0132] In another technical solution, the control point interval of the cubic spline interpolation of the road centerline in the Frenet frame calculation in step S7 is dynamically adjusted according to the real-time curvature: when the real-time curvature is greater than 0.1 per meter, the control point interval is shortened to 2 meters; when the real-time curvature is less than or equal to 0.1 per meter, the control point interval is extended to 10 meters; the curvature calculation uses the central difference method to obtain the second derivative of the parameter equation of the road centerline.
[0133] In the above technical solution, dynamically adjusting the interval of cubic spline interpolation control points according to the real-time curvature can significantly improve the accuracy of road centerline fitting. In sections with large curvature, shortening the control point interval to 2 meters can capture the bending changes of the road more meticulously, avoid fitting deviations caused by too large an interval, and enable the road centerline to accurately reflect the actual road conditions. In sections with small curvature, expanding the control point interval to 10 meters reduces the number of control points, lowers the computational complexity, and at the same time can ensure a reasonable fit for gentle sections, balancing the computational efficiency and fitting accuracy. Using the central difference method to calculate the second derivative of the parametric equation of the road centerline to obtain the curvature has high computational accuracy. The central difference method utilizes the information of adjacent data points and can more accurately approximate the second derivative of the parametric equation through a reasonable difference formula, thereby obtaining an accurate curvature value. Compared with other simple curvature calculation methods, the central difference method can effectively reduce calculation errors, provide a reliable basis for the dynamic adjustment of the control point interval, and further improve the accuracy and reliability of the entire Frenet frame calculation. Accurately implementing the operation process of dynamically adjusting the control point interval and curvature calculation provides stable and efficient technical support for related applications. In practical scenarios such as autonomous driving and intelligent traffic monitoring, accurate road centerline information and real-time curvature data are crucial. Through a stable operation process, the system can obtain this information in real time and accurately, providing strong guarantees for vehicle path planning, driving control, and traffic flow analysis, and improving the safety and operation efficiency of the entire traffic system.
[0134] Specifically, obtaining real-time curvature: First, it is necessary to obtain the parametric equation of the road centerline. In practical applications, the data of the road centerline can be obtained through various methods, such as high-precision map data or processed data collected by vehicle sensors (such as lidar, cameras, etc.). When using vehicle sensors (such as lidar, cameras, etc.) to collect data, assume that the parametric equations of the road centerline are x = x(t) and y = y(t), where t represents time in seconds s, and (x, y) corresponds to the coordinates of different points on the road centerline. Use the central difference method to calculate the curvature. During the calculation process, reasonably select the step size h, which should not only ensure the calculation accuracy but also not make the calculation amount too large. For example, according to the sampling frequency and accuracy requirements of the actual road data, select h = 0.1. By continuously calculating the curvature corresponding to different t values, the real-time curvature can be obtained.
[0135] Dynamic adjustment of control point interval: Dynamically adjust the cubic spline interpolation control point interval according to the calculated real-time curvature. When the real-time curvature κ > 0.1 per meter, set the control point interval to 2 meters. In actual operation, starting from the starting point of the road centerline, select a control point every 2 meters. Assume the starting point coordinates of the road centerline are (x0, y0), and the coordinates of the first control point are (x0 + 2, y1). Calculate the value of y1 through the parametric equation, and select subsequent control points in turn. When the real-time curvature κ ≤ 0.1 per meter, set the control point interval to 10 meters. Similarly, starting from the starting point, select a control point every 10 meters. For example, the starting point coordinates are (x0, y0), and the coordinates of the first control point are (x0 + 10, y1). Determine y1 through the parametric equation. During the selection of control points, ensure that the control points can cover the entire road centerline and accurately reflect the road shape in sections with different curvature changes.
[0136] Cubic spline interpolation and application: After selecting the control points, perform cubic spline interpolation. Cubic spline interpolation requires the function value, first derivative, and second derivative to be continuous at each control point. By establishing the corresponding equations, solve for the coefficients of the cubic spline function. Assume the control points are (x i , y i ), i = 0, 1,..., n, construct the equations, and use the function values and derivative conditions of the control points to solve for the cubic spline function S(x). During the solution process, methods such as matrix operations can be used to improve the calculation efficiency. After obtaining the road centerline after cubic spline interpolation, it can be applied to related tasks such as Frenet frame calculation. In Frenet frame calculation, the accurate representation of the road centerline is crucial for vehicle positioning, path planning, etc. The accurate road centerline obtained by dynamically adjusting the control point interval can provide more accurate basic data for Frenet frame calculation, improving the reliability and practicality of the entire calculation.
[0137] In another technical solution, the parameter configuration of the extended Kalman filter satisfies:
[0138] The state vector is defined as a two-dimensional vector X, including the longitudinal position s and the longitudinal velocity v;
[0139] The process noise covariance matrix Q is configured as a diagonal matrix diag(0.1, 0.05), reflecting the process noise variances of the longitudinal position and velocity;
[0140] The observation noise covariance matrix R is configured as a diagonal matrix diag(0.2, 0.1), characterizing the measurement noise intensities of the longitudinal position and velocity;
[0141] The state transition matrix F adopts a uniform motion kinematic model: F = [[1, Δt], [0, 1]] where Δt = 0.1 second is the discretization time step;
[0142] The observation matrix H is configured as a 2×2 identity matrix I to achieve full-dimensional observation of the state vector.
[0143] In the above technical solution, the state vector is defined as a two-dimensional vector X containing the longitudinal position s and the longitudinal velocity v, which can concisely and effectively describe the core state information of the system in the longitudinal dimension. These two variables are directly related to many practical applications, such as vehicle driving state monitoring, object motion trajectory tracking, etc. By focusing on these two key elements, the extended Kalman filter can accurately estimate and predict the system state, providing a clear and core basis for subsequent data processing and decision-making, and improving the accuracy and pertinence of the system state description. The process noise covariance matrix Q is set to diag(0.1, 0.05), which reasonably quantifies the process noise variances of the longitudinal position and velocity. The smaller noise variance values indicate that the system process is relatively stable. Such a configuration enables the filter to better adapt to the dynamic characteristics of the system itself, effectively considering the inevitable noise interference during the estimation process and improving the robustness of the state estimation. The observation noise covariance matrix R is configured as diag(0.2, 0.1), which accurately characterizes the measurement noise intensity. It allows the filter to reasonably weight according to the reliability of the measurement data. When fusing the observation data, lower weights are given to the measurement values with larger noise, thereby improving the accuracy of the estimation results. The state transition matrix F is based on a uniform kinematic model, in the form of [[1,Δt],[0,1]] with Δt = 0.1 second, which conforms to the situation where objects move approximately uniformly in many practical scenarios. This configuration can effectively predict the state of the system at the next moment, providing a reasonable basis for the iterative calculation of the filter to update the state. The observation matrix H is set as the 2×2 identity matrix I to achieve full-dimensional observation, ensuring that each element of the state vector can be directly observed, providing comprehensive data support for state estimation, and improving the integrity and reliability of the estimation. According to the above parameter configuration, the extended Kalman filter can operate stably and efficiently in practical applications. In scenarios such as the positioning and speed monitoring of autonomous vehicles, it can accurately fuse the system process information and observation data, estimate the system state in real time and accurately, providing a strong guarantee for the stable operation and decision-making of the system, and improving the performance and safety of related applications.
[0144] Specifically, the definition and initialization of the state vector: In practical applications, first, it is necessary to clarify the measurement methods of the physical quantities related to the longitudinal position s and the longitudinal velocity v in the system. For example, in the vehicle driving scenario, the longitudinal position s can be obtained through an in-vehicle GPS device, and the longitudinal velocity v can be measured by the vehicle's speed sensor. When the system starts, the state vector needs to be initialized. According to the initial measurement values, assuming that the initial position of the vehicle at startup is s0 and the initial velocity is v0, then the initial state vector X0 = [s0, v0].
[0145] Process noise covariance matrix Q configuration: The process noise covariance matrix Q = diag(0.1, 0.05). The diagonal elements of this matrix respectively correspond to the process noise variances of the longitudinal position s and the longitudinal velocity v. In practical understanding, 0.1 represents the process noise variance of the longitudinal position s, meaning that during the operation of the system, due to various uncertain factors (such as road bumps, vehicle vibrations, etc.), the degree of interference to the position estimation. 0.05 represents the process noise variance of the longitudinal velocity v, reflecting the interference received during the velocity estimation process.
[0146] Observation noise covariance matrix R configuration: The observation noise covariance matrix R = diag(0.2, 0.1). Among them, 0.2 represents the measurement noise intensity of the longitudinal position s, and 0.1 represents the measurement noise intensity of the longitudinal velocity v. This reflects the accuracy limitations of the measurement equipment itself and the influence of environmental noise on the measurement values. For example, the GPS device has a certain error when measuring the position, and the magnitude of its error is reflected in the first diagonal element of this matrix; the measurement of the speed sensor is not completely accurate, and the second diagonal element reflects the noise intensity of the speed measurement.
[0147] State transition matrix F configuration: The state transition matrix F = [[1, Δt], [0, 1]], where Δt = 0.1 second. This matrix is based on the uniform motion kinematic model, and its meaning is that within each time step Δt, the longitudinal position s will change linearly according to the current velocity v , while the velocity v remains unchanged (v {k+1} = v k ). In practical applications, for example, during the vehicle driving process, assuming that the vehicle travels approximately uniformly in a short period of time, this matrix can reasonably predict the position and velocity of the vehicle at the next moment.
[0148] Observation matrix H configuration: The observation matrix H is set to the 2×2 identity matrix I. The role of the identity matrix is to achieve full-dimensional observation of the state vector, that is, the measurement value can directly reflect each element of the state vector X. In actual measurement, for example, if the measurement equipment can directly obtain the position and velocity of the vehicle, then through this identity matrix, the measurement value can be directly corresponding to the elements of the state vector, facilitating subsequent filtering calculations.
[0149] Extended Kalman filter operation: After completing the above parameter configuration, the extended Kalman filter runs according to its standard process. At each time step, first, according to the state transition matrix F and the process noise covariance matrix Q, the state prediction is performed to obtain the predicted state X {k|k-1} and the predicted covariance P {k|k-1} . Then, combining the observation matrix H, the observation noise covariance matrix R, and the actual measurement value Z k , through the Kalman gain K kPerform a state update to obtain the updated state estimate X {k|k} and covariance P {k|k} . Throughout the process, the parameters configured above cooperate with each other to ensure that the filter can accurately estimate the system state. k represents a time step identifier used to represent discrete time points and is a positive integer .
[0150] The operation process of this technical solution is as follows: First, measure the longitudinal position of the vehicle (such as the position of the vehicle in the forward direction) and the longitudinal speed (the speed at which the vehicle is moving forward). The longitudinal position can be determined by the GPS device on the vehicle, and the longitudinal speed can be measured by the vehicle speed sensor. At startup, initialize the state vector. If the position at startup is s0 and the speed is v0, then the initial state vector X0 is set to [s0, v0]. Then configure the process noise covariance matrix Q = diag(0.1, 0.05). 0.1 represents the degree of interference of position measurement by various uncertain factors (such as uneven road surface, vehicle vibration), and 0.05 represents the degree of interference of speed measurement. Then configure the observation noise covariance matrix R = diag(0.2, 0.1), where 0.2 indicates that the position measurement device (such as GPS) has limited accuracy itself, and environmental noise will cause errors in the measured position; 0.1 means that the speed measurement device (speed sensor) is not completely accurate, and the measured speed will also have noise. Then configure the state transition matrix F = , Δt = 0.1 second. This matrix is based on the model that the vehicle moves approximately at a constant speed in a short period of time, that is, every 0.1 second, the position of the vehicle will move forward a certain distance according to the current speed (position change = current speed × 0.1 second), and the speed remains unchanged. Then configure the observation matrix H and set H to the 2×2 identity matrix I, indicating that the measurement device can directly measure the position and speed of the vehicle, and the measured values can directly correspond to the position and speed elements in the state vector to facilitate subsequent filtering calculations. After configuring the above parameters, the extended Kalman filter can start working according to its standard process. Each time point is represented by k. First, predict the state of the vehicle at the current moment (obtain the predicted state X {k|k-1} ) and the uncertainty of the predicted state (obtain the predicted covariance P {k|k-1} ) according to the state transition matrix F and the process noise covariance matrix Q. Then, in combination with the observation matrix H, the observation noise covariance matrix R, and the actually measured vehicle position and speed values (Z k ), calculate the Kalman gain K k to update the state estimate of the vehicle (obtain the updated state estimate X {k|k} ) and the uncertainty of the updated state estimate (obtain the covariance P {k|k} ). These configured parameters cooperate with each other to ensure that the filter can accurately estimate the state of the vehicle at each moment.
[0151] In another technical solution, the ROI region and the processing flow of the image preprocessing module include:
[0152] S501. Preset in the pixel coordinate system of the front camera, select a rectangular region from the upper left corner coordinate to the lower right corner coordinate that covers the road detection range of 100 meters in front of the vehicle as the ROI region;
[0153] S502. Obtain the input image, convert it from the RGB format to the YUV420 format, where the chrominance component uses the 4:2:0 subsampling mode to generate a YUV420 format image with a 30% reduction in chrominance data volume;
[0154] S503. Perform the CLAHE algorithm with grid division on the Y component of the YUV420 format image in S502, set an 8×8 pixel grid cell, set the contrast limit threshold to 2.0, and use bilinear interpolation to eliminate the grid boundary effect to generate the processed Y component;
[0155] S504. Perform bilateral filtering on the U / V components of the YUV420 format image in S502, set the spatial domain standard deviation σ s = 1.5 pixels, the color domain standard deviation σ c = 15 gray levels, and the filter window diameter d = 5 pixels to generate the filtered U / V components;
[0156] S505. Combine the processed Y component generated in S503 with the filtered U / V components generated in S504 and output the YUV420 format preprocessed image data;
[0157] Among them, the Y component represents the luminance component, the U component represents the difference between the blue chrominance information and the luminance information in the image, and the V component represents the difference between the red chrominance information and the luminance information in the image.
[0158] In the above technical solution, a rectangular ROI area covering a 100-meter road detection range in front of the vehicle is selected in the pixel coordinate system of the front-view camera, which can focus on the key area. For vehicle-related applications, such as the autonomous driving assistance system, it can reduce data processing of unnecessary areas, improve processing efficiency, and can more specifically analyze the road conditions ahead, enhance the accuracy of road target detection and recognition, and provide more effective data support for subsequent decision-making. Convert the image from RGB format to YUV420 format and adopt the 4:2:0 subsampling mode to reduce the chrominance data volume by 30%. This reduces the data volume, storage, and transmission costs without affecting the key information of the image (the luminance component Y is retained in full), and at the same time improves the image processing speed, especially suitable for scenarios with high real-time requirements, such as the rapid processing of images during vehicle driving. Y-component CLAHE algorithm processing: Execute the grid-divided CLAHE algorithm on the Y component of the YUV420 format image, set the 8×8 pixel grid unit and the contrast limit threshold to 2.0, and use bilinear interpolation to eliminate the grid boundary effect. The CLAHE algorithm can enhance the local contrast of the image, make road details clearer, and facilitate subsequent recognition of road signs, lane lines, etc. Bilinear interpolation eliminates the grid boundary effect, ensures smooth transition of the processed image, does not produce obvious block effects, and improves the image quality. Perform bilateral filtering on the U / V components, and set the appropriate spatial domain standard deviation σ s = 1.5 pixels, color domain standard deviation σ c = 15 gray levels and filter window diameter d = 5 pixels. Bilateral filtering can effectively remove noise while retaining the edge information of the image, and improve the image quality. For the U / V components (chrominance components), it can make the color transition more natural, improve the overall visual effect of the image, and provide more accurate color information for subsequent image analysis. Accurately merge the processed Y component with the filtered U / V components and output the preprocessed image data in YUV420 format, ensuring the complete and accurate integration of the image information after different processing steps. The YUV420 format has good compatibility in many video processing and image analysis scenarios. Outputting the preprocessed image in this format can facilitate subsequent docking with other modules and provide high-quality input data for the entire image processing process.
[0159] The present invention provides a comprehensive index calculation system for an autonomous driving scenario library, including:
[0160] A data acquisition module, which is used to obtain three-dimensional positioning data, wheel speed pulse data, and image data;
[0161] A data fusion and completion module, which is used to input three-dimensional positioning data and wheel speed pulse data into an extended Kalman filter to generate fused trajectory data; detect consecutive null value regions in the fused trajectory data to generate missing trajectory marker data; input the fused trajectory data and the missing trajectory marker data into a cascaded structure of a temporal convolutional network and a micro gated recurrent unit network to output completed trajectory data;
[0162] An image preprocessing module, which is used to perform ROI region cropping and grayscale processing on image data to generate preprocessed image data;
[0163] A dynamic lane calculation module, which is used to fuse the preprocessed image data with a historical trajectory database and map data to calculate dynamic lane width data, and the output formula is W real =0.6W cam +0.4W hist ;
[0164] A local coordinate transformation module, which is used to calculate and generate local coordinate system parameters based on the completed trajectory data and the dynamic lane width data through a Frenet frame;
[0165] A time to collision calculation module, which is used to project the completed trajectory data onto the local coordinate system and decompose it into a longitudinal velocity component v x and a lateral velocity component v y ; according to v x 、v y and the relative distances Δx, Δy to the target object, respectively calculate the longitudinal time to collision TTC x =Δx / v x and the lateral time to collision TTC y =Δy / v y ;
[0166] A dynamic risk index module, which is used to fuse TTC x 、TTC y and the road curvature κ extracted from the map, and generate a dynamic collision risk index through the formula where α(κ)+β(κ)=1 and α(κ)=0.95 - 0.5κ;
[0167] A scene classification module, which is used to judge based on a preset threshold the DRC index and the variance of the lateral velocity component, and output classification labels for following scenes, lane change scenes, and intersection scenes.
[0168] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and embodiments. It can be fully applied to various fields suitable for the present invention. For those skilled in the art, additional modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and the examples shown and described herein.
Claims
1. A comprehensive index calculation method for an autonomous driving scenario library, characterized in that: The following steps are involved: S1, obtain three-dimensional positioning data through the vehicle-mounted GNSS module, obtain wheel speed pulse data through the wheel speed sensor, and obtain image data through the front-view camera; S2, inputting the three-dimensional positioning data and wheel speed pulse data of step S1 into the extended Kalman filter to generate fused trajectory data; S3, detecting a plurality of consecutive frames of null value regions in the fused trajectory data of step S2, and generating missing trajectory mark data; S4, inputting the fused trajectory data of step S2 and the missing trajectory mark data of step S3 into the cascade structure of the temporal convolutional network and the micro-gated recurrent unit network, and outputting the completed trajectory data; S5, performing ROI region cropping and grayscale processing on the image data of the front-view camera in step S1 to generate pre-processed image data; S6. The pre-processed image data of step S5 is integrated with the historical trajectory database and map data to calculate the dynamic lane width data. The output formula is: , where Wreal represents the real value of lane width, Wcam represents the value measured by the camera, and Whist represents the historical value of lane width; S7, based on the completed trajectory data of step S4 and the dynamic lane width data of step S6, generate local coordinate system parameters through Frenet frame calculation; S8, projecting the completed trajectory data of step S4 to the local coordinate system of step S7, and decomposing it into longitudinal velocity components and the lateral velocity component ; S9, according to step S8 , The relative distances Δx and Δy from the target object are used to calculate the longitudinal collision time. The lateral collision time ; S10, fusion step S9 , and road curvature extracted from maps , through the formula Generate a dynamic collision risk index, where and ,in, and Represents the curvature of the road The relevant weight coefficient; S11. The variance of the DRC index and the lateral velocity component of step S10 is judged based on a preset threshold value, and classification labels of the following scene, the lane change scene and the intersection scene are output.
2. The comprehensive index calculation method for the automatic driving scenario library according to claim 1, characterized in that: The method for constructing the temporal convolutional network includes: S401, configure a three-level cascaded dilated convolution module, set the dilated ratios of the first-level dilated convolution module, the second-level dilated convolution module, and the third-level dilated convolution module to 1, 2, and 4, respectively, preset 64 convolution kernels of size 3×3 for each dilated convolution module, set the convolution sliding step to 1, and use a symmetric filling method in the time dimension to maintain the size of the feature map; S402, inputting the feature map output by the front neural network into the first-level dilated convolution module to generate a primary feature map, inputting the primary feature map into the second-level dilated convolution module to generate an intermediate feature map, and inputting the intermediate feature map into the third-level dilated convolution module to generate a high-level feature map; S403, grouping the 64 convolution kernels of the first-level dilated convolution module, the second-level dilated convolution module, and the third-level dilated convolution module, and splitting the 64 convolution kernels of each level of dilated convolution module into 4 groups, each group containing 16 convolution kernels, and sharing parameters within the group; S404, performing structured pruning on the grouped 64 convolution kernels, retaining the first 50% of the highly activated convolution kernels in each level of the module through L1 norm analysis, and setting the remaining 50% of the convolution kernels to zero; S405, performing channel compression on the high-level feature map output by the pruned third-level hole convolution module through 1×1 convolution to generate a compressed high-level feature map; S406, performing feature fusion on the compressed high-level feature map and the input feature map of the micro-gated recurrent unit network through a tensor addition operation to generate a residual connection feature map; S407, applying a linear unit activation function with leakage correction to the output feature map of each dilated convolution module, wherein the leakage factor of the linear unit with leakage correction is set to 0.01; S408, outputting the residual connection feature map to the micro-gated recurrent unit network, and outputting the completed trajectory data.
3. The comprehensive index calculation method for the automatic driving scenario library according to claim 2, characterized in that: The configuration method of the micro-gated recurrent unit network includes: S409, constructing a micro gated recurrent unit network, wherein the hidden layer adopts a 16-node topology structure, and the gated unit weight initialization follows the Xavier normal distribution; S410, performing 8-bit integer quantization on the 32-bit floating-point weight Wfloat32 of the network, converting it into 8-bit integer weight Wint8, and recalculating quantization parameters μ and σ every 1000 training iterations, where μ and σ are the mean and standard deviation of Wfloat32 respectively; S411, dequantize Wint8 through inverse transformation to obtain dequantized floating point weights , ; S412. Use the straight-through estimator (STE) to approximate the gradient in the back-propagation stage, keeping the gradient of the rounding operation to 1.
4. The comprehensive index calculation method for the automatic driving scenario library according to claim 3, characterized in that: Calculated based on road curvature and The methods include: S1001. Obtaining road curvature ; S1002, judgment Range: like , according to the formula calculate , and then according to calculate ; like , mandatory setting ,as well as , the correction coefficient 0.02 is dynamically adjusted through the Kalman filter residual variance.
5. The comprehensive index calculation method for the automatic driving scenario library according to claim 1, characterized in that: The historical lane width in the dynamic lane width data in step S6 is calculated using an exponentially decaying moving average algorithm, with the decay factor set to 0.85; the initial historical lane width value is taken from the nominal lane width value of the corresponding road section in the map; When the camera confidence of several consecutive frames is lower than the preset threshold, the historical lane width is forced to be reset to the map reference value, and the lane line re-detection process based on color space segmentation is activated.
6. The comprehensive index calculation method for the automatic driving scenario library according to claim 5, characterized in that: The cubic spline interpolation control point interval of the road centerline in the Frenet frame calculation in step S7 is dynamically adjusted according to the real-time curvature: when the real-time curvature is greater than 0.1 per meter, the control point interval is shortened to 2 meters; when the real-time curvature is less than or equal to 0.1 per meter, the control point interval is extended to 10 meters; the curvature calculation adopts the central difference method to obtain the second-order derivative of the road centerline parameter equation.
7. The comprehensive index calculation method for the automatic driving scenario library according to claim 1, characterized in that: The parameter configuration of the extended Kalman filter satisfies: The state vector is defined as a two-dimensional vector X, which contains the longitudinal position s and the longitudinal velocity v; The process noise covariance matrix Q is configured as a diagonal matrix diag(0.1,0.05), reflecting the process noise variance of the longitudinal position and velocity; The observation noise covariance matrix R is configured as a diagonal matrix diag(0.2,0.1), which characterizes the measurement noise intensity of the longitudinal position and velocity; The state transfer matrix F adopts the uniform kinematics model: F = [[1, Δt], [0, 1]], where Δt = 0.1 seconds is the discretization time step; The observation matrix H is configured as a 2×2 unit matrix I to achieve full-dimensional observation of the state vector.
8. The comprehensive index calculation method for the automatic driving scenario library according to claim 1, characterized in that: ROI area and processing flow include: S501, in the pixel coordinate system of the front-view camera, a rectangular area from the upper left corner coordinate to the lower right corner coordinate of the road detection range of 100 meters in front of the vehicle is selected as the ROI area; S502, obtaining an input image, converting it from RGB format to YUV420 format, wherein the chrominance component adopts a 4:2:0 subsampling mode to generate a YUV420 format image with a 30% reduction in chrominance data volume; S503, performing a CLAHE algorithm of grid division on the Y component of the YUV420 format image in S502, setting an 8×8 pixel grid unit, a contrast limit threshold of 2.0, and using bilinear interpolation to eliminate the grid boundary effect, thereby generating a processed Y component; S504: Perform bilateral filtering on the U / V components of the YUV420 format image in S502 and set the spatial domain standard deviation Pixel, color domain standard deviation Grayscale, filter window diameter d = 5 pixels, generating filtered U / V components; S505, combining the processed Y component generated in S503 with the filtered U / V component generated in S504, and outputting the pre-processed image data in YUV420 format; Among them, the Y component represents the brightness component, the U component represents the difference between the blue chromaticity information and the brightness information in the image, and the V component represents the difference between the red chromaticity information and the brightness information in the image.
Citation Information
Patent Citations
Path planning method and device
CN114543827A
Lane line real-time map generation method and device for autonomous vehicle
CN116202542A