Expression recognition method, device, equipment and storage medium
By performing expression recognition on two frames of images and image frame sequences in the video, and fusing the results, the problem of poor robustness of expression recognition models in the existing technology in real scenes is solved, and the accuracy and robustness of expression recognition are improved. .
Patent Information
- Application Number
- CN202010604383.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-06-29
AI Technical Summary
In the existing technology, expression recognition models trained based on CNN or RNN have poor robustness in videos with excessively large facial postures and large lighting differences in real scenes, resulting in inaccurate facial expression recognition.
By determining at least two frames of images to be recognized in the video to be processed, facial expression recognition is performed on each frame of the image, and the resulting image frame sequence is recognized, and the results of the discrete frame and continuous frame models are combined for fusion processing to improve expression recognition. accuracy.
It significantly improves the accuracy of facial expression recognition, especially when the facial posture is large and the illumination difference is large, the misrecognition rate is reduced, and the application value in assisted driving, distance education and other fields is improved.
Smart Images

Figure CN111783620B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to computer vision, image processing, deep learning and cloud services in the field of artificial intelligence, and in particular to an expression recognition method, apparatus, device and storage medium. Background Art
[0002] As people's understanding of the performance of human-computer intelligent interaction continues to improve, research on human-computer intelligent interaction has received more and more attention. Facial expression recognition in video data is an important way of human-computer interaction. By analyzing facial expressions, we can obtain the emotional information of the characters in the video data, realize intelligent human-computer interaction, and thus provide the possibility for the practical application of facial expression recognition results.
[0003] In the prior art, facial expression recognition in video data mainly involves first disassembling the video to be processed to obtain a series of expression images after obtaining the video to be processed, and then using an expression recognition model trained based on a convolutional neural network (CNN) or a recurrent neural network (RNN) to perform facial expression recognition on the obtained expression images, thereby obtaining the expression recognition result of the face in the video.
[0004] However, the recognition performance of the expression recognition model trained based on CNN or RNN is greatly affected by the environment. For videos with large facial postures and large lighting differences in real scenes, its robustness is poor, and there is a problem of inaccurate facial expression recognition. Summary of the invention
[0005] The present application provides an expression recognition method, apparatus, device and storage medium.
[0006] According to a first aspect of the present application, there is provided a method for facial expression recognition, comprising:
[0007] Determine at least two frames of images to be recognized corresponding to the video to be processed, each frame of the images to be recognized contains a face area;
[0008] Performing facial expression recognition on each of the at least two frames of images to be recognized to obtain a first expression recognition result corresponding to the video to be processed;
[0009] Performing facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized, to obtain a second expression recognition result corresponding to the video to be processed;
[0010] The first expression recognition result and the second expression recognition result are fused to obtain an expression recognition result corresponding to the video to be processed.
[0011] According to a second aspect of the present application, there is provided an expression recognition device, comprising: a processing module, a first recognition module, a second recognition module and a fusion module;
[0012] The processing module is used to determine at least two frames of images to be recognized corresponding to the video to be processed, each frame of the images to be recognized contains a face area;
[0013] The first recognition module is used to perform facial expression recognition on each of the at least two frames of images to be recognized, and obtain a first expression recognition result corresponding to the video to be processed;
[0014] The second recognition module is used to perform facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized, so as to obtain a second expression recognition result corresponding to the video to be processed;
[0015] The fusion module is used to fuse the first expression recognition result and the second expression recognition result to obtain the expression recognition result corresponding to the video to be processed.
[0016] According to a third aspect of the present application, an electronic device is provided, including:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the first aspect and each possible design of the first aspect.
[0020] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect and each possible design of the first aspect.
[0021] According to a fifth aspect of the present application, there is provided a method for facial expression recognition, comprising:
[0022] Performing facial expression recognition on each frame of video image corresponding to the video to be processed to obtain a first expression recognition result;
[0023] Performing facial expression recognition on at least one image frame sequence corresponding to the video to be processed to obtain a second expression recognition result;
[0024] Determine an expression recognition result corresponding to the video to be processed according to the first expression recognition result and the second expression recognition result.
[0025] According to the sixth aspect of the present application, a computer program product is provided, comprising: a computer program, the computer program being stored in a readable storage medium, at least one processor of an electronic device being able to read the computer program from the readable storage medium, and the at least one processor executing the computer program so that the electronic device executes the method described in the first aspect.
[0026] The expression recognition method, device, equipment and storage medium provided in the embodiment of the present application determine at least two frames of images to be recognized corresponding to the video to be processed, perform facial expression recognition on each frame of the image to be recognized, obtain a first expression recognition result corresponding to the video to be processed, then perform facial expression recognition on at least one image frame sequence formed by at least two frames of images to be recognized, obtain a second expression recognition result corresponding to the video to be processed, and finally fuse the first expression recognition result and the second expression recognition result to obtain an expression recognition result corresponding to the video to be processed. In this technical solution, facial expression recognition is performed based on a single discrete image and expression recognition is performed on continuous images corresponding to the image frame sequence, and the results of the two are fused, thereby improving the accuracy of expression recognition.
[0027] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0029] Figure 1 It is a schematic diagram of an application scenario of the expression recognition method provided in an embodiment of the present application;
[0030] Figure 2 is a flowchart of an expression recognition method provided according to the first embodiment of the present application;
[0031] Figure 3 is a flowchart of an expression recognition method provided according to the second embodiment of the present application;
[0032] Figure 4 This is a schematic diagram of the working principle of performing expression recognition based on a discrete frame expression recognition model in an embodiment provided by the present application;
[0033] Figure 5 This is a schematic diagram of the working principle of performing expression recognition based on a continuous frame expression recognition model in an embodiment provided by the present application;
[0034] Figure 6is a flowchart of an expression recognition method provided according to the third embodiment of the present application;
[0035] Figure 7 is a flowchart of an expression recognition method provided according to the fourth embodiment of the present application;
[0036] Figure 8 is a flowchart of an expression recognition method provided according to the fifth embodiment of the present application;
[0037] Fig. 9 A schematic diagram of the structure of an expression recognition device provided in an embodiment of the present application;
[0038] Fig.10 It is a block diagram of an electronic device used to implement the expression recognition method of the embodiment of the present application. DETAILED DESCRIPTION
[0039] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0040] With the development of affective computing and intelligent human-computer interaction technology, facial expression recognition has become a research hotspot in various fields, including computer science, neurology, and psychology. Since emotions are an integral part of the human body, if computer systems can perceive human emotions, then human emotion (expression) recognition will be widely used in many fields such as security, education, neurology, law, and communication technology.
[0041] In practical applications, facial expressions (abbreviated as facial expressions) are the result of one or more movements or states of facial muscles. These movements or states express the individual's emotional state to the observer. Facial expression is a form of non-verbal communication. It is the main means of expressing social information between humans.
[0042] Facial expressions are divided into seven basic expressions according to the changes in facial muscles: anger, disgust, fear, happiness, sadness, surprise, and neutral. In addition, human facial expressions can also be other composite expressions, such as surprise (happiness + surprise), grief and anger (sadness + anger), etc. The embodiments of the present application do not limit the specific forms of other composite expressions.
[0043] At present, according to the different research objects, expression recognition can be divided into two cases: static image-based and video-based. Expression recognition based on static images has made great progress in the past few decades. It has the advantages of simple, fast and convenient feature extraction, and can also achieve good recognition results under specific environments. However, the expression information contained in the features of static images is very limited, and is easily affected by factors such as the external environment and individual differences. In addition, with the rapid development of computers, people have begun to pay more attention to expression recognition research based on videos (image sequences). Since the generation and disappearance of expressions have a process, expression recognition based on videos can better reflect the movement process of a complete expression and contain more facial movement and time information. Therefore, expression recognition research based on videos is more practical and more challenging.
[0044] In the prior art, facial expression recognition based on video is mainly based on manual recognition or the use of expression recognition models trained by convolutional neural networks (CNN) or recurrent neural networks (RNN) to perform facial expression recognition on the obtained expression images. However, the expression recognition model used in this method has poor robustness in video recognition for situations where the facial posture is too large and the illumination difference is large in real scenes, resulting in poor facial expression recognition effect, especially when the expression intensity is low, it is very easy to cause misrecognition, and there is a problem of low accuracy in facial expression recognition.
[0045] In response to the above technical problems, the embodiments of the present application provide an expression recognition method, device, equipment and storage medium, which are applied to computer vision, image processing, deep learning and cloud services in the field of artificial intelligence, so as to improve the accuracy of facial expression recognition in videos, thereby improving its utilization value in the fields of assisted driving, distance education, and targeted advertising.
[0046] In an embodiment of the present application, at least two frames of images to be recognized corresponding to the video to be processed are determined, and facial expression recognition is performed on each frame of the image to be recognized to obtain a first expression recognition result corresponding to the video to be processed, and then facial expression recognition is performed on at least one image frame sequence formed by at least two frames of images to be recognized to obtain a second expression recognition result corresponding to the video to be processed, and finally the first expression recognition result and the second expression recognition result are fused to obtain an expression recognition result corresponding to the video to be processed. In this technical solution, facial expression recognition is performed based on a single discrete image and expression recognition is performed on a continuous image corresponding to the image frame sequence, and the results of the two are fused, thereby improving the accuracy of expression recognition.
[0047] The technical concept of the present application is as follows: Since the expression recognition models in the prior art are all obtained by training based on single models such as CNN and RNN, their video robustness in real scenes is poor and the expression recognition effect is poor. Through research, the inventors found that if expression recognition is performed on a single image and multiple continuous images in the video respectively, and the two results are fused, the expression recognition effect can be greatly improved. In addition, the accuracy of each recognition result can be further improved by a specific discrete frame expression recognition model and a continuous frame expression recognition model, so the technical solution of the present application is proposed. The specific implementation of the technical solution of the present application can be found in the records in the following embodiments, which will not be repeated here.
[0048] For example, Figure 1 Schematic diagram of an application scenario of the expression recognition method provided in the embodiment of the present application. Figure 1 As shown, the application scenario may include: a collection device 11 and an electronic device 12 .
[0049] The acquisition device 11 is a device for acquiring video, for example, a terminal device such as a mobile phone terminal, a notebook, a camera device installed at various places or at a checkpoint, etc. The embodiment of the present application does not limit the specific implementation form of the acquisition device, which can be determined according to the actual scenario.
[0050] The electronic device 12 is a device that can communicate with the acquisition device 11, and can obtain the video collected by the acquisition device, and perform preprocessing and facial expression recognition on the video. For example, the video is disassembled, face detection, face key point detection, image transformation, normalization and other preprocessing processes are performed, and the expression recognition of the video image is performed using the pre-trained discrete frame expression recognition model and continuous frame expression recognition model, and the expression recognition is performed using the pre-trained audio model.
[0051] Understandably, Figure 1 The application scenario diagram shown is only an exemplary description. In actual application, it can be adjusted according to actual needs. For example, the acquisition device 11 and the electronic device can be integrated on the same device, and the application scenario can also include a storage device, etc., which is not limited by the embodiment of the present application.
[0052] Optionally, the execution subject of the embodiment of the present application may be an electronic device, such as a terminal device such as a computer or a tablet computer, or a server, such as a background processing platform, etc. Therefore, the present embodiment is explained by collectively referring to the terminal device and the server as an electronic device, and whether the electronic device is specifically a terminal device or a server can be determined according to actual conditions.
[0053] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0054] Figure 2 FIG. 1 is a flow chart of the expression recognition method provided according to the first embodiment of the present application. Figure 2 As shown, the method may include the following steps:
[0055] S201, determining at least two frames of images to be recognized corresponding to the video to be processed, each frame of the images to be recognized containing a face region.
[0056] In practical applications, a video is formed by displaying a series of captured images (called frames) at a specified frequency, so a single video frame, i.e., an image, can be obtained by controlling the video to stop at a specific frame. It can be understood that an image is the smallest unit that constitutes a video.
[0057] In an embodiment of the present application, when it is necessary to perform expression recognition on a face in a video to be processed, the video to be processed needs to be processed first, and video frames corresponding to the video to be processed are extracted therefrom.
[0058] In addition, since the present application needs to process the image frame sequence corresponding to the video to be processed, the electronic device needs to determine at least two frames of images to be recognized that include face areas after processing the video to be processed.
[0059] Optionally, since the goal of the present application is to recognize facial expressions in a video, at least two frames of images to be recognized that are processed by the present application need to contain facial regions.
[0060] S202: Perform facial expression recognition on each of the at least two frames of images to be recognized to obtain a first expression recognition result corresponding to the video to be processed.
[0061] In an embodiment of the present application, the electronic device can perform facial expression recognition on the at least two frames of images to be recognized, respectively, to obtain expression recognition results corresponding to each frame of the image to be recognized, and then count the expression recognition results corresponding to all frames of the images to be recognized, determine the number of each expression recognition results, and then use the expression recognition result with the largest number as the expression recognition result of the video to be processed, that is, the first expression recognition result.
[0062] Optionally, in a specific implementation, the electronic device can input each frame of the image to be recognized into a pre-trained expression recognition model for expression recognition, where the expression recognition model is obtained by training a preset network using labeled image frame samples, or directly extract the face of each frame of the image to be recognized, and then perform expression analysis on the extracted facial features to determine the expression recognition result of each frame of the image to be recognized. It is understandable that the embodiment of the present application does not limit the expression recognition method of each frame of the image to be recognized, which can be determined according to actual conditions and will not be repeated here.
[0063] S203, performing facial expression recognition on at least one image frame sequence formed by at least two frames of images to be recognized, and obtaining a second expression recognition result corresponding to the video to be processed.
[0064] In practical applications, for a person in the same video, multiple consecutive frames of images usually have the same facial expression. Therefore, in order to improve the accuracy of expression recognition, the electronic device can perform facial expression recognition on at least one image frame sequence formed by at least two frames of images to be recognized, and obtain the expression recognition results corresponding to each image frame sequence, and then count the expression recognition results of all image frame sequences to determine the number of each expression recognition results, and then use the expression recognition result with the largest number as the expression recognition result of the video to be processed, that is, the second expression recognition result.
[0065] Optionally, in a specific implementation, the electronic device can input each image frame sequence into a pre-trained expression recognition model for expression recognition, where the expression recognition model is obtained by training a preset network using annotated image frame sequences, or directly perform facial feature extraction, non-local feature extraction, and image timing information extraction on each image frame sequence, and then perform facial expression analysis on the extracted facial features, non-local features, and timing information, and then determine the expression recognition results of each image frame sequence. It is understandable that the embodiment of the present application does not limit the expression recognition method for each frame of the image to be recognized, which can be determined based on actual conditions and will not be repeated here.
[0066] S204: Fusing the first expression recognition result and the second expression recognition result to obtain an expression recognition result corresponding to the video to be processed.
[0067] Optionally, when the electronic device determines a first expression recognition result corresponding to the video to be processed based on a single image to be recognized, and determines a second expression recognition result corresponding to the video to be processed based on an image frame sequence, it fuses information of the two to decide the expression recognition result corresponding to the video to be processed.
[0068] In this embodiment, information fusion is an inference process of combining the first expression recognition result and the second expression recognition result into an expression recognition result with the same expression form, and utilizing the redundancy and complementarity of the image to be recognized and the image frame sequence in time or space to reasonably control and use the first expression recognition result and the second expression recognition result, so as to obtain a consistent explanation and description of the expression recognition result of the video to be processed, thereby improving the accuracy of the expression recognition result.
[0069] The expression recognition method provided in the embodiment of the present application determines at least two frames of images to be recognized corresponding to the video to be processed, performs facial expression recognition on each frame of the image to be recognized, obtains a first expression recognition result corresponding to the video to be processed, then performs facial expression recognition on at least one image frame sequence formed by at least two frames of images to be recognized, obtains a second expression recognition result corresponding to the video to be processed, and finally fuses the first expression recognition result and the second expression recognition result to obtain an expression recognition result corresponding to the video to be processed. In this technical solution, facial expression recognition is performed based on a single discrete image and expression recognition is performed on continuous images corresponding to the image frame sequence, and the results of the two are fused, thereby improving the accuracy of expression recognition.
[0070] Exemplarily, based on the above embodiments, Figure 3 FIG. 1 is a flow chart of an expression recognition method according to the second embodiment of the present application. Figure 3 As shown, in this embodiment, the above S202 can be implemented by the following steps:
[0071] S301, using a pre-trained discrete frame expression recognition model to perform facial expression recognition on each of the at least two frames of images to be recognized in turn, to obtain a first expression recognition result corresponding to the video to be processed.
[0072] Among them, the discrete frame expression recognition model includes: a texture feature recognition model and / or a granularity feature recognition model; the texture feature recognition model is obtained by training a computer vision group network using a video image sample set, and the granularity feature recognition model is obtained by training a first neural network using a video image sample set, and the first neural network includes: a computer vision group network and a bilinear model.
[0073] In practical applications, the visual geometry group (VGG) network is a deep convolutional neural network established by studying the relationship between the depth of the convolutional neural network and its performance. It has high accuracy and excellent generalization ability, and performs well on different image data sets.
[0074] However, in the expression recognition task, the most important thing is the shallowly extracted image texture features, while the deeply extracted image abstract features cannot bring much gain to the expression recognition task. Therefore, in the embodiment of the present application, the VGG network with the least layers, namely the VGG-11 network, can be selected.
[0075] Before specific use, a labeled video image sample set can be first obtained, and then each frame of the video image in the video image sample set is input into the VGG-11 network in turn, and the texture features of the video image are analyzed, and then the parameters of the VGG-11 network are adjusted according to the expression recognition results output by the VGG-11 network, so that the expression recognition results output by the VGG-11 network are consistent with the labeling results of the video image samples. In this embodiment, the trained VGG-11 network is a texture feature recognition model.
[0076] In practical applications, since facial expression recognition in videos is similar to fine-grained image classification, that is, the difference between classes is usually smaller than the difference within a class. Therefore, how to obtain the difference features within a class is the key to facial expression recognition in videos. Inspired by fine-grained image classification, in this embodiment, expression recognition can be regarded as a weakly supervised fine-grained classification task. At the same time, since the key to facial expression recognition lies in the degree of distortion of facial muscles, rather than whether the corresponding features exist, and second-order features can better reflect the distortion characteristics of muscles. Therefore, it can be considered that second-order features are more suitable for the task of video facial expression recognition than first-order features.
[0077] In practical applications, considering that the model capacity is too large, it may cause overfitting. Therefore, the neural network in this embodiment can adopt a fully shared parameter mode, using only the VGG-Emo network for feature extraction, and then using the 512-dimensional feature matrix x after the VGG-Emo network pooling as the input of the bilinear module. Since the matrix size is 512×1, the transposed matrix x of the feature matrix x is T The size is 1×512. After the outer product of the feature matrix, a second-order feature matrix of 512×512 is obtained, which eliminates the pooling operation in the bilinear model. The second-order feature matrix is then re-stretched into a one-dimensional feature vector of 1×262144. The one-dimensional feature vector is then transformed and standardized by the square root of the symbol, and finally passed through the fully connected layer and the activation function Softmax layer for image classification to complete the final expression classification.
[0078] Therefore, in an embodiment of the present application, a first neural network can be first trained based on a computer vision group network and a bilinear model to meet the above-mentioned video expression recognition task. Specifically, a labeled video image sample set is first obtained, and then each frame of the video image in the video image sample set is sequentially input into a first neural network composed of a VGG-11 network and a bilinear model, and the texture features and expression classification results of the video image are analyzed, and then the parameters of the first neural network are adjusted according to the expression recognition results output by the first neural network, so that the expression recognition results output by the first neural network are consistent with the labeling results of the video image samples. In this embodiment, the trained first neural network is a granular feature recognition model.
[0079] For example, Figure 4 It is a schematic diagram of the working principle of expression recognition based on a discrete frame expression recognition model in an embodiment provided in this application. Figure 4 The schematic diagram shown is illustrated by taking a discrete frame expression recognition model including a texture feature recognition model and a granular feature recognition model as an example. Figure 4 In the paper, the texture feature recognition model is represented by the VGG-Emo network, and the granularity feature recognition model is represented by the VGG-Emo network and the bilinear model.
[0080] like Figure 4 As shown, each of the at least two frames of images to be recognized corresponding to the video to be processed is input into the discrete frame expression recognition model respectively. On the one hand, each frame of the image to be recognized is sequentially input into the VGG-Emo network, and the expression prediction results corresponding to each image to be recognized are output sequentially. According to the number of expressions corresponding to the expression prediction results, the expression with the largest number of images to be recognized is used to determine the final prediction result of the VGG-Emo network, which is recorded as result 1. On the other hand, each frame of the image to be recognized is sequentially input into the VGG-Emo network and the bilinear model, and the expression prediction results corresponding to each image to be recognized are output sequentially. According to the number of expressions corresponding to the expression prediction results, the expression with the largest number of images to be recognized is used to determine the final prediction result of the VGG-Emo network and the bilinear model, which is recorded as result 2. Correspondingly, the integration result of result 1 and result 2 is the first expression recognition result mentioned above.
[0081] For example, in the embodiments of the present application, Figure 3 As shown, the above S203 can be implemented by the following steps:
[0082] S302, using a pre-trained continuous frame expression recognition model to perform facial expression recognition on at least one image frame sequence in sequence to obtain a second expression recognition result corresponding to the video to be processed.
[0083] Among them, the continuous frame expression recognition model includes: a non-local feature recognition model and / or a spatiotemporal feature recognition model; the non-local feature recognition model is obtained by training the second neural network using a video image sample set, the second neural network includes: a computer vision group network, a non-local information module and a gated recurrent unit, and the spatiotemporal feature recognition model is obtained by training the C3D network using a video image sample set.
[0084] Optionally, for a detailed description of VGG, please refer to the record in S301 above, which will not be repeated here. The nonlocal information (NL) module is mainly applicable to the modification of the value of the external variable by the internal function in the nested function. The gated recurrent unit (GRU) is a variant of the long short-term memory network (LSTM), which is a gating mechanism in RNN, aiming to solve the gradient disappearance / explosion problem in the standard RNN and retain the long-term information of the sequence at the same time.
[0085] In an embodiment of the present application, a nonlocal module is added to the back of the VGG-Emo network to extract the global information of the image to be recognized, and then a GRU is added to the back to extract the timing information of the expression in the image frame sequence, and the attention mechanism and timing information are combined to improve the accuracy of video expression recognition.
[0086] Optionally, before specific use, a labeled video image sample set can be first obtained, and then the video image sample set is processed to obtain at least one image frame sequence, and each image frame sequence is sequentially input into a second neural network composed of a computer vision group network, a non-local information module and a gated recurrent unit, by analyzing the texture features, non-local information and timing information of the facial expressions corresponding to the image frame sequence, and then adjusting the parameters of the second neural network according to the expression recognition results output by the second neural network, so that the expression recognition results output by the second neural network are consistent with the labeling results of each image frame sequence. In this embodiment, the trained second neural network is a non-local feature recognition model.
[0087] In addition, deep 3D ConvNets (C3D) is a common method for extracting spatiotemporal information of sequences using deep 3D ConvNets on large-scale supervised video datasets, and modified C3D is pre-trained using single-frame images based on C3D, thereby improving the accuracy of the C3D model. In practical applications, training C3D using at least one image frame sequence corresponding to a labeled video image sample set can obtain a spatiotemporal feature recognition model.
[0088] For example, Figure 5It is a schematic diagram of the working principle of performing expression recognition based on a continuous frame expression recognition model in an embodiment provided in the present application. Figure 5 The schematic diagram shown is used as an example to illustrate the continuous frame expression recognition model including the non-local feature recognition model and the spatiotemporal feature recognition model. Figure 5 In the paper, the non-local feature recognition model is represented by the VGG-NL-GRU network, and the spatiotemporal feature recognition model is represented by the modified C3D network.
[0089] like Figure 5 As shown, at least one image frame sequence corresponding to the video to be processed is respectively input into the continuous frame expression recognition model. On the one hand, each image frame sequence is sequentially input into the VGG-NL-GRU network, and the expression prediction results corresponding to each image frame sequence are sequentially output. According to the number of expressions corresponding to the expression prediction results, the expression with the most image frame sequences is used to determine the final prediction result of the VGG-NL-GRU network, which is recorded as result 3. On the other hand, each image frame sequence is sequentially input into the modified C3D network, and the expression prediction results corresponding to each image frame sequence are sequentially output. According to the number of expressions corresponding to the expression prediction results, the final prediction result of the modified C3D network is determined, which is recorded as result 4. Correspondingly, the integration result of result 3 and result 4 is the above-mentioned second expression recognition result.
[0090] Optionally, in the embodiments of the present application, Figure 3 As shown, before the above S303, the method may further include the following steps:
[0091] S302a: Determine at least one image frame sequence according to at least two frames of images to be recognized.
[0092] Each image frame sequence has a first number of images to be identified, and two adjacent image frame sequences overlap with a second number of images to be identified, and the value of the second number is smaller than the value of the first number.
[0093] In practical applications, since there is a process for the generation and disappearance of expressions, when recognizing expressions in videos, a sequence of image frames can be determined based on the correlation between image frames to ensure that video-based expression recognition can better reflect the movement process of a complete expression.
[0094] Optionally, in a possible design of this embodiment, the first number is equal to twice the second number. For example, the first number is 16 frames and the second number is 8 frames. If an image frame sequence includes 16 image frames to be identified, there are 8 frames overlapped between two adjacent image frame sequences, that is, each sequence overlaps with the previous sequence by 8 frames.
[0095] In the embodiments of the present application, adjacent image frames are arranged to have partially overlapping image frames, so that facial expression information in the video can be more comprehensively extracted, laying a foundation for obtaining accurate expression recognition results subsequently.
[0096] The expression recognition method provided in the embodiment of the present application uses a pre-trained discrete frame expression recognition model to sequentially perform facial expression recognition on each of the at least two frames of images to be recognized, thereby obtaining a first expression recognition result corresponding to the video to be processed, and uses a pre-trained continuous frame expression recognition model to sequentially perform facial expression recognition on at least one image frame sequence, thereby obtaining a second expression recognition result corresponding to the video to be processed. This technical solution simplifies the process of obtaining the first expression recognition result and the second expression recognition result by performing expression recognition based on a pre-trained expression recognition model, thereby improving recognition efficiency and recognition accuracy.
[0097] Exemplarily, based on the above embodiments, Figure 6 FIG. 1 is a flow chart of an expression recognition method according to the third embodiment of the present application. Figure 6 As shown, in this embodiment, the method may further include the following steps:
[0098] S601: Determine audio information to be identified corresponding to the video to be processed.
[0099] Since a video is usually formed by image frames and sound information, in an embodiment of the present application, the electronic device can process the video to be processed and extract the corresponding audio information to be identified therefrom.
[0100] Optionally, a dedicated video-to-audio application may be used to extract audio information. It is understandable that the present application embodiment does not limit the method of extracting the audio information to be identified from the video to be processed, which can be determined according to actual needs and will not be repeated here.
[0101] S602: extracting audio features of the audio information to be recognized based on a preset audio recognition model.
[0102] As is known to all, audio signals are information carriers of regular frequency and amplitude changes of sound waves with voice, music and sound effects. Therefore, by using a preset audio recognition model to analyze the audio information (audio signal) to be recognized, it is possible to extract audio features related to people, such as the voice of the person corresponding to the face in the video to be processed.
[0103] Optionally, the embodiment of the present application does not limit the method of extracting audio features from the audio information to be identified, which can be determined according to the actual scenario and will not be described in detail here.
[0104] In an embodiment of the present application, the preset audio recognition model can be obtained by processing the sound network (SoundNet), so the extracted audio information can be used as input to extract audio features through the preset audio recognition model (for example, a 1D convolutional neural network).
[0105] S603: Obtain a third expression recognition result corresponding to the video to be processed according to the audio feature.
[0106] In an embodiment of the present application, after obtaining the audio features corresponding to the audio information to be recognized, the audio features are directly classified to obtain the third expression recognition result corresponding to the video to be processed. Exemplarily, expression recognition based on audio features can also be determined by a preset expression classification model, which is not limited in this embodiment.
[0107] Accordingly, the above S204 can be replaced by the following steps:
[0108] S604: Fusing the first expression recognition result, the second expression recognition result, and the third expression recognition result to obtain an expression recognition result corresponding to the video to be processed.
[0109] In an embodiment of the present application, since the video includes features such as images and audio, after determining the first expression recognition result, the second expression recognition result, and the third expression recognition result corresponding to the image to be recognized, the three can be fused and the final fused expression recognition result can be used as the expression recognition result corresponding to the video to be processed.
[0110] As an example, the electronic device can determine the final result based on the majority voting method for the first expression recognition result, the second expression recognition result, and the third expression recognition result. For example, assuming that the first expression recognition result is happy, the second expression recognition result is sad, and the third expression recognition result is happy, then it can be determined that the expression recognition result corresponding to the video to be processed is happy.
[0111] The expression recognition method provided in the embodiment of the present application determines the audio information to be recognized corresponding to the video to be processed, extracts the audio features of the audio information to be recognized based on a preset audio recognition model, and then obtains the third expression recognition result corresponding to the video to be processed based on the audio features. Therefore, by fusing the first expression recognition result, the second expression recognition result and the third expression recognition result, the expression recognition result corresponding to the video to be processed can be obtained. In this technical solution, by using the image information, timing information and audio information of the facial expression in the video to be processed to classify the expression, the accuracy of video facial expression recognition is further improved.
[0112] Exemplarily, based on the above embodiments, Figure 7FIG. 4 is a flow chart of the expression recognition method provided according to the fourth embodiment of the present application. Figure 7 As shown, in this embodiment, the above S201 can be implemented by the following steps:
[0113] S701: Disassemble the acquired video to be processed to obtain at least two frames of video images and audio information to be recognized.
[0114] In an embodiment of the present application, after the electronic device obtains the video to be processed, in order to obtain the video expression data in the display scene corresponding to the video to be processed, the video to be processed can be disassembled in sequence to obtain at least two frames of video images and audio information to be identified.
[0115] At least two frames of video images may be a series of RGB images containing facial expressions. An RGB image is a binary image in which the color of each pixel can be stored using three data, which respectively specify the proportion of the three primary colors of red, green, and blue in the pixel color, forming a three-dimensional array.
[0116] S702: Perform image preprocessing on each of at least two video image frames to obtain at least two frames of images to be recognized.
[0117] The image preprocessing includes at least one of the following: face detection, face key point detection, size processing, normalization processing, and enhancement processing.
[0118] Exemplarily, in this embodiment, the electronic device first detects the face in each frame of the at least two frames of images to be identified (including an RGB image of a face) through a face detection model to obtain an approximate location area of the face.
[0119] Optionally, the electronic device may also detect the facial key points based on the approximate location area of the face obtained by face detection, and obtain the key point coordinate values of the face through the facial key point detection model. The facial key point detection model is a pre-trained model, which is called to obtain a preset number of facial key points and key point coordinate values by inputting an image containing a face. Exemplarily, the number of facial key points may be 72, and the coordinates of the 72 facial key points may be (x1, y1), ..., (x72, y72), respectively.
[0120] Furthermore, based on the detection of facial key points, the faces in the image to be identified can be aligned according to the coordinate values of the facial key points. At the same time, an image containing only the face area is intercepted through affine transformation and adjusted to the same size of 128×128. The coordinates of the facial key points are also remapped to new coordinates according to the affine transformation matrix. Affine transformation, also known as affine mapping, refers to a linear transformation in geometry, followed by a translation, to transform a vector space into another vector space. In this embodiment, processing the image to be identified based on affine transformation can improve the accuracy of facial expression recognition.
[0121] Furthermore, in an embodiment of the present application, in order to solve the problem of uneven image pixel sizes, the electronic device can normalize the obtained image containing the face image area. In this embodiment, the image normalization process refers to normalizing each pixel in the image in turn, and the normalization process method is: the pixel value of each pixel is subtracted from 128 and then divided by 256, so that the pixel value of each pixel is between [-0.5, 0.5].
[0122] Subsequently, random data enhancement processing is performed on the normalized image, such as flipping, translation, etc., to improve the accuracy of the image to be recognized.
[0123] The expression recognition method provided in the embodiment of the present application disassembles the acquired video to be processed to obtain at least two frames of video images and audio information to be recognized, and then performs image preprocessing on each of the at least two frames of video images to obtain at least two frames of images to be recognized, wherein the image preprocessing includes at least one of the following: face detection, face key point detection, size processing, normalization processing, and enhancement processing. In this technical solution, before performing facial expression recognition on the video to be processed, the video to be processed is first disassembled and the obtained video image is preprocessed, which can improve the accuracy of the image to be recognized, thereby providing a prerequisite for subsequently improving the accuracy of expression recognition.
[0124] In summary, the above embodiments introduce the specific implementation scheme of the present application, which is explained below through a specific example.
[0125] For example, Figure 8 FIG. 5 is a flow chart of the expression recognition method provided according to the fifth embodiment of the present application. Figure 8 As shown, in this embodiment, the expression recognition process can be divided into a video processing part and an expression recognition part. In this embodiment, the expression is divided into anger, disgust, fear, happiness, sadness, surprise and neutral for explanation.
[0126] The video processing part can be interpreted as the electronic device disassembling the video to be processed to obtain at least two frames of video images, and then preprocessing the at least two frames of video images to obtain at least two frames of images to be recognized.
[0127] Optionally, the expression recognition part can obtain recognition results through a discrete frame expression recognition model, a continuous frame expression recognition model and a sound network model respectively.
[0128] Exemplarily, the discrete frame expression recognition model includes: texture feature recognition model (VGG-Emo network), granular feature recognition model (VGG-Emo network and bilinear model). The continuous frame expression recognition model includes: non-local feature recognition model (VGG-NL-GRU network), spatiotemporal feature recognition model (modified C3D network).
[0129] Specifically, at least two frames of images to be recognized corresponding to the video to be processed are sequentially input into the discrete frame expression recognition model. On the one hand, the VGG-Emo network is used to perform expression recognition on each frame of the image to be recognized, and the majority voting method is performed based on the expression recognition results of all frames of the image to be recognized, and the result 1 (happy) is obtained. On the other hand, the VGG-Emo network and the bilinear model are also used to perform expression recognition on each frame of the image to be recognized, and the majority voting method is performed based on the expression recognition results of all frames of the image to be recognized, and the result 2 (happy) is obtained.
[0130] In addition, for at least one image frame sequence corresponding to at least two frames of images to be recognized, each image frame sequence is sequentially input into the continuous frame expression recognition model. On the one hand, the VGG-NL-GRU network is used to perform expression recognition on each image frame sequence, and the majority voting method is performed based on the expression recognition results of all image frame sequences to obtain result 3 (angry). On the other hand, the modified C3D network is used to perform expression recognition on each image frame sequence, and the majority voting method is performed on the expression recognition results of all image frame sequences to obtain result 4 (happy).
[0131] Furthermore, the audio information to be recognized corresponding to the video to be processed is input into the sound network model for expression recognition, and result 5 (surprise) is obtained.
[0132] The electronic device finally merges the obtained results 1, 2, 3, 4, and 5 using the majority voting method, and the result with the most votes (happy) is the expression recognition result corresponding to the video to be processed.
[0133] In summary, the method provided in the embodiment of the present application fuses the results of two video expression recognition models based on discrete frames, two video expression recognition models based on continuous frames, and one video expression recognition model based on audio, which greatly improves the accuracy of video expression recognition in real scenes. That is, by using the idea of multi-model fusion, the image information, timing information, and audio information of facial expressions in the video are fused to extract multimodal information of video expressions for expression classification, which greatly improves the accuracy of video facial expression recognition, especially video facial expression recognition in real scenes.
[0134] In practical applications, the improvement of accuracy is conducive to improving the service quality of many applications. For example, in advertising, it is conducive to assisting in recommending search results that are more in line with user needs and precise advertising. In distance education, it is conducive to identifying students' emotions to improve teaching content and improve the quality of distance education. In driver monitoring scenarios, it is conducive to identifying the driver's emotions and giving corresponding prompts to the driver to ensure the driver's safety.
[0135] The above describes the specific implementation of the expression recognition method mentioned in the embodiment of the present application. The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0136] Fig. 9 This is a schematic diagram of the structure of the expression recognition device provided in the embodiment of the present application. The device can be integrated in an electronic device or implemented by an electronic device, and the electronic device can be a terminal device or a server. Fig. 9 As shown, in this embodiment, the expression recognition device 90 may include:
[0137] A processing module 901 is used to determine at least two frames of images to be recognized corresponding to the video to be processed, each frame of the images to be recognized contains a face area;
[0138] A first recognition module 902 is used to perform facial expression recognition on each of the at least two frames of images to be recognized, and obtain a first expression recognition result corresponding to the video to be processed;
[0139] The second recognition module 903 is used to perform facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized, and obtain a second expression recognition result corresponding to the video to be processed;
[0140] The fusion module 904 is used to fuse the first expression recognition result and the second expression recognition result to obtain the expression recognition result corresponding to the video to be processed.
[0141] In a possible design of an embodiment of the present application, the first recognition module 902 is specifically used to use a pre-trained discrete frame expression recognition model to perform facial expression recognition on each of the at least two frames of images to be recognized in turn, to obtain a first expression recognition result corresponding to the video to be processed;
[0142] The discrete frame expression recognition model includes: a texture feature recognition model and / or a granular feature recognition model, the texture feature recognition model is obtained by training a computer vision group network using a video image sample set, and the granular feature recognition model is obtained by training a first neural network using a video image sample set, and the first neural network includes: a computer vision group network and a bilinear model.
[0143] In another possible design of the embodiment of the present application, the second recognition module 903 is specifically used to use a pre-trained continuous frame expression recognition model to sequentially perform facial expression recognition on the at least one image frame sequence to obtain a second expression recognition result corresponding to the video to be processed;
[0144] The continuous frame expression recognition model includes: a non-local feature recognition model and / or a spatiotemporal feature recognition model, the non-local feature recognition model is obtained by training a second neural network using a video image sample set, the second neural network includes: a computer vision group network, a non-local information module and a gated recurrent unit, and the spatiotemporal feature recognition model is obtained by training a C3D network using a video image sample set.
[0145] In an embodiment of the present application, the processing module 901 is also used to perform facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized in the second recognition module 903, and before obtaining the second expression recognition result corresponding to the video to be processed, determine at least one image frame sequence based on the at least two frames of images to be recognized, wherein each image frame sequence has a first number of images to be recognized, and two adjacent image frame sequences have a second number of images to be recognized overlapping, and the value of the second number is less than the value of the first number.
[0146] Optionally, the first quantity is equal to twice the second quantity.
[0147] Exemplarily, the first number is 16 frames, and the second number is 8 frames.
[0148] In another possible design of the embodiment of the present application, the processing module 901 is further used to determine the audio information to be recognized corresponding to the video to be processed, extract the audio features of the audio information to be recognized based on a preset audio recognition model, and obtain the third expression recognition result corresponding to the video to be processed according to the audio features;
[0149] Correspondingly, the fusion module 904 is specifically used to fuse the first expression recognition result, the second expression recognition result and the third expression recognition result to obtain the expression recognition result corresponding to the video to be processed.
[0150] In another possible design of the embodiment of the present application, the processing module 901 is used to determine at least two frames of to-be-recognized images corresponding to the video to be processed, specifically:
[0151] The processing module is specifically used to disassemble the acquired video to be processed to obtain at least two frames of video images and audio information to be recognized, and perform image preprocessing on each of the at least two frames of video images to obtain the at least two frames of images to be recognized;
[0152] The image preprocessing includes at least one of the following: face detection, face key point detection, size processing, normalization processing, and enhancement processing.
[0153] The device provided in the embodiment of the present application can be used to perform Figures 2 to 8 The implementation principle and technical effect of the method in the illustrated embodiment are similar and will not be described in detail here.
[0154] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0155] Furthermore, according to an embodiment of the present application, the present application also provides an electronic device and a computer-readable storage medium.
[0156] Fig.10It is a block diagram of an electronic device for implementing the expression recognition method of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0157] like Fig.10 As shown, the electronic device includes: one or more processors 1001, a memory 1002, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 1001 is taken as an example.
[0158] The memory 1002 is a non-transient computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the expression recognition method provided in the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the expression recognition method provided in the present application.
[0159] The memory 1002 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the expression recognition method in the embodiment of the present application. The processor 1001 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 1002, that is, the expression recognition method in the above method embodiment is implemented.
[0160] The memory 1002 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the expression recognition electronic device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1002 may optionally include a memory remotely arranged relative to the processor 1001, and these remote memories may be connected to the expression recognition electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0161] The electronic device for implementing the expression recognition method may further include: an input device 1003 and an output device 1004. The processor 1001, the memory 1002, the input device 1003 and the output device 1004 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.
[0162] The input device 1003 can receive input digital or character information, and generate key signal input related to user settings and function control of the expression recognition electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 1004 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0163] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0164] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0165] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0166] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0167] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0168] The present application also provides a method for facial expression recognition, including:
[0169] Performing facial expression recognition on each frame of video image corresponding to the video to be processed to obtain a first expression recognition result;
[0170] Performing facial expression recognition on at least one image frame sequence corresponding to the video to be processed to obtain a second expression recognition result;
[0171] Determine an expression recognition result corresponding to the video to be processed according to the first expression recognition result and the second expression recognition result.
[0172] According to the technical solution of the embodiment of the present application, facial expression recognition is performed on each frame of video image corresponding to the processed video, and facial expression recognition is performed on at least one image frame sequence corresponding to the processed video, and finally a final expression recognition result is determined based on the two, thereby improving the accuracy of the final expression recognition.
[0173] According to an embodiment of the present application, the present application also provides a computer program product, including: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the scheme of the electronic device in any of the aforementioned method embodiments.
[0174] For the specific implementation of the scheme, please refer to the records in the above method embodiment, which will not be repeated here. It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0175] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for facial expression recognition, comprising: Determine at least two frames of images to be recognized corresponding to the video to be processed, each frame of the images to be recognized contains a face area; Performing facial expression recognition on each of the at least two frames of images to be recognized to obtain a first expression recognition result corresponding to the video to be processed; Performing facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized, to obtain a second expression recognition result corresponding to the video to be processed; Determining audio information to be identified corresponding to the video to be processed; Extracting audio features of the audio information to be recognized based on a preset audio recognition model; Obtaining a third expression recognition result corresponding to the video to be processed according to the audio feature; The first expression recognition result, the second expression recognition result and the third expression recognition result are fused to obtain an expression recognition result corresponding to the video to be processed, wherein the fusion process is a majority voting method.
2. The method according to claim 1, wherein: The step of performing facial expression recognition on each of the at least two frames of images to be recognized to obtain a first expression recognition result corresponding to the video to be processed includes: Using a pre-trained discrete frame expression recognition model, sequentially perform facial expression recognition on each of the at least two frames of images to be recognized, to obtain a first expression recognition result corresponding to the video to be processed; The discrete frame expression recognition model includes: a texture feature recognition model and / or a granular feature recognition model, the texture feature recognition model is obtained by training a computer vision group network using a video image sample set, and the granular feature recognition model is obtained by training a first neural network using a video image sample set, and the first neural network includes: a computer vision group network and a bilinear model.
3. The method according to claim 1 or 2, wherein: Performing facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized to obtain a second expression recognition result corresponding to the video to be processed, including: Using a pre-trained continuous frame expression recognition model, sequentially performing facial expression recognition on the at least one image frame sequence to obtain a second expression recognition result corresponding to the video to be processed; The continuous frame expression recognition model includes: a non-local feature recognition model and / or a spatiotemporal feature recognition model, the non-local feature recognition model is obtained by training a second neural network using a video image sample set, the second neural network includes: a computer vision group network, a non-local information module and a gated recurrent unit, and the spatiotemporal feature recognition model is obtained by training a C3D network using a video image sample set.
4. The method according to claim 3, wherein: Before performing facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized to obtain a second expression recognition result corresponding to the video to be processed, the method further includes: At least one image frame sequence is determined based on the at least two frames of images to be identified, wherein each image frame sequence has a first number of images to be identified, and two adjacent image frame sequences overlap with a second number of images to be identified, and the value of the second number is smaller than the value of the first number.
5. The method according to claim 4, wherein: The first number is equal to twice the second number.
6. The method according to claim 5, wherein: The first number is 16 frames, and the second number is 8 frames.
7. The method according to any one of claims 1 to 6, wherein determining at least two frames of images to be recognized corresponding to the video to be processed comprises: Disassemble the acquired video to be processed to obtain at least two frames of video images and audio information to be recognized; Performing image preprocessing on each of the at least two frames of video images to obtain the at least two frames of images to be recognized; The image preprocessing includes at least one of the following: face detection, face key point detection, size processing, normalization processing, and enhancement processing.
8. An expression recognition device, comprising: A processing module, a first recognition module, a second recognition module and a fusion module; The processing module is used to determine at least two frames of images to be recognized corresponding to the video to be processed, each frame of the images to be recognized contains a face area; The first recognition module is used to perform facial expression recognition on each of the at least two frames of images to be recognized, and obtain a first expression recognition result corresponding to the video to be processed; The second recognition module is used to perform facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized, so as to obtain a second expression recognition result corresponding to the video to be processed; The processing module is further used to determine the audio information to be recognized corresponding to the video to be processed, extract the audio features of the audio information to be recognized based on a preset audio recognition model, and obtain the third expression recognition result corresponding to the video to be processed according to the audio features; The fusion module is used to fuse the first expression recognition result, the second expression recognition result and the third expression recognition result to obtain the expression recognition result corresponding to the video to be processed, and the fusion process is a majority voting method.
9. The device according to claim 8, wherein: The first recognition module is specifically used to use a pre-trained discrete frame expression recognition model to perform facial expression recognition on each of the at least two frames of images to be recognized in turn, to obtain a first expression recognition result corresponding to the video to be processed; The discrete frame expression recognition model includes: a texture feature recognition model and / or a granular feature recognition model, the texture feature recognition model is obtained by training a computer vision group network using a video image sample set, and the granular feature recognition model is obtained by training a first neural network using a video image sample set, and the first neural network includes: a computer vision group network and a bilinear model.
10. The device according to claim 8, wherein: The second recognition module is specifically used to use a pre-trained continuous frame expression recognition model to sequentially perform facial expression recognition on the at least one image frame sequence to obtain a second expression recognition result corresponding to the video to be processed; The continuous frame expression recognition model includes: a non-local feature recognition model and / or a spatiotemporal feature recognition model, the non-local feature recognition model is obtained by training a second neural network using a video image sample set, the second neural network includes: a computer vision group network, a non-local information module and a gated recurrent unit, and the spatiotemporal feature recognition model is obtained by training a C3D network using a video image sample set.
11. The device according to claim 10, wherein: The processing module is also used to determine at least one image frame sequence based on the at least two frames of images to be recognized, before the second recognition module performs facial expression recognition on at least one image frame sequence formed by the at least two frames of images to be recognized and obtains a second expression recognition result corresponding to the video to be processed, wherein each image frame sequence has a first number of images to be recognized, and two adjacent image frame sequences have a second number of images to be recognized overlapping, and the value of the second number is less than the value of the first number.
12. The device according to any one of claims 8 to 11, wherein the processing module is used to determine at least two frames of images to be identified corresponding to the video to be processed, specifically: The processing module is specifically used to disassemble the acquired video to be processed to obtain at least two frames of video images and audio information to be recognized, and perform image preprocessing on each of the at least two frames of video images to obtain the at least two frames of images to be recognized; in, The image preprocessing includes at least one of the following: face detection, face key point detection, size processing, normalization processing, and enhancement processing.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method of any one of claims 1 to 7.
15. A method for facial expression recognition, comprising: Performing facial expression recognition on each frame of video image corresponding to the video to be processed to obtain a first expression recognition result; Performing facial expression recognition on at least one image frame sequence corresponding to the video to be processed to obtain a second expression recognition result; Obtaining a third expression recognition result corresponding to the video to be processed according to the audio features of the audio information to be recognized corresponding to the video to be processed; The expression recognition result corresponding to the video to be processed is determined based on the first expression recognition result, the second expression recognition result and the third expression recognition result based on the majority voting method.
