Facial expression recognition method, device, equipment and storage medium

By combining two neural networks for multi-scale feature extraction and merging, the problem in the existing technology that facial expression recognition is insensitive to target detection at different scales is solved, the recognition accuracy is improved and the loss of feature information is reduced, achieving a more efficient Facial expression recognition effect.

CN113095185BActive Publication Date: 2024-09-10COMPUTING INTEGRATED (SHENZHEN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110349518.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2024-09-10
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

Existing facial expression recognition methods are insensitive to target detection at different scales, and the recognition accuracy is not high. Moreover, a single neural network model is difficult to distinguish the background in complex backgrounds, resulting in the loss of feature information and disappearance of gradients, which affects model performance.

Method used

A method of combining two neural networks is used. The first neural network is used to extract single-person expression features in face images. The second neural network performs multi-scale extraction and generates attention of different scales through parallel convolution operations and attention branches. Force feature maps are combined to improve recognition accuracy, and a Softmax classifier is used to generate classification results.

Benefits of technology

It improves the accuracy of facial expression recognition, enhances the model's ability to recognize targets of different scales, reduces the loss of feature information, and improves the recognition effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113095185B
    Figure CN113095185B
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and storage medium for facial expression recognition, wherein the method comprises: obtaining an original picture; intercepting a facial image from the original picture through a first neural network, and extracting a single person's expression features; performing multi-scale extraction on the single person's expression features through a second neural network to obtain an attention feature map of the single person's expression features at different scales; merging the attention feature maps of the single person's expression features at different scales to obtain a fused feature map; classifying and identifying the fused feature map using a Softmax classifier, and generating a classification result. The facial expression recognition method of the present invention uses two neural networks, one of which is used to extract facial expression features, and the other is used to identify facial expression features at multiple scales, thereby improving the accuracy of facial expression recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to a facial expression recognition method, device, equipment and storage medium. Background Art

[0002] Traditional target detection networks use a single convolutional neural network model for feature extraction. These methods are still widely used today. Image feature extraction is performed to obtain information features in the image, thereby dividing the pixels in the image into different categories such as points, curves, or continuous areas, and finally outputting the feature category corresponding to the pixel through the neural network.

[0003] Under traditional algorithms, this feature extraction and classification model usually has a unified problem and is only applicable to one situation. However, in the real world, images often contain complex backgrounds and targets of different scales. In this case, using a single convolutional neural network often makes it difficult to distinguish the background well and meet the requirements of fine-grained detection. Although some deep neural networks can better extract fine-grained features, the increase in network depth will also lead to an increase in parameters. A large number of convolution processes will also cause the loss of feature information and the disappearance of gradients, thus affecting model performance. In addition, a single neural network model is insensitive to targets of different scales, and indiscriminate feature extraction of images will also cause a waste of resources. These factors will affect the subsequent model recognition effect.

[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0005] The main purpose of the present invention is to solve the technical problems that the existing facial expression recognition methods are insensitive to target detection of different scales and have low recognition accuracy.

[0006] A first aspect of the present invention provides a method for recognizing facial expressions, the method comprising:

[0007] Get the original image;

[0008] Using a first neural network to extract a facial image from the original image and extract facial features of a single person;

[0009] Performing multi-scale extraction of the single-person expression features through a second neural network to obtain attention feature maps of the single-person expression features at different scales;

[0010] Merging the attention feature maps of the single person's facial expression features at different scales to obtain a fused feature map;

[0011] The Softmax classifier is used to classify and identify the fused feature map and generate a classification result.

[0012] In an optional implementation of the first aspect of the present invention, the multi-scale extraction of the single-person expression features by the second neural network to obtain the attention feature graphs of the single-person expression features at different scales includes:

[0013] Downsampling the single-person expression features to obtain the single-person expression features of different scales;

[0014] Parallel convolution operations are performed on the single-person expression features at different scales to obtain attention feature maps of the single-person expression features at different scales.

[0015] In an optional implementation of the first aspect of the present invention, the first neural network includes a VGG neural network, and the step of extracting a facial image from the original image by using the first neural network and extracting a single person's expression features includes:

[0016] Using the VGG neural network to recognize the face in the original image;

[0017] The required face image is cut out from the original picture according to the recognition result of the VGG neural network, and the single person expression feature in the face image is extracted.

[0018] In an optional implementation of the first aspect of the present invention, before using the VGG neural network to recognize the face in the original image, the process includes:

[0019] The VGG neural network is trained using the WiderFace dataset.

[0020] In an optional implementation of the first aspect of the present invention, the second neural network includes a SeNet network, and before the multi-scale extraction of the single person expression features by the second neural network includes:

[0021] Obtain training samples of different facial expressions;

[0022] Downsampling the training samples and inputting them into the SeNet network for training;

[0023] Calculate the Softmax classification loss and regularize the center loss until the loss function converges.

[0024] In an optional implementation of the first aspect of the present invention, the second neural network includes multiple parallel attention branches, and each of the attention branches includes a 1x 1 convolution kernel.

[0025] In an optional implementation of the first aspect of the present invention, before extracting the facial image from the original image, the step includes: performing Gaussian blur processing on the original image.

[0026] A second aspect of the present invention provides a facial expression recognition device, the facial expression recognition device comprising:

[0027] Acquisition module, used to obtain the original image;

[0028] A first extraction module, used to capture a face image from the original image through a first neural network, and extract a single person's expression features;

[0029] A second extraction module is used to perform multi-scale extraction on the single-person expression feature through a second neural network to obtain an attention feature map of the single-person expression feature at different scales;

[0030] A fusion module, used to merge the attention feature maps of the single person's expression features at different scales to obtain a fusion feature map;

[0031] The classification module is used to classify and identify the fused feature map using a Softmax classifier and generate a classification result.

[0032] A third aspect of the present invention provides a facial expression recognition device, the facial expression recognition device comprising: a memory and at least one processor, the memory storing instructions, the memory and the at least one processor being interconnected via a line;

[0033] The at least one processor calls the instructions in the memory so that the facial expression recognition device executes any of the facial expression recognition methods described above.

[0034] A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the facial expression recognition method as described in any one of the above items is implemented.

[0035] Beneficial effects: The present invention provides a method, device, equipment and storage medium for facial expression recognition, wherein the method comprises: obtaining an original picture; cutting out a facial image from the original picture through a first neural network, and extracting the facial expression features of a single person; performing multi-scale extraction on the facial expression features of the single person through a second neural network, and obtaining an attention feature map of the facial expression features of the single person at different scales; merging the attention feature maps of the facial expression features of the single person at different scales to obtain a fused feature map; and classifying and identifying the fused feature map using a Softmax classifier, and generating a classification result. The facial expression recognition method of the present invention uses two neural networks, one of which is used to extract facial expression features, and the other is used to identify facial expression features at multiple scales, thereby improving the accuracy of facial expression recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of an embodiment of a method for recognizing facial expressions of the present invention;

[0037] Figure 2 A schematic diagram of an embodiment of a traditional SENet network;

[0038] Figure 3 A schematic diagram of an embodiment of the improved SENet network of the present invention;

[0039] Figure 4 A schematic diagram of an embodiment of a facial expression recognition device of the present invention;

[0040] Figure 5 The figure is a schematic diagram of an embodiment of a facial expression recognition device of the present invention. DETAILED DESCRIPTION

[0041] The embodiments of the present invention provide a method, apparatus, device and storage medium for recognizing facial expressions.

[0042] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0043] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first aspect of the present invention provides a method for recognizing facial expressions, the method comprising:

[0044] S100, obtaining an original image;

[0045] S200, extracting a facial image from the original image through a first neural network, and extracting a single person's facial expression features; in this embodiment, the single person's facial expression features extracted by the first neural network are matrix data;

[0046] S300, performing multi-scale extraction on the single-person expression feature through a second neural network to obtain attention feature maps of the single-person expression feature at different scales; in this embodiment, the second neural network performs multi-scale extraction on the single-person expression feature to change the aspect ratio of the single-person expression feature matrix data to obtain matrix data of different scale specifications;

[0047] S400, merging the attention feature maps of the single-person expression features at different scales to obtain a fused feature map; in this embodiment, since the fused feature map has the features of the expression at different scales, the recognition accuracy of the expression can be improved;

[0048] S500, using a Softmax classifier to classify and identify the fused feature graph, and generate a classification result. In this embodiment, the Softmax classifier performs template matching on the fused feature graph, and gives the probability of which category the fused feature graph belongs to, and selects the category with the highest probability as the category to which the facial expression belongs.

[0049] The facial expression recognition method is actually a classification task. The attention mechanism adopted by the expression recognition method of the present invention does not use key points. It starts directly from the output feature map of the front-end network and obtains spatial attention at different levels in the process of multiple scale compression. The method relies on the input of feature maps of different scales. As for how many feature maps of different scales are needed, it can be selected according to the specific recognition scenario.

[0050] In an optional implementation of the first aspect of the present invention, the multi-scale extraction of the single-person expression features by the second neural network to obtain the attention feature graphs of the single-person expression features at different scales includes:

[0051] Downsampling the single-person expression features to obtain the single-person expression features of different scales;

[0052] Parallel convolution operations are performed on the single-person expression features at different scales to obtain attention feature maps of the single-person expression features at different scales.

[0053] In this embodiment, generally speaking, facial expressions are more difficult to identify clearly at smaller scales, so the technical solution of the present invention mainly chooses to downsample the expression features of a single person to obtain more small-scale single-person expression features to improve the network's classification and recognition capabilities for objects at small scales. Of course, in other cases, the technical solution of the present invention can also upsample the expression features of a single person to improve the resolution capabilities of objects at large scales.

[0054] See also Figure 2 and Figure 3 Taking the SENet network as an example, the traditional SENet network has only one attention branch. The SENet network in the present invention includes 3 parallel attention branches, one of which is used to process the expression features of a single person with a scale of h*w*c, another is used to process the expression features of a single person with a scale of 0.5h*0.5w*c, and another is used to process the expression features of a single person with a scale of 0.25h*0.25w*c. After the second neural network performs parallel convolution operations on the expression features of a single person with different scales, it is also necessary to fuse the scale attention feature maps of different scales. The output of the attention module in the present invention is a vector of length C that reflects spatial attention and corresponds to the number of channels of the feature map. This vector is then used to multiply each channel of the input feature map, and the multiplication results of multiple dimensions are spliced ​​together to obtain the final output feature map.

[0055] When the second neural network of the present invention performs parallel convolution operations on the expression features of a single person, it uses the method of finding the mean value in the channel to find the attention of the feature maps of different scales, and obtains the attention in the form of 1x1xC, where C is the number of channels. Because it is 1x1, each channel has only one corresponding value, and this value is multiplied by each value in the corresponding channel of the original image. The classification result is an array V, where Vi represents the i-th element in V, and the softmax value of this element is:

[0056]

[0057] Because we have 4 categories, the value of i ranges from 0 to 4, where 0 represents other types, that is, it is not identified as one of the four established types.

[0058] In an optional implementation of the first aspect of the present invention, the first neural network includes a VGG neural network, and the step of extracting a facial image from the original image by using the first neural network and extracting a single person's expression features includes:

[0059] Using the VGG neural network to recognize the face in the original image;

[0060] The required face image is cut out from the original picture according to the recognition result of the VGG neural network, and the single person expression feature in the face image is extracted.

[0061] In this embodiment, the technical solution of the present invention can select VGGNet16 convolutional neural network to extract facial expressions. The first layer of the VGGNet16 network adopts the Inception structure. When the image is input, convolution kernels of multiple scales are used to extract features of different scales, and multiple features extracted by convolution kernels of different sizes are fused. The bottleneck structure is used in the 3×3 and 5×5 convolution kernel branches to reduce the dimension of the two branches. The principle of the bottleneck layer is to first use a convolution layer with a convolution kernel scale of 1×1 to reduce the dimension of the input image, and then restore the number of channels in the output 1×1 convolution layer, which can greatly reduce the amount of calculation. At the same time, two 3×3 convolutions are used instead of 5×5 convolutions. This step also reduces the amount of calculation while ensuring the receptive field.

[0062] In an optional implementation of the first aspect of the present invention, before using the VGG neural network to recognize the face in the original image, the process includes:

[0063] The VGG neural network is trained using the WiderFace dataset.

[0064] In this embodiment, the face detection part of the present invention uses a neural network model for recognition, which belongs to target detection and is trained using the WiderFace data set, and can accurately predict the position according to the face edge.

[0065] In an optional implementation of the first aspect of the present invention, the second neural network includes a SeNet network, and before the multi-scale extraction of the single person expression features by the second neural network includes:

[0066] Obtain training samples of different facial expressions;

[0067] Downsampling the training samples and inputting them into the SeNet network for training;

[0068] Calculate the Softmax classification loss and regularize the center loss until the loss function converges.

[0069] In this embodiment, facial expression recognition usually uses SoftMax classification loss as a supervisory signal to optimize network parameters. The optimization of the center loss aims to construct a class center in the feature space for each category of the training set, and increase the distance constraint between the sample and the class center in the feature space after network mapping during the training process, thereby enhancing the intra-class similarity.

[0070] In an optional implementation of the first aspect of the present invention, the second neural network includes multiple parallel attention branches, each of which includes a 1x 1 convolution kernel. In this embodiment, the second neural network includes a 1×1 convolution kernel. Although the operation rate may be slower, more feature information can be obtained, and it is also convenient for the fusion between later feature maps.

[0071] In an optional implementation of the first aspect of the present invention, before extracting the face image from the original image, the method includes: performing Gaussian blur processing on the original image. Gaussian blur, also known as Gaussian smoothing, is a processing effect widely used in image processing software. It is usually used to reduce image noise and reduce detail levels. The image generated by this blurring technology has a visual effect like observing the image through frosted glass, which is significantly different from the bokeh effect of the lens out-of-focus imaging and the effect in ordinary lighting shadows. Gaussian smoothing is also used in the pre-processing stage of computer vision algorithms to enhance the image effect at different scales.

[0072] See also Figure 4 A second aspect of the present invention provides a facial expression recognition device, the facial expression recognition device comprising:

[0073] An acquisition module 10 is used to acquire an original image;

[0074] A first extraction module 20, used to extract a face image from the original image through a first neural network, and extract a single person's expression features;

[0075] A second extraction module 30 is used to perform multi-scale extraction of the single-person expression feature through a second neural network to obtain an attention feature map of the single-person expression feature at different scales;

[0076] A fusion module 40 is used to merge the attention feature maps of the single person's expression features at different scales to obtain a fusion feature map;

[0077] The classification module 50 is used to classify and identify the fused feature map using a Softmax classifier and generate a classification result.

[0078] In an optional implementation of the second aspect of the present invention, the second extraction module 30 includes:

[0079] A downsampling unit, used for downsampling the single person's expression features to obtain the single person's expression features of different scales;

[0080] The convolution unit is used to perform parallel convolution operations on the single-person expression features of different scales to obtain attention feature maps of the single-person expression features at different scales.

[0081] In an optional implementation of the second aspect of the present invention, the first neural network includes a VGG neural network, and the first extraction module 20 includes:

[0082] A recognition unit, configured to use the VGG neural network to recognize a face in the original image;

[0083] An extraction unit is used to cut out the required face image from the original picture according to the recognition result of the VGG neural network, and extract the single person expression feature in the face image.

[0084] In an optional implementation of the second aspect of the present invention, the facial expression recognition device further includes:

[0085] The first training unit is used to train the VGG neural network using the WiderFace dataset.

[0086] In an optional implementation of the second aspect of the present invention, the second neural network includes a SeNet network, and the facial expression recognition device further includes:

[0087] The second training unit is used to obtain training samples of different facial expressions; downsample the training samples and input them into the SeNet network for training; and calculate the Softmax classification loss and regularize the center loss until the loss function converges.

[0088] In an optional implementation of the second aspect of the present invention, the second neural network includes multiple parallel attention branches, and each of the attention branches includes a 1x 1 convolution kernel.

[0089] In an optional implementation of the second aspect of the present invention, the facial expression recognition device further includes: a preprocessing module, configured to perform Gaussian blur processing on the original image.

[0090] Figure 5It is a structural schematic diagram of a facial expression recognition device provided by an embodiment of the present invention. The facial expression recognition device may have relatively large differences due to different configurations or performances, and may include one or more processors 60 (central processing units, CPU) (for example, one or more processors) and a memory 70, and one or more storage media 80 (for example, one or more mass storage devices) for storing application programs or data. Among them, the memory and the storage medium can be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the facial expression recognition device. Furthermore, the processor can be configured to communicate with the storage medium to execute a series of instruction operations in the storage medium on the facial expression recognition device.

[0091] The facial expression recognition device may also include one or more power supplies 90, one or more wired or wireless network interfaces 100, one or more input and output interfaces 110, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 5 The structure of the facial expression recognition device shown does not constitute a limitation on the facial expression recognition device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0092] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the facial expression recognition method.

[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0095] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A facial expression recognition method, It is characterized in that The facial expression recognition method comprises: Get the original image; Using a first neural network to extract a facial image from the original image and extract facial features of a single person; Performing multi-scale extraction of the single-person expression features through a second neural network to obtain attention feature maps of the single-person expression features at different scales; Merging the attention feature maps of the single person's facial expression features at different scales to obtain a fused feature map; Using a Softmax classifier to classify and identify the fused feature map, and generate a classification result; The first neural network is a VGGNet16 neural network. The first layer of the VGGNet16 network adopts an Inception structure. When an image is input, convolution kernels of multiple scales are used to extract features of different scales, and multiple features extracted by convolution kernels of different sizes are fused. A bottleneck structure is used in the 3*3 and 5*5 convolution kernel branches to perform dimensionality reduction on the two convolution kernel branches. The bottleneck layer first uses a convolution layer with a convolution kernel scale of 1*1 to reduce the dimensionality of the input image, and then restores the number of channels in the output 1*1 convolution layer, and uses two 3*3 convolutions instead of 5*5 convolutions. The second neural network is a SeNet network, and the SENet network includes 3 parallel attention branches, one of which is used to process single-person expression features with a scale of h*w*c, another is used to process single-person expression features with a scale of 0.5h*0.5w*c, and another is used to process single-person expression features with a scale of 0.25h*0.25w*c. After the second neural network performs parallel convolution operations on single-person expression features of different scales, it is also necessary to fuse scale attention feature maps of different scales. The output of the attention module is a vector of length C that reflects spatial attention and corresponds to the number of channels of the feature map. The vector is then used to multiply each channel of the input feature map, and the multiplication results of multiple dimensions are spliced ​​together to obtain the final output feature map; When the second neural network performs parallel convolution operations on the expression features of a single person, it uses the method of finding the mean value within the channel to seek attention to the feature maps of different scales, and obtains attention in the form of 1*1*C, where C is the number of channels. Because it is 1*1, each channel has only one corresponding value, and the value is multiplied by each value in the corresponding channel of the original image; the facial image is cut out from the original image through the first neural network, and the expression features of the single person are extracted, including: using the VGGNet16 neural network to recognize the face in the original image; according to the recognition result of the VGGNet16 neural network, the required facial image is cut out from the original image, and the expression features of the single person are extracted from the facial image; The multi-scale extraction of the single-person expression features by the second neural network includes: Obtain training samples of different facial expressions; downsample the training samples and input them into the SeNet network for training; calculate the Softmax classification loss and regularize the center loss until the loss function converges; The step of extracting the single-person expression features at multiple scales by the second neural network to obtain attention feature maps of the single-person expression features at different scales includes: downsampling the single-person expression features to obtain the single-person expression features at different scales; performing parallel convolution operations on the single-person expression features at different scales to obtain attention feature maps of the single-person expression features at different scales; Wherein, before using the VGG neural network to recognize the face in the original image, the method includes: The VGG neural network is trained using the WiderFace dataset; Wherein, before extracting the face image from the original picture, the method includes: Perform Gaussian blur processing on the original image.

2. A facial expression recognition device, It is characterized in that The facial expression recognition device comprises: Acquisition module, used to obtain the original image; A first extraction module, used to capture a face image from the original image through a first neural network, and extract a single person's expression features; A second extraction module is used to perform multi-scale extraction on the single-person expression feature through a second neural network to obtain an attention feature map of the single-person expression feature at different scales; A fusion module, used to merge the attention feature maps of the single person's expression features at different scales to obtain a fusion feature map; A classification module, used to classify and identify the fused feature map using a Softmax classifier, and generate a classification result; The first neural network is a VGGNet16 neural network. The first layer of the VGGNet16 network adopts an Inception structure. When an image is input, convolution kernels of multiple scales are used to extract features of different scales, and multiple features extracted by convolution kernels of different sizes are fused. A bottleneck structure is used in the 3*3 and 5*5 convolution kernel branches to perform dimensionality reduction on the two convolution kernel branches. The bottleneck layer first uses a convolution layer with a convolution kernel scale of 1*1 to reduce the dimensionality of the input image, and then restores the number of channels in the output 1*1 convolution layer, and uses two 3*3 convolutions instead of 5*5 convolutions. The second neural network is a SeNet network, and the SENet network includes 3 parallel attention branches, one of which is used to process single-person expression features with a scale of h*w*c, another is used to process single-person expression features with a scale of 0.5h*0.5w*c, and another is used to process single-person expression features with a scale of 0.25h*0.25w*c. After the second neural network performs parallel convolution operations on single-person expression features of different scales, it is also necessary to fuse scale attention feature maps of different scales. The output of the attention module is a vector of length C that reflects spatial attention and corresponds to the number of channels of the feature map. The vector is then used to multiply each channel of the input feature map, and the multiplication results of multiple dimensions are spliced ​​together to obtain the final output feature map; When the second neural network performs parallel convolution operations on the facial expression features of a single person, it uses the method of finding the mean value within the channel to seek attention to the feature maps of different scales, and obtains attention in the form of 1*1*C, where C is the number of channels. Because each channel has only one corresponding value in 1*1, the value is multiplied by each value in the corresponding channel of the original image; The first extraction module includes: a recognition unit, configured to use the VGGNet16 neural network to recognize a face in the original image; An extraction unit, used for intercepting the required face image from the original picture according to the recognition result of the VGGNet16 neural network, and extracting the single person expression feature in the face image; The facial expression recognition device further includes: a second training unit, which is used to obtain training samples of different facial expressions; down-sample the training samples and input them into the SeNet network for training; and calculate the Softmax classification loss and regularize the center loss until the loss function converges; The second extraction module includes: a downsampling unit, which is used to downsample the single-person expression features to obtain the single-person expression features of different scales; A convolution unit, used to perform parallel convolution operations on the single-person expression features at different scales to obtain attention feature maps of the single-person expression features at different scales; The first training unit is also used to: train the VGG neural network using the WiderFace dataset; The preprocessing module is used to perform Gaussian blur processing on the original image.

3. A facial expression recognition device, It is characterized in that The facial expression recognition device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory so that the facial expression recognition device executes the facial expression recognition method as claimed in claim 1.

4. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the facial expression recognition method as claimed in claim 1 is implemented.