Road driving suitability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model

Through the combination of XGBoost-SHAP and the stochastic parameter multivariate Logit model, the impact of road environment aesthetics on autonomous vehicles is evaluated, and the problem of existing technology failing to effectively evaluate the road drivingability of autonomous vehicles is achieved, and high-precision road drivingability is achieved Sex evaluation and safety improvement.

CN119312214AActive Publication Date: 2025-01-14TONGJI UNIV

Patent Information

Application Number
CN202411361786.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

The prior art has failed to effectively evaluate the road drivingability of autonomous vehicles, especially the impact of road environment aesthetics on autonomous vehicles driving behavior, resulting in the possible risk of autonomous vehicles driving behavior in road environments where aesthetic design is preferred.

Method used

The road driving suitability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model is adopted, and combined with interpretable machine learning and random parameter multivariate logit model, the influence of road environment aesthetic characteristics on vertical and horizontal dangerous driving behavior is studied, and the road environment aesthetics is established Quantitative model to evaluate the impact of road environment on the driving suitability of autonomous vehicles.

Benefits of technology

Provide a high-precision road drivingability evaluation model, revealing the fixed and random impact of road environment aesthetics, helping designers quickly and accurately evaluate the road drivingability of autonomous vehicles, reduce risk factors in the road environment, and improve autonomous vehicles. driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312214A_ABST
    Figure CN119312214A_ABST
Patent Text Reader

Abstract

The invention discloses a road driving suitability evaluation method based on an XGBoost-SHAP and a random parameter multivariate Logit model, and relates to the field of road driving suitability evaluation analysis, and the method specifically comprises the following steps: S1, employing front automobile data recorder data and IMU data in an automatic driving automobile data set; s2, establishing a quantitative model of road environment aesthetics, and extracting related characteristic variables from four aspects of naturalness, vividness, diversity and uniformity; s3, an explainable machine learning method combining XGBoost and SHAP is adopted, occurrence of dangerous driving behaviors serves as a dependent variable, road environment aesthetics features serve as independent variables, a road driving suitability RRAV evaluation model of the automatic driving automobile is established, and the relation between road environment aesthetics and dangerous driving behavior RDBAV of the automatic driving automobile is researched; and S4, researching the influence of the random parameter heterogeneity on the RDBAV in the road driving suitability evaluation model by adopting a random parameter multivariate Logit model considering the mean value and variance heterogeneity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of drivability assessment, and in particular to a road drivability assessment method based on XGBoost-SHAP and a random parameter multivariate Logit model. Background Art

[0002] Aesthetics is generally regarded as a further requirement of road environment design based on meeting safety needs, which can provide human drivers with a more comfortable and pleasant driving experience. However, considering the differences between autonomous vehicles (AVs) and human drivers, it is still uncertain whether the road environment based on aesthetics can be "perceived" by autonomous vehicles, that is, whether the beautiful road environment can guide autonomous vehicles to better driving behavior.

[0003] Road environment aesthetics has an impact on the physiological and psychological state of human drivers, which in turn affects the driver's driving behavior. For example, green landscapes can block or frame the line of sight. When green landscapes are highlighted in safe areas, the driver's driving experience will be more pleasant. On the contrary, in dangerous areas, green landscapes need to be hidden to reduce visual interference and accident risks. In addition, due to the extremely low workload of drivers, monotonous road environments can cause passive fatigue, while rich road environments can slow down the driver's heart rate and reduce passive fatigue. Another study also found that when the number and angle of curves are reduced, the driver's lane positioning ability is impaired. The amount of road environment information is a key factor in road environment aesthetics and is negatively correlated with the driver's visual comfort. The amount of road environment information is calculated by weighting the road environment target area ratio and the amount of color information. When the value exceeds 0.644, the driver is prone to irritability, depression, and dangerous driving behavior. Therefore, aesthetic characteristics are important indicators of existing road environment design.

[0004] However, aesthetic-based road environment design often prioritizes the driving experience of human drivers, and its compatibility with the requirements of autonomous vehicles remains to be confirmed. Visual perception systems help autonomous vehicles capture road environment data, including color, semantic, and texture features, which are key components of road environment aesthetics. RGB color features are embedded in 3D point cloud space to improve the accuracy of monocular 3D target detection of autonomous vehicles. Color and texture features are also used to enhance the technology of autonomous vehicles to perceive the surrounding road environment, such as object recognition, lane detection, obstacle detection, etc. It can be seen that current research focuses on how to detect these features separately, and there is still a lack of a systematic road environment aesthetics quantification model, which is a prerequisite for further evaluating the roadworthiness of autonomous vehicles from the perspective of road environment aesthetics.

[0005] Road suitability reflects the suitability of the conditions provided by the road environment for autonomous driving. Currently, the road suitability of autonomous vehicles is evaluated based on road alignment, lane width, and road markings, but the aesthetics of the road environment have not yet been considered. For example, using data from more sensitive sensors to extract useful information can significantly reduce the parking sight distance, decision sight distance, and reaction time of autonomous vehicles, thereby reducing the requirements for the lateral clearance of horizontal curves, concave vertical curves, and the length of crest curves. Some studies have reported that the minimum lane width of some autonomous vehicles is 2.75m, and when the lane width is less than 2.5m, the function of the autonomous vehicle will not be activated. Similarly, the design of a road environment with a lane width of less than 2.8m and no road sidelines is a challenge for the machine vision system of autonomous vehicles. In addition, improperly marked and inconsistent road markings can even cause autonomous vehicle trials to fail or disengage.

[0006] The occurrence of dangerous driving behaviors of autonomous vehicles is often regarded as an important indicator of roadworthiness. Previous studies on dangerous driving behaviors have mainly focused on driver attitudes and risk level classification based on vehicle kinematics, ignoring the impact of road environment aesthetics. For example, one study found that automation-induced complacency, which refers to an exaggerated perception of dependence, may increase susceptibility to dangerous driving behaviors. Vehicle kinematic data, such as braking, acceleration, steering, average driving distance per trip, and duration, are used to classify dangerous driving behaviors into different risk groups. A dangerous driving behavior assessment model is established using vehicle position as input. In addition, high accuracy and model interpretability are necessary conditions for predicting dangerous driving behaviors and exploring their influencing factors.

[0007] In summary, although aesthetics-based road environment design has become a popular trend to provide a more pleasant driving experience and guide better human driving behavior, the relationship between road environment aesthetics and autonomous vehicle driving behavior is still unclear, which hinders the application of road environment aesthetics in evaluating the roadworthiness of autonomous vehicles.

[0008] Therefore, it is necessary to provide a road suitability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model to solve the above problems. Summary of the invention

[0009] The purpose of the present invention is to provide a road suitability evaluation method based on XGBoost-SHAP and a random parameter multivariate logit model, combine an interpretable machine learning method with a random parameter multivariate logit model, explore the influence of road environment aesthetic characteristics on longitudinal and lateral dangerous driving behaviors, and propose a road suitability evaluation model based on road environment aesthetics. The evaluation model has high accuracy, reveals the fixed and random effects of road environment aesthetics, and takes into account the heterogeneity of mean and variance.

[0010] To achieve the above object, the present invention provides a road drivability evaluation method based on XGBoost-SHAP and a random parameter multivariate Logit model, comprising the following steps:

[0011] S1: Using the front dashcam data and IMU data in the autonomous vehicle dataset, 1491 longitudinal RDBAV events and 225 lateral RDBAV events and the corresponding road environment images were obtained;

[0012] S2: A quantitative model of road environment aesthetics was established to extract relevant characteristic variables from four aspects: naturalness, vividness, diversity and unity;

[0013] S3: Using an interpretable machine learning method combining XGBoost and SHAP, with the occurrence of dangerous driving behavior as the dependent variable and the road environment aesthetic characteristics as the independent variable, a road suitability evaluation model for autonomous vehicles is established to study the relationship between road environment aesthetics and the dangerous driving behavior RDBAV of autonomous vehicles;

[0014] S4: A random parameter multivariate logit model considering mean and variance heterogeneity is used to study the impact of random parameter heterogeneity on RDBAV in the road suitability evaluation model.

[0015] Preferably, in step S1, the front dashcam data includes a 5-megapixel image of the front driving environment with a maximum rate of 6 Hz, the IMU data includes the vehicle linear acceleration (m / s2) and angular velocity (rad / s), the direction of the IMU frame is exactly the same as the vehicle body frame, and two thresholds are used to define RDBAV:

[0016] The longitudinal RDBAV with an absolute value of longitudinal acceleration greater than 0.5g and the lateral RDBAV with an absolute value of lateral acceleration greater than 0.6g were finally obtained, and the baseline event NDBAV without risky driving behavior was extracted, and the ratio of RDBAV to NDBAV was 1:2.

[0017] Preferably, in step S2, naturalness describes the naturalness of the road environment without human intervention, and naturalness includes weather conditions, brightness and contrast of the road environment, weather conditions are categorical variables, and brightness is expressed as the standard deviation σ of the brightness of the grayscale image I , the greater the difference in brightness between pixels, the greater the standard deviation σ I The larger the value, the contrast is calculated by the four nearest neighbor method, which estimates the contrast by comparing the grayscale difference between adjacent pixels. The calculation formula is as follows:

[0018]

[0019] Among them, I(x,y) represents the grayscale image, x and y represent the coordinates of the pixel, represents the average grayscale value of the image, N is the total number of pixels in the image, δ(i,j)=|ij|, represents the grayscale difference between adjacent pixels, i and j are two adjacent pixels respectively, P δ (i, j) is the pixel distribution probability when the grayscale difference between adjacent pixels is δ.

[0020] Preferably, in step S2, the vividness includes the elements in the road environment and the relationship between the elements. The vividness is quantified by the area percentage of the elements in the road environment and the visual road linear features. The area percentage is calculated by the semantic segmentation result. The structure of the semantic segmentation is an encoder-decoder structure. The encoder introduces a lightweight feature extraction module MobileNetV2 and a hollow space pyramid pooling module ASPP for feature extraction. The decoder uses upsampling and skip connections to restore the spatial resolution and combines the low-level and high-level features of the encoder part to improve the segmentation accuracy.

[0021] The visual road linear features are quantified by the driver's visual road linear model. The driver's visual linear model uses the Catmull-Rom spline curve of the driver's visual perception to fit the left and right road boundaries. There are four control points on both sides of the road boundary. Four horizontal lines pass through the control points, dividing the driver's field of vision into three areas: near view, middle view and far view. The length and curvature of the visual road linear shape are extracted according to the left and right boundaries as the shape parameters of the driver's visual road linear model. The left boundary is [vS iL ,vK iL ], and the right boundary is [vS iR ,vK iR ](i=1,2,3), the calculation formula is as follows:

[0022] v iL =S (i+1)L -S iL

[0023]

[0024] v iR =S (i+1)R -S iR

[0025]

[0026] Where i = 1, 2, 3, S iL and S iR They represent the control points P iL and P iR The cumulative length of the road boundary can be seen at the control point, and the cutting angle is f iL and f iR Indicates that vS iL and vK iL Represent the left boundary control point P respectively iL and P (i+1)L Visual road curve length and curvature between VS iR and vK iR are the right boundary control points P iL and P (i+1)L The visual road curve length and curvature between.

[0027] Preferably, in step S2, the diversity is quantified into three features: color richness, main color tone and spatial information complexity SI. The color richness feature The overall richness of the colors in the road environment is quantified through the RGB channel. The larger the color characteristic value, the richer the color of the road environment. The calculation formula is as follows:

[0028] rg=RG

[0029]

[0030] Where R, G, and B are the values ​​of the three color channels, σ and μ are the standard deviation and mean value of the pixel cloud along the (·) direction, σ rg and σ yb are the standard deviations along the rg and yb axes, σ rgyb is the triangular length of the standard deviation in RGB space, μ rg and μ yb are the average values ​​of the rg and yb axes, μ rgyb The length of the triangle representing the average value in RGB space;

[0031] The main color feature is the percentage of the color that appears most frequently in the road environment. The K-means clustering algorithm is used to identify the main color feature in the road environment, and the ratio of the number of main color pixels to the total number of pixels in the road environment image is calculated as the main color feature value;

[0032] The spatial information complexity (SI) feature calculates the visual complexity of the road environment based on the edge information of the image. The road environment image is filtered in both horizontal and vertical directions by Sobel kernels. r Represents the SI value of a single pixel in the road environment image in the horizontal and vertical directions. SI is the SI of all pixels in the road environment image. r The average value of the value is calculated as follows:

[0033]

[0034] Where P is the number of pixels in the road environment image, s h and v They are grayscale road environment images after horizontal and vertical Sobel kernels filtering respectively;

[0035] According to the four features of center of gravity cog, object separation, composition and symmetry extracted from the road environment image, the unity is described. The object separation represents the foreground-background ratio in the road environment. The adaptive threshold selection method is used to determine the background threshold T for the blurred grayscale image. The road environment image is binarized and the grayscale image I is obtained from the binarized grayscale image. binary Calculate the cog and object separation in the following formula:

[0036]

[0037] Where m is the number of horizontal pixels of the image matrix c of size m×n, n is the number of vertical pixels, and c ij is the (i,j)th element of the image, i cog is the i coordinate of cog, j cog is the j coordinate of cog, I gray (x, y) is the pixel of the grayscale image, x represents the horizontal direction, y represents the vertical direction, T is the foreground and background segmentation threshold, n fp is the number of foreground pixels, specifically the number of pixels with a pixel value of 1 in the binary image, n bp is the number of background pixels, specifically the number of pixels with a pixel value of 0;

[0038] The rule of thirds is used to evaluate the composition of the road environment image. The rule of thirds divides the road image into three equal horizontal and vertical parts, resulting in 9 identical rectangles and 4 lines. If the cog is located at an intersection or on a straight line, the road environment image is more balanced and the subject is more prominent. The composition is calculated by the average value of the distance between the cog in the road environment image and the four intersection points of the rule of thirds.

[0039] The symmetry feature uses the Scale-invariant feature transform feature detection algorithm to find the feature points of vegetation, and generates a set of potential symmetry feature pairs (p i ,p j ), the axis of symmetry is defined as p i With p j The perpendicular bisector of the connecting line, the axis of symmetry is expressed in polar coordinates (r,θ), and the symmetry M ij By the angular symmetry weight Φ ij and scale symmetric weight S ij The calculation formula is as follows:

[0040] Φ ij =1-cos(φ i +φ j -2θ ij )

[0041]

[0042] Where p i and p j are two potential symmetric feature points of the symmetric pair, θ ij is the angle between the straight line connecting two potential symmetric feature points and the x-axis, φ i and φ j are the angles between the position vectors of two potential symmetric feature points and the x-axis, Φ ij is the angular symmetry weight, Φ ij ∈[-1,1],s i and j are the scale ratios of the corresponding feature points, S ij is the scale symmetric weight, S ij ∈[0,1].

[0043] Preferably, in step S3, XGBoost is a machine learning algorithm based on the gradient boosting decision tree method, and XGBoost is selected to build a prediction model for dangerous driving behavior of an autonomous driving vehicle, specifically including the following steps:

[0044] S31: Set a system with m features and a dataset of n samples (x i ,y i ), the prediction value of XGBoost consisting of K gradient boosting decision trees is calculated by the following formula:

[0045]

[0046] in, represents the predicted value, f krepresents the kth tree, fx(x i ) represents the score of the i-th sample in the k-th tree, K represents the total number of samples, x i represents the i-th input data, and F represents all possible CARTs;

[0047] S32: XGBoost consists of a training loss objective function and a regularization objective function:

[0048]

[0049] Among them, y i is the observed value, is the loss function, used to measure y i and The difference between them, Ω is the regularization term used to penalize the model complexity, γ represents the complexity of each leaf; T represents the total number of leaves in the decision tree; λ represents a trade-off parameter used to scale the penalty; ω j represents the score on the jth leaf;

[0050] S33: Perform a second-order Taylor expansion on the objective function and remove the constant term to simplify the objective function as shown below. In XGBoost, according to the optimal ω j Split the decision tree and stop splitting when the node depth of the decision tree reaches the maximum depth:

[0051]

[0052] Among them G j and H j Represent the sum of the first-order derivative and the second-order derivative of the leaf node respectively.

[0053] Preferably, in step S3, SHAP provides an estimate of feature contribution to measure the feature attribution value of the prediction result, and the SHAP value is calculated by the following formula:

[0054]

[0055] Among them, φ i represents the contribution of feature i, N represents the set of all input features, n represents the total number of features, ν is the given model, and S is the set of all observed features.

[0056] Preferably, in step S4, the random parameter multivariate logit model uses the following function to determine the probability of dangerous driving behavior of the autonomous driving vehicle:

[0057] S kn =β k X kn +ε kn

[0058] Among them, s kn represents the probability function for determining whether there is any dangerous driving behavior of the autonomous vehicle in sample n, k is the result set of whether dangerous driving behavior occurs, k = 1 means that dangerous driving behavior occurs, k = 0 means that no dangerous driving behavior occurs, X kn represents the explanatory variable vector that affects whether the autonomous driving vehicle has risky driving behavior, β k represents the estimable parameter vector, ε kn It is represented as the error term;

[0059] ε kn Obeying the generalized extreme value distribution, the standard multivariate logit model is transformed into:

[0060]

[0061] Where P n (k) is the probability of dangerous driving behavior of the autonomous vehicle in sample n;

[0062] Adding β by introducing a random term kn , accounting for potential heterogeneity in the mean and variance of the estimated parameters, is calculated as follows:

[0063] β kn =β k +Θ kn Z kn +σ kn EXP(Ψ kn W kn )v kn

[0064] Among them, β kn represents the estimated parameter that varies with different samples, β k represents the average parameter estimate of all samples, Z kn represents the explanatory factors of risky driving behavior outcome k, which is used to capture mean heterogeneity, Θ kn represents the corresponding estimable parameter vector, W kn Indicates the explanatory factors of the risky driving behavior outcome k, which is used to capture the variance σ kn The heterogeneity in kn represents the estimated parameter vector in the heterogeneous variance, v kn represents interference;

[0065] The random parameters follow the normal distribution. NLOGIT 6.0 software is used, and Halton sequence sampling is adopted with 500 sampling times. All model estimates are calculated by the maximum likelihood method to calculate the impact of a unit increase in the marginal effect explanation independent variable on the occurrence of dangerous driving behavior of autonomous vehicles.

[0066] Therefore, the present invention adopts the above-mentioned road drivability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model, which has the following beneficial effects:

[0067] (1) By analyzing the relationship between road environment aesthetics and dangerous driving behavior of autonomous vehicles, the present invention provides a new perspective for the road suitability evaluation model of autonomous vehicles, which can help road designers quickly and accurately evaluate the road suitability of autonomous vehicles.

[0068] (2) The evaluation model of the present invention also provides an explainable framework for road environment optimization design, which can more effectively reduce specific risk factors in the road environment, thereby improving the driving safety of autonomous vehicles.

[0069] (3) The road environment aesthetics quantification model proposed in the present invention provides a scientific evaluation of road environment quality, promotes the practicality of road environment aesthetics, improves the visual experience of human drivers and self-driving cars, and promotes the development of human-like visual perception systems for self-driving cars.

[0070] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 It is a flow chart of the road drivability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model of the present invention;

[0072] Figure 2 It is a framework diagram of the road drivability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model of the present invention;

[0073] Figure 3 is a diagram of the encoder-decoder structure of semantic segmentation in the present invention;

[0074] Figure 4 It is the driver's visual road linear model diagram in the present invention;

[0075] Figure 5 The ratio of the number of main tone pixels of the K-means clustering algorithm to the total number of pixels of the road environment image in the present invention is used as the main tone feature value;

[0076] Figure 6 is a road environment image divided by the rule of thirds in the present invention;

[0077] Figure 7 is a comparison diagram of the ROC curve of RRAV in the present invention;

[0078] Figure 8It is a global importance diagram of each influencing factor in the present invention;

[0079] Fig. 9 It is a local contribution diagram of each influencing factor in the present invention. DETAILED DESCRIPTION

[0080] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0081] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0082] The words "include" or "comprises" and the like used in the present invention mean that the elements before the word include the elements listed after the word, and do not exclude the possibility of also including other elements. The orientation or position relationship indicated by the terms "inside", "outside", "upper", "lower", etc. is based on the orientation or position 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. Therefore, it cannot be understood as a limitation of the present invention. When the absolute position of the described object changes, the relative position relationship may also change accordingly. In the present invention, unless otherwise clearly specified and limited, the terms "attachment" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral body; it can be directly connected, or indirectly connected through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0083] Example

[0084] like Figure 1 As shown, the present invention provides a road drivability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model. The framework diagram of the road drivability evaluation method is shown in Figure 2 As shown, the following steps are included:

[0085] S1: Using the front camera data and IMU data in the autonomous vehicle dataset, 1491 longitudinal RDBAV events and 225 lateral RDBAV events and the corresponding road environment images are obtained; in step S1, the front dashcam data contains a 5-megapixel image of the front driving environment with a maximum rate of 6Hz, and the IMU data includes the vehicle linear acceleration (m / s2) and angular velocity (rad / s). The direction of the IMU frame is exactly the same as the vehicle's body frame. Two thresholds are used to define RDBAV:

[0086] The longitudinal RDBAV with an absolute value of longitudinal acceleration greater than 0.5g and the lateral RDBAV with an absolute value of lateral acceleration greater than 0.6g were finally obtained, and the baseline event NDBAV without risky driving behavior was extracted, and the ratio of RDBAV to NDBAV was 1:2.

[0087] S2: A quantitative model of road environment aesthetics was established to extract relevant feature variables from four aspects: naturalness, vividness, diversity, and unity; providing a quantitative description of road environment aesthetics. In step S2, naturalness describes the naturalness of the road environment without human intervention. Naturalness includes weather conditions, brightness and contrast of the road environment. Weather conditions are categorical variables, such as sunny, cloudy, etc. Brightness is expressed as the standard deviation of the brightness of the grayscale image σ I , the greater the difference in brightness between pixels, the greater the standard deviation σ I The larger the value, the contrast is calculated by the four nearest neighbor method, which estimates the contrast by comparing the grayscale difference between adjacent pixels. The calculation formula is as follows:

[0088]

[0089] Among them, I(x,y) represents the grayscale image, x and y represent the coordinates of the pixel, represents the average grayscale value of the image, N is the total number of pixels in the image, δ(i,j)=|ij|, represents the grayscale difference between adjacent pixels, i and j are two adjacent pixels respectively, P δ (i, j) is the pixel distribution probability when the grayscale difference between adjacent pixels is δ.

[0090] In step S2, vividness refers to the memorability of the road environment, including the elements in the road environment and the relationship between the elements. The vividness is quantified by the area percentage of the elements in the road environment and the visual road linear features. The area percentage is calculated by the semantic segmentation result. The structure of semantic segmentation is an encoder-decoder structure, such as Figure 3 As shown in the figure. The encoder introduces the lightweight feature extraction module MobileNetV2 and the hollow spatial pyramid pooling module ASPP for feature extraction, and the decoder uses upsampling and skip connections to restore the spatial resolution; and combines the low-level and high-level features of the encoder part to improve the segmentation accuracy. The MobileNetV2 network module reduces the network calculation complexity and improves the real-time calculation efficiency of the model. Finally, 14 elements are extracted from the road environment, including vehicles, buildings, pedestrians, etc.

[0091] In order to quantify the visual road linear features, the driver's visual linear model is used to quantify the visual road linear features, such as Figure 4As shown in the figure, the driver's visual linear model uses the Catmull-Rom spline curve of the driver's visual perception to fit the left and right road boundaries. There are four control points on both sides of the road boundary. Four horizontal lines pass through the control points, dividing the driver's field of vision into three areas: near view, middle view and far view. The length and curvature of the visual road linear shape are extracted according to the left and right boundaries as the shape parameters of the driver's visual road linear model. The left boundary is [vS iL ,vK iL ], and the right boundary is [vS iR ,vK iR ](i=1,2,3), the calculation formula is as follows:

[0092] v iL =S(i +1)L -S iL

[0093]

[0094] v iR =S (i+1)R -S iR

[0095]

[0096] Where i = 1, 2, 3, S iL and S iR They represent the control points P iL and P iR The cumulative length of the road boundary can be seen at the control point, and the cutting angle is f iL and f iR Indicates that vS iL and vK iL Represent the left boundary control point P respectively iL and P (i+1)L The visual road curve length and curvature between vS iR and vK iR are the right boundary control points P iL and P (i+1)L The visual road curve length and curvature between.

[0097] In step S2, the diversity is quantified into three features: color richness, main color tone and spatial information complexity SI. The color richness feature The overall richness of the colors in the road environment is quantified through the RGB channel. The larger the color characteristic value, the richer the color of the road environment. The calculation formula is as follows:

[0098] rg=RG

[0099]

[0100] Where R, G, and B are the values ​​of the three color channels, σ and μ are the standard deviation and mean value of the pixel cloud along the (·) direction, σ rg and σ yb are the standard deviations along the rg and yb axes, σ rgyb is the triangular length of the standard deviation in RGB space, μ rg and μ yb are the average values ​​of the rg and yb axes, μ rgyb The length of the triangle representing the average value in RGB space;

[0101] The main color feature is the percentage of the color that appears most frequently in the road environment. The K-means clustering algorithm is used to identify the main color features in the road environment, such as Figure 5 As shown, the ratio of the number of main color pixels to the total number of pixels in the road environment image is calculated as the main color feature value;

[0102] The spatial information complexity (SI) feature calculates the visual complexity of the road environment based on the edge information of the image. The road environment image is filtered in both horizontal and vertical directions using Sobel kernels. r Represents the SI value of each pixel in the road environment image in the horizontal and vertical directions. SI is the SI of all pixels in the road environment image. r The average value of the value is calculated as follows:

[0103]

[0104] Where P is the number of pixels in the road environment image, s h and v They are grayscale road environment images after horizontal and vertical Sobel kernels filtering respectively;

[0105] According to the four features of center of gravity (cog), object separation, composition and symmetry extracted from the road environment image, the unity is described. The object separation represents the foreground-background ratio in the road environment. The adaptive threshold selection method is used to determine the background threshold T for the blurred grayscale image. The road environment image is binarized and the grayscale image I is obtained from the binarized grayscale image. binary Calculate the cog and object separation in the following formula:

[0106]

[0107] Where m is the number of horizontal pixels of the image matrix c of size m×n, n is the number of vertical pixels, and c ij is the (i,j)th element of the image, i cog is the i coordinate of cog, j cogis the j coordinate of cog, I gray (x, y) is the pixel of the grayscale image, x represents the horizontal direction, y represents the vertical direction, T is the foreground and background segmentation threshold, n fp is the number of foreground pixels, specifically the number of pixels with a pixel value of 1 in the binary image, n bp is the number of background pixels, specifically the number of pixels with a pixel value of 0;

[0108] The rule of thirds is used to evaluate the composition of the road environment image. The rule of thirds divides the road image into three equal horizontal and vertical parts, resulting in 9 identical rectangles and 4 lines. If the cog is located at the intersection or on the straight line, the road environment image is more balanced and the subject is more prominent. The composition is through the four intersection points of the cog and the rule of thirds in the road environment image, such as Figure 6 The calculation is performed by taking the average of the distances between L1, L2, L3, and L4 shown in ;

[0109] The symmetry feature uses the Scale-invariant feature transform feature detection algorithm to find the feature points of vegetation, and generates a set of potential symmetry feature pairs (p i ,p j ), the axis of symmetry is defined as p i With p j The perpendicular bisector of the connecting line, the axis of symmetry is expressed in polar coordinates (r,θ), and the symmetry M ij By the angular symmetry weight Φ ij and scale symmetric weight S ij The calculation formula is as follows:

[0110] Φ ij =1-cos(φ i +φ j -2θ ij )

[0111]

[0112] Where p i and p j are two potential symmetric feature points of the symmetric pair, θ ij is the angle between the straight line connecting two potential symmetric feature points and the x-axis, φ i and φ j are the angles between the position vectors of two potential symmetric feature points and the x-axis, Φ ij is the angular symmetry weight, Φ ij ∈[-1,1],s i and j are the scale ratios of the corresponding feature points, S ij is the scale symmetric weight, Sij ∈[0,1].

[0113] As shown in the distribution of input variables in Table 1, the 38 characteristics of road environment aesthetics are finally obtained from four aspects: "naturalness", "liveliness", "diversity" and "unity". The definition and descriptive statistics of these characteristics are provided in detail in Table 1. These characteristics are regarded as independent variables for evaluating the roadworthiness of autonomous vehicles, while the occurrence of longitudinal or lateral dangerous driving behaviors is regarded as the dependent variable.

[0114] Table 1

[0115]

[0116]

[0117] S3: Using an interpretable machine learning method combining XGBoost and SHAP, with the occurrence of dangerous driving behavior as the dependent variable and the road environment aesthetic feature variable as the independent variable, a road drivability evaluation model for autonomous vehicles is established to study the relationship between road environment aesthetics and the dangerous driving behavior RDBAV of autonomous vehicles; in step S3, XGBoost is a machine learning algorithm based on the gradient boosting decision tree method, which can effectively predict categorical variables. XGBoost is selected to build a prediction model for dangerous driving behavior of autonomous vehicles, which specifically includes the following steps:

[0118] S31: Set a system with m features and a dataset of n samples (x i ,y i ), the prediction value of XGBoost consisting of K gradient boosting decision trees is calculated by the following formula:

[0119]

[0120] in, represents the predicted value, f k represents the kth tree, f k (c i ) represents the score of the i-th sample in the k-th tree, K represents the total number of samples, x i represents the i-th input data, and F represents all possible CARTs;

[0121] S32: XGBoost consists of a training loss objective function and a regularization objective function:

[0122]

[0123] Among them, y i is the observed value, is the loss function, used to measure yi and The difference between them, Ω is the regularization term used to penalize the model complexity, γ represents the complexity of each leaf; T represents the total number of leaves in the decision tree; λ represents a trade-off parameter used to scale the penalty; ω j represents the score on the jth leaf;

[0124] S33: Perform a second-order Taylor expansion on the objective function and remove the constant term to simplify the objective function as shown below. In XGBoost, according to the optimal ω j Split the decision tree and stop splitting when the node depth of the decision tree reaches the maximum depth:

[0125]

[0126] Among them G j and H j Represent the sum of the first-order derivative and the second-order derivative of the leaf node respectively.

[0127] When evaluating the predictive performance of categorical variables, commonly used indicators include accuracy, precision, recall, and F1 score. Accuracy represents the ratio of correctly predicted samples to total samples, while precision represents the ratio of correctly predicted positive samples to all predicted positive samples. Recall measures the ratio of correctly predicted positive samples to actual positive samples. F1 score is the harmonic mean of accuracy and recall. In addition, the area under the curve (AUC) of the receiver operating characteristic curve is a common indicator reflecting the overall performance of the classifier. The higher the values ​​of these evaluation indicators, the better the predictive performance of the model.

[0128] In step S3, SHAP is used to improve the interpretability of the XGBoost model results and demonstrate the impact of various aesthetic features on the dangerous driving behavior of autonomous vehicles. SHAP provides an estimate of feature contribution to measure the feature attribution value of the prediction results. The SHAP value is calculated using the following formula:

[0129]

[0130] Among them, φ i represents the contribution of feature i, N represents the set of all input features, n represents the total number of features, ν is the given model, and S is the set of all observed features.

[0131] S4: A random parameter multivariate logit model considering mean and variance heterogeneity is used to study the impact of random parameter heterogeneity in the roadworthiness evaluation model on RDBAV. In step S4, the random parameter multivariate logit model uses the following function to determine the probability of dangerous driving behavior of the autonomous vehicle:

[0132] Skn =β k X kn +ε kn

[0133] Among them, S kn represents the probability function for determining whether there is any dangerous driving behavior of the autonomous vehicle in sample n, k is the result set of whether dangerous driving behavior occurs, k = 1 means that dangerous driving behavior occurs, k = 0 means that no dangerous driving behavior occurs, X kn represents the explanatory variable vector that affects whether the autonomous driving vehicle has risky driving behavior, β k represents the estimable parameter vector, ε kn It is represented as the error term;

[0134] ε kn Obeying the generalized extreme value distribution, the standard multivariate logit model is transformed into:

[0135]

[0136] Where P n (k) is the probability of dangerous driving behavior of a self-driving car in sample n;

[0137] Adding β by introducing a random term kn , accounting for potential heterogeneity in the mean and variance of the estimated parameters, is calculated as follows:

[0138] β kn =β k +Θ kn Z kn +σ kn EXP(Ψ kn W kn )v kn

[0139] Among them, β kn represents the estimated parameter that varies with different samples, β k represents the average parameter estimate of all samples, Z kn represents the explanatory factor of risky driving behavior outcome k, used to capture mean heterogeneity, Θ kn represents the corresponding estimable parameter vector, W kn Indicates the explanatory factors of the risky driving behavior outcome k, which is used to capture the variance σ kn The heterogeneity in kn represents the estimated parameter vector in the heterogeneous variance, ν kn represents interference;

[0140] The random parameters follow the normal distribution. NLOGIT 6.0 software is used, and Halton sequence sampling is adopted. The sampling times are 500. All model estimates are calculated by the maximum likelihood method, and the marginal effect is calculated to explain the impact of a unit increase in the independent variable on the occurrence of dangerous driving behavior of autonomous vehicles.

[0141] Embodiment 1

[0142] In this embodiment, all samples are randomly divided into 70% for training and 30% for testing. After standardizing 38 independent input variables, an evaluation model for the road suitability of autonomous vehicles is established from the perspective of road environment aesthetics using XGBoost. According to the optimal results of grid search and five-fold cross validation, the parameters in XGBoost are set as follows: the maximum depth of the tree is 3, the number of trees is 300, the learning rate is 0.1, and the sub-sample ratio of the training instance is 0.5. Table 2 shows the performance of the road suitability evaluation model for autonomous vehicles using XGBoost. For the prediction of longitudinal dangerous driving behavior, the model has an accuracy of 96.9%, a precision of 0.970, a recall of 0.960, and an F1 score of 0.969. When predicting lateral dangerous driving behavior, the model has an accuracy of 91.8%, a precision of 0.946, a recall of 0.875, and an F1 score of 0.915. Overall, XGBoost shows good performance and high accuracy in predicting longitudinal and lateral dangerous driving behaviors (i.e., evaluating the road suitability of autonomous vehicles from the perspective of road environment aesthetics).

[0143] Table 2

[0144]

[0145]

[0146] This embodiment also adopts some widely used machine learning methods to establish a road suitability evaluation model for autonomous vehicles, including K-nearest neighbor (KNN), logistic regression (LR), random forest (RF) and support vector machine (SVM). As shown in Table 2, the longitudinal dangerous driving behavior prediction accuracy of the four methods are 89.5%, 83.0%, 82.1% and 67.6%, respectively, and the lateral dangerous driving behavior prediction accuracy is 78.7%, 80.3%, 83.6% and 73.8%, respectively. Compared with these methods, XGBoost performs better and has a higher accuracy rate (the longitudinal and lateral dangerous driving behavior prediction accuracy rates are 96.9% and 91.8%, respectively). In addition, whether in predicting longitudinal or lateral dangerous driving behaviors, XGBoost's precision, recall and F1 score are also the highest among these methods. In order to further intuitively compare the evaluation performance of these different methods, such as Figure 7As shown in Figure 2, the ROC curves of the above methods are plotted. For longitudinal and lateral dangerous driving behaviors, the AUC values ​​of the XGBoost method are greater than 0.98, while the AUC values ​​of the other four methods are less than 0.95. Overall, XGBoost is better than the other four methods in evaluating the road suitability of autonomous vehicles.

[0147] Although the prediction accuracy is high, XGBoost is a black box method and it is difficult to clearly explain the relationship between the independent variable and the dependent variable. Therefore, this embodiment uses SHAP to explain the results of the roadworthiness evaluation model of the autonomous driving car from the perspectives of global feature contribution and individual feature contribution. Figure 8 The global feature contribution is shown, which indicates the relative importance of the independent variables sorted by the absolute SHAP value. The higher the absolute SHAP value, the higher the relative importance and the greater the impact on risky driving behavior. Fig. 9 The contribution of individual features is shown by revealing how the value of the variable affects its impact on the model output. Fig. 9 Each point in is a sample, and the color of the point represents the value of the corresponding independent variable (i.e., eigenvalue). From the black solid point to the white hollow point, the eigenvalue gradually decreases. The x-axis value of the point is the SHAP value, which reflects the impact of the corresponding independent variable on RDBAV. A positive SHAP value with a high eigenvalue of the independent variable indicates an increased likelihood of dangerous driving behavior, while a negative SHAP value with a high eigenvalue means a decreased likelihood of dangerous driving behavior.

[0148] Figure 8 (a) and Fig. 9 (a) shows the impact of each variable on the longitudinal RDBAV. The tree area percentage (AT) is the most important variable, with the highest SHAP absolute value of 1.32. Fig. 9 As can be seen in (a), the black solid points of AT are distributed on the negative axis of the SHAP value, and the white hollow points are distributed on the positive axis. This shows that AT is negatively correlated with the probability of longitudinal dangerous driving behavior. After AT, the important variables are the main color (DC) and spatial information complexity (SI). Both variables are based on diversity. The absolute SHAP values ​​of the main color (DC) and spatial information complexity (SI) are greater than 0.95. Fig. 9 As shown in (a), the SHAP values ​​of the larger eigenvalues ​​in these variables are much smaller than those of the smaller eigenvalues, indicating that the more prominent the main color tone in the road environment and the more complex the spatial information, the lower the possibility of longitudinal dangerous driving behavior.

[0149] In terms of liveliness, the wall area percentage (AW), traffic light area percentage (AL), and electric pole area percentage (A.PO) ranked fourth, sixth, and seventh, respectively. Figure 8(a) The absolute SHAP values ​​of these variables are all greater than 0.8. It is worth noting that the impact of A.PO is different from that of the other two variables. The probability of longitudinal dangerous driving behavior increases with the increase of A.PO, while AW and AL are negatively correlated with the probability of longitudinal dangerous driving behavior. In terms of visual road linear features, the length of the left visual curve of the “near view” (vS 1L ) also affects the possibility of longitudinal risky driving behavior, with an absolute SHAP value of 0.90. 1L When the length is longer, longitudinal dangerous driving behavior is less likely to occur because Fig. 9 In (a), the vS with higher eigenvalues 1L The SHAP values ​​of the features (i.e., black solid points) are distributed below 0. The absolute SHAP value of separation in terms of uniformity is 0.78, and its importance is ranked 8th. Brightness in terms of naturalness ranks 13th with an absolute SHAP value of 0.54. Since the SHAP values ​​of features with high eigenvalues ​​(i.e., black solid points) are distributed above 0, it is found that brightness has a positive effect on the possibility of longitudinal dangerous driving behavior.

[0150] The impact of each independent variable on lateral dangerous driving behavior is as follows Figure 8 (b) and 9(b). The aesthetic features show the greatest effect in terms of vividness. Among them, the area percentages of roads (AR), buildings (AB), grass (AG), and walls (AW) are all in the top 4 in the importance ranking, and their absolute SHAP values ​​are all greater than 0.65. Fig. 9 (b) It can be seen that AR, AB, and AW are negatively correlated with the probability of lateral dangerous driving behavior, because their black solid points are scattered on the negative axis of the SHAP value. In contrast, the probability of lateral dangerous driving behavior increases with the growth of AG. The next important variable is the left visual curvature of the “middle scene” (vK 2L ), with an absolute SHAP value of 0.56. 2L The SHAP values ​​of smaller eigenvalues ​​are much higher than those of larger eigenvalues, indicating that vK 2L Negatively correlated with the occurrence of lateral dangerous driving behavior. Object separation in terms of unity also has a significant effect, ranking sixth with an absolute SHAP value of 0.48. The SHAP value of higher object separation is smaller than that of lower object separation, indicating that object separation is negatively correlated with the occurrence of lateral dangerous driving behavior. In terms of diversity, spatial information complexity (SI) and color richness rank seventh and eighth, respectively. The more complex the SI and the richer the color, the higher the probability of lateral dangerous driving behavior, such as Fig. 9(b) shows that the SHAP values ​​of SI and color richness with high eigenvalues ​​are above 0. In terms of naturalness, similar to the effect on longitudinal dangerous driving behavior, brightness has a negative impact on the likelihood of lateral dangerous driving behavior.

[0151] Estimation results of random parameter multivariate logit model

[0152] The estimation results of the random parameter multivariate logit models based on heterogeneity of means and variances for predicting longitudinal and lateral risky driving behaviors are shown in Tables 3 and 4, respectively. Marginal effects are calculated to provide the impact of a one-unit increase in the explanatory variables on the probability of RDBAV outcomes.

[0153] Table 3

[0154]

[0155] Table 4

[0156]

[0157] Heterogeneity of mean and variance

[0158] For the analysis of longitudinal dangerous driving behavior, after eliminating insignificant factors, the results are shown in Table 3. Spatial information complexity (SI) is the only significant random parameter with significant heterogeneity in mean but no significant heterogeneity in variance. SI follows a normal distribution N(1.459,1.877), which means that SI reduces the probability of longitudinal RDBAV for 21.77% of the observations, but increases the probability of longitudinal RDBAV for 78.23%. As shown in Table 3, the positive coefficient value is 1.459, indicating that SI increases the probability of longitudinal RDBAV. In terms of mean heterogeneity, the negative coefficient value is -3.033. Compared with cloudy days, sunny days reduce the mean of SI, making the possibility of longitudinal dangerous driving behavior less likely.

[0159] The analysis of lateral dangerous driving behavior found that the final results after eliminating non-significant factors are shown in Table 4. The length of the right visual curve in the “near view” (vS 1R ) is the only statistically significant random parameter, which has significant heterogeneity in mean but not in variance. vS 1R It follows the normal distribution N(1.936,1.879), indicating that vS 1R The probability of lateral dangerous driving behavior is reduced by 15.15% of the observations, but the probability of lateral dangerous driving behavior is increased by 84.85% of the observations. As shown in Table 4, the positive coefficient value is 1.936, indicating that the probability of lateral dangerous driving behavior increases with vS 1RIn terms of mean heterogeneity, the positive value of the coefficient of 1.093 indicates that, relative to cloudy days, sunny days have a greater 1R The increase in the mean value leads to an increase in the possibility of lateral dangerous driving behavior.

[0160] About marginal effects

[0161] The marginal effects of each significant independent variable are shown in Tables 3 and 4. In terms of naturalness, the marginal effect of the brightness of the entire road environment on lateral dangerous driving behavior is positive (0.022), indicating that for every unit increase in brightness, the probability of lateral dangerous driving behavior increases by 0.022. In terms of vividness, relative to the area percentage of other elements in the road environment, the marginal effect of tree area percentage (AT) is the largest (-0.111). For every unit increase in AT, the probability of lateral dangerous driving behavior decreases by 0.111. The length of the left visual curve of the "near view" (vS 1L ) has a significant marginal effect trend on longitudinal and lateral dangerous driving behaviors. For each unit increase, the likelihood of longitudinal RDBAV increases by 0.011, and the likelihood of lateral dangerous driving behaviors decreases by 0.016. In terms of diversity, the marginal effects of dominant color (DC) and spatial information complexity (SI) on the occurrence of longitudinal dangerous driving behaviors are both positive, with values ​​of 0.006 and 0.012, respectively, while the marginal effect of color richness on the occurrence of lateral dangerous driving behaviors is negative (-0.026). In addition, from the perspective of unity, the center of gravity (cog) shows a negative marginal effect (-0.001) on the occurrence of longitudinal dangerous driving behaviors.

[0162] in conclusion

[0163] Like human drivers, autonomous vehicles also have the ability to "perceive" the aesthetics of the road environment, that is, a well-designed and beautiful road environment helps reduce the possibility of dangerous driving behaviors of autonomous vehicles. This provides a possible way to evaluate the road suitability of autonomous vehicles from the perspective of road environment aesthetics. The results show that the road suitability evaluation model of autonomous vehicles based on road environment aesthetics using XGBoost performs better than the commonly used machine methods. The prediction accuracy of longitudinal and lateral dangerous driving behaviors is 96.9% and 91.8% respectively.

[0164] In terms of naturalness, high-brightness road environments increase the likelihood of lateral dangerous driving behavior. Excessive brightness can cause glare, which greatly reduces the ability of autonomous vehicles to accurately detect road environments. Similar findings have been made in human driving. When the brightness in the field of vision far exceeds the eye's ability to adapt, it can cause visual damage or emotional stimulation to the driver, which in turn affects driving behavior.

[0165] In terms of vividness, the combination of interpretable machine learning and random parameter multivariate logit models showed that the increase in tree area in the road environment reduced the overall probability of longitudinal and lateral dangerous driving behaviors. This may be because the trees on both sides can improve the legibility of the road boundary line, allowing the autonomous vehicle to perceive the extension of the road more clearly. In human driving, drivers can also perceive the road boundary line more intuitively through the aligned trees. In addition, the longer left visual curve length in the "near scene" (vS 1L ) Increases the likelihood of longitudinal risky driving behavior. As the length of the road curve increases, the visibility of the forward field of view may decrease more, making longitudinal risky driving behavior more likely. This is consistent with the results of human driver research, which shows that when drivers negotiate curves, longer visual curve lengths may reduce drivers' alertness and forward visibility, leading to a higher frequency of crashes on curved roads.

[0166] In terms of diversity, the more complex the spatial information of the road environment, the higher the probability of dangerous driving behavior. The complex environment around autonomous vehicles is one of the main reasons for their driving behavior decisions. The game theory decision-making framework based on spatial information can enhance the ability of autonomous vehicles to make safer and more rational decisions in complex urban environments. As the complexity of the road environment increases, autonomous vehicles may perceive incomplete information, which affects their decision-making process and increases the possibility of dangerous driving behaviors. Consistent with the results of human driving studies, there is also a significant negative correlation between the amount of spatial information in the road environment and the driver's visual comfort. The smaller the amount of spatial information in the road environment, the better the driving comfort and safety.

[0167] From a uniformity perspective, higher distances in the road environment reduce the likelihood of dangerous driving behaviors. For self-driving cars, clearly identifying objects and features ahead on the road helps the self-driving car perceive potential dangers. When the distance is larger, the features of objects ahead on the road are clearer, and it is easier for the self-driving car to perform target detection, resulting in less dangerous driving behaviors. Similarly, human drivers who can clearly identify the road ahead are also better able to predict and avoid potential risks.

[0168] In terms of possible heterogeneity in the mean and variance of random parameters, this example found that the negative effect of spatial information complexity (SI) on longitudinal risky driving behavior was reduced under sunny conditions compared to cloudy conditions. This reduction may be attributed to the improved visibility under sunny conditions, which allows the autonomous vehicle to better detect details of the road environment and potentially reduce the likelihood of risky driving behavior. However, when the weather is clear, the "near view" right visual curve length (vS 1R) has a negative impact on lateral risky driving behavior. Studies have shown that longer curved road sections may obstruct the sensor's field of view, leading to inaccurate estimates of the length of the road curve and increasing the likelihood of risky driving behavior.

[0169] The data source of this embodiment is the Ford self-driving car dataset. Self-driving cars from different companies may have different functions and capabilities. New perspectives on roadworthiness assessment and dangerous driving behavior analysis of self-driving cars can still be used to expand the dataset.

[0170] Therefore, the present invention adopts the above-mentioned road drivability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model. The evaluation model also provides an interpretable framework for road environment optimization design, which can more effectively reduce specific risk factors in the road environment, thereby improving the driving safety of autonomous vehicles. The proposed road environment aesthetics quantification model provides a scientific evaluation of road environment quality, promotes the practicality of road environment aesthetics, and improves the visual experience of human drivers and autonomous vehicles.

[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate logit model, characterized by: The specific steps include: S1: Using the front dashcam data and IMU data in the autonomous vehicle dataset, 1491 longitudinal RDBAV events and 225 lateral RDBAV events and the corresponding road environment images were obtained; S2: A quantitative model of road environment aesthetics was established to extract relevant characteristic variables from four aspects: naturalness, vividness, diversity and unity; S3: Using an interpretable machine learning method combining XGBoost and SHAP, with the occurrence of dangerous driving behavior as the dependent variable and the road environment aesthetic characteristics as the independent variable, an RRAV evaluation model for the road suitability of autonomous vehicles is established to study the relationship between road environment aesthetics and the dangerous driving behavior RDBAV of autonomous vehicles; S4: A random parameter multivariate logit model considering mean and variance heterogeneity is used to study the impact of random parameter heterogeneity on RDBAV in the road suitability evaluation model.

2. The roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S1, the front dashcam data contains a 5-megapixel image of the front driving environment with a maximum rate of 6 Hz. The IMU data includes the vehicle linear acceleration (m / s2) and angular velocity (rad / s). The orientation of the IMU frame is exactly the same as the vehicle body frame. Two thresholds are used to define RDBAV: The longitudinal RDBAV with an absolute value of longitudinal acceleration greater than 0.5g and the lateral RDBAV with an absolute value of lateral acceleration greater than 0.6g were finally obtained, and the baseline event NDBAV without risky driving behavior was extracted, and the ratio of RDBAV to NDBAV was 1:

2.

3. The road drivability evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S2, naturalness describes the naturalness of the road environment without human intervention. Naturalness includes weather conditions, brightness and contrast of the road environment. Weather conditions are categorical variables, and brightness is expressed as the standard deviation of grayscale image brightness σ I , the greater the difference in brightness between pixels, the greater the standard deviation σ I The larger the value, the contrast is calculated by the four nearest neighbor method, which estimates the contrast by comparing the grayscale difference between adjacent pixels. The calculation formula is as follows: Among them, I(x,y) represents the grayscale image, x and y represent the coordinates of the pixel, represents the average gray value of the image, H is the total number of pixels in the image, δ(i,j)=|ij|, represents the gray difference between adjacent pixels, i and j are two adjacent pixels respectively, P δ (i, j) is the pixel distribution probability when the grayscale difference between adjacent pixels is δ.

4. The roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S2, the vividness includes the elements in the road environment and the relationship between the elements. The vividness is quantified by the area percentage of the elements in the road environment and the visual road linear features. The area percentage is calculated by the semantic segmentation result. The structure of the semantic segmentation is an encoder-decoder structure. The encoder introduces a lightweight feature extraction module MobileNetV2 and a hollow spatial pyramid pooling module ASPP for feature extraction. The decoder uses upsampling and skip connections to restore the spatial resolution and combines the low-level and high-level features of the encoder part. The visual road linear features are quantified by the driver's visual road linear model. The driver's visual linear model uses the Catmull-Rom spline curve of the driver's visual perception to fit the left and right road boundaries. There are four control points on both sides of the road boundary. Four horizontal lines pass through the control points, dividing the driver's field of vision into three areas: near view, middle view and far view. The length and curvature of the visual road linear shape are extracted according to the left and right boundaries as the shape parameters of the driver's visual road linear model. The left boundary is [vS iL ,vK iL ], and the right boundary is [vS iR ,vK iR ](i=1,2,3), the calculation formula is as follows: vS iL =S (i+1)L -S iL vS iR =S (i+1)R -S iR Where i = 1, 2, 3, S iL and S iR They represent the control points P iL and P iR The cumulative length of the road boundary can be seen at , and the tangent angles of the control points are respectively expressed as f iL and f iR Indicates that vS iL and vK iL Represent the left boundary control point P respectively iL and P (i+1)L The visual road curve length and curvature between vS iR and vK iR are the right boundary control points P iL and P (i+1)L The visual road curve length and curvature between.

5. The roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S2, the diversity is quantified into three features: color richness, main color tone and spatial information complexity. The color richness feature The overall richness of the colors in the road environment is quantified through the RGB channel. The larger the color characteristic value, the richer the color of the road environment. The calculation formula is as follows: rg=RG Where R, G, and B are the values ​​of the three color channels, σ and μ are the standard deviation and mean value of the pixel cloud along the (·) direction, σ rg and σ yb are the standard deviations along the rg and yb axes, σ rgyb is the triangular length of the standard deviation in RGB space, μ yg and μ yb are the average values ​​of the rg and yb axes, μ rgyb The length of the triangle representing the average value in RGB space; The main color feature is the percentage of the color that appears most frequently in the road environment. The K-means clustering algorithm is used to identify the main color feature in the road environment, and the ratio of the number of main color pixels to the total number of pixels in the road environment image is calculated as the main color feature value; The spatial information complexity (SI) feature calculates the visual complexity of the road environment based on the edge information of the image. The road environment image is filtered in both horizontal and vertical directions using Sobel kernels. r Represents the SI value of each pixel in the road environment image in the horizontal and vertical directions. SI is the SI of all pixels in the road environment image. r The average value of the value is calculated as follows: Where P is the number of pixels in the road environment image, s h and v They are grayscale road environment images after horizontal and vertical Sobel kernels filtering; According to the four features of center of gravity cog, object separation, composition and symmetry extracted from the road environment image, the unity is described. The object separation represents the foreground-background ratio in the road environment. The adaptive threshold selection method is used to determine the background threshold T for the blurred grayscale image. The road environment image is binarized and the grayscale image I is obtained from the binarized grayscale image. binary Calculate the cog and object separation in the following formula: Where m is the number of horizontal pixels of the image matrix c of size m×n, n is the number of vertical pixels, and c ij is the (i,j)th element of the image, i cog is the i coordinate of cog, j cog is the j coordinate of cog, I gray (x, y) is the pixel of the grayscale image, x represents the horizontal direction, y represents the vertical direction, T is the foreground and background segmentation threshold, n fp is the number of foreground pixels, specifically the number of pixels with a pixel value of 1 in the binary image, n bp is the number of background pixels, specifically the number of pixels with a pixel value of 0; The rule of thirds is used to evaluate the composition of the road environment image. The rule of thirds divides the road image into three equal horizontal and vertical parts, resulting in 9 identical rectangles and 4 lines. If the cog is located at an intersection or on a straight line, the road environment image is more balanced and the subject is more prominent. The composition is calculated by the average value of the distance between the cog in the road environment image and the four intersection points of the rule of thirds. The symmetry feature uses the Scale-invariant feature transform feature detection algorithm to find the feature points of vegetation, and generates a set of potential symmetry feature pairs (p i ,p j ), the axis of symmetry is defined as p i With p j The perpendicular bisector of the connecting line, the axis of symmetry is expressed in polar coordinates (r,θ), and the symmetry M ij By the angular symmetry weight Φ ij and scale symmetric weight S ij The calculation formula is as follows: F ij =1-cos(φ i +φ j -2θ ij ) Where p i and p j are two potential symmetric feature points of the symmetric pair, θ ij is the angle between the straight line connecting two potential symmetric feature points and the x-axis, φ i and φ j are the angles between the position vectors of two potential symmetric feature points and the x-axis, Φ ij is the angular symmetry weight, Φ ij ∈[-1,1],s i and j are the scale ratios of the corresponding feature points, S ij is the scale symmetric weight, S ij ∈[0,1].

6. The roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S3, XGBoost is a machine learning algorithm based on the gradient boosting decision tree method. XGBoost is selected to build a prediction model for dangerous driving behavior of an autonomous vehicle, which specifically includes the following steps: S31: Set a model with m features and a dataset of n samples (x i ,y i ), the prediction value of XGBoost consisting of K gradient boosting decision trees is calculated by the following formula: in, represents the predicted value, f k represents the kth tree, f k (x i ) represents the score of the i-th sample in the k-th tree, K represents the total number of samples, x i represents the i-th input data, and F represents all possible CARTs; S32: XGBoost consists of a training loss objective function and a regularization objective function: Among them, y i is the observed value, is the loss function, used to measure y i and The difference between them, Ω is the regularization term used to penalize the model complexity, γ represents the complexity of each leaf; T represents the total number of leaves in the decision tree; λ represents a trade-off parameter used to scale the penalty; ω j represents the score on the jth leaf; S33: Perform a second-order Taylor expansion on the objective function and remove the constant term to simplify the objective function as shown below. In XGBoost, according to the optimal ω j Split the decision tree and stop splitting when the node depth of the decision tree reaches the maximum depth: Among them G j and H j Represent the sum of the first-order derivative and the second-order derivative of the leaf node respectively.

7. The roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S3, SHAP provides an estimate of the feature contribution to measure the feature attribution value of the prediction result. The SHAP value is calculated by the following formula: Among them, φ i represents the contribution of feature i, N represents the set of all input features, n represents the total number of features, ν is the given model, and S is the set of all observed features.

8. The roadworthiness evaluation method based on XGBoost-SHAP and random parameter multivariate Logit model according to claim 1, characterized in that: In step S4, the random parameter multivariate logit model uses the following function to determine the probability of dangerous driving behavior of the autonomous vehicle: S kn =b k X kn +e kn Among them, S kn represents the probability function for determining whether there is any dangerous driving behavior of the autonomous vehicle in sample n, k is the result set of whether dangerous driving behavior occurs, k = 1 means that dangerous driving behavior occurs, k = 0 means that no dangerous driving behavior occurs, X kn represents the explanatory variable vector that affects whether the autonomous driving vehicle has risky driving behavior, β k represents the estimable parameter vector, ε kn It is represented as the error term; ε kn Obeying the generalized extreme value distribution, the standard multivariate logit model is transformed into: Where P n (k) is the probability of dangerous driving behavior of the autonomous vehicle in sample n; Adding β by introducing a random term kn , accounting for potential heterogeneity in the mean and variance of the estimated parameters, is calculated as follows: b kn =b k +Θ kn Z kn +s kn EXP(Ψ kn W kn )n kn Among them, β kn represents the estimated parameter that varies with different samples, β k represents the average parameter estimate of all samples, Z kn represents the explanatory factors of risky driving behavior outcome k, which is used to capture mean heterogeneity, Θ kn represents the corresponding estimable parameter vector, W kn Indicates the explanatory factors of the risky driving behavior outcome k, which is used to capture the variance σ kn The heterogeneity in kn represents the estimated parameter vector in the heterogeneous variance, v kn represents interference; The random parameters follow the normal distribution. NLOGIT 6.0 software is used, Halton sequence sampling is adopted, and the sampling number is set to 500 times. All model estimates are calculated by the maximum likelihood method, and the marginal effect is calculated to explain the impact of a unit increase in the independent variable on the occurrence of dangerous driving behavior of autonomous vehicles.

Citation Information

Patent Citations

  • Expressway accident risk optimization method based on interactive self-interpretation model

    CN116959248A

  • Method for evaluating expressway driving suitability of automatic driving vehicle based on ensemble learning

    CN117786551A

  • Method, computer program, and system for predicting accident rate based on big data

    KR102691374B1

  • Method for evaluating performance of self-driving vehicle oriented to full parameter space of logical scenario

    US20230304896A1

Cited By

  • Automatic driving emission interpretable prediction method considering road geometric condition influence

    CN119688330A