Human face three-dimensional reconstruction method and device based on artificial intelligence, equipment and medium

Through the three-dimensional face reconstruction method based on artificial intelligence, combined with convolutional neural network and loss optimization technology, the problem of face characteristics loss in the model-free method is solved, and high-precision and high-fidelity three-dimensional face reconstruction is achieved.

CN119228991APending Publication Date: 2024-12-31PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411157941.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing modelless three-dimensional face reconstruction method will lose the characteristics of the face itself to a certain extent, and cannot meet the needs of high-precision and high-fidelity three-dimensional face reconstruction, resulting in low accuracy of three-dimensional face reconstruction.

Method used

Using a three-dimensional face reconstruction method based on artificial intelligence, the face area of ​​interest is extracted, key point detection and segmentation is performed by obtaining pre-constructed two-dimensional face image data, and information extraction and processing is performed by combining convolutional neural network to generate comprehensive Loss is used to optimize the initial reconstruction model to achieve high-precision 3D face reconstruction.

Benefits of technology

By combining the losses at the two-dimensional and three-dimensional levels for mixed supervision training, the accuracy of three-dimensional face reconstruction is significantly improved, and the characteristics of the face image can be better preserved and meet the needs of high precision and high fidelity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228991A_ABST
    Figure CN119228991A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and financial science and technology, and relates to a human face three-dimensional reconstruction method and device based on artificial intelligence, computer equipment and a storage medium, and the method comprises the steps: carrying out the region-of-interest extraction of two-dimensional human face image data, obtaining a human face image, carrying out the key point detection of the human face image, and obtaining two-dimensional key points; performing face segmentation on the face image to obtain a face mask image; processing the face image based on the initial reconstruction model to obtain a three-dimensional face model; generating a first loss based on the three-dimensional face model and the face image; generating a second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image; generating a comprehensive loss based on the first loss and the second loss; optimizing the initial reconstruction model based on the comprehensive loss to obtain a target reconstruction model; and performing three-dimensional reconstruction processing on the face image based on the target reconstruction model to obtain a target three-dimensional face model. According to the invention, the precision of three-dimensional face reconstruction is improved based on the use of the target reconstruction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of artificial intelligence development technology and financial technology, and in particular to methods, devices, computer equipment and storage media for three-dimensional reconstruction of human faces based on artificial intelligence. Background Art

[0002] With the rapid development of human-computer interaction, film and television production, live video and financial applications, the importance and application prospects of face 3D reconstruction technology as a core component of these fields are becoming increasingly prominent. Traditional high-precision face 3D model reconstruction methods rely on expensive 3D reconstruction scanning equipment and professional post-processing, which greatly limits the popularization and application of personal digital images.

[0003] At present, the mainstream 3D face reconstruction method mainly adopts the model-free 3D face reconstruction method. The model-free 3D face reconstruction method attempts to directly calculate the feature points in the 2D image through a neural network to regress the 3D face coordinates. Although this reconstruction method is very direct in processing, it will lose the characteristics of the face itself to a certain extent and cannot meet the needs of high-precision and high-fidelity 3D face reconstruction, resulting in low accuracy of 3D face reconstruction. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a method, device, computer equipment and storage medium for three-dimensional face reconstruction based on artificial intelligence, so as to solve the technical problem that the existing model-free three-dimensional face reconstruction method will lose the properties of the face itself to a certain extent, cannot meet the needs of high-precision and high-fidelity three-dimensional face reconstruction, and leads to low accuracy of three-dimensional face reconstruction.

[0005] In order to solve the above technical problems, the embodiment of the present application provides a method for 3D reconstruction of human face based on artificial intelligence, which adopts the following technical solution:

[0006] Obtain pre-constructed two-dimensional face image data;

[0007] Extracting a facial region of interest from the two-dimensional facial image data to obtain a corresponding facial image, detecting facial key points from the facial image to obtain corresponding two-dimensional key points, and segmenting the facial image to obtain a corresponding facial mask image;

[0008] Extracting information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and processing the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model;

[0009] Generate a corresponding first loss based on the three-dimensional face model and the face image;

[0010] Generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image;

[0011] generating a comprehensive loss based on the first loss and the second loss;

[0012] Optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model;

[0013] The input face image to be processed is subjected to three-dimensional reconstruction processing based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

[0014] Furthermore, the step of generating a corresponding first loss based on the three-dimensional face model and the face image specifically includes:

[0015] Acquire a three-dimensional scanned face model corresponding to the face image;

[0016] Acquire first vertex information of the three-dimensional scanned face model;

[0017] Acquire second vertex information of the three-dimensional face model;

[0018] Calculating a first Euclidean distance between the first vertex information and the second vertex information;

[0019] The first Euclidean distance is used as the first loss.

[0020] Furthermore, the step of generating a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image specifically includes:

[0021] Performing projection processing on the three-dimensional face model to obtain corresponding target two-dimensional key points;

[0022] Rendering the three-dimensional face model to obtain a corresponding two-dimensional face image;

[0023] Calculating a second Euclidean distance between the target two-dimensional key point and the two-dimensional key point, and using the second Euclidean distance as the key point loss;

[0024] Calculating a pixel loss between the two-dimensional face image and the face mask image;

[0025] Calculating the similarity loss between the two-dimensional face image and the face mask image;

[0026] The second loss is generated based on the key point loss, the pixel loss, and the similarity loss.

[0027] Furthermore, the step of generating a comprehensive loss based on the first loss and the second loss specifically includes:

[0028] Obtaining a first weight, a second weight, a third weight, and a fourth weight corresponding to the first loss, the key point loss, the pixel loss, and the similarity loss, respectively;

[0029] Get the preset loss calculation formula;

[0030] Based on the loss calculation formula, the first loss, the key point loss, the pixel loss, the similarity loss, the first weight, the second weight, the third weight, and the fourth weight are calculated and processed to obtain corresponding calculation results;

[0031] The calculation result is taken as the comprehensive loss.

[0032] Furthermore, the step of obtaining pre-constructed two-dimensional face image data specifically includes:

[0033] Acquire pre-collected initial two-dimensional face image data;

[0034] Performing data cleaning processing on the initial two-dimensional face image data to obtain corresponding first face image data;

[0035] Performing data cropping processing on the first facial image data to obtain corresponding second facial image data;

[0036] Normalizing the second facial image data to obtain corresponding third facial image data;

[0037] The third facial image data is used as the two-dimensional facial image data.

[0038] Furthermore, after the step of optimizing the initial reconstruction model based on the comprehensive loss to obtain the corresponding target reconstruction model, the method further includes:

[0039] Constructing verification data based on the facial image data;

[0040] Performing performance verification on the target reconstruction model based on the verification data to obtain performance indicator data of the target reconstruction model;

[0041] Performing data analysis on the performance indicator data to generate a performance evaluation result corresponding to the target reconstruction model;

[0042] Based on the performance evaluation result, corresponding model adjustment processing is performed on the target reconstruction model.

[0043] Furthermore, after the step of performing three-dimensional reconstruction processing on the input face image to be processed based on the target reconstruction model to obtain the corresponding target three-dimensional face model, the method further includes:

[0044] Performing smoothing processing on the target three-dimensional human face model to obtain a corresponding first target three-dimensional human face model;

[0045] Performing texture mapping processing on the first target three-dimensional human face model to obtain a corresponding second target three-dimensional human face model;

[0046] The second target 3D face model is stored.

[0047] In order to solve the above technical problems, the embodiment of the present application further provides a 3D face reconstruction device based on artificial intelligence, which adopts the following technical solution:

[0048] An acquisition module, used for acquiring pre-constructed two-dimensional face image data;

[0049] A first processing module is used to extract a facial region of interest from the two-dimensional facial image data to obtain a corresponding facial image, perform facial key point detection on the facial image to obtain corresponding two-dimensional key points, and perform facial segmentation on the facial image to obtain a corresponding facial mask image;

[0050] A second processing module is used to extract information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and to process the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model;

[0051] A first generating module, configured to generate a corresponding first loss based on the three-dimensional face model and the face image;

[0052] A second generating module, used to generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image;

[0053] A third generating module, configured to generate a comprehensive loss based on the first loss and the second loss;

[0054] An optimization module, used for optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model;

[0055] The reconstruction module is used to perform three-dimensional reconstruction processing on the input face image to be processed based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

[0056] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0057] Obtain pre-constructed two-dimensional face image data;

[0058] Extracting a facial region of interest from the two-dimensional facial image data to obtain a corresponding facial image, detecting facial key points from the facial image to obtain corresponding two-dimensional key points, and segmenting the facial image to obtain a corresponding facial mask image;

[0059] Extracting information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and processing the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model;

[0060] Generate a corresponding first loss based on the three-dimensional face model and the face image;

[0061] Generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image;

[0062] generating a comprehensive loss based on the first loss and the second loss;

[0063] Optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model;

[0064] The input face image to be processed is subjected to three-dimensional reconstruction processing based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

[0065] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0066] Obtain pre-constructed two-dimensional face image data;

[0067] Extracting a facial region of interest from the two-dimensional facial image data to obtain a corresponding facial image, detecting facial key points from the facial image to obtain corresponding two-dimensional key points, and segmenting the facial image to obtain a corresponding facial mask image;

[0068] Extracting information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and processing the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model;

[0069] Generate a corresponding first loss based on the three-dimensional face model and the face image;

[0070] Generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image;

[0071] generating a comprehensive loss based on the first loss and the second loss;

[0072] Optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model;

[0073] The input face image to be processed is subjected to three-dimensional reconstruction processing based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

[0074] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0075] The present application first obtains pre-constructed two-dimensional face image data; then extracts the face region of interest of the two-dimensional face image data to obtain the corresponding face image, detects the face key points of the face image to obtain the corresponding two-dimensional key points, and performs face segmentation on the face image to obtain the corresponding face mask image; then extracts information from the face image based on the convolutional neural network in the preset initial reconstruction model to obtain the corresponding model parameters, and processes the model parameters based on the processing network in the initial reconstruction model to obtain the corresponding three-dimensional face model; subsequently generates a corresponding first loss based on the three-dimensional face model and the face image; and generates a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image; then generates a comprehensive loss based on the first loss and the second loss; further optimizes the initial reconstruction model based on the comprehensive loss to obtain the corresponding target reconstruction model; finally, performs three-dimensional reconstruction on the input face image to be processed based on the target reconstruction model to obtain the corresponding target three-dimensional face model. This application adopts a hybrid supervised training method that combines a first loss at the two-dimensional level with a second loss at the three-dimensional level to construct a target reconstruction model, which can better guide the target reconstruction model to learn and improve the reconstruction accuracy of the target reconstruction model. Compared with the model-free three-dimensional face reconstruction method, this application uses the trained target reconstruction model to perform three-dimensional face reconstruction on face images, which can better retain the inherent characteristics of the face image, meet the needs of high-precision and high-fidelity three-dimensional face reconstruction, and effectively improve the accuracy of three-dimensional face reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0077] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0078] Figure 2 A flowchart of an embodiment of a method for 3D reconstruction of a human face based on artificial intelligence according to the present application;

[0079] Figure 3 is a schematic structural diagram of an embodiment of an artificial intelligence-based 3D face reconstruction device according to the present application;

[0080] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0081] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0082] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0083] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0084] like Figure 1As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0085] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0086] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, and the like.

[0087] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0088] It should be noted that the artificial intelligence-based three-dimensional face reconstruction method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based three-dimensional face reconstruction device is generally set in the server / terminal device.

[0089] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0090] Continue to refer Figure 2, showing a flowchart of an embodiment of the method for 3D reconstruction of a face based on artificial intelligence according to the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The method for 3D reconstruction of a face based on artificial intelligence provided in the embodiment of the present application can be applied to any scenario where 3D reconstruction of a face is required, and the method for 3D reconstruction of a face based on artificial intelligence can be applied to products in these scenarios, for example, it can be applied to 3D reconstruction of a face in financial applications. The method for 3D reconstruction of a face based on artificial intelligence includes the following steps:

[0091] Step S201, obtaining pre-constructed two-dimensional face image data.

[0092] In this embodiment, the method for 3D reconstruction of human face based on artificial intelligence is executed on an electronic device (eg Figure 1 The server / terminal device shown in the figure) can obtain the two-dimensional face image data through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (ultrawi deband) connection, and other wireless connection methods currently known or to be developed in the future. The specific implementation process of obtaining the pre-constructed two-dimensional face image data will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.

[0093] Step S202, extracting the face region of interest from the two-dimensional face image data to obtain a corresponding face image, detecting face key points from the face image to obtain corresponding two-dimensional key points, and segmenting the face image to obtain a corresponding face mask image.

[0094] In this embodiment, the face region of interest is extracted from the two-dimensional face image data to detect the face position in the two-dimensional face image data and obtain the corresponding face image. In addition, the face key point detection is performed on the face image to obtain the target number of two-dimensional key points. There is no specific limitation on the value of the above target number, for example, 68 can be selected. And the obtained two-dimensional key points are used to construct the key point loss of the 2D part. In addition, the corresponding face mask image is obtained by performing face segmentation on the face image, and the face mask image does not include ears and neck. The obtained face mask image is used for the subsequent construction of the pixel loss and similarity loss of the 2D part.

[0095] Step S203: extract information from the face image based on the convolutional neural network in the preset initial reconstruction model to obtain corresponding model parameters, and process the model parameters based on the processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model.

[0096] In this embodiment, the initial reconstruction model at least includes a convolutional neural network and a processing network. The input of the convolutional neural network is a face image extracted through the face region of interest. The feature information of the face image is extracted through the convolutional neural network, and the corresponding model parameters are output. The model parameters include deformation parameters for controlling the deformation of the three-dimensional deformable model (3DMorphab le Model l, 3DMM), as well as camera parameters required for subsequent rendering and texture parameters required for texture generation. The input of the processing network is the model parameters output by the convolutional neural network, and a three-dimensional face model corresponding to the face image is generated. The generated three-dimensional face model is used to calculate the Euclidean distance between vertices with the three-dimensional scanned face model obtained by scanning the person in the input face image, so as to obtain the loss of the 3D part.

[0097] Step S204: Generate a corresponding first loss based on the three-dimensional face model and the face image.

[0098] In this embodiment, the specific implementation process of the first loss corresponding to the generation of the three-dimensional face model and the face image will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0099] Step S205: generating a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image.

[0100] In this embodiment, the specific implementation process of generating the corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated here.

[0101] Step S206: generating a comprehensive loss based on the first loss and the second loss.

[0102] In this embodiment, the specific implementation process of generating the comprehensive loss based on the first loss and the second loss will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0103] Step S207: optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model.

[0104] In this embodiment, specifically, the training process of the initial reconstruction model includes: forward propagation: inputting the face image into the initial reconstruction model, and obtaining the predicted three-dimensional face model parameters through the forward propagation calculation of the initial reconstruction model. Generate a three-dimensional face model based on the predicted parameters, and calculate the loss function values ​​at the 2D level and the 3D level. Backward propagation and optimization: use the back propagation algorithm to calculate the gradient information of the loss function with respect to the model parameters; update the model parameters based on the gradient information to minimize the loss function value; repeat the forward propagation and back propagation processes until the preset training rounds are reached or other stopping conditions are met, thereby completing the training and optimization process of the initial reconstruction model and obtaining the above-mentioned target reconstruction model.

[0105] Step S208, performing three-dimensional reconstruction processing on the input face image to be processed based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

[0106] In this embodiment, the above-mentioned face image to be processed is a two-dimensional image. By inputting the above-mentioned face image to be processed into the target reconstruction model, the target reconstruction model performs three-dimensional reconstruction processing on the face image to be processed, and outputs a target three-dimensional face model corresponding to the face image to be processed.

[0107] The present application first obtains pre-constructed two-dimensional face image data; then extracts the face region of interest of the two-dimensional face image data to obtain the corresponding face image, detects the face key points of the face image to obtain the corresponding two-dimensional key points, and performs face segmentation on the face image to obtain the corresponding face mask image; then extracts information from the face image based on the convolutional neural network in the preset initial reconstruction model to obtain the corresponding model parameters, and processes the model parameters based on the processing network in the initial reconstruction model to obtain the corresponding three-dimensional face model; subsequently generates a corresponding first loss based on the three-dimensional face model and the face image; and generates a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image; then generates a comprehensive loss based on the first loss and the second loss; further optimizes the initial reconstruction model based on the comprehensive loss to obtain the corresponding target reconstruction model; finally, performs three-dimensional reconstruction on the input face image to be processed based on the target reconstruction model to obtain the corresponding target three-dimensional face model. This application adopts a hybrid supervised training method that combines a first loss at the two-dimensional level with a second loss at the three-dimensional level to construct a target reconstruction model, which can better guide the target reconstruction model to learn and improve the reconstruction accuracy of the target reconstruction model. Compared with the model-free three-dimensional face reconstruction method, this application uses the trained target reconstruction model to perform three-dimensional face reconstruction on face images, which can better retain the inherent characteristics of the face image, meet the needs of high-precision and high-fidelity three-dimensional face reconstruction, and effectively improve the accuracy of three-dimensional face reconstruction.

[0108] In some optional implementations, step S204 includes the following steps:

[0109] Obtain a three-dimensional scanned face model corresponding to the face image.

[0110] In this embodiment, the three-dimensional scanned face model is three-dimensional scan data obtained by performing real scanning processing on the face image.

[0111] Acquire first vertex information of the three-dimensional scanned face model.

[0112] In this embodiment, vertex labeling is performed on the three-dimensional scanned face model to extract first vertex information of the three-dimensional scanned face model.

[0113] Acquire second vertex information of the three-dimensional face model.

[0114] In this embodiment, the second vertex information of the three-dimensional face model is extracted by performing vertex labeling processing on the three-dimensional face model.

[0115] A first Euclidean distance between the first vertex information and the second vertex information is calculated.

[0116] In this embodiment, Euclidean distance is a common concept in mathematics and computer science, which is used to measure the real distance between two points in m-dimensional space. This distance definition is based on the calculation of the "ordinary" (i.e., straight-line) distance between two points in Euclidean space. In two-dimensional and three-dimensional space, the Euclidean distance is the distance between two points. The first Euclidean distance between the first vertex information and the second vertex information can be calculated by using the Euclidean distance formula.

[0117] The first Euclidean distance is used as the first loss.

[0118] In this embodiment, the Euclidean distance error between the vertices of the three-dimensional face model predicted by the initial reconstructed model and the three-dimensional scanned face model obtained by the actual scan is calculated on the 3D layer and used as the first loss. The first loss can be used subsequently to supervise the appearance of the initial reconstructed model.

[0119] The present application obtains a three-dimensional scanned face model corresponding to the face image; then obtains the first vertex information of the three-dimensional scanned face model; then obtains the second vertex information of the three-dimensional face model; subsequently calculates the first Euclidean distance between the first vertex information and the second vertex information, and uses the first Euclidean distance as the first loss. The present application calculates the first Euclidean distance between the first vertex information of the three-dimensional scanned face model corresponding to the face image and the second vertex information of the three-dimensional face model to quickly and conveniently generate the first loss corresponding to the initial reconstruction model, thereby improving the generation efficiency of the obtained first loss.

[0120] In some optional implementations of this embodiment, step S205 includes the following steps:

[0121] Projection processing is performed on the three-dimensional face model to obtain corresponding target two-dimensional key points.

[0122] In this embodiment, the three-dimensional face model can be projected onto a two-dimensional plane and rendered to generate a corresponding 2D picture. In the projection process, various factors such as lighting, viewing angle, and camera parameters are considered to ensure that the rendered 2D picture is as close to the actual situation as possible. Then, on the rendered 2D picture, deep learning or other algorithms are used to predict the key points of the target number, that is, the above-mentioned target two-dimensional key points. These key points usually include the positions of facial feature points such as eyes, nose, and mouth, which are crucial for tasks such as face recognition and expression analysis. There is no specific limitation on the value of the above-mentioned target number, for example, 68 can be selected.

[0123] The three-dimensional face model is rendered to obtain a corresponding two-dimensional face image.

[0124] In this embodiment, the three-dimensional face model is projected onto a two-dimensional plane and rendered to generate a corresponding 2D picture, and the 2D picture is used as the two-dimensional face image.

[0125] A second Euclidean distance between the target two-dimensional key point and the two-dimensional key point is calculated, and the second Euclidean distance is used as the key point loss.

[0126] In this embodiment, the second Euclidean distance between the target two-dimensional key point and the two-dimensional key point may be calculated by using the Euclidean distance formula.

[0127] Calculate the pixel loss between the two-dimensional face image and the face mask image.

[0128] In this embodiment, the above-mentioned pixel loss can be obtained by calculating the pixel difference (color information error at the pixel level) between the rendered two-dimensional face image and the real image, that is, the face mask image.

[0129] Calculate the similarity loss between the two-dimensional face image and the face mask image.

[0130] In this embodiment, the similarity loss mentioned above can be obtained by using a face recognition algorithm to calculate the similarity between the rendered two-dimensional face image and the real image, that is, the face mask image.

[0131] The second loss is generated based on the key point loss, the pixel loss, and the similarity loss.

[0132] In this embodiment, the key point loss, the pixel loss and the similarity loss are integrated to obtain integrated data, and the integrated data is used as the second loss. The second loss is constructed by calculating the key point loss between the target two-dimensional key point and the two-dimensional key point, calculating the pixel loss between the two-dimensional face image and the face mask image, and calculating the similarity loss between the two-dimensional face image and the face mask image on the 2D level. The second loss can be used to supervise the initial reconstruction model in terms of the similarity of the 2D original image.

[0133] The present application obtains the corresponding target two-dimensional key points by projecting the three-dimensional face model; and obtains the corresponding two-dimensional face image by rendering the three-dimensional face model; then calculates the second Euclidean distance between the target two-dimensional key points and the two-dimensional key points, and uses the second Euclidean distance as the key point loss; and calculates the pixel loss between the two-dimensional face image and the face mask image; and calculates the similarity loss between the two-dimensional face image and the face mask image; and subsequently generates the second loss based on the key point loss, the pixel loss and the similarity loss. The present application obtains the corresponding key point loss, pixel loss and similarity loss based on the three-dimensional face model, the two-dimensional key points and the face mask image, and then quickly and conveniently generates the second loss corresponding to the initial reconstructed model based on the key point loss, the pixel loss and the similarity loss, thereby improving the generation efficiency of the obtained second loss.

[0134] In some optional implementations, step S206 includes the following steps:

[0135] Obtain a first weight, a second weight, a third weight, and a fourth weight corresponding to the first loss, the key point loss, the pixel loss, and the similarity loss, respectively.

[0136] In this embodiment, the numerical selection of the first weight, the second weight, the third weight and the fourth weight is not specifically limited, and can be set according to the actual business usage requirements. In addition, a weight generation algorithm can also be used to generate the first weight, the second weight, the third weight and the fourth weight corresponding to the first loss, the key point loss, the pixel loss and the similarity loss, respectively, so as to improve the accuracy of the generated weight value.

[0137] Get the preset loss calculation formula.

[0138] In this embodiment, the above-mentioned preset loss calculation formula specifically includes: S=a*H+b*I+c*J+d*K, wherein H is the first loss, a is the first weight, I is the key point loss, b is the second weight, J is the pixel loss, c is the third weight, K is the similarity loss, and d is the fourth weight.

[0139] Based on the loss calculation formula, the first loss, the key point loss, the pixel loss, the similarity loss, the first weight, the second weight, the third weight and the fourth weight are calculated and processed to obtain corresponding calculation results.

[0140] In this embodiment, the first loss, the key point loss, the pixel loss, the similarity loss, the first weight, the second weight, the third weight and the fourth weight are substituted into the corresponding positions in the above loss calculation formula for calculation processing to obtain the corresponding calculation result.

[0141] The calculation result is taken as the comprehensive loss.

[0142] The present application calculates and processes the first loss, the key point loss, the pixel loss, and the similarity loss based on the first weight, the second weight, the third weight, and the fourth weight corresponding to the first loss, the key point loss, the pixel loss, and the similarity loss, respectively, using a preset loss calculation formula to quickly and accurately generate the corresponding comprehensive loss, thereby improving the efficiency of generating the comprehensive loss and ensuring the accuracy of the generated comprehensive loss.

[0143] In some optional implementations, step S201 includes the following steps:

[0144] Acquire pre-collected initial two-dimensional face image data.

[0145] In this embodiment, the initial two-dimensional face image data is pre-collected two-dimensional face image data for different scenes.

[0146] The initial two-dimensional face image data is cleaned to obtain corresponding first face image data.

[0147] In this embodiment, the data cleaning refers to removing abnormal values, duplicate items or low-quality images in the initial two-dimensional face image data.

[0148] The first facial image data is subjected to data cropping processing to obtain corresponding second facial image data.

[0149] In this embodiment, the data cropping process refers to cropping the first face image data using a preset size to obtain second face image data that meets the input size requirements of the convolutional neural network in the initial reconstruction model. The value selection of the preset size can be set according to the actual model construction requirements.

[0150] The second facial image data is normalized to obtain corresponding third facial image data.

[0151] In this embodiment, the normalization processing refers to normalizing the pixel values ​​of the second facial image data, usually scaling the pixel values ​​to a range of [0, 1] or [-1, 1].

[0152] The third facial image data is used as the two-dimensional facial image data.

[0153] The present application obtains pre-collected initial two-dimensional facial image data; and then performs data cleaning, data cropping and normalization on the initial two-dimensional facial image data, thereby quickly and intelligently completing the preprocessing of the initial two-dimensional facial image data and obtaining corresponding third facial image data, effectively improving the generation efficiency of the third facial image data and improving the data standardization of the obtained third facial image data.

[0154] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:

[0155] Verification data is constructed based on the facial image data.

[0156] In this embodiment, a specified proportion of data can be randomly selected from the face image data and used as the verification data. The value of the specified proportion is not specifically limited and can be determined according to actual usage requirements, for example, it can be set to 0.3.

[0157] The target reconstruction model is performance verified based on the verification data to obtain performance indicator data of the target reconstruction model.

[0158] In this embodiment, the verification data is respectively input into the target reconstruction model, so as to perform three-dimensional reconstruction processing on the verification data through the target reconstruction model, and then the target reconstruction model is subjected to performance verification processing according to the reconstruction result output by the target reconstruction model, that is, the performance of the target reconstruction model is evaluated to obtain performance index data of the target reconstruction model. The above-mentioned performance index data may include the calculated accuracy value of the target reconstruction model used to evaluate the model performance, such as vertex distance error, pixel difference, face similarity, etc.

[0159] The performance indicator data is analyzed to generate a performance evaluation result corresponding to the target reconstruction model.

[0160] In this embodiment, the above-mentioned performance indicator data specifically include vertex distance error, pixel difference, and face similarity. The calculated vertex distance error can be compared with a preset error threshold, the pixel difference can be compared with a preset difference threshold, and the face similarity can be compared with a preset similarity threshold. If the vertex distance error is greater than the corresponding error threshold, the pixel difference is greater than the corresponding difference threshold, and the face similarity is greater than the corresponding similarity threshold, then it is determined that the target reconstruction model has passed the performance verification, and a first performance evaluation result that the target reconstruction model has passed the performance verification is generated. If at least one indicator data among all the performance indicator data is less than the corresponding indicator threshold, then it is determined that the target reconstruction model has not passed the performance verification, and a second performance evaluation result that the target reconstruction model has not passed the performance verification is generated. Among them, the values ​​of the above-mentioned error threshold, difference threshold, and similarity threshold are not specifically limited and can be set according to actual model verification requirements.

[0161] Based on the performance evaluation result, corresponding model adjustment processing is performed on the target reconstruction model.

[0162] In this embodiment, if the content of the performance evaluation result is that the target reconstruction model has passed the performance verification, then the target reconstruction model is determined to be a model that meets the required performance requirements, and there is no need to adjust the target reconstruction model subsequently. In addition, if the content of the performance evaluation result is that the target reconstruction model has not passed the performance verification, a preset model improvement strategy can be used to improve the target reconstruction model. Among them, the above-mentioned model improvement strategy may include strategies such as adjusting model parameters or training parameters, changing the layer structure of the model, modifying the model architecture, and data enhancement strategies.

[0163] The present application constructs verification data based on the facial image data; then, based on the verification data, the performance of the target reconstruction model is verified to obtain performance index data of the target reconstruction model; then, data analysis is performed on the performance index data to generate a performance evaluation result corresponding to the target reconstruction model; and then, the target reconstruction model is subjected to corresponding model adjustment processing based on the performance evaluation result. After completing the construction of the target reconstruction model, the present application will also intelligently use the verification data constructed based on the facial image data to perform performance verification on the target reconstruction model, and will perform corresponding model adjustment processing on the target reconstruction model according to the performance evaluation result after analyzing the performance index data of the obtained target reconstruction model, so as to ensure that the target reconstruction model finally obtained can meet the corresponding performance requirements, which is conducive to ensuring the accuracy of the subsequent use of the target reconstruction model to perform three-dimensional reconstruction processing on the input face image to be processed, thereby improving the accuracy of the generated target three-dimensional face model corresponding to the face image to be processed.

[0164] In some optional implementations of this embodiment, after step S208, the electronic device may further perform the following steps:

[0165] The target three-dimensional face model is smoothed to obtain a corresponding first target three-dimensional face model.

[0166] In this embodiment, the target 3D human face model is smoothed to eliminate noise and unnecessary details in the target 3D human face model, thereby obtaining a corresponding first target 3D human face model.

[0167] The first target three-dimensional face model is texture mapped to obtain a corresponding second target three-dimensional face model.

[0168] In this embodiment, the above-mentioned texture mapping processing refers to mapping the texture information on the two-dimensional face image to be processed to the first target three-dimensional face model to improve the realism of the first target three-dimensional face model and obtain the corresponding second target three-dimensional face model.

[0169] The second target 3D face model is stored.

[0170] In this embodiment, there is no specific limitation on the storage method of the second target three-dimensional face model. For example, blockchain storage, local database storage, cloud server storage, etc. can be used.

[0171] The present application obtains a corresponding first target three-dimensional face model by smoothing the target three-dimensional face model; then performs texture mapping on the first target three-dimensional face model to obtain a corresponding second target three-dimensional face model; and subsequently stores the second target three-dimensional face model. After the present application performs three-dimensional reconstruction on the input face image to be processed based on the target reconstruction model to obtain the target three-dimensional face model, it will further intelligently perform smoothing and texture mapping on the target three-dimensional face model to obtain the second target three-dimensional face model, thereby optimizing the target three-dimensional face model and improving the authenticity of the second target three-dimensional face model. In addition, the second target three-dimensional face model will also be stored, so as to ensure the privacy and security of the second target three-dimensional face model.

[0172] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0173] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target reconstruction model, the above-mentioned target reconstruction model can also be stored in a node of a blockchain.

[0174] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0175] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0176] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0178] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0179] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a 3D face reconstruction device based on artificial intelligence. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0180] like Figure 3 As shown, the artificial intelligence-based 3D face reconstruction device 300 described in this embodiment includes: an acquisition module 301, a first processing module 302, a second processing module 303, a first generation module 304, a second generation module 305, a third generation module 306, an optimization module 307 and a reconstruction module 308. Among them:

[0181] An acquisition module 301 is used to acquire pre-constructed two-dimensional face image data;

[0182] The first processing module 302 is used to extract the face region of interest from the two-dimensional face image data to obtain a corresponding face image, perform face key point detection on the face image to obtain corresponding two-dimensional key points, and perform face segmentation on the face image to obtain a corresponding face mask image;

[0183] A second processing module 303 is used to extract information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and to process the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model;

[0184] A first generating module 304, configured to generate a corresponding first loss based on the three-dimensional face model and the face image;

[0185] A second generating module 305, configured to generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image;

[0186] A third generating module 306, configured to generate a comprehensive loss based on the first loss and the second loss;

[0187] An optimization module 307, configured to optimize the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model;

[0188] The reconstruction module 308 is used to perform three-dimensional reconstruction processing on the input face image to be processed based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

[0189] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation mode, and will not be repeated here.

[0190] In some optional implementations of this embodiment, the first generating module 304 includes:

[0191] A first acquisition submodule is used to acquire a three-dimensional scanned face model corresponding to the face image;

[0192] A second acquisition submodule is used to acquire first vertex information of the three-dimensional scanned face model;

[0193] A third acquisition submodule, used to acquire second vertex information of the three-dimensional face model;

[0194] A first calculation submodule, used for calculating a first Euclidean distance between the first vertex information and the second vertex information;

[0195] The first determining submodule is configured to use the first Euclidean distance as the first loss.

[0196] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation mode, and will not be repeated here.

[0197] In some optional implementations of this embodiment, the second generation module 305 includes:

[0198] A projection submodule, used for performing projection processing on the three-dimensional face model to obtain corresponding target two-dimensional key points;

[0199] A rendering submodule, used for rendering the three-dimensional face model to obtain a corresponding two-dimensional face image;

[0200] A second calculation submodule, used for calculating a second Euclidean distance between the target two-dimensional key point and the two-dimensional key point, and using the second Euclidean distance as the key point loss;

[0201] A third calculation submodule, used to calculate the pixel loss between the two-dimensional face image and the face mask image;

[0202] A fourth calculation submodule, used for calculating the similarity loss between the two-dimensional face image and the face mask image;

[0203] A generating submodule is used to generate the second loss based on the key point loss, the pixel loss and the similarity loss.

[0204] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation, and will not be repeated here.

[0205] In some optional implementations of this embodiment, the third generating module 306 includes:

[0206] A fourth acquisition submodule, used to acquire a first weight, a second weight, a third weight and a fourth weight corresponding to the first loss, the key point loss, the pixel loss and the similarity loss respectively;

[0207] The fifth acquisition submodule is used to obtain a preset loss calculation formula;

[0208] a fifth calculation submodule, configured to calculate the first loss, the key point loss, the pixel loss, the similarity loss, the first weight, the second weight, the third weight, and the fourth weight based on the loss calculation formula to obtain a corresponding calculation result;

[0209] The second determination submodule is used to use the calculation result as the comprehensive loss.

[0210] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation mode, and will not be repeated here.

[0211] In some optional implementations of this embodiment, the acquisition module 301 includes:

[0212] The sixth acquisition submodule is used to acquire the pre-collected initial two-dimensional face image data;

[0213] A cleaning submodule, used for performing data cleaning processing on the initial two-dimensional face image data to obtain corresponding first face image data;

[0214] A cropping submodule, used for performing data cropping processing on the first face image data to obtain corresponding second face image data;

[0215] A normalization submodule, used to perform normalization processing on the second facial image data to obtain corresponding third facial image data;

[0216] The third determining submodule is used to use the third facial image data as the two-dimensional facial image data.

[0217] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation mode, and will not be repeated here.

[0218] In some optional implementations of this embodiment, the artificial intelligence-based 3D face reconstruction device further includes:

[0219] A construction module, used to construct verification data based on the face image data;

[0220] A verification module, used to perform performance verification on the target reconstruction model based on the verification data to obtain performance indicator data of the target reconstruction model;

[0221] A fourth generating module, used to perform data analysis on the performance indicator data to generate a performance evaluation result corresponding to the target reconstruction model;

[0222] An adjustment module is used to perform corresponding model adjustment processing on the target reconstruction model based on the performance evaluation result.

[0223] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation mode, and will not be repeated here.

[0224] In some optional implementations of this embodiment, the artificial intelligence-based 3D face reconstruction device further includes:

[0225] A smoothing module, used for smoothing the target 3D human face model to obtain a corresponding first target 3D human face model;

[0226] A mapping module, used for performing texture mapping processing on the first target three-dimensional human face model to obtain a corresponding second target three-dimensional human face model;

[0227] A storage module is used to store the second target three-dimensional face model.

[0228] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based three-dimensional face reconstruction method in the aforementioned implementation mode, and will not be repeated here.

[0229] To solve the above technical problems, the present application also provides a computer device. Figure 4, Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0230] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.

[0231] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0232] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a three-dimensional reconstruction method of a human face based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0233] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the artificial intelligence-based face 3D reconstruction method.

[0234] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0235] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based three-dimensional face reconstruction method.

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

[0237] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for 3D reconstruction of human face based on artificial intelligence, characterized in that: The steps include: Obtain pre-constructed two-dimensional face image data; Extracting a facial region of interest from the two-dimensional facial image data to obtain a corresponding facial image, detecting facial key points from the facial image to obtain corresponding two-dimensional key points, and segmenting the facial image to obtain a corresponding facial mask image; Extracting information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and processing the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model; Generate a corresponding first loss based on the three-dimensional face model and the face image; Generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image; generating a comprehensive loss based on the first loss and the second loss; Optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model; The input face image to be processed is subjected to three-dimensional reconstruction processing based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

2. The method for 3D reconstruction of human face based on artificial intelligence according to claim 1, characterized in that: The step of generating a corresponding first loss based on the three-dimensional face model and the face image specifically includes: Acquire a three-dimensional scanned face model corresponding to the face image; Acquire first vertex information of the three-dimensional scanned face model; Acquire second vertex information of the three-dimensional face model; Calculating a first Euclidean distance between the first vertex information and the second vertex information; The first Euclidean distance is used as the first loss.

3. The method for 3D reconstruction of human face based on artificial intelligence according to claim 1, characterized in that: The step of generating a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image specifically includes: Performing projection processing on the three-dimensional face model to obtain corresponding target two-dimensional key points; Rendering the three-dimensional face model to obtain a corresponding two-dimensional face image; Calculating a second Euclidean distance between the target two-dimensional key point and the two-dimensional key point, and using the second Euclidean distance as the key point loss; Calculating a pixel loss between the two-dimensional face image and the face mask image; Calculating the similarity loss between the two-dimensional face image and the face mask image; The second loss is generated based on the key point loss, the pixel loss, and the similarity loss.

4. The method for 3D reconstruction of human face based on artificial intelligence according to claim 3, characterized in that: The step of generating a comprehensive loss based on the first loss and the second loss specifically includes: Obtaining a first weight, a second weight, a third weight, and a fourth weight corresponding to the first loss, the key point loss, the pixel loss, and the similarity loss, respectively; Get the preset loss calculation formula; Based on the loss calculation formula, the first loss, the key point loss, the pixel loss, the similarity loss, the first weight, the second weight, the third weight, and the fourth weight are calculated and processed to obtain corresponding calculation results; The calculation result is taken as the comprehensive loss.

5. The method for 3D reconstruction of human face based on artificial intelligence according to claim 1, characterized in that: The step of obtaining pre-constructed two-dimensional face image data specifically includes: Acquire pre-collected initial two-dimensional face image data; Performing data cleaning processing on the initial two-dimensional face image data to obtain corresponding first face image data; Performing data cropping processing on the first facial image data to obtain corresponding second facial image data; Normalizing the second facial image data to obtain corresponding third facial image data; The third facial image data is used as the two-dimensional facial image data.

6. The method for 3D reconstruction of human face based on artificial intelligence according to claim 1, characterized in that: After the step of optimizing the initial reconstruction model based on the comprehensive loss to obtain the corresponding target reconstruction model, the method further includes: Constructing verification data based on the facial image data; Performing performance verification on the target reconstruction model based on the verification data to obtain performance indicator data of the target reconstruction model; Performing data analysis on the performance indicator data to generate a performance evaluation result corresponding to the target reconstruction model; Based on the performance evaluation result, corresponding model adjustment processing is performed on the target reconstruction model.

7. The method for 3D reconstruction of human face based on artificial intelligence according to claim 1, characterized in that: After the step of performing three-dimensional reconstruction processing on the input face image to be processed based on the target reconstruction model to obtain the corresponding target three-dimensional face model, the method further includes: Performing smoothing processing on the target three-dimensional human face model to obtain a corresponding first target three-dimensional human face model; Performing texture mapping processing on the first target three-dimensional human face model to obtain a corresponding second target three-dimensional human face model; The second target 3D face model is stored.

8. A 3D face reconstruction device based on artificial intelligence, characterized in that: include: An acquisition module, used for acquiring pre-constructed two-dimensional face image data; A first processing module is used to extract a facial region of interest from the two-dimensional facial image data to obtain a corresponding facial image, perform facial key point detection on the facial image to obtain corresponding two-dimensional key points, and perform facial segmentation on the facial image to obtain a corresponding facial mask image; A second processing module is used to extract information from the face image based on a convolutional neural network in a preset initial reconstruction model to obtain corresponding model parameters, and to process the model parameters based on a processing network in the initial reconstruction model to obtain a corresponding three-dimensional face model; A first generating module, configured to generate a corresponding first loss based on the three-dimensional face model and the face image; A second generating module, used to generate a corresponding second loss based on the three-dimensional face model, the two-dimensional key points and the face mask image; A third generating module, configured to generate a comprehensive loss based on the first loss and the second loss; An optimization module, used for optimizing the initial reconstruction model based on the comprehensive loss to obtain a corresponding target reconstruction model; The reconstruction module is used to perform three-dimensional reconstruction processing on the input face image to be processed based on the target reconstruction model to obtain a corresponding target three-dimensional face model.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the method for three-dimensional reconstruction of a face based on artificial intelligence as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the artificial intelligence-based three-dimensional face reconstruction method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Three-dimensional reconstruction method and device based on image set, equipment and medium

    CN120147559A

  • A three-dimensional reconstruction method, device, equipment and medium based on image set

    CN120147559B