Customized cartoon character modeling method, device, storage medium and computer equipment
By receiving videos to generate LoRA models and merging feature value optimization parameters, it solves the high cost and complex process problems of customized 3D cartoon character modeling, and achieves efficient and automated cartoon character modeling.
Patent Information
- Application Number
- CN202411096104.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-12
AI Technical Summary
The high production cost and complex production process of customized cartoon character 3D modeling have limited its development. The existing technology requires manual customization by designers, resulting in low production efficiency and high cost.
By receiving user input video, a character LoRA model is generated, embedded in the initial image rendering model, a three-dimensional character model is constructed, and parameters are optimized using fusion feature values to achieve automated cartoon character modeling.
It reduces production costs, improves production efficiency, achieves high-quality cartoon character modeling results, and reduces reliance on manual customization.
Smart Images

Figure CN118628670B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of character modeling technology, and in particular to a customized cartoon character modeling method, device, storage medium and computer equipment. Background Art
[0002] In the current context of the booming digital creative industry, customized cartoon character 3D modeling technology is gradually becoming an indispensable part of many key fields, and the demand in the market is becoming increasingly prominent. For example, the game entertainment industry and the action figure model industry need to promote the innovation and development of the entire industry through highly personalized customization services.
[0003] However, although the customized cartoon character 3D modeling technology has a broad market prospect, its high production cost and complicated production process have become bottlenecks restricting its development. At present, most customized cartoon character modeling requires designers to manually customize the corresponding character image, which not only limits production efficiency but also increases production costs. Summary of the invention
[0004] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the customized cartoon character modeling in the prior art mostly requires designers to manually customize the corresponding character image, which not only limits the production efficiency but also increases the production cost.
[0005] The present application provides a customized cartoon character modeling method, the method comprising:
[0006] When receiving a person video containing a target person input by a user, generating a person image of the target person according to the person video, and generating a person LoRA model based on the person image;
[0007] Determine an initial image rendering model, and embed the character LoRA model into the initial image rendering model to form a target image rendering model; wherein the initial image rendering model is obtained by embedding a normal LoRA model for extracting character surface texture features and a cartoon style LoRA model for generating character cartoon style features into a preset image rendering model;
[0008] Constructing a three-dimensional character model of the target character according to the character video, and rendering based on the three-dimensional character model to obtain a rendered character image of the target character;
[0009] The rendered character image is input into the target image rendering model to obtain a fusion feature value output by the target image rendering model, and parameters of the three-dimensional character model are optimized based on the fusion feature value to generate a cartoon character modeling result of the target character.
[0010] Optionally, generating a character LoRA model based on the character image includes:
[0011] Constructing an initial LoRA model, and embedding the initial LoRA model into a preset diffusion model to form a target diffusion model;
[0012] Inputting the person image into the target diffusion model to obtain a predicted value output by the target diffusion model, and determining a loss gradient of the target diffusion model according to the predicted value;
[0013] Determine whether the loss gradient meets the preset training end condition;
[0014] If yes, extract the initial LoRA model in the target diffusion model as the character LoRA model;
[0015] If not, the LoRA weights of the initial LoRA model are updated based on the loss gradient, and the step of inputting the character image into the target diffusion model is returned to obtain the predicted value output by the target diffusion model and its subsequent steps.
[0016] Optionally, determining the initial image rendering model includes:
[0017] Constructing an initial LoRA model, and embedding the initial LoRA model into a preset diffusion model to form a target diffusion model;
[0018] Based on the target diffusion model, the initial LoRA model is weighted to generate a normal LoRA model and a cartoon-style LoRA model respectively;
[0019] A preset image rendering model is obtained, and the normal LoRA model and the cartoon style LoRA model are embedded in the preset image rendering model to obtain an initial image rendering model.
[0020] Optionally, the weight adjustment of the initial LoRA model based on the target diffusion model to generate a normal LoRA model and a cartoon-style LoRA model respectively includes:
[0021] Acquire a sample character model, render the sample character model, generate a sample normal image, and acquire a sample cartoon image obtained by combining multiple cartoon-style images;
[0022] Iteratively training the target diffusion model using the sample normal image, and extracting an initial LoRA model in the trained target diffusion model as a normal LoRA model;
[0023] The target diffusion model is iteratively trained using the sample cartoon image, and an initial LoRA model in the trained target diffusion model is extracted as a cartoon-style LoRA model.
[0024] Optionally, constructing the three-dimensional character model of the target character according to the character video includes:
[0025] Determine initial model parameters based on the character video, and use the SMPL algorithm to grid the initial model parameters to generate a three-dimensional character grid;
[0026] The three-dimensional character mesh is embedded into the DMTet model so as to initialize the DMTet model and form a three-dimensional character model of the target character.
[0027] Optionally, the rendering based on the three-dimensional character model to obtain a rendered character image of the target character includes:
[0028] Determining surface vertex information of the three-dimensional character model;
[0029] The surface vertex information is subjected to differentiable rendering to generate a rendered character image of the three-dimensional character model; the rendered character image comprises a character normal image, a sparse posture image and a dense posture image.
[0030] Optionally, the target image rendering model includes a normal control layer, a sparse attitude control layer, a dense attitude control layer and a feature fusion layer;
[0031] The step of inputting the rendered character image into the target image rendering model to obtain a fusion feature value output by the target image rendering model includes:
[0032] Inputting the rendered character image into the normal control layer, the sparse posture control layer and the dense posture control layer respectively, obtaining geometric features output by the normal control layer, skeletal features output by the sparse posture control layer and posture features output by the dense posture control layer;
[0033] The feature fusion layer is used to perform feature fusion on the geometric features, the skeleton features and the posture features to obtain fused feature values.
[0034] Optionally, the performing parameter optimization on the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character includes:
[0035] Determining a loss parameter of the fused feature value, and judging whether the three-dimensional character model reaches a convergence condition based on the loss parameter;
[0036] If yes, reconstructing the three-dimensional character model to generate a cartoon character modeling result of the target character;
[0037] If not, update the parameters of the three-dimensional character model according to the loss parameter, and return to execute the rendering based on the three-dimensional character model to obtain the rendered character image of the target character and subsequent steps.
[0038] The present application also provides a customized cartoon character modeling device, comprising:
[0039] A data acquisition module, for generating a character image of the target person according to the character video when receiving a character video containing a target person input by a user, and generating a character LoRA model based on the character image;
[0040] A model determination module, used to determine an initial image rendering model, and embed the character LoRA model into the initial image rendering model to form a target image rendering model; wherein the initial image rendering model is obtained by embedding a normal LoRA model for extracting character surface texture features and a cartoon style LoRA model for generating character cartoon style features into a preset image rendering model;
[0041] An image rendering module, used for constructing a three-dimensional character model of the target character according to the character video, and rendering a rendered character image of the target character based on the three-dimensional character model;
[0042] The character modeling module is used to input the rendered character image into the target image rendering model, obtain the fusion feature value output by the target image rendering model, and optimize the parameters of the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character.
[0043] 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 customized cartoon character modeling method as described in any of the above embodiments.
[0044] The present application also provides a computer device, comprising: one or more processors, and a memory;
[0045] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the customized cartoon character modeling method described in any one of the above embodiments are performed.
[0046] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0047] The customized cartoon character modeling method, device, storage medium and computer equipment provided by the present application, when receiving a character video containing a target character input by a user, can generate a character image of the target character according to the character video, and then generate a character LoRA model based on the character image to learn the image characteristics of the target character; then the initial image rendering model obtained after pre-embedding the normal LoRA model and the cartoon style LoRA model can be further embedded in the character LoRA model to obtain the target image rendering model. Among them, the normal LoRA model can be used to extract the surface texture characteristics of the target character, and the cartoon style LoRA model can be used to generate the character cartoon style characteristics. Therefore, after the present application constructs a three-dimensional character model of the target character according to the character video, and obtains the rendered character image of the target character based on the three-dimensional character model rendering, the rendered character image can be input into the target image rendering model, so that the target image rendering model can extract the image characteristics, surface texture characteristics and cartoon style characteristics of the target character respectively, and then output to obtain the fusion feature value, and finally the three-dimensional character model can be optimized based on the fusion feature value to generate the cartoon character modeling result of the target character, so as to realize the customized cartoon character modeling while reducing the production cost and improving the production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] 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.
[0049] Figure 1 A schematic diagram of a process of a customized cartoon character modeling method provided in an embodiment of the present application;
[0050] Figure 2 A schematic diagram of a process for generating a character LoRA model provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a process for determining an initial image rendering model provided in an embodiment of the present application;
[0052] Figure 4 A structural schematic diagram of a customized cartoon character modeling device provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] 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.
[0055] Although customized cartoon character 3D modeling technology has a broad market prospect, its high production cost and complex production process have become bottlenecks restricting its development. At present, most customized cartoon character modeling requires designers to manually customize the corresponding character image, which not only limits production efficiency but also increases production costs.
[0056] Based on this, this application proposes the following technical solutions, see below for details:
[0057] In one embodiment, Figure 1 As shown, Figure 1 A flowchart of a customized cartoon character modeling method provided in an embodiment of the present application; the present application provides a customized cartoon character modeling method, which may specifically include the following:
[0058] S110: When a person video containing a target person input by a user is received, a person image of the target person is generated according to the person video, and a person LoRA model is generated based on the person image.
[0059] In this embodiment, when the user needs to perform cartoon-like three-dimensional modeling on the image of a target person, the image of the target person can be input into a computer device in the form of a video. After receiving the character video containing the target person, the computer device can extract the character image of the target person from the character video, and then use the character image to train a character LoRA model corresponding to the target person. In this way, the character LoRA model can learn the customized character image characteristics of the target person.
[0060] It is understandable that the character video here can be obtained by shooting all around the target person, and during the shooting process, the target person can present different postures and movements, so that the movements of the target person in the character video obtained are continuous and natural, so that the character image of the target person extracted from the character video can cover all angles of the target person. Of course, the higher the quality of the character video input by the user, the more accurate the customized image feature expression of the extracted character image. Therefore, the character LoRA model generated by the character image can capture more image features of the character details, and then the subsequent modeling can obtain a more refined cartoon character model.
[0061] In addition, the character LoRA model of this application can provide the ability to understand and express the image characteristics of the character image in the process of customized cartoon character modeling. LoRA refers to a model fine-tuning technology that aims to achieve rapid adaptation and customization of the model by modifying some parameters of the model. Therefore, this application can improve the understanding and expression of the personalized image characteristics of the target character in the character video by the subsequent modeling model based on the character LoRA model.
[0062] Specifically, since the character video contains the full range of postures and movements of the target person, the computer device can extract frames of the character video at a preset time interval after receiving the character video input by the user, thereby obtaining character images with multiple different angles. After extracting the character image of the target person, the computer device can first remove the image with a low resolution or an incomplete display of the target person, and then perform a preprocessing operation on the removed character image, which includes but is not limited to normalization, sharpening, denoising, etc.
[0063] 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.
[0064] S120: Determine an initial image rendering model, and embed the character LoRA model into the initial image rendering model to form a target image rendering model.
[0065] In this embodiment, after generating the character LoRA model through step S110, the computer device can first determine the initial image rendering model, and then embed the character LoRA model into the initial image rendering model, so that the embedded target image rendering model can integrate the customized image features of the target character, thereby making the customized features of the cartoon image more prominent in the results obtained by subsequent modeling.
[0066] It can be understood that the initial image rendering model is obtained by embedding the normal LoRA model and the cartoon style LoRA model in the preset image rendering model; wherein the preset image rendering model refers to a model that extracts features from images rendered in multiple dimensions and then outputs them as fused feature values, while the normal LoRA model can be used to understand and express the surface texture features of the target person, and the cartoon style LoRA model can be used to understand and express the target person's character cartoon style features. Therefore, after inputting the relevant rendered image of the target person into the initial image rendering model, the present application can use the fused feature values output by the initial image rendering model to move closer to the target person's surface texture features and character cartoon style features more quickly and accurately.
[0067] Furthermore, since the character LoRA model has pre-learned the image features of the target character, after the present application embeds the character LoRA model in the initial image rendering model, the target image rendering model obtained can pre-learn the image features of the target character, and then can extract the surface texture features of the target character and the cartoon style features of the cartoonized character based on the image features, thereby realizing the feature extraction of customized cartoon characters and laying the foundation for subsequent cartoon character modeling.
[0068] S130: constructing a three-dimensional character model of the target character according to the character video, and rendering the three-dimensional character model to obtain a rendered character image of the target character.
[0069] In this embodiment, while obtaining the target image rendering model through step S120, the computer device can also construct a three-dimensional character model of the target character based on the character video as the initial image of the target character, and then can render the target character based on the three-dimensional character model to obtain a rendered character image, thereby converting the three-dimensional character model into an image expression in multiple dimensions to improve the comprehensiveness of the subsequent model's understanding of the character features in the image.
[0070] It is understandable that in order to improve the efficiency of cartoon character modeling and the model convergence effect, the present application can first construct a three-dimensional character model of the target character based on the relevant parameters of the target character in the character video. Since the three-dimensional character model constructed at this time is relatively rough and does not have the customized detail features of the target character, the present application can render a rendered character image of the three-dimensional character model from multiple dimensions, so that the computer device can calculate its loss value through the rendered character image, and then optimize the parameters of the three-dimensional character model based on the loss value to obtain a high-quality three-dimensional character model.
[0071] Among them, the rendered character image may include rendered images of multiple dimensions, such as normal images, depth images, posture images, and edge images. In detail, the normal image can be used to increase character details and surface features, the depth image can calculate the distance from the camera perspective to the character surface, the posture image can capture the character's movements and skeleton results, and the edge image can enhance the contour and edge information of the character surface. Here, the present application can render rendered images of different dimensions according to the specific needs of customized cartoon character modeling, without specific limitation.
[0072] S140: Inputting the rendered character image into the target image rendering model, obtaining the fusion feature value output by the target image rendering model, and optimizing the parameters of the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character.
[0073] In this embodiment, after the rendered character image of the three-dimensional character model is obtained by rendering in step S130, the computer device can input the rendered character image into the target image rendering model to obtain the fusion feature value output by the target image rendering model, and then optimize the parameters of the three-dimensional character model based on the fusion feature value to improve the customized detail features and fineness of the cartoon character modeling results, and generate a cartoon character modeling result of the target character. Therefore, the present application can convert the process of manual customization service in the prior art into automated parameter optimization, thereby improving production efficiency while ensuring the quality of the cartoon character modeling results.
[0074] It is understandable that, since the target image rendering model is embedded with the character LoRA model, the normal LoRA model and the cartoon style LoRA model, the target image rendering model can pre-learn the cartoonized character features of the target character through these LoRA models. Based on this, after the computer device inputs the rendered character image into the target image rendering model, the target image rendering model can first extract the fusion feature value of the rendered character image, and then optimize the parameters of the three-dimensional character model with the fusion feature value approaching the cartoonized character detail features of the target character, until the model converges and generates the cartoon character modeling result of the target character based on the three-dimensional character model with optimized parameters.
[0075] In the above embodiment, when a character video containing a target character input by a user is received, a character image of the target character can be generated based on the character video, and then a character LoRA model can be generated based on the character image to learn the image features of the target character; then the initial image rendering model obtained after pre-embedding the normal LoRA model and the cartoon style LoRA model can be further embedded in the character LoRA model to obtain a target image rendering model. Among them, the normal LoRA model can be used to extract the surface texture features of the target character, and the cartoon style LoRA model can be used to generate the character cartoon style features. Therefore, after the present application constructs a three-dimensional character model of the target character according to the character video, and obtains the rendered character image of the target character based on the three-dimensional character model rendering, the rendered character image can be input into the target image rendering model, so that the target image rendering model can extract the image features, surface texture features and cartoon style features of the target character respectively, and then output to obtain a fusion feature value, and finally the three-dimensional character model can be optimized based on the fusion feature value to generate a cartoon character modeling result of the target character, so as to realize customized cartoon character modeling while reducing production costs and improving production efficiency.
[0076] In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of a process for generating a character LoRA model provided in an embodiment of the present application; Figure 2 In step S110, generating a character LoRA model based on the character image may include:
[0077] S111: construct an initial LoRA model, and embed the initial LoRA model into a preset diffusion model to form a target diffusion model.
[0078] S112: Inputting the person image into the target diffusion model, obtaining a predicted value output by the target diffusion model, and determining a loss gradient of the target diffusion model according to the predicted value.
[0079] S113: Determine whether the loss gradient meets the preset training end condition.
[0080] S114: If yes, extract the initial LoRA model in the target diffusion model as the character LoRA model.
[0081] S115: If not, the LoRA weights of the initial LoRA model are updated based on the loss gradient, and the process returns to input the person image into the target diffusion model to obtain the predicted value output by the target diffusion model and its subsequent steps.
[0082] In this embodiment, when generating a character LoRA model, the computer device can first construct an initial LoRA model and embed the initial LoRA model into a preset diffusion model to form a target diffusion model. Then, the character image can be input into the target diffusion model to obtain a predicted value output by the target diffusion model. Then, the loss gradient of the target diffusion model can be determined based on the predicted value, and it can be determined whether the loss gradient meets the preset training end condition, so as to confirm whether the character LoRA model is trained based on the judgment result, thereby ensuring that the character LoRA model can capture more detailed image features of the target character.
[0083] It is understandable that the preset 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 use the preset diffusion model as a pre-training model of the character LoRA model, so that the trained character LoRA model can have the ability to explain and express the details of the image characteristics of the target person.
[0084] Specifically, the computer device can select a preset diffusion model that has been trained with a large-scale data set, such as ResNet, Transformer, etc., and then replace a subset in the preset diffusion model with the initial LoRA model to form a target diffusion model. The initial LoRA model here can increase the flexibility of the model by low-rank decomposition to adapt to personalized image data. To expand on this, the initial LoRA model can be composed of two low-rank rectangles A and B, and the weights of the pre-trained model are adjusted in the form of W+ΔW, where ΔW=A·B; therefore, the computer device can fix the weights of the target diffusion model and optimize the weights of the initial LoRA model during the training process, so that the initial LoRA model can learn the image characteristics of the target person during the iterative training process.
[0085] More specifically, in the process of optimizing the initial LoRA model, the computer device can use the image of the target person as a training set, and then input the image of the training set into the target diffusion model to obtain the test value output by the target diffusion model, and then the test value and the target value can be used for loss calculation, and the loss gradient can be calculated by the back propagation algorithm. If the loss gradient meets the preset training end condition, the computer device can extract the initial LoRA model in the target diffusion model as the character LoRA model; if the loss gradient does not meet the preset training end condition, the computer device can update the weight of the initial LoRA model in the target diffusion model based on the loss gradient, and recalculate the loss gradient of the target diffusion model after the weight update until the loss gradient reaches the preset training end condition. Among them, the preset training end condition here can refer to the loss gradient reaching the preset standard, or it can be that the model reaches the preset number of iterations, which is not limited here.
[0086] In one embodiment, Figure 3 As shown, Figure 3 A schematic diagram of a process for determining an initial image rendering model provided in an embodiment of the present application; Figure 3 In step S120, determining the initial image rendering model may include:
[0087] S121: construct an initial LoRA model, and embed the initial LoRA model into a preset diffusion model to form a target diffusion model.
[0088] S122: Adjust the weight of the initial LoRA model based on the target diffusion model to generate a normal LoRA model and a cartoon-style LoRA model respectively.
[0089] S123: Obtain a preset image rendering model, and embed the normal LoRA model and the cartoon style LoRA model into the preset image rendering model to obtain an initial image rendering model.
[0090] In this embodiment, when determining the initial image rendering model, the computer device may first construct an initial LoRA model, and embed the initial LoRA model into a preset diffusion model to form a target diffusion model, so that the initial LoRA model can be weighted based on the target diffusion model to generate a normal LoRA model for extracting surface texture features of the character and a cartoon style LoRA model for generating cartoon style features of the character. Finally, the computer device may obtain a preset image rendering model, and embed the normal LoRA model and the cartoon style LoRA model into the preset image rendering model to obtain an initial image rendering model, so that the initial image rendering model can read the surface texture features and cartoon style features of the target character in the subsequent feature extraction process.
[0091] It is understandable that the preset image rendering model of the present application is a pre-trained model that has been trained using large-scale data and has good image feature extraction capabilities. However, although the preset image rendering 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 customized image features, and also lacks the ability to cartoonize characters. Therefore, the present application can embed the trained normal LoRA model and cartoon-style LoRA model into the preset image rendering model for performance optimization to improve the model's ability to understand the features of the relevant data of the character image and the accuracy of feature extraction.
[0092] Furthermore, the computer device can also store the embedded initial image rendering model, so that when customized cartoon character modeling of the target character is needed in the future, the pre-stored initial image rendering model can be directly called to embed the character LoRA model corresponding to the target character into the initial image rendering model as the basic model for cartoon character modeling, thereby improving the production efficiency of customized cartoon character modeling.
[0093] In one embodiment, in step S122, weight adjustment is performed on the initial LoRA model based on the target diffusion model to generate a normal LoRA model and a cartoon-style LoRA model respectively, which may include:
[0094] S1221: Obtain a sample character model, render the sample character model, generate a sample normal image, and obtain a sample cartoon image obtained by combining multiple cartoon-style images.
[0095] S1222: Iteratively train the target diffusion model using the sample normal image, and extract the initial LoRA model in the trained target diffusion model as the normal LoRA model.
[0096] S1223: Iteratively train the target diffusion model using the sample cartoon image, and extract the initial LoRA model in the trained target diffusion model as the cartoon-style LoRA model.
[0097] In this embodiment, when training the normal LoRA model and the cartoon-style LoRA model, the computer device can first obtain a sample character model, render the sample character model, and generate a sample normal image as a training image set for the normal LoRA model; at the same time, a sample cartoon image obtained by combining multiple cartoon-style images can be obtained as a training image set for the cartoon-style LoRA model. In this way, the computer device iteratively trains the target diffusion model through these two training image sets, and extracts the initial LoRA model in the target diffusion model after the training is completed, so that a normal LoRA model that can be used to extract the surface texture features of the character and a cartoon-style LoRA model that can be used to generate the cartoon-style features of the character can be obtained. The normal LoRA model and the cartoon-style LoRA model here have universal performance, so the production efficiency of customized cartoon character modeling can be greatly improved.
[0098] Specifically, when obtaining a sample normal image, the computer device can first write a multi-vision rendering pipeline in the computer device, and then obtain multiple sample character models containing multiple postures, body shapes and actions from the 3D human data set, and perform multi-angle rendering on the sample character models through the rendering pipeline. During the rendering process, the computer device can calculate the normal direction of each pixel to encode it as a color value to generate a sample normal image. In addition, when obtaining a sample cartoon image, the computer device can collect a set of cartoon-style character images, which can come from different cartoon works or hand-drawn drawings, without limitation; then, the collected character images can be preprocessed to ensure their consistency in color, size and quality, wherein the preprocessing operations include but are not limited to adjusting the image size, denoising, and color adjustment; thereafter, the computer device can also convert the character images after the preprocessing operation into a consistent cartoon style to form a sample cartoon image.
[0099] It should be noted that the training process of the normal LoRA model and the cartoon style LoRA model in this application is consistent with the training process of the character LoRA model, which will not be repeated here.
[0100] In one embodiment, constructing a 3D character model of a target character according to the character video in step S130 may include:
[0101] S131: Determine initial model parameters based on the character video, and use the SMPL algorithm to construct a mesh for the initial model parameters to generate a three-dimensional character mesh.
[0102] S132: embedding the three-dimensional character mesh into the DMTet model to initialize the DMTet model and form a three-dimensional character model of the target character.
[0103] In this embodiment, when constructing a three-dimensional character model of the target person, the computer device can first confirm the initial model parameters based on the character video of the target person, and then use the SMPL algorithm to grid the initial model parameters to generate a three-dimensional character mesh. Then, the computer device can embed the three-dimensional character mesh into the DMTet model to initialize the DMTet model to form a three-dimensional character model of the target person.
[0104] Among them, the SMPL (Skinned Multi-Person Linear model) algorithm can be used in the SMPL model to describe the body shape and posture of the human body through pre-trained parameters based on linear shape and posture space. The DMTet (Differentiable Multi-Tetrahedral Element) model is a differentiable multi-resolution representation method based on tetrahedral meshes, which can directly convert input mesh or image data into a high-quality 3D model without any 3D data as prior knowledge. Therefore, this application can first use the SMPL algorithm to generate a three-dimensional character mesh for describing the body data of the target person, and then use the DMTet model to convert the three-dimensional character mesh into a three-dimensional character model.
[0105] Specifically, when constructing a three-dimensional character model of a target person, the computer device can first use a computer vision algorithm, such as OpenPose and DeepLabCut, to detect the target person in the character video to obtain the key feature points of the target person, and then form initial model parameters including the body parameters and posture parameters of the target person. The initial model parameters can then be input into the SMPL model to generate a three-dimensional character mesh using the SMPL algorithm in the SMPL model. Since the SMPL algorithm generates a three-dimensional character mesh as a triangular mesh, before embedding the three-dimensional character mesh into the DMTet model, an algorithm such as Delaunay triangulation can be used to convert the three-dimensional character mesh into a tetrahedral mesh, so that the data of the tetrahedral mesh obtained by the conversion can be embedded into the DMTet model to initialize the data structure of the vertices, edges and faces of the DMTet model, thereby forming a three-dimensional character model of the target person.
[0106] In one embodiment, obtaining a rendered character image of the target character based on the 3D character model in step S130 may include:
[0107] S133: Determine surface vertex information of the three-dimensional character model.
[0108] S134: Perform differentiable rendering on the surface vertex information to generate a rendered character image of the three-dimensional character model.
[0109] In this embodiment, after obtaining the three-dimensional character model of the target character, the computer device can also determine the surface vertex information of the three-dimensional character model, and then perform differentiable rendering on the surface vertex information to generate a rendered character image of the three-dimensional character model, so that the rendered character image can be used to optimize the parameters of the three-dimensional character model in the subsequent character modeling process, thereby ensuring the quality of the cartoon character modeling results.
[0110] It can be understood that the DMTet model uses a neural network to predict the SDF (Signed Distance Function) in three-dimensional space, that is, the distance from each point in the space to the surface of the model. Therefore, the three-dimensional character model initialized by the DMTet model is a spatial representation constructed by learning these distance information. Based on this, when a computer device generates a rendered character image of a three-dimensional character model, it can first use the MT (Marching Tetrahedra) algorithm to extract the model vertex information in each discrete subspace in the space to generate the surface vertex coordinates of the model, thereby realizing the visualization of the three-dimensional character model.
[0111] Specifically, after determining the surface vertex information of the three-dimensional character model, the computer device can perform differentiable rendering in multiple dimensions based on the surface vertex information, thereby obtaining a rendered character image of the three-dimensional character model. Differentiable rendering refers to a rendering method that combines computer graphics and deep learning technology. Its core feature is that the rendering process is differentiable, that is, the computer device can optimize the rendering parameters, such as geometric shape and camera position, by calculating the gradient of the rendered image, so as to improve the quality of the rendered character image.
[0112] Furthermore, the rendered character images of the present application may include character normal images, sparse posture images, and dense posture images. To elaborate, a character normal image refers to a map that describes the normal direction of the character surface. Here, the normal refers to a vector perpendicular to the character surface, which determines the sensitivity of the character under different lighting conditions, and thus provides rich details and textures for the character surface, making the cartoon modeling result more realistic; a sparse posture image refers to a character's posture represented by fewer key points. These key points can be used to describe the overall posture and movement of the character. In the present application, a sparse posture map can be used to prevent the three-dimensional character model from diverging in posture during parameter optimization; and a dense posture image refers to a more detailed posture representation method, which divides the human body surface into multiple regions and assigns a unique identifier to each region. These identifiers can be used to establish a correspondence between a two-dimensional image and a three-dimensional model. In the present application, a dense posture map can be used to provide more accurate posture information when the limbs of a three-dimensional character model overlap.
[0113] In one embodiment, the target image rendering model in step S140 includes a normal control layer, a sparse posture control layer, a dense posture control layer and a feature fusion layer; wherein, inputting the rendered character image into the target image rendering model to obtain the fusion feature value output by the target image rendering model may include:
[0114] S141: inputting the rendered character image into the normal control layer, the sparse posture control layer and the dense posture control layer respectively, obtaining the geometric features output by the normal control layer, the skeleton features output by the sparse posture control layer and the posture features output by the dense posture control layer;
[0115] S142: Using the feature fusion layer to fuse the geometric features, skeleton features and posture features to obtain fused feature values.
[0116] In this embodiment, the target image rendering model may include a normal control layer, a sparse attitude control layer, a dense attitude control layer, and a feature fusion layer. When extracting the fusion feature value of the rendered character image, the computer device may first input the rendered character image into the normal control layer, the sparse attitude control layer, and the dense attitude control layer, respectively, to obtain the geometric features output by the normal control layer, the bone features output by the sparse attitude control layer, and the attitude features output by the dense attitude control layer, and then use the feature fusion layer to perform feature fusion on the geometric features, the bone features, and the attitude features to obtain the fusion feature value, so as to describe the detailed features of the three-dimensional character model and provide an optimization direction for the parameters of the three-dimensional character model.
[0117] Specifically, when the computer device inputs the rendered character image into the normal control layer, the sparse pose control layer and the dense pose control layer respectively, it can select the corresponding rendered image from the rendered character image according to the different functions of each control layer and input it into the corresponding control layer. For example, the character normal image is input into the normal control layer, the sparse pose image is input into the sparse pose control layer, and the dense pose image is input into the dense pose control layer, so that the feature details extracted by each control layer are more stable, thereby improving the quality of the cartoon modeling results.
[0118] It can be understood that the normal control layer can control the geometric features of the generated image through the input character normal image, so that the obtained geometric features are more stable, thereby avoiding the appearance of unnatural geometric details in the cartoon character modeling results; the sparse posture control layer can control the bone features of the generated image through the input sparse posture image, so that the obtained bone features are more stable, thereby avoiding the appearance of unnatural or even deformed postures in the cartoon character modeling results; and the dense posture control layer can control the posture features of the generated image through the input dense posture image, so that the obtained posture features are more stable, thereby avoiding the appearance of wrong postures in the front, back, left, and right directions in the cartoon character modeling results, and at the same time can make the character's face clearer and the details more complete.
[0119] In one embodiment, in step S140, the parameters of the three-dimensional character model are optimized based on the fusion feature value to generate a cartoon character modeling result of the target character, which may include:
[0120] S143: Determine a loss parameter of the fused feature value, and judge whether the three-dimensional character model reaches a convergence condition based on the loss parameter.
[0121] S144: If yes, reconstruct the surface of the 3D character model to generate a cartoon character modeling result of the target character.
[0122] S145: If not, update the parameters of the 3D character model according to the loss parameters, and return to execute the rendering based on the 3D character model to obtain the rendered character image of the target character and subsequent steps.
[0123] In this embodiment, when the computer device obtains the fusion feature value of the three-dimensional character model, it can determine the loss parameter of the fusion feature value by back propagation, and judge whether the three-dimensional character model reaches the convergence condition based on the loss parameter. If the convergence condition is reached, the computer device can use the MT algorithm to perform surface reconstruction on the three-dimensional character model and generate a cartoon character modeling result of the target character, that is, convert the three-dimensional character model from a spatial representation to a visualization result. If the convergence condition is not reached, the computer device can update the parameters of the three-dimensional character model with loss parameters, and recalculate the loss parameters of the three-dimensional character model after the parameter update.
[0124] Specifically, in the process of determining the loss parameter of the fused feature value, the computer device may input the character normal image in the rendered character image into the variational autoencoder in the target image rendering model to encode it into a latent representation, and then add noise and denoise the latent representation, and embed the fused feature value into the latent representation during the denoising process, and then predict the output prediction noise, and then the computer device may use SDS (Score Distillation Sampling) as the objective function to optimize the parameters of the three-dimensional character model through back propagation. Among them, the loss function Parameters of 3D character model The partial derivative of is as follows:
[0125]
[0126] In the formula, Parameters representing the diffusion rule in the target image rendering model; The result of encoding the character normal image into latent representation and then adding noise; Respectively represent the character normal image, sparse posture image and dense posture image input by the three control layers; y represents the prompt word obtained by describing the target user in an image; t represents the diffusion step length, which can be randomly sampled within a certain range and is a hyperparameter of the model iteration process; Represents the character normal image obtained by rendering the 3D character model in posture c.
[0127] The customized cartoon character modeling device provided in the embodiment of the present application is described below. The customized cartoon character modeling device described below and the customized cartoon character modeling method described above can be referred to each other.
[0128] In one embodiment, Figure 4 As shown, Figure 4 A structural diagram of a customized cartoon character modeling device provided in an embodiment of the present application; the present application also provides a customized cartoon character modeling device, including a data acquisition module 210, a model determination module 220, an image rendering module 230 and a character modeling module 240, specifically including the following:
[0129] The data acquisition module 210 is used to generate a character image of the target person according to the character video when receiving a character video containing a target person input by a user, and to generate a character LoRA model based on the character image.
[0130] The model determination module 220 is used to determine the initial image rendering model and embed the character LoRA model into the initial image rendering model to form a target image rendering model; wherein the initial image rendering model is obtained by embedding a normal LoRA model for extracting character surface texture features and a cartoon style LoRA model for generating character cartoon style features into a preset image rendering model.
[0131] The image rendering module 230 is used to construct a three-dimensional character model of the target character according to the character video, and to render the three-dimensional character model to obtain a rendered character image of the target character.
[0132] The character modeling module 240 is used to input the rendered character image into the target image rendering model, obtain the fusion feature value output by the target image rendering model, and optimize the parameters of the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character.
[0133] In the above embodiment, when a character video containing a target character input by a user is received, a character image of the target character can be generated based on the character video, and then a character LoRA model can be generated based on the character image to learn the image features of the target character; then the initial image rendering model obtained after pre-embedding the normal LoRA model and the cartoon style LoRA model can be further embedded in the character LoRA model to obtain a target image rendering model. Among them, the normal LoRA model can be used to extract the surface texture features of the target character, and the cartoon style LoRA model can be used to generate the character cartoon style features. Therefore, after the present application constructs a three-dimensional character model of the target character according to the character video, and obtains the rendered character image of the target character based on the three-dimensional character model rendering, the rendered character image can be input into the target image rendering model, so that the target image rendering model can extract the image features, surface texture features and cartoon style features of the target character respectively, and then output to obtain a fusion feature value, and finally the three-dimensional character model can be optimized based on the fusion feature value to generate a cartoon character modeling result of the target character, so as to realize customized cartoon character modeling while reducing production costs and improving production efficiency.
[0134] In one embodiment, the data acquisition module 210 may include:
[0135] The model building submodule is used to build an initial LoRA model and embed the initial LoRA model into a preset diffusion model to form a target diffusion model.
[0136] The model prediction submodule is used to input the character image into the target diffusion model, obtain the predicted value output by the target diffusion model, and determine the loss gradient of the target diffusion model according to the predicted value.
[0137] The conditional judgment submodule is used to determine whether the loss gradient meets the preset training end condition.
[0138] The model extraction submodule is used to extract the initial LoRA model in the target diffusion model as the character LoRA model when the loss gradient meets the preset training end condition.
[0139] The model update submodule is used to update the LoRA weights of the initial LoRA model based on the loss gradient when the loss gradient does not meet the preset training end condition, and return to execute the input of the character image into the target diffusion model to obtain the predicted value output by the target diffusion model and its subsequent steps.
[0140] In one embodiment, the model determination module 220 may include:
[0141] The model building submodule is used to build an initial LoRA model and embed the initial LoRA model into a preset diffusion model to form a target diffusion model.
[0142] The weight adjustment submodule is used to adjust the weight of the initial LoRA model based on the target diffusion model to generate a normal LoRA model and a cartoon style LoRA model respectively.
[0143] The model embedding submodule is used to obtain a preset image rendering model, and embed the normal LoRA model and the cartoon style LoRA model into the preset image rendering model to obtain an initial image rendering model.
[0144] In one embodiment, the weight adjustment submodule may include:
[0145] The sample acquisition unit is used to acquire a sample character model, render the sample character model, generate a sample normal image, and acquire a sample cartoon image obtained by combining multiple cartoon-style images.
[0146] The first model training unit is used to iteratively train the target diffusion model using the sample normal image, and extract the initial LoRA model in the trained target diffusion model as the normal LoRA model.
[0147] The second model training unit is used to iteratively train the target diffusion model using the sample cartoon image, and extract the initial LoRA model in the trained target diffusion model as the cartoon style LoRA model.
[0148] In one embodiment, the image rendering module 230 may include:
[0149] The mesh generation submodule is used to determine the initial model parameters based on the character video, and use the SMPL algorithm to mesh the initial model parameters to generate a three-dimensional character mesh.
[0150] The model initialization submodule is used to embed the three-dimensional character mesh into the DMTet model so as to initialize the DMTet model and form a three-dimensional character model of the target character.
[0151] In one embodiment, the image rendering module 230 may further include:
[0152] The information determination submodule is used to determine the surface vertex information of the three-dimensional character model.
[0153] The image rendering submodule is used to perform differentiable rendering on the surface vertex information to generate a rendered character image of the three-dimensional character model.
[0154] In one embodiment, the character modeling module 240 may include:
[0155] The feature output submodule is used to input the rendered character image into the normal control layer, the sparse posture control layer and the dense posture control layer respectively, and obtain the geometric features output by the normal control layer, the bone features output by the sparse posture control layer and the posture features output by the dense posture control layer;
[0156] The feature fusion submodule is used to use the feature fusion layer to fuse geometric features, skeleton features and posture features to obtain fused feature values.
[0157] In one embodiment, the character modeling module 240 may further include:
[0158] The convergence judgment submodule is used to determine the loss parameter of the fusion feature value and judge whether the three-dimensional character model reaches the convergence condition based on the loss parameter.
[0159] The surface reconstruction submodule is used to perform surface reconstruction on the three-dimensional character model when the three-dimensional character model reaches the convergence condition, and generate a cartoon character modeling result of the target character.
[0160] The parameter updating submodule is used to update the parameters of the 3D character model according to the loss parameters when the 3D character model fails to meet the convergence conditions, and return to execute the rendering of the target character image based on the 3D character model and its subsequent steps.
[0161] In one embodiment, the present application also 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 customized cartoon character modeling method as described in any of the above embodiments.
[0162] 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 customized cartoon character modeling method as described in any one of the above embodiments.
[0163] 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 customized cartoon character modeling method of any of the above embodiments.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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 customized cartoon character modeling method, characterized in that: The method comprises: When receiving a person video containing a target person input by a user, generating a person image of the target person according to the person video, and generating a person LoRA model based on the person image; Determine an initial image rendering model, and embed the character LoRA model into the initial image rendering model to form a target image rendering model; wherein the initial image rendering model is obtained by embedding a normal LoRA model for extracting character surface texture features and a cartoon style LoRA model for generating character cartoon style features into a preset image rendering model; Constructing a three-dimensional character model of the target character according to the character video, and rendering based on the three-dimensional character model to obtain a rendered character image of the target character; Inputting the rendered character image into the target image rendering model to obtain a fusion feature value output by the target image rendering model, and optimizing parameters of the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character; Wherein, generating a character LoRA model based on the character image includes: Constructing an initial LoRA model, and embedding the initial LoRA model into a preset diffusion model to form a target diffusion model; Inputting the person image into the target diffusion model to obtain a predicted value output by the target diffusion model, and determining a loss gradient of the target diffusion model according to the predicted value; Determine whether the loss gradient meets the preset training end condition; If yes, extract the initial LoRA model in the target diffusion model as the character LoRA model; If not, the LoRA weight of the initial LoRA model is updated based on the loss gradient, and the step of inputting the character image into the target diffusion model to obtain the predicted value output by the target diffusion model and subsequent steps thereof is returned; The determining of the initial image rendering model comprises: Constructing an initial LoRA model, and embedding the initial LoRA model into a preset diffusion model to form a target diffusion model; Based on the target diffusion model, the initial LoRA model is weighted to generate a normal LoRA model and a cartoon-style LoRA model respectively; Obtain a preset image rendering model, and embed the normal LoRA model and the cartoon style LoRA model into the preset image rendering model to obtain an initial image rendering model; The target image rendering model includes a normal control layer, a sparse posture control layer, a dense posture control layer and a feature fusion layer; the step of inputting the rendered character image into the target image rendering model to obtain a fusion feature value output by the target image rendering model includes: Inputting the rendered character image into the normal control layer, the sparse posture control layer and the dense posture control layer respectively, obtaining geometric features output by the normal control layer, skeletal features output by the sparse posture control layer and posture features output by the dense posture control layer; The feature fusion layer is used to perform feature fusion on the geometric features, the skeleton features and the posture features to obtain fused feature values.
2. The customized cartoon character modeling method according to claim 1, characterized in that: The weight adjustment of the initial LoRA model based on the target diffusion model to generate a normal LoRA model and a cartoon-style LoRA model respectively includes: Acquire a sample character model, render the sample character model, generate a sample normal image, and acquire a sample cartoon image obtained by combining multiple cartoon-style images; Iteratively training the target diffusion model using the sample normal image, and extracting an initial LoRA model in the trained target diffusion model as a normal LoRA model; The target diffusion model is iteratively trained using the sample cartoon image, and an initial LoRA model in the trained target diffusion model is extracted as a cartoon-style LoRA model.
3. The customized cartoon character modeling method according to claim 1, characterized in that: The step of constructing the three-dimensional character model of the target character according to the character video includes: Determine initial model parameters based on the character video, and use the SMPL algorithm to grid the initial model parameters to generate a three-dimensional character grid; The three-dimensional character mesh is embedded into the DMTet model so as to initialize the DMTet model and form a three-dimensional character model of the target character.
4. The customized cartoon character modeling method according to claim 1, characterized in that: The step of obtaining a rendered character image of the target character based on the three-dimensional character model includes: Determining surface vertex information of the three-dimensional character model; The surface vertex information is subjected to differentiable rendering to generate a rendered character image of the three-dimensional character model; the rendered character image comprises a character normal image, a sparse posture image and a dense posture image.
5. The customized cartoon character modeling method according to claim 1, characterized in that: The step of optimizing parameters of the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character includes: Determining a loss parameter of the fused feature value, and judging whether the three-dimensional character model reaches a convergence condition based on the loss parameter; If yes, reconstructing the three-dimensional character model to generate a cartoon character modeling result of the target character; If not, update the parameters of the three-dimensional character model according to the loss parameter, and return to execute the rendering based on the three-dimensional character model to obtain the rendered character image of the target character and subsequent steps.
6. A customized cartoon character modeling device, characterized in that: include: A data acquisition module, for generating a character image of the target person according to the character video when receiving a character video containing a target person input by a user, and generating a character LoRA model based on the character image; A model determination module, used to determine an initial image rendering model, and embed the character LoRA model into the initial image rendering model to form a target image rendering model; wherein the initial image rendering model is obtained by embedding a normal LoRA model for extracting character surface texture features and a cartoon style LoRA model for generating character cartoon style features into a preset image rendering model; An image rendering module, used for constructing a three-dimensional character model of the target character according to the character video, and rendering a rendered character image of the target character based on the three-dimensional character model; A character modeling module, used for inputting the rendered character image into the target image rendering model, obtaining a fusion feature value output by the target image rendering model, and optimizing parameters of the three-dimensional character model based on the fusion feature value to generate a cartoon character modeling result of the target character; Wherein, the data acquisition module includes: Constructing an initial LoRA model, and embedding the initial LoRA model into a preset diffusion model to form a target diffusion model; Inputting the person image into the target diffusion model to obtain a predicted value output by the target diffusion model, and determining a loss gradient of the target diffusion model according to the predicted value; Determine whether the loss gradient meets the preset training end condition; If yes, extract the initial LoRA model in the target diffusion model as the character LoRA model; If not, the LoRA weight of the initial LoRA model is updated based on the loss gradient, and the step of inputting the character image into the target diffusion model to obtain the predicted value output by the target diffusion model and subsequent steps thereof is returned; The model determination module comprises: Constructing an initial LoRA model, and embedding the initial LoRA model into a preset diffusion model to form a target diffusion model; Based on the target diffusion model, the initial LoRA model is weighted to generate a normal LoRA model and a cartoon-style LoRA model respectively; Obtain a preset image rendering model, and embed the normal LoRA model and the cartoon style LoRA model into the preset image rendering model to obtain an initial image rendering model; The target image rendering model includes a normal control layer, a sparse posture control layer, a dense posture control layer and a feature fusion layer; the character modeling module includes: Inputting the rendered character image into the normal control layer, the sparse posture control layer and the dense posture control layer respectively, obtaining geometric features output by the normal control layer, skeletal features output by the sparse posture control layer and posture features output by the dense posture control layer; The feature fusion layer is used to perform feature fusion on the geometric features, the skeleton features and the posture features to obtain fused feature values.
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 customized cartoon 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 customized cartoon character modeling method as claimed in any one of claims 1 to 5 are performed.
Citation Information
Patent Citations
Three-dimensional virtual fitting method and system based on custom diffusion model
CN118096980A
Diffusion model-based portrait generation method, system and device, and storage medium
CN118247136A
