Dual-mode emotion recognition method based on voice and video posture dynamic model level fusion features
A bimodal emotion recognition method that integrates voice and video gesture dynamic model-level features, using ECAPA-TDNN, 3D-Resnet and Bi-LSTM networks combined with the ECA attention mechanism, to solve the problem of single-modal and bi-modal emotion recognition features The problem of insufficient correlation improves the accuracy and robustness of emotion recognition.
Patent Information
- Application Number
- CN202410547457.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, single-modal emotion recognition has problems such as incomplete information and vulnerability to noise interference. The decision-level and feature-level fusion methods of dual-modal emotion recognition fail to effectively consider the interrelated information between modal features, resulting in emotional The recognition accuracy is not high, especially facial expression features are difficult to extract in practical applications.
A dual-modal emotion recognition method based on the dynamic model-level fusion features of voice and video gestures is adopted, and the voice and video features are identified through the time-delay neural network ECAPA-TDNN, the three-dimensional residual network 3D-Resnet and the bidirectional long short-term memory network Bi-LSTM. Deep fusion, combined with the efficient channel attention mechanism ECA, captures the interconnected features between modalities.
It improves the accuracy of emotion recognition, solves the problems of missing single-modal features and difficulty in extracting facial expressions, enhances the model's learning ability for multi-modal interaction, and improves the robustness and generalization ability of emotion recognition.
Smart Images

Figure CN118628878A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of emotion recognition, and specifically provides a dual-modal emotion recognition method based on voice and video posture dynamic model-level fusion features. Background Art
[0002] With the popularization of smart devices, voice and video signals have become multimodal information containing rich emotional information. With the continuous development of deep learning and emotion recognition, machines can better respond to users' emotional needs in applications such as human-computer interaction. In the field of strong artificial intelligence, multimodal emotion recognition has greatly improved the machine's ability to understand emotions and promoted the research and development of artificial intelligence emotion. In the judicial field, emotion recognition can obtain and analyze the emotional changes of criminal suspects in interrogation and trial, break through difficult cases, and improve the efficiency of detection.
[0003] Single-modality emotion recognition mainly uses three separate modes: speech, facial expression, and posture. It uses neural network methods to extract features from the three separate modes, and then uses classification methods such as full-link layer and support vector machine to obtain emotion recognition results. Dual-modality emotion recognition detection mainly focuses on three modes: text and speech, speech and facial expression, and posture and expression. It mainly uses the decision layer and feature layer fusion method to fuse the two modes and finally obtain emotion recognition results.
[0004] However, for single-modal emotion recognition technology, the features for emotion classification are completely determined by the features of a single modality. Single-modality has inherent defects such as incomplete information and susceptibility to noise interference, which will lead to low accuracy of emotion recognition in actual applications. For dual-modal emotion recognition technology, the problem of incomplete feature information can be solved. The commonly used decision-level dual-modal fusion method only uses weighted fusion of single-modal classification results, and the feature-level fusion method only performs simple splicing at the fusion layer to achieve fusion. Both methods do not take into account the mutual correlation information between modal features. At the same time, the facial expression features in dual-modality lose their temporal features as static features. The extraction of facial expressions is more dependent on the environment and equipment acquisition quality, which is not suitable for video modality acquisition at a longer distance in actual applications. Summary of the invention
[0005] In order to solve the problems existing in the prior art methods, the present invention provides a dual-modal emotion recognition method based on the fusion features of voice and video posture dynamic model level, which solves the problem of missing inter-modal correlation features caused by traditional decision-level and feature-level fusion methods. At the same time, the dual-modality of voice and video posture dynamic features is used to solve the problem of insufficient modalities and difficulty in extracting facial features in actual operations.
[0006] The present invention provides a dual-modal emotion recognition method based on voice and video posture dynamic model-level fusion features, comprising the following steps:
[0007] S1: Divide the data set into different folders according to different emotion types, and the folders of different emotion types are divided into subfolders and the speech signals corresponding to the emotion types are stored in WAV file format; the subfolders contain a video, and the stored content is a video frame;
[0008] S2: Preprocess the speech signal stored in WAV format, extract the three features of Mel frequency cepstral coefficient MFCC, fundamental frequency and root mean square energy in the speech signal, and use the np.concatenate function in Python to concatenate and fuse the three features to obtain speech mixed features;
[0009] S3: Preprocess the video to obtain multiple video single frame images;
[0010] S4: The Adam optimizer is used to train the network model; the network model structure includes the time-delay neural network ECAPA-TDNN, the three-dimensional residual network 3D-Resnet and the bidirectional long short-term memory network Bi-LSTM;
[0011] S5: Input the speech mixture features into the trained time-delay neural network ECAPA-TDNN model to obtain the deep features of the speech modality;
[0012] S6: Input the preprocessed video frames into the 3D residual network 3D-Resnet to obtain the deep features of the video modality;
[0013] S7: The deep features of the speech modality and the deep features of the video modality are fused at the model level, the fused features are input into the bidirectional long short-term memory network Bi-LSTM, and the emotion recognition is realized through the classification output of the model's fully connected layer.
[0014] Further, the speech signal is preprocessed, specifically,
[0015] Separate and correspond the voice signals to the video files in the subfolders according to the file names;
[0016] The separated corresponding speech signals are subjected to noise reduction processing to obtain pure speech signals;
[0017] Specaug is used as a data enhancer to enhance the speech signal, so as to achieve a series of random transformations on the input data during the training phase, thereby increasing the generalization ability of the model and improving the robustness of the model.
[0018] The enhanced speech signal is randomly cropped and padded according to the preset speech signal length. If it is greater than the preset length, it is cropped and only the speech signal in the cropped area is retained; if it is less than or equal to the preset length, zero padding operation is performed to make the speech signal reach the specified length.
[0019] Furthermore, the extraction of the three features in step S2 is specifically as follows:
[0020] 1) Extract the Mel frequency cepstral coefficients MFCC from the preprocessed speech signal using the librosa library in Python;
[0021] 2) Extract the fundamental frequency pitch using the librosa library: First, perform short-time Fourier transform (STFT) on the speech signal of the specified length, and then use the pitch tracking algorithm piptrack provided by librosa to calculate the corresponding pitch value of each frame of the speech signal, and the pitch value is limited to between 70Hz and 400Hz; form a NumPy array of the pitch value of the speech signal in the Python language and reshape it into a single-column shape;
[0022] 3) Use librosa library to extract RMS features: First, perform short-time Fourier transform (STFT) on the speech signal of the specified length, then calculate the amplitude and phase components represented by the short-time Fourier transform (STFT) and generate an amplitude spectrum. Use librosa.feature.rms function to calculate the RMS energy of each frame of the amplitude spectrum to obtain the RMS features of the speech signal.
[0023] Furthermore, the specific steps of preprocessing the video frames in S3 are:
[0024] Get video frames from the video file, and intercept video frames according to the specified speaker position and video frame rate, and save the video frames as jpeg files. Each video segment forms a folder, and the folder stores all the video frame images intercepted for the video;
[0025] The video frame is fixed to 112*112 by scaling and center cropping, and then normalized.
[0026] Furthermore, in S4, the training parameters are set as follows: batch size is 16, loss function is CrossEntropyLoss, and the Adam optimizer with the initial learning rate set to 0.001 is used; an experimental data set containing deep speech features and deep video dynamic features is obtained, and the experimental data set is divided into a training set and a test set. The training set is 80% of the data set, and the remaining 20% is used as a test set, and training is performed for 70 rounds; the network input is a continuous frame composed of 112*112 pixel video frame images and the Mel-frequency cepstral coefficients, fundamental frequency and root mean square speech mixed features extracted from the speech signal, where the Mel-frequency cepstral coefficients are set to 20, 40 and 60 respectively.
[0027] Furthermore, the ECAPA-TDNN in S5 is improved and extended based on TDNN (Time-delay Neural Network), including convolutional layers, Relu activation functions, fully connected layers, and Res2Blocks excitation modules;
[0028] Among them, the Res2Blocks excitation module is a module structure obtained by combining Res2Net and SENet.
[0029] The obtained mixed features of speech signals are input into ECAPA-TDNN, and feature mapping is realized through convolutional layers, Relu activation functions, and fully connected layers. The Res2Blocks excitation module is a module structure obtained by combining Res2Net and SENet, and the network structure is named SE-Res2Block. SENet (Squeeze-and-Excitation Networks) maps each feature channel of a feature map to a value, and the feature map is mapped to a vector with the same length as the number of feature channels. Res2Net divides the feature map after 1×1 convolution by the number of feature channels to obtain feature maps of the same scale. The first feature map is retained, and 3×3 convolution is performed from the second feature map, and the convolution result of the feature map is obtained, and a residual connection is performed with the next feature map, and the next feature map is further convolved with 3×3. Finally, a 1×1 convolution is performed. The network structure of ECAPA-TDNN contains 3 SE-Res2Block modules and residual connections are performed. The output feature maps of all SE-Res2Blocks are connected. After multi-layer feature aggregation, the dense layer processes the connected information and generates features of the attention statistical pool. Finally, the deep features of speech are obtained through the full connection layer and classifier. The addition of SE-Res2Blocks modules and residual links effectively improves the training effect and inference performance of the model.
[0030] Furthermore, the 3D residual network 3D-Resnet in S6 is improved based on the resnet network for processing 2D image classification. It consists of five parts: 3D convolution layer, residual block, pooling layer, global average pooling layer and full connection layer. The network inputs a video clip consisting of L RGB frames with a pixel size of 112×112, and uses 3D convolution layers to extract spatiotemporal features on the video. The first convolution layer implements spatial downsampling, and three spatiotemporal downsamplings with a convolution stride of 2×2×2 are used in the 3rd, 4th and 5th convolution layers. The network contains a residual block structure with two 3D convolution layers and skip connections. The skip connection directly adds the input to the output of the residual block to solve the problem of gradient disappearance in deep neural networks. The 3D residual network 3D-Resnet is used to obtain deep features of the video modality, increase the temporal modality, and enrich the video modality features, so that more emotional feature representations are obtained, and the accuracy of emotion recognition is improved.
[0031] Furthermore, in S7, the fusion classification of deep features of speech and video is realized in the bidirectional long short-term memory network (Bi-LSTM) that introduces the efficient channel attention mechanism ECA. The deep features of speech modality and video modality are classic features with time sequence, and both have time sequence features in the context. The long short-term memory network (LSTM) is a recurrent neural network, which is very suitable for processing signals on sequences. However, the traditional unidirectional long short-term memory network (LSTM) can only learn from one direction. In order to solve the problem that both features have contextual connections and cause feature loss when using a unidirectional long short-term memory network, a bidirectional long short-term memory network (Bi-LSTM) model is used for bimodal fusion. The bidirectional long short-term memory network (Bi-LSTM) network can obtain the correlation information between features and previous and next features, obtain deep fusion features with richer features, and improve the recognition accuracy of the model. In addition, the efficient channel attention mechanism (ECA) is added before the network forward and reverse input. Its main advantage is that it has high computational efficiency and does not require a lot of additional calculations, which improves the perception ability of deep neural networks for important features. Further improve model recognition efficiency and accuracy.
[0032] Furthermore, the efficient channel attention mechanism (ECA) is an improved form of the channel dimension added attention mechanism (SENet). SE first uses global average pooling for each channel independently, and then uses two fully connected (FC) layers with nonlinearity, followed by a sigmoid function to generate channel weights. The ECA attention mechanism is an improvement on the SENet channel attention mechanism, removing the fully connected layer and adding a one-dimensional convolution layer after the global average pooling. After the channel global average pooling without dimensionality reduction, ECANet uses one-dimensional convolution to achieve cross-channel information interaction, and the size of the convolution kernel k is adapted by the function. Where C represents the channel dimension, setting b=1, γ=2, the convolution kernel k can be expressed as follows:
[0033]
[0034] The ECA attention mechanism is suitable for deep learning tasks that require improving the network's ability to model input features, and has obvious advantages when processing large-scale video data. The deep features of the speech modality and the deep features of the video modality are used through the ECA attention mechanism to enhance the network's ability to model input features, help the network better capture the relationship between features, effectively improve training efficiency during network model training, and improve the accuracy of model training.
[0035] The beneficial effects of the present invention are as follows: In view of the problem that single-modal emotion recognition features of speech are missing and that feature-level methods do not consider the inter-modal correlation features, a model-level fusion bi-modal emotion recognition method based on speech and video dynamic features is proposed to better learn the multi-modal interaction within the model and give full play to the advantages of deep neural networks. A model-level method is adopted to realize the fusion of speech and video features and to mine the inter-modal correlation features. The problem of missing temporal features caused by emotion recognition based on static features of images is solved. Human body movements in videos can fully reflect emotional characteristics, and the deep features of human body movements are extracted as video dynamic features. The problem that facial expressions are difficult to extract in real life is solved. When the number of Mel-frequency cepstral coefficients (MFCC coefficients) is 40, the emotion recognition effect is the best, and the model with the highest accuracy is obtained, which provides data support for selecting the appropriate number of Mel-frequency cepstral coefficients (MFCC coefficients) for accurate emotion recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart for extracting Mel frequency cepstral coefficients (MFCC coefficients);
[0037] Figure 2 Flowchart for deep feature extraction of speech;
[0038] Figure 3 Flowchart for video dynamic feature extraction;
[0039] Figure 4 It is the model-level feature fusion flow chart;
[0040] Figure 5 The network structure and data flow diagram of the time-delay neural network ECAPA-TDNN;
[0041] Figure 6 It is the network framework diagram of the three-dimensional residual network 3D-Resnet;
[0042] Figure 7 This is the framework diagram of the fusion network ECA-BiLSTM;
[0043] Figure 8 This is a model-level bimodal network model framework diagram;
[0044] Fig. 9 This is a comparison chart of emotion recognition accuracy based on different modalities and network structures;
[0045] Fig.10 The following is a comparison chart of the recognition accuracy of different modes under different numbers of MFFC coefficients. DETAILED DESCRIPTION
[0046] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0047] refer to Figure 7 , the present invention fuses two modalities by using model-level fusion. Model-level fusion is a method of inputting features extracted from different modalities into a neural network to output mixed deep features. Feature-level fusion is a method of connecting features extracted from different modalities into a single high-dimensional feature vector. Decision-level fusion refers to independently completing classification and recognition on each modality, and performing weighted calculation on the results of each modality to make a global optimal decision. In decision-level fusion, each modality is independent in the process of outputting prediction results, and the correlation information of features between modalities is not linked. Feature-level fusion only performs ordinary splicing and fusion compared to decision-level fusion. Model-level fusion can capture the correlation between different modalities, obtain more information, and achieve higher accuracy in emotion recognition.
[0048] In order to explore the impact of the number of speech features on emotion recognition, the number of Mel-frequency cepstral coefficients (MFCC coefficients) was adjusted to 20, 40 and 60, and the best emotion recognition effect was obtained when the number was 40.
[0049] The present invention provides a model-level fusion dual-modal emotion recognition method based on speech and video dynamic features, comprising:
[0050] S1: Divide the data set into different folders according to different emotion types, and the folders of different emotion types are divided into subfolders and the speech signals corresponding to the emotion types are stored in WAV file format; the subfolders contain a video, and the stored content is a video frame;
[0051] S2: Preprocess the speech signal stored in WAV format, extract the three features of Mel frequency cepstral coefficient MFCC, fundamental frequency and root mean square energy in the speech signal, and use the np.concatenate function in Python to concatenate the three features to obtain the speech mixed feature, specifically,
[0052] Match the voice signal with the video file in the subfolder according to the file name;
[0053] The separated speech signal is processed by noise reduction to obtain a relatively pure speech signal;
[0054] Specaug is used as a data enhancer to enhance the speech signal, so as to achieve a series of random transformations on the input data during the training phase, thereby increasing the generalization ability of the model and improving the robustness of the model.
[0055] The enhanced speech signal is randomly cropped and padded according to the preset speech signal length. If it is greater than the preset length, it is cropped and only the speech signal in the cropped area is retained; if it is less than or equal to the preset length, zero padding operation is performed to make the speech signal reach the specified length.
[0056] The Mel frequency cepstral coefficients (MFCC) are extracted from the speech signal that reaches the specified length after preprocessing using the librosa library in Python.
[0057] The fundamental frequency pitch is extracted using the librosa library: first, the short-time Fourier transform (STFT) is performed on the speech signal of the specified length, and then the pitch tracking algorithm piptrack provided by librosa is used to calculate the corresponding pitch value of each frame of the speech signal, and the pitch value is limited to between 70Hz and 400Hz; the pitch value of the speech signal is formed into a NumPy array in the Python language and reshaped into a single-column shape;
[0058] Use the librosa library to extract the root mean square features: first, perform short-time Fourier transform (STFT) on the speech signal that reaches the specified length, then calculate the amplitude and phase components represented by the short-time Fourier transform (STFT) and generate an amplitude spectrum. Use the librosa.feature.rms function to calculate the root mean square (RMS) energy of each frame of the amplitude spectrum to obtain the root mean square features of the speech signal.
[0059] S3: Preprocess the video to obtain multiple single-frame images of the video; specifically,
[0060] Get video frames from the video file, and intercept video frames according to the specified speaker position and video frame rate, and save the video frames as jpeg files. Each video segment forms a folder, and the folder stores all the video frame images intercepted for the video;
[0061] The video frame is fixed to 112*112 by scaling and center cropping, and then normalized.
[0062] S4: The Adam optimizer is used to train the network model; the network model structure includes the time-delay neural network ECAPA-TDNN, the three-dimensional residual network 3D-Resnet and the bidirectional long short-term memory network Bi-LSTM;
[0063] The model training parameters are set as follows: batch size is 16, loss function is CrossEntropyLoss, and the Adam optimizer with the initial learning rate set to 0.001 is used; an experimental dataset containing deep speech features and deep video dynamic features is obtained, and the experimental dataset is divided into a training set and a test set. The training set is 80% of the dataset, and the remaining 20% is used as a test set for 70 rounds of training; the network input is a continuous frame composed of 112*112 pixel video frame images and the Mel-frequency cepstral coefficients, fundamental frequency and root mean square speech mixed features extracted from the speech signal, where the Mel-frequency cepstral coefficients are set to 20, 40 and 60 respectively.
[0064] S5: Input the speech mixture features into the trained time-delay neural network ECAPA-TDNN model to obtain the speech modality deep features. Specifically,
[0065] ECAPA-TDNN is improved and extended based on TDNN (Time-delay Neural Network), including convolutional layer, Relu activation function, full connection layer, and Res2Blocks excitation module;
[0066] Among them, the Res2Blocks excitation module is a module structure obtained by combining Res2Net and SENet.
[0067] The obtained mixed features of speech signals are input into ECAPA-TDNN, and feature mapping is realized through convolutional layers, Relu activation functions, and fully connected layers. The Res2Blocks excitation module is a module structure obtained by combining Res2Net and SENet, and the network structure is named SE-Res2Block. SENet (Squeeze-and-Excitation Networks) maps each feature channel of a feature map to a value, and the feature map is mapped to a vector with the same length as the number of feature channels. Res2Net divides the feature map after 1×1 convolution by the number of feature channels to obtain feature maps of the same scale. The first feature map is retained, and 3×3 convolution is performed from the second feature map, and the convolution result of the feature map is obtained, and a residual connection is performed with the next feature map, and the next feature map is further convolved with 3×3. Finally, a 1×1 convolution is performed. The network structure of ECAPA-TDNN contains 3 SE-Res2Block modules and residual connections are performed. The output feature maps of all SE-Res2Blocks are connected. After multi-layer feature aggregation, the dense layer processes the connected information and generates features of the attention statistical pool. Finally, the deep features of speech are obtained through the full connection layer and classifier. The addition of SE-Res2Blocks modules and residual links effectively improves the training effect and inference performance of the model.
[0068] S6: Input the preprocessed video frames into the 3D residual network 3D-Resnet to obtain the deep features of the video modality; specifically,
[0069] The 3D-Resnet network is an improvement based on the resnet network for 2D image classification. It consists of five parts: 3D convolution layer, residual block, pooling layer, global average pooling layer and full connection layer. The network inputs a video clip consisting of L RGB frames with a pixel size of 112×112, and uses a 3D convolution layer to extract spatiotemporal features on the video. The first convolution layer implements spatial downsampling, and three spatiotemporal downsamplings with a convolution stride of 2×2×2 are used in the 3rd, 4th and 5th convolution layers. The network contains a residual block structure with two 3D convolution layers and skip connections. The skip connection directly adds the input to the output of the residual block to solve the problem of gradient disappearance in deep neural networks. The 3D-Resnet network is used to obtain deep features of the video modality, increase the temporal modality, and enrich the video modality features, so that more emotional feature representations are obtained and the accuracy of emotion recognition is improved.
[0070] S7: The deep features of the speech modality and the deep features of the video modality are fused at the model level, the fused features are input into the bidirectional long short-term memory network Bi-LSTM, and the emotion recognition is realized through the classification output of the model's fully connected layer.
[0071] The fusion classification of deep features of speech and video is realized in the bidirectional long short-term memory network (Bi-LSTM) with the introduction of efficient channel attention mechanism ECA. The deep features of speech modality and video modality are classic features with time sequence, and both have time sequence features in the context. Long short-term memory network (LSTM) is a recurrent neural network, which is very suitable for processing signals on sequences. However, the traditional unidirectional long short-term memory network (LSTM) can only learn from one direction. In order to solve the problem that both features have contextual connections, which leads to feature loss when using unidirectional long short-term memory network, the bidirectional long short-term memory network (Bi-LSTM) model is used for bimodal fusion. The bidirectional long short-term memory network (Bi-LSTM) network can obtain the correlation information between features and previous and next features, obtain deep fusion features with richer features, and improve the recognition accuracy of the model. The efficient channel attention mechanism (ECA) is added before the forward and reverse input of the network. Its main advantage is high computational efficiency, does not require a lot of additional calculations, and improves the perception ability of deep neural networks for important features. Further improve the recognition efficiency and accuracy of the model. Efficient Channel Attention (ECA) is an improved form of the Channel Dimension Added Attention (SENet). SE first uses global average pooling for each channel independently, then uses two fully connected (FC) layers with nonlinearity, followed by a sigmoid function to generate channel weights. The ECA attention mechanism is an improvement on the SENet channel attention mechanism, removing the fully connected layer and adding a one-dimensional convolution layer after the global average pooling. After the channel global average pooling without dimensionality reduction, ECANet uses one-dimensional convolution to achieve cross-channel information interaction, and the size of the convolution kernel k is adapted by the function, where c represents the channel dimension. The convolution kernel k can be expressed as follows:
[0072]
[0073] The ECA attention mechanism is suitable for deep learning tasks that require improving the network's ability to model input features, and has obvious advantages when processing large-scale video data. The deep features of the speech modality and the deep features of the video modality are used through the ECA attention mechanism to enhance the network's ability to model input features, help the network better capture the relationship between features, effectively improve training efficiency during network model training, and improve the accuracy of model training.
[0074] In the forward calculation of the long short-term memory (LSTM) unit, the Hadamard product operation is used to combine the memory state of the previous sequence unit and the amount of memory retention of the current unit to calculate the memory state of the current unit. The results output by the model can more comprehensively and accurately collect the characteristics of speech in time sequence.
[0075] The specific formula of positive long short-term memory (LSTM) is as follows:
[0076] Input gate: i t =σ(W ix x t +W ih h t-1 +b i )
[0077] Forget gate: f t =σ(W fx x t +W fh h t-1 +b f )
[0078] Cell status update:
[0079] Cell Status:
[0080] Output gate: o t =σ(W ox x t +W oh h t-1 +b o )
[0081] Hidden state: h t =o t ⊙tanh(C t )
[0082] The reverse part is that the memory state of the next unit affects the memory state of the current unit, and the calculation method is the same as the forward long short-term memory (LSTM). The reverse long short-term memory (LSTM) formula is as follows:
[0083] Input gate: i' t =σ(W' ix x t +W' ih h' t+1 +b' i )
[0084] Forget gate: f t '=σ(W' fx x t +W' fh h' t+1 +b' f )
[0085] Cell status update:
[0086] Cell Status:
[0087] Output gate: o' t =σ(W' ox x t +W' oh h' t+1 +b' o )
[0088] Hidden state: h' t =o' t ⊙tanh(C' t )
[0089] Specific implementation method: For S1: divide the data set according to six emotions: angry, happy, calm, sad, frustrated and excited, and divide all video and voice information containing the emotions into different folders.
[0090] For S2: Reference Figure 1 Mel frequency cepstral coefficients (MFCC coefficients) are commonly used speech features in emotion recognition. Since the human ear's perception of speech frequency is nonlinear, the ordinary frequency is converted into Mel frequency. The Mel frequency cepstral coefficients (MFCC coefficients) use a triangular filter bank to simulate the basilar membrane frequency division characteristics of the human ear. The formula is as follows.
[0091]
[0092] In the presence of noise interference, the use of Mel Frequency Cepstral Coefficient (MFCC coefficient) features will lead to a decrease in emotion recognition rate and a weakened resolution in high-frequency areas. At the same time, since the fundamental frequency is related to the speaker's tone, it plays an important role in understanding the meaning of language and emotional expression. For the same text, the fundamental frequency changes under different emotions, so the fundamental frequency features in a piece of speech are extracted. At the same time, when the emotion changes, the intensity of the speech also changes. The root mean square features of the speech are extracted to form new mixed features.
[0093] For S3: the specific steps for preprocessing video frames are:
[0094] Get video frames from a video file. Read the video file and capture the video frames according to the specified speaker position and video frame rate. Save the video frames as jpeg files. Fix the pixel size of each video frame to 112*112 by scaling and center cropping. Then normalize the image.
[0095] For S4: The CPU used in the experiment is Intel(R) Xeon(R) Platinum 8350C CPU@2.60GHz, the GPU is NVIDIA GeForce RTX 3090Ti, and it runs in Python3.9, Torch=1.12.1, librosa=0.9.1 environment. The network is trained with the batch size of 16, the CrossEntropyLoss loss function, and the Adam optimizer with the initial learning rate set to 0.001. The experimental dataset is divided into two parts, 0.8 of the dataset is taken as the training set, and the remaining 0.2 is used as the test set. The network input is the Mel frequency cepstral coefficients, fundamental frequency, and root mean square mixed features of MFCC coefficients 20, 40, and 60 extracted from the speech signal. The number of training rounds is 70.
[0096] refer to Figure 2 , Figure 5 , the fundamental frequency feature, Mel frequency cepstral coefficient (MFCC coefficient) feature and root mean square feature are spliced and fused to obtain the speech mixed feature, which contains both the periodic information and spectrum feature of the speech signal. The speech mixed feature is input into the time delay neural network ECAPA-TDNN network to obtain more accurate speech depth features. Through the learning and optimization of the neural network model, the mapping from the original speech signal to the high-level abstract features can be achieved.
[0097] refer to Figure 3 , Figure 6 ,3D-Resnet is a model based on three-dimensional convolutional neural network (3D CNN), ,which extracts features for each frame of the video sequence, and can ,accurately capture subtle changes in human movements in the video, ,greatly improves the accuracy of subsequent emotion recognition.
[0098] refer to Figure 4 , Figure 7 , Figure 8 The deep features extracted by the two neural networks are fused at the model level using a bidirectional long short-term memory network (Bi-LSTM) model, and an efficient channel attention mechanism (ECA) is added before the network forward and reverse input. The efficient channel attention mechanism (ECA) is an improved form of the channel attention mechanism. It improves the efficiency of neural network training and the perception of important features of deep neural networks. It also improves the recognition accuracy of the model.
[0099] refer to Figure 8 The entire network framework training process outputs the emotion recognition results. The test results of evaluating the stabilized training model on the test set are shown in the following table, and the accuracy comparison chart is as follows: Fig. 9 , Fig.10 shown.
[0100] Table 1 shows the emotion recognition accuracy of different modalities and network structures (%)
[0101] Table 1 Emotion recognition accuracy of different modalities and network structures
[0102] Modal Selection Network structure Lie detection accuracy Voice + Video Ecapa-Tdnn+3D-Resnet+ECALSTM 82.1% Voice + Video Ecapa-Tdnn+3D-Resnet+LSTM 80.6% Voice + Video Ecapa-Tdnn+3D-Resnet+FC 78.6% video 3D-Resnet+FC 65.4% voice Ecapa-Tdnn+FC 56.7%
[0103] Table 2 shows the recognition accuracy of different modes under different numbers of MFFC coefficients (%)
[0104] Table 2 Recognition accuracy of different modalities under different numbers of MFFC coefficients (%)
[0105]
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A dual-modal emotion recognition method based on voice and video posture dynamic model-level fusion features, Features: The following steps are included: S1: Divide the data set into different folders according to different emotion types, and the folders of different emotion types are divided into subfolders and the speech signals corresponding to the emotion types are stored in WAV file format; the subfolders contain a video, and the stored content is a video frame; S2: Preprocess the speech signal stored in WAV format, extract the three features of Mel frequency cepstral coefficient MFCC, fundamental frequency and root mean square energy in the speech signal, and concatenate and fuse the three features to obtain speech mixed features; S3: Preprocess the video to obtain multiple video single frame images; S4: The Adam optimizer is used to train the network model; the network model structure includes the time-delay neural network ECAPA-TDNN, the three-dimensional residual network 3D-Resnet and the bidirectional long short-term memory network Bi-LSTM; S5: Input the speech mixture features into the trained time-delay neural network ECAPA-TDNN model to obtain the deep features of the speech modality; S6: Input the preprocessed video frames into the 3D residual network 3D-Resnet to obtain the deep features of the video modality; S7: The deep features of the speech modality and the deep features of the video modality are fused at the model level, the fused features are input into the bidirectional long short-term memory network Bi-LSTM, and the emotion recognition is realized through the classification output of the model's fully connected layer.
2. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: Preprocess the speech signal, specifically, Separate and correspond the voice signals to the video files in the subfolders according to the file names; The separated corresponding speech signals are subjected to noise reduction processing to obtain pure speech signals; Use specaug as data enhancer to enhance speech signals; To achieve a series of random transformations on the input data during the training phase; The enhanced speech signal is randomly cropped and padded according to the preset speech signal length so that the speech signal reaches the preset specified length.
3. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: The extraction of the three features in step S2 is specifically as follows: 1) Extract the Mel frequency cepstral coefficients MFCC from the preprocessed speech signal using the librosa library in Python; 2) Extract the fundamental frequency pitch using the librosa library: First, perform short-time Fourier transform (STFT) on the speech signal of the specified length, and then use the pitch tracking algorithm piptrack provided by librosa to calculate the corresponding pitch value of each frame of the speech signal, and the pitch value is limited to between 70Hz and 400Hz; form a NumPy array of the pitch value of the speech signal in the Python language and reshape it into a single-column shape; 3) Use librosa library to extract RMS features: First, perform short-time Fourier transform (STFT) on the speech signal of the specified length, then calculate the amplitude and phase components represented by the short-time Fourier transform (STFT) and generate an amplitude spectrum. Use librosa.feature.rms function to calculate the RMS energy of each frame of the amplitude spectrum to obtain the RMS features of the speech signal.
4. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: The specific steps for preprocessing the video frames in S3 are: Get video frames from the video file, and intercept video frames according to the specified speaker position and video frame rate, and save the video frames as jpeg files. Each video segment forms a folder, and the folder stores all the video frame images intercepted for the video; The video frame is fixed to 112*112 pixels by scaling and center cropping, and then normalized.
5. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: In S4, the training parameters are set as follows: batch size is 16, loss function is CrossEntropyLoss, and the Adam optimizer is used with the initial learning rate set to 0.001; Obtain an experimental dataset containing deep speech features and deep video dynamic features, and divide the experimental dataset into a training set and a test set. The training set is 80% of the dataset, and the remaining 20% is used as a test set. Train for 70 rounds. The network inputs are continuous frames consisting of 112*112 pixel video frames and speech mixed features of Mel frequency cepstral coefficients, fundamental frequency and root mean square extracted from speech signals, where the Mel frequency cepstral coefficients are set to 20, 40 and 60 respectively.
6. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: The ECAPA-TDNN in S5 is improved and extended based on TDNN, including convolutional layers, Relu activation functions, fully connected layers, and Res2Blocks excitation modules; The obtained speech signal mixed features are input into ECAPA-TDNN, and feature mapping is achieved through convolutional layers, Relu activation functions, and fully connected layers; the Res2Blocks excitation module is a module structure obtained by combining Res2Net and SENet, and the network structure is named SE-Res2Block; The network structure of the ECAPA-TDNN contains three SE-Res2Block modules and performs residual connections; the output feature maps of all SE-Res2Blocks are connected, and after multi-layer feature aggregation, the dense layer processes the connected information to generate features of the attention statistical pool; finally, the deep features of the speech are obtained through the full connection layer and the classifier.
7. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: The three-dimensional residual network 3D-Resnet in S6 is improved based on the resnet network for processing 2D image classification. It consists of five parts: 3D convolution layer, residual block, pooling layer, global average pooling layer and full connection layer. The network inputs a video clip consisting of L RGB frames with a pixel size of 112×112, and uses a 3D convolution layer to extract spatiotemporal features on the video. Spatial downsampling is implemented in the first convolution layer, and three spatiotemporal downsamplings with a convolution stride of 2×2×2 are used in the 3rd, 4th and 5th convolution layers. The network contains a residual block structure with two 3D convolution layers and jump connections. The jump connection directly adds the input to the output of the residual block.
8. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: In S7, the fusion classification of deep features of speech and video is realized in the bidirectional long short-term memory network Bi-LSTM that introduces the efficient channel attention mechanism ECA; the bidirectional long short-term memory network (Bi-LSTM) network is used to obtain the correlation information between the feature and the previous and next features, and then obtain the deep fusion feature.
9. A dual-modal emotion recognition method based on voice and video gesture dynamic model-level fusion features as claimed in claim 1, Features: The efficient channel attention mechanism ECA is an improvement on the SENet channel attention mechanism. It removes the fully connected layer and adds a one-dimensional convolution layer after the global average pooling. After the global average pooling of the channel without dimensionality reduction, ECANet uses one-dimensional convolution to realize cross-channel information interaction, and the size of the convolution kernel k is self-adapted through the function, where C represents the channel dimension, b = 1, γ = 2, and the convolution kernel k can be expressed by the following formula:
Citation Information
Cited By
Speech emotion recognition method based on diffusion enhancement and multi-granularity feature fusion
CN119296588A
