Character animation generation method and device, computer equipment and storage medium

By obtaining the picture content description text of the target character image and inputting it into the pre-trained stylized animation generation model, the stylized character animation is generated, and the portrait cutout process is performed, which solves the problem of low efficiency of character animation style transfer and poor generation effect in the existing technology. It solves the best problem and achieves efficient and smooth animation generation.

CN118587338APending Publication Date: 2024-09-03GUANGZHOU QUYAN NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410935129.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The existing technology is inefficient and produces poor results when migrating character animation styles. In particular, due to insufficient 3D reconstruction accuracy and skeletal animation accuracy, the animation vision after style migration is not smooth, lacks natural transition effects, and is costly and computationally resource intensive. High consumption.

Method used

By obtaining the picture content description text of the target character image, input it into the pre-trained stylized animation generation model, generate a stylized character animation that matches the image content description text, and perform portrait cutout processing, and convert the stylized character transparent layer into Superimposed on the target background image, the target character animation is generated, which lowers the threshold of use, reduces the demand for computing resources, and improves the generation efficiency and effect.

Benefits of technology

It realizes the generation of stylized character animation from a target character image, lowers the user threshold, reduces animation generation time and resource requirements, and improves the generation efficiency and effect of stylized character animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587338A
    Figure CN118587338A
Patent Text Reader

Abstract

The invention relates to a character animation generation method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: acquiring a picture content description text for a target person image; inputting the picture content description text as a cue word into a pre-trained stylized animation generation model, and generating a stylized character animation matched with the image content description text; each frame image in the stylized character animation and the target character image have the same picture content feature; the animation style of the stylized character animation is a preset animation style; carrying out portrait matting processing on the stylized character animation to obtain a stylized character transparent image layer corresponding to each frame of image in the stylized character animation; and obtaining a target background image, and superposing the stylized character transparent image layer corresponding to each frame of image into the target background image to generate a target character animation. By adopting the method, the character animation style migration efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for generating character animation. Background Art

[0002] With the development of computer vision, character animation has important application value in all walks of life.

[0003] Currently, when performing style transfer on character animation, it is usually done by inputting an existing video and performing style transfer on the existing video frame by frame. This requires a certain usage threshold, and because the style transfer is performed frame by frame, the character animation after style transfer may not be visually smooth and lack a natural transition effect; or the character animation is synthesized by combining 3D reconstruction technology and style transfer technology, but the generation effect may be poor due to insufficient 3D reconstruction accuracy and skeletal animation accuracy, and the synthesis cost is high, requiring the allocation of a large amount of computing resources and computing time.

[0004] Therefore, there is a problem in that the style transfer of character animation is not efficient in traditional technologies. Summary of the invention

[0005] Based on this, it is necessary to provide a character animation generation method, apparatus, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of style transfer of character animation in order to address the above technical problems.

[0006] A method for generating character animation, the method comprising:

[0007] Obtaining a text describing the contents of the target person's image;

[0008] The picture content description text is input as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same picture content features as the target character image; the animation style of the stylized character animation is a preset animation style;

[0009] Performing portrait cutout processing on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation;

[0010] The target background image is obtained, and the stylized character transparent layer corresponding to each frame image is superimposed on the target background image to generate a target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

[0011] In an exemplary embodiment, obtaining a text describing the content of a target person image includes:

[0012] Extracting picture content features of the target person image to obtain at least one picture content feature label corresponding to the target person image;

[0013] The feature labels of each screen content are summarized to obtain the screen content description text.

[0014] In an exemplary embodiment, the pre-trained stylized animation generation model is obtained by inserting a motion modeling plug-in into an image stylization processing model; the motion modeling plug-in stores character motion pattern information obtained through pre-training; the picture content description text is input as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation matching the image content description text, including:

[0015] Input the image content description text as a prompt word into the pre-trained stylized animation generation model;

[0016] The motion modeling plug-in is loaded through the pre-trained stylized animation generation model to obtain the character motion mode information, and the pre-trained stylized animation generation model is used to generate a stylized character image sequence that matches the image content description text based on the image content description text and the character motion mode information;

[0017] Generate stylized character animation based on stylized character image sequences.

[0018] In an exemplary embodiment, the method further comprises:

[0019] Acquire a face condition map and at least one posture condition map; the face condition map is used to control the face geometry of each frame image in the stylized character animation; any posture condition map is used to control the character posture of the corresponding frame image in the stylized character animation;

[0020] Inputting the face condition map into the face control network, and inputting each posture condition map into the posture control network;

[0021] Based on the face control network and the posture control network, a motion modeling plug-in is generated, and the motion modeling plug-in is inserted into the image stylization processing model to obtain a pre-trained stylized animation generation model.

[0022] In an exemplary embodiment, performing a portrait cutout process on a stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation includes:

[0023] Inputting a thumbnail corresponding to any frame image in the stylized character animation into a first mask estimation network to obtain a background mask image and a character mask image of any frame image;

[0024] The thumbnail, background mask and person mask corresponding to any frame image are input into the mask quality normalization network to obtain the normalized background mask corresponding to any frame image;

[0025] The original image corresponding to any frame image and the normalized background mask image are input into the second mask estimation network to obtain a stylized character transparent layer corresponding to any frame image; the resolution of the stylized character transparent layer is higher than the resolution of the background mask image and the character mask image.

[0026] In an exemplary embodiment, after the step of aggregating the feature tags of the picture contents to obtain the picture content description text, the method further includes:

[0027] In response to an editing operation on the screen content description text, obtaining the edited text;

[0028] Get the edited text as the new screen content description text.

[0029] A character animation generating device, the device comprising:

[0030] An acquisition module is used to acquire a text describing the contents of a target person's image;

[0031] An input module is used to input the picture content description text as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same picture content features as the target character image; the animation style of the stylized character animation is a preset animation style;

[0032] A cutout module is used to perform a cutout process on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation;

[0033] The generation module is used to obtain the target background image and superimpose the stylized character transparent layer corresponding to each frame image on the target background image to generate the target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

[0034] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0035] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0036] A computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0037] The above-mentioned character animation generation method, device, computer equipment, storage medium and computer program product obtain the picture content description text for the target character image; input the picture content description text as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same picture content characteristics as the target character image; the animation style of the stylized character animation is a preset animation style; the stylized character animation is subjected to portrait cutout processing to obtain the stylized character transparent layer corresponding to each frame image in the stylized character animation; obtain the target background image, and superimpose the stylized character transparent layer corresponding to each frame image onto the target background image to generate the target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background; in this way, the stylized character animation can be generated through a target character image, which reduces the user's usage threshold, can reduce the animation generation time and reduce the demand for animation generation resources, and improves the generation efficiency and generation effect of the stylized character animation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are 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 work.

[0039] Figure 1 An application environment diagram of a character animation generation method in one embodiment;

[0040] Figure 2 A schematic diagram of a flow chart of a method for generating character animation in one embodiment;

[0041] Figure 3 A schematic diagram of a flow chart of a step of obtaining a text description of screen content in one embodiment;

[0042] Figure 4 A schematic diagram of obtaining a feature label of picture content in one embodiment;

[0043] Figure 5 is a schematic diagram of a portrait cutout process in one embodiment;

[0044] Figure 6 A flow chart of a method for generating a target character animation in one embodiment;

[0045] Figure 7is a flow chart of a method for generating character animation in another embodiment;

[0046] Figure 8 is a structural block diagram of a character animation generating device in one embodiment;

[0047] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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.

[0049] The character animation generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The user can input the target character image to the server 104 through the terminal 102, and the server 104 obtains the screen content description text for the target character image; the server 104 inputs the screen content description text as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same screen content features as the target character image; the animation style of the stylized character animation is a preset animation style; the server 104 performs portrait cutout processing on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation; the server 104 obtains the target background image, and superimposes the stylized character transparent layer corresponding to each frame image onto the target background image to generate the target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background; the server 104 sends the generated target character animation to the terminal 102. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0050] In an exemplary embodiment, Figure 2 As shown, a character animation generation method is provided, and the method is applied to Figure 1The server 104 in the example is used as an example to illustrate the method, which includes the following steps 202 to 206. Among them:

[0051] Step 202: Obtain a text describing the content of the target person image.

[0052] The target person image may be an image containing the target person, and the target person is the main object in the animation to be generated.

[0053] The picture content description text may be a text describing the picture content of the target person image.

[0054] Optionally, the server obtains a picture content description text for the target person image.

[0055] Step 204, input the picture content description text as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same picture content features as the target character image; the animation style of the stylized character animation is a preset animation style.

[0056] The pre-trained stylized animation generation model may refer to a pre-trained stylized animation generator.

[0057] In practical applications, the pre-trained stylized animation generator can be a stylized animation generator that uses the animatediff animation model to expand the stable diffusion SD Vincent graph model, and the stable diffusion SD Vincent graph model is obtained by integrating the weights of the style LoRA model, which can support a variety of stylized animation effects. Among them, the animatediff animation model learns motion priors from a large video dataset. These motion priors are stored in the motion module. When using it, you only need to insert the motion module into the SD model.

[0058] Among them, the stylized character animation may refer to a character animation with a preset animation style, for example, a cartoon-style character animation, an oil painting-style character animation, and the like.

[0059] The picture content feature may refer to picture attribute information related to faces, clothing, background, objects, etc. in the image.

[0060] The preset animation style may refer to any preset animation style, for example, a preset cartoon style or oil painting style.

[0061] Optionally, the server uses the picture content description text as a prompt word and inputs it into a pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text.

[0062] Step 206 , performing portrait cutout processing on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation.

[0063] The stylized character transparent layer may refer to an alpha map of a character area having a preset animation style.

[0064] Optionally, the server performs portrait cutout processing on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation, that is, to obtain multiple character transparent layers with preset animation styles, and the number of character transparent layers is the same as the number of frames of the stylized character animation.

[0065] Step 208, obtain the target background image, and superimpose the stylized character transparent layer corresponding to each frame image on the target background image to generate a target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

[0066] The target background image may be a custom background image specified by the user.

[0067] The target character animation may be an animation obtained by fusing the stylized character transparent images corresponding to each frame image with a custom background image.

[0068] Optionally, the server obtains the target background image, and then superimposes the stylized character transparent layer corresponding to each frame image onto the target background image, generating an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

[0069] In the above-mentioned character animation generation method, by obtaining a picture content description text for a target character image; inputting the picture content description text as a prompt word into a pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same picture content feature as the target character image; the animation style of the stylized character animation is a preset animation style; the stylized character animation is subjected to portrait cutout processing to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation; the target background image is obtained, and the stylized character transparent layer corresponding to each frame image is superimposed on the target background image to generate the target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background; in this way, a stylized character animation can be generated through a target character image, which reduces the user's usage threshold, can reduce the animation generation time and reduce the demand for animation generation resources, and improves the generation efficiency and generation effect of the stylized character animation.

[0070] In an exemplary embodiment, Figure 3 As shown, step 202 includes steps 302 to 304. Among them:

[0071] Step 302: extracting picture content features from the target person image to obtain at least one picture content feature label corresponding to the target person image.

[0072] Among them, the picture content feature label can refer to a text label that characterizes the attributes of the picture content. For example, the picture content feature label can be a text label such as "girl", "white T-shirt", "white background", "black pants", "curly hair", "long hair", "gray eyes", "hands in pockets", etc.

[0073] Optionally, the server extracts picture content features from the target person image to obtain each picture content feature label corresponding to the target person image.

[0074] See also Figure 4 In practical applications, the face recognition algorithm can be used to identify the target person image, so as to obtain the face-related attributes such as the person's gender and age. The image label estimation algorithm (such as the Wd14-Tagger plug-in) can also be used to identify the target person image to obtain the person's gender, clothing, background, objects and other screen-related attributes.

[0075] Step 304: Summarize the feature tags of each picture content to obtain a picture content description text.

[0076] Optionally, the server aggregates the feature tags of each screen content to obtain a screen content description text.

[0077] In this embodiment, by extracting the screen content features of the target person image, at least one screen content feature label corresponding to the target person image is obtained, and then the screen content feature labels are summarized to obtain a screen content description text, which can accurately identify the screen features of the target person image, thereby generating a description text that can be used to accurately describe the screen content of the target person image, which is facilitating the subsequent generation of a target person animation that is consistent with the screen content of the target person image.

[0078] In an exemplary embodiment, a pre-trained stylized animation generation model is obtained by inserting a motion modeling plug-in into an image stylization processing model; the motion modeling plug-in stores character motion pattern information obtained through pre-training; the picture content description text is input as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text, including: inputting the image content description text as a prompt word into the pre-trained stylized animation generation model; loading the motion modeling plug-in through the pre-trained stylized animation generation model to obtain the character motion pattern information, and generating a stylized character image sequence that matches the image content description text based on the image content description text and the character motion pattern information through the pre-trained stylized animation generation model; generating a stylized character animation based on the stylized character image sequence.

[0079] The motion modeling plug-in may refer to a motion module obtained by training an animatediff animation model.

[0080] Among them, the character motion pattern information can refer to motion prior knowledge. In practical applications, the motion prior knowledge can be learned from a large video data set through an animatediff animation model, and then the motion prior knowledge is saved in a motion module motion module. When using it, you only need to insert the motion module motion module into the SD model.

[0081] The stylized character image sequence may refer to a sequence obtained by arranging a plurality of stylized character images in the order in which actions occur.

[0082] Optionally, the server inputs the image content description text as a prompt word into a pre-trained stylized animation generation model, and the server loads a motion modeling plug-in through the pre-trained stylized animation generation model to obtain character motion pattern information. The server then generates a stylized character image sequence that matches the image content description text based on the image content description text and the character motion pattern information through the pre-trained stylized animation generation model, and the server generates a stylized character animation based on the stylized character image sequence.

[0083] In this embodiment, the image content description text is input as a prompt word into a pre-trained stylized animation generation model; a motion modeling plug-in is loaded through the pre-trained stylized animation generation model to obtain character motion pattern information, and a stylized character image sequence matching the image content description text is generated based on the image content description text and the character motion pattern information through the pre-trained stylized animation generation model; a stylized character animation is generated based on the stylized character image sequence; in this way, the character motion pattern information and the image content description text can be combined to generate a smooth and natural stylized character animation.

[0084] In an exemplary embodiment, the method also includes: obtaining a face condition map and at least one posture condition map; the face condition map is used to control the face geometry of each frame image in the stylized character animation; any posture condition map is used to control the character posture of the corresponding frame image in the stylized character animation; the face condition map is input into the face control network, and each posture condition map is input into the posture control network; based on the face control network and the posture control network, a motion modeling plug-in is generated, and the motion modeling plug-in is inserted into the image stylization processing model to obtain a pre-trained stylized animation generation model.

[0085] The face condition map may refer to an image used to control the face ID (ie, the face geometry) in the animation.

[0086] The posture condition graph may refer to an image used to control the posture of a character in an animation.

[0087] In practical applications, you can use templates in the character action template library to determine the posture condition graph. You can also support custom input of an action video and use a posture estimation algorithm to automatically detect the action video and generate a posture reference animation to determine the posture condition graph.

[0088] Among them, the face control network and the posture control network can refer to the ControlNet control network. The working principle of the control network is to fix the original parameters of the SD model, and then copy the original SD model for training, introduce custom conditions on it (for example, conditional graphs such as posture / face features), and attach the trainable neural network module to the SD model, which directly affects the output of each decoding stage of the SD model.

[0089] Optionally, the server obtains a face condition map and multiple posture condition maps, and then inputs the face condition map into a face control network and inputs each posture condition map into a posture control network. The server then generates a motion modeling plug-in based on the face control network and the posture control network. The server inserts the motion modeling plug-in into the image stylization processing model to obtain a pre-trained stylized animation generation model.

[0090] In this embodiment, a face condition map and at least one posture condition map are obtained; the face condition map is used to control the face geometry of each frame image in the stylized character animation; any posture condition map is used to control the character posture of the corresponding frame image in the stylized character animation; the face condition map is input into the face control network, and each posture condition map is input into the posture control network; based on the face control network and the posture control network, a motion modeling plug-in is generated, and the motion modeling plug-in is inserted into the image stylization processing model to obtain a pre-trained stylized animation generation model; in this way, the character motion and face geometry of the generated animation can be accurately controlled based on the face condition map and each posture condition map.

[0091] In an exemplary embodiment, a stylized character animation is subjected to portrait cutout processing to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation, including: inputting a thumbnail corresponding to any frame image in the stylized character animation into a first mask estimation network to obtain a background mask map and a character mask map of any frame image; inputting the thumbnail, background mask map and character mask map corresponding to any frame image into a mask quality normalization network to obtain a normalized background mask map corresponding to any frame image; inputting the original image and the normalized background mask map corresponding to any frame image into a second mask estimation network to obtain a stylized character transparent layer corresponding to any frame image; the resolution of the stylized character transparent layer is higher than the resolution of the background mask map and the character mask map.

[0092] The thumbnail may refer to an image obtained by downsampling the target person image.

[0093] The first mask estimation network may refer to a coarse mask estimation network Mask Prediction Network.

[0094] The mask quality normalization network may refer to a mask quality normalization network for unifying mask quality.

[0095] The second mask estimation network may refer to a precise alpha estimation network Matting Refinement Network.

[0096] Optionally, for any frame image in the stylized character animation, the server inputs the thumbnail corresponding to the frame image into the first mask estimation network to obtain the background mask map and the character mask map of the frame image. Then, the server inputs the thumbnail, background mask map and character mask map corresponding to the frame image into the mask quality normalization network to obtain the normalized background mask map corresponding to the frame image. Then, the server inputs the original image corresponding to the frame image and the normalized background mask map into the second mask estimation network to obtain the stylized character transparent layer corresponding to the frame image, wherein the resolution of the stylized character transparent layer is higher than the resolution of the background mask map and the character mask map.

[0097] The specific portrait cutout process corresponding to this embodiment can be found in Figure 5 .

[0098] In this embodiment, by inputting the thumbnail corresponding to any frame image in the stylized character animation into the first mask estimation network, the background mask map and the character mask map of any frame image are obtained; the thumbnail, the background mask map and the character mask map corresponding to any frame image are input into the mask quality normalization network to obtain the normalized background mask map corresponding to any frame image; the original image corresponding to any frame image and the normalized background mask map are input into the second mask estimation network to obtain the stylized character transparent layer corresponding to any frame image; the resolution of the stylized character transparent layer is higher than the resolution of the background mask map and the character mask map; in this way, the portrait cutout problem can be decomposed, the stylized character animation is firstly roughly segmented to obtain the rough background mask map and the character mask map, and after the mask normalization processing, the fine segmentation is performed on the basis of the normalized background mask map, so as to obtain a fine cutout result, ensuring that an accurate stylized character transparent image can be obtained.

[0099] In an exemplary embodiment, after the step of aggregating each screen content feature tag to obtain screen content description text, the method further includes: obtaining edited text in response to an editing operation on the screen content description text; and obtaining the edited text as a new screen content description text.

[0100] Optionally, the server obtains the edited text in response to the editing operation on the screen content description text. The server obtains the edited text as a new screen content description text, so as to realize the control of the screen content of the animation.

[0101] In this embodiment, the edited text is obtained by responding to the editing operation on the screen content description text; the edited text is obtained as the new screen content description text; in this way, the user can edit the generated screen content description text, so that the screen content and screen style of the desired animation can be adjusted according to actual needs, thereby realizing control of the animation effect.

[0102] In order to facilitate the understanding of those skilled in the art, Figure 6 A flowchart of a method for generating a target character animation is exemplarily provided, wherein: first, the user image needs to be labeled to obtain the image label corresponding to the user image, and the image label is used as an input word; then, the input word and the action template library (or reference action video) are combined and input into a stylized animation generation model to generate a stylized character animation; then, the stylized character animation is subjected to portrait cutout processing to obtain a stylized character transparent layer; finally, the stylized character transparent layer is superimposed on the target background image to generate the target character animation.

[0103] In another embodiment, Figure 7 As shown, a character animation generation method is provided, and the method is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:

[0104] Step 702: Obtain a text describing the content of the target person image.

[0105] Step 704: input the image content description text as a prompt word into the pre-trained stylized animation generation model.

[0106] Step 706, load the motion modeling plug-in through the pre-trained stylized animation generation model to obtain the character motion pattern information, and generate a stylized character image sequence matching the image content description text based on the image content description text and the character motion pattern information through the pre-trained stylized animation generation model.

[0107] Step 708, generating a stylized character animation according to the stylized character image sequence; each frame image in the stylized character animation has the same picture content characteristics as the target character image; the animation style of the stylized character animation is a preset animation style.

[0108] Step 710 , performing portrait cutout processing on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation.

[0109] Step 712, obtain the target background image, and superimpose the stylized character transparent layer corresponding to each frame image on the target background image to generate a target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

[0110] It should be noted that the specific limitations of the above steps can refer to the specific limitations of a character animation generation method mentioned above.

[0111] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0112] Based on the same inventive concept, the embodiment of the present application also provides a character animation generation device for implementing the character animation generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more character animation generation device embodiments provided below can refer to the limitations of the character animation generation method above, and will not be repeated here.

[0113] In an exemplary embodiment, Figure 8 As shown, a character animation generation device is provided, including: an acquisition module 802, an input module 804, a cutout module 806 and a generation module 808, wherein:

[0114] The acquisition module 802 is used to acquire the picture content description text for the target person image;

[0115] The input module 804 is used to input the picture content description text as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation that matches the image content description text; each frame image in the stylized character animation has the same picture content features as the target character image; the animation style of the stylized character animation is a preset animation style;

[0116] The cutout module 806 is used to perform a cutout process on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation;

[0117] The generation module 808 is used to obtain the target background image and superimpose the stylized character transparent layer corresponding to each frame image on the target background image to generate a target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

[0118] In an exemplary embodiment, obtaining a picture content description text for a target person image includes: extracting picture content features of the target person image to obtain at least one picture content feature label corresponding to the target person image; and summarizing each picture content feature label to obtain a picture content description text.

[0119] In an exemplary embodiment, a pre-trained stylized animation generation model is obtained by inserting a motion modeling plug-in into an image stylization processing model; the motion modeling plug-in stores character motion pattern information obtained through pre-training; an input module 804 is specifically used to input the image content description text as a prompt word into the pre-trained stylized animation generation model; the motion modeling plug-in is loaded through the pre-trained stylized animation generation model to obtain the character motion pattern information, and a stylized character image sequence matching the image content description text is generated through the pre-trained stylized animation generation model based on the image content description text and the character motion pattern information; and a stylized character animation is generated based on the stylized character image sequence.

[0120] In an exemplary embodiment, the device also includes: an insertion module, used to obtain a face condition map and at least one posture condition map; the face condition map is used to control the face geometry of each frame image in the stylized character animation; any posture condition map is used to control the character posture of the corresponding frame image in the stylized character animation; the face condition map is input into the face control network, and each posture condition map is input into the posture control network; based on the face control network and the posture control network, a motion modeling plug-in is generated and inserted into the image stylization processing model to obtain a pre-trained stylized animation generation model.

[0121] In an exemplary embodiment, the cutout module 806 is specifically used to input the thumbnail corresponding to any frame image in the stylized character animation into the first mask estimation network to obtain the background mask map and the character mask map of any frame image; input the thumbnail, background mask map and character mask map corresponding to any frame image into the mask quality normalization network to obtain the normalized background mask map corresponding to any frame image; input the original image and the normalized background mask map corresponding to any frame image into the second mask estimation network to obtain the stylized character transparent layer corresponding to any frame image; the resolution of the stylized character transparent layer is higher than the resolution of the background mask map and the character mask map.

[0122] In an exemplary embodiment, the device further includes: a response module, configured to obtain the edited text in response to an editing operation on the screen content description text; and obtain the edited text as a new screen content description text.

[0123] Each module in the above-mentioned character animation generation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0124] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer 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 computer device is used to store character animation generation data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating character animation is implemented.

[0125] Those skilled in the art will understand that Fig. 9 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.

[0126] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above-mentioned method for generating character animation. The steps of the method for generating character animation here may be the steps of the method for generating character animation in each of the above-mentioned embodiments.

[0127] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the above-mentioned character animation generation method. The steps of the character animation generation method here can be the steps of the character animation generation method in each of the above-mentioned embodiments.

[0128] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, causes the processor to execute the steps of the above-mentioned method for generating character animation. The steps of the method for generating character animation here may be the steps of the method for generating character animation in each of the above-mentioned embodiments.

[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating character animation, characterized in that: The method comprises: Obtaining a text describing the contents of the target person's image; The picture content description text is input as a prompt word into a pre-trained stylized animation generation model to generate a stylized character animation matching the image content description text; each frame image in the stylized character animation has the same picture content features as the target character image; the animation style of the stylized character animation is a preset animation style; Performing portrait cutout processing on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation; A target background image is obtained, and a stylized character transparent layer corresponding to each frame image is superimposed on the target background image to generate a target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

2. The method according to claim 1, characterized in that The step of obtaining a text describing the content of the target person image includes: Extracting picture content features of the target person image to obtain at least one picture content feature label corresponding to the target person image; The picture content feature labels are summarized to obtain the picture content description text.

3. The method according to claim 1, characterized in that The pre-trained stylized animation generation model is obtained by inserting a motion modeling plug-in into an image stylization processing model; the motion modeling plug-in stores character motion pattern information obtained through pre-training; the screen content description text is input as a prompt word into the pre-trained stylized animation generation model to generate a stylized character animation matching the image content description text, including: Inputting the image content description text as the prompt word into the pre-trained stylized animation generation model; The motion modeling plug-in is loaded through the pre-trained stylized animation generation model to obtain the character motion mode information, and a stylized character image sequence matching the image content description text is generated through the pre-trained stylized animation generation model based on the image content description text and the character motion mode information; The stylized character animation is generated according to the stylized character image sequence.

4. The method according to claim 3, characterized in that The method further comprises: Acquire a face condition map and at least one posture condition map; the face condition map is used to control the face geometry of each frame image in the stylized character animation; any of the posture condition maps is used to control the character posture of the corresponding frame image in the stylized character animation; Inputting the face condition graph into a face control network, and inputting each of the posture condition graphs into a posture control network; Based on the face control network and the posture control network, the motion modeling plug-in is generated, and the motion modeling plug-in is inserted into the image stylization processing model to obtain the pre-trained stylized animation generation model.

5. The method according to claim 1, characterized in that The step of performing a portrait cutout process on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation includes: Inputting a thumbnail corresponding to the image of any frame in the stylized character animation into a first mask estimation network to obtain a background mask image and a character mask image of the image of any frame; Inputting the thumbnail image, the background mask image and the character mask image corresponding to any frame of the image into a mask quality normalization network to obtain a normalized background mask image corresponding to any frame of the image; The original image corresponding to any frame of the image and the normalized background mask image are input into the second mask estimation network to obtain a stylized character transparent layer corresponding to any frame of the image; the resolution of the stylized character transparent layer is higher than the resolution of the background mask image and the character mask image.

6. The method according to claim 1, characterized in that After the step of aggregating the picture content feature tags to obtain the picture content description text, the method further includes: In response to an editing operation on the screen content description text, obtaining an edited text; The edited text is obtained as new screen content description text.

7. A character animation generating device, characterized in that: The device comprises: An acquisition module is used to acquire a text describing the contents of a target person's image; An input module, used to input the picture content description text as a prompt word into a pre-trained stylized animation generation model to generate a stylized character animation matching the image content description text; each frame image in the stylized character animation has the same picture content features as the target character image; the animation style of the stylized character animation is a preset animation style; A cutout module, used to perform a cutout process on the stylized character animation to obtain a stylized character transparent layer corresponding to each frame image in the stylized character animation; A generation module is used to obtain a target background image, and superimpose the stylized character transparent layer corresponding to each frame image onto the target background image to generate a target character animation; the target character animation is an animation with the stylized character transparent layer corresponding to each frame image as the foreground and the target background image as the background.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Figure cartoon generation method and device assisted by fine control style migration mask

    CN119809917A