An electroencephalogram emotion recognition method based on a deep residual convolutional neural network

By automatically learning the latent features of EEG signals through deep residual convolutional neural networks, the limitations of manual feature extraction in existing technologies are overcome, and efficient emotion recognition is achieved.

CN116049636BActive Publication Date: 2025-12-16SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310073752.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-03
Publication Date
2025-12-16
Estimated Expiration
2043-02-03

AI Technical Summary

Technical Problem

Existing emotion recognition methods based on EEG signals require manual feature extraction, ignoring the complex information contained in electrodes at different locations, making it difficult to automatically learn potential, deeper, and more robust features that represent emotions.

Method used

A brainwave emotion recognition method based on deep residual convolutional neural networks is adopted. By extracting brainwave signals, calculating power spectral density, building a deep residual convolutional neural network model, and training it with an improved Adam optimization algorithm, the emotional features are automatically learned.

Benefits of technology

It achieves high accuracy, precision, sensitivity and specificity in EEG emotion recognition, makes full use of the complex information of electrodes at different locations, avoids the gradient vanishing problem, and improves the recognition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049636B_ABST
    Figure CN116049636B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electroencephalogram emotion recognition methods based on deep residual convolutional neural network, belong to electroencephalogram emotion recognition technical field, including the following steps: electroencephalogram signal is preprocessed and label division;The electroencephalogram power spectral density of all electroencephalogram channels is calculated, and the electroencephalogram power spectral density of all electroencephalogram channels is spliced into a frequency channel input matrix;Frequency channel input matrix is divided into training set and test set;Build electroencephalogram emotion recognition model based on deep residual convolutional neural network;The training set of random small batch processing is used to train the electroencephalogram emotion recognition model built by S4, and the model parameter optimization training is carried out by improved Adam optimization algorithm;Test set is input into the electroencephalogram emotion recognition model after training, and the test set classification result is obtained;According to test set classification result, electroencephalogram emotion recognition model performance is judged.The present application fully considers the complex potential information contained in different position electrodes, and has strong robustness.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of electroencephalogram emotion recognition, and particularly relates to an electroencephalogram emotion recognition method based on a deep residual convolutional neural network. BACKGROUND

[0002] Human emotion is a complex psychological and physiological state, and plays a very important role in interpersonal communication and human-computer interaction. With the continuous progress of artificial intelligence and other technologies, emotion recognition, as a branch of affective computing, is the basis and core technology for realizing human-computer emotion interaction. Generally, existing emotion recognition methods can be roughly divided into two categories. One type is based on the measurement of non-physiological signals such as facial expressions, gestures, and speech. The other type is based on the measurement of physiological signals such as electrocardiogram, electromyogram, and electroencephalogram. Considering that the electroencephalogram signal has a high time resolution and is not easily controlled by subjective consciousness, in recent years, emotion recognition based on physiological signals represented by the electroencephalogram signal has attracted widespread attention in the field.

[0003] At present, the emotion recognition method based on the electroencephalogram usually needs the steps of manual feature extraction, feature selection, statistical analysis, classifier design, classification performance comparison and optimization. In addition, the nonlinear index mainly describes the brain activity law caused by emotional changes for single-electrode EEG signals, ignores the complex information contained in different position electrodes, and has certain limitations in the evaluation of the overall state of the brain. Therefore, how to automatically learn potential, deep, and more robust features representing emotions has become a difficulty in emotion recognition based on electroencephalogram signals. SUMMARY

[0004] The technical problem to be solved by the application is to provide an electroencephalogram emotion recognition method based on a deep residual convolutional neural network, which can automatically learn potential, deep, and more robust features representing emotions.

[0005] To solve the above technical problems, the technical scheme adopted by the application is:

[0006] An electroencephalogram emotion recognition method based on a deep residual convolutional neural network, characterized in that the method comprises the following steps:

[0007] S1, extracting electroencephalogram signals of 32 electroencephalogram channels in an electroencephalogram original signal, and performing preprocessing and label division on the electroencephalogram signals;

[0008] S2, calculating electroencephalogram power spectrum densities of all electroencephalogram channels, and splicing the electroencephalogram power spectrum densities of all electroencephalogram channels into a frequency channel input matrix;

[0009] S3, dividing the frequency channel input matrix into a training set and a test set;

[0010] S4, build an EEG emotion recognition model based on a deep residual convolutional neural network;

[0011] S5, the EEG emotion recognition model built in S4 is trained by using a random small batch processing training set, and the model parameter optimization training is performed through an improved Adam optimization algorithm;

[0012] S6, the test set is input into the trained EEG emotion recognition model to obtain the test set classification result;

[0013] S7, the EEG emotion recognition model performance is judged according to the test set classification result.

[0014] Further improvement of the technical scheme of the application is that in S1, the method for labeling the EEG signal is: according to the 1-9 score questionnaire of a plurality of subjects on the Valence and Arousal of a specific video to make a psychological scale, the sample with Valence greater than or equal to 5 and Arousal greater than or equal to 5 is defined as positive emotion, and the label is set to 1; the sample with Valence less than 5 and Arousal less than 5 is defined as negative emotion, and the label is set to 0; and the 32-channel EEG data of each subject is segmented into 1 second without overlapping samples.

[0015] Further improvement of the technical scheme of the application is that in S2, the method comprises the following steps:

[0016] S2.1 according to the Welch method in non-parametric estimation, the periodogram is obtained, and the power spectral density of different channels is obtained;

[0017] For each channel of the EEG signal x, the periodogram of the mth segment x m (n) is:

[0018]

[0019] Wherein, w(n) is a Hamming window, n is the window length, f is the frequency, the overlap rate is 75%, K is 128, and j represents the imaginary unit;

[0020] S2.2 the power spectral densities of 32 channels are spliced into a frequency channel input matrix, and the size of the frequency channel input matrix is 224*224*3.

[0021] Further improvement of the technical scheme of the present application is that in S4, the electroencephalogram emotion recognition model based on the deep residual convolutional neural network comprises an input layer, a convolution layer, a batch normalization layer, a ReLU activation function layer, a pooling layer, a residual block, a full connection layer and a classification output layer; the input layer is connected with the convolution layer conv1, the batch normalization bn_conv1, the ReLU activation function layer, the pooling layer pool1 in sequence, then connected with the basic residual block RES2a and the basic residual block RES2b, then connected with the basic residual blocks RES3A, RES3b, RES4A, RES4b, RES5A and RES5b in sequence, then connected with the global average pooling layer pool5, and finally connected with the full connection layer and the classification output layer.

[0022] Further improvement of the technical scheme of the present application is that the structure of the basic residual block RES2a is that: input from the pooling layer pool1, form two branches, the left branch is connected with the res2a_branch2a convolution layer with a size of 3*3*64 and a stride of [1 1], then complete the batch normalization bn2a_branch2a, and then complete the nonlinear activation res2a_branch2a_relu according to the following formula:

[0023] f(x)=max(0,x)

[0024] Then connect the res2a_branch2b convolution layer with a size of 3*3*64 and a stride of [1 1] and the batch normalization bn2a_branch2a in sequence, the right branch is pool1, and finally add the two inputs according to elements by res2a; add an identity mapping in the network structure, that is, directly connect pool1 with res2a;

[0025] The basic residual block RES2b has the same structure as the basic residual block RES2a.

[0026] Further improvement of the technical scheme of the present application is that in S5, the training set of the constructed frequency channel input matrix is taken as the input of the electroencephalogram emotion recognition model, and the electroencephalogram emotion recognition model is trained.

[0027] The minimum sample number of each batch is set to 500, the maximum training number is set to 10 rounds, the data samples of the training set are randomly shuffled before each round of training, the optimizer adopts an improved Adam optimizer, and the learning rate is an adaptive adjustment learning rate:

[0028]

[0029] Wherein, decayrate is the decay rate, ep_num is the number of cycles, and alpha0 is the initial learning rate.

[0030] The improved Adam optimization algorithm introduces Nesterov in Adam, and the expression of the improved Adam optimization algorithm is

[0031]

[0032] Wherein, theta t+1 is the optimization parameter at t+1 moment, theta t is the optimization parameter at t moment, eta is the learning rate, is the corrected first momentum estimate, is the corrected second momentum estimate, epsilon is the smoothing factor, beta1 is the Adam attenuation coefficient, is the Adam attenuation coefficient at t moment, m t-1 is the momentum at t-1 moment, g t is the gradient.

[0033] Further improvement of the technical scheme of the application is that in S7, the performance and reliability of the electroencephalogram emotion recognition model are evaluated by confusion matrix, accuracy, F1-score, precision, sensitivity and specificity, and the calculation method is as follows:

[0034]

[0035]

[0036]

[0037]

[0038]

[0039] Wherein, Acc is the accuracy, Pre is the precision, Sen is the sensitivity, Spe is the specificity, TP is the true positive, that is, the number of samples accurately identified as positive emotion by the model, FP is the false positive, that is, the number of samples of negative emotion incorrectly identified as positive emotion, FN is the false negative, that is, the number of samples of positive emotion incorrectly identified as negative emotion, and TN is the true negative, that is, the number of samples accurately identified as negative emotion by the model.

[0040] Due to the adoption of the above technical scheme, the technical progress achieved by the application is:

[0041] 1. This invention eliminates the tedious steps of manually extracting EEG features. To fully utilize the advantages of deep learning models automatically learning features, the frequency channel input matrix constructed using the Welch method is used as the input to the deep learning model. The Welch method is applied to all leads, and the spectrograms of all leads are stitched together to form the aforementioned frequency channel input matrix. This fully utilizes the complex information contained in electrodes at different locations, reflecting more detailed features of emotional signals. A deep residual convolutional neural network with transfer learning technology is built to uncover potential, deeper, and more robust features representing emotions. This invention has high recognition accuracy, precision, sensitivity, specificity, and F1-score, and can be used in the field of emotion recognition based on EEG signals.

[0042] 2. This invention adopts a training mechanism of random mini-batch processing, which divides the data into several batches and updates the parameters by batch. On the one hand, a group of data in a batch jointly determines the direction of the gradient, making it less likely to go astray during descent and reducing randomness; on the other hand, because the number of samples in a batch is much smaller than the entire dataset, the amount of computation is not very large.

[0043] 3. This invention relates to an EEG emotion recognition model based on a deep residual convolutional neural network. By setting the model structure specifically for EEG emotion recognition, the recognition rate of EEG emotion is greatly improved. The model includes an input layer, a convolutional layer, batch normalization, ReLU, pooling layer, residual blocks, a fully connected layer, and a classification output layer. The input layer is sequentially connected to the convolutional layer conv1, the batch normalization layer bn_conv1, ReLU, and the pooling layer pool1, and then connected to two basic residual blocks, RES2a and RES2b. These basic residual blocks are then sequentially connected to the basic residual blocks RES3A, RES3b, RES4A, RES4b, RES5A, and RES5b, and then connected to the global average pooling layer pool5. Finally, it is connected to the classification output layer through a fully connected layer. Moreover, after training, the model obtains unique parameter weights and bias parameters.

[0044] 4. This invention avoids the gradient vanishing problem by using residual blocks. Without residual blocks, if the network has many layers, to update the weights of the lower layers (closer to the input data), we first need to calculate their gradients. According to the chain rule, this requires multiplying forward continuously. If any factor is too small, the resulting gradient will be very small, and even multiplying it by a large learning rate will be ineffective. However, this invention uses residual blocks, allowing gradient calculation to directly reach the target object through a "highway." No matter how small the gradient obtained through the chain rule is, the sum of the two paths will not be small, thus enabling efficient gradient updates. Attached Figure Description

[0045] Figure 1 is the flow chart of the identification method of the present application;

[0046] Figure 2 is the schematic diagram of the conversion of 1D 32-channel electroencephalogram signals into a frequency channel input matrix in the present application;

[0047] Figure 3 is the structural schematic diagram of the deep residual convolutional neural network with transfer learning technology in the present application. DETAILED DESCRIPTION

[0048] The present application will be further described in detail below in combination with the drawings and embodiments:

[0049] As shown in the drawings, Figure 1 a deep residual convolutional neural network-based electroencephalogram emotion recognition method, comprising the following steps:

[0050] S1, extracting 32 electroencephalogram signals of 32 electroencephalogram channels in the electroencephalogram original signal, and pre-processing and label dividing the electroencephalogram signals;

[0051] S1.1 For the DEAP dataset (electroencephalogram signal depth dataset) of a plurality of subjects, 32 electroencephalogram channels are selected from 40 channel data, according to the international 10-20 system, the 32 electroencephalogram channels include Fp1, AF3, F3, F7, FC5, FC1, C3, T7, CP5, CP1, P3, P7, PO3, O1, Oz, Pz, Fp2, AF4, Fz, F4, F8, FC6, FC, Cz, C4, T8, Cp6, Cp2, P4, P8, PO4, O2, and the pre-silence signal and eye movement artifact of the first 3 seconds in the 32 electroencephalogram channel electroencephalogram signals are removed, 4.0-45.0Hz band signals are obtained through a band-pass filter, and pre-processed electroencephalogram signals are obtained;

[0052] S1.2 Labeling the pre-processed electroencephalogram signals;

[0053] The method for dividing the labels of the electroencephalogram signals is: according to the 1-9 score questionnaire survey of a plurality of subjects on the Valence and Arousal of a specific video to make a psychological scale, samples with Valence greater than or equal to 5 points and Arousal greater than or equal to 5 points are considered to be positive emotions, and the label is set to 1; samples with Valence less than 5 points and Arousal less than 5 points are considered to be negative emotions, and the label is set to 0; and the 32-channel electroencephalogram data of each subject is segmented into 1 second without overlapping samples.

[0054] S2, calculating the electroencephalogram power spectral density of all electroencephalogram channels, and splicing the electroencephalogram power spectral density of all electroencephalogram channels into a frequency channel input matrix;

[0055] S2.1 Obtain the periodogram according to the Welch method in non-parametric estimation, and obtain the power spectral density of different channels;

[0056] As shown in Figure 2 , for each channel of the electroencephalogram signal x, the periodogram of the mth segment x m (n) is:

[0057]

[0058] where w(n) is a Hamming window, n is the window length, f is the frequency, the overlap rate is 75%, K is 128, and j represents the imaginary unit;

[0059] In order to alleviate the problems such as low resolution of the periodogram method in the classical spectrum estimation method and insufficient precision of the power spectral density estimation, an improved method of the periodogram method is adopted, the resolution of the power spectral density estimation is improved by segmenting and overlapping the electroencephalogram signal and windowing operation, so as to obtain the power spectral density of different channels.

[0060] S2.2 splice the power spectral densities of 32 channels into a frequency channel input matrix, and the size of the frequency channel input matrix is 224*224*3.

[0061] S3, divide the frequency channel input matrix into a training set and a test set;

[0062] The constructed frequency channel input matrix and its corresponding label are randomly shuffled to ensure that the training set and the test set have no overlapping data, and the training set and the test set are divided according to the ratio of 8:2.

[0063] S4, build an electroencephalogram emotion recognition model based on a deep residual convolutional neural network;

[0064] The electroencephalogram emotion recognition model based on the deep residual convolutional neural network includes an input layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, a pooling layer, a residual block, a fully connected layer and a classification output layer; the input layer is connected with the convolutional layer conv1, the batch normalization bn_conv1, the ReLU activation function layer, the pooling layer pool1 in turn, and then connected with the basic residual block RES2a and the basic residual block RES2b, then connected with the basic residual blocks RES3A, RES3b, RES4A, RES4b, RES5A, RES5b in turn, and then connected with the global average pooling layer pool5, and finally connected with the classification output layer through the fully connected layer;

[0065] As shown in Figure 3 , for the electroencephalogram emotion recognition model based on the deep residual convolutional neural network, the size of the frequency channel input matrix is 224*224*3, and Z-score normalization is adopted.

[0066] wherein the structure of the basic residual block RES2a is: from the input of the pooling layer pool1, two branches are formed, the left branch is connected with the res2a_branch2a convolution layer with the size of 3x3x64 and the stride of [1 1], then the batch normalization bn2a_branch2a is completed, and then the nonlinear activation res2a_branch2a_relu is completed according to the following formula:

[0067] f(x) = max(0, x)

[0068] then the res2a_branch2b convolution layer with the size of 3x3x64 and the stride of [1 1] and the batch normalization bn2a_branch2a are sequentially connected, the right branch is pool1, and finally the two inputs are elementarily added by res2a; an identity mapping is added in the network structure, that is, pool1 is directly connected with res2a.

[0069] The basic residual block RES2b has the same structure as the basic residual block RES2a.

[0070] The structure of the basic residual block RES3A is: from the input of res2b_relu, two branches are formed, the left branch is connected with the res3a_branch2a convolution layer with the size of 3x3x64 and the stride of [2 2], then the batch normalization bn3a_branch2a is completed, then the nonlinear activation res3a_branch2a_relu is completed, then the res3a_branch2b convolution layer with the size of 3x3x128 and the stride of [2 2] and the batch normalization bn3a_branch2a are sequentially connected; the right branch is connected with the res3a_branch1 convolution layer with the size of 1x1x64 and the stride of [2 2], then the batch normalization bn3a_branch1 is completed, and finally the two inputs are elementarily added by res3a;

[0071] The basic residual block RES3b has the same structure as the basic residual block RES2a except that the number of convolution kernels of res3b_branch2a and res3b_branch2b is 128.

[0072] The basic residual block RES4A has the same structure as the basic residual block RES3A except that the number of convolution kernels of res4a_branch2a, res4a_branch2b and res4a_branch1 is 128 and 256.

[0073] The basic residual block RES4b has the same structure as the basic residual block RES2a except that the number of convolution kernels of res4b_branch2a and res4b_branch2b is 256.

[0074] The basic residual block RES5A is consistent with the structure of RES3A, except that the number of convolution kernels of res5a_branch2a and res5a_branch2b is 256 and 512, and the number of convolution kernels of res5a_branch1 is 256;

[0075] The basic residual block RES5b is consistent with the structure of RES2a, except that the number of convolution kernels of res5b_branch2a and res5b_branch2b is 512;

[0076] The fully connected layer is fc2, the classification output layer is Class_output, the cross-entropy loss function is used as the target classification function, the probability predicted for each emotional category is p and 1-p respectively, and the expression of the cross-entropy loss function CE is:

[0077]

[0078] where y i is the label of sample i, positive emotion and negative emotion correspond to 1 and 0 respectively; p i is the probability of sample i being predicted as positive emotion, N is the number of emotional categories, and Li is the cross-entropy loss function of each category.

[0079] S5, using the training set of random mini batch processing to train the EEG emotion recognition model built in S4, and using the improved Adam optimization algorithm to optimize and train the model parameters;

[0080] The training set of the constructed frequency channel input matrix is used as the input of the EEG emotion recognition model, and the EEG emotion recognition model is trained;

[0081] The training mechanism of random mini batch processing is used to divide the training set. The training mechanism of random mini batch processing is a compromise method between calculating the loss function once for all data sets and calculating the loss function once for each data. This method divides the training set into several batches, and updates the parameters by batch. In this way, a group of data in a batch determines the direction of the gradient this time, and it is not easy to deviate when descending, reducing randomness. On the other hand, because the number of samples in the batch is much smaller than the entire data set, the computational complexity is not very large.

[0082] The minimum number of samples per batch is set to 500, and the maximum number of training rounds is set to 10 rounds. Before each round of training, the data samples of the training set are randomly shuffled, the optimizer uses the improved Adam optimizer, and the learning rate is the adaptive learning rate:

[0083]

[0084] Where decayrate is the decay rate, ep_num is the number of iterations, and α0 is the initial learning rate;

[0085] The improved Adam optimization algorithm introduces Nesterov into Adam, which accelerates the process and combines the advantages of Adam with the fast convergence and low variability of Nesterov.

[0086] Specifically, the improved Adam optimization algorithm firstly builds upon Adam by... Expand

[0087]

[0088]

[0089] At this point, if we take the momentum m at time t-1... t-1 Using the momentum m at time t t If we use an approximate substitution, then we introduce future factors, so we will use m t-1 Replace with m t This gives us the expression for the improved Adam optimization algorithm.

[0090]

[0091] Where, θ t+1 To optimize the parameters at time t+1, θ t Let η be the learning rate, and let η be the parameter to be optimized at time t. For the corrected first-order momentum estimate, For the corrected second-order momentum estimate, ε is the smoothing factor, and β1 is the Adam decay coefficient. Let m be the Adam decay coefficient at time t. t-1 Let g be the momentum at time t-1. t For gradient.

[0092] S6. Input the test set into the trained EEG emotion recognition model to obtain the test set classification results;

[0093] The test set is input into the trained EEG emotion recognition model to classify the test set data and output the emotional states of several subjects.

[0094] S7. Judge the performance of the EEG emotion recognition model based on the classification results of the test set;

[0095] The performance and reliability of the EEG emotion recognition model were evaluated using confusion matrix, accuracy, F1 score, precision, sensitivity, and specificity, calculated as follows:

[0096]

[0097]

[0098]

[0099]

[0100]

[0101] Wherein, Acc is the accuracy, Pre is the precision, Sen is the sensitivity, Spe is the specificity, TP is the true positive, that is, the number of samples that the model can accurately identify as positive emotion, FP is the false positive, that is, the number of samples that the negative emotion is incorrectly identified as positive emotion, FN is the false negative, that is, the number of samples that the positive emotion is incorrectly identified as negative emotion, and TN is the true negative, that is, the number of samples that the model can accurately identify as negative emotion.

[0102] The data in Table 1 is the performance evaluation of the emotion recognition model proposed by the application after five-fold cross-validation for test set data.

[0103] Table 1 Model performance evaluation for test set data after five-fold cross-validation

[0104]

[0105]

[0106] As can be seen from Table 1, the deep residual convolutional neural network of the application combined with the frequency channel input matrix constructed by the application realizes an average accuracy of 93.6%, an average precision of 94.7%, an average sensitivity of 95.1%, an average specificity of 91.0%, and an average F1-score of 94.91±0.68% after five-fold cross-validation. Compared with the traditional application, the application does not need to extract features manually, fully considers the complex potential information contained in different position electrodes, and has strong robustness.

[0107] In summary, compared with the traditional application, the application does not need to extract features manually, fully considers the complex potential information contained in different position electrodes, and has strong robustness.

Claims

1. A brainwave emotion recognition method based on a deep residual convolutional neural network, characterized in that: Includes the following steps: S1. Extract the EEG signals from 32 EEG channels in the raw EEG signal, and preprocess and label the EEG signals; S2. Calculate the EEG power spectral density of all EEG channels and concatenate the EEG power spectral densities of all EEG channels into a frequency channel input matrix. S3. Divide the frequency channel input matrix into a training set and a test set; S4. Build an EEG emotion recognition model based on a deep residual convolutional neural network; The EEG emotion recognition model based on deep residual convolutional neural networks includes an input layer, a convolutional layer, a batch normalization layer, a ReLU activation function layer, a pooling layer, residual blocks, a fully connected layer, and a classification output layer. The input layer is sequentially connected to the convolutional layer conv1, the batch normalization layer bn_conv1, the ReLU activation function layer, and the pooling layer pool1, and then connected to the basic residual blocks RES2a and RES2b. Then, it is sequentially connected to the basic residual blocks RES3A, RES3b, RES4A, RES4b, RES5A, and RES5b, and then connected to the global average pooling layer pool5. Finally, it is connected to the classification output layer through a fully connected layer. The structure of the basic residual block RES2a is as follows: it is input from the pooling layer pool1, forming two branches. The left branch connects to a 3×3×64 convolutional layer with a stride of [1 1], followed by batch normalization of bn2a_branch2a, and then nonlinear activation of relu is performed as follows: f(x) = max(0,x) Next, a 3×3×64 size, stride [1 1] res2a_branch2b convolutional layer and a batch normalized bn2a_branch2a are connected sequentially, with the right branch being pool1. Finally, the two inputs are added element-wise through res2a. An identity mapping is added to the network structure, that is, the input from the pooling layer pool1 is directly connected to res2a. The basic residual block RES2b has the same structure as the basic residual block RES2a; S5. The EEG emotion recognition model built in S4 is trained using a training set with random mini-batch processing, and the model parameters are optimized and trained using the improved Adam optimization algorithm. S6. Input the test set into the trained EEG emotion recognition model to obtain the test set classification results; S7. Judge the performance of the EEG emotion recognition model based on the classification results of the test set.

2. The EEG emotion recognition method based on a deep residual convolutional neural network according to claim 1, characterized in that: In S1, the method for labeling EEG signals is as follows: a psychological scale is created based on the questionnaire scores of several subjects on a specific video, ranging from 1 to 9 points for Valence and Arousal. Samples with Valence greater than or equal to 5 points and Arousal greater than or equal to 5 points are defined as positive emotions, and the label is set to 1; samples with Valence less than 5 points and Arousal less than 5 points are defined as negative emotions, and the label is set to 0; and the 32-channel EEG data of each subject is divided into 1-second segments with no overlapping samples.

3. The EEG emotion recognition method based on a deep residual convolutional neural network according to claim 1, characterized in that: S2 specifically includes the following steps: S2.1 The periodogram is obtained using the Welch method in nonparametric estimation, and the power spectral density of different channels is obtained. For each channel's EEG signal x, the m-th segment x m The periodic diagram of (n) is as follows: Where w(n) is a Hamming window, n is the window length, f is the frequency, the overlap rate is 75%, K is 128, and j represents the imaginary unit; S2.2 concatenates the power spectral density of the 32 channels into a frequency channel input matrix, the size of which is 224*224*3.

4. The EEG emotion recognition method based on a deep residual convolutional neural network according to claim 1, characterized in that: In S5, the training set of the constructed frequency channel input matrix is ​​used as the input of the EEG emotion recognition model to train the EEG emotion recognition model. The minimum batch size is set to 500 samples, and the maximum number of training rounds is set to 10. Before each training round, the training set data samples are randomly shuffled. The optimizer uses a modified Adam optimizer, and the learning rate is adaptively adjusted. Where decayrate is the decay rate, ep_num is the number of iterations, and α0 is the initial learning rate; The improved Adam optimization algorithm introduces Nesterov into Adam, and the expression of the improved Adam optimization algorithm is as follows: Where, θ t+1 To optimize the parameters at time t+1, θ t Let η be the learning rate, and let η be the parameter to be optimized at time t. For the corrected first-order momentum estimate, For the corrected second-order momentum estimate, ε is the smoothing factor, and β1 is the Adam decay coefficient. Let m be the Adam decay coefficient at time t. t-1 Let g be the momentum at time t-1. t For gradient.

5. The EEG emotion recognition method based on a deep residual convolutional neural network according to claim 1, characterized in that: In S7, the performance and reliability of the EEG emotion recognition model are evaluated using confusion matrix, accuracy, F1-score, precision, sensitivity, and specificity, calculated as follows: Where Acc represents accuracy, Pre represents precision, Sen represents sensitivity, Spe represents specificity, TP represents true positive (the number of samples that the model accurately identifies as positive emotions), FP represents false positive (the number of samples that are incorrectly identified as positive emotions), FN represents false negative (the number of samples that are incorrectly identified as negative emotions), and TN represents true negative (the number of samples that the model accurately identifies as negative emotions).

Citation Information

Patent Citations

  • Electroencephalogram signal emotion recognition method based on R-LSTM model

    CN112364697A

  • Electroencephalogram emotion recognition method and system based on time convolutional neural network

    CN113069117A