Mountain road fatigue driving state recognition method and system
Through the improved BiGRU neural network and channel attention mechanism, combined with the sparrow search algorithm, a fatigue driving detection model suitable for complex mountain road conditions was constructed, which solved the problem of difficult to identify driver fatigue status in complex mountain road conditions in the existing technology. , realizes high-accuracy fatigue state recognition.
Patent Information
- Application Number
- CN202411098605.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The prior art is difficult to effectively identify the driver's fatigue status under complex mountain road conditions, resulting in insufficient recognition accuracy.
The improved BiGRU neural network is adopted, combined with the sparrow search algorithm and channel attention mechanism, and a fatigue driving detection model suitable for complex mountain road conditions is constructed. This model processes and analyzes driving behavior characteristics through the sequential connection of the input layer, BiGRU layer, channel attention layer, full connection layer, classification layer and output layer to achieve effective judgment of the driver's fatigue state.
The recognition accuracy of drivers' third-level fatigue state was significantly improved, which was 11.0% higher than the original BiGRU detection model, and showed a recognition accuracy of 90.2% in real-life vehicle data inspection.
Smart Images

Figure CN118823746B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and in particular to a method and system for identifying fatigue driving status on mountain roads. Background Art
[0002] With the increase in the mileage of mountain traffic road construction, the frequency of public travel in mountainous areas has gradually increased. Although this change has facilitated public travel, it has also posed new challenges to driving safety. The mountainous terrain is complex, the continuity and balance of the road plane line shape are not high, and the slope length is large, which requires drivers to operate frequently while driving. Drivers are often in a state of tension, which makes them more likely to feel fatigue, increasing the difficulty of driving and related risks. In this context, traffic accidents often lead to serious consequences such as car damage and death. Therefore, it is particularly important to extract driver fatigue features and detect the state in mountainous road environments.
[0003] Fatigue driving usually refers to the phenomenon that after a long period of driving, the driver's psychological and physiological functions are disordered, resulting in a decline in driving ability. At present, according to the source of monitoring data, the commonly used fatigue driving detection methods are mainly divided into two categories: invasive detection and non-invasive detection. The invasive detection method mainly studies the changes in the driver's physiological signals such as EEG signals, ECG signals, and EMG signals during the driving process to determine whether the driver is in a fatigued state. However, in the process of collecting data, the driver needs to wear the detection equipment all the time, which may distract the driver's attention or make him feel uncomfortable, affecting the driver's normal driving operation. In non-invasive detection, affected by external factors such as external lighting, obstructions and driver's posture, the stability of the detection method based on the driver's facial features needs to be improved. The non-invasive detection method based on the characteristics of fatigue driving behavior analyzes the differences in data such as the driver's speed, steering wheel angle, yaw angle and acceleration under different conditions to judge the driver's fatigue state. This method will not interfere with the driver's driving behavior, but can resist the interference of factors such as changes in lighting and driver's posture, and has strong practicality. Therefore, this method has become one of the research hotspots in the field of fatigue driving detection.
[0004] At present, many achievements have been made in the research on fatigue driving detection based on vehicle motion characteristics, but the current research is mainly applicable to fatigue driving detection on ordinary roads. When facing complex driving operation behaviors on mountain roads, traditional deep learning networks such as SVM, RF and BP are difficult to effectively capture the dynamic changes and long-term dependencies in driving behavior in fatigue driving detection, so the accuracy of fatigue driving behavior detection needs to be improved. Summary of the invention
[0005] The present invention provides a method and system for identifying fatigue driving status on mountain roads, and solves the technical problem of how to improve the accuracy of identifying fatigue driving behavior under complex mountain road conditions.
[0006] In order to solve the above technical problems, the present invention provides a method for identifying fatigue driving status on mountain roads, comprising the steps of:
[0007] Using the optimal fatigue driving behavior characteristics as samples, create training sets and test sets;
[0008] Constructing an improved BiGRU neural network; the improved BiGRU neural network includes a fatigue driving behavior feature input layer, a BiGRU layer, a channel attention layer, a fully connected layer, a classification layer and a driver state output layer connected in sequence from input to output, the fatigue driving behavior feature input layer is used to input the fatigue driving behavior feature to the BiGRU layer, the BiGRU layer is used to use a bidirectional gated recurrent unit neural network, i.e., a BiGRU network, to calculate the hidden state corresponding to the fatigue driving behavior feature and output it to the channel attention layer, the channel attention layer is used to perform compression and excitation operations on the hidden state output by the BiGRU layer to obtain a weighted output hidden state and output it to the fully connected layer, the fully connected layer synthesizes all weighted output hidden states and outputs them to the classification layer, the classification layer uses a Softmax function to convert the output of the fully connected layer into a probability distribution and outputs it to the driver state output layer, and the driver state output layer outputs the driver state corresponding to the current fatigue driving behavior feature according to each probability distribution;
[0009] The improved BiGRU neural network is trained using the training set, and the improved BiGRU neural network that has been trained is tested using the test set.
[0010] Furthermore, the compression operation of the channel attention layer is to perform a global average pooling operation on each channel of the hidden state output by the BiGRU layer; the excitation operation of the channel attention layer is expressed by the formula:
[0011]
[0012] in, represents the result of the compression operation on the cth channel, δ() is the Relu activation function, σ() is the Sigmoid activation function, W1 and W2 are the weights during the excitation operation, represents the hidden state of the cth channel output by the BiGRU layer, Represents the excitation result of the channel attention layer on the cth channel.
[0013] Furthermore, in the process of training the improved BiGRU neural network, a sparrow search algorithm is used to automatically find the optimal solution for the parameters of the BiGRU network to obtain the optimal number of hidden layer units, initial learning rate, L2 regularization coefficient and number of iterations of the BiGRU network.
[0014] Furthermore, a sparrow search algorithm is used to automatically find the optimal solution for the parameters of the BiGRU network, specifically comprising the steps of:
[0015] Initialize parameters, including setting the initial population size of sparrows, the maximum number of iterations, and the dimension of the search space; set each individual sparrow to a vector, which represents the initial learning rate, the number of hidden layer units, the L2 regularization coefficient, and the number of iterations of the BiGRU network;
[0016] The difference between the recognition accuracy of the BiGRU network on the training set and 1 is used as the fitness value. The higher the accuracy, the better the position of the sparrow population.
[0017] Iteratively update the positions of various groups and re-evaluate the fitness values of all sparrows, so that sparrows can gradually find the optimal position;
[0018] When the maximum number of iterations is reached, the sparrow individual with the smallest fitness value is output, the optimal solution of the BiGRU network is output, and the algorithm optimization ends.
[0019] Furthermore, the optimal fatigue driving behavior characteristics are used as samples to create a training set and a test set, which specifically includes the following steps:
[0020] Collect the driver's driving behavior data, pre-process the driving behavior data, obtain samples including various fatigue levels, and construct a fatigue driving data set;
[0021] For each driving behavior variable in the fatigue driving data set, a variety of statistical features and frequency domain features are extracted to obtain multiple types of fatigue driving behavior features;
[0022] All fatigue driving behavior features are screened using a cross-validation recursive feature elimination algorithm to obtain the optimal fatigue driving behavior features and construct the optimal feature parameter set;
[0023] The optimal feature parameter set is divided into a training set and a test set.
[0024] Furthermore, the driving behavior data is preprocessed to obtain samples of various fatigue levels, specifically including:
[0025] Determine the driving behavior variables that can directly reflect the driver's driving status;
[0026] Collect sample data of various driving behavior variables of drivers in the states of sobriety, fatigue and extreme fatigue, and divide them into time series data segments;
[0027] According to the driver facial fatigue scoring standard, facial fatigue rating and scoring are performed on each data segment. The rating includes three fatigue levels: awake, tired and very tired. The scoring includes scoring the three fatigue levels from low to high according to the degree of fatigue.
[0028] Furthermore, the driving behavior variables include steering wheel angle, vehicle speed, throttle opening, vehicle yaw angle, vehicle lateral acceleration and vehicle longitudinal acceleration.
[0029] Furthermore, the multiple statistical features and frequency domain features of various driving behavior variables are screened using a cross-validation recursive feature elimination algorithm to obtain the optimal fatigue driving behavior features, specifically including:
[0030] (1) All fatigue driving behavior characteristics were divided into training set and test set in a ratio of 9:1. The random forest model was trained and evaluated using the 10-fold cross-validation method. The classification accuracy of each fatigue driving behavior characteristic was calculated and ranked according to the classification accuracy. The higher the classification accuracy, the higher the ranking.
[0031] (2) Remove the feature category with the lowest importance, retrain the random forest model, and obtain a new importance ranking of fatigue driving behavior features;
[0032] (3) Repeat steps (1) and (2), continue to remove the feature categories with the lowest importance, and re-evaluate the random forest model until the termination condition is reached;
[0033] (4) Select the top six fatigue driving behavior characteristics as the optimal fatigue driving behavior characteristics.
[0034] Furthermore, the various statistical features of each driving behavior variable include variance, standard deviation, absolute value mean, coefficient of variation, root mean square and waveform factor, and the various frequency domain features of each driving behavior variable include energy entropy, scale entropy and singular entropy extracted by wavelet analysis;
[0035] The coefficient of variation is defined as the ratio of the standard deviation to the mean of the absolute value;
[0036] The form factor is defined as the ratio of the root mean square to the mean of the absolute value;
[0037] The optimal fatigue driving behavior characteristics include steering wheel angle variance, steering wheel angle variation coefficient, longitudinal acceleration singular entropy, longitudinal acceleration waveform factor, throttle opening scale entropy, and vehicle speed scale entropy.
[0038] The present invention also provides a mountain road fatigue driving state recognition system based on an improved BiGRU neural network, the key of which is that an intelligent agent is provided, and the intelligent agent is used to implement the mountain road fatigue driving state recognition method.
[0039] The present invention provides a method and system for identifying fatigue driving status on mountain roads, which comprehensively analyzes driving behavior data such as steering wheel angle, vehicle speed, lateral acceleration and vehicle longitudinal acceleration, integrates multiple fatigue driving behavior features, uses cross-validation recursive feature elimination method to screen key fatigue features, and uses sparrow search algorithm and channel attention mechanism to improve BiGRU neural network, and constructs a fatigue driving detection model suitable for complex mountain road conditions, so as to fully explore the causal relationship between fatigue driving behavior features and realize effective discrimination of driver fatigue status in real driving scenarios. After real vehicle data testing, compared with the original BiGRU detection model, the fatigue driving detection model has significantly improved the recognition accuracy of the driver's three-level fatigue state. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a CA-BiGRU neural network structure diagram provided by an embodiment of the present invention;
[0041] Figure 2 is a flow chart of a sparrow search algorithm provided by an embodiment of the present invention;
[0042] Figure 3 is a flow chart of the SSA-CA-BiGRU algorithm provided by an embodiment of the present invention;
[0043] Figure 4 is a flowchart of fatigue driving behavior feature extraction provided by an embodiment of the present invention;
[0044] Figure 5 It is a schematic diagram of a 10-fold cross-validation process provided by an embodiment of the present invention;
[0045] Figure 6 It is a comparison chart of four model evaluation indicators provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and cannot be understood as limiting the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.
[0047] Driving data based on operational behavior has a sequential characteristic. The gated recurrent neural network (GRU) makes the network output of the previous moment the input of the current moment through the connection between the hidden layer nodes. This structure helps to maintain the dependency relationship in the data and can effectively solve the gradient explosion and disappearance problems in the process of driving data input. The BiGRU neural network adds a back-propagation GRU neural network to the original forward propagation GRU neural network, and obtains the final output result by combining the forward and back-propagation information. In this way, the timing information of driving behavior operations can be fully utilized, and the deep information between fatigue characteristics under complex mountain road conditions can be more comprehensively captured, so as to more accurately identify the driver's fatigue state.
[0048] A large amount of driving behavior data will be collected during driving, so when the BiGRU model is faced with long time series input to judge the driver's state, information loss may occur. To solve this problem, the present invention introduces a channel attention (CA) mechanism / module, which adaptively learns the weights of different feature channels output by the BiGRU model through compression and excitation operations, improves the weights of important features, and suppresses redundant features to improve the accuracy of fatigue state recognition.
[0049] The channel attention module mainly includes compression and excitation operations. First, the compression operation is performed on the hidden state (h t ) for each channel (The superscript c corresponds to the cth channel, i.e. channel c) performs a global average pooling operation, which is mathematically expressed as follows:
[0050]
[0051] Where T is the number of time steps of the BiGRU network. Contains the average activation value of channel c over the entire time series as the global feature of the channel for subsequent channel weight calculation. For each channel c, calculate the average value at its time step, and finally obtain a vector F with a length of C (total number of channels) avg .
[0052] Next, we perform the excitation operation. First, we use two fully connected layers to avg To reduce the parameters of the fully connected layer and prevent the model from overfitting, the scaling parameter r is used to reduce the complexity of the model. In this paper, r=16 is set. The mathematical expression of this operation is as follows:
[0053]
[0054] Among them, δ() is the Relu activation function, σ() is the Sigmoid activation function, and W1 and W2 are the weights during the excitation operation. Through this operation, the weight of each channel feature can be obtained.
[0055] Finally, the new weights are multiplied by the original input channel by channel to produce a new weighted output. The specific operation is as follows:
[0056]
[0057] In this way, the weights of important features are increased, while redundant features are suppressed, thereby improving the accuracy of fatigue state recognition.
[0058] The channel attention module is embedded in the BiGRU network to obtain the CA-BiGRU neural network model. The channel attention module adaptively adjusts the weight of each output channel to highlight the features that are more important for judging the driver's fatigue state, thereby improving the recognition accuracy of the model. The CA-BiGRU neural network includes a fatigue driving behavior feature input layer, a BiGRU layer, a CA layer (channel attention layer), a fully connected layer, a classification layer, and a driver state output layer, which are sequentially connected from input to output. The specific network structure is as follows: Figure 1 The fatigue driving behavior feature input layer is used to input the fatigue driving behavior feature to the BiGRU layer. The BiGRU layer is used to calculate the hidden state corresponding to the fatigue driving behavior feature and output it to the CA layer. The CA layer is used to perform compression and excitation operations on the hidden state output by the BiGRU layer to obtain the weighted output hidden state ( Figure 1 α1 to α n is the weighting coefficient, n is the number of output nodes of the CA layer) and is output to the fully connected layer. The fully connected layer integrates all weighted output hidden states and outputs them to the classification layer. The classification layer uses the Softmax function to convert the output of the fully connected layer into a probability distribution and outputs it to the driver state output layer. The driver state output layer outputs the driver state corresponding to the current fatigue driving behavior characteristics according to each probability distribution.
[0059] In order to improve the parameter selection efficiency of the BiGRU model, the sparrow search algorithm (SSA) is introduced to optimize its training parameters. Compared with particle swarm and genetic optimization algorithms, SSA has obvious advantages in convergence speed and optimization accuracy. The sparrow search algorithm automatically finds the optimal solution to obtain the optimal number of hidden layer units, initial learning rate, L2 regularization coefficient and number of iterations of the BiGRU network to improve the convergence speed, generalization ability and stability of the BiGRU model. It is mainly divided into three stages: discoverer position update, follower position update and scout position update.
[0060] The process of the sparrow search algorithm is as follows Figure 2 The steps are as follows:
[0061] (1) Initialize the parameters and set the initial population size, maximum number of iterations, and search space dimension of the sparrows. Each individual sparrow is a vector representing the initial learning rate, number of hidden layer units, L2 regularization coefficient, and number of iterations of the BiGRU network;
[0062] (2) The recognition accuracy of the BiGRU network on the training set is used as the fitness value. The higher the accuracy, the better the position of the sparrow population;
[0063] (3) Update the positions of various groups according to formulas (11), (12), and (13), and re-evaluate the fitness values of all sparrows so that the sparrows can gradually find the optimal position;
[0064] (4) When the maximum number of iterations is reached, the parameter with the highest fitness is output, otherwise switch to step (2);
[0065] (5) Output the optimal solution, update the BiGRU network parameters, and end the algorithm optimization.
[0066] Based on the above analysis, the embodiment of the present invention proposes an SSA-CA-BiGRU fatigue driving detection model, and its algorithm flow is as follows: Figure 3 As shown, it includes driving behavior data processing, sparrow optimization part and CA-BiGRU neural network construction part.
[0067] 1. Sparrow optimization part:
[0068] In order to improve the accuracy of driver fatigue state recognition, the SSA algorithm is used to optimize the initial learning rate, number of hidden layer units, L2 regularization coefficient and maximum number of training times of the CA-BiGRU model. The difference between the accuracy of predicting fatigue state on the training set and 1 is used as the fitness function value, which makes the fitness function easy to calculate and understand. The smaller the fitness value, the higher the accuracy of the model. When the maximum number of iterations is reached, the set of hyperparameters with the smallest fitness value is passed into the CA-BiGRU model for parameter update. The fitness value calculation formula is as follows:
[0069]
[0070] Among them, P true represents the number of samples predicted accurately in the training set; T sum Represents the total number of samples in the training set.
[0071] 2. CA-BiGRU model part
[0072] First, decode the parameters passed by SSA, and update the number of nodes in the CA-BiGRU hidden layer, the initial learning rate, the regularization coefficient, and the maximum number of training times. Next, input the fatigue features into the CA-BiGRU model for training, and use the test set to evaluate the model. Then, return the obtained fitness value to the SSA part. By updating the positions of the discoverer, follower, and scout, SSA updates the global optimal solution and finally obtains the optimal parameter settings for the fatigue driving detection model. The fatigue detection model parameter settings are shown in Table 1.
[0073] Table 1 Fatigue detection model parameter settings
[0074]
[0075] 3. Driving behavior data processing part
[0076] During the training and testing phases, driving behavior data processing mainly includes driving behavior data preprocessing, feature transformation, indicator optimization, and data set division.
[0077] ① Driving behavior data preprocessing
[0078] This example evenly collects sample data of drivers in the states of sobriety, fatigue, and extreme fatigue, and scores each data segment as 1 (sober), 2 (fatigue), and 3 (very tired), and finally constructs a fatigue driving data set containing 344 samples. Among them, there are 243 sober samples, 71 fatigue samples, and 30 very tired samples. In view of the imbalance in the number of three-level fatigue samples, this example also expands 385 samples of each type, bringing the total number of samples to 729. In the fatigue state, the driver's psychological and physiological state will change significantly, and these changes directly affect their control accuracy of the vehicle, which may lead to abnormal operating behavior. Therefore, steering wheel angle, vehicle speed, vehicle yaw angle, lateral acceleration, longitudinal acceleration, and throttle opening can be used as characteristic variables of fatigue driving behavior.
[0079] The steering wheel is a device that drivers frequently operate. Its angle change can directly reflect the driver's driving state. When the driver is awake, the steering wheel angle fluctuates frequently and the fluctuation amplitude is small; when the driver is tired, the fluctuation amplitude of the steering wheel angle increases; when the driver is very tired, the steering wheel angle appears to be stationary and fluctuates greatly. The stability of the vehicle speed and small acceleration and deceleration can be used as the basis for the driver's state. The yaw rate is an important indicator reflecting the stability of the vehicle and the smoothness of driving. The lateral acceleration and longitudinal acceleration are the acceleration of the vehicle's movement perpendicular to the driving direction and horizontally, respectively. The driver controls the speed of the vehicle through the throttle and brake. When the driver is awake, the throttle opening remains stable; when the driver is tired, the throttle opening fluctuates greatly; when the driver is very tired, the driver's consciousness is delayed, the throttle fluctuation amplitude decreases, remains unchanged for a long time, or suddenly increases.
[0080] The changes in the waveforms of the six fatigue driving behavior characteristic variables clearly reveal the rich fatigue characteristic indicators contained in the driver's operating behavior. Therefore, during the experiment, this embodiment specifically selected the six types of driving behavior data, namely, the steering wheel angle, vehicle speed, throttle opening, vehicle yaw angle, and vehicle lateral and longitudinal acceleration, as key research objects.
[0081] ② Feature transformation
[0082] Statistical features can effectively reveal the differences and changing trends between driving behavior data. At the same time, time-frequency domain analysis can highlight the dynamic changes and key local important features of driving behavior during vehicle operation.
[0083] In this embodiment, the following Figure 4 The fatigue driving behavior characteristics shown in FIG. For the six main driving behavior variables with time series characteristics, namely, steering wheel angle, longitudinal acceleration, vehicle speed, lateral acceleration, yaw rate and throttle opening, a 60-second sample window T is set, and a time window t is slid in this window with a step length of 1 second to calculate the maximum values of the steering wheel angle and other related driving behavior variables at specific times (t = 5, 10, 15, 20 seconds), which are used as target values within the sample window T. Then, the above method is used to extract the statistical characteristics of variance, standard deviation, absolute mean, coefficient of variation, root mean square and waveform factor. In addition, this embodiment also uses wavelet analysis to extract the time-frequency domain characteristics of energy entropy, scale entropy and singular entropy. These feature extraction techniques combine the advantages of statistics and time-frequency analysis, providing a more comprehensive and in-depth data analysis method for the study of fatigue driving.
[0084] Some uncommon statistical feature calculation formulas are as follows:
[0085] 1. Coefficient of variation
[0086]
[0087] Among them, S td represents standard deviation, M represents absolute mean, and S represents coefficient of variation a As a normalized measure of the discreteness of driving behavior data.
[0088] 2. Form Factor
[0089]
[0090] Where BX is the waveform factor, which is the root mean square R ms The ratio to the absolute mean M.
[0091] ③Indicator optimization
[0092] In this example, the random forest model is used as the base model to train the driving behavior data. According to the weight coefficients adaptively calculated by the base model, the fatigue driving behavior features that contribute less to the model's prediction ability are eliminated, thereby reducing the number of fatigue features without losing prediction accuracy, thereby improving the training efficiency of the subsequent fatigue driving detection model.
[0093] K-fold cross validation is to divide all fatigue driving behavior feature samples into K parts in equal proportion, use one part as test data, and input the rest as training data into the random forest model for training. Finally, the average of the K-fold model classification accuracy is used as the final classification accuracy to determine the optimal fatigue feature subset. In this embodiment, K=10, and the 10-fold cross validation process is as follows: Figure 5 shown.
[0094] The steps of feature optimization are as follows:
[0095] (1) All fatigue driving behavior characteristics were divided into training set and test set in a ratio of 9:1. The random forest model was trained and evaluated using the 10-fold cross-validation method. The classification accuracy of each fatigue driving behavior characteristic was calculated and ranked according to the classification accuracy. The higher the classification accuracy, the higher the ranking.
[0096] (2) Remove the feature category with the lowest importance, retrain the random forest model, and obtain a new importance ranking of fatigue driving behavior features;
[0097] (3) Repeat steps (1) and (2), continue to remove the feature categories with the lowest importance, and re-evaluate the random forest model until the termination condition is reached;
[0098] (4) Select the top six fatigue driving behavior characteristics as the optimal fatigue driving behavior characteristics.
[0099] A total of 36 statistical features and 18 time-frequency domain features based on wavelet transform were extracted from the six types of driving behavior variables, totaling 54 indicators. After the cross-validation recursive feature elimination algorithm was used to screen the fatigue driving behavior features, the six indicators shown in Table 2 were finally selected as the optimal feature parameter set D.
[0100] Table 2 Optimal fatigue driving behavior characteristic parameter set
[0101]
[0102] That is, the features finally input into the CA-BiGRU model include steering wheel angle variance, steering wheel angle variation coefficient, longitudinal acceleration singular entropy, longitudinal acceleration waveform factor, throttle opening scale entropy, and vehicle speed scale entropy.
[0103] ④Dataset division
[0104] The SSA-CA-BiGRU fatigue driving recognition model built in this embodiment normalizes the optimal feature parameter set D and divides it into a training set and a test set in a ratio of 7:3.
[0105] In order to evaluate the effectiveness of the SSA-CA-BiGRU model in identifying driver fatigue status under complex mountainous road conditions, this example uses data collected under real vehicle conditions for experiments and tests. The data set is set as above.
[0106] This embodiment introduces four evaluation indicators, namely precision (Precision, P), recall (Recall, R), condition positive rate (Condition Positive, CP) and F1-score (F1-Score, F1), to conduct a more comprehensive and integrated evaluation of the fatigue driving recognition model.
[0107] The evaluation results of the SSA-CA-BiGRU fatigue driving detection model are shown in Table 3. The accuracy of this model in identifying the driver's fatigue state is 90.3%, the recall rate is 85.3%, the false negative rate is 9.8%, and the F1-score is 90.0%.
[0108] Table 3 Evaluation results of SSA-CA-BiGRU fatigue driving detection model
[0109]
[0110] In order to compare the superior performance of the SSA-CA-BiGRU model, this example also shows the comparison of the results of the four models, BiGRU, CA-BiGRU, SSA-BiGRU and SSA-CA-BiGRU, in fatigue driving recognition. Figure 6 shown. Figure 6 In the results, the SSA-CA-BiGRU model achieved the best results in all four evaluation indicators, proving the effectiveness of the sparrow optimization algorithm and channel attention mechanism in improving the performance of the BiGRU model.
[0111] In summary, the embodiment of the present invention provides a method and system for identifying fatigue driving status on mountain roads, which improves the bidirectional gated recurrent unit (BiGRU) neural network, combines the sparrow optimization algorithm and the channel attention mechanism, and is used for detecting driver fatigue status under complex mountain road conditions. The sparrow optimization algorithm can obtain the optimal input parameter setting of the BiGRU model, so as to fully explore the continuity between the characteristics of fatigue driving behavior on mountain roads, and improve the convergence speed, generalization ability and stability of the model. The channel attention mechanism adaptively learns the weights of different state channels in the hidden state of the BiGRU model output through compression and excitation operations, highlights important features, and suppresses redundant features, thereby improving the recognition accuracy of the BiGRU model. After being tested with real vehicle data, the model's recognition accuracy for the driver's three-level fatigue state reached 90.2%, which is 11.0% higher than the original BiGRU detection model.
[0112] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A method for identifying fatigue driving status on mountain roads, characterized in that: Includes steps: Using the optimal fatigue driving behavior characteristics as samples, create training sets and test sets; Constructing an improved BiGRU neural network; the improved BiGRU neural network includes a fatigue driving behavior feature input layer, a BiGRU layer, a channel attention layer, a fully connected layer, a classification layer and a driver state output layer connected in sequence from input to output, the fatigue driving behavior feature input layer is used to input the fatigue driving behavior feature to the BiGRU layer, the BiGRU layer is used to use a bidirectional gated recurrent unit neural network, i.e., a BiGRU network, to calculate the hidden state corresponding to the fatigue driving behavior feature and output it to the channel attention layer, the channel attention layer is used to perform compression and excitation operations on the hidden state output by the BiGRU layer to obtain a weighted output hidden state and output it to the fully connected layer, the fully connected layer synthesizes all weighted output hidden states and outputs them to the classification layer, the classification layer uses a Softmax function to convert the output of the fully connected layer into a probability distribution and outputs it to the driver state output layer, and the driver state output layer outputs the driver state corresponding to the current fatigue driving behavior feature according to each probability distribution; The improved BiGRU neural network is trained using the training set, and the improved BiGRU neural network that has been trained is tested using the test set.
2. The method for identifying fatigue driving status on mountain roads according to claim 1, characterized in that: The compression operation of the channel attention layer is to perform a global average pooling operation on each channel of the hidden state output by the BiGRU layer; the excitation operation of the channel attention layer is expressed by the formula: in, represents the result of the compression operation on the cth channel, δ() is the Relu activation function, σ() is the Sigmoid activation function, W1 and W2 are the weights during the excitation operation, represents the hidden state of the cth channel output by the BiGRU layer, Represents the excitation result of the channel attention layer on the cth channel.
3. The method for identifying fatigue driving status on mountain roads according to claim 1, characterized in that: In the process of training the improved BiGRU neural network, a sparrow search algorithm is used to automatically find the optimal solution for the parameters of the BiGRU network, and the optimal number of hidden layer units, initial learning rate, L2 regularization coefficient and number of iterations of the BiGRU network are obtained.
4. The method for identifying fatigue driving status on mountain roads according to claim 3, characterized in that: The sparrow search algorithm is used to automatically find the optimal solution for the parameters of the BiGRU network, which specifically includes the following steps: Initialize parameters, including setting the initial population size of sparrows, the maximum number of iterations, and the dimension of the search space; set each individual sparrow to a vector, which represents the initial learning rate, the number of hidden layer units, the L2 regularization coefficient, and the number of iterations of the BiGRU network; The difference between the recognition accuracy of the BiGRU network on the training set and 1 is used as the fitness value. The higher the accuracy, the better the position of the sparrow population. Iteratively update the positions of various groups and re-evaluate the fitness values of all sparrows, so that sparrows can gradually find the optimal position; When the maximum number of iterations is reached, the sparrow individual with the smallest fitness value is output, the optimal solution of the BiGRU network is output, and the algorithm optimization ends.
5. The method for identifying fatigue driving status on mountain roads according to claim 1, characterized in that: Using the optimal fatigue driving behavior characteristics as samples, create training sets and test sets, including the following steps: Collect the driver's driving behavior data, pre-process the driving behavior data, obtain samples including various fatigue levels, and construct a fatigue driving data set; For each driving behavior variable in the fatigue driving data set, a variety of statistical features and frequency domain features are extracted to obtain multiple types of fatigue driving behavior features; All fatigue driving behavior features are screened using a cross-validation recursive feature elimination algorithm to obtain the optimal fatigue driving behavior features and construct the optimal feature parameter set; The optimal feature parameter set is divided into a training set and a test set.
6. The method for identifying fatigue driving status on mountain roads according to claim 5, characterized in that: The preprocessing of the driving behavior data to obtain samples of various fatigue levels specifically includes: Determine the driving behavior variables that can directly reflect the driver's driving status; Collect sample data of various driving behavior variables of drivers in the states of sobriety, fatigue and extreme fatigue, and divide them into time series data segments; According to the driver facial fatigue scoring standard, facial fatigue rating and scoring are performed on each data segment. The rating includes three fatigue levels: awake, tired and very tired. The scoring includes scoring the three fatigue levels from low to high according to the degree of fatigue.
7. The method for identifying fatigue driving status on mountain roads according to claim 6, characterized in that: Driving behavior variables include steering wheel angle, vehicle speed, throttle opening, vehicle yaw angle, vehicle lateral acceleration, and vehicle longitudinal acceleration.
8. The method for identifying fatigue driving status on mountain roads according to claim 7, characterized in that: The cross-validation recursive feature elimination algorithm is used to screen all fatigue driving behavior features to obtain the optimal fatigue driving behavior features, which specifically include: (1) All fatigue driving behavior characteristics were divided into training set and test set in a ratio of 9:
1. The random forest model was trained and evaluated using the 10-fold cross-validation method. The classification accuracy of each fatigue driving behavior characteristic was calculated and ranked according to the classification accuracy. The higher the classification accuracy, the higher the ranking. (2) Remove the feature category with the lowest importance, retrain the random forest model, and obtain a new importance ranking of fatigue driving behavior features; (3) Repeat steps (1) and (2), continue to remove the feature categories with the lowest importance, and re-evaluate the random forest model until the termination condition is reached; (4) Select the top six fatigue driving behavior characteristics as the optimal fatigue driving behavior characteristics.
9. The method for identifying fatigue driving status on mountain roads according to claim 8, characterized in that: The various statistical features of each driving behavior variable include variance, standard deviation, absolute mean, coefficient of variation, root mean square and waveform factor, and the various frequency domain features of each driving behavior variable include energy entropy, scale entropy and singular entropy extracted by wavelet analysis; The coefficient of variation is defined as the ratio of the standard deviation to the mean of the absolute value; The form factor is defined as the ratio of the root mean square to the mean of the absolute value; The optimal fatigue driving behavior characteristics include steering wheel angle variance, steering wheel angle variation coefficient, longitudinal acceleration singular entropy, longitudinal acceleration waveform factor, throttle opening scale entropy, and vehicle speed scale entropy.
Citation Information
Patent Citations
Driver multi-operation fatigue feature extraction method based on recurrent neural network
CN112052905A
Driver state detection neural network construction method based on quantum genetic algorithm
CN112613366A