| Traffic accidents have caused huge losses to families and society in recent years.Fatigue driving is one of the major causes of traffic accidents.In this thesis,we conducted a study related to fatigue detection to reduce the traffic safety hazards caused by fatigue driving.Electroencephalogram(EEG)directly reflects the brain response during activity,so using EEG signal is an effective indicator for fatigue detection.This thesis proposes a new fatigue detection algorithm based on Recurrent Neural Network(RNN)with self-attention mechanism and a tranfer learning method based on this alogorithm.We investigate the effectiveness of these algorithm for fatigue detection in within-subject and cross-subject scenarios.The main research work of this thesis is as follows:(1)The fatigue detection algorithm proposed in this thesis was experimentally validated on the public dataset SADT-EEG,with the highest average accuracy of 91.3%.The experimental results prove that the algorithm is significantly effective.From the visualization of attention weights,we found that the self-attention model paid the most attention to the EEG features of fatigue critical brain regions,which verified that the model is biologically meaningful and interpretable.(2)We conducted within-subject fatigue regression research based on our proposed fatigue detection algorithm and conducted model comparison experiments on the SEED-VIG multimodal fatigue detection dataset.The experimental results of the five-fold cross-validation showed the best prediction using a Bidirectional Gated Recurrent Unit(GRU)with Multi-Head self-attention model(Bi GRU-MHSA),which had a COR/RMSE of 0.8535/0.1002 on average.From the visualization of attention weights,we found that the channel signal features of MultiHead self-attention are more comprehensive than the single self-attention.In comparison with other related studies,the model(Bi GRU-MHSA)achieved excellent results and shorten the time of the fatigue prediction window to 8 seconds.(3)We did cross-subject fatigue detection based on transfer learning.In this thesis,we conducted cross-subject fatigue detection experiments using a transfer-learning model based on RNN with self-attention.The experimental results of the leave-one-out cross-validation showed that the average accuracy of fatigue classification using the Bi GRU-MHSA transfer-learning model is 82.8%,which is 9.8% better than the accuracy of the maximum independence domain adaptation(MIDA)transfer learning method.The experimental results indicated that the transfer-learning model constructed in this thesis has advantages in cross-subject fatigue detection.From the visualization of the self-attention weights after the transfer,we found that the transferred attention layer paid the most attention to the features of fatigue critical brain regions,which indicates that this transfer learning model can learn a prior knowledge of EEG. |