Face key point detection algorithm for robot expression imitation control

By adopting a facial key point detection algorithm based on gated recurrent network in bionic robot technology, combined with ResNet and GRU, and using the heat map method to predict the Gaussian probability distribution map, the jitter problem in facial key point detection is solved and the detection efficiency is improved. Robustness and smoothness, suitable for multiple faces and blurry scenes.

CN118691941APending Publication Date: 2024-09-24SHANGHAI DROIDUP CO LTD

Patent Information

Application Number
CN202410796719.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In the existing bionic robot technology, face key point detection has jitter problems in the video stream, which affects the fluency and accuracy of expression imitation. The gated loop unit is mainly used for natural language processing and needs to be improved in the field of computer vision.

Method used

A facial key point detection algorithm based on gated recurrent network is used, a feature extraction module is built through ResNet residual block, and the GRU and heat map methods are combined to predict the Gaussian probability distribution of key points, suppress jitter and improve the robustness of detection.

Benefits of technology

It effectively suppresses jitter in face key point detection, improves the stability and robustness of detection, is suitable for multiple faces and blurry scenes, and ensures the smoothness and accuracy of robot expression imitation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691941A
    Figure CN118691941A
Patent Text Reader

Abstract

The invention discloses a face key point detection algorithm for robot expression imitation control. A feature extraction module is constructed through a ResNet residual block to perform preliminary feature extraction on an image to obtain a feature graph A; respectively performing down-sampling on the feature maps A, respectively obtaining feature maps of three resolutions, obtaining a correlation matrix of the feature maps, constructing a feature map B obtained by iterative loop through GRU, inputting the feature map B into a key point prediction module constructed through a heat map method, and outputting 68 Gaussian probability distribution maps; each Gaussian probability distribution diagram contains the probability of each corresponding point, and the position of the point with the maximum probability in each probability diagram is output through the operation of obtaining the maximum probability. According to the invention, on the basis of the gated loop network, jitter generated by extracting the face key points of the video stream can be suppressed, and the problems of unsmooth face key position action simulation, deformation and the like are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of bionic robots, and in particular to a facial key point detection algorithm for robot expression imitation control. Background Art

[0002] In the field of bionic robots, facial landmark detection refers to the task of automatically identifying and locating some important specific positions on the face in a face image or video, such as eyes, nose, mouth, eyebrows and other key points. By performing facial landmark detection, we can obtain facial information of the face, which is very useful for many face analysis tasks, including face recognition, expression recognition, facial expression analysis, virtual reality and augmented reality.

[0003] The technology of facial key point detection usually uses machine learning and computer vision methods. Traditional methods are mainly based on feature extraction and machine learning algorithms, such as using Haar features, HOG features, manually designed features, etc., and then using classifiers or regressors to predict the location of key points.

[0004] In recent years, deep learning methods have made great breakthroughs in the task of facial key point detection. Deep learning usually uses convolutional neural networks or their variants to extract the features of face images, and finally regresses or classifies the key point positions. Deep learning methods have achieved good performance in the task of facial key point detection and have strong generalization ability.

[0005] The Gated Recurrent Unit (GRU) is a variant of a recurrent neural network used to model sequence data and time series data. Similar to the traditional recurrent neural network (LSTM), GRU can capture the temporal dependencies in the input sequence, but GRU has a simpler structure than LSTM. It introduces a gating mechanism to control the flow of information and the forgetting process, thereby alleviating the gradient vanishing problem.

[0006] The main components of the GRU unit include:

[0007] (1) Update gate: determines the degree to which the past state information is updated in the current step. It can be calculated based on the current input and previous state, and outputs a value between 0 and 1, indicating whether the current hidden state should be updated.

[0008] (2) Reset gate: determines how the candidate value of the current hidden state should be generated based on the previous state. It is calculated by considering the current input and the previous state, and can reset part of the previous state information based on this information.

[0009] (3) Current memory: The candidate hidden state calculated based on the results of the update gate and the reset gate. The output of the update gate determines to what extent the current memory should be combined with the previous state.

[0010] (4) Hidden state: It is the output of the current step and can also be used as the previous hidden state input in the next time step and is used when calculating the hidden state of the next time step.

[0011] GRU controls the flow and retention of information by updating gates, resetting gates, and current memory. Compared with traditional RNN units, it has fewer parameters, higher computational efficiency, and simpler implementation. GRU is widely used in many natural language processing tasks, speech recognition, and other sequence modeling tasks.

[0012] On the one hand, the current mainstream CV algorithm (deep learning model) generally has jitters when extracting key points from video streams, which has an adverse effect on the posture estimation task; on the other hand, the GRU module is mainly used in the NLP field, and the traditional GRU module must be improved to adapt to the CV field. Summary of the invention

[0013] In order to make up for the shortcomings of existing bionic robot technology, the present invention proposes a facial key point detection algorithm for robot expression imitation control based on a gated recurrent network, which can suppress the jitter generated by extracting facial key points from a video stream and avoid problems such as unsmooth imitation and deformation of facial key position movements.

[0014] The specific technical solutions are as follows:

[0015] A facial key point detection algorithm for robot expression imitation control includes the following steps:

[0016] Step 1: Construct a feature extraction module through the ResNet (deep network) residual block to complete the preliminary feature extraction of the image and obtain the corresponding feature map A;

[0017] Step 2: Downsample the feature maps A of the two frames of images respectively to obtain feature maps of three resolutions;

[0018] Step 3: Calculate the correlation matrix of the two-frame feature maps at three resolutions, use the correlation matrix of the three resolutions as the input of the three GRU reset gates, connect the three GRUs in series, use the output of the previous GRU as the hidden state input of the next GRU, and use the features extracted by the context extractor as the input of the current memory to construct the feature map B obtained by the iterative loop;

[0019] Step 4: Feature map B is input into the key point prediction module constructed by the heat map method, and 68 Gaussian probability distribution maps are output. Each Gaussian probability distribution map contains the probability of each corresponding point. By obtaining the maximum probability operation, the point with the highest probability in each probability map is output, and the coordinates of each key point output by the key point prediction module are obtained.

[0020] Preferably, in step 3, correlation matrices of three resolutions are used to predict pixel motions of different magnitudes, and the iterative formula of each GRU module is as follows:

[0021] z t =σ(Conv 3×3 ([h t-1 , x t ],W z ))

[0022] r t =σ(Conv 3×3 ([h t-1 , x t ],W r ))

[0023]

[0024]

[0025] Among them, σ is the activation function, which is also an optional hyperparameter, W Z ,W r ,W h is the convolution kernel weight, h t-1 is the input of the last iteration, with an initial value of 0, x t is the input obtained by multiplying the context feature by the correlation matrix, [] is the connection operation, tanh() is the tanh activation function, and ⊙ is the matrix dot multiplication operation;

[0026] The trained GRU module can predict the displacement of each pixel in the image, thereby adding constraints to the temporal jitter of the key point position coordinates.

[0027] As a preferred embodiment: in step 1, the ResNet residual block introduces a skip connection, which allows information to be directly transmitted across several layers, so that the residual block can learn the residual mapping.

[0028] Preferably: in step 4, the heat map method uses a convolutional neural network to generate a heat map of key points, where the heat map is an image of the same size as the input image, in which each pixel represents the confidence of the corresponding key point;

[0029] In the training phase, the network is trained to predict the keypoint heatmap by inputting the image and the labeled keypoint locations, minimizing the difference between the predicted heatmap and the labeled heatmap;

[0030] During the testing phase, the network maps the input image into a heatmap of keypoints, and then uses post-processing techniques to find the locations of the keypoints.

[0031] Preferably, the post-processing technique is peak extraction.

[0032] Preferably, the key point coordinates output by the key point prediction module are converted into the rotation angle of the facial servo of the simulated human head, thereby driving the facial servo to achieve the presentation of different facial expressions.

[0033] The beneficial effects of the present invention are as follows: first, the problem of gradient vanishing that occurs as the network becomes deeper can be solved by introducing jump connections through the ResNet residual block; second, the improved trained GRU module can predict the displacement of each pixel of the image, thereby adding constraints to the temporal jitter of the key point position coordinates; in addition, a key point prediction module based on the heat map method is adopted, which can output 68 Gaussian probability distribution maps. The advantage of the heat map method is that it can provide probability distribution information of the key point position, which is more robust for processing multiple faces or blurred situations. Since the heat map is predicted instead of the specific coordinates, it is relatively easy to learn the position of the key point; thereby, a relatively stable technical solution for extracting face key points is obtained, which provides a guarantee for the normal execution of downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the overall process of the present invention based on the gated cycle unit.

[0035] Figure 2 Schematic diagram of a key point prediction module based on the heat map method in the present invention.

[0036] Figure 3 This is a schematic diagram of the effect of the expression robot in the present invention. DETAILED DESCRIPTION

[0037] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0038] Example:

[0039] like Figure 1 , Figure 2 and Figure 3 As shown: A facial key point detection algorithm for robot expression imitation control includes the following steps:

[0040] Step 1: Construct a feature extraction module through the ResNet (deep network) residual block to complete the preliminary feature extraction of the image and obtain the corresponding feature map A;

[0041] ResNet residual blocks introduce skip connections, which allow information to be directly transferred across several layers, so that residual blocks can learn residual mapping. In traditional convolutional neural networks, the features of input data are gradually extracted by stacking multiple convolutional layers and nonlinear activation functions. As the network becomes deeper, the problem of vanishing gradients will be encountered, that is, the gradient gradually becomes smaller during the back propagation process, which makes the network difficult to train. ResNet residual blocks can solve the problem of vanishing gradients by introducing skip connections.

[0042] First, a feature extraction module is constructed, and then the consecutive frames frame0 and frame1 of the video are input into the feature extraction module in parallel to obtain the corresponding feature map.

[0043] Step 2: Downsample the feature maps A of the two frames of images respectively to obtain feature maps of three resolutions;

[0044] Step 3: Calculate the correlation matrix of the two-frame feature maps at three resolutions, use the correlation matrix of the three resolutions as the input of the three GRU reset gates, connect the three GRUs in series, use the output of the previous GRU as the hidden state input of the next GRU, and use the features extracted by the context extractor as the input of the current memory to construct the feature map B obtained by the iterative loop, as shown in Figure 1 As shown, the context extractor is a neural network constructed by ResNet residual blocks;

[0045] The correlation matrices of the three resolutions are used to predict pixel motions of different magnitudes. The iterative formula for each GRU module is as follows:

[0046] z t =σ(Conv 3×3 ([h t-1 , x t ],W z ))

[0047] r t =σ(Conv 3×3 ([h t-1 , x t ],W r ))

[0048]

[0049]

[0050] Among them, σ is the activation function, which is also an optional hyperparameter, W Z,W r ,W h is the convolution kernel weight, h t-1 is the input of the last iteration, with an initial value of 0, x t is the input obtained by multiplying the context feature by the correlation matrix, [] is the connection operation, tanh() is the tanh activation function, and ⊙ is the matrix dot multiplication operation;

[0051] The trained GRU module can predict the displacement of each pixel in the image, thereby adding constraints to the temporal jitter of the key point position coordinates.

[0052] Step 4: Feature map B is input into the key point prediction module constructed by the heat map method, and 68 Gaussian probability distribution maps are output. Each Gaussian probability distribution map contains the probability of each corresponding point. By obtaining the maximum probability operation, the point with the highest probability in each probability map is output, and the coordinates of each key point output by the key point prediction module are obtained.

[0053] The heat map method uses a convolutional neural network to generate a heat map of key points. The heat map is an image of the same size as the input image, where each pixel represents the confidence of the corresponding key point;

[0054] In the training phase, the network is trained to predict the keypoint heatmap by inputting the image and the labeled keypoint locations, minimizing the difference between the predicted heatmap and the labeled heatmap;

[0055] During the testing phase, the network maps the input image into a heat map of key points, and then finds the location of the key points through post-processing techniques, where peak extraction is generally used.

[0056] The advantage of the heat map method is that it can provide the probability distribution information of the key point location, which is more robust to multiple faces or blurred situations. In addition, since the heat map is predicted instead of the specific coordinates, it is relatively easy to learn the location of the key points.

[0057] The key point prediction module based on the heat map method can output 68 Gaussian probability distribution maps. Each point has a Gaussian probability map. The position with the highest output probability is the key position of the part.

[0058] The key point coordinates output by the key point prediction module are converted into the rotation angle of the facial servo of the simulated human head, thereby driving the facial servo to achieve the presentation of different facial expressions. It can also be used for other presentation methods, such as Figure 3 As shown, they are converted into facial expression imitations of simulated robots and virtual AI characters respectively.

[0059] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims.

Claims

1. A facial key point detection algorithm for robot expression imitation control, characterized in that: The following steps are involved: Step 1: Construct a feature extraction module through the ResNet residual block to complete the preliminary feature extraction of the image and obtain the corresponding feature map A; Step 2: Downsample the feature maps A of the two frames of images respectively to obtain feature maps of three resolutions; Step 3: Calculate the correlation matrix of the two-frame feature maps at three resolutions, use the correlation matrix of the three resolutions as the input of the three GRU reset gates, connect the three GRUs in series, use the output of the previous GRU as the hidden state input of the next GRU, and use the features extracted by the context extractor as the input of the current memory to construct the feature map B obtained by the iterative loop; Step 4: Feature map B is input into the key point prediction module constructed by the heat map method, and 68 Gaussian probability distribution maps are output. Each Gaussian probability distribution map contains the probability of each corresponding point. By obtaining the maximum probability operation, the point with the highest probability in each probability map is output, and the coordinates of each key point output by the key point prediction module are obtained.

2. The facial key point detection algorithm for robot expression imitation control according to claim 1, characterized in that: In step 3, the correlation matrices of the three resolutions are used to predict pixel motions of different magnitudes. The iterative formula for each GRU module is as follows: z t =σ(Conv 3×3 ([h t-1 ,x t ],W z )) r t =σ(Conv 3×3 ([h t-1 ,x t ],W r )) Among them, σ is the activation function, which is also an optional hyperparameter, W Z ,W r ,W h is the convolution kernel weight, ht-1 is the input of the last iteration, the initial value is 0, x t is the input obtained by multiplying the context feature by the correlation matrix, [] is the connection operation, tanh() is the tanh activation function, and ⊙ is the matrix dot multiplication operation; The trained GRU module can predict the displacement of each pixel in the image, thereby adding constraints to the temporal jitter of the key point position coordinates.

3. The facial key point detection algorithm for robot expression imitation control according to claim 1, characterized in that: In step 1, the ResNet residual block introduces a skip connection, which allows information to be transmitted directly across several layers, so that the residual block can learn the residual mapping.

4. The facial key point detection algorithm for robot expression imitation control according to any one of claims 1 to 3, characterized in that: In step 4, the heat map method uses a convolutional neural network to generate a heat map of key points. The heat map is an image of the same size as the input image, where each pixel represents the confidence of the corresponding key point; In the training phase, the network is trained to predict the keypoint heatmap by inputting the image and the labeled keypoint locations, minimizing the difference between the predicted heatmap and the labeled heatmap; During the testing phase, the network maps the input image into a heatmap of keypoints, and then uses post-processing techniques to find the locations of the keypoints.

5. The facial key point detection algorithm for robot expression imitation control according to claim 4, characterized in that: The post-processing technology is peak extraction.

6. The facial key point detection algorithm for robot expression imitation control according to claim 1 or 5, characterized in that: The key point coordinates output by the key point prediction module are converted into the rotation angle of the facial servo of the simulated human head, thereby driving the facial servo to achieve the presentation of different facial expressions.

Citation Information

Patent Citations

  • Real-time video face key point detection method based on deep learning

    CN112801043A

  • Robot real-time expression simulation method and device

    CN116597484A

Cited By

  • Face recognition model training method and apparatus, face recognition method, device, and medium

    WO2026124196A1