Driver emotion detection method based on multiple modes

Through real-time acquisition and multimodal fusion model processing driver's facial video and voice data, extracting features and generating emotional state evaluation results, the problem of insufficient representation of multimodal features and lengthy fusion algorithm in the prior art is solved, and the problem of insufficient representation of multimodal features and lengthy fusion algorithms is realized High accuracy and real-time improve driving safety.

CN118968475APending Publication Date: 2024-11-15DATA SPACE RES INST

Patent Information

Application Number
CN202410886411.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

In the prior art, in the recognition of driver emotional state, multimodal features are insufficiently representative and fusion algorithms are lengthy, resulting in insufficient identification accuracy and reliability, making it difficult to monitor and early warning of potential emotional abnormalities in real time, affecting traffic safety.

Method used

The driver's facial video and voice data are collected in real time through the camera and microphone, and facial key points and heart rate variation characteristics are extracted using mediapipe, and facial expressions and voice characteristics are extracted by combining the resnet18 and opensmile models. The multimodal fusion model is used to fusion and generate emotions Status evaluation results.

Benefits of technology

It improves the accuracy and reliability of emotional state recognition, realizes real-time monitoring and early warning, significantly improves driving safety, is suitable for private vehicles and public transportation, and is highly robust and widely used.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968475A_ABST
    Figure CN118968475A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-mode-based driver emotion detection method. The method comprises the following steps that S1, face video and voice data of a driver are collected in real time through a camera and a microphone; s2, key points in a face video are extracted by means of mediation, an RGB mean value of a face skin area is calculated, a heart rate variability value is calculated through a POS model, signals are processed by means of a scattering transformation method, heart rate variability features are extracted, face detection is performed by means of mediation, a face area image is extracted, the face area image is subjected to size reduction to a size required by a resnet18 model, and the face video is obtained. The method comprises the following steps: extracting facial expression features by using a resnet18 model, extracting voice features by using an opensmile framework, and configuring a file by using config / is09-13 / IS09emotion.conf; and S3, inputting the physiological features, the facial expression features and the voice emotion features into a multi-modal fusion model, and evaluating the emotion state of the driver. The invention relates to emotion state detection of a driver in the driving process, in particular to an emotion detection method for face, voice and physiological index changes of the driver through artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multimodal technology, and in particular to a driver emotion detection method based on multimodality. Background Art

[0002] With the popularity of cars and the increasing traffic congestion, traffic safety issues are receiving more and more attention, and the driver's emotional state is one of the important factors affecting driving safety. The emotions that affect traffic safety mainly refer to the negative emotions such as anger, dissatisfaction and anxiety caused by drivers during driving due to traffic congestion, illegal driving, and other behaviors. This negative emotion not only affects the driver's physical and mental health, but may also lead to traffic accidents, posing a threat to traffic safety and social security. Therefore, how to accurately detect the driver's emotional state is of great significance to improving traffic safety.

[0003] The driver's emotional state can be analyzed not only from the facial and speech data, but also from physiological indicators. Among them, heart rate variability is considered to be a reaction of the autonomic nervous system, and the cardiac autonomic nervous system is closely related to people's emotions, psychological stress and other factors. Studies have shown that there is a close relationship between emotions and heart rate variability. Different emotional states have different effects on cardiac autonomy, resulting in changes in heart rate variability. For example, pleasant emotions will increase the amplitude of heart rate variability, while anxiety and stress will reduce the degree of heart rate change. Based on this relationship, researchers can more accurately judge a person's emotional state by analyzing the characteristics of heart rate variability.

[0004] In 2019, BMW AG proposed a method and device for identifying the safety-related emotional state of a driver. The invention designs a method and device for identifying the safety-related emotional state of a driver in a vehicle, wherein facial image data of the driver is obtained, micro-expression data representing the driver's micro-expressions are obtained from the facial image data with the help of image analysis, and physiological data related to the driver's emotional state is obtained; and through multimodal recognition again, the safety-related emotional state of the driver in the vehicle can be identified more accurately and reliably, and targeted safety measures can be taken when necessary.

[0005] In 2022, Guangzhou University proposed a multimodal driver emotion feature recognition method and system. The invention is designed in the field of multimodal recognition. It has a multimodal emotion feature recognition method and system for driver emotion judgment. The core method is to recognize the above information through a recognition module, including data preprocessing of the above visual information and voice information to form visual recognition information and voice recognition information respectively; the above visual recognition information and voice recognition information are respectively input into the visual facial expression feature recognition model and the voice emotion feature recognition model to obtain visual feature vectors and voice feature vectors respectively, and the visual feature vectors and voice feature vectors are input into the dual-modal emotion feature recognition model to obtain the decision-level fused emotion recognition results. This method effectively solves the technical problems of insufficient representativeness of multimodal features and lengthy fusion algorithms in traditional algorithms.

[0006] In 2022, Jilin University also proposed a multimodal driver emotion intelligent recognition method. This invention relates to a method for driver emotion intelligent recognition based on a multimodal network, which belongs to the field of intelligent transportation technology. It includes multimodal emotion data collection, data preprocessing, and building an emotion recognition network model based on a multimodal network. The advantage of multimodal emotion recognition is that the proposed multimodal network model integrates multiple modal information for recognition and judgment, which can improve the recognition accuracy to a certain extent compared with single-modal emotion recognition.

[0007] In view of the shortcomings and existing problems of current technology, we proposed a multimodal driver emotional state recognition method. By using a camera (with built-in microphone) to capture the driver's facial video and audio, we divided the processing into three parts: one is to analyze the heart rate variability characteristics through video data, the second is to analyze the facial expression characteristics through facial video data, and the third is to analyze the driver's voice emotion characteristics through voice data. Based on the above three characteristics, a multimodal model is used to comprehensively evaluate the driver's emotional state. This comprehensive use of facial expressions, voice, and internal physiological information is expected to improve the accuracy and reliability of driver emotional state recognition. Summary of the invention

[0008] The present invention is designed to detect the emotional state of a driver during driving, and in particular, utilizes an artificial intelligence emotion detection method to detect changes in the driver's face, voice, and physiological indicators (heart rate variability).

[0009] A method for driver emotion detection based on multimodality according to an embodiment of the present invention comprises the following steps:

[0010] S1, collect the driver's facial video and voice data in real time through the camera and microphone;

[0011] S2. Use mediapipe to extract 468 facial key points from the facial video, calculate the RGB mean of the facial skin area, calculate the heart rate variability value through the POS model, use the scattering transform method to process the signal, extract the heart rate variability feature, use mediapipe for face detection, extract the facial area image, resize the facial area image to the size required by the resnet18 model, use the resnet18 model to extract facial expression features, use the opensmile framework to extract voice features, and use config / is09-13 / IS09_emotion

[0012] .conf configuration files;

[0013] S3. Input physiological features, facial expression features and voice emotion features into the multimodal fusion model. The multimodal fusion model uses a fully connected layer and a maximum pooling layer to perform feature fusion and evaluate the driver's emotional state.

[0014] Optionally, the S1 specifically includes:

[0015] S11. Collecting facial video data of the driver through a camera, the camera is installed on the center console of the vehicle, and the camera needs to be aimed at the driver's face;

[0016] S12, collecting the driver's voice data through a microphone, where the microphone is built into the camera or installed separately in the car to capture the driver's voice information when speaking;

[0017] S13, synchronously transmitting the video data collected by the camera and the audio data collected by the microphone to the computing platform;

[0018] S14, the frame rate of video data acquisition is 20 frames / second, and the sampling rate of audio data acquisition is 16kHz;

[0019] S15. The collected video data and audio data are stored in a sequence form.

[0020] Optionally, the S2 specifically includes:

[0021] S21. For the acquired video data, use mediapipe to extract facemesh468 facial key points for each real-time image, and find the facial skin area through each facial key point. Perform RGB mean calculation on the facial skin area of ​​each image to obtain the skin mean of each image. The RGB mean data in the window is calculated by POS model, and then the signal is reconstructed through scattering transformation, and the peak value is found. The change of the time difference between each peak value is the heart rate variability value. The heart rate variability value within a period of time is extracted as a physiological feature. Physiological feature extraction: The obtained video data is used to extract facemesh for each real-time image using mediapipe, and the facial skin area is found through each key point of the face. The RGB mean value of the facial skin area of ​​each image is calculated to obtain the skin mean of each image. The RGB mean data in the window is calculated by the POS model, and then the signal is reconstructed through scattering transformation, and the peak value is found. The change in the time difference between each peak value is the heart rate variability value, and the heart rate variability value within a period of time is extracted as a physiological feature; the Ku-reflection transform is used, and the Morlet wavelet is selected for convolution with the signal:

[0022]

[0023] Where K is the normalization constant, w is the frequency, and t is the time. Morlet wavelet has been used in PPG research;

[0024] S22, facial expression feature extraction: for the acquired facial video data, use mediapipe to perform facedetect to extract the facial area for each real-time image, and extract the required facial area image through ROI, resize the facial area image to the image size required by resnet18, and then send the image to the resnet18 model for feature extraction, that is, to obtain the required facial expression features;

[0025] S23, speech emotion feature extraction: obtain audio data from the microphone, and then send the audio data to the opensmile open source feature extraction framework, use the config / is09-13 / IS09_emotion.conf in opensmile as the configuration to extract speech features, and use this feature as the speech emotion feature.

[0026] Optionally, the S22 specifically includes:

[0027] S221, for the acquired facial video data, use mediapipe to perform facedetect on each real-time image to extract the facial area;

[0028] S222, extracting the required facial region image through ROI;

[0029] S223, resize the facial region image to 224x224 pixels so that the image meets the input requirements of the resnet18 model;

[0030] S224, inputting the processed facial region image into the resnet18 model for feature extraction to obtain a facial expression feature vector;

[0031] S225. Obtain facial expression features by calculating feature vectors:

[0032] f i =ResNet18(I ROI );

[0033] Among them, f i Represents the facial expression feature vector of the i-th frame image, I ROI represents the resized facial region image;

[0034] S226, performing time series processing on the facial expression feature vectors of the multiple frames of images to capture the changes of facial expressions over time:

[0035] F=[f1,f2,...,f n ];

[0036] Where F represents the facial expression feature matrix in a time window, and n is the number of frames in the time window;

[0037] S227, normalize the facial expression feature matrix to reduce the impact of individual differences on feature extraction:

[0038]

[0039] Among them, F′ represents the normalized facial expression feature matrix, μ(f i ) and σ(f i ) represent the mean and standard deviation of the feature vector of the i-th frame image respectively;

[0040] S228, input the normalized facial expression feature matrix into the temporal convolutional network to further extract temporal features:

[0041] T = TCN(F′);

[0042] Among them, T represents the time series features after being processed by the time convolution network:

[0043]

[0044] Among them, Tj represents the jth channel of the time series feature, W jk represents the convolution kernel of the temporal convolutional network, * represents the convolution operation, and F′ k represents the kth channel of the normalized facial expression feature matrix, b j Represents the bias term.

[0045] Optionally, the S23 specifically includes:

[0046] S231, obtaining audio data from a microphone, and preprocessing the audio data, including noise reduction, normalization, and frame processing, the preprocessed audio signal:

[0047]

[0048] Where x(t) is the normalized audio signal, s(t) is the original audio signal, μ(s) and σ(s) are the mean and standard deviation of the audio signal respectively;

[0049] S232, extract features from the preprocessed audio data using the opensmile open source feature extraction framework, with the configuration file config / is09-13 / IS09_emotion.conf;

[0050] The extracted features include but are not limited to MFCC, pitch, energy and other statistical features. MFCC feature extraction:

[0051]

[0052] Where MFCC(n) represents the nth MFCC feature, x(m) represents the audio signal of the mth frame, M is the number of filters, and K is the number of features;

[0053] S233, combining the extracted multi-dimensional feature vectors to form a feature matrix:

[0054] F audio =[f1, f2, ..., f n ];

[0055] Among them, F audio is the audio feature matrix, f i is the audio feature vector of the i-th frame, and n is the total number of frames;

[0056] S234, normalize the audio feature matrix to reduce the impact of individual differences on feature extraction:

[0057]

[0058] Among them, F′ audiorepresents the normalized audio feature matrix, μ(f i ) and σ(f i ) represent the mean and standard deviation of the audio feature vector of the i-th frame respectively;

[0059] S235, input the time series features extracted by LSTM into the emotion classification model to generate speech emotion recognition results, emotion classification:

[0060] E audio =Softmax(W e ·h+b e );

[0061] Among them, E audio represents the result of speech emotion recognition, W e and b e Represent the weight and bias of the classification model respectively.

[0062] Optionally, the S3 specifically includes:

[0063] S31, respectively standardizing physiological features, facial expression features and voice emotion features;

[0064] S32, connecting the standardized physiological features, facial expression features and voice emotion features into a comprehensive feature vector;

[0065] S33, input the comprehensive feature vector into the fully connected layer to calculate the fusion feature;

[0066] S34, inputting the fused features into the maximum pooling layer to perform feature dimension reduction and aggregation;

[0067] S35, inputting the pooled features into the emotion classification model to generate the final emotion state assessment result;

[0068] Optionally, the S32 specifically includes:

[0069] S321, expressing the standardized physiological characteristics as a vector F′ ph ysio , facial expression features are represented by vector F′ face , the speech emotion feature is represented by vector F′ audio ;

[0070] S322, perform dimensionality reduction processing on each eigenvector to ensure that they have the same dimension d. The dimensionality reduction process adopts the principal component analysis method:

[0071] F″ ph ysio = PCA(F′ ph ysio );

[0072] F″ face = PCA(F′ face );

[0073] F″ audio = PCA(F′ audio );

[0074] Among them, F ph ysio , F″ face and F″ audio They represent the physiological features, facial expression features and voice emotion features after dimensionality reduction respectively;

[0075] S323, concatenate the feature vectors after dimensionality reduction to form a comprehensive feature vector F combined :

[0076] F combined =[F″ ph ysio , F″ face , F″ audio ];

[0077] Among them, F combined is the comprehensive feature vector after splicing;

[0078] S3124. Normalize the comprehensive feature vector to reduce the scale difference between different modal features. Normalize:

[0079]

[0080] Among them, F′ combined is the normalized comprehensive feature vector, μ(F combined ) and σ(F combined ) represent the mean and standard deviation of the comprehensive eigenvector respectively;

[0081] S325, input the normalized comprehensive feature vector into the feature fusion network to perform feature fusion calculation:

[0082] F fusion =σ(W·F′ combined + b);

[0083] Among them, F fusion is the fused feature vector, W is the weight matrix of the feature fusion network, b is the bias term, and σ is the activation function.

[0084] Optionally, the S33 specifically includes:

[0085] S331, the normalized comprehensive feature vector F′ combined As input, define the weight matrix W of the fully connected layer fc and the bias vector b fc ;

[0086] S332. Calculate the initial fusion features through the fully connected layer:

[0087] F fc1 =σ(W fc1 ·F′ combined +b fc1 );

[0088] Among them, F fc1 represents the initial fusion feature, W fc1 is the weight matrix of the first fully connected layer, b fc1 is the bias vector, σ is the activation function;

[0089] S333, introduce the second fully connected layer to further integrate features:

[0090] F fc2 =σ(W fc2 ·F fc1 +b fc2 );

[0091] Among them, F fc2 represents the further fused features, W fc2 is the weight matrix of the second fully connected layer, b fc2 is the bias vector;

[0092] S334. In order to enhance the expressiveness of the model, residual connection is introduced:

[0093] F res =F fc1 +F fc2 ;

[0094] Among them, F res Represents the fusion features after the introduction of residual connection;

[0095] S335. Input the fused features after residual connection into the third fully connected layer to calculate the final fused features:

[0096] F fusion =σ(W fc3 ·F res +b fc3 );

[0097] Among them, F fusion represents the final fusion feature, W fc3 is the weight matrix of the third fully connected layer, b fc3 is the bias vector;

[0098] S336, Apply batch normalization and Dropout technology to enhance the generalization ability and stability of the model:

[0099] F bn =Batch Norm(F tusion );

[0100] F dropout = Dropout(F bn , p);

[0101] Among them, F bn is the feature after batch normalization, F dropout is the feature after applying Dropout, and p is the retention probability of Dropout.

[0102] The beneficial effects of the present invention are:

[0103] The present invention makes full use of deep learning and multimodal data fusion methods in artificial intelligence technology, and describes in detail a multimodal driver emotion detection algorithm. By combining facial expression features, voice emotion features and physiological features (heart rate variability), the accuracy and reliability of emotional state recognition are effectively improved. The method has the following beneficial effects:

[0104] 1. A method for driver emotion detection based on multimodality with high safety. A method for driver emotion detection based on multimodality: The present invention can timely identify and warn of potential emotional abnormalities by real-time monitoring of the driver's emotional state, reduce traffic accidents caused by driver's emotional fluctuations, and significantly improve driving safety.

[0105] 2. A method for driver emotion detection based on multimodality with high accuracy. A method for driver emotion detection based on multimodality: The multimodal data fusion method comprehensively considers the changes in facial expressions, voice and physiological signals, and greatly improves the accuracy of emotional state recognition through multi-level feature extraction and fusion calculation. Compared with single-modality detection methods, it has higher reliability and accuracy.

[0106] 3. A method for driver emotion detection based on multimodality with strong real-time performance. A method for driver emotion detection based on multimodality: The present invention utilizes efficient deep learning models and optimization algorithms to process and analyze multimodal data in real time during driving, ensuring the timeliness of emotion detection and providing rapid response technical support for driving safety.

[0107] 4. System robustness of a method for driver emotion detection based on multimodality A method for driver emotion detection based on multimodality: Through technical means such as standardization processing, feature fusion and residual connection, the present invention shows high robustness in dealing with different driving environments and individual differences of drivers, ensuring the stability and consistency of the system.

[0108] 5. A method for driver emotion detection based on multimodality has wide application. A method for driver emotion detection based on multimodality: This method is not only suitable for private vehicles, but can also be widely used in public transportation, commercial transportation and autonomous driving systems, providing solid technical support for the construction of intelligent transportation and smart cities.

[0109] The present invention comprehensively improves the monitoring and management capabilities of drivers' emotional states through multimodal emotion detection technology, laying the foundation for building a safer and more intelligent transportation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0110] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0111] Figure 1 It is an overall framework for multimodal emotional state recognition;

[0112] Figure 2 It is a data flow chart for obtaining heart rate variability from face videos;

[0113] Figure 3 It is a structural diagram of the multimodal feature fusion model. DETAILED DESCRIPTION

[0114] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0115] refer to Figure 1 , a method for driver emotion detection based on multimodality, comprising the following steps:

[0116] S1, collect the driver's facial video and voice data in real time through the camera and microphone;

[0117] In this implementation, S1 specifically includes:

[0118] S11. Collecting facial video data of the driver through a camera, the camera is installed on the center console of the vehicle, and the camera needs to be aimed at the driver's face;

[0119] S12, collecting the driver's voice data through a microphone, where the microphone is built into the camera or installed separately in the car to capture the driver's voice information when speaking;

[0120] S13, synchronously transmitting the video data collected by the camera and the audio data collected by the microphone to the computing platform;

[0121] S14, the frame rate of video data acquisition is 20 frames / second, and the sampling rate of audio data acquisition is 16kHz;

[0122] S15. The collected video data and audio data are stored in a sequence form.

[0123] S2. Use mediapipe to extract 468 facial key points from the facial video, calculate the RGB mean of the facial skin area, calculate the heart rate variability value through the POS model, use the scattering transform method to process the signal, extract the heart rate variability feature, use mediapipe for face detection, extract the facial area image, resize the facial area image to the size required by the resnet18 model, use the resnet18 model to extract facial expression features, use the opensmile framework to extract voice features, and use config / is09-13 / IS09_emotion

[0124] .conf configuration files;

[0125] In this implementation, S2 specifically includes:

[0126] S21. For the acquired video data, use mediapipe to extract facemesh468 facial key points for each real-time image, and find the facial skin area through each facial key point. Perform RGB mean calculation on the facial skin area of ​​each image to obtain the skin mean of each image. The RGB mean data in the window is calculated by POS model, and then the signal is reconstructed through scattering transformation, and the peak value is found. The change of the time difference between each peak value is the heart rate variability value. The heart rate variability value within a period of time is extracted as a physiological feature. Physiological feature extraction: The obtained video data is used to extract facemesh for each real-time image using mediapipe, and the facial skin area is found through each key point of the face. The RGB mean value of the facial skin area of ​​each image is calculated to obtain the skin mean of each image. The RGB mean data in the window is calculated by the POS model, and then the signal is reconstructed through scattering transformation, and the peak value is found. The change in the time difference between each peak value is the heart rate variability value, and the heart rate variability value within a period of time is extracted as a physiological feature; the Ku-reflection transform is used, and the Morlet wavelet is selected for convolution with the signal:

[0127]

[0128] Where K is the normalization constant, w is the frequency, and t is the time. Morlet wavelet has been used in PPG research;

[0129] S22, facial expression feature extraction: for the acquired facial video data, use mediapipe to perform facedetect to extract the facial area for each real-time image, and extract the required facial area image through ROI, resize the facial area image to the image size required by resnet18, and then send the image to the resnet18 model for feature extraction, that is, to obtain the required facial expression features;

[0130] S23, speech emotion feature extraction: Get audio data from the microphone, and then send the audio data to the opensmile open source feature extraction framework, using the opensmile config / is09-13 / IS09emoti

[0131] on.conf is used as a configuration to extract speech features and use these features as speech emotion features.

[0132] S22, facial expression feature extraction: for the acquired facial video data, use mediapipe to perform facedetect to extract the facial area for each real-time image, and extract the required facial area image through ROI, resize the facial area image to the image size required by resnet18, and then send the image to the resnet18 model for feature extraction, that is, to obtain the required facial expression features;

[0133] In this implementation, S22 specifically includes:

[0134] S221, for the acquired facial video data, use mediapipe to perform facedetect on each real-time image to extract the facial area;

[0135] S222, extracting the required facial region image through ROI;

[0136] S223, resize the facial region image to 224x224 pixels so that the image meets the input requirements of the resnet 18 model;

[0137] S224, inputting the processed facial region image into the resnet18 model for feature extraction to obtain a facial expression feature vector;

[0138] S225. Obtain facial expression features by calculating feature vectors:

[0139] f i =ResNet18(I ROI );

[0140] Among them, f iRepresents the facial expression feature vector of the i-th frame image, I ROI represents the resized facial region image;

[0141] S226, performing time series processing on the facial expression feature vectors of the multiple frames of images to capture the changes of facial expressions over time:

[0142] F=[f1,f2,...,f n ];

[0143] Where F represents the facial expression feature matrix in a time window, and n is the number of frames in the time window;

[0144] S227, normalize the facial expression feature matrix to reduce the impact of individual differences on feature extraction:

[0145]

[0146] Among them, F′ represents the normalized facial expression feature matrix, μ(f i ) and σ(f i ) represent the mean and standard deviation of the feature vector of the i-th frame image respectively;

[0147] S228, input the normalized facial expression feature matrix into the temporal convolutional network to further extract temporal features:

[0148] T = TCN(F′);

[0149] Among them, T represents the time series features after being processed by the time convolution network:

[0150]

[0151] Among them, T j represents the jth channel of the time series feature, W jk represents the convolution kernel of the temporal convolutional network, * represents the convolution operation, and F′ k represents the kth channel of the normalized facial expression feature matrix, b j Represents the bias term.

[0152] S23. Speech emotion feature extraction: Get audio data from the microphone, and then send the audio data to the opensmile open source feature extraction framework. Use config / is09-13 / IS09emoti on.conf in opensmile as the configuration to extract speech features, and use this feature as the speech emotion feature.

[0153] In this implementation, S23 specifically includes:

[0154] S231, obtaining audio data from a microphone, and preprocessing the audio data, including noise reduction, normalization, and frame processing, the preprocessed audio signal:

[0155]

[0156] Where x(t) is the normalized audio signal, s(t) is the original audio signal, μ(s) and σ(s) are the mean and standard deviation of the audio signal respectively;

[0157] S232, extract features from the preprocessed audio data using the opensmile open source feature extraction framework, with the configuration file config / is09-13 / IS09_emotion.conf;

[0158] The extracted features include but are not limited to MFCC, pitch, energy and other statistical features. MFCC feature extraction:

[0159]

[0160] Where MFCC(n) represents the nth MFCC feature, x(m) represents the audio signal of the mth frame, M is the number of filters, and K is the number of features;

[0161] S233, combining the extracted multi-dimensional feature vectors to form a feature matrix:

[0162] F audio =[f1, f2, ..., f n ];

[0163] Among them, F audio is the audio feature matrix, f i is the audio feature vector of the i-th frame, and n is the total number of frames;

[0164] S234, normalize the audio feature matrix to reduce the impact of individual differences on feature extraction:

[0165]

[0166] Among them, F′ audio represents the normalized audio feature matrix, μ(f i ) and σ(f i ) represent the mean and standard deviation of the audio feature vector of the i-th frame respectively;

[0167] S235, input the time series features extracted by LSTM into the emotion classification model to generate speech emotion recognition results, emotion classification:

[0168] E audio =Softmax(We ·h+b e );

[0169] Among them, E audio represents the result of speech emotion recognition, W e and b e Represent the weight and bias of the classification model respectively.

[0170] S3. Input physiological features, facial expression features and voice emotion features into the multimodal fusion model. The multimodal fusion model uses a fully connected layer and a maximum pooling layer to perform feature fusion and evaluate the driver's emotional state.

[0171] In this implementation, S3 specifically includes:

[0172] S31, respectively standardizing physiological features, facial expression features and voice emotion features;

[0173] S32, connecting the standardized physiological features, facial expression features and voice emotion features into a comprehensive feature vector;

[0174] S33, input the comprehensive feature vector into the fully connected layer to calculate the fusion feature;

[0175] S34, inputting the fused features into the maximum pooling layer to perform feature dimension reduction and aggregation;

[0176] S35, inputting the pooled features into the emotion classification model to generate the final emotion state assessment result;

[0177] S32, connecting the standardized physiological features, facial expression features and voice emotion features into a comprehensive feature vector;

[0178] In this implementation, S32 specifically includes:

[0179] S321, expressing the standardized physiological characteristics as a vector F ph ysio , facial expression features are represented by vector F′ face , the speech emotion feature is represented by vector F′ audio ;

[0180] S322, perform dimensionality reduction processing on each eigenvector to ensure that they have the same dimension d. The dimensionality reduction process adopts the principal component analysis method:

[0181] F″ ph ysio = PCA(F′ ph ysio );

[0182] F″ face = PCA(F′ face );

[0183] F″audio = PCA(F′ audio );

[0184] Among them, F ph ysio , F″ face and F″ audio They represent the physiological features, facial expression features and voice emotion features after dimensionality reduction respectively;

[0185] S323, concatenate the feature vectors after dimensionality reduction to form a comprehensive feature vector F combined :

[0186] F combined =[F″ ph ysio , F″ face , F″ audio ];

[0187] Among them, F combined is the comprehensive feature vector after splicing;

[0188] S3124. Normalize the comprehensive feature vector to reduce the scale difference between different modal features. Normalize:

[0189]

[0190] Among them, F′ combined is the normalized comprehensive feature vector, μ(F combined ) and σ(F combined ) represent the mean and standard deviation of the comprehensive eigenvector respectively;

[0191] S325, input the normalized comprehensive feature vector into the feature fusion network to perform feature fusion calculation:

[0192] F fusion =σ(W·F′ combined + b);

[0193] Among them, F fusion is the fused feature vector, W is the weight matrix of the feature fusion network, b is the bias term, and σ is the activation function.

[0194] S33, input the comprehensive feature vector into the fully connected layer to calculate the fusion feature;

[0195] In this implementation, S33 specifically includes:

[0196] S331, the normalized comprehensive feature vector F′ combined As input, define the weight matrix W of the fully connected layer fc and the bias vector b fc ;

[0197] S332. Calculate the initial fusion features through the fully connected layer:

[0198] F fc1 =σ(W fc1 ·F′ combined +b fc1 );

[0199] Among them, F fc1 represents the initial fusion feature, W fc1 is the weight matrix of the first fully connected layer, b fc1 is the bias vector, σ is the activation function;

[0200] S333, introduce the second fully connected layer to further integrate features:

[0201] F fc2 =σ(W fc2 ·F fc1 +b fc2 );

[0202] Among them, F fc2 represents the further fused features, W fc2 is the weight matrix of the second fully connected layer, b fc2 is the bias vector;

[0203] S334. In order to enhance the expressiveness of the model, residual connection is introduced:

[0204] F res =F fc1 +F fc2 ;

[0205] Among them, F res Represents the fusion features after the introduction of residual connection;

[0206] S335. Input the fused features after residual connection into the third fully connected layer to calculate the final fused features:

[0207] F fusion =σ(W fc3 ·F res +b fc3 );

[0208] Among them, F fusion represents the final fusion feature, W fc3 is the weight matrix of the third fully connected layer, b fc3 is the bias vector;

[0209] S336, Apply batch normalization and Dropout technology to enhance the generalization ability and stability of the model:

[0210] F bn=Batch Norm(F fusion );

[0211] F dropout = Dropout(F bn, p);

[0212] Among them, F bn is the feature after batch normalization, F dropout is the feature after applying Dropout, and p is the retention probability of Dropout.

[0213] Implementation 1:

[0214] In a specific embodiment of a multimodal driver emotion detection method of the present invention, we selected a typical driving scenario, that is, in urban traffic, drivers need to face complex traffic conditions, such as traffic congestion during peak hours, uncertain behaviors of pedestrians and other vehicles, etc., all of which may cause emotional fluctuations in the driver. We applied the method of the present invention in this scenario and verified its beneficial effects through actual data.

[0215] The experiment was scheduled between March and April 2024. We conducted the experiment during peak hours in Beijing (7:30-9:30 in the morning and 17:00-19:00 in the afternoon), including areas with heavy traffic such as Zhongguancun, Xizhimen, and Guomao in Beijing, as well as the Fourth Ring Road and Beijing-Tibet Expressway leading to the suburbs.

[0216] First, we installed a high-definition camera and a high-sensitivity microphone on the center console of the experimental vehicle to collect the driver's facial video and voice data in real time. Both the camera and the microphone are connected to the on-board computing platform to ensure efficient data transmission and processing.

[0217] During data collection, the camera captured the driver's facial video at a rate of 30 frames per second, and the microphone recorded the driver's voice at a sampling rate of 16kHz. We selected 20 volunteers as experimental subjects, and these volunteers conducted multiple experiments under different driving conditions, including urban roads during rush hour, suburban roads, and highways. Each experiment lasted 30 minutes, and a total of 600 minutes of data were collected.

[0218] Next, we used the mediapipe tool to extract 468 facial key points in each frame and calculated the RGB mean of the facial skin area using these key points. We used the POS model and scattering transform method to process these data and extract the heart rate variability features in each period. In addition, mediapipe was also used to extract facial expression features, and the facial area images were processed using the resnet18 model to generate feature vectors.

[0219] For speech emotion features, we used the opensmile open source framework and the config / is09-13 / IS09_emotion.conf configuration file to extract MFCC (Mel-Frequency Cepstral Coefficients), pitch, energy, and other statistical features. We used the PCA method to reduce the dimensionality of these features so that the dimensions of all feature vectors were consistent.

[0220] All extracted feature vectors are standardized and input into the fusion model constructed by the fully connected layer and the maximum pooling layer for fusion calculation. The fused feature vectors are then processed by the emotion classification model to finally generate the driver's emotional state assessment results.

[0221] In the experiment, we recorded and compared the emotional state of each volunteer, and the results showed:

[0222] 1. During peak-hour traffic jams, the system detected that 70% of the volunteers showed obvious anxiety and impatience.

[0223] 2. When driving on suburban roads, 50% of the volunteers showed relaxed and pleasant emotions.

[0224] 3. On the highway, 60% of the volunteers showed concentration and tension.

[0225] In order to verify the accuracy of the system, we conducted a comparative analysis with the self-reported emotional states of volunteers. The experimental data showed that the accuracy of the method of the present invention in emotion detection reached more than 85%, which is about 20% higher than the traditional single-modality emotion detection method.

[0226] In a specific experimental example, volunteer A drove from Zhongguancun in downtown Beijing to Xizhimen during the morning rush hour on April 5, 2024. The entire journey took about 30 minutes. The experimental results showed that within the first 10 minutes of the journey, due to the heavy traffic, the system detected that volunteer A's anxiety gradually increased, the heart rate variability value decreased from 50ms to 30ms, the facial expression showed features such as frowning and biting lips, and the high-frequency components of the voice features increased. This is highly consistent with the tension and anxiety described by volunteer A.

[0227] In the middle 10 minutes of the journey, as we entered a relatively smooth suburban road, the system detected that volunteer A's emotional state gradually stabilized, the heart rate variability value returned to around 45ms, his facial expression showed a more relaxed state, and the high-frequency components of his voice characteristics decreased. This is also consistent with the emotional state described by volunteer A.

[0228] In the last 10 minutes, as they approached their destination and encountered heavy traffic again, the system detected that volunteer A's anxiety rose again, his heart rate variability dropped to 35ms again, his facial expression showed tension, and the high-frequency components in his voice characteristics increased again. This was completely consistent with volunteer A's self-report.

[0229] In another experimental example, volunteer B drove from Beijing's Guomao to Tongzhou during the afternoon rush hour on March 25, 2024, and the journey took about 40 minutes. The experimental data showed that in the first 15 minutes of the journey, due to traffic congestion, volunteer B's anxiety was obvious, the heart rate variability value dropped from 45ms to 28ms, his facial expression showed the characteristics of frowning and biting his lips, and the high-frequency components of his voice characteristics increased. After entering the highway, volunteer B's emotional state gradually stabilized, the heart rate variability value returned to about 40ms, his facial expression became relaxed, and the high-frequency components of his voice characteristics decreased. This is consistent with volunteer B's self-report. In the final stage of the journey, due to the increase in traffic flow again, volunteer B's anxiety rose again, the heart rate variability value dropped to 30ms, and his facial expression and voice characteristics also reflected nervousness.

[0230] Table 1 Driver emotion detection experimental data table

[0231]

[0232] Referring to Table 1 above, we can see that the method of the present invention can not only detect the driver's emotional state in real time and accurately, but also maintain high robustness and consistency in different driving scenarios, effectively solving the problems of insufficient accuracy and poor real-time performance in traditional emotion detection methods, and providing strong technical support for improving driving safety.

[0233] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for driver emotion detection based on multimodality, characterized in that: The steps include: S1, collect the driver's facial video and voice data in real time through the camera and microphone; S2. Use mediapipe to extract 468 facial key points from the facial video, calculate the RGB mean of the facial skin area, calculate the heart rate variability value through the POS model, use the scattering transform method to process the signal, extract the heart rate variability features, use mediapipe for face detection, extract the facial area image, resize the facial area image to the size required by the resnet18 model, use the resnet18 model to extract facial expression features, use the opensmile framework to extract voice features, and use the config / is09-13 / IS09_emotion.conf configuration file; S3. Input physiological features, facial expression features and voice emotion features into the multimodal fusion model. The multimodal fusion model uses a fully connected layer and a maximum pooling layer to perform feature fusion and evaluate the driver's emotional state.

2. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S1 specifically includes: S11. Collecting facial video data of the driver through a camera, the camera is installed on the center console of the vehicle, and the camera needs to be aimed at the driver's face; S12, collecting the driver's voice data through a microphone, where the microphone is built into the camera or installed separately in the car to capture the driver's voice information when speaking; S13, synchronously transmitting the video data collected by the camera and the audio data collected by the microphone to the computing platform; S14, the frame rate of video data acquisition is 30 frames / second, and the sampling rate of audio data acquisition is 16kHz; S15. The collected video data and audio data are stored in a sequence form.

3. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S2 specifically includes: S21. For the acquired video data, use mediapipe to extract facemesh468 facial key points for each real-time image, and find the facial skin area through each facial key point. Perform RGB mean calculation on the facial skin area of ​​each image to obtain the skin mean of each image. The RGB mean data in the window is calculated by POS model, and then the signal is reconstructed through scattering transformation, and the peak value is found. The change of the time difference between each peak value is the heart rate variability value. The heart rate variability value within a period of time is extracted as a physiological feature. Physiological feature extraction: The obtained video data is used to extract facemesh for each real-time image using mediapipe, and the facial skin area is found through each key point of the face. The RGB mean value of the facial skin area of ​​each image is calculated to obtain the skin mean of each image. The RGB mean data in the window is calculated by the POS model, and then the signal is reconstructed through scattering transformation, and the peak value is found. The change in the time difference between each peak value is the heart rate variability value, and the heart rate variability value within a period of time is extracted as a physiological feature; the Ku-reflection transform is used, and the Morlet wavelet is selected for convolution with the signal: Where K is the normalization constant, w is the frequency, and t is the time. Morlet wavelet has been used in PPG research; S22, facial expression feature extraction: for the acquired facial video data, use mediapipe to perform facedetect to extract the facial area for each real-time image, and extract the required facial area image through ROI, resize the facial area image to the image size required by resnet18, and then send the image to the resnet18 model for feature extraction, that is, to obtain the required facial expression features; S23, speech emotion feature extraction: obtain audio data from the microphone, and then send the audio data to the opensmile open source feature extraction framework, use the config / is09-13 / IS09_emotion.conf in opensmile as the configuration to extract speech features, and use this feature as the speech emotion feature.

4. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S22 specifically includes: S221, for the acquired facial video data, use mediapipe to perform facedetect on each real-time image to extract the facial area; S222, extracting the required facial region image through ROI; S223, resize the facial region image to 224x224 pixels so that the image meets the input requirements of the resnet 18 model; S224, inputting the processed facial region image into the resnet18 model for feature extraction to obtain a facial expression feature vector; S225. Obtain facial expression features by calculating feature vectors: fi=ResNet18(I ROI ); Among them, f i Represents the facial expression feature vector of the i-th frame image, I RoI represents the resized facial region image; S226, performing time series processing on the facial expression feature vectors of the multiple frames of images to capture the changes of facial expressions over time: F=[f1,f2,...,f n ]; Where F represents the facial expression feature matrix in a time window, and n is the number of frames in the time window; S227, normalize the facial expression feature matrix to reduce the impact of individual differences on feature extraction: Among them, F′ represents the normalized facial expression feature matrix, μ(f i ) and σ(f i ) represent the mean and standard deviation of the feature vector of the i-th frame image respectively; S228, input the normalized facial expression feature matrix into the temporal convolutional network to further extract temporal features: T = TCN(F′); Among them, T represents the time series features after being processed by the time convolution network: Among them, T j represents the jth channel of the timing feature, W jk represents the convolution kernel of the temporal convolutional network, * represents the convolution operation, and F′ k represents the kth channel of the normalized facial expression feature matrix, b j Represents the bias term.

5. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S23 specifically includes: S231, obtaining audio data from a microphone, and preprocessing the audio data, including noise reduction, normalization, and frame processing, the preprocessed audio signal: Where x(t) is the normalized audio signal, s(t) is the original audio signal, μ(s) and σ(s) are the mean and standard deviation of the audio signal respectively; S232, extract features from the preprocessed audio data using the opensmile open source feature extraction framework, with the configuration file config / is09-13 / IS09_emotion.conf; The extracted features include but are not limited to MFCC, pitch, energy and other statistical features. MFCC feature extraction: Where MFCC(n) represents the nth MFCC feature, x(m) represents the audio signal of the mth frame, M is the number of filters, and K is the number of features; S233, combining the extracted multi-dimensional feature vectors to form a feature matrix: F audio =[f1,f2,...,f n ]; Among them, F audio is the audio feature matrix, f i is the audio feature vector of the i-th frame, and n is the total number of frames; S234, normalize the audio feature matrix to reduce the impact of individual differences on feature extraction: Among them, F audio represents the normalized audio feature matrix, μ(f i ) and σ(f i ) represent the mean and standard deviation of the audio feature vector of the i-th frame respectively; S235, input the time series features extracted by LSTM into the emotion classification model to generate speech emotion recognition results, emotion classification: E audio =Softmax(W e ·h+b e ); Among them, E audio represents the result of speech emotion recognition, W e and b e Represent the weight and bias of the classification model respectively.

6. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S3 specifically includes: S31, respectively standardizing physiological features, facial expression features and voice emotion features; S32, connecting the standardized physiological features, facial expression features and voice emotion features into a comprehensive feature vector; S33, input the comprehensive feature vector into the fully connected layer to calculate the fusion feature; S34, inputting the fused features into the maximum pooling layer to perform feature dimension reduction and aggregation; S35, inputting the pooled features into the emotion classification model to generate the final emotion state assessment result; 7. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S32 specifically includes: S321, expressing the standardized physiological characteristics as a vector F′ physlo , facial expression features are represented as vector F′ face , the speech emotion feature is represented by vector F′ audio ; S322, perform dimensionality reduction processing on each eigenvector to ensure that they have the same dimension d. The dimensionality reduction process adopts the principal component analysis method: F″ p,hysio =PCA(F′ physio ); F″ face =PCA(F′ face ); F″ audio =PCA(F′ audio ); Among them, F physio , F″ face and F″ audio They represent the physiological features, facial expression features and voice emotion features after dimensionality reduction respectively; S323, concatenate the feature vectors after dimensionality reduction to form a comprehensive feature vector F combined : F combined =[F″ physio ,F″ face ’F″ audio ]; Among them, F combined is the comprehensive feature vector after splicing; S3124. Normalize the comprehensive feature vector to reduce the scale difference between different modal features. Normalize: Among them, F′ combined is the normalized comprehensive feature vector, μ(F combined ) and σ(F combined ) represent the mean and standard deviation of the comprehensive eigenvector respectively; S325, input the normalized comprehensive feature vector into the feature fusion network to perform feature fusion calculation: F fuston =σ(W·F′ combined +b); Among them, F fusion is the fused feature vector, W is the weight matrix of the feature fusion network, b is the bias term, and σ is the activation function.

8. The method for driver emotion detection based on multimodality according to claim 1, characterized in that: The S33 specifically includes: S331, the normalized comprehensive feature vector F combined As input, define the weight matrix W of the fully connected layer fc and the bias vector b fc ; S332. Calculate the initial fusion features through the fully connected layer: F fc1 =σ(W fc1 ·F combined +b fc1 ); Among them, F fc1 represents the initial fusion feature, W fc1 is the weight matrix of the first fully connected layer, b fc1 is the bias vector, σ is the activation function; S333, introduce the second fully connected layer to further integrate features: F fc2 =σ(W fc2 ·F fc1 +b fc2 ); Among them, F fc2 represents the further fused features, W fc2 is the weight matrix of the second fully connected layer, b fc2 is the bias vector; S334. In order to enhance the expressiveness of the model, residual connection is introduced: F res =F fc1 +F fc2 ; Among them, F res Represents the fusion features after the introduction of residual connection; S335. Input the fused features after residual connection into the third fully connected layer to calculate the final fused features: F fusion =σ(W fc3 ·F res +b fc3 ); Among them, F fusion represents the final fusion feature, W fc3 is the weight matrix of the third fully connected layer, b fc3 is the bias vector; S336, Apply batch normalization and Dropout technology to enhance the generalization ability and stability of the model: F bn =Batch Norm(F fusion ); F dropout =Dropout(F bn ,p); 9. Among them, F bn is the feature after batch normalization, F dropout is the feature after applying Dropout, and p is the retention probability of Dropout.

Citation Information

Patent Citations

  • Driver road rage identification method based on deep fusion of facial expressions and voice

    CN113591525A

  • Emotion recognition method and system based on multi-modal physiological information and deep learning

    CN114041795A

  • Music intervention method and system for driver emotion adjustment

    CN117442843A

  • Intelligent networked automobile driver emotion adjusting system

    CN117877004A

  • Method and device for camera-based heart rate variability monitoring

    WO2024056087A1

Cited By

  • User willingness evaluation method and device for financial business handling

    CN119417492A

  • Driver road rage emotion detection method based on machine learning

    CN120182951A

  • Fatigue driving behavior feature extraction and analysis method based on image recognition

    CN120853147A