A Road Driving Compatibility Assessment Method Based on XGBoost-SHAP and a Random Parameter Multivariate Logit Model

By combining XGBoost-SHAP and a stochastic parameter multivariate Logit model, the relationship between road environment aesthetics and dangerous driving behavior of autonomous vehicles is analyzed, and a road drivability evaluation model is established. This solves the systematic and accuracy problems of road drivability assessment of autonomous vehicles in existing technologies, and achieves high-precision road drivability assessment and safety improvement.

CN119312214BActive Publication Date: 2025-10-28TONGJI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively combine road environment aesthetics with the road drivability evaluation of autonomous vehicles, resulting in a lack of systematicness and accuracy in the assessment of autonomous vehicle driving behavior, especially in the prediction of dangerous driving behaviors.

Method used

By combining XGBoost-SHAP and a stochastic parameter multivariate Logit model, a road drivability evaluation model is established by analyzing the relationship between road environment aesthetic features and dangerous driving behavior of autonomous vehicles. Considering the heterogeneity of mean and variance, relevant feature variables are extracted using data from the front vehicle dashcam and IMU data to construct an interpretable machine learning model.

Benefits of technology

It provides a high-precision road drivability assessment, which can quickly and accurately evaluate the road adaptability of autonomous vehicles, reduce specific risk factors, improve driving safety, and promote the optimization design of road environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312214B_ABST
    Figure CN119312214B_ABST
Patent Text Reader

Abstract

This invention discloses a road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model, relating to the field of road drivability assessment and analysis. Specifically, it includes the following steps: S1: Utilizing front-end dashcam data and IMU data from an autonomous vehicle dataset; S2: Establishing a quantitative model of road environment aesthetics, extracting relevant feature variables from four aspects: naturalness, vividness, diversity, and uniformity; S3: Employing an interpretable machine learning method combining XGBoost and SHAP, with the occurrence of dangerous driving behavior as the dependent variable and road environment aesthetic features as the independent variable, establishing a road drivability RRAV evaluation model for autonomous vehicles, and studying the relationship between road environment aesthetics and the dangerous driving behavior RDBAV of autonomous vehicles; S4: Using a stochastic parameter multivariate Logit model considering mean and variance heterogeneity, studying the impact of stochastic parameter heterogeneity on RDBAV in the road drivability evaluation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Aesthetics are often seen as a further requirement in road environment design beyond meeting safety needs, aiming to provide a more comfortable and enjoyable driving experience for human drivers. However, given the differences between autonomous vehicles (AVs) and human drivers, it remains uncertain whether aesthetically pleasing road environments can be "perceived" by AVs—that is, whether aesthetically pleasing road environments can guide better driving behavior in AVs.

[0003] Road environment aesthetics influence the physiological and psychological state of drivers, thereby affecting their driving behavior. For example, green landscapes can obstruct or frame the driver's line of sight. When green landscapes are prominent in safe areas, the driving experience is more pleasant. Conversely, in dangerous areas, green landscapes need to be concealed to reduce visual interference and accident risk. Furthermore, due to the extremely low workload of drivers, a monotonous road environment can lead to passive fatigue, while a rich road environment can slow down the driver's heart rate and alleviate passive fatigue. Another study also found that when the number and angle of curves decrease, drivers' lane-keeping ability is impaired. The amount of road environmental information is a key factor in road environment aesthetics and is negatively correlated with driver visual comfort. The amount of road environmental information is calculated by weighting the ratio of road environment target area to color information. When this value exceeds 0.644, drivers are prone to irritability, depression, and dangerous driving behaviors. Therefore, aesthetic features are an important indicator in existing road environment design.

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

[0005] Road drivability reflects the suitability of the road environment for autonomous driving. Currently, the road drivability of autonomous vehicles is assessed based on road alignment, lane width, and road markings, but road environment aesthetics have not yet been considered. For example, extracting useful information from data from more sensitive sensors can significantly reduce the stopping sight distance, decision sight distance, and reaction time of autonomous vehicles, thereby reducing the requirements for lateral clearances of horizontal curves, concave vertical curves, and crest curve lengths. Research reports indicate that the minimum lane width for some autonomous vehicles is 2.75m; when the lane width is less than 2.5m, the autonomous vehicle's functions will not activate. Similarly, road environment design with lane widths less than 2.8m and no road edge lines poses a challenge for the machine vision systems of autonomous vehicles. Furthermore, improper and inconsistent road markings can even lead to autonomous vehicle test failures or disengagement.

[0006] The occurrence of dangerous driving behaviors in autonomous vehicles is often considered a crucial indicator of road drivability. Previous research on dangerous driving behaviors has primarily focused on driver attitudes and risk classification based on vehicle kinematics, neglecting the influence of road environment aesthetics. For example, one study found that automation-induced complacency—an exaggerated perception of dependence—may increase sensitivity to dangerous driving behaviors. Vehicle kinematic data, such as braking, acceleration, steering, average distance traveled per trip, and duration, are used to categorize dangerous driving behaviors into different risk groups. Vehicle position is used as input to build a dangerous driving behavior assessment model. Furthermore, high accuracy and model interpretability are essential for predicting dangerous driving behaviors and exploring their influencing factors.

[0007] In conclusion, although aesthetically pleasing road environment design has become a popular trend to provide a more enjoyable driving experience and guide better human driving behavior, the relationship between road environment aesthetics and autonomous vehicle driving behavior remains unclear, hindering the application of road environment aesthetics in evaluating the road drivability of autonomous vehicles.

[0008] Therefore, it is necessary to provide a road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model to solve the above problems. Summary of the Invention

[0009] The purpose of this invention is to provide a road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate logit model. It combines interpretable machine learning methods with a stochastic parameter multivariate logit model to explore the influence of road environment aesthetic features on longitudinal and lateral dangerous driving behaviors. It proposes a road drivability evaluation model based on road environment aesthetics. The evaluation model has high accuracy, reveals the fixed and stochastic influence of road environment aesthetics, and considers the heterogeneity of mean and variance.

[0010] To achieve the above objectives, this invention provides a road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model, comprising the following steps:

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

[0012] S2: A quantitative model of road environment aesthetics was established, extracting 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 aesthetic features of the road environment as the independent variable, an evaluation model for the road drivability of autonomous vehicles is established to study the relationship between road environment aesthetics and the dangerous driving behavior (RDBAV) of autonomous vehicles.

[0014] S4: Using a stochastic parameter multivariate Logit model that considers mean and variance heterogeneity, the influence of stochastic parameter heterogeneity on RDBAV in the road drivability evaluation model is studied.

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

[0016] Longitudinal RDBAV events with an absolute value of longitudinal acceleration greater than 0.5g and lateral RDBAV events with an absolute value of lateral acceleration greater than 0.6g were obtained, resulting in 1491 longitudinal RDBAV events and 225 lateral RDBAV events. Baseline events NDBAV events without dangerous driving behavior were extracted, with the ratio of RDBAV to NDBAV being 1:2.

[0017] Preferably, in step S2, naturalness describes the degree of naturalness of the road environment without human intervention. Naturalness includes weather conditions, the brightness and contrast of the road environment. Weather conditions are a categorical variable, and brightness is represented by the standard deviation σ of the grayscale image brightness. I The greater the difference in brightness values ​​between pixels, the larger the standard deviation σ. I The larger the value, the higher the contrast ratio. Contrast is calculated using the four nearest neighbor method, which estimates contrast by comparing the grayscale differences between adjacent pixels. The calculation formula is as follows:

[0018]

[0019] Where I(x,y) represents a grayscale image, and x and y represent the coordinates of a pixel. Let δ(i,j) = |ij| represent the average gray value of the image, N be the total number of pixels in the image, and δ(i,j) = |ij| represent the gray value difference between adjacent pixels, where i and j are two adjacent pixels. δ (i,j) represents the pixel distribution probability with a gray level difference of δ between adjacent pixels.

[0020] Preferably, in step S2, vividness includes elements in the road environment and the relationships between elements. Vividness is quantified by the area percentage of elements in the road environment and the visual road line shape features. The area percentage is calculated using the semantic segmentation results. The semantic segmentation structure 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 spatial resolution and combines low-level and high-level features from the encoder part to improve segmentation accuracy.

[0021] The visual road alignment features are quantified using a driver's visual road alignment model. This model fits the left and right road boundaries using Catmull-Rom spline curves based on the driver's visual perception. Four control points are located on each side of the road boundary, and four horizontal lines pass through these control points, dividing the driver's field of vision into three regions: near, middle, and far. The length and curvature of the visual road alignment are extracted based on the left and right boundaries, serving as the shape parameters of the driver's visual road alignment model. The left boundary is [vS...]. iL ,vK iL ], the right boundary is [vS iR ,vK iR (i = 1, 2, 3), the calculation formula is as follows:

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

[0023]

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

[0025]

[0026] Where i = 1, 2, 3, S iL and S iR These represent control points P respectively. iL and P iR The cumulative length of the visible road boundary, and the tangent angle of the control points are respectively represented by f. iL and f iR It means, vs iL and vK iL These represent the left boundary control points P. iL and P (i+1)L Visual road curve length and curvature between; VS iR and vK iR The right boundary control point P is respectively iL and P (i+1)L The visual road curve length and curvature between them.

[0027] Preferably, in step S2, diversity is quantified into three features: color richness, dominant hue, and spatial information complexity (SI). The color richness feature... The overall color richness of the road environment is quantified by using the RGB channels. The larger the color feature 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 σ and μ are the standard deviation and mean of the pixel cloud along the (·) direction, σ rg and σ yb These are the standard deviations along the rg and yb axes, respectively, and σ rgyb μ is the length of the triangle representing the standard deviation in the RGB color space. rg and μ yb Let μ be the average value of the rg and yb axes, respectively. rgyb The length of the triangle representing the average value in the RGB space;

[0031] The dominant color feature is the percentage of the most frequently occurring color in the road environment. The K-means clustering algorithm is used to identify the dominant color feature in the road environment. The proportion of the number of dominant color pixels to the total number of pixels in the road environment image is calculated as the dominant color feature value.

[0032] Spatial Information Complexity (SI) features calculate the visual complexity of the road environment based on image edge information. The road environment image is filtered in both horizontal and vertical directions using Sobelkernels. r SI represents the SI value of a single pixel in a road environment image in the horizontal and vertical directions. SI is the sum of the SI values ​​of all pixels in the road environment image. r The average value is calculated using the following formula:

[0033]

[0034] In the formula, P is the number of pixels in the road environment image, and s h and s v The images are grayscale road environment images after horizontal and vertical Sobelkernel filtering, respectively.

[0035] The road environment image is described by four features: centroid (cog), object separation, composition, and symmetry. Object separation represents the foreground-to-background ratio in the road environment. An adaptive threshold selection method is used to determine the background threshold T for the blurred grayscale image. The road environment image is then binarized, and the resulting grayscale image I... binary The formula for calculating the separation degree between cog and object is as follows:

[0036]

[0037] In the formula, m is the number of horizontal pixels in an image matrix c of size m×n, n is the number of vertical pixels, and c ij It is the (i,j)th element of the image, i cog Let i be the coordinate of cog, and j be the coordinate of cog. cog Let I be the j-coordinate of cog. gray (x, y) represents the pixels in the grayscale image, where x represents the horizontal direction and y represents the vertical direction. T is the front-to-background segmentation threshold, and n... fp n represents the number of foreground pixels, specifically the number of pixels with a value of 1 in the binary image. bp This represents the number of background pixels, specifically the number of pixels with a value of 0.

[0038] The rule of thirds is used to evaluate the composition of road environment images. The rule of thirds divides the road image into three equal horizontal and vertical parts, resulting in nine identical rectangles and four 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 distance between the cog in the road environment image and the four intersections of the rule of thirds.

[0039] Symmetry features are identified using a scale-invariant feature transform algorithm to find vegetation feature points. By matching and ranking these feature points, a set of potential symmetric feature pairs (p...) are generated. i ,p j The axis of symmetry is defined as p. i With p j The perpendicular bisector of the line is represented by the axis of symmetry in polar coordinates (r, θ), and the symmetry is M. ij By angular symmetric weight Φ ij and scale-symmetric weight S ij It is accumulated together, and the calculation formula is as follows:

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

[0041]

[0042] In the formula p i and p j These are two potential symmetric feature points of a symmetric pair, θ ij Let φ be the angle between the line connecting two potential symmetric feature points and the x-axis. i and φ j Φ represents the angle between the position vectors of two potential symmetric feature points and the x-axis. ij For angularly symmetric weights, Φ ij ∈[-1,1],s i and s j S represents the scale ratio of the corresponding feature points. ij For scale-symmetric weights, S ij ∈[0,1].

[0043] Preferably, in step S3, XGBoost is a machine learning algorithm based on the gradient boosting decision tree method. Selecting XGBoost to construct a predictive model for dangerous driving behaviors of autonomous vehicles specifically includes the following steps:

[0044] S31: Define a feature with m characteristics and a dataset of n samples (x i ,y i The prediction value of XGBoost, which consists of K gradient boosting decision trees, is calculated using the following formula:

[0045]

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

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

[0048]

[0049] Among them, y i These are observed values. It is a loss function used to measure y i and The differences between them are: Ω is the regularization term used to penalize model complexity; γ represents the complexity of each leaf; T represents the total number of leaves in the decision tree; λ represents a tradeoff parameter used to scale the penalty; ω j This represents the fraction on the j-th leaf;

[0050] S33: Performing a second-order Taylor expansion of the objective function and removing the constant term simplifies the objective function as shown below. In XGBoost, based on the optimal ω... j The decision tree is split, and the splitting stops when the depth of the nodes in the decision tree reaches the maximum depth:

[0051]

[0052] Among them G j and H j Let represent the sum of the first and second derivatives of the leaf nodes, respectively.

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

[0054]

[0055] Where, φ i Let ν represent the contribution of feature i, N represent the set of all input features, n represent 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 occurring in the autonomous vehicle:

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

[0058] Among them, s kn Let X represent the probability function for determining whether a sample n contains any dangerous driving behavior by an autonomous vehicle, where k is the set of possible outcomes (whether or not dangerous driving behavior occurs), k = 1 indicates that dangerous driving behavior has occurred, and k = 0 indicates that dangerous driving behavior has not occurred. kn β represents the vector of explanatory variables that influence whether or not an autonomous vehicle engages in risky driving behavior. k Let ε represent the estimable parameter vector. kn Represented as an error term;

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

[0060]

[0061] In the formula, P n (k) represents the probability of dangerous driving behavior occurring in the sample n of autonomous vehicles;

[0062] Adding β by introducing a random term kn The potential heterogeneity of the mean and variance of the estimated parameters is explained, and the calculation process is as follows:

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

[0064] Where, β kn β represents the estimated parameter that varies with different samples. k Z represents the average parameter estimate of all samples. kn This represents the explanatory factors for the outcome k of risky driving behavior, used to capture mean heterogeneity. Θ kn W represents the corresponding estimable parameter vector. kn This represents the explanatory factors for the outcome k of risky driving behavior, used to capture the variance σ. kn Heterogeneity in Ψ kn V represents the estimated parameter vector in heterogeneous variance. kn Indicates distractor items;

[0065] The random parameters follow a normal distribution. NLOGIT 6.0 software was used, Halton sequence sampling was employed, and the number of samplings was 500. The maximum likelihood method was used to calculate all model estimates, and the marginal effect was calculated to explain the impact of a unit increase in the independent variable on the occurrence of dangerous driving behavior of autonomous vehicles.

[0066] Therefore, the road drivability assessment method based on XGBoost-SHAP and a random parameter multivariate Logit model, as described above, has the following beneficial effects:

[0067] (1) This invention provides a new perspective for the road drivability evaluation model of autonomous vehicles by analyzing the relationship between road environment aesthetics and dangerous driving behavior of autonomous vehicles. It can help road designers quickly and accurately evaluate the road drivability of autonomous vehicles.

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

[0069] (3) The quantitative model of road environment aesthetics proposed in this invention provides a scientific evaluation of road environment quality, promotes the practicality of road environment aesthetics, improves the visual experience of human drivers and autonomous vehicles, and promotes the development of human-like visual perception system for autonomous vehicles.

[0070] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0071] Figure 1 This is a flowchart of the road drivability assessment method based on XGBoost-SHAP and a random parameter multivariate Logit model according to the present invention;

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

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

[0074] Figure 4 This is a driver's visual road alignment model diagram in this invention;

[0075] Figure 5 In this invention, the proportion of dominant color pixels in the K-means clustering algorithm to the total number of pixels in the road environment image is used as the dominant color feature value.

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

[0077] Figure 7 This is a comparison chart of the ROC curves of RRAV in this invention;

[0078] Figure 8This is a global importance diagram of the various influencing factors in this invention;

[0079] Figure 9 This is a partial contribution diagram of each influencing factor in this invention. Detailed Implementation

[0080] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0081] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0082] The terms "comprising" or "including" as used in this invention mean that the element preceding the term encompasses the element listed after the term, and do not exclude the possibility of encompassing other elements. Terms such as "inner," "outer," "upper," and "lower" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. In this invention, unless otherwise explicitly specified and limited, the term "attached" and similar terms should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral part; it can refer to a direct connection or an indirect connection through an intermediate medium; it can refer to the internal communication of two elements or the interaction relationship between two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0083] Example

[0084] like Figure 1 As shown, this invention provides a road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model. The framework diagram of the road drivability assessment method is shown below. Figure 2 As shown, it includes the following steps:

[0085] S1: Using the forward-facing camera data and IMU data from the autonomous vehicle dataset, obtain 1491 longitudinal RDBAV events and 225 lateral RDBAV events, along with corresponding road environment images. In step S1, the forward-facing dashcam data includes 5-megapixel images of the driving environment at a maximum rate of 6Hz. The IMU data includes the vehicle's linear acceleration (m / s²) and angular velocity (rad / s). The IMU frame is aligned with the vehicle's body frame. Two thresholds are used to define RDBAV:

[0086] Longitudinal RDBAV events with an absolute value of longitudinal acceleration greater than 0.5g and lateral RDBAV events with an absolute value of lateral acceleration greater than 0.6g were obtained, resulting in 1491 longitudinal RDBAV events and 225 lateral RDBAV events. Baseline events NDBAV events without dangerous driving behavior were extracted, with the ratio of RDBAV to NDBAV being 1:2.

[0087] S2: A quantitative model of road environment aesthetics was established, extracting 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 degree of naturalness of the road environment without human intervention. Naturalness includes weather conditions, road environment brightness, and contrast. Weather conditions are categorical variables, such as sunny or cloudy. Brightness is represented by the standard deviation σ of the grayscale image brightness. I The greater the difference in brightness values ​​between pixels, the larger the standard deviation σ. I The larger the value, the higher the contrast ratio. Contrast is calculated using the four nearest neighbor method, which estimates contrast by comparing the grayscale differences between adjacent pixels. The calculation formula is as follows:

[0088]

[0089] Where I(x,y) represents a grayscale image, and x and y represent the coordinates of a pixel. Let δ(i,j) = |ij| represent the average gray value of the image, N be the total number of pixels in the image, and δ(i,j) = |ij| represent the gray value difference between adjacent pixels, where i and j are two adjacent pixels. δ (i,j) represents the pixel distribution probability with a gray level difference of δ between adjacent pixels.

[0090] In step S2, vividness refers to the memorability of the road environment, including the elements within the road environment and the relationships between them. Vividness is quantified by the area percentage of elements in the road environment and the visual road alignment features. The area percentage is calculated using the semantic segmentation results. The semantic segmentation structure is an encoder-decoder structure, such as... Figure 3 As shown, the encoder incorporates the lightweight feature extraction module MobileNetV2 and the hollow spatial pyramid pooling module ASPP for feature extraction, while the decoder uses upsampling and skipped connections to restore spatial resolution. By combining low-level and high-level features from the encoder, segmentation accuracy is improved. The MobileNetV2 network module reduces network computational complexity and improves the model's real-time computational efficiency, ultimately extracting 14 elements from the road environment, including vehicles, buildings, and pedestrians.

[0091] To quantify the visual road alignment features, a driver's visual alignment model is used to quantify these features, such as... Figure 4As shown, the driver's visual road alignment model uses Catmull-Rom spline curves to fit the left and right road boundaries. There are four control points on each side of the road boundary, and four horizontal lines pass through these control points, dividing the driver's field of vision into three regions: near, middle, and far. The length and curvature of the visual road alignment are extracted based on the left and right boundaries, serving as the shape parameters of the driver's visual road alignment model. The left boundary is [vS iL ,vK iL ], the right boundary is [vS iR ,vK iR (i = 1, 2, 3), the calculation formula is as follows:

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

[0093]

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

[0095]

[0096] Where i = 1, 2, 3, S iL and S iR These represent control points P respectively. iL and P iR The cumulative length of the visible road boundary, and the tangent angle of the control points are respectively represented by f. iL and f iR It means, vs iL and vK iL These represent the left boundary control points P. iL and P (i+1)L The visual road curve length and curvature between; vS iR and vK iR The right boundary control point P is respectively iL and P (i+1)L The visual road curve length and curvature between them.

[0097] In step S2, diversity is quantified into three features: color richness, dominant hue, and spatial information complexity (SI). The color richness feature... The overall color richness of the road environment is quantified by using the RGB channels. The larger the color feature 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 σ and μ are the standard deviation and mean of the pixel cloud along the (·) direction, σ rg and σ yb These are the standard deviations along the rg and yb axes, respectively, and σ rgyb μ is the length of the triangle representing the standard deviation in the RGB color space. rg and μ yb Let μ be the average value of the rg and yb axes, respectively. rgyb The length of the triangle representing the average value in the RGB space;

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

[0102] Spatial Information Complexity (SI) features calculate the visual complexity of the road environment based on image edge information. The road environment image is filtered in both horizontal and vertical directions using Sobel kernels. r This represents the SI value of each pixel in the road environment image in both the horizontal and vertical directions. SI is the SI value of all pixels in the road environment image. r The average value is calculated using the following formula:

[0103]

[0104] In the formula, P is the number of pixels in the road environment image, and s h and s v The images are grayscale road environment images after horizontal and vertical Sobelkernel filtering, respectively.

[0105] Based on the road environment image, four features are extracted to describe its uniformity: center of gravity (cog), object separation, composition, and symmetry. Object separation represents the foreground-to-background ratio in the road environment. An adaptive threshold selection method is used to determine the background threshold T for the blurred grayscale image. The road environment image is then binarized, and the resulting grayscale image I... binary The formula for calculating the separation degree between cog and object is as follows:

[0106]

[0107] In the formula, m is the number of horizontal pixels in an image matrix c of size m×n, n is the number of vertical pixels, and c ij It is the (i,j)th element of the image, i cog Let i be the coordinate of cog, and j be the coordinate of cog. cogLet I be the j-coordinate of cog. gray (x, y) represents the pixels in the grayscale image, where x represents the horizontal direction and y represents the vertical direction. T is the front-to-background segmentation threshold, and n... fp n represents the number of foreground pixels, specifically the number of pixels with a value of 1 in the binary image. bp This represents the number of background pixels, specifically the number of pixels with a value of 0.

[0108] The rule of thirds is used to evaluate the composition of road environment images. The rule of thirds divides the road image into three equal horizontal and vertical parts, resulting in nine identical rectangles and four lines. If the coordinates (cogs) are located at intersections or on straight lines, the road environment image is more balanced and the subject is more prominent. The composition is determined by the intersections of the coordinates with the four points of the rule of thirds in the road environment image. Figure 6 The calculation is performed using the average distances between L1, L2, L3, and L4 as shown in the diagram.

[0109] Symmetry features are identified using a scale-invariant feature transform algorithm to find vegetation feature points. By matching and ranking these feature points, a set of potential symmetric feature pairs (p...) are generated. i ,p j The axis of symmetry is defined as p. i With p j The perpendicular bisector of the line is represented by the axis of symmetry in polar coordinates (r, θ), and the symmetry is M. ij By angular symmetric weight Φ ij and scale-symmetric weight S ij It is accumulated together, and the calculation formula is as follows:

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

[0111]

[0112] In the formula p i and p j These are two potential symmetric feature points of a symmetric pair, θ ij Let φ be the angle between the line connecting two potential symmetric feature points and the x-axis. i and φ j Φ represents the angle between the position vectors of two potential symmetric feature points and the x-axis. ij For angularly symmetric weights, Φ ij ∈[-1,1],s i and s j S represents the scale ratio of the corresponding feature points. ij For scale-symmetric weights, Sij ∈[0,1].

[0113] As shown in Table 1, the 38 characteristics of road environment aesthetics are ultimately derived from four aspects: "naturalness," "vibrancy," "diversity," and "unity." Table 1 provides detailed definitions and descriptive statistics for these characteristics. These characteristics are considered as independent variables for assessing the road drivability of autonomous vehicles, while the occurrence of longitudinal or lateral dangerous driving behaviors is considered 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 road environment aesthetic features as the independent variables, 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 gradient boosting decision tree method, which can effectively predict categorical variables. XGBoost is selected to construct a prediction model for dangerous driving behavior of autonomous vehicles, specifically including the following steps:

[0118] S31: Define a feature with m characteristics and a dataset of n samples (x i ,y i The prediction value of XGBoost, which consists of K gradient boosting decision trees, is calculated using the following formula:

[0119]

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

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

[0122]

[0123] Among them, y i These are observed values. It is a loss function used to measure yi and The differences between them are: Ω is the regularization term used to penalize model complexity; γ represents the complexity of each leaf; T represents the total number of leaves in the decision tree; λ represents a tradeoff parameter used to scale the penalty; ω j This represents the fraction on the j-th leaf;

[0124] S33: Performing a second-order Taylor expansion of the objective function and removing the constant term simplifies the objective function as shown below. In XGBoost, based on the optimal ω... j The decision tree is split, and the splitting stops when the depth of the nodes in the decision tree reaches the maximum depth:

[0125]

[0126] Among them G j and H j Let represent the sum of the first and second derivatives of the leaf nodes, respectively.

[0127] When evaluating the predictive performance of categorical variables, commonly used metrics include accuracy, precision, recall, and F1 score. Accuracy represents the ratio of correctly predicted samples to the total number of 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. The F1 score is the harmonic mean of accuracy and recall. Furthermore, the area under the receiver operating characteristic (AUC) curve is a general indicator reflecting the overall performance of the classifier. Higher values ​​for these metrics indicate better predictive performance.

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

[0129]

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

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

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

[0133] Among them, S kn Let X represent the probability function for determining whether a sample n contains any dangerous driving behavior by an autonomous vehicle, where k is the set of possible outcomes (whether or not dangerous driving behavior occurs), k = 1 indicates that dangerous driving behavior has occurred, and k = 0 indicates that dangerous driving behavior has not occurred. kn β represents the vector of explanatory variables that influence whether or not an autonomous vehicle engages in risky driving behavior. k Let ε represent the estimable parameter vector. kn Represented as an error term;

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

[0135]

[0136] In the formula, P n (k) represents the probability of dangerous driving behavior of a motor vehicle occurring in sample n;

[0137] Adding β by introducing a random term kn The potential heterogeneity of the mean and variance of the estimated parameters is explained, and the calculation process is as follows:

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

[0139] Where, β kn β represents the estimated parameter that varies with different samples. k Z represents the average parameter estimate of all samples. kn This represents the explanatory factors for the outcome k of risky driving behavior, used to capture mean heterogeneity. kn W represents the corresponding estimable parameter vector. kn This represents the explanatory factors for the outcome k of risky driving behavior, used to capture the variance σ. kn Heterogeneity in Ψ kn ν represents the estimated parameter vector in heterogeneous variance. kn Indicates distractor items;

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

[0141] Example 1

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

[0143] Table 2

[0144]

[0145]

[0146] This embodiment also employs several widely used machine learning methods to build a road drivability evaluation model for autonomous vehicles, including K-Nearest Neighbors (KNN), Logistic Regression (LR), Random Forest (RF), and Support Vector Machine (SVM). As shown in Table 2, the longitudinal dangerous driving behavior prediction accuracies of the four methods are 89.5%, 83.0%, 82.1%, and 67.6%, respectively, while the lateral dangerous driving behavior prediction accuracies are 78.7%, 80.3%, 83.6%, and 73.8%, respectively. Compared to these methods, XGBoost performs better with higher accuracy (96.9% for longitudinal and 91.8% for lateral dangerous driving behavior prediction). Furthermore, XGBoost also boasts the highest precision, recall, and F1 score among these methods, regardless of whether it's predicting longitudinal or lateral dangerous driving behavior. To further visually compare the evaluation performance of these different methods, such as... Figure 7As shown, the ROC curves for the above methods are plotted. For both longitudinal and lateral dangerous driving behaviors, the AUC value of the XGBoost method is greater than 0.98, while the AUC values ​​of the other four methods are all less than 0.95. Overall, XGBoost outperforms the other four methods in evaluating the road drivability of autonomous vehicles.

[0147] Despite its high prediction accuracy, XGBoost is a black-box method, making it difficult to clearly explain the relationship between independent and dependent variables. Therefore, this embodiment uses SHAP to interpret the results of the road drivability evaluation model for autonomous vehicles from two perspectives: global feature contribution and individual feature contribution. Figure 8 The global feature contribution is shown, indicating the relative importance of independent variables ranked by absolute SHAP values. Higher absolute SHAP values ​​indicate higher relative importance and a greater impact on dangerous driving behavior. Figure 9 By revealing how the values ​​of variables affect their impact on the model output, the contribution of individual features is shown. Figure 9 Each point in the graph represents a sample, and the color of the point indicates the value of the corresponding independent variable (i.e., the eigenvalue). The eigenvalue gradually decreases from a solid black point to a hollow white point. The x-axis value of each point is its SHAP value, reflecting the influence of the corresponding independent variable on RDBAV. A high eigenvalue with a positive SHAP value indicates an increased likelihood of dangerous driving behavior, while a high eigenvalue with a negative SHAP value indicates a decreased likelihood of dangerous driving behavior.

[0148] Figure 8 (a) and Figure 9 (a) shows the impact of each independent variable on longitudinal RDBAV. The percentage of tree area (AT) is the most important variable, with the highest absolute value of SHAP at 1.32. From... Figure 9 As shown in (a), the solid black dots of AT are distributed on the negative axis of the SHAP value, while the hollow white dots are distributed on the positive axis. This indicates that AT is negatively correlated with the probability of longitudinal dangerous driving behavior. Following AT, the important variables are dominant hue (DC) and spatial information complexity (SI), both derived from a diversity perspective. The absolute SHAP values ​​of both dominant hue (DC) and spatial information complexity (SI) are greater than 0.95. Figure 9 As shown in (a), the SHAP values ​​of larger eigenvalues ​​among these variables are much smaller than those of smaller eigenvalues, indicating that the more prominent the dominant color and the more complex the spatial information in the road environment, the lower the probability of longitudinal dangerous driving behavior.

[0149] In terms of visual appeal, wall area percentage (AW), traffic light area percentage (AL), and utility pole area percentage (A.PO) ranked fourth, sixth, and seventh respectively. Figure 8As shown in (a). The absolute SHAP values ​​of these variables are all greater than 0.8. Notably, the effect of A.PO differs from the other two variables. The probability of longitudinal dangerous driving behavior increases with increasing A.PO, while AW and AL are negatively correlated with the probability of longitudinal dangerous driving behavior. Regarding visual road alignment features, the "close-up" left visual curve length (vS 1L This also affects the likelihood of longitudinal dangerous driving behavior, with an absolute SHAP value of 0.90. When vs 1L Over longer periods, longitudinal dangerous driving behaviors are less likely to occur because Figure 9 In (a), the eigenvalues ​​of higher eigenvalues ​​are vS 1L The SHAP values ​​of the (i.e., solid black dots) are distributed below 0. The absolute SHAP value for uniformity is 0.78, ranking 8th in importance. Brightness in naturalness ranks 13th with an absolute SHAP value of 0.54. Since the eigenvalues ​​with high SHAP values ​​(i.e., solid black dots) are distributed above 0, brightness was found to have a positive impact on the likelihood of longitudinal dangerous driving behavior.

[0150] The effect of each independent variable on lateral dangerous driving behavior is as follows: Figure 8 As shown in (b) and 9(b), aesthetic features exhibit the greatest effect in terms of vividness. Among them, roads (AR), buildings (AB), grasslands (AG), and walls (AW) all rank in the top four in terms of area percentage in importance, with absolute SHAP values ​​all greater than 0.65. From... Figure 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 dots are scattered on the negative axis of the SHAP value. Conversely, the probability of lateral dangerous driving behavior increases with the increase of AG. The next important variable is the left-side visual curvature (vK) of the "middle scene". 2L Its absolute SHAP value is 0.56. 2L The SHAP values ​​of smaller eigenvalues ​​are much higher than those of larger eigenvalues, indicating that vK 2L Negatively correlated with lateral dangerous driving behavior. Object separation in terms of uniformity also has a significant impact, ranking sixth with an absolute SHAP value of 0.48. Higher object separation results in lower SHAP values ​​than lower object separation, indicating a negative correlation between object separation and the occurrence of lateral dangerous driving behavior. In terms of diversity, spatial information complexity (SI) and color richness rank seventh and eighth, respectively. Higher SI complexity and richer color richness correlate with a higher probability of lateral dangerous driving behavior. Figure 9(b) shows that the SI values ​​for high eigenvalues ​​and the SHAP values ​​for color richness are above 0. Regarding 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 a multivariate logit model with random parameters

[0152] Tables 3 and 4 show the estimation results of the mean- and variance-based stochastic parametric multivariate logit models used to predict longitudinal and lateral dangerous driving behaviors, respectively. Marginal effects are calculated to provide the impact of adding one unit to the explanatory variables on the probability of the RDBAV outcome.

[0153] Table 3

[0154]

[0155] Table 4

[0156]

[0157] Heterogeneity of mean and variance

[0158] The analysis of longitudinal dangerous driving behavior (RDBAV), after removing insignificant factors, yielded results shown in Table 3. Spatial information complexity (SI) was the only significant random parameter, exhibiting significant heterogeneity in mean but not in variance. SI followed a normal distribution N(1.459, 1.877), meaning that SI reduced the probability of longitudinal RDBAV by 21.77% of observations but increased it by 78.23%. As shown in Table 3, the positive coefficient of 1.459 indicates that SI increases the likelihood of longitudinal RDBAV. Regarding mean heterogeneity, the negative coefficient of -3.033 indicates that sunny days, compared to cloudy days, lowered the mean of SI, thus reducing the likelihood of longitudinal dangerous driving behavior.

[0159] Lateral dangerous driving behavior analysis revealed the following final results after eliminating non-significant factors, as shown in Table 4. The right visual curve length (vS) in the "close-up" view... 1R The mean is the only statistically significant random parameter, exhibiting significant heterogeneity but not significant heterogeneity in variance. 1R The expression follows a normal distribution N(1.936, 1.879), representing vs. 1R This reduced the probability of lateral dangerous driving behavior by 15.15% of the observed values, but increased it by 84.85%. Table 4 shows a positive coefficient of 1.936, indicating that the probability of lateral dangerous driving behavior increases with vS. 1RThe value increases with the increase of the mean. Regarding mean heterogeneity, a positive coefficient of 1.093 indicates that, relative to cloudy, sunny vs. 1R An increase in the mean value leads to a greater likelihood of dangerous lateral driving behaviors.

[0160] Regarding the marginal effect

[0161] The marginal effects of each significant independent variable are shown in Tables 3 and 4. Regarding naturalness, the marginal effect of overall road environment brightness 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. Regarding vividness, the percentage of tree area (AT) has the largest marginal effect (-0.111) relative to the percentage area of ​​other elements in the road environment. For every unit increase in AT, the probability of lateral dangerous driving behavior decreases by 0.111. The length of the left visual curve in the "close view" (vS) is also shown. 1L The probability of longitudinal and lateral dangerous driving behaviors (RDBAV) shows a clear marginal effect trend. For each unit increase, the probability of longitudinal RDBAV increases by 0.011, while the probability of lateral dangerous driving behavior decreases by 0.016. Regarding diversity, dominant hue (DC) and spatial information complexity (SI) both have positive marginal effects on the occurrence of longitudinal dangerous driving behavior, with values ​​of 0.006 and 0.012 respectively, while color richness has a negative marginal effect (-0.026) on the occurrence of lateral dangerous driving behavior. Furthermore, from a uniformity perspective, the center of gravity (cog) exhibits a negative marginal effect (-0.001) on the occurrence of longitudinal dangerous driving behavior.

[0162] in conclusion

[0163] Like human drivers, autonomous vehicles also possess the ability to "perceive" the aesthetics of the road environment; that is, a well-designed and aesthetically pleasing road environment helps reduce the likelihood of dangerous driving behaviors by autonomous vehicles. This provides a possible approach to evaluating the road drivability of autonomous vehicles from the perspective of road environment aesthetics. The results show that the road drivability evaluation model for autonomous vehicles based on road environment aesthetics using XGBoost outperforms commonly used machine learning methods. The prediction accuracy for longitudinal and lateral dangerous driving behaviors is 96.9% and 91.8%, respectively.

[0164] In terms of naturalness, bright road environments increase the likelihood of dangerous lateral driving behaviors. Excessive brightness can cause glare, which significantly reduces the ability of autonomous vehicles to accurately detect the road environment. Similar findings exist with human drivers. When the brightness in the field of vision far exceeds the eye's adaptability, it can cause visual impairment or emotional stimulation for the driver, thereby affecting driving behavior.

[0165] In terms of vividness, the combination of interpretable machine learning and a stochastic parameter multivariate logit model indicates that increased tree area in the road environment reduces the overall probability of dangerous longitudinal and lateral driving behaviors. This may be because trees on both sides improve the readability of road boundaries, allowing autonomous vehicles to perceive the road's extension more clearly. In human driving, drivers can also perceive road boundaries more intuitively through aligned trees. Furthermore, a longer left-side visual curve length in the "near scene" (vS) 1L This increases the likelihood of dangerous longitudinal driving behaviors. As the length of a road curve increases, the visibility in the forward field of view may decrease more significantly, making dangerous longitudinal driving behaviors more likely. This is consistent with research findings on human drivers, which suggest that when drivers navigate curves, a longer visual curve length may reduce driver alertness and forward visibility, leading to a higher frequency of collisions on curved road sections.

[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 surrounding autonomous vehicles is one of the main reasons for their driving behavior decisions. A game-theoretic 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 likelihood of dangerous driving behavior. Consistent with the results of human driving research, there is also a significant negative correlation between the amount of spatial information in the road environment and driver visual comfort. The less spatial information in the road environment, the better the driving comfort and safety.

[0167] From a uniformity perspective, greater distance in the road environment reduces the likelihood of dangerous driving behaviors. For autonomous vehicles, clearly identifying objects and features ahead of the road helps them perceive potential hazards. When the distance is greater, the features of objects ahead are clearer, making it easier for autonomous vehicles to detect targets, thus leading to fewer dangerous driving behaviors. Similarly, human drivers who can clearly identify road conditions ahead are also better able to predict and avoid potential risks.

[0168] Regarding the potential heterogeneity of the mean and variance of random parameters, this embodiment found that the negative impact of spatial information complexity (SI) on longitudinal dangerous driving behavior is reduced under sunny conditions compared to cloudy conditions. This reduction may be attributed to the increased visibility under sunny conditions, which allows autonomous vehicles to better detect details of the road environment and potentially reduce the likelihood of dangerous driving behavior. However, when the weather is sunny, the "near-view" right-side visual curve length (vS) is still relatively high. 1RThe negative impact on dangerous lateral driving behavior is increasing. Studies have shown that longer curved road sections may obstruct the sensor's field of vision, leading to inaccurate estimates of road curve lengths and increasing the likelihood of dangerous driving behaviors.

[0169] The data source for this example is the Ford autonomous vehicle dataset. Autonomous vehicles from different companies may have different functions and capabilities. New perspectives on the road drivability assessment and dangerous driving behavior analysis of autonomous vehicles can still be used to expand the dataset.

[0170] Therefore, this invention adopts the road drivability assessment 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 quantitative 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 solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model, characterized by: Specifically, the following steps are included: S1: Using the front vehicle dashcam data and IMU data in the autonomous vehicle dataset, 1491 longitudinal RDBAV events and 225 lateral RDBAV events and corresponding road environment images were obtained; S2: A quantitative model of road environment aesthetics was established, extracting 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 (RDBAV) as the dependent variable and the aesthetic features of the road environment as the independent variable, an evaluation model for the road drivability (RRAV) of autonomous vehicles is established to study the relationship between road environment aesthetics and the dangerous driving behavior (RDBAV) of autonomous vehicles. S4: Using a stochastic parameter multivariate Logit model that considers mean and variance heterogeneity, we study the impact of stochastic parameter heterogeneity on RDBAV in the road drivability evaluation model. In step S3, XGBoost is a machine learning algorithm based on the gradient boosting decision tree method. XGBoost is selected to construct a predictive model for dangerous driving behaviors of autonomous vehicles, specifically including the following steps: S31: Set a function with Features , )and A dataset of samples ( ),Depend on The prediction value of XGBoost, composed of gradient boosting decision trees, is calculated by the following formula: ; in, Indicates the predicted value. Indicates the first A tree, Indicates the first The first of the trees The score of each sample Represents the total number of samples. Indicates the first One input data, Represents all possible CARTs; S32: XGBoost consists of a training loss objective function and a regularization objective function: ; ; in, These are observed values. It is a loss function used to measure... and The differences between them It is a regularization term used to penalize model complexity. This indicates the complexity of each leaf; This represents the total number of leaves in the decision tree; This represents a compromise parameter used for scaling penalties; Indicates the first The fractions on each leaf; S33: Performing a second-order Taylor expansion of the objective function and removing the constant term simplifies the objective function as shown below. In XGBoost, based on the optimal... The decision tree is split, and the splitting stops when the depth of the nodes in the decision tree reaches the maximum depth: ; in and Let represent the sum of the first and second derivatives at the leaf nodes, respectively; In step S3, SHAP provides an estimate of the feature contribution, which measures the feature attribution value of the prediction result. The SHAP value is calculated using the following formula: ; in, Representation of features Contribution Represents the set of all input features. This represents the total number of features. Given a model, It is the set of all observed features.

2. The road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model as described in claim 1, characterized in that: In step S1, the front dashcam data includes a 5-megapixel image of the front driving environment at a maximum rate of 6Hz, and the IMU data includes vehicle linear acceleration (...). ) and angular velocity ( The IMU frame is oriented exactly like the vehicle's body frame, and two thresholds are used to define RDBAV: Longitudinal RDBAV events with an absolute value of longitudinal acceleration greater than 0.5g and lateral RDBAV events with an absolute value of lateral acceleration greater than 0.6g were obtained, resulting in 1491 longitudinal RDBAV events and 225 lateral RDBAV events. Baseline events NDBAV events without dangerous driving behavior were extracted, with the ratio of RDBAV to NDBAV being 1:

2.

3. The road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model as described in claim 1, characterized in that: In step S2, naturalness describes the degree of naturalness of the road environment without human intervention. Naturalness includes weather conditions, the brightness and contrast of the road environment. Weather conditions are a categorical variable, and brightness is represented by the standard deviation of the grayscale image brightness. The greater the difference in brightness values ​​between pixels, the larger the standard deviation. The larger the value, the higher the contrast ratio. Contrast is calculated using the four nearest neighbor method, which estimates contrast by comparing the grayscale differences between adjacent pixels. The calculation formula is as follows: ; ; in, Represents a grayscale image. and Represents the coordinates of a pixel. This represents the average gray value of the image. It is the total number of pixels in the image. This represents the grayscale difference between adjacent pixels. and Each represents two adjacent pixels. The grayscale difference between adjacent pixels is The pixel distribution probability.

4. The road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model as described in claim 1, characterized in that: In step S2, vividness includes elements in the road environment and the relationships between elements. Vividness is quantified by the area percentage of elements in the road environment and the visual road line shape features. The area percentage is calculated using the semantic segmentation results. The semantic segmentation structure is an encoder-decoder structure. The encoder introduces the lightweight feature extraction module MobileNetV2 and the hollow spatial pyramid pooling module ASPP for feature extraction. The decoder uses upsampling and skip connections to restore spatial resolution and combines the low-level and high-level features of the encoder. The visual road alignment features are quantified using a driver's visual road alignment model. This model fits the left and right road boundaries using Catmull-Rom spline curves based on the driver's visual perception. Four control points are located on each side of the road boundary, and four horizontal lines pass through these control points, dividing the driver's field of vision into near, middle, and far views. The length and curvature of the visual road alignment are extracted based on the left and right boundaries, serving as the shape parameters of the driver's visual road alignment model. The left boundary is... The right boundary is The calculation formula is as follows: ; ; ; ; in, , and Representing control points and The cumulative length of the visible road boundary, and the tangent of the control points are respectively represented by... and express, and These represent the control points on the left boundary. and The length and curvature of the visual road curves between them; and Right boundary control points and The visual road curve length and curvature between them.

5. The road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model as described in claim 1, characterized in that: In step S2, diversity is quantified into three features: color richness, dominant hue, and spatial information complexity. The color richness feature... The overall color richness of the road environment is quantified by using the RGB channels. The larger the color feature value, the richer the color of the road environment. The calculation formula is as follows: ; ; ; ; ; R, G, and B are the values ​​of the three color channels. and For pixel cloud edge Standard deviation and mean of direction and respectively along and Standard deviation of the shaft Let be the length of the triangle representing the standard deviation in the RGB color space. and They are respectively and The average value of the axis, The length of the triangle representing the average value in the RGB space; The dominant color feature is the percentage of the most frequently occurring color in the road environment. The K-means clustering algorithm is used to identify the dominant color feature in the road environment. The proportion of the number of dominant color pixels to the total number of pixels in the road environment image is calculated as the dominant color feature value. Spatial information complexity The visual complexity of the road environment is calculated based on image edge information. The road environment image is filtered in both horizontal and vertical directions using Sobel kernels. This represents the horizontal and vertical dimensions of each pixel in a road environment image. value, For all pixels in the road environment image The average value is calculated using the following formula: ; ; In the formula, The number of pixels in the road environment image. and The images are grayscale road environment images after horizontal and vertical Sobel kernel filtering, respectively. Extracting the center of gravity from road environment images The four features describing the unity are object separation, composition, and symmetry. Object separation represents the foreground-to-background ratio in a road environment. An adaptive threshold selection method is used to determine the background threshold T for the blurred grayscale image. The road environment image is then binarized. The resulting grayscale image... Chinese calculation Separation degree between objects is calculated using the following formula: ; ; ; ; In the formula, For size Image matrix Horizontal pixel count, This refers to the number of vertical pixels. It is the first image One element, for of coordinate, for of coordinate, For pixels in a grayscale image, Represents the horizontal direction. Represents the vertical direction. The threshold for front and back background segmentation. This represents the number of foreground pixels, specifically the number of pixels with a value of 1 in the binary image. This represents the number of background pixels, specifically the number of pixels with a value of 0. The rule of thirds is used to evaluate the composition of road environment images. The rule of thirds divides the road image into three equal horizontal and vertical parts, resulting in nine identical rectangles and four lines. When located at intersections or along straight lines, the road environment image is more balanced, the subject is more prominent, and the composition is enhanced by the road environment image. Calculate the average distance between the four intersection points of the trisection method; Symmetry features are identified using the Scale-Invariant Feature Transform (SIT) algorithm to find feature points in vegetation. By matching and ranking these feature points, a set of potential symmetric feature pairs is generated. , The axis of symmetry is defined as follows: and The perpendicular bisector of the line connecting the two lines, with the axis of symmetry at ( Polar coordinates representation, symmetry By angle symmetric weight and scale-symmetric weights It is accumulated together, and the calculation formula is as follows: ; ; ; In the formula and These are two potential symmetric feature points of a symmetric pair. The line connecting two potential symmetric feature points and The included angle of the axis, and The position vectors of two potential symmetric feature points are respectively... The angle between the axes, For angularly symmetric weights, , and These represent the scale ratios of the corresponding feature points. For scale-symmetric weights, ∈[0,1].

6. The road drivability assessment method based on XGBoost-SHAP and a stochastic parameter multivariate Logit model as described in 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 occurring in the autonomous vehicle: ; in, Indicates a specific sample The probability function of whether or not there is dangerous driving behavior in autonomous vehicles. The set of outcomes including whether or not dangerous driving behavior occurred. This indicates that dangerous driving behavior has occurred. This indicates that no dangerous driving behavior occurred. This represents a vector of explanatory variables that influence whether or not an autonomous vehicle engages in risky driving behavior. Represents the estimable parameter vector. Represented as an error term; Following a generalized extreme value distribution, the standard multivariate logit model is transformed into: ; In the formula, For the sample The probability of dangerous driving behavior occurring in autonomous vehicles; Add by introducing random items The potential heterogeneity of the mean and variance of the estimated parameters is explained, and the calculation process is as follows: ; in, This represents the estimated parameter that varies with different samples. This represents the average parameter estimate for all samples. Indicates whether there is a risky driving behavior. Explanatory factors used to capture mean heterogeneity This represents the corresponding estimable parameter vector. Indicates whether there is a risky driving behavior. Explanatory factors used to capture variance Heterogeneity in This represents the estimated parameter vector in heterogeneous variance. Indicates distractor items; The random parameters follow a normal distribution. NLOGIT 6.0 software was used, Halton sequence sampling was employed, and the number of samplings was set to 500. All model estimates were calculated using the maximum likelihood method, and the marginal effect was calculated to explain the impact of a unit increase in the independent variable on the occurrence of dangerous driving behavior in 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