# US 2021/0286977 A1 · Computer application method and apparatus for generating three-dimensional face model, computer device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0286977 A1
- Document ID: US20210286977A1
- Status: Published application
- Kind: A1
- Application number: 17/337,909
- Filed: 2021-06-03
- Published: 2021-09-16
- Earliest claimed: 2019-02-26
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Yajing CHEN; Yibing SONG; Yonggen LING; Linchao BAO; Wei LIU
- Web page: https://patentgrep.com/patent/US20210286977A1

## CPC

- G06T 7/50: Depth or shape recovery
- G06F 18/214: Generating training patterns; Bootstrap methods, e.g. bagging or boosting
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/088: Non-supervised learning, e.g. competitive learning
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06T 7/75: {involving models}
- G06T 17/00: Three-dimensional [3D] modelling for computer graphics
- G06V 40/169: {Holistic features and representations, i.e. based on the facial image taken as a whole}
- G06V 40/171: {Local features and components; Facial parts (eye characteristics G06V40/18); Occluding parts, e.g. glasses; Geometrical relationships}
- G06T 2200/08: involving all processing steps from image acquisition to 3D model generation
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T 2207/30201: Face
- Y02T 10/40: Engine management systems
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- Y02T: CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION

## Abstract

A computer application method for generating a three-dimensional (3D) face model is provided, performed by a face model generation model running on a computer device, the method including: obtaining a two-dimensional (2D) face image as input to the face model generation model; extracting global features and local features of the 2D face image; obtaining a 3D face model parameter based on the global features and the local features; and outputting a 3D face model corresponding to the 2D face image based on the 3D face model parameter.

## Claims

### Claim 1

A method for generating a three-dimensional (3D) face model, performed by a face model generation model running on a computer device, the method comprising:
obtaining a two-dimensional (2D) face image as input to the face model generation model;
extracting global features and local features of the 2D face image;
obtaining a 3D face model parameter based on the global features and the local features; and
outputting a 3D face model corresponding to the 2D face image based on the 3D face model parameter.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the face model generation model comprises an encoder, the encoder comprising a convolutional neural network (CNN) with a plurality of convolutional layers, and wherein extracting the global features and the local features of the 2D face image comprises:
performing feature extraction on the 2D face image based on the plurality of convolutional layers, to obtain the global features of the 2D face image;
obtaining a central position of a landmark of the 2D face image; and
extracting, based on the central position, partial features as the local features of the 2D face image from features obtained by at least one target convolutional layer in the plurality of convolutional layers, wherein the at least one target convolutional layer corresponds to a target size.

### Claim 3 (depends on 2)

The method according to claim 2, wherein extracting, based on the central position, the partial features as the local features of the 2D face image comprises:
snipping, from a feature map obtained by the at least one target convolutional layer, a feature map of the target size corresponding to the at least one target convolutional layer as the local features of the 2D face image by using the central position as a center.

### Claim 4 (depends on 2)

The method according to claim 2, wherein:
performing feature extraction on the 2D face image based on the plurality of convolutional layers, to obtain the global features of the 2D face image comprises:
encoding the 2D face image based on the plurality of convolutional layers of the encoder, to obtain global feature vectors of the 2D face image;
extracting, based on the central position, partial features as the local features of the 2D face image comprises:
extracting a part of feature values from a global feature vector obtained by the at least one target convolutional layer, and obtaining a first local feature vector of the 2D face image based on the part of feature values; and
obtaining the 3D face model parameter based on the global features and the local features comprises:
decoding the global feature vector and the first local feature vector based on a first decoder, to obtain the 3D face model parameter.

### Claim 5 (depends on 4)

The method according to claim 4, wherein extracting the part of feature values from the global feature vector obtained by at least one target convolutional layer in the plurality of convolutional layers of the encoder, and obtaining the first local feature vector of the 2D face image based on the part of feature values comprises:
extracting the part of feature values in the global feature vector obtained by the at least one target convolutional layer; and
decoding the extracted part of feature values based on a second decoder, to obtain the first local feature vector of the 2D face image.

### Claim 6

A method for training a face model generation model, the face model generation model being used for generating a 3D face model based on a 2D face image, the method comprising:
obtaining a plurality of 2D face image samples;
invoking an initial model comprising a model parameter, and inputting the plurality of 2D face image samples into the initial model;
extracting global features and local features of each of the plurality of 2D face image samples by using the initial model;
obtaining a 3D face model parameter based on the global features and the local features;
outputting a 3D face model corresponding to the 2D face image sample based on the 3D face model parameter;
projecting the 3D face model, to obtain a 2D face image corresponding to the 3D face model;
obtaining a similarity between the 2D face image and the 2D face image sample; and
adjusting the model parameter of the initial model based on the similarity until a target condition is met, to obtain the face model generation model.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the face model generation model comprises an encoder, the encoder comprising a convolutional neural network with a plurality of convolutional layers, and wherein extracting the global features and the local features of the 2D face image sample comprises:
performing feature extraction on the 2D face image sample based on a plurality of convolutional layers, to obtain the global features of the 2D face image sample;
obtaining a central position of a landmark of the 2D face image sample; and
extracting, based on the central position, partial features as the local features of the 2D face image sample from features obtained by at least one target convolutional layer in the plurality of convolutional layers, wherein the at least one target convolutional layer corresponds to a target size.

### Claim 8 (depends on 7)

The method according to claim 7, wherein extracting, based on the central position, partial features as the local features of the 2D face image sample comprises:
snipping, from a feature map obtained by that at least one target convolutional layer, a feature map of a target size corresponding to the at least one target convolutional layer as the local features of the 2D face image sample by using the central position as a center.

### Claim 9 (depends on 7)

The method according to claim 7, wherein:
performing feature extraction on the 2D face image sample based on the plurality of convolutional layers, to obtain the global features of the 2D face image sample comprises:
encoding the 2D face image sample based on the plurality of convolutional layers of the encoder, to obtain global feature vectors of the 2D face image sample;
extracting, based on the central position, partial features as the local features of the 2D face image sample comprises:
extracting a part of feature values from a global feature vector obtained by the at least one target convolutional layer, and obtaining a first local feature vector of the 2D face image sample based on the part of feature values; and
obtaining the 3D face model parameter based on the global features and the local features comprises:
decoding the global feature vector and the first local feature vector based on a first decoder, to obtain the 3D face model parameter.

### Claim 10 (depends on 9)

The method according to claim 9, wherein extracting the part of feature values from the global feature vector obtained by at least one target convolutional layer in the plurality of convolutional layers of the encoder, and obtaining the first local feature vector of the 2D face image sample based on the part of feature values comprises:
extracting the part of feature values in the global feature vector obtained by the at least one target convolutional layer; and
decoding the extracted part of feature values based on a second decoder, to obtain the first local feature vector of the 2D face image sample.

### Claim 11 (depends on 6)

The method according to claim 6, wherein projecting the 3D face model, to obtain the 2D face image corresponding to the 3D face model comprises:
obtaining shooting information of the 2D face image sample based on the global features, the shooting information being used for indicating at least one of a shooting posture, illumination, or a shooting background during shooting of the 2D face image sample; and
projecting the 3D face model based on the shooting information, to obtain the 2D face image corresponding to the 3D face model.

### Claim 12 (depends on 6)

The method according to claim 6, wherein obtaining a similarity between the 2D face image and the 2D face image sample comprises:
obtaining a first similarity based on positions of a landmark of the 2D face image and a corresponding landmark of the 2D face image sample;
obtaining a second similarity based on a pixel value of a pixel of the 2D face image and a pixel value of a corresponding pixel of the 2D face image sample;
matching the 2D face image against the 2D face image sample, to obtain a third similarity, the third similarity being used for indicating whether an identity of a face in the 2D face image is the same as an identity of a face in the 2D face image sample; and
obtaining the similarity between the 2D face image and the 2D face image sample based on the third similarity and at least one of the first similarity or the second similarity.

### Claim 13 (depends on 12)

The method according to claim 12, wherein the matching the 2D face image corresponding to the 3D face model against the 2D face image sample, to obtain a third similarity comprises:
performing facial recognition on the 2D face image corresponding to the 3D face model and the 2D face image sample based on a facial recognition model, to obtain the third similarity.

### Claim 14 (depends on 12)

The method according to claim 12, wherein a process of obtaining the first similarity, the second similarity, and the third similarity comprises:
obtaining the first similarity, the second similarity, and the third similarity based on a first loss function, a second loss function, and a third loss function, respectively, further based on the 2D face image and the 2D face image sample.

### Claim 15 (depends on 12)

The method according to claim 12, wherein:
the local features of the 2D face image sample are a first local feature vector;
the first local feature vector is determined based on a part of feature values extracted from the global features; and
the method further comprising:
obtaining a second local feature vector based on the first local feature vector, feature values of the second local feature vector being distributed the same as the part of feature values extracted from the global features; and
obtaining a fourth similarity based on a distance between the second local feature vector and a corresponding part of feature values extracted from the global features.

### Claim 16 (depends on 15)

The method according to claim 15, wherein obtaining the similarity between the 2D face image and the 2D face image sample based on the third similarity and at least one of the first similarity and the second similarity comprises:
obtaining the similarity between the 2D face image the 2D face image sample based on at least one of the first similarity or the second similarity, together with the third similarity and the fourth similarity.

### Claim 17 (depends on 15)

The method according to claim 15, wherein obtaining the fourth similarity comprises:
obtaining the fourth similarity based on a fourth loss function, the second local feature vector, and the corresponding part of feature values extracted from the global features.

### Claim 18

A device for generating a 3D face model using a face model generation model running on the device, the device comprising a memory for storing computer instructions and a processor in communication with the memory, wherein, when the processor executes the computer instructions, the processor is configured to cause the device to:
obtain a two-dimensional (2D) face image as input to the face model generation model;
extract global features and local features of the 2D face image;
obtain a 3D face model parameter based on the global features and the local features; and
output a 3D face model corresponding to the 2D face image based on the 3D face model parameter.

### Claim 19 (depends on 18)

The device according to claim 18, wherein the face model generation model comprises an encoder, the encoder comprising a convolutional neural network with a plurality of convolutional layers, and wherein, when the processor is configured to cause the device to extract the global features and the local features of the 2D face image, the processor is configured to cause the device to:
perform feature extraction on the 2D face image based on the plurality of convolutional layers, to obtain the global features of the 2D face image;
obtain a central position of a landmark of the 2D face image; and
extract, based on the central position, partial features as the local features of the 2D face image from features obtained by at least one target convolutional layer in the plurality of convolutional layers, wherein the least one target convolutional layer corresponds to a target size.

### Claim 20 (depends on 19)

The device according to claim 19, wherein, when the processor is configured to cause the device to extract, based on the central position, the partial features as the local features of the 2D face image, the processor is configured to cause the device to:
snip, from a feature map obtained by the at least one target convolutional layer, a feature map of the target size corresponding to the at least one target convolutional layer as the local features of the 2D face image by using the central position as a center.
