Multi-modal emotion recognition method and device
By fusing facial data and EEG data, using multi-modal emotion recognition models and typical correlation analysis, the problem of limited single-modal emotion recognition is solved and higher emotion recognition accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202410724344.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing single-modal emotion recognition methods are limited in human communication due to factors such as noise, light, or angles, making it difficult to achieve ideal recognition results, and fail to fully utilize the correlation of multiple information sources, resulting in insufficient recognition performance.
The multi-modal emotion recognition method is used to fuse facial data and EEG data. Through pre-processing, feature extraction and feature fusion, the multi-modal emotion recognition model is used for emotion recognition, combined with canonical correlation analysis (CCA) and improved algorithms. Consider the correlation between different features to improve recognition accuracy.
It achieves higher emotion recognition accuracy and robustness, makes full use of multi-modal information, and improves the overall performance of emotion recognition.
Smart Images

Figure CN118690165A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing technology, and in particular to a multimodal emotion recognition method and device. Background Art
[0002] Emotion recognition research mainly uses computer vision technology and machine learning algorithms for analysis and prediction. For example, Kok et al. from Stanford University in the United States proposed an emotion recognition method based on neural networks and achieved good results on the FER2013 dataset. It mainly uses deep convolutional neural networks (DCNN) to extract features and classify input facial images. They designed a multi-layer convolutional neural network, which gradually extracts the features of facial expressions through multiple convolution, pooling and regularization operations, and then inputs these features into the fully connected layer for classification. During the training process, they used data enhancement technology and stochastic gradient descent to improve the robustness and generalization ability of the model. The experimental results show that this method achieves good emotion classification results on the FER2013 dataset, and exceeds some previous methods based on traditional machine learning algorithms in terms of recognition rate, indicating the effectiveness and superiority of deep learning in emotion recognition tasks; Liu et al. from the University of Toronto in Canada used a hybrid model for emotion recognition research. The traditional naive Bayes classifier based on text features and the convolutional neural network (CNN) based on deep learning were combined to construct a hybrid model for emotion recognition. In this study, the naive Bayes classifier is mainly responsible for processing the semantic information of the text, while the convolutional neural network is mainly responsible for processing the local features of the text. By combining the outputs of these two models, the sentiment of the text can be classified more accurately. This hybrid model has achieved good performance in the emotion recognition task, proving the effectiveness of the emotion recognition method based on deep learning.
[0003] Researchers at the Max Planck Institute for Biophysics in Germany used EEG signals and eye movement data to determine individuals’ favorability when watching advertising videos. The researchers found that many emotion-related features can be extracted during the process of watching advertisements, and these features can be used to predict the emotional state of individuals.
[0004] Researchers from the Massachusetts Institute of Technology used fMRI technology to explore the neural mechanisms of the human retina in processing visual information, and conducted a comparative analysis of brain activity under different emotional states, thereby deriving some emotion-related characteristics.
[0005] In the process of human communication, emotion is the result of the comprehensive expression of multiple information. Single-modal emotion recognition is difficult to meet the actual needs due to its own limitations. Voice emotion is easily disturbed by noise, and expression recognition is easily affected by light or angle, which cannot achieve the ideal recognition effect. Therefore, in terms of emotion recognition, multimodal emotion recognition, that is, integrating emotion features from different channels to jointly complete emotion recognition, is becoming a trend. In real human-computer interaction, voice information and expression information appear at the same time. When the recognition of a single modality is disturbed or ineffective, the overall recognition performance can be improved by integrating the features of another modality that appears simultaneously. According to the different levels of data sources in the fusion system, the fusion methods can be divided into: pixel-level fusion, feature-level fusion and decision-level fusion. Pixel-level fusion is the fusion of underlying data. The amount of data processed is relatively large. This fusion effect is more intuitive, so it became a popular feature fusion method in the early stage. Feature-level fusion is the fusion process of the middle layer, which analyzes and processes the feature information extracted from the original data information. Due to the wide variety of features, the selection of features will affect the fusion effect, but this method reduces certain redundant information on the basis of retaining the original feature information, making the fused features more discriminative. Decision-level fusion is a higher-level fusion method, which is mainly carried out after local decision-making. In this fusion, each classification error result will be superimposed, affecting the subsequent analysis. Compared with the other two fusion methods, feature-level fusion has better effect, but most of the current feature-level fusion ignores the intrinsic correlation between different features. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a multimodal emotion recognition method and device, which fuses facial data and EEG data to achieve a multimodal emotion recognition effect.
[0007] In order to solve the above technical problems, the first aspect of the embodiment of the present invention discloses a multimodal emotion recognition method, the method comprising:
[0008] S1, obtains EEG signals and facial image signals;
[0009] S2, processing the EEG signal to obtain EEG emotion feature information;
[0010] S3, processing the facial image signal to obtain facial emotion feature information;
[0011] S4, fusing the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information;
[0012] S5, using a preset multimodal emotion recognition model to process the fused emotion feature information to obtain a multimodal emotion recognition result.
[0013] As an optional implementation, in the first aspect of the embodiment of the present invention, the processing of the EEG signal to obtain EEG emotion feature information includes:
[0014] S21, preprocessing the EEG signal to obtain a preprocessed EEG signal;
[0015] S22, extracting features from the preprocessed EEG signal to obtain EEG signal feature information;
[0016] S23, performing feature selection and dimension reduction on the EEG signal feature information to obtain EEG emotion feature information.
[0017] As an optional implementation, in the first aspect of the embodiment of the present invention, the preprocessing of the EEG signal to obtain the preprocessed EEG signal includes:
[0018] S211, performing low-frequency offset removal processing on the electroencephalogram signal to obtain a de-offset electroencephalogram signal;
[0019] S212, performing denoising processing on the de-shifted EEG signal to obtain a denoised EEG signal;
[0020] S213, performing artifact suppression processing on the denoised EEG signal to obtain an artifact-free EEG signal;
[0021] S214, performing enhancement processing on the artifact-free EEG signal to obtain a preprocessed EEG signal.
[0022] As an optional implementation, in the first aspect of the embodiment of the present invention, the extracting features of the preprocessed EEG signal to obtain EEG signal feature information includes:
[0023] S221, extracting frequency domain features of the preprocessed EEG signal to obtain frequency domain feature information of the EEG signal;
[0024] S222, extracting time domain features of the preprocessed EEG signal to obtain time domain feature information of the EEG signal;
[0025] S223, performing spatial domain feature extraction on the preprocessed EEG signal to obtain spatial domain feature information of the EEG signal;
[0026] S224, performing feature fusion on the EEG signal frequency domain feature information, the EEG signal time domain feature information and the EEG signal space domain feature information to obtain EEG signal feature information.
[0027] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the facial image signal by a data processing module to obtain facial emotion feature information includes:
[0028] S31, preprocessing the facial image signal to obtain a preprocessed facial image signal;
[0029] S32, performing feature extraction on the pre-processed facial image signal to obtain facial emotion feature information.
[0030] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the preprocessing of the facial image signal to obtain the preprocessed facial image signal includes:
[0031] S311, performing face detection on the facial image signal to obtain facial image information;
[0032] S312, segmenting the facial image information to obtain a preprocessed facial image signal, wherein the preprocessed facial image signal includes 8 facial segmentation image signals.
[0033] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the extracting features of the preprocessed facial image signal to obtain facial emotion feature information includes:
[0034] S321, performing clustering processing on the pre-processed facial image signal to obtain a facial emotion feature image signal;
[0035] S322, performing scale normalization processing on the facial image emotion feature image signal to obtain a normalized facial emotion feature image signal;
[0036] S323, performing feature extraction on the normalized facial emotion feature image signal to obtain facial emotion feature information.
[0037] A second aspect of an embodiment of the present invention discloses a multimodal emotion recognition device, the device comprising:
[0038] A data acquisition module, used for acquiring EEG signals and facial image signals;
[0039] An EEG emotion feature extraction module is used to process the EEG signal to obtain EEG emotion feature information;
[0040] A facial emotion feature extraction module, used for processing the facial image signal to obtain facial emotion feature information;
[0041] A feature fusion module, used to fuse the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information;
[0042] The emotion recognition module is used to process the fused emotion feature information using a preset multimodal emotion recognition model to obtain a multimodal emotion recognition result.
[0043] As an optional implementation, in the second aspect of the embodiment of the present invention, the processing of the EEG signal to obtain EEG emotion feature information includes:
[0044] S21, preprocessing the EEG signal to obtain a preprocessed EEG signal;
[0045] S22, extracting features from the preprocessed EEG signal to obtain EEG signal feature information;
[0046] S23, performing feature selection and dimension reduction on the EEG signal feature information to obtain EEG emotion feature information.
[0047] As an optional implementation, in the second aspect of the embodiment of the present invention, the preprocessing of the EEG signal to obtain the preprocessed EEG signal includes:
[0048] S211, performing low-frequency offset removal processing on the electroencephalogram signal to obtain a de-offset electroencephalogram signal;
[0049] S212, performing denoising processing on the de-shifted EEG signal to obtain a denoised EEG signal;
[0050] S213, performing artifact suppression processing on the denoised EEG signal to obtain an artifact-free EEG signal;
[0051] S214, performing enhancement processing on the artifact-free EEG signal to obtain a preprocessed EEG signal.
[0052] As an optional implementation, in the second aspect of the embodiment of the present invention, the extracting features of the preprocessed EEG signal to obtain EEG signal feature information includes:
[0053] S221, extracting frequency domain features of the preprocessed EEG signal to obtain frequency domain feature information of the EEG signal;
[0054] S222, extracting time domain features of the preprocessed EEG signal to obtain time domain feature information of the EEG signal;
[0055] S223, performing spatial domain feature extraction on the preprocessed EEG signal to obtain spatial domain feature information of the EEG signal;
[0056] S224, performing feature fusion on the EEG signal frequency domain feature information, the EEG signal time domain feature information and the EEG signal space domain feature information to obtain EEG signal feature information.
[0057] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the processing of the facial image signal by a data processing module to obtain facial emotion feature information includes:
[0058] S31, preprocessing the facial image signal to obtain a preprocessed facial image signal;
[0059] S32, performing feature extraction on the pre-processed facial image signal to obtain facial emotion feature information.
[0060] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the preprocessing of the facial image signal to obtain the preprocessed facial image signal includes:
[0061] S311, performing face detection on the facial image signal to obtain facial image information;
[0062] S312, segmenting the facial image information to obtain a preprocessed facial image signal, wherein the preprocessed facial image signal includes 8 facial segmentation image signals.
[0063] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the extracting features of the preprocessed facial image signal to obtain facial emotion feature information includes:
[0064] S321, performing clustering processing on the pre-processed facial image signal to obtain a facial emotion feature image signal;
[0065] S322, performing scale normalization processing on the facial image emotion feature image signal to obtain a normalized facial emotion feature image signal;
[0066] S323, performing feature extraction on the normalized facial emotion feature image signal to obtain facial emotion feature information.
[0067] The third aspect of the present invention discloses another multimodal emotion recognition device, the device comprising:
[0068] A memory storing executable program code;
[0069] a processor coupled to the memory;
[0070] The processor calls the executable program code stored in the memory to execute part or all of the steps in the multimodal emotion recognition method disclosed in the first aspect of the embodiment of the present invention.
[0071] The fourth aspect of the present invention discloses a computer-storable medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the multimodal emotion recognition method disclosed in the first aspect of an embodiment of the present invention.
[0072] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0073] After abstractly representing the EEG signals and facial image signals, the present invention introduces canonical correlation analysis (CCA) and its improved algorithm into feature-level fusion, performs fusion analysis on multimodal information, takes the correlation between the EEG signals and facial image signals into consideration, and makes full use of multimodal information, thereby improving the overall accuracy of emotion recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0075] Figure 1 It is a flowchart of a multimodal emotion recognition method disclosed in an embodiment of the present invention;
[0076] Figure 2 is a schematic diagram of the structure of a multimodal emotion recognition device disclosed in an embodiment of the present invention;
[0077] Figure 3 It is a structural schematic diagram of another multimodal emotion recognition device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0078] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0079] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or equipment.
[0080] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0081] The present invention discloses a multimodal emotion recognition method and device, the method comprising: acquiring an EEG signal and a facial image signal; processing the EEG signal to obtain EEG emotion feature information; processing the facial image signal to obtain facial emotion feature information; fusing the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information; using a preset multimodal emotion recognition model to process the fused emotion feature information to obtain a multimodal emotion recognition result. The method of the present invention achieves a high accuracy and robustness in emotion classification tasks, and has certain application value. The following are detailed descriptions.
[0082] Embodiment 1
[0083] See also Figure 1 , Figure 1 is a flow chart of a multimodal emotion recognition method disclosed in an embodiment of the present invention. Figure 1 The multimodal emotion recognition method described is applied to an emotion recognition system to reflect a person's current physical and psychological state, and the embodiments of the present invention are not limited thereto. Figure 1 As shown, the multimodal emotion recognition method may include the following operations:
[0084] S1, obtains EEG signals and facial image signals;
[0085] S2, processing the EEG signal to obtain EEG emotion feature information;
[0086] S3, processing the facial image signal to obtain facial emotion feature information;
[0087] S4, fusing the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information;
[0088] S5, using a preset multimodal emotion recognition model to process the fused emotion feature information to obtain a multimodal emotion recognition result.
[0089] The optional, preset multimodal emotion recognition models are:
[0090] A graph convolution model based on a multi-attention mechanism is constructed, and the fused emotional feature information is fed into the model. The model is trained using the back propagation algorithm, and a trained model is obtained when the model converges. The trained model is used to perform classification experiments on test samples to obtain multimodal emotion recognition results.
[0091] The graph convolution model based on the multi-attention mechanism is: Let N = 1, 2, ..., n represent the numbers of all nodes, and the feature identifiers of all nodes are X∈R d , x i is the feature of the i-th node, A∈R N×N Represents the adjacency matrix, and the weight of the edge between node i and node j is represented by A ij Any node will collect information from its neighboring nodes, analyze and update the collected information. If each node has similar characteristics to its neighbors, each node can be identified by the average value of its neighboring nodes. Therefore, for all nodes, the update method is:
[0092]
[0093] Since the relationship between each node and its neighboring nodes is different and there are differences in strength, appropriate weighting can be performed according to the strength of the connection between each node and its neighboring points to obtain a more reasonable representation:
[0094]
[0095] The way to process the aggregated nodes is to use a linear transformation matrix W∈R d×h It is used to represent the aggregate features of nodes in the h-dimensional space. The formula is:
[0096] δ(X*W)=δ(AXW)
[0097] Where δ() is the activation function.
[0098] In practical applications, in order to fully consider the characteristics of the node itself, the following formula is often used to update the node:
[0099]
[0100] X * =(A+I)X
[0101] Update the adjacency matrix and degree matrix to obtain:
[0102]
[0103]
[0104] in, is the updated adjacency matrix, is the updated degree matrix. The matrix is a diagonal matrix. The degree of each vertex represents the information it contains. The degree of each node is defined as the weighted sum of its edges.
[0105] Different nodes have different numbers of edges and different edge weights. Some nodes have more edges and more feature values after aggregation. This problem can be solved by normalizing the self-loop information from neighboring nodes. Before aggregation, it is:
[0106]
[0107] After aggregation:
[0108]
[0109] Next, the information transmitted by neighbor node j is standardized:
[0110]
[0111] The input and output relationship of GCN (graph convolution) after standardization is:
[0112]
[0113] There are two commonly used attention mechanisms, one is the hard attention mechanism and the other is the soft attention mechanism. The working principle of the soft attention mechanism is to take a set of node features As the input of the layer, N is the number of nodes, F is the dimension, and its output is a set of new node features, expressed as Using the weight matrix W∈R F×F′ Perform a parameterized linear transformation on each node, and then use the self-attention mechanism a:R F′×F′ → R is applied to each node to calculate the attention coefficient:
[0114]
[0115] Where: e ijIndicates the importance of the feature of node j to node i. Adding the mask attention mechanism to the graph structure can effectively learn the structural information of the graph and improve the overall performance of the model. The neighborhood of node i is represented by N i Represents, j∈N i . Use the softmax function to normalize all selected j:
[0116]
[0117] The attention mechanism is a single-layer feedforward neural network, which is a weight vector The parameterization of can be nonlinearized using LeakyReLU(·)(α=0.2). The coefficients calculated by the attention mechanism can be expressed as:
[0118]
[0119] Where: T represents the transpose of the matrix, ∪ represents the connection operation. The final feature output of each node is:
[0120]
[0121] The k independent attention mechanisms are cascaded and calculated, and the output features are:
[0122]
[0123] Among them, the normalized attention coefficient calculated for the kth time is Indicates that the weight matrix of the input linear transformation is W k It means that the nonlinear function is averaged as:
[0124]
[0125] Optionally, the following method can be used to fuse features:
[0126] Obtaining cluster feature information X and cluster feature information Y to be fused;
[0127] Performing feature projection on the cluster feature information X and the cluster feature information Y to obtain projected cluster feature information X' and projected cluster feature information Y';
[0128] Processing the projected cluster feature information X' and the projected cluster feature information Y' to obtain a projection vector a1 and a projection vector b1;
[0129] The cluster feature information X, the cluster feature information Y, the projection vector a1 and the projection vector b1 are processed to obtain fused feature information of the cluster feature information X and the cluster feature information Y.
[0130] The calculation method of the feature fusion model is specifically as follows:
[0131] Get the cluster feature information X and cluster feature information Y to be fused; X is an n′×m′ dimensional matrix, Y is a p×m′ dimensional matrix, m′ represents the number of samples, n′ and p represent the dimensions of the two features, project the two matrices to 1 dimension for linear representation, corresponding to the projection vectors a1 and b1 respectively, then the feature matrix after projection becomes:
[0132]
[0133] The purpose is to maximize the correlation coefficient between X' and Y', so as to obtain the projection vectors a1 and b1 when the correlation coefficient is maximum, that is:
[0134]
[0135] Before projection, the data is standardized. The purpose of standardization is to make the mean of the data 0 and the variance 1. We can get:
[0136] cov(X',Y')=cov(a1 T X,b1 T Y)=E(<a1 T X,b1 T Y>)=E((a1 T X)(b1 T Y) T )=a1 T E(XY T )b1
[0137]
[0138]
[0139] D(X)=cov(X,X)=E(X T X)
[0140] D(Y)=cov(Y,Y)=E(Y T Y)
[0141] cov(X,Y)=E(XY T ),cov(Y,X)=E(YX T )
[0142] S XX =cov(X,X), then the solution objective is transformed into:
[0143]
[0144] Step 1: Calculate the variance S of X and YXX and S YY , the covariance S of XY and YX XY =S YX T ;
[0145] Step 2: Calculate the matrix
[0146] Step 3: Solve the singular values of M′ to obtain the largest singular value and its preceding and following singular vectors u, v;
[0147] Step 4: The projection vectors a1 and b1 of X and Y are:
[0148]
[0149] Step 5: The fusion feature vector Z of X and Y is
[0150] Optionally, the processing of the EEG signal to obtain EEG emotion feature information includes:
[0151] S21, preprocessing the EEG signal to obtain a preprocessed EEG signal;
[0152] S22, extracting features from the preprocessed EEG signal to obtain EEG signal feature information;
[0153] S23, performing feature selection and dimension reduction on the EEG signal feature information to obtain EEG emotion feature information.
[0154] Optionally, the method for extracting features from the preprocessed EEG signal may be: performing EMD decomposition on the preprocessed EEG signal to obtain an IMF component c i (t), i = 1, 2, ..., N, N is the number of IMF components; the IMF components are characteristic parameter information;
[0155] The normalization function is Among them, x max is the maximum value of data information, x min is the minimum value of data information, data information is x(t), and x'(t) is the normalized data information;
[0156] The preprocessed EEG signal is decomposed into IMFs with different time scales, simple components and relatively stable. All the maximum and minimum points of x'(t) are determined, and the corresponding upper envelope e is obtained by polynomial interpolation. max (t) and the lower envelope e min (t), and the mean m(t)=(e min(t)+e max (t)) / 2, extract the detail h(t) according to x'(t) and the mean m(t), let h(t) = x'(t)-m(t), if h(t) conforms to IMF, it is the first modal component IMF1 (denoted as c1(t)); otherwise let h(t) = x'(t), continue to decompose, and finally decompose into Among them, r(t) is the remainder.
[0157] Optionally, the method for feature selection and dimensionality reduction of the EEG signal feature information is: perform data truncation processing on the EEG signal feature information, set a threshold value according to the experiment, remove feature information greater than the threshold value as singular values, and then use the principal component analysis method to perform dimensionality reduction processing.
[0158] Optionally, preprocessing the EEG signal to obtain a preprocessed EEG signal includes:
[0159] S211, performing low-frequency offset removal processing on the electroencephalogram signal to obtain a de-offset electroencephalogram signal;
[0160] The baseline drift correction method is used to subtract the original data from the baseline value to remove the low-frequency offset;
[0161] S212, performing denoising processing on the de-shifted EEG signal to obtain a denoised EEG signal;
[0162] The specific denoising method is:
[0163] The de-shifted EEG signals were converted to the time-frequency domain using STFT (Short Time Fourier Transform), using a window length of 256 samples, an overlap rate of 75%, and a Hamming window. The length of the spectrum vector can be reduced to 129 by discarding frequency samples corresponding to negative frequencies. A fully convolutional network consisting of 16 convolutional layers was defined. The size of the convolution kernel of the first layer was 9×8, with 18 convolution kernels. The second to 13th convolutional layers were groups of 3 layers repeated 4 times, with convolution kernel widths of 5, 9, and 9, respectively, and the number of convolution kernels was 64. The convolution kernel width of the last convolution layer was 129 and there was only 1 convolution kernel. In this network, convolution was performed only in the frequency dimension, and for all layers except the first layer, the convolution kernel width along the time dimension was set to 1. The convolution layers were all followed by a batch normalization layer and a ReLU activation function layer, and finally output through a regression layer.
[0164] A convolutional neural network is established to complete the mapping F between the received de-shifted EEG signal STFT spectrum X(m,k) and the clean de-shifted EEG signal STFT spectrum S(m,k) to achieve the purpose of denoising. The input predictor signal and the network target signal are the amplitude spectra of the received noisy de-shifted EEG signal and the clean de-shifted EEG signal, respectively. The goal of the network is to learn the mapping F so that the network outputs the amplitude spectrum of the noisy de-shifted EEG signal. The regression network uses the predictor input to minimize the mean square error between its output and the input target. Therefore, the loss function of the denoising network can be expressed as
[0165]
[0166] Among them, B represents the batch size, M and K represent the total number of STFT time frames and frequency points, respectively. Finally, the denoised and de-shifted EEG signal is converted back to the time domain signal using the amplitude spectrum output by the network and the phase of the received noisy and de-shifted EEG signal.
[0167] Optionally, the denoising method process includes:
[0168] Use STFT (Short Time Fourier Transform) to convert the de-shifted EEG signal into the time-frequency domain and set the initial threshold δ th The target interval is [α, β], where 0≤α<β≤max{S(m,n)}, and S(m,n) is the time-frequency spectrum after STFT transformation;
[0169] Divide the target interval [α, β] into L equal parts;
[0170] The initial threshold δ th Set to α, according to The step size is incremented and iterated to obtain the threshold
[0171] Utilizing Thresholds Calculate the feature information of the sub-image after filtering at each iteration
[0172]
[0173] Among them, S(m,n) represents the atomic graph feature information, represents the feature information of the sub-image after filtering, and a and b represent the time and frequency parameters in the threshold;
[0174] Calculate the difference between each iteration and the sub-graph feature information obtained in the previous iteration i1=1,2,…, i1 is the number of iterations;
[0175] The difference Perform curve fitting to obtain curve C. When curve C has an inflection point, the corresponding threshold is the optimal threshold.
[0176] The optimal threshold is used to perform optimal threshold filtering on the atomic graph feature information S(m,n) to obtain the sub-graph feature information after filtering, and then an STFT inverse transform is performed to obtain a denoised EEG signal.
[0177] S213, performing artifact suppression processing on the denoised EEG signal to obtain an artifact-free EEG signal;
[0178] Artifact suppression processing is: using motion artifact suppression technology to identify and eliminate artifacts and noise caused by head and eye movements in EEG signals;
[0179] S214, performing enhancement processing on the artifact-free EEG signal to obtain a preprocessed EEG signal.
[0180] The enhancement processing is a prior art in the art, such as using wavelet transform, etc., and this embodiment does not limit it.
[0181] Optionally, the extracting features of the preprocessed EEG signal to obtain EEG signal feature information includes:
[0182] S221, extracting frequency domain features of the preprocessed EEG signal to obtain frequency domain feature information of the EEG signal;
[0183] The frequency domain feature information is a fusion parameter of power spectrum density, energy, coherence and cross-correlation function;
[0184] S222, extracting time domain features of the preprocessed EEG signal to obtain time domain feature information of the EEG signal;
[0185] The time domain feature information is the fusion parameters of mean, standard deviation, slope and peak value;
[0186] S223, performing spatial domain feature extraction on the preprocessed EEG signal to obtain spatial domain feature information of the EEG signal; the spatial domain feature information includes scalp potential distribution information and fusion parameters of wavelet transform parameters;
[0187] S224, performing feature fusion on the EEG signal frequency domain feature information, the EEG signal time domain feature information and the EEG signal space domain feature information to obtain EEG signal feature information.
[0188] The specific fusion method is:
[0189] The two feature matrices that need to be fused are X and Y, X is an n′×m′ dimensional matrix, Y is a p×m′ dimensional matrix, m′ represents the number of samples, n′ and p represent the dimensions of the two features, and the two matrices are projected to 1 dimension for linear representation, corresponding to the projection vectors a1 and b1 respectively, then the feature matrix after projection becomes:
[0190]
[0191] The purpose is to maximize the correlation coefficient between X' and Y', so as to obtain the projection vectors a1 and b1 when the correlation coefficient is maximum, that is:
[0192]
[0193] Before projection, the data is standardized. The purpose of standardization is to make the mean of the data 0 and the variance 1. We can get:
[0194] cov(X',Y')=cov(a1 T X,b1 T Y)=E(<a1 T X,b1 T Y>)=E((a1 T X)(b1 T Y) T )=a1 T E(XY T )b1
[0195]
[0196]
[0197] D(X)=cov(X,X)=E(X T X)
[0198] D(Y)=cov(Y,Y)=E(Y T Y)
[0199] cov(X,Y)=E(XY T ),cov(Y,X)=E(YX T )
[0200] S XX =cov(X,X), then the solution objective is transformed into:
[0201]
[0202] Step 1: Calculate the variance S of X and Y XX and S YY , the covariance S of XY and YX XY =S YXT ;
[0203] Step 2: Calculate the matrix
[0204] Step 3: Solve the singular values of M′ to obtain the largest singular value and its preceding and following singular vectors u, v;
[0205] Step 4: The projection vectors a1 and b1 of X and Y are:
[0206]
[0207] Step 5: The fusion feature vector Z of X and Y is
[0208] Optionally, the facial image signal is processed by a data processing module to obtain facial emotion feature information, including:
[0209] S31, preprocessing the facial image signal to obtain a preprocessed facial image signal;
[0210] S32, performing feature extraction on the pre-processed facial image signal to obtain facial emotion feature information.
[0211] Optionally, preprocessing the facial image signal to obtain a preprocessed facial image signal includes:
[0212] S311, performing face detection on the facial image signal to obtain facial image information;
[0213] Face detection is a prior art in the art and is not limited in this embodiment.
[0214] S312, segmenting the facial image information to obtain a preprocessed facial image signal, wherein the preprocessed facial image signal includes 8 facial segmentation image signals.
[0215] The segmentation process here is to sample the facial image information to obtain sub-images, perform scale normalization on the sub-images, do not change the structure of each sub-image, fill in around them, and obtain N sub-images of the same size, that is, N eigenfaces, and cluster the N eigenfaces using the agglomerative hierarchical clustering method to obtain 8 facial segmentation image signals;
[0216] Optionally, the extracting features of the preprocessed facial image signal to obtain facial emotion feature information includes:
[0217] S321, performing clustering processing on the pre-processed facial image signal to obtain a facial emotion feature image signal;
[0218] S322, performing scale normalization processing on the facial image emotion feature image signal to obtain a normalized facial emotion feature image signal;
[0219] S323, performing feature extraction on the normalized facial emotion feature image signal to obtain facial emotion feature information.
[0220] Optionally, the normalized facial emotion feature image signal is feature extracted using the VGG19 network model and parameters pre-trained on ImageNet. Before extracting features, the size of the input image needs to match the input interface size of the model, and all input images are uniformly normalized to a size of 224×224 pixels. The feature map output by the convolutional layer of the VGG19 network is 14×14×512 in size, i.e., 512 feature maps of size 14×14. In order to retain image information as much as possible, this feature map is expanded into a 1-dimensional column vector before being sent to clustering. The feature map is clustered using agglomerative hierarchical clustering to obtain facial emotion feature information.
[0221] Optionally, the representation of feature points of facial emotion feature information can be uniformly expressed by the following equation:
[0222]
[0223] In the above formula, mσ refers to the sub-region size, and T refers to the sampling step size. All features are collected with a step size of T, so the feature points can be represented as a separate convolution. Through a series of symmetry and window function transformations, the following two derivation changes can be generated:
[0224]
[0225]
[0226] T'=T+mσ
[0227] After that, define the kernel function:
[0228]
[0229]
[0230] The convolution formula derived using the above two kernel functions is as follows:
[0231]
[0232]
[0233] According to the separable characteristics of the Gaussian function, the two-dimensional convolution is separated into convolutions of two dimensions and then added. The following window function works better, and the kernel does not depend on mσ.
[0234]
[0235]
[0236] In order to ensure that there will be no resampling problems and special boundary conditions, the center of the sub-region T+mσ is always an integer coordinate, as shown below:
[0237]
[0238] This ensures that the center of the sub-region is always an integer. The above is the process of extracting facial emotion feature information.
[0239] Embodiment 2
[0240] This embodiment designs and implements a multimodal emotion recognition system of facial expression and brain-computer interface by considering the application of technology and system functions, striving to be able to recognize human emotions in a portable, accurate and stable manner.
[0241] The facial expression recognition module of this embodiment is a computer program that can automatically recognize human facial expressions. Human facial expressions are detected and analyzed through the faces in the image, and converted into text form for analysis and application. The multimodal emotion recognition system developed in this embodiment is completed on the Raspberry Pi, including the acquisition of EEG signals and facial image signals, the training of offline models and emotion recognition. The face recognition adopts the classic feature face algorithm. The system includes a camera module, an EEG signal acquisition module, a Raspberry Pi module and a main control module. The functions of each part are as follows: Camera module: used to collect facial image signals; EEG signal acquisition module is used to collect EEG signals using an EEG cap; Raspberry Pi: used to process EEG signals and facial image signals, and output emotion recognition results; Main control module: used to read, process and store data.
[0242] The data processing of Raspberry Pi includes three parts: facial expression recognition, EEG emotion recognition, and data fusion. Facial expression recognition can call the camera to collect facial images, and perform data processing and classification in the system to obtain emotion classification data results; EEG emotion recognition collects EEG signals through a dual-channel EEG cap, and processes and classifies EEG signals in the system to obtain EEG emotion classification data; data fusion fuses the data processed by the facial expression recognition module with the data obtained by the EEG emotion recognition module to obtain the final emotion recognition result.
[0243] The Raspberry Pi model used in this system is Raspberry Pi 3b+. 3b+ uses a 64-bit 1.4GHz quad-core CPU, the SOC model is Broadcom BCM2837B0, and the communication uses Bluetooth 4.2 and 2.4GHz / 5GHz dual-band wifi. The wired network supports Gigabit Ethernet. Compared with the previous generation Raspberry Pi 3b, the hardware has been greatly upgraded.
[0244] Embodiment 3
[0245] See also Figure 2 , Figure 2 is a schematic diagram of the structure of a multimodal emotion recognition device disclosed in an embodiment of the present invention. Figure 2 The multimodal emotion recognition device described is applied to an emotion recognition system to reflect a person's current physical and psychological state, which is not limited in the embodiments of the present invention. Figure 2 As shown, the multimodal emotion recognition device may include the following operations:
[0246] S301, a data acquisition module, used to acquire EEG signals and facial image signals;
[0247] S302, an EEG emotion feature extraction module, used to process the EEG signal to obtain EEG emotion feature information;
[0248] S303, a facial emotion feature extraction module, used to process the facial image signal to obtain facial emotion feature information;
[0249] S304, a feature fusion module, used to fuse the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information;
[0250] S305, an emotion recognition module is used to process the fused emotion feature information using a preset multimodal emotion recognition model to obtain a multimodal emotion recognition result.
[0251] Embodiment 4
[0252] See also Figure 3 , Figure 3 is a schematic diagram of the structure of another multimodal emotion recognition device disclosed in an embodiment of the present invention. Figure 3 The multimodal emotion recognition device described is applied to an emotion recognition system to reflect a person's current physical and psychological state, which is not limited in the embodiments of the present invention. Figure 3 As shown, the multimodal emotion recognition device may include the following operations:
[0253] A memory 401 storing executable program codes;
[0254] a processor 402 coupled to the memory 401;
[0255] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the multimodal emotion recognition method described in the first embodiment and the second embodiment.
[0256] Embodiment 5
[0257] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps in the multimodal emotion recognition method described in the first embodiment.
[0258] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0259] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0260] Finally, it should be noted that the multimodal emotion recognition method and device disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, which are only used to illustrate the technical scheme of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical schemes described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical schemes from the spirit and scope of the technical schemes of the embodiments of the present invention.
Claims
1. A multimodal emotion recognition method, It is characterized in that The method comprises: S1, obtains EEG signals and facial image signals; S2, processing the EEG signal to obtain EEG emotion feature information; S3, processing the facial image signal to obtain facial emotion feature information; S4, fusing the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information; S5, using a preset multimodal emotion recognition model to process the fused emotion feature information to obtain a multimodal emotion recognition result.
2. The multimodal emotion recognition method according to claim 1, It is characterized in that The processing of the EEG signal to obtain EEG emotion feature information includes: S21, preprocessing the EEG signal to obtain a preprocessed EEG signal; S22, extracting features from the preprocessed EEG signal to obtain EEG signal feature information; S23, performing feature selection and dimension reduction on the EEG signal feature information to obtain EEG emotion feature information.
3. The multimodal emotion recognition method according to claim 2, It is characterized in that The preprocessing of the EEG signal to obtain a preprocessed EEG signal includes: S211, performing low-frequency offset removal processing on the electroencephalogram signal to obtain a de-offset electroencephalogram signal; S212, performing denoising processing on the de-shifted EEG signal to obtain a denoised EEG signal; S213, performing artifact suppression processing on the denoised EEG signal to obtain an artifact-free EEG signal; S214, performing enhancement processing on the artifact-free EEG signal to obtain a preprocessed EEG signal.
4. The multimodal emotion recognition method according to claim 3, It is characterized in that The step of extracting features from the preprocessed EEG signal to obtain EEG signal feature information includes: S221, extracting frequency domain features of the preprocessed EEG signal to obtain frequency domain feature information of the EEG signal; S222, extracting time domain features of the preprocessed EEG signal to obtain time domain feature information of the EEG signal; S223, performing spatial domain feature extraction on the preprocessed EEG signal to obtain spatial domain feature information of the EEG signal; S224, performing feature fusion on the EEG signal frequency domain feature information, the EEG signal time domain feature information and the EEG signal space domain feature information to obtain EEG signal feature information.
5. The multimodal emotion recognition method according to claim 1, It is characterized in that The facial image signal is processed by a data processing module to obtain facial emotion feature information, including: S31, preprocessing the facial image signal to obtain a preprocessed facial image signal; S32, performing feature extraction on the pre-processed facial image signal to obtain facial emotion feature information.
6. The multimodal emotion recognition method according to claim 5, It is characterized in that The preprocessing of the facial image signal to obtain a preprocessed facial image signal comprises: S311, performing face detection on the facial image signal to obtain facial image information; S312, segmenting the facial image information to obtain a preprocessed facial image signal, wherein the preprocessed facial image signal includes 8 facial segmentation image signals.
7. The multimodal emotion recognition method according to claim 5, It is characterized in that The step of extracting features from the preprocessed facial image signal to obtain facial emotion feature information includes: S321, performing clustering processing on the pre-processed facial image signal to obtain a facial emotion feature image signal; S322, performing scale normalization processing on the facial image emotion feature image signal to obtain a normalized facial emotion feature image signal; S323, performing feature extraction on the normalized facial emotion feature image signal to obtain facial emotion feature information.
8. A multimodal emotion recognition device, It is characterized in that The device comprises: A data acquisition module, used for acquiring EEG signals and facial image signals; An EEG emotion feature extraction module is used to process the EEG signal to obtain EEG emotion feature information; A facial emotion feature extraction module, used for processing the facial image signal to obtain facial emotion feature information; A feature fusion module, used to fuse the EEG emotion feature information and the facial emotion feature information to obtain fused emotion feature information; The emotion recognition module is used to process the fused emotion feature information using a preset multimodal emotion recognition model to obtain a multimodal emotion recognition result.
9. A multimodal emotion recognition device, It is characterized in that The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the multimodal emotion recognition method as described in any one of claims 1-7.
10. A computer storable medium, It is characterized in that The computer storable medium stores computer instructions, and when the computer instructions are called, they are used to execute the multimodal emotion recognition method as described in any one of claims 1-7.
Citation Information
Cited By
Risk assessment management system and method based on neural recognition technology
CN119249107A
