AI Model-Based Character Face Morphing Method, System, Electronic Device, and Storage Medium

Through the AI model-based character face-pinching method, the facial base image and reference data are obtained, the gender and feature data are analyzed, and the virtual image encoding is generated using the face-pinching inference module, which solves the problem of low efficiency of 2D characters' face-pinching and achieves the effect of efficiently generating diverse character appearances.

CN119863590BActive Publication Date: 2025-07-18HANGZHOU ELECTRONICS SOUL NETWORK TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510336929.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-21
Publication Date
2025-07-18
Estimated Expiration
2045-03-21

AI Technical Summary

Technical Problem

The existing 2D character face-pinching technology is inefficient and difficult to generate diverse character appearances, which increases development complexity and resource storage pressure.

Method used

The character face-pinching method based on the AI model is adopted. By obtaining the facial base image and reference data, analyzing gender and feature data, the face-pinching reasoning module is used to generate virtual image encoding, and the character face image is rendered based on the differentiable rendering method, and the dynamic call rules generate virtual image encoding to avoid hard-coded logical judgments.

Benefits of technology

It improves the efficiency of face-pinching, generates a diverse role appearance, reduces the complexity of development and resource requirements, and achieves the effect of "thousands of people and thousands of faces".

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863590B_ABST
    Figure CN119863590B_ABST
Patent Text Reader

Abstract

The present application relates to a character face sculpting method based on an AI model. The method includes: obtaining a human face base image and reference data, analyzing the reference data to obtain the character gender and character feature data; obtaining a face sculpting inference module corresponding to the character gender, generating a virtual image code based on the face sculpting inference module and the character feature data, and the face sculpting inference module contains combination rules of various human face features; redrawing the human face base image according to the virtual image code to obtain a character face image, and rendering the character face image based on the differentiable rendering method. Through the present application, the problem of low efficiency of the 2D character face sculpting method is solved. The face sculpting inference module dynamically calls rules to generate a virtual image code, without the need for hard-coded logical judgment, improving the face sculpting efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a character face sculpting method, system, electronic device, and storage medium based on an AI model. Background Art

[0002] Existing 2D character face sculpting technologies mainly rely on manual drawing and some basic image processing techniques. Traditional methods require a large number of texture maps to be drawn for each character, which is particularly time-consuming and laborious in games with a large number of NPCs. At the same time, due to relying on manual drawing, it is difficult to generate a sufficiently diverse range of character appearances, limiting the possibility of personalization. In game engines such as Unity, the storage of resources and the loading efficiency during runtime need to be considered, and manual drawing for character face sculpting increases the complexity of development.

[0003] Currently, there is no effective solution to the problem of low efficiency in 2D character face sculpting methods in related technologies. Summary of the Invention

[0004] Embodiments of this application provide a character face sculpting method, system, electronic device, and storage medium based on an AI model to at least solve the problem of low efficiency in 2D character face sculpting methods in related technologies.

[0005] In a first aspect, embodiments of this application provide a character face sculpting method based on an AI model, and the method includes:

[0006] Obtain a human face base image and reference data, and analyze the reference data to obtain the character gender and character feature data;

[0007] Obtain the face sculpting inference module corresponding to the character gender, and generate a virtual image code based on the face sculpting inference module and the character feature data. The face sculpting inference module contains combination rules for various human face features;

[0008] Redraw the human face base image according to the virtual image code to obtain a character face image, and render the character face image based on the differentiable rendering method.

[0009] In some embodiments, the reference data includes a reference image and keywords describing the character features, and the analyzing the reference data to obtain the character gender and character feature data includes:

[0010] Extract features from the reference image through a preset visual model;

[0011] Determine the identity features, facial feature features, facial contour features, expression features, and style features of the character according to the extraction result and the keywords;

[0012] Dynamically associate the identity feature, the facial feature, the facial contour feature, the expression feature, and the style feature through a cross-attention mechanism to obtain the character feature data.

[0013] In some embodiments, generating the virtual image encoding based on the face pinching inference module and the character feature data includes:

[0014] Encode the character feature data into a latent vector, and the face pinching inference module obtains an effective parameter combination based on a pre-constructed rule library and the latent vector;

[0015] Decode the effective parameter combination into a virtual image encoding recognizable by the game engine.

[0016] In some embodiments, the rule library includes:

[0017] Physical constraint rules for restricting the parameter space through a preset weight matrix;

[0018] Style coupling rules for dynamically activating or masking parameter dimensions through a style embedding vector;

[0019] User preference rules for increasing the weight of specific features for a specific user group based on collaborative filtering to learn historical data.

[0020] In some embodiments, the virtual image encoding includes macro-layer parameters, middle-layer parameters, and micro-layer parameters; redrawing the face base image according to the virtual image encoding to obtain the character face image includes:

[0021] Control the macro-layer parameters through a classification network, control the middle-layer parameters through a key point regression network, and control the micro-layer parameters through StyleMapGAN to redraw the face base image to obtain the character face image.

[0022] In some embodiments, the method further includes:

[0023] After rendering the character face image based on the differentiable rendering method, display the character face image through an interaction interface;

[0024] Adjust the face pinching parameters according to the received parameter adjustment instruction to update the character face image, where the parameter adjustment instruction is generated based on the character face image displayed on the interaction interface.

[0025] In some embodiments, the method further includes:

[0026] Decouple the content and style of the reference image and the character face image to obtain a content vector and a style vector. The content vector is used to control the facial feature structure, and the style vector is used to control the rendering method;

[0027] Generate a character face image with a target style by adjusting the style vector.

[0028] In a second aspect, an embodiment of the present application provides a character face sculpting system based on an AI model. The system includes:

[0029] An analysis module, configured to obtain a face base image and reference data, and analyze the reference data to obtain the character gender and character feature data;

[0030] An encoding module, configured to obtain a face sculpting inference module corresponding to the character gender, and generate a virtual image encoding based on the face sculpting inference module and the character feature data. The face sculpting inference module contains combination rules for various facial features;

[0031] A generation module, configured to redraw the face base image according to the virtual image encoding to obtain a character face image, and render the character face image based on the differentiable rendering method.

[0032] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for character face sculpting based on an AI model as described in the first aspect above is implemented.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for character face sculpting based on an AI model as described in the first aspect above is implemented.

[0034] Compared with the related art, the method for character face sculpting based on an AI model provided by the embodiment of the present application obtains a face base image and reference data, analyzes the reference data to obtain the character gender and character feature data; obtains a face sculpting inference module corresponding to the character gender, generates a virtual image encoding based on the face sculpting inference module and the character feature data, and the face sculpting inference module contains combination rules for various facial features; redraws the face base image according to the virtual image encoding to obtain a character face image, and renders the character face image based on the differentiable rendering method, solving the problem of low efficiency of 2D character face sculpting methods. The face sculpting inference module dynamically calls rules to generate a virtual image encoding, without hard-coded logical judgments, improving the face sculpting efficiency. Description of the Drawings

[0035] The accompanying drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0036] Figure 1 is a flowchart of a character face sculpting method based on an AI model according to an embodiment of the present application;

[0037] Figure 2 is a schematic diagram of the generation of facial features according to an embodiment of the present application;

[0038] Figure 3 is a schematic diagram of the generation of a hairstyle according to an embodiment of the present application;

[0039] Figure 4 is a flowchart of a character face sculpting method based on an AI model according to an embodiment of the present application;

[0040] Figure 5 is a structural block diagram of a character face sculpting system based on an AI model according to an embodiment of the present application;

[0041] Figure 6 is an internal structural schematic diagram of an electronic device according to an embodiment of the present application. Detailed implementation manners

[0042] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be described and explained below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. Based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0043] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. In addition, it can also be understood that although the efforts made in this development process may be complex and time-consuming, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.

[0044] References to "embodiments" in this application mean that specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art will explicitly and implicitly understand that the embodiments described in this application can be combined with other embodiments without conflict.

[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meaning understood by those of ordinary skill in the technical field to which this application belongs. The words such as "a", "one", "kind", "the" and the like involved in this application do not represent a limitation in quantity and can represent a singular or plural number. The terms "include", "comprise", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The terms "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may mean: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally means that the associated objects before and after are in an "or" relationship. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.

[0046] This embodiment provides a character face sculpting method based on an AI model. Figure 1 is a flowchart of the character face sculpting method based on the AI model according to the embodiment of this application, as Figure 1 shown, and the process includes the following steps:

[0047] Step S101, obtain a face base image and reference data, and analyze the reference data to obtain the character gender and character feature data.

[0048] The face base image is the base for redrawing the face pinching component. In this embodiment, the reference data includes reference images and / or keywords describing the characteristics of the character. The keywords can respectively describe the facial features, facial contours, expressions, character identities, etc. It should be noted that the reference image and the face handover image can be a face photo uploaded by the user through an input device such as a camera or scanner, or a face photo generated by AI.

[0049] In some embodiments, the reference data includes reference images and keywords describing character characteristics, and the character gender and character characteristic data obtained by analyzing the reference data in step S101 include:

[0050] Step S1011, extracting features from the reference image using a preset visual model.

[0051] Step S1012, determining the character's identity features, facial features, facial contour features, expression features, and style features based on the extraction results and keywords.

[0052] Step S1013, dynamically associate identity features, facial features, facial contour features, expression features and style features through a cross-attention mechanism to obtain character feature data.

[0053] This embodiment achieves feature fusion by using a joint embedding space. Optionally, VisionTransformer is used to simultaneously extract identity, face, expression, and style features, and dynamically associate feature dimensions through a cross-attention mechanism.

[0054] The joint embedding space maps data from different modalities or feature sources into the same embedding space, allowing different types of data to share the same representation. Features from different sources (such as vision, text, etc.) can be effectively fused, and their respective information can complement each other to make up for the lack of information that may exist in a single modality. At the same time, the risk of overfitting of a single feature source can be reduced.

[0055] Step S102, obtaining a face-pinching reasoning module corresponding to the gender of the character, and generating a virtual image code based on the face-pinching reasoning module and the character feature data, wherein the face-pinching reasoning module includes a combination rule of multiple facial features.

[0056] In this embodiment, the face pinching reasoning module is a generator (such as GAN, VAE), and the face pinching reasoning module includes combination rules of multiple facial features, such as face shape, hairstyle, eyebrows, eyes, etc.

[0057] Optionally, gender is judged by a lightweight CNN (such as ResNet-18 fine-tuning), and different generator branches (face pinching inference module) are selected based on the judgment result. For example, the generator corresponding to female characters enlarges the proportion of eyes and narrows the range of mandibular angles, while the generator corresponding to male characters strengthens the brow bone contour and increases facial angularity.

[0058] Through lightweight design and optimization, the AI model can achieve fast inference and low-latency face pinching effects on devices such as mobile phones. While ensuring the quality of face pinching, it realizes efficient face pinching on devices with limited resources.

[0059] In some of these embodiments, generating the virtual image encoding based on the face pinching inference module and character feature data in step S102 includes:

[0060] Step S1021: Encode the character feature data into a latent vector, and the face pinching inference module obtains an effective parameter combination based on a pre-constructed rule library and the latent vector;

[0061] Step S1022: Decode the effective parameter combination into a virtual image encoding recognizable by the game engine.

[0062] In this embodiment, art specifications (such as the constraint of facial feature proportions) are encoded into a learnable rule library. When generating a human face, the rule is dynamically called through the attention mechanism to generate the encoding of the virtual image, rather than hard-coded logical judgment. Compared with the limitations of traditional technologies that rely on fixed hierarchical texture maps, the architecture of this embodiment realizes the unity of style independence and parameter generation.

[0063] In some of these embodiments, the rule library includes:

[0064] Physical constraint rules, which are used to limit the parameter space through a preset weight matrix. For example, the positions of facial features need to satisfy the "three courts and five eyes" proportion.

[0065] Style coupling rules, which are used to dynamically activate or mask parameter dimensions through style embedding vectors. For example, in a realistic style, the setting of cartoonish big eyes is prohibited.

[0066] User preference rules, which are used to increase the weight of specific features for a specific user group based on collaborative filtering to learn historical data. For example, Asian users prefer soft contours.

[0067] Encode the input features into a latent vector, screen the effective parameter combination through the rule library, and decode the effective parameter combination into a parameter encoding (such as JSON format) recognizable by the game engine through the generation model.

[0068] It should be noted that the face pinching features and rules in the AI model can be adjusted to adapt to the changing market demands and user preferences.

[0069] Step S103: Redraw the face base image according to the virtual image encoding to obtain a character face image, and render the character face image based on the differentiable rendering method.

[0070] Redraw the masked part of the face base image according to the virtual image encoding, and output the corresponding generated component file.

[0071] Due to relying on manual drawing, traditional methods are difficult to generate sufficiently diverse character appearances, limiting the possibility of personalization. In this embodiment, through AI technology, based on deep learning analysis of face images (reference images), virtual character faces with similar features are automatically generated to achieve the effect of "a thousand people, a thousand faces".

[0072] In this embodiment, through differentiable rendering, the LPIPS perceptual loss between the generated image and the target image is calculated, and the parameters are directly optimized by backpropagation. The face pinching parameters are directly used as optimizable variables to participate in image generation, improving the adaptability to non-realistic styles.

[0073] Personalized recommendations are achieved through user preference rules. Through collaborative filtering algorithms, the parameter distribution is automatically adjusted according to player behavior data (e.g., Asian users prefer soft contours, and European and American users prefer high cheekbones).

[0074] In some embodiments, the virtual image encoding includes macro-layer parameters, middle-layer parameters, and micro-layer parameters; redrawing the face base image according to the virtual image encoding in step S103 to obtain a character face image includes:

[0075] Controlling the macro-layer parameters through a classification network, controlling the middle-layer parameters through a key point regression network, and controlling the micro-layer parameters through StyleMapGAN to redraw the face base image to obtain a character face image.

[0076] Optionally, the macro-layer includes but is not limited to face shape and gender, the middle-layer includes but is not limited to the proportion of facial features, and the micro-layer includes but is not limited to texture details.

[0077] In order to make the virtual image more realistic, it is necessary to improve the expressiveness of the face pinching system in details, such as the rendering of skin texture, hair and other resources. The AI technology in this embodiment can provide more refined facial feature recognition and rendering technology, enhancing the realism of the virtual image. In this embodiment, in order to improve the inference speed of the AI model, GPU can be used for accelerated calculation to improve the calculation efficiency and reduce the dependence on hardware resources.

[0078] Figure 2 It is a schematic diagram of the generation of facial features according to an embodiment of the present application. Figure 3 It is a schematic diagram of the generation of hairstyles according to an embodiment of the present application. Figure 4It is a flowchart of a character face sculpting method based on an AI model according to an embodiment of the present application.

[0079] Through the above steps, the character face sculpting method provided by the embodiment of the present application obtains a face base image and reference data, analyzes the reference data to obtain the character gender and character feature data; obtains a face sculpting inference module corresponding to the character gender, generates a virtual image code based on the face sculpting inference module and the character feature data, and the face sculpting inference module contains combination rules of various face features; redraws the face base image according to the virtual image code to obtain a character face image, and renders the character face image based on the differentiable rendering method, solving the problem of low efficiency of the 2D character face sculpting method. The face sculpting inference module dynamically calls rules to generate virtual image codes, without hard-coded logical judgments, improving the face sculpting efficiency.

[0080] Adopting an end-to-end AI model jointly optimized by a generator and a feature extractor, directly optimizing the face sculpting parameters through backpropagation can automatically generate and adjust the facial features of the character, thereby improving production efficiency, reducing costs, and providing more diverse character appearances. At the same time, AI technology can analyze real face images through deep learning and automatically generate virtual character faces with similar features, achieving the effect of "thousands of people, thousands of faces".

[0081] The above AI model is trained through deep learning, can work stably under different lighting and angles, improving the recognition accuracy and face sculpting precision. At the same time, it can process high-resolution face images and generate 2D character faces with rich details.

[0082] In some of these embodiments, the method further includes:

[0083] After rendering the character face image based on the differentiable rendering method, display the character face image through an interactive interface.

[0084] Adjust the face sculpting parameters according to the received parameter adjustment instruction to update the character face image, where the parameter adjustment instruction is generated based on the character face image displayed on the interactive interface.

[0085] The user can upload pictures through the interactive interface, adjust the face sculpting parameters (such as the size and position of facial features), and preview the generated character face image in real time. And the user confirms the final face sculpting result through the interactive interface, and the system outputs and saves the 2D character face image.

[0086] The real-time preview function enables the user to immediately see the adjustment effect, enhancing the interactivity and user satisfaction of the face sculpting process.

[0087] In some of these embodiments, the method further includes:

[0088] Decouple the reference image and the character's face image from content and style to obtain a content vector and a style vector. The content vector is used to control the structure of the facial features, and the style vector is used to control the rendering method.

[0089] By adjusting the style vector, a character face image of the target style is generated.

[0090] This embodiment can generate facial images of multiple styles. Optionally, the multi-style processing implementation specifically includes:

[0091] Facial region segmentation: Use lightweight models (such as 3DDFA v2) for real-time face pose estimation, separate key facial regions (such as facial features and contours), and optimize edge detection accuracy through morphological methods. Use variational level sets at the shader level to build a high-dimensional space segmentation model and extract multi-resolution contour features.

[0092] Blend shape parameterization: Based on the multilinear facial model, facial geometry is decomposed into independent parameters, including vertex mode parameters, expression mode parameters, and identity mode parameters. Mode parameters are used to control the basic facial structure, expression mode parameters are used to manage expression blend shape weights, and identity mode parameters are used to handle personalized feature differences. Parameter decoupling is achieved through N-mode SVD, providing a mathematical basis for multi-branch rendering.

[0093] Style decoupled encoding: Using the StyleGAN3 architecture, the reference image and the character face image are decomposed into content latent codes (controlling the structure of facial features) and style latent codes (controlling rendering techniques), and cross-style generation is achieved by adjusting the style vector.

[0094] Multi-branch rendering pipeline: The realistic style branch uses 3DMM parameters to reconstruct the 3D mesh, combined with PBR materials and real-time lighting calculations; the two-dimensional branch uses Command Buffer layered rendering, and pursues the final effect and style through NPR rendering technology; the ink style branch migrates ink features based on convolutional neural networks, combined with morphological simulation of smudge levels.

[0095] Style transfer reinforcement learning: Build a style discriminator network and use adversarial training to force the generated results to conform to the target style distribution (such as training a thick painting style discriminator with the WikiArt dataset).

[0096] This embodiment introduces neural style transfer technology (such as AdaIN) to separate content and style features, so that the same model can handle multiple styles such as photo realism, two-dimensional, and CG thick painting.

[0097] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0098] This embodiment also provides a character face sculpting system based on an AI model. This system is used to implement the above-mentioned embodiment and the preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0099] Figure 5 is a structural block diagram of a character face sculpting system based on an AI model according to an embodiment of the present application. As Figure 5 shown, this system includes:

[0100] An analysis module 51, configured to obtain a human face base image and reference data, and analyze the reference data to obtain the character gender and character feature data.

[0101] An encoding module 52, configured to obtain a face sculpting inference module corresponding to the character gender, and generate a virtual image encoding based on the face sculpting inference module and the character feature data. The face sculpting inference module contains combination rules of various human face features.

[0102] A generation module 53, configured to redraw the human face base image according to the virtual image encoding to obtain a character face image, and render the character face image based on the differentiable rendering method.

[0103] In some of these embodiments, the reference data includes a reference image and keywords describing the character features. The analysis module 51 includes:

[0104] An extraction module, configured to extract features from the reference image through a preset visual model.

[0105] A feature analysis module, configured to determine the identity features, facial feature features, facial contour features, expression features, and style features of the character according to the extraction result and the keywords.

[0106] An association module, configured to dynamically associate the identity features, facial feature features, facial contour features, expression features, and style features through a cross-attention mechanism to obtain the character feature data.

[0107] In some of these embodiments, the encoding module 52 includes:

[0108] A parameter determination module for encoding character feature data into a latent vector, and a face pinching inference module for obtaining a valid parameter combination based on a pre-constructed rule library and the latent vector.

[0109] A decoding module for decoding the valid parameter combination into a virtual image encoding recognizable by a game engine.

[0110] In some embodiments, the rule library includes:

[0111] Physical constraint rules for restricting the parameter space through a preset weight matrix.

[0112] Style coupling rules for dynamically activating or masking parameter dimensions through style embedding vectors.

[0113] User preference rules for increasing the weight of specific features for a specific user group based on collaborative filtering of historical data.

[0114] In some embodiments, the virtual image encoding includes macro-layer parameters, middle-layer parameters, and micro-layer parameters; the generation module 53 includes:

[0115] A parameter control module for controlling the macro-layer parameters through a classification network, controlling the middle-layer parameters through a key point regression network, and controlling the micro-layer parameters through StyleMapGAN to redraw the face base image and obtain a character face image.

[0116] In some embodiments, the character face pinching system based on an AI model further includes:

[0117] A display module for displaying the character face image through an interaction interface after rendering the character face image based on the differentiable rendering method.

[0118] A modification module for adjusting the face pinching parameters according to the received parameter adjustment instruction to update the character face image, where the parameter adjustment instruction is generated based on the character face image displayed on the interaction interface.

[0119] In some embodiments, the character face pinching system based on an AI model further includes:

[0120] A rendering module for decoupling the content and style of a reference image and a character face image to obtain a content vector and a style vector, where the content vector is used to control the facial features structure and the style vector is used to control the rendering method;

[0121] A style determination module for generating a character face image with a target style by adjusting the style vector.

[0122] Through the above system, the analysis module 51 obtains the face base image and reference data, analyzes the reference data to obtain the character gender and character feature data, the encoding module 52 obtains the face pinching inference module corresponding to the character gender, generates a virtual image encoding based on the face pinching inference module and the character feature data, and the face pinching inference module contains combination rules for various face features. The generation module 53 redraws the face base image according to the virtual image encoding to obtain the character face image, and renders the character face image based on the differentiable rendering method, solving the problem of low efficiency of the 2D character face pinching method. The face pinching inference module dynamically calls rules to generate virtual image encodings, without the need for hard-coded logical judgments, improving the face pinching efficiency.

[0123] It should be noted that the above-mentioned each module can be a functional module or a program module, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned each module can be located in the same processor; or the above-mentioned each module can also be located in different processors in any combined form.

[0124] This embodiment also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0125] Optionally, the above-mentioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above-mentioned processor, and the input / output device is connected to the above-mentioned processor.

[0126] Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:

[0127] S1. Obtain the face base image and reference data, and analyze the reference data to obtain the character gender and character feature data.

[0128] S2. Obtain the face pinching inference module corresponding to the character gender, generate a virtual image encoding based on the face pinching inference module and the character feature data, and the face pinching inference module contains combination rules for various face features.

[0129] S3. Redraw the face base image according to the virtual image encoding to obtain the character face image, and render the character face image based on the differentiable rendering method.

[0130] It should be noted that the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.

[0131] In one embodiment, Figure 6 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application, asFigure 6 As shown, an electronic device is provided. The electronic device can be a server, and its internal structure diagram can be as follows Figure 6 shown. The electronic device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for character face sculpting based on an AI model.

[0132] Those skilled in the art can understand that Figure 6 the structure shown in

[0133] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0134] Those skilled in the art should understand that the technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.

[0135] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. A character face sculpting method based on an AI model, characterized in that, The method includes: Obtain a face base image and reference data, and analyze the reference data to obtain the character gender and character feature data; Obtain the face sculpting inference module corresponding to the character gender, and generate a virtual image code based on the face sculpting inference module and the character feature data. The face sculpting inference module contains combination rules for various face features. Generating a virtual image code based on the face sculpting inference module and the character feature data includes: encoding the character feature data into a latent vector, and the face sculpting inference module obtaining an effective parameter combination based on a pre-constructed rule library and the latent vector; decoding the effective parameter combination into a virtual image code recognizable by the game engine; Redraw the face base image according to the virtual image code to obtain a character face image, and render the character face image based on the differentiable rendering method.

2. The method according to claim 1, wherein The reference data includes a reference image and keywords describing the character features. Analyzing the reference data to obtain the character gender and character feature data includes: Extract features from the reference image through a preset visual model; Determine the identity features, facial feature features, facial contour features, expression features, and style features of the character according to the extraction result and the keywords; Dynamically associate the identity features, the facial feature features, the facial contour features, the expression features, and the style features through a cross-attention mechanism to obtain the character feature data.

3. The method according to claim 1, characterized in that The rule library includes: Physical constraint rules for restricting the parameter space through a preset weight matrix; Style coupling rules for dynamically activating or masking parameter dimensions through style embedding vectors; User preference rules for increasing the weight of specific features for a specific user group based on collaborative filtering to learn historical data.

4. The method according to claim 1, characterized in that, The virtual image code includes macro-layer parameters, middle-layer parameters, and micro-layer parameters; redrawing the face base image according to the virtual image code to obtain a character face image includes: Controlling the macro-layer parameters through a classification network, controlling the middle-layer parameters through a key point regression network, and controlling the micro-layer parameters through StyleMapGAN to redraw the face base image to obtain the character face image.

5. The method according to claim 1, wherein The method further includes: After rendering the character face image based on the differentiable rendering method, display the character face image through an interactive interface; Adjust the face sculpting parameters according to the received parameter adjustment instruction to update the character face image, where the parameter adjustment instruction is generated based on the character face image displayed on the interactive interface.

6. The method according to claim 2, wherein The method further includes: Perform content-style decoupling on the reference image and the character face image to obtain a content vector and a style vector. The content vector is used to control the facial feature structure, and the style vector is used to control the rendering method; Generate a character face image with a target style by adjusting the style vector.

7. A character face sculpting system based on an AI model, characterized in that, The system includes: An analysis module for obtaining a face base image and reference data, and analyzing the reference data to obtain the character gender and character feature data; An encoding module, configured to obtain the face sculpting inference module corresponding to the character gender, generate a virtual image encoding based on the face sculpting inference module and the character feature data, wherein the face sculpting inference module contains combination rules of various facial features, and the generating the virtual image encoding based on the face sculpting inference module and the character feature data includes: encoding the character feature data into a latent vector, and the face sculpting inference module obtaining an effective parameter combination based on a pre-constructed rule library and the latent vector; decoding the effective parameter combination into a virtual image encoding recognizable by a game engine; A generating module, configured to redraw the face base image according to the virtual image encoding to obtain a character face image, and render the character face image based on the differentiable rendering method.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the AI model-based character face sculpting method according to any one of claims 1 to 6.

9. A storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the AI model-based character face sculpting method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Virtual character face pinching method and system, storage medium and processing terminal

    CN116052241A

  • Virtual image generation method, device and equipment based on user state

    CN117132689A