A multimodal emotion recognition method and device

Through segmentation processing of long sequence audio and video information and multi-head emotional attention mechanism calculation, multi-modal joint emotional features are constructed, which solves the problem of difficulty in analyzing long sequence audio and video information in the existing technology and improves the stability of emotion recognition. reliability and real-time performance.

CN117763446BActive Publication Date: 2024-08-23SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311795668.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2024-08-23
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

The existing technology is difficult to analyze long sequences of audio and video information and adapt information between modalities, and cannot effectively capture the correlation and difference between modalities.

Method used

Using a multi-modal emotion recognition method, the long sequence of audio and video information is segmented and input into the audio feature encoder and video feature encoder respectively, extracting the segment-level feature sequence, and using the audio-visual encoder and the multi-head emotional attention mechanism to calculate the model. weighted feature sequence between states to construct multi-modal joint emotional features.

Benefits of technology

It realizes emotion recognition of long sequences of audio and video information, improves the stability and real-time recognition performance of emotion recognition, and makes full use of the contextual information and emotional correlation between modalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117763446B
    Figure CN117763446B
Patent Text Reader

Abstract

The present invention relates to the field of emotion recognition technology, and in particular to a multimodal emotion recognition method and device, comprising: after pre-segmenting long sequence audio and video information, respectively inputting audio and video feature codes to extract audio and video segment-level feature sequences; connecting the audio and video segment-level feature sequences and mapping them through a fully connected layer to obtain segment-level emotion similarity feature sequences; using each segment-level emotion similarity feature sequence query element, each audio and video segment-level feature sequence as a key element and a value element, and outputting an audio and video segment-level emotion weighted feature sequence through a multi-head attention mechanism; using a center mapping function to respectively calculate the audio and video weighted center vector and the center vector of the emotion similarity information, and merging them to construct a multimodal joint emotion feature; and performing emotion recognition on the multimodal joint emotion feature. The present invention makes full use of the context information of the input data, enhances the real-time recognition performance of the multimodal emotion recognition model, and improves the stability of emotion recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of emotion recognition technology, and in particular to a multimodal emotion recognition method and device. Background Art

[0002] In modern society, emotions play a vital role in interpersonal communication. Through in-depth research on emotion recognition technology, we can better understand and respond to human emotional needs, thereby promoting the development of social interaction, medical diagnosis, education and other fields. For example, in the medical field, emotion recognition technology can be used to help doctors identify the emotional state of patients and provide better treatment for patients. In the field of education, emotion recognition technology can be used to evaluate the emotional state of students and provide more precise help for education.

[0003] In the past, traditional emotion recognition methods mainly focused on single-modal information research, but the information expression ability of a single modality is relatively limited. Therefore, with the development of deep learning technology and the popularization of smart devices, multimodal emotion recognition technology has become one of the current research hotspots in the field of computer science. Multimodal emotion recognition technology is a technology that uses multiple sensor data (such as images, audio, text, etc.) and deep learning methods to recognize people's emotional states. Compared with traditional single-modal emotion recognition technology, multimodal emotion recognition technology can capture a variety of emotional information expressed by the speaker's facial expressions, voice, text, etc., so as to more accurately analyze people's emotional states.

[0004] In multimodal emotion recognition technology, due to the complementarity between different modalities, the fusion strategy of inter-modal features is crucial. So far, some studies have explored various multimodal fusion strategies. For example, Zhang et al. simply combined the feature vectors between different modalities at the feature layer to perform emotion fusion to make full use of the emotional information in each modality. However, the method of simply combining feature layers is often not easy to capture the correlation and difference between modalities. Therefore, how to make full use of inter-modal information and create a more efficient joint emotional feature space is still an urgent problem to be solved. To address this problem, Wei et al. used a deep separable convolutional model based on multi-attention and an audio-visual domain adaptation learning paradigm (AVDAL) to transfer emotional knowledge between video and audio modalities. This method supplements and enhances the emotional features extracted only from a single modality through the constructed audio-visual emotional identification space. However, the input of this method only considers short-term data of fixed duration, and cannot analyze and recognize emotions of long sequences of audio and video information. Summary of the invention

[0005] To this end, the technical problem to be solved by the present invention is to overcome the problem in the prior art that long sequences of audio and video information cannot be analyzed and the difficulty in adapting information between modalities.

[0006] In order to solve the above technical problems, the present invention provides a multimodal emotion recognition method, comprising:

[0007] Inputting a long sequence of audio and video information into a pre-trained multimodal emotion recognition model, wherein the multimodal emotion recognition model includes an audio feature encoder, a video feature encoder, an audio-visual encoder, and a multi-head emotion attention mechanism;

[0008] Pre-segment the long sequence of audio and video information, input the segmented audio and video information into the audio feature encoder and the video feature encoder respectively, and extract the audio segment-level feature sequence and the video segment-level feature sequence;

[0009] Input the audio segment-level feature sequence and the video segment-level feature sequence into an audio-visual encoder, connect the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence in sequence to obtain a segment-level audio-video fusion feature sequence; map each fusion representation vector in the segment-level audio-video fusion feature sequence through a fully connected layer to obtain a segment-level emotional similarity feature sequence;

[0010] The audio segment-level feature sequence, video segment-level feature sequence and segment-level emotion similarity feature sequence are input into the multi-head emotion attention mechanism; each segment-level emotion similarity feature sequence is used as the query element in the cross-attention mechanism, and each audio segment-level feature sequence is used as the key element and the value element, and the emotion attention weight of each audio segment-level feature sequence is calculated through the multi-head attention mechanism, and the audio segment-level emotion weighted feature sequence is output; each segment-level emotion similarity feature sequence is used as the query element, and each video segment-level feature sequence is used as the key element and the value element, and the emotion attention weight of each video segment-level feature sequence is calculated through the multi-head attention mechanism, and the video segment-level emotion weighted feature sequence is output;

[0011] The center mapping function is used to average all audio segment-level emotion weighted feature sequences and all video segment-level emotion weighted feature sequences to obtain long-sequence audio weighted center vectors and video weighted center vectors; the segment-level emotion similarity feature sequences are averaged to obtain the center vector of emotion similarity information; the audio weighted center vector, the video weighted center vector and the center vector of emotion similarity information are combined to construct a multimodal joint emotion feature;

[0012] The multimodal joint emotion feature is input into the fully connected layer for emotion prediction, and is converted into the corresponding emotion probability distribution through the Softmax activation function, and the emotion with the highest probability is taken as the target emotion.

[0013] In one embodiment of the present invention, the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence are sequentially connected to obtain a segment-level audio-video fusion feature sequence; each fusion representation vector in the segment-level audio-video fusion feature sequence is mapped through a fully connected layer to obtain a segment-level emotional similarity feature sequence F s , the calculation formula is:

[0014] F s

[0015] =[Concat(F a (1),F v (1)),Concat(F a (2),f v (2)),…,Concat(F a (l),F v (l))]W s

[0016] in, is the audio segment level feature sequence, is the video segment level feature sequence, is the weight matrix in the fully connected layer, f a and f v are the dimensions of the segment-level feature sequences of audio and video respectively, and l represents the number of audio and video segments.

[0017] In one embodiment of the present invention, the segment-level emotion similarity feature sequences, the audio segment-level feature sequences and the video segment-level feature sequences are positionally encoded before being input into the multi-head attention mechanism.

[0018] In one embodiment of the present invention, the formula for outputting the audio and video segment-level sentiment weighted feature sequence through the multi-head attention mechanism is:

[0019]

[0020] F' a|v =Concat(Attention1,Attention2,…,Attention h )·W O +F a|v

[0021] Among them, F' a is the audio segment-level sentiment weighted feature sequence, F' v is the video segment-level sentiment weighted feature sequence, F a is the audio segment level feature sequence, F v is the video segment level feature sequence, F s is the segment-level sentiment similarity feature sequence, W Q,W K ,W V and W O represents the learnable parameter matrix, d k is the dimension of each attention head in the multi-head attention mechanism, and h is the number of attention heads in the multi-head attention mechanism.

[0022] In one embodiment of the present invention, the audio weighted center vector, the video weighted center vector and the center vector of the emotion similarity information are combined to construct a formula for a multimodal joint emotion feature F:

[0023]

[0024] Among them, F' a is the audio segment-level sentiment weighted feature sequence, F' v is the video segment-level sentiment weighted feature sequence, F s is the segment-level sentiment similarity feature sequence, Represents the center mapping function, which is used to calculate the weighted arithmetic mean.

[0025] In one embodiment of the present invention, the audio feature encoder comprises:

[0026] The Mel-frequency cepstral coefficient map of speech information is used as input, and is input into three parallel time domain convolution blocks, frequency domain convolution blocks and fusion convolution blocks respectively. The time domain convolution blocks, frequency domain convolution blocks and fusion convolution blocks respectively extract time domain features, frequency domain features and correlation features in the time and frequency domains by controlling the receptive field size of the current channel in the time and frequency domain of the Mel-frequency cepstral coefficient map, and output a time domain feature map, a frequency domain feature map and a time and frequency domain fusion feature map and connect them;

[0027] The concatenated feature maps are passed through multiple multi-scale residual convolution blocks for dimensionality reduction, and an audio segment-level feature sequence is output.

[0028] In one embodiment of the present invention, the structures of the time domain convolution block, the frequency domain convolution block and the fused convolution block all include a convolution layer, a rectified linear unit, a batch normalization layer and a pooling layer; wherein the convolution kernel size of the time domain convolution layer is 11×1, the convolution kernel size of the frequency domain convolution layer is 1×9, and the convolution kernel size of the fused convolution layer is 3×3.

[0029] In one embodiment of the present invention, the multi-scale residual convolution block includes two parallel convolution layers with convolution kernel sizes of 3×3 and 5×5 respectively. The input feature map is subjected to feature extraction through the two convolution layers respectively. The outputs of the two parallel convolution layers are added to the input feature map and then connected. Then, the audio segment-level feature sequence is output after passing through a batch normalization layer, a rectified linear unit and a pooling layer.

[0030] In one embodiment of the present invention, the video feature encoder adopts a 50-layer residual convolution structure.

[0031] The present invention also provides a multimodal emotion recognition device, comprising:

[0032] The audio and video encoding module is used to pre-segment the long sequence of audio and video information, input the segmented audio and video information into the audio feature encoder and the video feature encoder respectively, and extract the audio segment level feature sequence and the video segment level feature sequence respectively;

[0033] The inter-modal sentiment similarity calculation module is used to sequentially connect the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence to obtain a segment-level audio-video fusion feature sequence; each fusion representation vector in the segment-level audio-video fusion feature sequence is mapped through a fully connected layer to obtain a segment-level sentiment similarity feature sequence;

[0034] The segment-level feature attention and fusion module is used to use the segment-level sentiment similarity feature sequences as query elements in the cross-attention mechanism, and the audio segment-level feature sequences as key elements and value elements, and calculate the sentiment attention weight of each audio segment-level feature sequence through the multi-head attention mechanism, and output the audio segment-level sentiment weighted feature sequence; use the segment-level sentiment similarity feature sequences as query elements, and the video segment-level feature sequences as key elements and value elements, and calculate the sentiment attention weight of each video segment-level feature sequence through the multi-head attention mechanism, and output the video segment-level sentiment weighted feature sequence;

[0035] The bimodal emotion feature fusion module is used to use the center mapping function to average all audio segment-level emotion weighted feature sequences and all video segment-level emotion weighted feature sequences to obtain long-sequence audio weighted center vectors and video weighted center vectors; average the segment-level emotion similarity feature sequences to obtain the center vector of emotion similarity information; merge the audio weighted center vector, the video weighted center vector and the center vector of emotion similarity information to construct a multimodal joint emotion feature;

[0036] The classification module is used to input the multimodal joint emotion features into the fully connected layer for emotion prediction, convert them into corresponding emotion probability distribution through the Softmax activation function, and take the emotion with the highest probability as the target emotion.

[0037] The above technical solution of the present invention has the following advantages compared with the prior art:

[0038] The multimodal emotion recognition method described in the present invention extracts segment-level feature sequences from long-sequence audio and video information, fuses the segment-level feature sequences of each modality, and extracts the emotion similarity information between modalities. The weighted feature sequences of each modality are calculated using the emotion similarity information between modalities, and the center vector of the long-sequence audio and video information is further calculated using the weighted feature sequences of each modality. After being fused with the emotion similarity information between modalities, a multimodal joint emotion feature is constructed. On the basis of retaining the characteristics of the modalities themselves, the emotion correlation and diversity between modalities are considered, and the contextual information of the input data is fully utilized to enhance the real-time recognition performance of the multimodal emotion recognition model. Finally, emotion recognition is performed based on the multimodal joint emotion feature. The present invention realizes emotion recognition of long-sequence audio and video information, and on this basis improves the stability of emotion recognition.

[0039] The multimodal emotion recognition method described in the present invention also designs an audio encoder and a video encoder respectively. The audio encoder not only extracts the time domain features, frequency domain features and time-frequency domain correlation features of the audio signal, but also uses multi-scale residual convolution to reduce the dimension of the high-dimensional feature map, effectively retaining the characteristics of the original input information, thereby extracting more discriminative emotional features from the audio information. The video encoder adopts a residual convolution structure, which can effectively capture the facial details in the video frame and the changes in the frame data on the time scale, thereby extracting rich visual emotional clues. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein

[0041] Figure 1 is a flow chart of a multimodal emotion recognition method of the present invention;

[0042] Figure 2 is the structural diagram of the audio coding feature generator, where Figure 2 (a) is the structural diagram of the audio feature encoder. Figure 2 (b) is a multi-channel feature map extraction structure diagram in the audio feature encoder. Figure 2 (c) in the figure is a diagram of the multi-scale feature dimensionality reduction structure in the audio feature encoder.

[0043] Figure 3 is a block diagram of an audio-visual encoder;

[0044] Figure 4 This is the structural diagram of the multi-head emotional attention mechanism;

[0045] Figure 5 is the t-SNE visualization of the joint sentiment feature space, where Figure 5(a) is the t-SNE visualization of the joint sentiment feature space of the training set. Figure 5 (b) is the t-SNE visualization of the joint sentiment feature space of the test set;

[0046] Figure 6 This is a comparison chart of real-time recognition performance before and after adding the inter-segment center vector mapping method. Figure 6 (a) is the real-time recognition performance diagram before adding the inter-segment center vector mapping method. Figure 6 (b) is the real-time recognition performance diagram after adding the inter-segment center vector mapping method;

[0047] Figure 7 It is a structural diagram of a multimodal emotion recognition device of the present invention. DETAILED DESCRIPTION

[0048] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0049] Embodiment 1

[0050] Reference Figure 1 As shown, the present invention provides a multimodal emotion recognition method, constructs a multimodal emotion recognition model, and is named MIFSANet (Multimodal Inter-Segment Fusion with SimilaritySpatial Assistance). The model first extracts the audio and video segment-level feature sequence from the audio and video information after preprocessing and segmentation through the audio and video feature encoder; then performs multimodal emotion similarity space mapping, extracts the emotion similarity information between the two modes, and outputs the segment-level emotion similarity feature sequence; then, based on the context information and emotion similarity information, calculates the audio and video segment-level emotion weighted feature sequence, and respectively calculates the audio and video weighted center vector and the center vector of the emotion similarity information; after fusing the center vectors, a multimodal joint emotion feature is obtained; finally, the multimodal joint emotion feature is sent to the classifier for emotion recognition.

[0051] The multimodal emotion recognition method is introduced in detail step by step below.

[0052] The present invention uses a long sequence of audio and video information as an input sequence S, which can be a video frame sequence or an audio spectrogram sequence. The input sequence S is evenly divided into multiple segments S1, S2, ..., S with a fixed length of t seconds. k, data with a length less than t seconds is considered as only one segment. The segmented audio and video information is input into the audio encoder and video encoder for processing, and the audio segment-level feature sequence and video segment-level feature sequence are extracted respectively. The specific formula is:

[0053]

[0054] in, represents the audio and video feature encoder, W is the learnable parameter in the encoder, and l represents the number of audio and video segments. The audio and video feature encoder converts all the segments S of the input sequence S into i Mapped to a point in the unimodal emotional feature space, we get the audio segment-level feature sequence F a and video segment-level feature sequence F v .

[0055] This application proposes a multi-channel multi-scale convolutional encoder (MCMSCM) as an audio feature encoder for learning spectral information from the Mel-frequency cepstral coefficient map of speech to extract more discriminative emotional features. The audio feature encoder includes a multi-channel feature map extraction structure and a multi-scale feature dimensionality reduction structure. Figure 2 As shown, Figure 2 (a) is the structural diagram of the audio feature encoder. Figure 2 (b) is a multi-channel feature map extraction structure diagram in the audio feature encoder. Figure 2 (c) in the figure is a diagram of the multi-scale feature dimensionality reduction structure in the audio feature encoder.

[0056] In order to enhance the ability to focus on different details of speech spectrum features, the multi-channel feature extraction structure includes three parallel time domain convolution blocks, frequency domain convolution blocks and fusion convolution blocks, each of which includes a convolution layer, a rectified linear unit, a batch normalization layer and a pooling layer. Each convolution layer focuses on extracting time domain features, frequency domain features and correlation features in the time and frequency domain by controlling the receptive field size of the current channel in the time and frequency domain of the input spectrogram, and finally obtains a time domain feature map, a frequency domain feature map and a time and frequency domain fusion feature map containing different correlation information. The convolution kernel size of the time domain convolution layer is 11×1, the convolution kernel size of the frequency domain convolution layer is 1×9, and the convolution kernel size of the fusion convolution layer is 3×3. The sizes of two convolution kernels are set to "1" in specific dimensions, indicating that they only focus on the dynamic changes of the audio spectrogram in different dimensions or the characteristics of the current time and frequency domain features, while the standard size convolution kernel can provide correlation features in the time and frequency domain, reflecting the overall change relationship of the audio signal in time and frequency.

[0057] In order to reduce the dimensionality of high-dimensional feature maps, the multi-scale feature dimensionality reduction structure includes multiple multi-scale residual convolution blocks. Each multi-scale residual convolution block includes two parallel convolution layers with convolution kernel sizes of 3×3 and 5×5, respectively, which are used to extract the information contained in the feature map under different receptive fields, thereby capturing the energy changes of audio signals at different time scales and different frequency ranges. At the same time, in order to improve the information transmission capability of the deep network so that the model can be better trained, the residual connection structure is introduced into the multi-scale residual convolution block of Su Sohu to effectively retain the original input information and improve the generalization performance of the model. In each multi-scale residual convolution block, the input feature map of each residual block is extracted through two convolution layers respectively, and the output feature maps of the two parallel convolution layers are added to the input feature map and then connected, and then the audio segment-level feature sequence is output after passing through the batch normalization layer, the rectified linear unit and the pooling layer.

[0058] Specifically, the Mel-frequency cepstral coefficient map of speech information is input into the audio feature encoder, and passes through three parallel time domain convolution blocks, frequency domain convolution blocks and fusion convolution blocks in the multi-channel feature map extraction structure to output the time domain feature map, frequency domain feature map and time-frequency domain fusion feature map and connect them; then pass through multiple multi-scale residual convolution blocks in the multi-scale feature dimensionality reduction structure to output the audio segment-level feature sequence.

[0059] Since video frame data has more data points than audio spectrograms, that is, a higher input dimension, the video feature encoder needs to have sufficient depth and capability to capture facial details in video frames and changes in frame data on a temporal scale. Therefore, this application uses a traditional 50-layer residual convolution structure as a video feature encoder to process the frame data of the input video and output a video segment-level feature sequence. The residual convolution structure constructs a deep network in a stacked manner of residual blocks, which helps to overcome the long-term dependency problem in video data and can effectively capture rich visual emotional cues.

[0060] In order to improve the generalization ability and training speed of the model, this application uses the parameters obtained by pre-training the residual convolution structure on the Imagenet dataset as the initial parameters of the video feature encoder based on the idea of ​​transfer learning, and then replaces the initial classification layer of the residual convolution structure with a fully connected layer dedicated to emotion classification, so that it can be applied to the datasets and models used for emotion recognition. Although this type of transfer learning can use the general representation parameters obtained by pre-training the model on large-scale image data, because the data used for pre-training and formal training come from different fields, the prior knowledge will contain useless information. Therefore, this application adopts the method of fine-tuning all layers in the current emotion database during the training process, so that the video feature encoder can adapt to new data.

[0061] Considering that the emotional state in the multimodal emotion database is consistent in each modality at the same time. For example, in the audio and video dual modalities studied in this application, the audio and video feature sequences corresponding to each time period in the same emotional state, although with different dimensions and feature values, contain the same emotional information. Therefore, finding the emotional similarity information between the two modalities helps to improve the emotional certainty of audio features and video features in single-modal emotion recognition.

[0062] This application constructs an audio-visual encoder (AVESE), the specific structure of which is referenced Figure 3 The audio-visual encoder uses the audio segment level feature sequence and video segment-level feature sequences As input, calculate the inter-modal segment-level sentiment similarity feature sequence To express the similarity information between different modal input sequences in the same time segment, the specific steps include:

[0063] In the audio-visual encoder, the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence are sequentially connected to obtain a segment-level audio-video fusion feature sequence; each fusion representation vector in the segment-level audio-video fusion feature sequence is mapped through a fully connected layer to obtain a segment-level emotional similarity feature sequence.

[0064] The formula for the above process is:

[0065] F s

[0066] =[Concat(F a (1),F v (1)),Concat(F a (2),F v (2)),…,Concat(F a (l),F v (l))]W s

[0067] in, is the weight matrix in the fully connected layer, f a and f v are the dimensions of the segment-level feature sequences of audio and video respectively, and l represents the number of audio and video segments.

[0068] In order to make full use of the emotional information of each audio and video clip, this application designs a multi-head emotional attention mechanism (ESI Attention) based on emotional similarity information to calculate the emotional attention weight of the feature vector in each segment-level feature sequence. The specific structure is as follows: Figure 4 shown.

[0069] In the multi-head emotion attention mechanism, each segment-level emotion similarity feature sequence is used as the query element in the cross-attention mechanism, and each segment-level feature sequence of the audio is used as the key element and the value element. The emotion attention weight of each audio segment-level feature sequence is calculated through the multi-head attention mechanism, and the audio segment-level emotion weighted feature sequence is output; each segment-level emotion similarity feature sequence is used as the query element, and each segment-level feature sequence of the video is used as the key element and the value element. The emotion attention weight of each video segment-level feature sequence is calculated through the multi-head attention mechanism, the emotional importance of each segment feature is learned, and the video segment-level emotion weighted feature sequence is output.

[0070] The multi-head attention mechanism normalizes the inner product between the key element and the query element through the Softmax function to obtain the correlation between the single-modal sentiment feature information and the inter-modal sentiment similarity information, and uses it as the attention score of the value matrix. The specific formula is:

[0071]

[0072] Among them, F a is the audio segment level feature sequence, F v is the video segment level feature sequence, F s is the segment-level sentiment similarity feature sequence, W Q ,W K and W V represents the learnable parameter matrix, d k is the dimension of each attention head in the multi-head attention mechanism.

[0073] Through the residual connection mechanism, while retaining the original information, the unimodal feature sequence data is adjusted using weighted information. That is, the output of each attention head in the multi-head attention mechanism is connected and then added to the corresponding unimodal segment-level feature sequence to obtain the audio segment-level emotional weighted feature sequence and the video segment-level emotional weighted feature sequence. The formula is:

[0074] F' a|v =Concat(Attention1,Attention2,…,Attention h )·W O +F a|v

[0075] Among them, F' a is the audio segment-level sentiment weighted feature sequence, F' v is the video segment-level sentiment weighted feature sequence, W O represents the learnable parameter matrix, and h is the number of attention heads in the multi-head attention mechanism.

[0076] The usual method for emotion recognition of an audio or video sequence is to feed the extracted segment-level features into a classifier to calculate the emotion prediction results of the corresponding segments, and then summarize the results of all segments as the emotion label of this input sequence. However, not all segments in the audio and video input sequence contain rich emotion information, so the prediction results of each segment may be different, which affects the emotion judgment of the entire input sequence.

[0077] According to the manifold hypothesis in deep learning, the neural network will try to parameterize the sample space and map it to a manifold in the low-dimensional feature space, where data points of the same type will be mapped to adjacent points, that is, these points and their neighbors usually have similar properties. Based on this theory, this application proposes an inter-segment center vector mapping method, which uses the center vector of all segment-level feature vectors calculated for the same long sequence as the representation vector of the actual input sequence of the long sequence to smooth the final feature space and increase the stability of sentiment prediction.

[0078] The following is a detailed introduction to the inter-segment center vector mapping method.

[0079] The formula defining the center mapping function is:

[0080]

[0081] in, represents the central mapping function, F' is the segment-level sentiment weighted feature sequence, and l represents the number of audio and video segments.

[0082] The audio segment-level emotion weighted feature sequence and the video segment-level emotion weighted feature sequence are respectively averaged through the center mapping function to obtain the audio weighted center vector and the video weighted center vector of the long sequence. The segment-level emotion similarity feature sequence is averaged through the center mapping function to obtain the center vector of the emotion similarity information.

[0083] Different from directly concatenating the feature vectors of each modality to construct a joint feature space, in order to make full use of the emotional consistency and complementarity between different modalities, this application constructs a multimodal joint emotional feature F by merging the audio weighted center vector, the video weighted center vector and the center vector of the emotional similarity information. The formula is:

[0084]

[0085] Among them, F' a is the audio segment-level emotion-weighted feature sequence, F'v is the video segment-level emotion-weighted feature sequence, and F s is the segment-level sentiment similarity feature sequence.

[0086] By merging the audio and video emotion representation space represented by the audio and video weighted central vector with the inter-modal emotion similarity space represented by the central vector of the emotion similarity information, a multimodal joint emotion feature can be constructed. This can fully consider the emotion correlation and diversity between modalities while retaining the characteristics of the modalities themselves, thereby improving the recognition stability of long sequences.

[0087] Finally, the multimodal joint emotion features are input into the fully connected layer for emotion prediction, and converted into the corresponding emotion probability distribution through the Softmax activation function, and the emotion with the highest probability is taken as the target emotion.

[0088] In order to evaluate the multimodal emotion recognition method proposed in this application, this embodiment uses the IEMOCAP open dataset. The dataset contains audio-visual data recorded by 10 actors, with a total duration of 12 hours, and is accompanied by corresponding emotional annotation information. The dataset contains a total of 10,039 samples with an average time length of 4.5 seconds, and the longest time span is more than 30 seconds. In the study, this embodiment only used label annotations, and selected data from six emotion categories of "anger", "happy", "sadness", "neutral", "excited" and "frustrated", and performed four-category and six-category emotion recognition task verifications respectively. In particular, this embodiment regards the data labeled "happy" and "excited" as the same category in the four-category task and combines them into "happy", while excluding the "frustrated" emotion category.

[0089] Before the original audio data and video data are input into the multimodal emotion recognition model proposed in this application, they need to be preprocessed. For audio data, this embodiment uses a Hanning window and a window shift of 256 milliseconds to divide it into 1024 millisecond audio frames, and applies a fast Fourier transform (FFT) to obtain a power spectrum. In the frequency range of 80Hz to 7600Hz, the power spectrum signal is calculated as a Mel spectrogram by 128 Mel filter groups, and the first 40 Mel frequency cepstral coefficients (MFCC) are selected to train the model. For video data, since the original database only provides the voice data of each sample and the video data of the complete conversation (containing multiple samples), this embodiment intercepts the speaker's facial video data through opencv according to the start and end time of the corresponding voice segment and the speaker's facial position. At the same time, in order to reduce the redundant frames of the video data, 10 frames of data are retained as training data per second by a uniform sampling method.

[0090] This example uses the PyTorch platform to build a training and experimental environment for the multimodal emotion recognition model, and uniformly sets the data batch size to 10, performs 200 iterations of training, uses the AdamW optimizer, and sets the initial learning rate to 0.0001. Considering the imbalance of the data, the following will use both weighted and unweighted classification accuracy as evaluation indicators.

[0091] In order to verify the model performance, the experimental results obtained in this embodiment are compared with the best emotion recognition model in recent years that also includes audio and video modalities. The results are shown in Table 1.

[0092] Table 1. Comparison of the results of this application's multimodal emotion recognition model with other models

[0093]

[0094] In Table 1, the superscripts “(4)” and “(6)” represent four-category and six-category classifications, respectively.

[0095] It should be noted that since each method has certain differences in data set processing, it is difficult to make a fair comparison after full reproduction. Therefore, this embodiment quotes the optimal results reported in the original papers proposing each model and compares them with the results of the multimodal emotion recognition model proposed in this application. It can be observed that when trained and tested on the same data set, the multimodal emotion recognition model proposed in this application has achieved significant results on the IEMOCAP data set, with an average accuracy of about 83%, which is better than the models compared in Table 1.

[0096] In addition, in order to further verify the effectiveness of the multimodal emotion recognition method proposed in this application and the discriminability of the multimodal joint emotion features extracted by the multimodal emotion recognition model, this embodiment sets up three additional experiments with four classification tasks: First, the discriminability of the joint emotion feature space constructed by the multimodal emotion recognition model is tested by visualizing the feature vector distribution of the data set; second, the effect of introducing the inter-segment center vector mapping method on the real-time recognition stability is verified by using ten speech with a time length of more than 21 seconds in the data set. Third, the effect of the multimodal emotion recognition method proposed in this application on the performance of the multimodal emotion recognition model is verified by ablation experiments.

[0097] The following are the discriminability analysis experiments and results of the joint sentiment feature space.

[0098] In addition, this embodiment uses the t-SNE (t-Distributed Stochastic Neighbor Embedding) method to visualize the feature vectors of the training set and the test set, and maps the multimodal joint sentiment features to a two-dimensional space to present the distribution of the joint sentiment feature space.

[0099] Reference Figure 5 As shown, Figure 5 (a) is the t-SNE visualization of the joint sentiment feature space of the training set. Figure 5 (b) in the figure is a t-SNE visualization of the joint emotional feature space of the test set. It can be observed that the multimodal joint emotional features extracted by the multimodal emotion recognition model proposed in the present application show obvious clustering phenomenon. Samples of different emotion categories are clearly projected to different clusters in the two-dimensional space and are clearly separated from each other. However, further analysis of the distribution of multimodal joint emotional features of the test set shows that the multimodal emotion recognition model proposed in the present application has the best separation effect for sadness, and the distance between the sample points is closer and tighter. The recognition performance for anger is slightly worse, and a large part of the sample points are located in areas that have a lot of overlap with the distribution areas of the happy and natural emotion categories.

[0100] The following are the effectiveness analysis experiments and results of the inter-segment center vector mapping method.

[0101] This embodiment verifies the influence of the middle segment center vector mapping method on the recognition performance of the multimodal emotion recognition model by taking the presence or absence of the middle segment center vector mapping method as a variable. This embodiment selects only samples with a time length of more than 22 seconds from the database as verification data, a total of eleven samples. Then all samples are divided into multiple segments with a time length of seven seconds at intervals of one second, and these segments are input into the pre-trained multimodal emotion recognition model for emotion category calculation. After calculating the emotion category probability values ​​of all segments, the correct category probability values ​​of all segments are visually displayed to compare the results.

[0102] Results comparison chart reference Figure 6 As shown, Figure 6 (a) is the real-time recognition performance diagram before adding the inter-segment center vector mapping method. Figure 6 (b) in the figure is the real-time recognition performance graph after adding the inter-segment center vector mapping method. It can be observed that after adding the inter-segment center vector mapping method in the multimodal emotion recognition model, its emotion recognition curve shows a more gentle trend, and the overall recognition accuracy is more stable. This shows that the inter-segment center vector mapping method can effectively alleviate the imbalance problem of segment features in long sequence data, improve the processing ability of the multimodal emotion recognition model for long sequence data, and has a good ability to model time series relationships.

[0103] The following are the results and analysis of the ablation experiment.

[0104] In order to explore the performance of the multimodal emotion recognition method proposed in this application, this embodiment conducts a series of ablation experiments, and the results are summarized in Table 2. In the experiment, this embodiment designs several different model configurations, including a single-modal emotion recognition model (Audio and Video) implemented using an audio encoder or a video encoder alone, and based on the use of the audio and video encoder proposed in this application, without using the inter-segment center vector mapping method, only the audio and video segment-level feature sequence and the segment-level emotion similarity feature sequence are merged to construct a multimodal recognition model of the joint emotion feature space (ESJFS).

[0105] Table 2. Ablation experiment results

[0106]

[0107] From the results in Table 2, it can be seen that the audio encoder and video encoder proposed in this application have shown good results in the single-modal emotion recognition task. After introducing the designed joint emotion feature space construction method, it can be observed that the recognition performance is significantly improved, which proves the effectiveness of multimodal fusion and the method of this application in the field of emotion recognition. Finally, by adding the inter-segment center vector mapping method, not only the recognition performance of the model is made more stable, but also a performance improvement of about 3.6% is obtained compared with the previous experimental results.

[0108] The above experimental results comprehensively show that the multimodal emotion recognition method proposed in this application has achieved remarkable results on the public dataset IEMOCAP. In terms of weighted accuracy and unweighted accuracy, the multimodal emotion recognition model reached 83.08% and 83.77% respectively. In addition, this embodiment also verifies and demonstrates the real-time recognition performance of the model. This shows that the multimodal emotion recognition method proposed in this application is not only suitable for emotion judgment of isolated fragments, but also can make full use of the contextual information of the input data and integrate the emotion information of multiple fragments in a long input sequence.

[0109] In summary, the multimodal emotion recognition method proposed in this application simultaneously utilizes the emotion similarity information between modalities and the emotion feature information of each modality, and adopts the inter-segment center vector mapping method to calculate the center vector of long sequence audio and video information, and then constructs a multimodal joint emotion feature after fusing it with the emotion similarity information between modalities. It makes full use of the contextual information of the input data, enhances the real-time recognition performance of the multimodal emotion recognition model, and improves the stability of emotion recognition.

[0110] Embodiment 2

[0111] This embodiment provides a multimodal emotion recognition device, including:

[0112] The audio and video encoding module is used to pre-segment the long sequence of audio and video information, input the segmented audio and video information into the audio feature encoder and the video feature encoder respectively, and extract the audio segment level feature sequence and the video segment level feature sequence respectively;

[0113] The inter-modal sentiment similarity calculation module is used to sequentially connect the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence to obtain a segment-level audio-video fusion feature sequence; each fusion representation vector in the segment-level audio-video fusion feature sequence is mapped through a fully connected layer to obtain a segment-level sentiment similarity feature sequence;

[0114] The segment-level feature attention and fusion module is used to use the segment-level sentiment similarity feature sequences as query elements in the cross-attention mechanism, and the audio segment-level feature sequences as key elements and value elements, and calculate the sentiment attention weight of each audio segment-level feature sequence through the multi-head attention mechanism, and output the audio segment-level sentiment weighted feature sequence; use the segment-level sentiment similarity feature sequences as query elements, and the video segment-level feature sequences as key elements and value elements, and calculate the sentiment attention weight of each video segment-level feature sequence through the multi-head attention mechanism, and output the video segment-level sentiment weighted feature sequence;

[0115] The bimodal emotion feature fusion module is used to use the center mapping function to average all audio segment-level emotion weighted feature sequences and all video segment-level emotion weighted feature sequences to obtain long-sequence audio weighted center vectors and video weighted center vectors; average the segment-level emotion similarity feature sequences to obtain the center vector of emotion similarity information; merge the audio weighted center vector, the video weighted center vector and the center vector of emotion similarity information to construct a multimodal joint emotion feature;

[0116] The classification module is used to input the multimodal joint emotion features into the fully connected layer for emotion prediction, convert them into corresponding emotion probability distribution through the Softmax activation function, and take the emotion with the highest probability as the target emotion.

[0117] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0118] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0119] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0121] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. A multimodal emotion recognition method, characterized in that: include: Inputting a long sequence of audio and video information into a pre-trained multimodal emotion recognition model, wherein the multimodal emotion recognition model includes an audio feature encoder, a video feature encoder, an audio-visual encoder, and a multi-head emotion attention mechanism; Pre-segment the long sequence of audio and video information, input the segmented audio and video information into the audio feature encoder and the video feature encoder respectively, and extract the audio segment-level feature sequence and the video segment-level feature sequence; Input the audio segment-level feature sequence and the video segment-level feature sequence into an audio-visual encoder, connect the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence in sequence to obtain a segment-level audio-video fusion feature sequence; map each fusion representation vector in the segment-level audio-video fusion feature sequence through a fully connected layer to obtain a segment-level emotional similarity feature sequence; The audio segment-level feature sequence, video segment-level feature sequence and segment-level emotion similarity feature sequence are input into the multi-head emotion attention mechanism; each segment-level emotion similarity feature sequence is used as the query element in the cross-attention mechanism, and each audio segment-level feature sequence is used as the key element and the value element, and the emotion attention weight of each audio segment-level feature sequence is calculated through the multi-head attention mechanism, and the audio segment-level emotion weighted feature sequence is output; each segment-level emotion similarity feature sequence is used as the query element, and each video segment-level feature sequence is used as the key element and the value element, and the emotion attention weight of each video segment-level feature sequence is calculated through the multi-head attention mechanism, and the video segment-level emotion weighted feature sequence is output; The center mapping function is used to average all audio segment-level emotion weighted feature sequences and all video segment-level emotion weighted feature sequences to obtain long-sequence audio weighted center vectors and video weighted center vectors; the segment-level emotion similarity feature sequences are averaged to obtain the center vector of emotion similarity information; the audio weighted center vector, the video weighted center vector and the center vector of emotion similarity information are combined to construct a multimodal joint emotion feature; The multimodal joint emotion feature is input into the fully connected layer for emotion prediction, and is converted into the corresponding emotion probability distribution through the Softmax activation function, and the emotion with the highest probability is taken as the target emotion.

2. A multimodal emotion recognition method according to claim 1, characterized in that: The representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence are sequentially connected to obtain a segment-level audio-video fusion feature sequence; each fusion representation vector in the segment-level audio-video fusion feature sequence is mapped through a fully connected layer to obtain a segment-level emotional similarity feature sequence F s , the calculation formula is: F s =[Concat(F a (1),F v (1)),Concat(F a (2),F v (2)),...,Concat(F a (l),F v (l))]W s in, is the audio segment level feature sequence, is the video segment level feature sequence, is the weight matrix in the fully connected layer, f a and f v are the dimensions of the segment-level feature sequences of audio and video respectively, and l represents the number of audio and video segments.

3. A multimodal emotion recognition method according to claim 2, characterized in that: The segment-level emotion similarity feature sequences, the audio segment-level feature sequences and the video segment-level feature sequences are positionally encoded before being input into the multi-head attention mechanism.

4. A multimodal emotion recognition method according to claim 3, characterized in that: The formula for outputting the audio and video segment-level sentiment weighted feature sequence through the multi-head attention mechanism is: F′ a|v =Concat(Attention1,Attention2,...,Attention h )·W o +F a|v Among them, F' a is the audio segment-level sentiment weighted feature sequence, F' v is the video segment-level sentiment weighted feature sequence, F a is the audio segment level feature sequence, F v is the video segment level feature sequence, F s is the segment-level sentiment similarity feature sequence, W Q ,W K ,W V and W O represents the learnable parameter matrix, d k is the dimension of each attention head in the multi-head attention mechanism, and h is the number of attention heads in the multi-head attention mechanism.

5. A multimodal emotion recognition method according to claim 4, characterized in that: The audio weighted center vector, the video weighted center vector and the center vector of the emotion similarity information are combined to construct the formula of the multimodal joint emotion feature F: Among them, F' a is the audio segment-level sentiment weighted feature sequence, F' v is the video segment-level sentiment weighted feature sequence, F s is the segment-level sentiment similarity feature sequence, Represents the center mapping function, which is used to calculate the weighted arithmetic mean.

6. A multimodal emotion recognition method according to claim 1, characterized in that: The audio feature encoder comprises: The Mel-frequency cepstral coefficient map of speech information is used as input, and is input into three parallel time domain convolution blocks, frequency domain convolution blocks and fusion convolution blocks respectively. The time domain convolution blocks, frequency domain convolution blocks and fusion convolution blocks respectively extract time domain features, frequency domain features and correlation features in the time and frequency domains by controlling the receptive field size of the current channel in the time and frequency domain of the Mel-frequency cepstral coefficient map, and output a time domain feature map, a frequency domain feature map and a time and frequency domain fusion feature map and connect them; The concatenated feature maps are passed through multiple multi-scale residual convolution blocks for dimensionality reduction, and an audio segment-level feature sequence is output.

7. A multimodal emotion recognition method according to claim 6, characterized in that: The structures of the time domain convolution block, frequency domain convolution block and fusion convolution block all include a convolution layer, a rectified linear unit, a batch normalization layer and a pooling layer; wherein the convolution kernel size of the time domain convolution layer is 11×1, the convolution kernel size of the frequency domain convolution layer is 1×9, and the convolution kernel size of the fusion convolution layer is 3×3.

8. A multimodal emotion recognition method according to claim 6, characterized in that: The multi-scale residual convolution block includes two parallel convolution layers with convolution kernel sizes of 3×3 and 5×5 respectively. The input feature map is subjected to feature extraction through the two convolution layers respectively. The outputs of the two parallel convolution layers are added to the input feature map and then connected. Then, the audio segment-level feature sequence is output after passing through a batch normalization layer, a rectified linear unit and a pooling layer.

9. A multimodal emotion recognition method according to claim 1, characterized in that: The video feature encoder adopts a 50-layer residual convolution structure.

10. A multimodal emotion recognition device, characterized in that: include: The audio and video encoding module is used to pre-segment the long sequence of audio and video information, input the segmented audio and video information into the audio feature encoder and the video feature encoder respectively, and extract the audio segment level feature sequence and the video segment level feature sequence respectively; The inter-modal sentiment similarity calculation module is used to sequentially connect the representation vectors in the audio segment-level feature sequence and the video segment-level feature sequence to obtain a segment-level audio-video fusion feature sequence; each fusion representation vector in the segment-level audio-video fusion feature sequence is mapped through a fully connected layer to obtain a segment-level sentiment similarity feature sequence; The segment-level feature attention and fusion module is used to use the segment-level sentiment similarity feature sequences as query elements in the cross-attention mechanism, and the audio segment-level feature sequences as key elements and value elements, and calculate the sentiment attention weight of each audio segment-level feature sequence through the multi-head attention mechanism, and output the audio segment-level sentiment weighted feature sequence; use the segment-level sentiment similarity feature sequences as query elements, and the video segment-level feature sequences as key elements and value elements, and calculate the sentiment attention weight of each video segment-level feature sequence through the multi-head attention mechanism, and output the video segment-level sentiment weighted feature sequence; The bimodal emotion feature fusion module is used to use the center mapping function to average all audio segment-level emotion weighted feature sequences and all video segment-level emotion weighted feature sequences to obtain long-sequence audio weighted center vectors and video weighted center vectors; average the segment-level emotion similarity feature sequences to obtain the center vector of emotion similarity information; merge the audio weighted center vector, the video weighted center vector and the center vector of emotion similarity information, Construct multimodal joint sentiment features; The classification module is used to input the multimodal joint emotion features into the fully connected layer for emotion prediction, convert them into corresponding emotion probability distribution through the Softmax activation function, and take the emotion with the highest probability as the target emotion.