Three-dimensional character modeling method, device, storage medium and computer equipment
By generating and optimizing 3D description texts and images, and combining LoRA weights for dual-domain distillation learning, the problem that 3D reconstruction technology in the existing technology cannot capture the personalized characteristics of people is solved, and high-quality personalized 3D modeling results are achieved.
Patent Information
- Application Number
- CN202411110861.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Existing 3D reconstruction technology can only restore the existing character forms in the character data set, resulting in the 3D character model obtained by modeling not having obvious character personalized characteristics.
By receiving the character video input by the target user, generate the target color image and 3D description text including the body image and head image, use the preset initial LoRA model to determine the body and head LoRA weights, optimize the initial 3D mapping model, and generate the target method line and depth images, and performs dual-domain distillation learning to improve the personalized effect of 3D modeling results.
It achieves high-quality and personalized 3D modeling results, dynamically captures the detailed characteristics of characters, and improves the personalized effect of 3D modeling results.
Smart Images

Figure CN118628673B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of character modeling, and in particular to a three-dimensional character modeling method, device, storage medium and computer equipment. Background Art
[0002] In the field of human 3D modeling, in order to improve the efficiency of 3D modeling, the technology evolution has gradually shifted from traditional algorithms to deep learning large models. For example, the NeRF (Neural Radiance Fields) modeling algorithm can use multi-view images as input, reconstruct 3D scenes through a neural network model, and achieve mapping from 2D images to 3D space.
[0003] However, current 3D reconstruction technology, whether traditional algorithms or deep learning large models, mainly focuses on the reconstruction of static scenes, that is, it can only restore the forms of existing characters in the character dataset, resulting in the 3D character models obtained by modeling having unclear personalized features. Summary of the invention
[0004] The purpose of the present application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the three-dimensional reconstruction technology in the prior art can only restore the form of the characters already existing in the character data set, resulting in the three-dimensional character model obtained by modeling having unclear character personalized features.
[0005] The present application provides a three-dimensional character modeling method, the method comprising:
[0006] After receiving a character video input by a target user, a target color image including a body image and a head image is generated according to the character video, and a three-dimensional description text of the target color image is generated, and a body LoRA weight of the body image and a head LoRA weight of the head image are determined by a preset initial LoRA model;
[0007] Determine an initial three-dimensional mapping model, and use the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model;
[0008] Inputting the three-dimensional description text into the target three-dimensional mapping model to obtain a target normal image and a target depth image output by the target three-dimensional mapping model;
[0009] The target color image, the target normal image and the target depth image are used to perform dual-domain distillation learning on a preset character modeling model to obtain a three-dimensional modeling result of the character video output by the character modeling model.
[0010] Optionally, generating a target color image including a body image and a head image according to the person video includes:
[0011] Performing frame extraction processing on the person video to obtain a person image, and performing person masking on the person image to obtain a body region;
[0012] Performing background replacement on the person image based on the body region to obtain a body image, and performing face detection on the body image, and cropping the body image according to the detection result to obtain a head image;
[0013] The body image and the head image are combined to obtain a target color image.
[0014] Optionally, generating a three-dimensional description text of the target color image includes:
[0015] Determine a target image description model; the target image description model is obtained by training a preset initial image description model using a sample color image as a training sample and a real description text corresponding to the sample color image as a sample label, and using a target loss function, wherein the target loss function is a combination of feature loss functions corresponding to a body image and a head image in the sample color image;
[0016] The target color image is input into the target image description model to obtain a three-dimensional description text output by the target image description model.
[0017] Optionally, the process of determining the body LoRA weight is consistent with the process of determining the head LoRA weight; wherein determining the body LoRA weight of the body image by using a preset initial LoRA model includes:
[0018] Inputting the body image into an initial LoRA model to obtain a predicted value output by the initial LoRA model, and determining a loss gradient of the initial LoRA model according to the predicted value;
[0019] Determine whether the loss gradient meets the preset training end condition;
[0020] If yes, reading the LoRA weight of the initial LoRA model as the body LoRA weight of the body image;
[0021] If not, the LoRA weight of the initial LoRA model is updated based on the loss gradient, and the step of inputting the body image into the initial LoRA model is returned to obtain the predicted value output by the initial LoRA model and subsequent steps thereof.
[0022] Optionally, determining the initial three-dimensional mapping model includes:
[0023] Acquire a sample character model, render the sample character model, generate a sample color image, a sample depth image and a sample normal image, and determine a three-dimensional description text corresponding to each image;
[0024] Iteratively training a preset diffusion model using the sample color image and the three-dimensional description text corresponding to the sample color image to generate a color starting point model;
[0025] Iteratively training the color starting point model using the sample depth image and the three-dimensional description text corresponding to the sample depth image to generate a depth endpoint model, and iteratively training the color starting point model using the sample normal line image and the three-dimensional description text corresponding to the sample normal line image to generate a normal endpoint model;
[0026] The color starting point model, the depth end point model and the normal end point model are aligned in network layers to generate an initial three-dimensional mapping model.
[0027] Optionally, the using the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model includes:
[0028] Determine the depth mapping weight and normal mapping weight of the initial three-dimensional mapping model; wherein the depth mapping weight is the difference between the color starting weight of the color starting model and the depth end point weight of the depth end point model, and the normal mapping weight is the difference between the color starting weight of the color starting model and the normal end point weight of the normal end point model;
[0029] The body LoRA weight and the head LoRA weight are loaded into the initial three-dimensional mapping model to be superimposed with the depth mapping weight and the normal mapping weight to generate a target three-dimensional mapping model.
[0030] Optionally, the character modeling model includes an image rendering layer, a structure distillation layer, a texture distillation layer and a character modeling layer;
[0031] The method uses the target color image, the target normal image, and the target depth image to perform dual-domain distillation learning on a preset character modeling model to obtain a three-dimensional modeling result of the character video output by the character modeling model, including:
[0032] Performing image rendering on the character video using the image rendering layer to generate a standard color image, a standard normal image, and a standard depth image;
[0033] Inputting the target normal image, the target depth image, the standard normal image and the standard depth image into the structure distillation layer, so that the structure distillation layer performs dual-domain distillation learning with the goal of making the standard normal image approach the target normal image and the standard depth image approach the target depth image, and generates geometric structure features after distillation learning;
[0034] Inputting the target color image and the standard color image into the map distillation layer, so that the map distillation layer performs dual-domain distillation learning with the standard color image approaching the target color image, and generates color map features after distillation learning;
[0035] The character modeling layer performs three-dimensional character modeling on the geometric structure features and the color map features, and outputs a three-dimensional modeling result of the character video.
[0036] The present application also provides a three-dimensional character modeling device, comprising:
[0037] A data acquisition module is used to generate a target color image including a body image and a head image according to the character video after receiving the character video input by the target user, and generate a three-dimensional description text of the target color image, and determine the body LoRA weight of the body image and the head LoRA weight of the head image through a preset initial LoRA model;
[0038] A model optimization module, used to determine an initial three-dimensional mapping model, and use the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model;
[0039] A model rendering module, used for inputting the three-dimensional description text into the target three-dimensional mapping model to obtain a target normal image and a target depth image output by the target three-dimensional mapping model;
[0040] The character modeling module is used to use the target color image, the target normal image and the target depth image to perform dual-domain distillation learning on a preset character modeling model to obtain a three-dimensional modeling result of the target color image output by the character modeling model.
[0041] The present application also provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the three-dimensional character modeling method as described in any of the above embodiments.
[0042] The present application also provides a computer device, comprising: one or more processors, and a memory;
[0043] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the three-dimensional character modeling method described in any one of the above embodiments are performed.
[0044] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0045] The three-dimensional character modeling method, device, storage medium and computer equipment provided by the present application can, after receiving a character video input by a target user, first generate a target color image including a body image and a head image according to the character video, and generate a three-dimensional description text of the target color image, and then determine the body LoRA weight of the body image and the head LoRA weight of the head image through a preset initial LoRA model, where the body LoRA weight and the head LoRA weight can be used to describe the personalized characteristics of the character video; then the initial three-dimensional mapping model can be determined, and the initial three-dimensional mapping model can be weight-optimized using the body LoRA weight and the head LoRA weight to obtain a target three-dimensional mapping model, so that the target three-dimensional mapping model can generate a target normal image and a target depth image corresponding to the target color image based on the three-dimensional description text, so that the detailed characteristics of the character can be dynamically captured through the target normal image and the target depth image; finally, the preset character modeling model can be subjected to dual-domain distillation learning using the target color image, so as to obtain a high-quality and personalized three-dimensional modeling result output by the character modeling model. This application uses a model that has been optimized with body LoRA weights and head LoRA weights to perform dual-domain distillation learning of the body area and head area on the character modeling model to improve the quality of distillation learning, thereby improving the personalized effect of the three-dimensional modeling results. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0047] Figure 1 A schematic diagram of a process flow of a three-dimensional character modeling method provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of a process for determining an initial three-dimensional mapping model provided in an embodiment of the present application;
[0049] Figure 3A schematic diagram of a process of character geometry distillation learning provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of the structure of a three-dimensional character modeling device provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0053] Current 3D reconstruction technology, whether traditional algorithms or deep learning large models, mainly focuses on the reconstruction of static scenes, that is, it can only restore the forms of existing characters in the character dataset, resulting in the 3D character models obtained by modeling having unclear personalized features.
[0054] Based on this, this application proposes the following technical solutions, see below for details:
[0055] In one embodiment, Figure 1 As shown, Figure 1 A schematic diagram of a process flow of a three-dimensional character modeling method provided in an embodiment of the present application; the present application provides a three-dimensional character modeling method, which specifically includes the following:
[0056] S110: After receiving the character video input by the target user, a target color image including a body image and a head image is generated according to the character video, and a three-dimensional description text of the target color image is generated, and the body LoRA weight of the body image and the head LoRA weight of the head image are determined through a preset initial LoRA model.
[0057] In this step, when the user needs to perform three-dimensional character modeling on a dynamic character image, the dynamic character image can be input into the computer device in the form of a video. After the computer device receives the character video containing the dynamic character image, the body image and head image of the character video can be generated to form a target color image. Then the computer device can use a text mapping method to determine the three-dimensional description text corresponding to the target color image. In addition, the computer device can also determine the body LoRA weight of the body image and the head LoRA weight of the head image through a preset initial LoRA model.
[0058] It is understandable that the character video input by the user can contain different postures and movements of the character, and the character's movements are continuous and natural, so that when the computer device generates the target color image of the character video, the body image and head image in the target color image can cover the full range of the character. The body image here refers to an image that only contains the body area of the character, so as to reduce the influence of other irrelevant elements on the extraction of character features, and the head image refers to an image that only contains the head area of the character, so that subtle features such as the facial expression and eye direction of the character can be read. Of course, the higher the quality of the character video input by the user, the more accurate the expression of the personalized features of the image. Therefore, the three-dimensional description text generated by the target color image can capture more detailed features of the character, and the subsequent modeling can obtain a more refined and personalized character model.
[0059] The three-dimensional description text refers to the text description obtained by converting the body posture, action, expression and other features of the person in the image. In this application, the computer device can respectively perform text descriptions on the body image and the head image in the target color image to deepen the detailed explanation of the person. These texts describe the detailed changes of each part of the person, which can be the position and angle of the person's limbs, or the style and color of the person's clothing, without limitation.
[0060] In addition, the body LoRA weight of this application can reflect the model's ability to understand and express body image features. Similarly, the head LoRA weight reflects the model's ability to understand and express head image features. LoRA here refers to a model fine-tuning technology that aims to achieve rapid adaptation and customization of the model by modifying some of the model's parameters. Therefore, this application can improve the understanding and expression capabilities of the subsequent model used for modeling of personalized features of people in human videos based on the body LoRA weight and the head LoRA weight.
[0061] S120: Determine an initial three-dimensional mapping model, and use the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model.
[0062] In this embodiment, after obtaining the body LoRA weight and head LoRA weight of the character video through step S110, the computer device can determine the initial three-dimensional mapping model, and then use the body LoRA weight and head LoRA weight to optimize the weight of the initial three-dimensional mapping model, and use the optimized model as the target three-dimensional mapping model to improve the target three-dimensional mapping model's ability to understand and express the character's personalized characteristics.
[0063] It is understandable that the initial 3D mapping model of the present application is a pre-trained model that has been trained using a large-scale data set and has good 3D feature extraction capabilities. However, although the initial 3D mapping model has good general performance, it still has deficiencies in detail processing and cannot cover the diversity of all individuals, especially for the recognition and reconstruction of personalized features. Therefore, the present application can use body LoRA weights and head LoRA weights to personalize and optimize the initial 3D mapping model to improve the accuracy and performance of the model when processing personalized data, and output high-quality feature image representations for subsequent character modeling.
[0064] S130: Inputting the three-dimensional description text into the target three-dimensional mapping model to obtain a target normal image and a target depth image output by the target three-dimensional mapping model.
[0065] In this step, after obtaining the target 3D mapping model in step S120, the computer device can input the 3D description text into the target 3D mapping model, so as to obtain the target normal image and target depth image output by the target 3D mapping model.
[0066] Among them, the target normal image refers to a map that describes the normal direction of the character's surface. The normal here refers to a vector perpendicular to the character's surface, which determines the sensitivity of the object under different lighting conditions, and thus provides rich details and textures for the character's surface, making the rendering effect of the modeling result more realistic; and the target depth image refers to a two-dimensional image, each pixel position of which stores the depth value of the corresponding pixel, indicating the distance between the position on the character's surface and the shooting point. Therefore, the three-dimensional point coordinate value of the character can be calculated through the pixel coordinates and depth values of the target depth map, providing a basis for the three-dimensional modeling of the character.
[0067] Specifically, after the computer device inputs the three-dimensional description text into the target three-dimensional mapping model, the computer device can extract the three-dimensional feature information from the three-dimensional description text in combination with the body LoRA weight and head LoRA weight of the character, and then map these feature information into specific image representations and output them, namely, the target normal image and the target depth image, so as to realize the extraction of the detailed features of the character in the character video. Among them, the target three-dimensional mapping model provides the geometric information and direction information of the character surface through the target normal image, and provides the distance and shape information of the character in the three-dimensional space through the target depth image.
[0068] S140: Perform dual-domain distillation learning on a preset character modeling model using a target color image, a target normal image, and a target depth image to obtain a three-dimensional modeling result of a character video output by the character modeling model.
[0069] In this step, after the target normal image and the target depth image are generated through step S130, the computer device can use the target normal image, the target depth image and the target color image to perform dual-domain distillation learning on the preset character modeling model. When the distillation learning of the character modeling model is completed, a high-quality and personalized three-dimensional modeling result of the character video can be output.
[0070] Among them, the character modeling model refers to a model that performs character modeling on personalized features extracted from an input character video and its corresponding three-dimensional description text and obtains a three-dimensional modeling result. In the process of character modeling, the model can also convert the extracted personalized features into image representations before performing character modeling. However, since the character modeling model is a simplified or parameterized model generated based on computer image technology, the precision of the extracted personalized features of the character is low. Therefore, the present application can perform distillation learning on the character modeling model, and learn the knowledge and decision-making process in the target three-dimensional mapping model by minimizing the differences between the image representations output by the character modeling model and the target three-dimensional mapping model. In this way, when the distillation learning of the character modeling model is completed, it can improve the ability to interpret and express personalized features of the character while retaining the model performance.
[0071] Furthermore, since the target color image is composed of body images and head images at multiple angles, the target normal image and target depth image generated based on the target color image also include body images and head images at multiple angles. Therefore, the present application can divide the target normal image, target depth image and target color image into body area and head area based on each body image and head image, and then perform distillation learning of the body area and head area on the character modeling model, so as to improve the effect of model distillation and improve the model's ability to interpret and express the details of the character's head features.
[0072] In the above embodiment, after receiving the character video input by the target user, a target color image including a body image and a head image can be generated according to the character video, and a three-dimensional description text of the target color image can be generated. Then, the body LoRA weight of the body image and the head LoRA weight of the head image can be determined by a preset initial LoRA model. The body LoRA weight and the head LoRA weight here can be used to describe the personalized characteristics of the character video; then the initial three-dimensional mapping model can be determined, and the initial three-dimensional mapping model can be weight-optimized using the body LoRA weight and the head LoRA weight to obtain a target three-dimensional mapping model, so that the target three-dimensional mapping model can generate a target normal image and a target depth image corresponding to the target color image based on the three-dimensional description text, so that the target normal image and the target depth image can be used to dynamically capture the detailed features of the character; finally, the target color image, the target normal image and the target depth image can be used to perform dual-domain distillation learning on the preset character modeling model to obtain a high-quality and personalized three-dimensional modeling result output by the character modeling model. This application uses a model that has been optimized with body LoRA weights and head LoRA weights to perform dual-domain distillation learning of the body area and head area on the character modeling model to improve the quality of distillation learning, thereby improving the personalized effect of the three-dimensional modeling results.
[0073] In one embodiment, generating a target color image including a body image and a head image according to a person video in step S110 may include:
[0074] S111: performing frame extraction processing on the person video to obtain a person image, and performing person masking on the person image to obtain a body region.
[0075] S112: replacing the background of the person image based on the body region to obtain a body image, and performing face detection on the body image, and cropping the body image according to the detection result to obtain a head image.
[0076] S113: Combine the body image and the head image to obtain a target color image.
[0077] In this embodiment, after the computer device receives the character video input by the user, it can extract frames from the character video to obtain character images with multiple different angles, and then perform character masking on the character images obtained by extracting frames to obtain the body region. Then, the computer device can replace the background of the character image based on the body region to generate a body image, and perform face detection on the body image, and crop it according to the detection result to obtain a head image, and finally combine the body image and the head image to obtain a target color image.
[0078] Specifically, the computer device can use a human mask model to perform human masking on each person image, that is, mark the human body area in the person image as white and mark other areas as black, so that a frame can be generated based on the human body mask of the white area to form a body area. In this process, the computer device can also check the mask area of the white area. If the mask area is too small, the person image can be discarded, thereby excluding the person image with incomplete body area. Then the computer device can use the body area to replace the background of the person image to obtain a body image containing only the person's body part, thereby avoiding the influence of other irrelevant areas on the extraction of body area features.
[0079] The human body mask model is obtained by training a pre-trained model based on a U-Net structure. When training the human body mask model, a sample image set consisting of different types of sample human images and their corresponding real human body mask results can be first obtained, and then the sample human image can be input into the pre-trained model to obtain the predicted human body mask result output by the pre-trained model, and the pre-trained model is iteratively trained with the goal of making the predicted human body mask result close to the real human body mask result, until the pre-trained model meets the preset training end condition, and the trained pre-trained model is used as the human body mask model.
[0080] In addition, the computer device can also use the face detection model to perform face detection on the generated body image, and obtain the face detection frame output by the face detection model, and then expand outward based on the face detection frame in the body image to obtain a square frame including the head area, and then cut out the head image from the body image based on the square frame. Among them, the training process of the face detection model is consistent with the training process of the face mask model, which will not be repeated here.
[0081] Furthermore, since the person video contains different postures and movements of the person, the computer device can extract frames from the person video according to a preset time interval to obtain multiple person images at different angles. Then, the present application can also perform preprocessing operations on the person images, and the preprocessing operations include but are not limited to normalization, sharpening, denoising, etc.
[0082] To elaborate, normalization refers to mapping the data of each dimension of the data vector to the interval between (0, 1) or (-1, 1), or mapping a norm of the data vector to 1. Sharpening refers to compensating the contour of the image, enhancing the edge of the image and the grayscale jump part to make the image clear. It can be divided into two categories: spatial domain processing and frequency domain processing. By highlighting the edges and contours of the characters in the image, or the characteristics of certain linear target elements, the contrast between the edges of the characters and the surrounding pixels can be improved. De-noising refers to the process of reducing noise in digital images. Generally, the image is often affected by the interference of imaging equipment and external environmental noise during digitization and transmission. That is, the received image information generally includes noise, and these noises will become an important cause of image interference. By denoising the image, the noise in the image can be removed, and the authenticity and accuracy of the obtained image can be further improved.
[0083] In one embodiment, step S110 generates a three-dimensional description text of the target color image, which may include:
[0084] S114: Determine a target image description model.
[0085] S115: Input the target color image into the target image description model to obtain a three-dimensional description text output by the target image description model.
[0086] In this embodiment, after determining the target image description model, the computer device can input the target color image into the target image description model, and use the target image description model to perform a feature text description of the target color image. Since the target image description model is obtained by using the sample color image as a training sample, the real description text corresponding to the sample color image as a sample label, and using the target loss function to train the preset initial image description model, therefore, by inputting the target color image into the target image description model, the three-dimensional description text output by the target image description model can be obtained.
[0087] Specifically, when the target image description model is training the model, different types of sample color images can be used as training samples, and each training sample can be labeled with a sample label, that is, the corresponding real three-dimensional description text. When all training samples are labeled, the training samples with sample labels can be input into the preset initial image description model for forward propagation to train the model, and the preset target loss function can be used to tune the model parameters during the back propagation process of the model. When the model meets certain training conditions or parameter convergence conditions, such as the number of iterations reaching the set value, the training is considered to be completed, and the trained model can be used as the final target image description model.
[0088] Furthermore, when designing the initial image description model, the present application can design the target loss function of the model as a loss function formed by combining the feature loss functions corresponding to the body image and the head image in the sample color image. After using the target loss function to tune the parameters of the initial image description model, not only the loss between the real body image features and the predicted body image features can be reduced, but also the loss between the real head image features and the predicted head image features can be reduced, so that the predicted three-dimensional description text generated by the model can move closer to the real three-dimensional description text more quickly and accurately. In this way, when the target color image is subsequently described in feature text through the target image description model, the personalized characteristics of the person in the target color image can be expressed more finely.
[0089] In addition, the present application can also store the trained target image description model so that when it is necessary to obtain the characteristics of the person for text description in the future, the pre-stored target image description model can be directly called to perform text description operations on the target color image.
[0090] In one embodiment, the process of determining the body LoRA weight in step S110 is consistent with the process of determining the head LoRA weight; wherein the step of determining the body LoRA weight of the body image by using a preset initial LoRA model may include:
[0091] S116: Input the body image into the initial LoRA model to obtain a predicted value output by the initial LoRA model, and determine a loss gradient of the initial LoRA model according to the predicted value.
[0092] S117: Determine whether the loss gradient meets the preset training end condition.
[0093] S118: If yes, read the LoRA weight of the initial LoRA model as the body LoRA weight of the body image.
[0094] S119: If not, the LoRA weights of the initial LoRA model are updated based on the loss gradient, and the execution returns to input the body image into the initial LoRA model to obtain the predicted value output by the initial LoRA model and its subsequent steps.
[0095] In this embodiment, when determining the body LoRA weight, the computer device can first input the body image into the initial LoRA model, obtain the predicted value output by the initial LoRA model, and determine the loss gradient of the initial LoRA model according to the predicted value. Then, the computer device can use the loss gradient to determine whether the LoRA weight of the current initial LoRA model meets the requirements. To expand on this, if the loss gradient meets the preset training end condition, the computer device can read the LoRA weight of the initial LoRA model as the body LoRA weight of the body image; if the loss gradient does not meet the preset training end condition, the computer device can update the LoRA weight of the initial LoRA model based on the loss gradient, and continue to use the body image for gradient loss calculation until the loss gradient meets the preset training end condition. The preset training end condition here can refer to the loss gradient reaching the preset standard, or it can be that the model reaches a preset number of iterations, which is not limited here.
[0096] Specifically, the computer device can select an image processing model that has been trained with a large-scale data set, such as ResNet, Transformer, etc., and then build a LoRA layer in the image processing model to form an initial LoRA model. The LoRA layer here can increase the flexibility of the model through low-rank decomposition to adapt to personalized image data. In detail, the LoRA layer consists of two low-rank rectangles A and B, and adjusts the weights of the pre-trained model in the form of W+ΔW, where ; The computer device can then insert this LoRA layer into a specific layer of the image processing model to enable the model to be personalized during the feature extraction process.
[0097] More specifically, in the process of adjusting the LoRA weights of the initial LoRA model, the computer device can first obtain a training set, and then input the images of the training set into the initial LoRA model to obtain a test value output by the initial LoRA model. The loss can then be calculated based on the test value and the target value in the training set, and the loss gradient can be calculated through the back propagation algorithm to update the weight of the LoRA layer in the initial LoRA model based on the loss gradient until the loss gradient reaches a preset training end condition, and the weight of the LoRA layer is used as the body LoRA weight.
[0098] It should be noted that the process of determining the head LoRA weight in this application is consistent with the process of determining the body LoRA weight, which will not be repeated here.
[0099] In one embodiment, determining the initial three-dimensional mapping model in step S120 may include:
[0100] S121: Obtain a sample character model, render the sample character model, generate a sample color image, a sample depth image, and a sample normal image, and determine a three-dimensional description text corresponding to each image.
[0101] S122: Iteratively train a preset diffusion model using a sample color image and a three-dimensional description text corresponding to the sample color image to generate a color starting point model.
[0102] S123: Iteratively train the color starting point model using the sample depth image and the three-dimensional description text corresponding to the sample depth image to generate a depth endpoint model, and iteratively train the color starting point model using the sample normal image and the three-dimensional description text corresponding to the sample normal image to generate a normal endpoint model.
[0103] S124: performing network layer alignment on the color starting point model, the depth end point model, and the normal end point model to generate an initial three-dimensional mapping model.
[0104] In this embodiment, when determining the initial three-dimensional mapping model, the computer device can first obtain a sample character model, and then render the sample character model to generate a sample color image, a sample depth image, and a sample normal image; wherein the sample color image, the sample depth image, and the sample normal image all contain a body image and a head image. Then, the computer device can use the target image description model to perform feature text description on the sample color image, the sample depth image, and the sample normal image, respectively, so as to obtain the three-dimensional description text corresponding to each image. Through this process, the present application can obtain the basic data for training the initial three-dimensional mapping model.
[0105] It is understandable that the present application can first write a multi-vision rendering pipeline in a computer device, and then obtain multiple sample character models containing multiple postures, body shapes and actions from a 3D human body data set, and perform multi-angle rendering on the sample character models through the rendering pipeline. Among them, the computer device can use the results generated by lighting calculations and texture calculations to render sample color images of multiple angles, and during the rendering process, calculate the normal direction of each pixel to encode it as a color value to generate a sample normal image, and calculate the depth value of each pixel to encode it as a color value to generate a sample depth image. In addition, after rendering the body image of the sample color image, the computer device can also directly crop the head image from the body image by specifying multiple fixed points in the body image.
[0106] Furthermore, after obtaining the basic data for training the initial three-dimensional mapping model, the computer device may first use the sample color image and the three-dimensional description text corresponding to the sample color image to iteratively train the preset diffusion model to generate a color starting point model, which is used as the starting point weight of the initial three-dimensional mapping model. Then, the computer device may use the sample depth image and the three-dimensional description text corresponding to the sample depth image to iteratively train the color starting point model to generate a depth endpoint model, and use the sample normal image and the three-dimensional description text corresponding to the sample normal image to iteratively train the color starting point model to generate a normal endpoint model, thereby obtaining the endpoint weights of the initial three-dimensional mapping model in the depth dimension and the normal dimension. Therefore, after aligning the color starting point model, the depth endpoint model and the normal endpoint model at the network layer and generating the initial three-dimensional mapping model, the initial three-dimensional mapping model can be obtained.
[0107] The diffusion model refers to a type of generative model used to gradually construct data samples from noise. It generates target data, such as images, sounds, or other forms of signals, from a completely random initial state through a series of reverse diffusion steps. Therefore, the present application can generate a target color image, a target depth image, and a target normal image through an initial three-dimensional mapping model.
[0108] Indicative, such as Figure 2 As shown, Figure 2 A schematic diagram of a process for determining an initial three-dimensional mapping model provided in an embodiment of the present application; Figure 2 In the method, the computer device can use the sample normal image and its corresponding three-dimensional description text to train a color starting point model, and obtain the weight of the trained color starting point model as the color starting point weight; then the computer device can use the color starting point model as the training model of the depth endpoint model and the normal endpoint model, that is, use the sample depth image and its corresponding three-dimensional description text to train the color starting point model to obtain the depth endpoint model, and use the weight of the trained depth endpoint model as the depth endpoint weight, and use the sample normal image and its corresponding three-dimensional description text to train the color starting point model to obtain the normal endpoint model, and use the weight of the trained normal endpoint model as the normal endpoint weight. Finally, the computer device can perform network layer alignment on the trained color starting point model, depth endpoint model and normal endpoint model to obtain an initial three-dimensional mapping model, and the weight of the initial three-dimensional mapping model can include depth mapping weight and normal mapping weight.
[0109] In one embodiment, in step S120, weight optimization of the initial three-dimensional mapping model using the body LoRA weight and the head LoRA weight to obtain the target three-dimensional mapping model may include:
[0110] S125: Determine a depth mapping weight and a normal mapping weight of the initial three-dimensional mapping model.
[0111] S126: Loading the body LoRA weight and the head LoRA weight into the initial three-dimensional mapping model to be superimposed with the depth mapping weight and the normal mapping weight to generate a target three-dimensional mapping model.
[0112] In this embodiment, when the computer device optimizes the weight of the initial three-dimensional mapping model, it can first determine the depth mapping weight and normal mapping weight of the initial three-dimensional mapping model, and then load the body LoRA weight and the head LoRA weight into the initial three-dimensional mapping model to superimpose them with the depth mapping weight and the normal mapping weight to generate a target three-dimensional mapping model. The target three-dimensional mapping model obtained in this way has a more refined feature extraction capability.
[0113] Among them, the depth mapping weight of the present application can be the difference between the color starting weight of the color starting model and the depth endpoint weight of the depth endpoint model, and the normal mapping weight can be the difference between the color starting weight of the color starting model and the normal endpoint weight of the normal endpoint model.
[0114] It is understandable that the purpose of the target three-dimensional mapping model is to convert the input target color image into a target depth image and a target normal image. Therefore, the computer device can subtract the depth end weight and the normal end weight from the color starting weight respectively to obtain the depth mapping weight and the normal mapping weight.
[0115] Furthermore, the geometric shapes, positions and sizes of the characters in the sample images used by the color starting point model, the depth end point model and the normal end point model are basically consistent, and the background is also consistent. The main difference is that they are presented in the form of color images, depth images and normal images on the map, respectively, and in terms of network structure, the training network models they use are also consistent. Based on the above conditions, the weights between the network layers in the weights of the three models are aligned, but each weight vector corresponding to the weight in each layer is difficult to align, so it is impossible to directly make a difference between the weights of the network layers corresponding to the two models to obtain the mapping weights. For this, the present application can use the matrix decomposition and reorganization method of SVD (Singular Value Decomposition) to perform vector-level alignment between the network layers corresponding to the two models, and make a difference after alignment to obtain the depth mapping weight and the normal mapping weight.
[0116] Specifically, the computer device can first decompose the weight of each layer of the three model weights into the form of three matrix multiplications through SVD singular value decomposition, where i represents the i-th network layer weight matrix in the model weight, and the general formula of singular value decomposition is , where U is the left eigenvector matrix and V is the right eigenvector matrix, located in the middle is the eigenvalue matrix, which records the correlation between the eigenvectors of the two matrices U and V, that is, the importance of the corresponding eigenvectors. Based on the general formula of singular value decomposition, the i-th layer weight of the color starting weight RgbW, the i-th layer weight of the normal end weight NW and the i-th layer weight of the depth end weight DW can be singularly decomposed. After singular value decomposition, the weight matrix of each layer in the model is decomposed into the left eigenmatrix U and the right eigenmatrix V. The eigenvectors in the left and right eigenmatrices are based on the eigenvalue matrix The eigenvalues on the diagonal are arranged in order, and the eigenvectors with larger eigenvalues are arranged at the front. In this way, the eigenvectors of each layer weight of different models are aligned to a certain extent. The specific calculation method of singular value decomposition can be as follows:
[0117]
[0118] After performing SVD decomposition and alignment on the weight matrices of each layer in the three large models, we can start to perform subtraction and recombination operations between the corresponding feature vectors of the two models.
[0119] For example, when calculating the normal map weight, we can first make a difference between the left and right feature matrices corresponding to the i-th layer weights of the two model weights, so that minus Get the left difference matrix, synchronously, minus The right difference matrix is obtained. Then the eigenvalue matrix is added and the average is calculated to obtain a new eigenvalue matrix. Finally, the results obtained by the above calculations are reorganized based on the general formula of SVD to obtain the line mapping weights. In addition, the calculation method of the depth mapping weights is similar, which will not be repeated here.
[0120] In one embodiment, the character modeling model in step S140 may include an image rendering layer, a structure distillation layer, a texture distillation layer and a character modeling layer; wherein the step of using the target color image, the target normal image and the target depth image to perform dual-domain distillation learning on the preset character modeling model to obtain a three-dimensional modeling result of the character video output by the character modeling model may include:
[0121] S141: Utilize the image rendering layer to perform image rendering on the character video to generate a standard color image, a standard normal image, and a standard depth image.
[0122] S142: Input the target normal image, the target depth image, the standard normal image and the standard depth image into the structure distillation layer, so that the structure distillation layer performs dual-domain distillation learning with the goal of making the standard normal image approach the target normal image and the standard depth image approach the target depth image, and generates geometric structure features after distillation learning.
[0123] S143: Input the target color image and the standard color image into the map distillation layer, so that the map distillation layer performs dual-domain distillation learning with the standard color image approaching the target color image, and generates color map features after distillation learning.
[0124] S144: Performing three-dimensional character modeling on the geometric structure features and the color map features through the character modeling layer, and outputting a three-dimensional modeling result of the character video.
[0125] In this embodiment, the character modeling model may include an image rendering layer, a structure distillation layer, a map distillation layer, and a character modeling layer. Therefore, the computer device can use the image rendering layer to perform image rendering on the character video to generate a standard color image, a standard normal image, and a standard depth image. Then, the computer device can input the target normal image, the target depth image, the standard normal image, and the standard depth image into the structure distillation layer, so that the structure distillation layer performs dual-domain distillation learning with the standard normal image approaching the target normal image and the standard depth image approaching the target depth image, and generates the geometric structure features of the character after distillation learning. At the same time, the computer device can also input the target color image and the standard color image into the map distillation layer, so that the map distillation layer performs dual-domain distillation learning with the standard color image approaching the target color image, and generates the color map features of the character after distillation learning. After generating the geometric structure features and color map features of the character in the character video, the computer device can perform three-dimensional modeling of the character on the geometric structure features and the color map features through the character modeling layer, and output the three-dimensional modeling result of the character video.
[0126] It is understandable that the character modeling model of the present application can choose the model constructed under the Humannorm framework, and use DMTet (Differentiable Multi-Tetrahedral Element) to represent the three-dimensional structure of the character. The DMTet here is a three-dimensional geometric body that combines hybrid display and implicit representation. In terms of display, the character surface is represented by a tetrahedral mesh and converted to a mesh using MT (Marching Tetrahedra); in terms of implicitness, the tetrahedral mesh stores SDF values, and these SDF values and vertex positions are optimized through neural networks, which can be fine-tuned.
[0127] Specifically, in each iterative optimization process of the character modeling model distillation learning, the three-dimensional representation of DMTet will be rendered into corresponding standard color images, standard normal images and standard depth images, which will be used for distillation learning with the target color image, target normal image and target depth image generated by the target three-dimensional mapping model to optimize the SDF value in DMTet. In addition, in order to obtain a more refined distillation effect, the computer device can perform dual-domain distillation learning on the character modeling model, that is, distillation learning is performed on the body area and head area of the character respectively. To elaborate, when it calculates the loss value in the body area, the head area will not participate in the optimization, thereby avoiding the appearance of low-quality head area when generating the body area of the character, thereby affecting the distillation learning of the head area of the character.
[0128] Indicatively, Figure 3 As shown, Figure 3 A schematic diagram of a process of character geometry distillation learning provided in an embodiment of the present application; Figure 3 In the above, after obtaining the standard normal image and the standard depth image through DMTet rendering, the autoencoder can be used to encode these images into the corresponding latent information Latent, and then add noise gt to these encoded latent information respectively, so that these latent information Latent becomes the latent representation of the corresponding network layer weights in the target 3D mapping model in the diffusion process. Next, you can The encoding of the corresponding three-dimensional description text is input into the corresponding network layer in the target three-dimensional mapping model to predict the predicted noise pred. Finally, the difference between the predicted noise pred and the actually added noise gt is calculated as the loss value, and then the value of SDF in DMTet is optimized through gradient backpropagation to adjust the geometric structure features, and iterates continuously until a three-dimensional model consistent with the character in the character video is generated.
[0129] Furthermore, after learning the geometric structure features through the above method, the present application can then perform distillation learning of color map features. The process of distillation learning is almost the same as the distillation learning of geometric structure features. The difference is that DMTet will add the representation of the rendering map, so that the color map features of the character can be rendered.
[0130] The following is a description of a three-dimensional character modeling device provided in an embodiment of the present application. The three-dimensional character modeling device described below and the three-dimensional character modeling method described above can be referenced to each other.
[0131] In one embodiment, Figure 4 As shown, Figure 4A schematic diagram of the structure of a three-dimensional character modeling device provided in an embodiment of the present application; the present application also provides a three-dimensional character modeling device, including a data acquisition module 210, a model optimization module 220, a model rendering module 230 and a character modeling module 240, which specifically include the following:
[0132] The data acquisition module 210 is used to generate a target color image including a body image and a head image according to the character video after receiving the character video input by the target user, and generate a three-dimensional description text of the target color image, and determine the body LoRA weight of the body image and the head LoRA weight of the head image through a preset initial LoRA model.
[0133] The model optimization module 220 is used to determine an initial three-dimensional mapping model, and use the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model.
[0134] The model rendering module 230 is used to input the 3D description text into the target 3D mapping model to obtain a target normal image and a target depth image output by the target 3D mapping model.
[0135] The character modeling module 240 is used to perform dual-domain distillation learning on a preset character modeling model using a target color image, a target normal image and a target depth image to obtain a three-dimensional modeling result of the target color image output by the character modeling model.
[0136] In the above embodiment, after receiving the character video input by the target user, a target color image including a body image and a head image can be generated according to the character video, and a three-dimensional description text of the target color image can be generated. Then, the body LoRA weight of the body image and the head LoRA weight of the head image can be determined by a preset initial LoRA model. The body LoRA weight and the head LoRA weight here can be used to describe the personalized characteristics of the character video; then the initial three-dimensional mapping model can be determined, and the initial three-dimensional mapping model can be weight-optimized using the body LoRA weight and the head LoRA weight to obtain a target three-dimensional mapping model, so that the target three-dimensional mapping model can generate a target normal image and a target depth image corresponding to the target color image based on the three-dimensional description text, so that the target normal image and the target depth image can be used to dynamically capture the detailed features of the character; finally, the target color image, the target normal image and the target depth image can be used to perform dual-domain distillation learning on the preset character modeling model to obtain a high-quality and personalized three-dimensional modeling result output by the character modeling model. This application uses a model that has been optimized with body LoRA weights and head LoRA weights to perform dual-domain distillation learning of the body area and head area on the character modeling model to improve the quality of distillation learning, thereby improving the personalized effect of the three-dimensional modeling results.
[0137] In one embodiment, the data acquisition module 210 may include:
[0138] The video frame extraction submodule is used to extract frames from the character video to obtain a character image, and to perform character masking on the character image to obtain a body area.
[0139] The image processing submodule is used to replace the background of the character image based on the body area to obtain the body image, and to perform face detection on the body image and crop it according to the detection result to obtain the head image.
[0140] The image combination submodule is used to combine the body image and the head image to obtain a target color image.
[0141] In one embodiment, the data acquisition module 210 may further include:
[0142] The model determination submodule is used to determine the target image description model.
[0143] The model description submodule is used to input the target color image into the target image description model to obtain the three-dimensional description text output by the target image description model.
[0144] In one embodiment, the data acquisition module 210 may further include:
[0145] The loss gradient calculation submodule is used to input the body image into the initial LoRA model, obtain the predicted value output by the initial LoRA model, and determine the loss gradient of the initial LoRA model according to the predicted value.
[0146] The conditional judgment submodule is used to determine whether the loss gradient meets the preset training end condition.
[0147] The weight acquisition submodule is used to read the LoRA weight of the initial LoRA model as the body LoRA weight of the body image when the loss gradient meets the preset training end condition.
[0148] The weight update submodule is used to update the LoRA weights of the initial LoRA model based on the loss gradient when the loss gradient satisfies the preset training end condition, and return to execute the input of the body image into the initial LoRA model to obtain the predicted value output by the initial LoRA model and its subsequent steps.
[0149] In one embodiment, the model optimization module 220 may include:
[0150] The sample generation submodule is used to obtain a sample character model, render the sample character model, generate a sample color image, a sample depth image and a sample normal image, and determine the three-dimensional description text corresponding to each image.
[0151] The starting point model training submodule is used to iteratively train a preset diffusion model using sample color images and three-dimensional description texts corresponding to the sample color images to generate a color starting point model.
[0152] The endpoint model training submodule is used to iteratively train the color starting point model using the sample depth image and the three-dimensional description text corresponding to the sample depth image to generate a depth endpoint model, and to iteratively train the color starting point model using the sample normal image and the three-dimensional description text corresponding to the sample normal image to generate a normal endpoint model.
[0153] The model alignment submodule is used to align the color starting point model, the depth end point model and the normal end point model at the network layer to generate an initial three-dimensional mapping model.
[0154] In one embodiment, the model optimization module 220 may further include:
[0155] The weight determination submodule is used to determine the depth mapping weight and the normal mapping weight of the initial three-dimensional mapping model.
[0156] The weight superposition submodule is used to load the body LoRA weight and the head LoRA weight into the initial three-dimensional mapping model to superimpose them with the depth mapping weight and the normal mapping weight to generate a target three-dimensional mapping model.
[0157] In one embodiment, the character modeling module 240 may include:
[0158] The image rendering submodule is used to use the image rendering layer to render the character video and generate a standard color image, a standard normal image and a standard depth image.
[0159] The first distillation submodule is used to input the target normal image, the target depth image, the standard normal image and the standard depth image into the structure distillation layer, so that the structure distillation layer performs dual-domain distillation learning with the goal of making the standard normal image approach the target normal image and the standard depth image approach the target depth image, and generates geometric structure features after distillation learning.
[0160] The second distillation submodule is used to input the target color image and the standard color image into the map distillation layer, so that the map distillation layer performs dual-domain distillation learning with the standard color image approaching the target color image, and generates color map features after distillation learning.
[0161] The 3D modeling submodule is used to perform 3D modeling of characters on geometric structure features and color map features through the character modeling layer, and output the 3D modeling results of the character video.
[0162] In one embodiment, the present application further provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the three-dimensional character modeling method as described in any of the above embodiments.
[0163] In one embodiment, the present application also provides a computer device having computer-readable instructions stored therein. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the three-dimensional character modeling method as described in any one of the above embodiments.
[0164] Indicatively, Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 5 The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301 for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the three-dimensional character modeling method of any of the above embodiments.
[0165] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0166] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0167] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0168] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0169] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A three-dimensional character modeling method, characterized in that: The method comprises: After receiving a character video input by a target user, a target color image including a body image and a head image is generated according to the character video, and a three-dimensional description text of the target color image is generated, and a body LoRA weight of the body image and a head LoRA weight of the head image are determined by a preset initial LoRA model; wherein the three-dimensional description text represents a text description converted from the character features in the image; Determine an initial three-dimensional mapping model, and use the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model; Inputting the three-dimensional description text into the target three-dimensional mapping model to obtain a target normal image and a target depth image output by the target three-dimensional mapping model; Using the target color image, the target normal image and the target depth image to perform dual-domain distillation learning on a preset character modeling model, to obtain a three-dimensional modeling result of the character video output by the character modeling model; The step of generating a three-dimensional description text of the target color image includes: Determine a target image description model; the target image description model is obtained by training a preset initial image description model using a sample color image as a training sample and a real description text corresponding to the sample color image as a sample label, and using a target loss function, wherein the target loss function is a combination of feature loss functions corresponding to a body image and a head image in the sample color image; Inputting the target color image into the target image description model to obtain a three-dimensional description text output by the target image description model; The character modeling model includes an image rendering layer, a structure distillation layer, a texture distillation layer and a character modeling layer; the target color image, the target normal image and the target depth image are used to perform dual-domain distillation learning on the preset character modeling model to obtain a three-dimensional modeling result of the character video output by the character modeling model, including: Performing image rendering on the character video using the image rendering layer to generate a standard color image, a standard normal image, and a standard depth image; Inputting the target normal image, the target depth image, the standard normal image and the standard depth image into the structure distillation layer, so that the structure distillation layer performs dual-domain distillation learning with the goal of making the standard normal image approach the target normal image and the standard depth image approach the target depth image, and generates geometric structure features after distillation learning; Inputting the target color image and the standard color image into the map distillation layer, so that the map distillation layer performs dual-domain distillation learning with the standard color image approaching the target color image, and generates color map features after distillation learning; The character modeling layer performs three-dimensional character modeling on the geometric structure features and the color map features, and outputs a three-dimensional modeling result of the character video.
2. The three-dimensional character modeling method according to claim 1, characterized in that: The step of generating a target color image including a body image and a head image according to the character video comprises: Performing frame extraction processing on the person video to obtain a person image, and performing person masking on the person image to obtain a body region; Performing background replacement on the person image based on the body region to obtain a body image, and performing face detection on the body image, and cropping the body image according to the detection result to obtain a head image; The body image and the head image are combined to obtain a target color image.
3. The three-dimensional character modeling method according to claim 1, characterized in that: The process of determining the body LoRA weight is consistent with the process of determining the head LoRA weight; wherein, determining the body LoRA weight of the body image by using a preset initial LoRA model includes: Inputting the body image into an initial LoRA model to obtain a predicted value output by the initial LoRA model, and determining a loss gradient of the initial LoRA model according to the predicted value; Determine whether the loss gradient meets the preset training end condition; If yes, reading the LoRA weight of the initial LoRA model as the body LoRA weight of the body image; If not, the LoRA weight of the initial LoRA model is updated based on the loss gradient, and the step of inputting the body image into the initial LoRA model is returned to obtain the predicted value output by the initial LoRA model and subsequent steps thereof.
4. The three-dimensional character modeling method according to claim 1, characterized in that: The determining of the initial three-dimensional mapping model comprises: Acquire a sample character model, render the sample character model, generate a sample color image, a sample depth image and a sample normal image, and determine a three-dimensional description text corresponding to each image; Iteratively training a preset diffusion model using the sample color image and the three-dimensional description text corresponding to the sample color image to generate a color starting point model; Iteratively training the color starting point model using the sample depth image and the three-dimensional description text corresponding to the sample depth image to generate a depth endpoint model, and iteratively training the color starting point model using the sample normal line image and the three-dimensional description text corresponding to the sample normal line image to generate a normal endpoint model; The color starting point model, the depth end point model and the normal end point model are aligned in network layers to generate an initial three-dimensional mapping model.
5. The three-dimensional character modeling method according to claim 4, characterized in that: The step of optimizing the weight of the initial three-dimensional mapping model by using the body LoRA weight and the head LoRA weight to obtain a target three-dimensional mapping model includes: Determine the depth mapping weight and normal mapping weight of the initial three-dimensional mapping model; wherein the depth mapping weight is the difference between the color starting weight of the color starting model and the depth end point weight of the depth end point model, and the normal mapping weight is the difference between the color starting weight of the color starting model and the normal end point weight of the normal end point model; The body LoRA weight and the head LoRA weight are loaded into the initial three-dimensional mapping model to be superimposed with the depth mapping weight and the normal mapping weight to generate a target three-dimensional mapping model.
6. A three-dimensional character modeling device, characterized in that: include: A data acquisition module, configured to generate a target color image including a body image and a head image according to the character video after receiving the character video input by the target user, and generate a three-dimensional description text of the target color image, and determine the body LoRA weight of the body image and the head LoRA weight of the head image through a preset initial LoRA model; wherein the three-dimensional description text represents a text description obtained by converting the character features in the image; A model optimization module, used to determine an initial three-dimensional mapping model, and use the body LoRA weight and the head LoRA weight to perform weight optimization on the initial three-dimensional mapping model to obtain a target three-dimensional mapping model; A model rendering module, used for inputting the three-dimensional description text into the target three-dimensional mapping model to obtain a target normal image and a target depth image output by the target three-dimensional mapping model; A character modeling module, configured to perform dual-domain distillation learning on a preset character modeling model using the target color image, the target normal image, and the target depth image, to obtain a three-dimensional modeling result of the target color image output by the character modeling model; Wherein, the data acquisition module includes: Determine a target image description model; the target image description model is obtained by training a preset initial image description model using a sample color image as a training sample and a real description text corresponding to the sample color image as a sample label, and using a target loss function, wherein the target loss function is a combination of feature loss functions corresponding to a body image and a head image in the sample color image; Inputting the target color image into the target image description model to obtain a three-dimensional description text output by the target image description model; The character modeling model includes an image rendering layer, a structure distillation layer, a texture distillation layer and a character modeling layer; the character modeling module includes: Performing image rendering on the character video using the image rendering layer to generate a standard color image, a standard normal image, and a standard depth image; Inputting the target normal image, the target depth image, the standard normal image and the standard depth image into the structure distillation layer, so that the structure distillation layer performs dual-domain distillation learning with the goal of making the standard normal image approach the target normal image and the standard depth image approach the target depth image, and generates geometric structure features after distillation learning; Inputting the target color image and the standard color image into the map distillation layer, so that the map distillation layer performs dual-domain distillation learning with the standard color image approaching the target color image, and generates color map features after distillation learning; The character modeling layer performs three-dimensional character modeling on the geometric structure features and the color map features, and outputs a three-dimensional modeling result of the character video.
7. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the three-dimensional character modeling method as described in any one of claims 1 to 5.
8. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the three-dimensional character modeling method according to any one of claims 1 to 5 are performed.
Citation Information
Patent Citations
Three-dimensional image surface detail simulation method and system
CN104463954A
Three-dimensional digital human generation method and device, electronic equipment, storage medium and program product
CN118115642A
