Expression recognition method, device and electronic device

By acquiring the face data set with expression labels and the AU auxiliary data set, building a neural network model based on AU perception and conducting joint training, it solves the problems of low expression recognition accuracy and high labeling cost in the existing technology, and achieves a better High recognition accuracy.

CN114764941BActive Publication Date: 2024-09-13SHENZHEN TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210444179.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2024-09-13
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

Existing expression recognition methods have low accuracy in complex environments, and training methods based on AU labels have high labeling costs.

Method used

By obtaining the face data set with expression labels and the AU auxiliary data set, a neural network model is constructed based on AU perception, and jointly trained through the target data set and the AU auxiliary data set to obtain the target model for expression recognition.

Benefits of technology

Without increasing the cost of labeling, the accuracy of expression recognition is improved and the need for additional manual labeling of AU is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764941B
    Figure CN114764941B
Patent Text Reader

Abstract

The present application discloses an expression recognition method, device and electronic device, belonging to the field of data processing technology, the method comprising: obtaining a target data set; obtaining an AU auxiliary data set, the AU auxiliary data set selecting the AU with the strongest correlation with each basic expression according to the relationship between AU and expression; constructing a neural network model based on AU-perceived expression recognition; training the neural network model through the target data set and the AU auxiliary data set to obtain a target model; inputting the expression image to be detected into the target model to obtain an expression recognition result. Through the expression recognition scheme disclosed in the present application, the recognition accuracy of the trained target model can be improved without increasing the annotation cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to an expression recognition method, device and electronic device. Background Art

[0002] Facial expression recognition methods can be roughly divided into two categories, one is non-deep learning methods, and the other is based on deep learning methods. Non-deep learning methods first establish models based on the physical and mathematical features of facial expressions through human observation, and then classify and identify the feature information extracted by the model through certain rules or classifiers to identify the function of the facial expression. Non-deep learning facial expression recognition methods are greatly affected by head posture, occlusion, and background, and are not robust. In complex environments, the accuracy of facial expression recognition is low.

[0003] Facial expression recognition methods based on deep learning can be roughly divided into two categories, one is the method directly based on expression label training, and the other is the method based on AU (Action Unit, facial movement unit) label training. The method based on expression label training builds a neural network model and trains the face data set with expression labels, so that the model has the ability to recognize expressions. However, human expressions are very complex, and ordinary neural network models are not sensitive to slight changes in the face, and the recognition results are inaccurate. With the AU label training method, the expression data set is annotated with AUs and then trained, but this method requires a very large amount of annotations and has a high annotation cost. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an expression recognition method, device and electronic device, which can solve the problems of low expression recognition accuracy and high AU annotation cost of expression data set existing in the prior art.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an expression recognition method, comprising:

[0007] Acquire a target data set, wherein the target data set is a face data set with expression labels;

[0008] Acquire an AU auxiliary data set, wherein the AU auxiliary data set selects the AU with the strongest correlation with each basic expression according to the relationship between the AU and the expression;

[0009] Construct a neural network model based on AU-perceived expression recognition;

[0010] The neural network model is trained using the target data set and the AU auxiliary data set to obtain the target model;

[0011] The expression image to be detected is input into the target model to obtain the expression recognition result.

[0012] Optionally, the step of acquiring the target data set includes:

[0013] At least part of the data is filtered out from the public facial expression datasets of RAF-DB and / FERPlus as a target dataset, wherein the filtered target dataset includes a variety of basic expression images.

[0014] Optionally, the step of acquiring the AU auxiliary data set includes:

[0015] The AU dataset of RAFAU or EmotioNet is obtained, and each piece of data in the AU dataset is manually annotated with AU, wherein the AU annotated labels only include labels indicating seven basic expressions: happy, sad, surprised, scared, angry, disgusted, and naturally calm.

[0016] Optionally, the total loss function of the target model is as follows:

[0017]

[0018] Among them, Z FER is the score pair finally output by the target model, Z AU is the score pair of the AU-CRL module, the Z FER Input Softmax function ψ, the Z AU Input Sigmoid function, α and β are constant coefficients used to balance the cross entropy loss of FER and binary cross entropy loss for AU detection The Y FER , Y AU are the labels from the FER dataset and the AU detection dataset, respectively.

[0019] Optionally, the step of inputting the expression image to be detected into the target model to obtain the expression recognition result includes:

[0020] The expression image to be detected is input into the target model, and the expression recognition result is determined based on the output results of the convolutional neural network feature extraction module and the expression branch structure in the target model.

[0021] In a second aspect, an embodiment of the present application provides an expression recognition device, the device comprising:

[0022] A first acquisition module is used to acquire a target data set, wherein the target data set is a face data set with expression labels;

[0023] A second acquisition module is used to acquire an AU auxiliary data set, wherein the AU auxiliary data set selects the AU with the strongest correlation with each basic expression according to the relationship between the AU and the expression;

[0024] Building module for building neural network model based on AU-aware expression recognition;

[0025] A training module is used to train the neural network model using the target data set and the AU auxiliary data set to obtain a target model;

[0026] The recognition module is used to input the expression image to be detected into the target model to obtain the expression recognition result.

[0027] Optionally, the first acquisition module is specifically used to:

[0028] At least part of the data is filtered out from the public facial expression datasets of RAF-DB and / or FERPlus as a target dataset, wherein the filtered target dataset includes a variety of basic expression images.

[0029] Optionally, the total loss function of the target model is as follows:

[0030]

[0031] Among them, Z FER is the score pair finally output by the target model, Z AU The score pair for the target model input, the Z FER Input Softmax function ψ, the Z AU Input Sigmoid function, α and β are constant coefficients used to balance the cross entropy loss of FER and binary cross entropy loss for AU detection The Y FER , Y AU are the labels from the FER dataset and the AU detection dataset, respectively.

[0032] Optionally, the second acquisition module is specifically used to:

[0033] The AU dataset of RAFAU or EmotioNet is obtained, and each piece of data in the AU dataset is manually annotated with AU, wherein the AU annotated labels only include labels indicating seven basic expressions: happy, sad, surprised, scared, angry, disgusted, and naturally calm.

[0034] Optionally, the identification module is specifically used for:

[0035] The expression image to be detected is input into the target model, based on the volume in the target model

[0036] The output results of the neural network feature extraction module and the expression branch structure are integrated to determine the expression recognition result.

[0037] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0038] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0039] The expression recognition method provided in the embodiment of the present application obtains a target data set and an AU auxiliary data set; constructs a neural network model based on AU-perceived expression recognition; trains the neural network model through the target data set and the AU auxiliary data set to obtain a target model; inputs the expression image to be detected into the target model to obtain an expression recognition result. This solution directly uses an auxiliary data set that does not overlap with the target data set for joint training without the need for additional AU manual annotation of the target data set, and can improve the recognition accuracy of the trained target model without increasing the annotation cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0041] Figure 1 is a flowchart showing a method for facial expression recognition according to an embodiment of the present application;

[0042] Figure 2 is a schematic diagram showing the structure of a neural network model of an embodiment of the present application;

[0043] Figure 3 is a schematic diagram showing the structure of a multi-stage Transformer module in an embodiment of the present application;

[0044] Figure 4 is a structural block diagram of an expression recognition device according to an embodiment of the present application;

[0045] Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application;

[0046] Figure 6It is a structural block diagram of another electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0048] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0049] The device detection method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0050] Reference Figure 1 , shows a step flow chart of an expression recognition method according to an embodiment of the present application.

[0051] The expression recognition method of the embodiment of the present application comprises the following steps:

[0052] Step 101: Obtain a target data set.

[0053] Among them, the target dataset is a face dataset with expression labels.

[0054] The expression recognition method provided in the embodiment of the present application can be applied to an electronic device, wherein the electronic device is provided with a processor, and the processor is provided with a computer program for executing the expression recognition method process.

[0055] An optional way to obtain the target dataset may be to filter at least part of the data from the public facial expression datasets of RAF-DB and / FERPlus as the target dataset, wherein the filtered target dataset includes a variety of basic expression images. RAF-DB and / FERPlus are two well-known facial expression datasets in the industry.

[0056] The expression recognition method implemented in this application can be used to recognize facial expressions in different scenarios, so it is necessary to select facial expression data in real application scenarios rather than facial expression data collected in a laboratory environment. Therefore, RAF-DB or FERPlus public facial expression datasets are selected as target expression datasets, which contain 7 types.

[0057] Step 102: Obtain AU auxiliary data set.

[0058] Among them, the AU (Action Unit, facial movement unit) auxiliary data set selects the AU with the strongest correlation with each basic expression based on the relationship between AU and expression. Among them, the relationship between expression and AU is shown in the table below: Figure 1 As shown:

[0059] expression Action units Happiness 6+12 Sadness 1+4+15 Surprise 1+2+5+26 Fear 1+2+4+5+7+20+26 Anger 4+5+7+23 Disgust 9+15+17

[0060] An optional way to obtain an AU auxiliary dataset is to obtain an AU dataset of RAFAU or EmotioNet, and manually annotate each piece of data in the AU dataset with AU, wherein the AU annotated labels only include labels indicating seven basic expressions: happy, sad, surprised, scared, angry, disgusted, and naturally calm. RAFAU and EmotioNet are two well-known AU datasets in the industry. RAFAU is the abbreviation of Real-world Affective Faces Action Unit.

[0061] In the embodiment of the present application, in order to better utilize the face dataset with AU annotation to assist model training, the model can better perceive the AU related to the expression. Therefore, the AU dataset of RAFAU or EmotioNet is selected. Both are face datasets collected in real scenes, and the data are manually annotated with AU. In order to identify the seven basic expressions of happiness, sadness, surprise, fear, anger, nausea, and natural calmness, the AU labels in the auxiliary dataset only retain 16 AU labels of AU1, AU2, AU4, AU5, AU6, AU7, AU8, AU9, AU12, AU14, AU15, AU17, AU20, AU23, and AU26.

[0062] Step 103: Construct a neural network model based on AU-perceived expression recognition.

[0063] Figure 2 Schematic diagram of the structure of the neural network model of the embodiment of the present application. Figure 2As shown in the figure, the neural network model includes a CNN feature extractor, an AU branch, and an expression branch. The AU branch includes feature block grouping, global average pooling, a fully connected layer, and a concat layer. The expression branch includes: feature block, information embedding layer, multi-level Transformer module, global average pooling, and a fully connected layer.

[0064] In the actual implementation process, the neural network model can be created through the following process, which includes the following sub-steps:

[0065] Sub-step 1041: facial feature extraction.

[0066] First, the first three stages of ResNet50 are used as the backbone network to extract the feature map of the original face image. This is because only shallow features need to be extracted for the subsequent Transformer block at this stage. For a given RGB face image of size H*W*3, the feature extractor generates a The multi-layer feature map is , where R is the downsampling rate of ResNet50, C is the number of channels of the output of the third stage, and H = W = 112, R = 8. The backbone network weights are initialized using the pre-trained weights on the MS-Celeb-1M

[15] face identity recognition dataset, which contains 10 million face images.

[0067] Sub-step 1042: Construct a multi-level Transformer module.

[0068] The Transformer module first divides the feature map into non-overlapping blocks through the segmentation module. Each block is regarded as a "token" and its features are set to the concatenation of all channels of a certain area in the image. In practical applications, the size of the blocks into which the feature map is segmented can be set to 1*1 pixel. Therefore, the feature dimension of each block in the first-level Transformer module is 256. In order to generate hierarchical representation features, we use a block fusion layer to reduce the number of tokens as the network deepens. Before entering the next Transformer module, every 2*2 adjacent blocks will be fused into a token, and at the same time, the number of channels of the new token will increase from C to 2C. That is, the size of the feature map in the second-level Transformer module is H f With W f are the height and width of the feature map output by ResNet50.

[0069] To incorporate position information into the multi-layer Transformer encoder, and add 1D learnable position embeddings to feature tokens:

[0070]

[0071] The position index of the block will be learned, Z 0 It is the feature token group after merging the location information.

[0072] In order to fit the complex interactions between all elements in the block, Z 0 Input into the Transformer encoder. The Transformer encoder calculates Z through the multi-head self-attention calculation module, namely the MHSA module. 0 Weight. Figure 2 As shown, the Transformer encoder is completed by the learnable query vector Q, key vector K and value vector V. The single-head global self-attention information of SHSA in the first layer is calculated as follows:

[0073]

[0074] among, is the weight value of the linear projection. It should be pointed out that the multi-head self-attention mechanism is to 0 Projected into N different feature spaces. The formula of the multi-head self-attention mechanism is as follows:

[0075] MHSA(Z 0 )=Conat(head 1 ,...head N )W o

[0076] Where N is the number of different self-attention heads, concat represents the concatenation operation; W o is the weight parameter of the linear projection, and the size of each self-attention head d is equal to C p =N 2 ,h 1 is the hidden size of the first layer. Each Transformer encoder consists of N layers of MHSA blocks.

[0077] After the output of the MHSA module, this application rearranges the token sequence into a 2D grid and converts it into a 2D feature map. Then, this application introduces deep convolution in the feedforward network of the Transformer. First, the number of channels of these feature maps is increased, and then deep convolution is performed on them.

[0078] The kernel size is 3*3, and its purpose is to enhance the representation correlation with the 8 adjacent tokens. Finally, the channels of the feature map are restored and flattened to the initial dimensions in sequence. These procedures can be recorded as:

[0079]

[0080] The structural diagram of the constructed multi-level Transformer module is as follows Figure 3 shown.

[0081] Sub-step 1043: constructing an AU branch auxiliary structure.

[0082] The purpose of constrained representation learning is to force the model to learn the features of AUs before the classifier layer. As shown in Table 1, the distribution of AUs on the face is distributed in an upper and lower distribution. Therefore, we obtain the block tokens from the middle layer of the Transformer block and then apply the Seq2Img operation to these tokens to generate a 2D feature map with a size of 512*7*7 in the implementation. The 2D feature map is then divided into the upper and lower parts according to the regions to which different AUs belong. The feature size of the upper part is 512*3*7, which contains 7 AUs, namely AU1, AU2, AU4, AU5, AU6, AU7, AU9; while the feature size of the lower part is 512*4*7, which contains 14 AUs, namely AU10, AU12, AU14, AU15, AU16, AU17, AU18, AU20, AU22, AU23, AU24, AU25, AU26, AU27. Then, global average pooling is performed on the two feature maps to obtain two vectors of 512*1. Finally, the application performs two fully connected layers on the two vectors respectively, and then connects the outputs to obtain the final result:

[0083] Z u , Z l =split(Z)

[0084] C u =GAP(BN(Z u ))

[0085] C l =GAP(BN(Z l ))

[0086] z s =Concat(C u , C l )

[0087] After the neural network model is constructed, a suitable loss function and model parameters are set for the neural network model. After the settings are completed, step 104 can be executed.

[0088] Step 104: Train the neural network model using the target data set and the AU auxiliary data set to obtain a target model.

[0089] Since RVT

[12] has proved that classification token (CLS) is not important for ViT, this application attempts to use global average pooling on block tokens to replace CLS (such as CPVT

[13] and LeViT

[14] ). However, unlike AU detection, the inventors found that using global pooling operations will reduce the accuracy of the test set. Therefore, this application abandons global pooling, adopts the operation of flattening 2D features, and uses a fully connected layer at the end of the model. This is because gaps will destroy the spatial information of the face, which is crucial for expression recognition. Among them, RVT

[12] is a highly robust Transformer proposed by Alibaba; CPVT

[13] is a Transformer proposed by Meituan; LeViT

[14] is a Transformer proposed by Facebook.

[0090] The total loss function of the trained target model is as follows:

[0091]

[0092] Among them, Z FER is the logit or score pair output by the target model, Z AU The score pair for the target model input, the Z FER Input Softmax function ψ, Z AU Input Sigmoid function, α and β are constant coefficients used to balance the cross entropy loss of FER and binary cross entropy loss for AU detection Y FEB , Y AU are the labels from the FER dataset and the AU detection dataset, respectively.

[0093] When training the neural network model based on the target data set and the AU auxiliary data set, each piece of data in the data set can be input into the neural network model, and the output result of the neural network model is compared with the pre-marked, and the parameters of the neural network model are adjusted based on the comparison result to reduce the loss value. After multiple trainings, when the loss value of the neural network model is reduced to a preset threshold, it is determined that the training of the neural network model is completed.

[0094] Step 105: Input the expression image to be detected into the target model to obtain the expression recognition result.

[0095] After training is completed, the AU branch structure is not required for inference prediction. Only the CNN feature extraction module and expression branch structure are needed to classify human expressions.

[0096] Regarding the ablation experiment of the AU-CRL module, the effect comparison between using RAF-DB or FERPlus datasets and not using additional AU datasets is shown in Table 2:

[0097] Model AUData. RAFDB% FERPlus% ViT[5] / 87.3 85.62 ViT+AU-CRL RAFAU 88.8(+1.5) 88.4(+2.78) ViT+AU-CRL EmotioNet 87.9(+0.5) 87.5(+1.88)

[0098] Among them, the AU-CRL module is part of the target model, including for example Figure 2 AU4, AU10, etc. shown in.

[0099] The expression recognition method provided in the embodiment of the present application obtains a target data set and an AU auxiliary data set; constructs a neural network model based on AU-perceived expression recognition; trains the neural network model through the target data set and the AU auxiliary data set to obtain a target model; inputs the expression image to be detected into the target model to obtain an expression recognition result. This solution directly uses an auxiliary data set that does not overlap with the target data set for joint training without the need for additional AU manual annotation of the target data set, and can improve the recognition accuracy of the trained target model without increasing the annotation cost.

[0100] Figure 4 A structural block diagram of an expression recognition device for implementing an embodiment of the present application.

[0101] The expression recognition device of the embodiment of the present application includes the following modules:

[0102] A first acquisition module 401 is used to acquire a target data set, wherein the target data set is a face data set with expression labels;

[0103] The second acquisition module 402 is used to acquire an AU auxiliary data set, wherein the AU auxiliary data set selects the AU with the strongest correlation with each basic expression according to the relationship between the AU and the expression;

[0104] A construction module 403 is used to construct a neural network model based on AU-perceived expression recognition;

[0105] The training module 404 is used to train the neural network model using the target data set and the AU auxiliary data set to obtain a target model;

[0106] The recognition module 405 is used to input the expression image to be detected into the target model to obtain the expression recognition result.

[0107] Optionally, the first acquisition module is specifically used to:

[0108] At least part of the data is filtered out from the public facial expression datasets of RAFDB and / or FERPlus as a target dataset, wherein the filtered target dataset includes a variety of basic expression images.

[0109] Optionally, the second acquisition module is specifically used to:

[0110] The AU dataset of RAFAU or EmotioNet is obtained, and each piece of data in the AU dataset is manually annotated with AU, wherein the AU annotated labels only include labels indicating seven basic expressions: happy, sad, surprised, scared, angry, disgusted, and naturally calm.

[0111] Optionally, the total loss function of the target model is as follows:

[0112]

[0113] Among them, Z FER is the score pair finally output by the target model, Z AU The score pair for the target model input, the Z FER Input Softmax function ψ, the Z AU Input Sigmoid function, α and β are constant coefficients used to balance the cross entropy loss of FER and binary cross entropy loss for AU detection The Y FER , Y AU are the labels from the FER dataset and the AU detection dataset, respectively.

[0114] Optionally, the identification module is specifically used for:

[0115] The expression image to be detected is input into the target model, and the expression recognition result is determined based on the output results of the convolutional neural network feature extraction module and the expression branch structure in the target model.

[0116] The expression recognition device provided in the embodiment of the present application obtains a target data set and an AU auxiliary data set; constructs a neural network model based on AU-perceived expression recognition; trains the neural network model through the target data set and the AU auxiliary data set to obtain a target model; inputs the expression image to be detected into the target model to obtain an expression recognition result. The device directly uses the auxiliary data set that does not overlap with the target data set for joint training without the need for additional AU manual annotation of the target data set, and can improve the recognition accuracy of the trained target model without increasing the annotation cost.

[0117] In the present application embodiment Figure 4 The expression recognition device shown can be a device, or a component, integrated circuit, or chip in a server. Figure 4The expression recognition device shown may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

[0118] The embodiments of the present application provide Figure 4 The facial expression recognition device shown can realize Figures 1 to 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0119] Alternatively, if Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, a memory 502, and a program or instruction stored in the memory 502 and executable on the processor 501. When the program or instruction is executed by the processor 501, each process of the above-mentioned expression recognition method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0120] It should be noted that the electronic device in the embodiment of the present application includes the server described above.

[0121] Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0122] The electronic device 600 includes, but is not limited to, components such as a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, and a processor 610. Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0123] The processor 610 is used to execute the process of the above-mentioned expression recognition method.

[0124] It should be understood that in the embodiment of the present application, the input unit 604 may include a graphics processor (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 609 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 610 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface, and the application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 610.

[0125] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned expression recognition method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0126] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0127] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned expression recognition method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0128] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0129] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0130] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0131] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for facial expression recognition, characterized in that: The method comprises: Acquire a target data set, wherein the target data set is a face data set with expression labels; Acquire an AU auxiliary data set, wherein the AU auxiliary data set selects the AU with the strongest correlation with each basic expression according to the relationship between the AU and the expression; Construct a neural network model based on AU-perceived expression recognition; The neural network model is trained using the target data set and the AU auxiliary data set to obtain the target model; Inputting the expression image to be detected into the target model to obtain the expression recognition result; The total loss function of the target model is as follows: ; in, is the score pair finally output by the target model, The score pair for the target model input, Input Softmax function ψ, Enter the Sigmoid function, and is a constant coefficient used to balance the cross entropy loss of FER and binary cross entropy loss for AU detection , , are the labels from the FER dataset and the AU detection dataset, respectively.

2. The method according to claim 1, characterized in that The step of obtaining the target data set includes: At least part of the data is filtered out from the public facial expression datasets of RAF-DB and / or FERPlus as a target dataset, wherein the filtered target dataset includes a variety of basic expression images.

3. The method according to claim 1, characterized in that The step of obtaining the AU auxiliary data set includes: The AU dataset of RAFAU or EmotioNet is obtained, and each piece of data in the AU dataset is manually annotated with AU, wherein the AU annotated labels only include labels indicating seven basic expressions: happy, sad, surprised, scared, angry, disgusted, and naturally calm.

4. The method according to claim 1, characterized in that: The step of inputting the expression image to be detected into the target model to obtain the expression recognition result comprises: The expression image to be detected is input into the target model, and the expression recognition result is determined based on the output results of the convolutional neural network feature extraction module and the expression branch structure in the target model.

5. An expression recognition device, characterized in that: include: A first acquisition module is used to acquire a target data set, wherein the target data set is a face data set with expression labels; A second acquisition module is used to acquire an AU auxiliary data set, wherein the AU auxiliary data set selects the AU with the strongest correlation with each basic expression according to the relationship between the AU and the expression; Building module for building neural network model based on AU-aware expression recognition; A training module is used to train the neural network model using the target data set and the AU auxiliary data set to obtain a target model; A recognition module, used for inputting the expression image to be detected into the target model to obtain an expression recognition result; The total loss function of the target model is as follows: ; in, is the score pair finally output by the target model, The score pair for the target model input, Input Softmax function ψ, Enter the Sigmoid function, and is a constant coefficient used to balance the cross entropy loss of FER and binary cross entropy loss for AU detection , , are the labels from the FER dataset and the AU detection dataset, respectively.

6. The device according to claim 5, characterized in that The first acquisition module is specifically used for: At least part of the data is filtered out from the public facial expression datasets of RAF-DB and / or FERPlus as a target dataset, wherein the filtered target dataset includes a variety of basic expression images.

7. The device according to claim 5, characterized in that The second acquisition module is specifically used for: The AU dataset of RAFAU or EmotioNet is obtained, and each piece of data in the AU dataset is manually annotated with AU, wherein the AU annotated labels only include labels indicating seven basic expressions: happy, sad, surprised, scared, angry, disgusted, and naturally calm.

8. The device according to claim 5, characterized in that The identification module is specifically used for: The expression image to be detected is input into the target model, and the expression recognition result is determined based on the output results of the convolutional neural network feature extraction module and the expression branch structure in the target model.

9. An electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the expression recognition method as described in any one of claims 1 to 4.