Role animation generation method and device and electronic equipment

Through two animation diffusion and animation post-processing, character animation with both facial and body movements is generated, which solves the problems of high cost and poor versatility in the existing technology, and achieves efficient and rich character animation effects.

CN118864677AActive Publication Date: 2024-10-29SHENZHEN TUYI SHIBEI TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411032428.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-29
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

Existing character animation generation methods are expensive and have poor versatility. They are difficult to express both facial movements and body movements, and cannot meet the practical application needs of most scenes.

Method used

By obtaining the original image, determine the target character's face mask image and the target character image, and perform two animation diffusions: the first diffusion generates a reference image of facial movements, and the second diffusion combines the action reference sequence to generate body movements. sequence, and conduct animation post-processing to obtain the character animation of the target character.

Benefits of technology

It realizes the rapid generation of character animation that combines facial movements and body movements, reduces production costs, improves versatility, and can meet the practical application needs of most scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864677A_ABST
    Figure CN118864677A_ABST
Patent Text Reader

Abstract

The invention provides a character animation generation method and device, electronic equipment, a storage medium and a computer program product, and relates to the technical field of computer vision. The method comprises the following steps: acquiring an original image; determining a face mask image and a target role image of the target role based on the target role and the face region thereof in the original image; taking the face mask image and the target role image as input, and performing first animation diffusion related to the face action to obtain a plurality of reference images; each reference image corresponds to one face action; acquiring an action reference sequence, and driving each reference image to perform second animation diffusion related to the body action by using the action reference sequence to obtain a plurality of action sequences; each action sequence corresponds to one reference image; and performing animation post-processing on each action sequence to obtain a role animation of the target role. The problem that role animation generation is high in cost and poor in universality in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology. Specifically, the present application relates to a method, device, electronic device, storage medium and computer program product for generating character animation. Background Art

[0002] At present, character animation has been widely used in electronic games, Internet advertising, short video animation, virtual anchors and other fields.

[0003] There are two main methods for generating character animation: the first method is based on traditional animation software technology, and the second method is based on generative AI (Artificial Intelligence) technology. However, both methods have some disadvantages. For example, in order to achieve a coherent character animation effect through continuous playback, a lot of time and labor are required, or it is difficult to achieve a character with both facial and body movements, resulting in the actual application needs in most scenarios not being met.

[0004] From the above, we can see that the existing character animation generation still has problems of high cost and poor versatility that need to be solved. Summary of the invention

[0005] The present application provides a method, device, electronic device, storage medium and computer program product for generating character animation, which can solve the problems of high cost and poor versatility of character animation generation in related technologies. The technical solution is as follows:

[0006] According to one aspect of the present application, a method for generating a character animation includes: obtaining an original image; the original image contains at least one target character with a full frontal view; based on the target character and its facial area in the original image, determining a facial mask image and a target character image of the target character; using the facial mask image and the target character image as input, performing a first animation diffusion related to facial movements to obtain a plurality of reference images; each of the reference images corresponds to a facial movement; obtaining an action reference sequence, and using the action reference sequence to drive each of the reference images to perform a second animation diffusion related to body movements to obtain a plurality of action sequences; each of the action sequences corresponds to a reference image; performing animation post-processing on each of the action sequences to obtain the character animation of the target character.

[0007] In an exemplary embodiment, the facial mask image and the target character image are used as inputs to perform a first animation diffusion related to facial movements to obtain a plurality of reference images, including: determining a position of the facial area of ​​the target character in the facial mask image based on a visible area and a mask area in the facial mask image; and locally redrawing the target character in the target character image according to the determined position and different facial movements to obtain a plurality of reference images.

[0008] In an exemplary embodiment, the target character in the target character image is partially redrawn according to the determined position and different facial actions to obtain a plurality of reference images, including: obtaining facial action prompt words; the facial action prompt words are used to describe different facial actions; the facial mask image and the target character image are input into an image diffusion model, and the facial action prompt words are used to guide the image diffusion model to generate different facial actions for the target character, and a plurality of reference images are output; the reference image refers to an image of the target character performing the facial action.

[0009] In an exemplary embodiment, the use of the action reference sequence to drive each of the reference images to perform a second animation diffusion related to body movements to obtain multiple action sequences includes: inputting each of the reference images into a video diffusion model; using the video diffusion model, according to multiple reference actions in the action reference sequence, inferring each of the reference images from a static image to a dynamic video to obtain multiple action sequences; the action sequence refers to a video in which the target character performing the facial action simultaneously performs multiple reference actions.

[0010] In an exemplary embodiment, the animation post-processing of each of the action sequences to obtain the character animation of the target character includes: sampling each of the action sequences in a set manner to obtain a number of frame blocks respectively belonging to different action sequences; splicing a number of frame blocks belonging to different action sequences to obtain the character animation of the target character; the character animation refers to a video of the target character performing a plurality of reference actions simultaneously on the basis of alternatingly performing different facial actions.

[0011] In an exemplary embodiment, the facial mask image and the target character image are determined based on the target character and its facial area in the original image, including: in response to a first circle selection operation triggered for the facial area of ​​the target character in the original image, determining the position of the facial area of ​​the target character in the original image; and based on the determined position, marking the facial area and other areas of the target character in the original image, respectively, to obtain the facial mask image.

[0012] In an exemplary embodiment, the facial mask image and the target character image are determined based on the target character and its facial area in the original image, and further includes: determining the position of the target character in the original image in response to a second circle selection operation triggered for the target character in the original image; and performing image segmentation on the target character and other target characters in the original image based on the determined position to obtain the target character image.

[0013] In an exemplary embodiment, after acquiring the original image, the method further includes: performing screening processing on the original image; the screening processing includes at least one of resolution detection, target character detection, and frontal full-body detection of the target character; deleting the original images that do not meet the set conditions, so that the original images that meet the set conditions execute the step of determining the facial mask image and the target character image of the target character based on the target character and its facial area in the original image.

[0014] In an exemplary embodiment, the facial area includes a mouth area, and the facial action includes a first mouth action and a second mouth action; the multiple reference images include a first reference image of the target character performing the first mouth action, and a second reference image of the target character performing the second mouth action; the multiple action sequences include a first action sequence in which the target character simultaneously performs the first mouth action and multiple reference actions, and a second action sequence in which the target character simultaneously performs the second mouth action and multiple reference actions; the character animation refers to a video of the target character simultaneously performing multiple reference actions on the basis of alternatingly performing the first mouth action and the second mouth action.

[0015] According to one aspect of the present application, a character animation generation device includes: an original image acquisition module, used to acquire an original image; the original image contains at least one target character with a full frontal view; an input image determination module, used to determine a facial mask image and a target character image of the target character based on the target character and its facial area in the original image; a first animation diffusion module, used to perform a first animation diffusion related to facial movements using the facial mask image and the target character image as inputs to obtain a plurality of reference images; each of the reference images corresponds to a facial movement; a second animation diffusion module, used to acquire an action reference sequence, and use the action reference sequence to drive each of the reference images to perform a second animation diffusion related to body movements to obtain a plurality of action sequences; each of the action sequences corresponds to a reference image; an animation post-processing module, used to perform animation post-processing on each of the action sequences to obtain the character animation of the target character.

[0016] According to one aspect of the present application, an electronic device includes at least one processor and at least one memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the character animation generation method as described above is implemented.

[0017] According to one aspect of the present application, a storage medium stores a computer program, which implements the character animation generation method as described above when executed by one or more processors.

[0018] According to one aspect of the present application, a computer program product includes a computer program, and when the computer program is executed by one or more processors, the character animation generation method described above is implemented.

[0019] The beneficial effects of the technical solution provided by this application are:

[0020] In the above technical scheme, an original image containing at least one target character with a full front view is obtained, so as to determine a facial mask image and a target character image of the target character based on the target character and its facial area in the original image, and then use the facial mask image and the target character image to perform a first animation diffusion related to facial movements, and then use multiple reference images corresponding to different facial movements obtained by the first animation diffusion, and combine with the action reference sequence to perform a second animation diffusion related to body movements, and finally obtain the character animation of the target character by performing animation post-processing on multiple action sequences corresponding to different reference images obtained by the second animation diffusion. In the above process, through two animation diffusions, not only can the character animation be generated quickly, avoiding reliance on manual production without consuming a lot of time and labor, but also the target character can have both facial movement performance and body movement performance, with richer character animation effects, which is conducive to meeting the actual application needs in most scenes, thereby effectively solving the problems of high cost and poor versatility of character animation generation existing in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.

[0022] Figure 1 It is a schematic diagram of the implementation environment involved in this application;

[0023] Figure 2 is a hardware structure diagram of a computer device according to an exemplary embodiment;

[0024] Figure 3 is a flow chart of a method for generating character animation according to an exemplary embodiment;

[0025] Figure 4a is a schematic diagram of a target character image according to an exemplary embodiment;

[0026] Figure 4b is a schematic diagram of a face mask image according to an exemplary embodiment;

[0027] Figure 5a is a schematic diagram of a first reference image according to an exemplary embodiment;

[0028] Figure 5b is a schematic diagram of a second reference image according to an exemplary embodiment;

[0029] Figure 6a is a schematic diagram of an action reference sequence according to an exemplary embodiment;

[0030] Figure 6b is a schematic diagram of a first action sequence according to an exemplary embodiment;

[0031] Figure 6c is a schematic diagram of a second action sequence according to an exemplary embodiment;

[0032] Figure 7 is a schematic diagram of a character animation according to an exemplary embodiment;

[0033] Figure 8 is a schematic diagram showing how to implement splicing of a first action sequence and a second action sequence at alternate frames according to an exemplary embodiment;

[0034] Fig. 9 yes Figure 3 A flowchart of step 330 in one embodiment corresponding to the embodiment;

[0035] Fig.10 yes Figure 3 A flowchart of step 350 in one embodiment corresponding to the embodiment;

[0036] Fig.11 is a schematic diagram showing a method of invoking an image diffusion model to realize partial redrawing of a target character according to an exemplary embodiment;

[0037] Fig.12 is a schematic diagram showing a method of invoking a video diffusion model to implement reasoning from a static image to a dynamic video according to an exemplary embodiment;

[0038] Fig.13 It is a schematic diagram of a specific implementation of a method for generating character animation in an application scenario;

[0039] Fig.14 is a structural block diagram of a device for generating character animation according to an exemplary embodiment;

[0040] Fig.15 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0041] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0042] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0043] As mentioned above, existing character animation mainly includes two generation methods: the first generation method is based on traditional animation software technology, and the second generation method is based on generative AI technology.

[0044] Specifically, the generation method based on traditional animation software technology usually uses traditional animation software to draw the overall character features and status details of each frame separately, and then achieves a coherent character animation effect (such as facial movement performance and body movement performance) through continuous playback. However, this method is too dependent on animators, requires a lot of time and labor, and makes the production cost of character animation very expensive.

[0045] In order to reduce the production cost of character movements, a generation method based on generative AI technology was later introduced. This generation method mainly uses a diffusion model to automatically generate a coherent character animation effect. Although compared with the generation method of traditional animation software technology, it no longer relies on animators and can save the production cost of character animation, the generated character animation effect is not rich enough. Either it can only generate the character's body movement performance but not the character's facial movement performance, or it can only generate the character's facial movement performance but not the character's body movement performance. Therefore, it cannot meet the actual application needs of most scenes.

[0046] As can be seen from the above, the related technology still has the defects of high cost and poor versatility in character animation generation.

[0047] To this end, the present application provides a character animation generation method, which can not only quickly generate character animation and avoid dependence on animators, thereby reducing the production cost of character animation, but also enable the target character to have both facial movement performance and body movement performance, with richer character animation effects, which is conducive to meeting the actual application needs in most scenarios, and thus effectively improving the versatility of character animation generation. Accordingly, the character animation generation method is suitable for a character animation generation device, which can be deployed in an electronic device, which can be a computer device configured with a von Neumann architecture, for example, the computer device includes a desktop computer, a laptop computer, a server, etc.; the electronic device can also refer to a portable and mobile electronic device, for example, the electronic device includes a smart phone, a tablet computer, etc.

[0048] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0049] Figure 1 It is a schematic diagram of an implementation environment involved in a character animation generation method. It should be noted that this implementation environment is only an example adapted to the present application and cannot be considered as providing any limitation on the scope of use of the present application.

[0050] The implementation environment includes a client 110 and a server 130 .

[0051] Specifically, the user terminal 110 may be an electronic device with an image acquisition function, including but not limited to video equipment such as cameras, cameras, and camcorders, as well as computer equipment such as desktop computers, laptop computers, and servers. It may also refer to a portable and mobile electronic device carried by a user, for example, the electronic device includes a smart phone, a tablet computer, etc. Based on this, by using the user terminal 110, at least one target character with a full front view can be captured at any time to obtain an original image, and a large amount of character animation materials can be obtained without the participation of professional animators, which is conducive to saving the expensive labor cost of character animation production.

[0052] The server 130 may be a computer device such as a desktop computer, a laptop computer, a server, or a computer cluster composed of multiple servers, or even a cloud computing center composed of multiple servers. The server 130 is used to provide background services, such as, but not limited to, automatic character animation generation services, etc.

[0053] A network communication connection is established in advance between the server 130 and the user terminal 110 by wired or wireless means, and data transmission between the server 130 and the user terminal 110 is realized through the network communication connection. The transmitted data includes but is not limited to: an original image including at least one full-body frontal target character, a character animation of the target character, and the like.

[0054] In one application scenario, through the interaction between the user terminal 110 and the server terminal 130, the user terminal 110 can shoot and collect the original image of at least one target character with a full front view, and then upload the original image to the server terminal 130 to request the server terminal 130 to provide automatic character animation generation service.

[0055] For the server 130, after receiving the original image uploaded by the user end 110, the automatic character animation generation service will be called to generate the corresponding character animation for the target character in the original image. Specifically, based on the target character and its facial area in the original image, the face mask image and the target character image of the target character are determined; the face mask image and the target character image are used as input to perform the first animation diffusion related to the facial action, and obtain multiple reference images corresponding to different facial actions; obtain the action reference sequence, and use the action reference sequence to drive each reference image to perform the second animation diffusion related to the body action, and obtain multiple action sequences corresponding to different reference images; perform animation post-processing on each action sequence to obtain the character animation of the target character. In this way, not only is the degree of automation of the character animation production high, and no professional animator is required to participate, but also the target character can have both facial action performance and body action performance, with richer character animation effects, which is conducive to meeting the actual needs in most scenes, thereby effectively solving the problems of high cost and poor versatility of character animation generation existing in the relevant technology.

[0056] For example, when the user terminal 110 is a smartphone, after the server terminal 130 generates the character animation of the target character, the server terminal 130 can receive the character animation of the target character sent by the server terminal 130 based on the network connection, and then the character animation of the target character can be further displayed to the user through the screen of the smartphone. For the user, the entire process only requires uploading the original image, which is not only highly automated but also simple and easy to use, which is conducive to improving the user's experience in making character animations.

[0057] Of course, in other application scenarios, the character animation generation service provided by the server 130 can also be independently completed by the user end 110. In this case, after the user end 110 obtains the original image, it can continue to perform two animation diffusions on the target character in the original image, and finally obtain the character animation of the target character. This does not constitute a specific limitation.

[0058] Figure 2 is a hardware structure diagram of a computer device according to an exemplary embodiment. The computer device is suitable for Figure 1 A client 110 and a server 130 in an implementation environment are shown.

[0059] It should be noted that the computer device is only an example adapted for the present application and cannot be considered to provide any limitation on the scope of use of the present application. The computer device cannot be interpreted as requiring dependence on or having Figure 2 One or more components of exemplary computer device 200 are shown.

[0060] The hardware structure of the computer device 200 may vary greatly due to differences in configuration or performance, such as Figure 2 As shown, the computer device 200 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .

[0061] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the computer device 200 .

[0062] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Figure 1 The interaction between the client 110 and the server 130 in the implementation environment is shown.

[0063] Of course, in other examples adapted by the present application, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Figure 2 As shown, this is not intended to be a specific limitation.

[0064] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.

[0065] Among them, the operating system 251 is used to manage and control the hardware devices and application programs 253 on the computer device 200 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0066] The application program 253 is essentially a computer program formed by computer-readable instructions based on the operating system 251 to complete at least one specific task, and may include at least one module ( Figure 2 Each module may include corresponding computer-readable instructions. For example, the character animation generation device may be regarded as an application 253 deployed on the computer device 200.

[0067] Data 255 may be photos, pictures, etc. stored in a disk, or may be a facial mask image and target character image of a target character, a first reference image, a second reference image, a first action sequence, a second action sequence, a character animation, an action reference sequence, facial action prompt words, various models, etc., stored in memory 250.

[0068] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 through at least one communication bus to read the computer program stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the character animation generation method is completed by the central processing unit 270 reading the application program 253 stored in the memory 250.

[0069] In addition, the present application can also be implemented through hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present application is not limited to any specific hardware circuits, software, or a combination of the two.

[0070] See also Figure 3 The embodiment of the present application provides a method for generating character animation, which is applicable to an electronic device, which may be Figure 1 The server side in the implementation environment is shown, which can also be Figure 2 The user end in the implementation environment is shown, and the hardware structure of the electronic device can be as follows Figure 2 shown.

[0071] In an exemplary embodiment, the face area includes a mouth area, and the face action includes a first mouth action and a second mouth action. The multiple reference images include a first reference image of the target character performing the first mouth action, and a second reference image of the target character performing the second mouth action. The multiple action sequences include a first action sequence in which the target character performs the first mouth action and multiple reference actions simultaneously, and a second action sequence in which the target character performs the second mouth action and multiple reference actions simultaneously. The character animation refers to a video in which the target character performs multiple reference actions simultaneously on the basis of alternatingly performing the first mouth action and the second mouth action.

[0072] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0073] like Figure 3 As shown, the method may include the following steps:

[0074] Step 310, obtaining an original image.

[0075] The original image contains at least one target character with a full frontal view.

[0076] It can be understood that the original image containing at least one target character with a full front view is used as the character animation material. Then, the target character refers to any object that can be used as the character animation material. For example, the object can be a real person, a virtual character image, a cartoon character image, etc.

[0077] The original image can be obtained by Figure 1 The user terminal in the implementation environment shown is obtained by shooting or collecting. For example, the user terminal shoots the environment where real people are located to obtain the original image, or the user terminal shoots the cartoon character image that appears on the TV to obtain the original image, or the user downloads the virtual character image that he likes from the Internet with the help of the user terminal to collect the original image. It should be noted that shooting can be a single shot or a continuous shot. For a single shot, multiple photos can be obtained, that is, multiple static images (hereinafter referred to as images). For continuous shooting, a video is obtained, which can also be understood as a dynamic video containing multiple static images. In this embodiment, the original image refers to a static image, that is, the original image can be a photo among multiple photos, or it can be any static image in a video.

[0078] The acquisition of the original image can be from an image captured or collected by the user end in real time, or from an image captured or collected by the user end in a historical period of time and stored in advance in the electronic device. Then, for the electronic device, after the original image is captured or collected by the user end, the character animation can be generated in time for the original image obtained in real time by the user end, or the character animation can be generated for the original image pre-stored in the electronic device according to the actual needs of the user, which is not specifically limited here.

[0079] The inventors realize that for some original images that do not contain the target character, the target character in the original image cannot be detected at all, or some original images that contain the target character do not have the front full body, which may lead to poor character animation effects because they are not the front full body of the target character, and even some unclear original images may lead to the inability to determine the face area of ​​the target character during the character animation production process. Then, these original images are not necessary for subsequent character animation production. Therefore, in a possible implementation method, in order to improve the efficiency of character animation production and improve the character animation effect, before executing step 330, the original images are screened to delete the original images that do not meet the set conditions. Among them, the screening process includes at least one of resolution detection, target character detection, and front full body detection of the target character.

[0080] Specifically, the resolution detection is to ensure that the width and height of the original image meet the conditions for high-quality images, that is, w(I) ≥ w θ ,h(I)≥h θ , where I represents the original image, w(I), h(I) represent the width and height of the original image, and w θ ,h θ The width and height of the high-quality image can also be considered as screening parameters for resolution detection. The screening parameters can be flexibly adjusted according to the actual needs of the user and are not limited here. At this time, the set condition is that the width and height of the original image exceed the width and height of the high-quality image. Then, for the original image whose width and height exceed the width and height of the high-quality image, it is considered to be an original image that passes the resolution detection, that is, meets the set conditions, and step 330 can be continued.

[0081] Target character detection is to call the target detection model to perform target detection on the original image to obtain the target detection result of the original image, and the target detection result is used to indicate whether the original image contains the target character. At this time, the set condition is that the original image contains at least one target character. Then, only when the original image contains at least one target character, it can be considered that the original image is an original image that passes the target character detection, that is, meets the set conditions, and step 330 can be continued. Among them, the target detection model is a machine learning model that has been trained and has the ability to perform target detection on the original image. For example, the machine learning model can be a YOLOV8 model.

[0082] The frontal full-body detection of the target character is to call the posture detection model to perform posture detection on the target character in the original image to obtain the posture detection result of the target character, and the posture detection result is used to indicate whether the posture of the target character in the original image is the frontal full-body. At this time, the set condition is that the posture of the target character in the original image is the frontal full-body. Then, when the posture of the target character in the original image is the frontal full-body, it can be considered that the original image is the original image that passes the frontal full-body detection of the target character, that is, meets the set condition, and step 330 can be continued. Among them, the posture detection model is a trained machine learning model that has the ability to perform posture detection on the target character in the original image. For example, the machine learning model can be a GhostNet model.

[0083] In this way, the original images that meet the set conditions can continue to determine the target character's facial mask image and the target character image, avoiding subsequent processing of the original images that do not meet the set conditions. This is not only beneficial to improving the efficiency of character animation generation, but also beneficial to improving the character animation effect.

[0084] Step 330: Determine the target character's facial mask image and the target character image based on the target character and its facial region in the original image.

[0085] The target character image refers to an image containing the full body of the target character from the front, and the face mask image refers to an image in which the face region of the target character can be significantly distinguished from other regions. For example, the face mask image can be a binary image, in which the region with a pixel value of 0 represents other regions of the target character, and the region with a pixel value of 255 represents the face region of the target character.

[0086] For example, Figure 4a A schematic diagram showing a target character image in one embodiment is shown, Figure 4b A schematic diagram of a face mask image in one embodiment is shown. Figure 4a In the target character image, there is only one target character, and the target character is in a full-body frontal position. Figure 4b In the figure, the face mask image includes a visible area and a mask area, wherein the white visible area represents the face area of ​​the target character, and the visible area particularly refers to the mouth area of ​​the target character, and the black mask area represents other areas of the target character.

[0087] In a possible implementation, the facial mask image of the target character can be determined by the user's circle selection method, or it can be implemented by using a model, which is not specifically limited here and can be selected according to the actual needs of the user in different application scenarios. For example, for application scenarios with high precision requirements, the user can determine the facial mask image of the target character by circle selection, and for application scenarios with high efficiency requirements or high automation requirements, the user can choose to determine the facial mask image of the target character by calling a model. Taking the model call to determine the mouth area of ​​the target character as an example, after obtaining the original image, the target detection model is first used to perform target detection on the original image to determine the area where the target character is located in the original image, and then the face detection model is used to perform face detection on the area where the target character is located in the original image to determine the face area of ​​the target character in the original image, and then the semantic segmentation model is used to segment the mouth area from the face area, and finally, based on the segmented mouth area, the value of each pixel contained in the mouth area in the original image is marked as 255, and the value of each pixel contained in other areas in the original image is marked as 0, and finally the face mask image of the target character is obtained, which can also be understood as obtaining the mouth mask image of the target character.

[0088] Similarly, for an original image containing multiple target characters, in a possible implementation method, the user can also choose to circle or call the model to determine the target character image according to the actual needs of the application scenario, so that the subsequent character animation generation is performed in units of the target character image corresponding to each target character. Taking the determination of the target character image by model call as an example, after obtaining the original image, the target detection model is first used to perform target detection on the original image to determine the area where each target character is located in the original image, and then the semantic segmentation model is used to segment the area where each target character is located, so that the target character image corresponding to each target character can be obtained.

[0089] Step 350 , using the facial mask image and the target character image as input, performing a first animation diffusion related to facial movements to obtain a plurality of reference images.

[0090] Among them, each reference image corresponds to a facial action respectively. It can also be considered that the reference image refers to an image of the target character performing the facial action.

[0091] In a possible implementation, on the basis that the facial action includes a first mouth action and a second mouth action, the reference image includes a first reference image and a second reference image. Among them, the first reference image refers to an image of the target character performing the first mouth action, and the second reference image refers to an image of the target character performing the second mouth action. It is explained here that the first reference image and the second reference image are also static images. Compared with the target character in the original image, the target character in the first reference image performs the first mouth action, and the target character in the second reference image performs the second mouth action. Among them, the first mouth action and the second mouth action are both considered to be facial action performances, which can be opening the mouth, closing the mouth, pouting, smiling, etc. It is worth mentioning that the facial action performance is not limited to the mouth area, but can also be the eye area. Then, the facial action performance can also refer to eye actions such as opening eyes, closing eyes, squinting, crying, etc. The embodiments of the present application all take the facial action performance realized by the mouth area as an example to describe in detail the process of character animation generation, but do not constitute a specific limitation on this.

[0092] In this embodiment, the purpose of the first animation diffusion is to enable the target character in the static image to perform facial movements, that is, to enable the target character in the static image to have facial movement performance. In a possible implementation, the first animation diffusion can be achieved by partially redrawing the target character in the static image. Among them, the local redrawing can be achieved using an image diffusion algorithm, which includes but is not limited to anything-4.0-inpainting, SD-XL-Inpainting0.1, PowerPaint, etc.

[0093] For example, Figure 5a A schematic diagram showing a first reference image of a target character performing a first mouth movement in one embodiment, Figure 5b A schematic diagram showing a second reference image of a target character performing a second mouth action in one embodiment. Figure 5a and 5b As shown, the first mouth movement in the first reference image refers to the mouth closing movement, and the second mouth movement in the second reference image refers to the mouth opening movement. Figure 4a The target character shown can also be understood as, after the first animation diffusion, the target character changes from having no facial action to being able to perform the first mouth action and the second mouth action, thereby realizing that the target character has facial action. Of course, in this embodiment, since the first mouth action is a mouth-closing action, Figure 4a The target character shown actually performs the closing mouth action, which is equivalent to that there is no difference between the first reference image and the target character image. However, not in all cases there is no difference between the two. If the first mouth action is a pouting action or other mouth actions different from the closing mouth action, then there will inevitably be changes from the target character image to the first reference image.

[0094] Step 370 , obtaining an action reference sequence, and using the action reference sequence to drive each reference image to perform a second animation diffusion related to the body action, to obtain multiple action sequences.

[0095] Each action sequence corresponds to a reference image. It can also be considered that the action sequence refers to a video in which a target character performing a facial action also performs a plurality of reference actions while performing the facial action.

[0096] In a possible implementation, on the basis that the reference image includes a first reference image and a second reference image, the first action sequence refers to a video in which a target character performing a first mouth action performs a plurality of reference actions simultaneously, and the second action sequence refers to a video in which a target character performing a second mouth action performs a plurality of reference actions simultaneously. In other words, the first action sequence and the second action sequence are essentially a dynamic video, which can be composed of a plurality of static images, and the target character in each static image performs a mouth action and a reference action simultaneously. It can also be considered that the target character in the first action sequence and the second action sequence has both facial action performance and body action performance.

[0097] First of all, it should be noted that the action reference sequence is a dynamic video composed of a series of static images containing different reference actions. In other words, the action reference sequence is composed of multiple static images in the dynamic video, and each static image corresponds to a reference action.

[0098] In a possible implementation, the action reference sequence can be represented by a skeleton sequence. The skeleton sequence includes multiple skeleton images, each of which is used to describe multiple key points of an object performing different actions. The object refers to any object that can perform an action, which can be a person, a robot, an animal, etc. Taking the object as an example, the key points of the human body used to construct the skeleton sequence may include but are not limited to: nose, left eye, right eye, left ear, right ear, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left knee, right knee, left ankle, right ankle, etc.

[0099] Take the skeleton sequence constructed by the key points of the human body to represent the action reference sequence as an example. Figure 6a A schematic diagram of an embodiment of an action reference sequence including different reference actions is shown. Figure 6a In the example, each reference action in the action reference sequence may be a different dance action. It should be understood that these different dance actions are respectively constituted by key points of the human body located at different positions in the static image.

[0100] The acquisition of action reference sequences can come from action reference sequences that are pre-made and stored in an electronic device. Then, in the process of character animation generation, the user can select any action reference sequence from multiple pre-stored action reference sequences to participate in the second animation diffusion, so as to meet the personalized needs of character animation generation, or the electronic device can actively push any action reference sequence to the user to participate in the second animation diffusion, so as to further improve the degree of automation of character animation generation. This embodiment does not limit this.

[0101] Secondly, the purpose of the second animation diffusion is to enable the target character in each static image contained in the dynamic video to perform the reference action contained in the action reference sequence, that is, to enable the target character in the dynamic video to have body action performance. It should be understood that after two animation diffusions, the target character in the dynamic video can perform both facial actions and body actions at the same time, that is, the target character in the dynamic video has both facial action performance and body action performance.

[0102] In a possible implementation, the second animation diffusion is achieved by inferring the dynamic video from the static image under the guidance of the action reference sequence. The inference from the static image to the dynamic video can be achieved by using a video diffusion algorithm, which includes but is not limited to Moore-AnimateAnyone, MusePose, etc.

[0103] For example, Figure 6b A schematic diagram showing a first action sequence in one embodiment in which a target character simultaneously performs a first mouth action and different reference actions, Figure 6c A schematic diagram of a second action sequence in one embodiment is shown in which the target character simultaneously performs a second mouth action and a different reference action. Figure 6a Guided by the action reference sequence shown, Figure 5a Based on the first reference image of the target character performing the closing action shown, Figure 6b As shown in FIG. 1 , the target character in the first action reference sequence not only performs the mouth-closing action but also performs different reference actions. Figure 5b Based on the second reference image of the target character performing the mouth opening action shown, Figure 6cAs shown, the target character in the second action reference sequence not only performs the mouth opening action but also performs different reference actions. It is worth mentioning that the guidance of the action reference sequence here actually refers to mapping the reference actions contained in each static image in the action reference sequence to the first reference image and the second reference image, respectively, to form multiple first reference images and multiple second reference images in which the target character performs different reference actions, and then the multiple first reference images and the multiple second reference images respectively constitute the first action sequence and the second action sequence, so that the reference actions contained in each static image in the action reference sequence have a one-to-one correspondence with the reference actions contained in each static image in the first action reference sequence / the second action reference sequence.

[0104] Step 390, performing animation post-processing on each action sequence to obtain the character animation of the target character.

[0105] Among them, character animation refers to a video in which the target character performs multiple reference actions simultaneously based on alternating different facial actions.

[0106] In a possible implementation, on the basis that the facial action includes a first mouth action and a second mouth action, the character animation refers to a video in which the target character simultaneously performs a plurality of reference actions on the basis of alternately performing the first mouth action and the second mouth action.

[0107] Still using the above example to illustrate, Figure 7 A schematic diagram showing an embodiment of character animation is shown in Figure 7 In the figure, the target character not only performs the closing and opening mouth actions alternately, but also performs different reference actions. It can be seen that the character animation generated through steps 310 to 390 can enable the target character to have both facial and body action performances, and the character animation effect is richer.

[0108] In a possible implementation, animation post-processing may include at least one of video super-resolution processing, video background removal processing, and video stitching processing.

[0109] Among them, video super-resolution processing refers to performing super-resolution operations on each action sequence separately to obtain multiple high-definition action sequences, thereby fully ensuring that the character animation has a high-definition effect.

[0110] The purpose of video background removal is to make each action sequence retain only the target character and the transparent background, so as to facilitate the user's subsequent synthesis based on the character animation, and further help to improve the user's character animation production experience. The video background removal process can be implemented by calling the cutout model. By calling the cutout model, the background area except the target character in each static image contained in multiple action sequences is set to transparent.

[0111] The video stitching process may include the following steps: sampling each action sequence according to a set method to obtain a number of frame blocks belonging to different action sequences; stitching a number of frame blocks belonging to different action sequences to obtain a character animation of a target character.

[0112] In a possible implementation, the setting method includes an alternate frame sampling method. For example, Figure 8 As shown, the first action sequence and the second action sequence are first divided into n frame blocks respectively, and then the first action sequence is sampled to obtain the first first frame block, the third first frame block, the fifth first frame block, ..., the nth first frame block respectively, and the second action sequence is sampled to obtain the second second frame block, the fourth second frame block, the sixth second frame block, ..., the n-1th second frame block respectively, and finally the sampled frame blocks are spliced ​​in sequence to obtain the character animation of the target character, specifically: the first first frame block, the second second frame block, the third first frame block, the fourth second frame block, the fifth first frame block, the sixth second frame block, ..., the n-1th second frame block, the nth first frame block. Of course, n can be flexibly adjusted according to the actual needs of the user to ensure that the character animation effect is smoother and more delicate. Although the splicing here is based on the first action sequence and the second action sequence corresponding to two facial actions, in other embodiments, the splicing can also be based on different action sequences corresponding to multiple facial actions. For example, the character animation can be spliced ​​by the first action sequence corresponding to the closing action, the second action sequence corresponding to the opening action, the third action sequence corresponding to the pouting action, and the fourth action sequence corresponding to the smiling action. This does not constitute a specific limitation here.

[0113] Through the above process, through two animation diffusions, not only can character animation be generated quickly, avoiding dependence on animators to make animations frame by frame, without consuming a lot of time and labor, it can effectively save expensive time and labor costs, and is conducive to improving the efficiency of character animation production, but also can make the target character have both facial and body movement performances, with richer character animation effects, and can better meet the actual application needs in most scenes, thereby effectively solving the problems of high cost and poor versatility of character animation generation in related technologies.

[0114] See also Fig. 9 In an exemplary embodiment, step 330 may include the following steps:

[0115] Step 331 : In response to a first circle selection operation triggered on the facial region of the target character in the original image, a position of the facial region of the target character in the original image is determined.

[0116] In this embodiment, the facial mask image is determined based on the user's circle selection.

[0117] In order to facilitate the user to circle the facial area of ​​the target character in the original image, a circle selection entrance will be provided to the user, and the user can then complete the circle selection operation on the facial area of ​​the target character in the original image through the circle selection entrance.

[0118] Taking the user's smartphone as an example, the smartphone is deployed with a client with a character animation generation function, which at least includes uploading the original image, circling the facial area of ​​the target character, etc. As the client runs, the smartphone will display an auxiliary page for assisting the character animation generation to the user. The auxiliary page displays a circling entry. For example, the circling entry can be a "brush", and the user can slide the "brush" to directly circle the facial area of ​​the target character in the original image. For the smartphone, the sliding operation can be detected to determine the position of the facial area of ​​the target character in the original image. Among them, the sliding operation can be regarded as the first circling operation triggered for the facial area of ​​the target character in the original image.

[0119] It should be noted that the operation type of the first circle selection operation will also be different depending on the input component configured in the electronic device. For example, if the electronic device is a smart phone and the input component configured includes a touch screen, the first circle selection operation may be a gesture operation such as clicking or sliding. If the electronic device is a desktop computer and the input component configured includes a mouse or a keyboard, the first circle selection operation may be a mechanical operation such as single-clicking, double-clicking, or dragging. This does not constitute a specific limitation.

[0120] Step 333: Based on the determined position, the facial region and other regions of the target character in the original image are marked respectively to obtain a facial mask image of the target character.

[0121] The marking process refers to setting different values ​​for the pixels in different regions of the target character in the original image, so that the face region of the target character in the face mask image can be significantly distinguished from other regions. For example, the value of the pixels in the face region of the target character in the original image is set to 255, that is, the face region of the target character is a white region in the face mask image; the value of the pixels in other regions of the target character in the original image is set to 0, that is, the other regions of the target character are black regions in the face mask image.

[0122] Thus, through the marking process, the facial area and other areas of the target character in the original image are segmented, thereby laying a foundation for subsequently uniquely determining the position of the target character in the target character image for local redrawing.

[0123] In addition, if the original image contains multiple target characters, the multiple target characters in the original image can also be identified by the user circling, and then subsequent character animation generation is performed for each target character identified by the user, thereby ensuring the accuracy of recognition.

[0124] In an exemplary embodiment, step 330 may further include the following steps:

[0125] Step 335 : In response to a second circle selection operation triggered on the target character in the original image, determine the position of the target character in the original image.

[0126] Similarly, similar to the first circle selection operation, the second circle selection operation can also be a gesture operation such as clicking, sliding, etc., or a mechanical operation such as single-clicking, double-clicking, dragging, etc., which will not be repeated here.

[0127] Step 337 , based on the determined position, perform image segmentation on the target character in the original image to obtain an image of the target character.

[0128] That is to say, for an original image containing multiple target characters with full body and front view, after image segmentation, more than one target character image can be obtained, and each target character image only contains one target character with full body and front view. In other words, the character animation generation process in each embodiment of the present application is performed on a single target character basis.

[0129] Of course, in other embodiments, for an original image containing multiple target characters, the image segmentation model can also be used to automatically identify the multiple target characters in the original image, and then subsequent character animation generation can be performed for each automatically identified target character to ensure efficient automatic recognition. This embodiment does not constitute a specific limitation to this.

[0130] With the cooperation of the above embodiments, the facial mask image and the target character image of the target character are determined, which are used as the basis for the first animation diffusion to realize the generation of character animation.

[0131] See also Fig.10 In an exemplary embodiment, step 350 may include the following steps:

[0132] Step 351: Determine the position of the face area of ​​the target character in the face mask image based on the visible area and the mask area in the face mask image.

[0133] The visible area is used to describe the face area of ​​the target character, and the mask area is used to describe other areas of the target character. Figure 4b, the visible area is white and the mask area is black, that is, the value of each pixel in the visible area is set to 255, and the value of each pixel in the mask area is set to 0, so that the mouth area and other areas of the target character can be significantly distinguished in the face mask image.

[0134] Based on this, after obtaining the facial mask image of the target character, the position of the facial area of ​​the target character can be uniquely determined based on the visible area and the mask area in the facial mask image, thereby laying the foundation for the subsequent local redrawing of the target character in the target character image. That is, the position of the facial area of ​​the target character in the facial mask image can be used to uniquely determine the same position in the target character image, and then the local area of ​​the target character at the same position can be redrawn.

[0135] Step 353 , based on the determined position and different facial movements, the target character in the target character image is partially redrawn to obtain a plurality of reference images.

[0136] In this embodiment, the local redrawing of the target character in the target character image based on the position of the target character's facial region in the facial mask image, especially the redrawing of the local area of ​​the target character in the target character image based on the position of the target character's facial region in the facial mask image, is realized by calling the image diffusion model. The image diffusion model is a machine learning model that has been trained and has the ability to perform local redrawing of the target character in the target character image.

[0137] Specifically, if Fig.11 As shown, the process of calling the image diffusion model to realize the local redrawing of the target character may include the following steps:

[0138] The first step is to obtain facial action prompts.

[0139] The facial action prompt words are used to describe different facial actions. For example, the facial action prompt words may be "close mouth" and "open mouth". Of course, in other embodiments, if more different facial actions need to be generated for the target character, the facial action prompt words may be modified to guide the image diffusion model to generate more different facial actions.

[0140] In the second step, the facial mask image and the target character image are input into the image diffusion model, and the facial action prompt words are used to guide the image diffusion model to generate different facial actions for the target character, and multiple reference images of the target character performing different facial actions are output.

[0141] Under the effect of the above embodiments, under the guidance of the facial action prompt words, the image diffusion model can automatically generate facial actions matching the facial action prompt words for the target character, so that the target character has facial action performance.

[0142] See also Fig.12 In an exemplary embodiment, step 370 may include the following steps:

[0143] In the first step, each reference image is input into the video diffusion model.

[0144] In the second step, the video diffusion model is used to infer each reference image from a static image to a dynamic video according to multiple reference actions in the action reference sequence, and multiple action sequences are obtained.

[0145] In this embodiment, the reasoning from static images to dynamic videos is achieved by calling a video diffusion model, which is a machine learning model that has been trained and has the ability to reason from static images to dynamic videos.

[0146] Let’s continue with the above example. Figures 5a to 6c , through the call of the video diffusion model, based on Figure 6a Different reference actions in the action reference sequence are mapped to Figure 5a The first reference image and Figure 5b The second reference image is used to form a plurality of first reference images and a plurality of second reference images of the target character performing different reference actions, and then the plurality of first reference images and the plurality of second reference images respectively constitute Figure 6b The first action sequence and Figure 6c The second action sequence. It can be seen that Figure 6a The reference actions contained in each static image in the action reference sequence are respectively Figure 6b The first action reference sequence of / Figure 6c The reference actions included in each static image in the second action reference sequence have a one-to-one correspondence. In addition, the target character included in each static image in the first action reference sequence / the second action reference sequence also performs the same Figure 5a The first reference image / Figure 5b The second reference image corresponds to different mouth movements.

[0147] In the above process, under the guidance of the action reference sequence, the video diffusion model can be used to automatically infer the corresponding action sequence from each reference image from the static image, so that the target character not only has facial action performance, but also body action performance.

[0148] Fig.13 This is a schematic diagram of a specific implementation of a character animation generation method in an application scenario. Figure 1The user end in the illustrated implementation environment independently completes the character animation generation, for example, the user end can be an electronic device such as a desktop computer, a laptop computer, a smart phone, a tablet computer, etc. Among them, the target character is a cartoon character image (i.e., a cartoon character), the original image is an original image containing the cartoon character (i.e., a cartoon character picture), the facial action includes a mouth action, and the mouth action includes an opening action and a closing action, thereby forming a mouth mask image of the cartoon character and a cartoon character image, and a reference image corresponding to a mouth action includes a first reference image and a second reference image, and an action sequence corresponding to a reference image includes a first action sequence and a second action sequence.

[0149] like Fig.13 As shown, as the client with the character animation generation function is running, the user can upload the cartoon character picture to the user terminal with the help of the client. At this time, after the user terminal obtains the cartoon character picture, it can provide the user with automatic character animation generation service.

[0150] Specifically, first, the cartoon character pictures uploaded by users are subjected to resolution detection, cartoon character recognition, and T-Pose frontal full-body detection. Only when the cartoon character pictures pass the resolution detection, cartoon character recognition, and T-Pose frontal full-body detection can the next step of "user interactive drawing" be entered, that is, the user is prompted to circle the mouth area of ​​the cartoon character in the cartoon character picture. Otherwise, the user is prompted to upload the cartoon character picture again.

[0151] The user will use the client to circle the mouth area of ​​the cartoon character in the cartoon character picture that has passed the above detection. At this time, the user end can detect the circle selection operation, and thus obtain the mouth mask image and cartoon character image of the cartoon character by marking the mouth area and other areas of the cartoon character in the cartoon character picture.

[0152] Then, after the first animation diffusion, namely "picture diffusion", the mouth area of ​​the cartoon character in the cartoon character image is partially redrawn to obtain a first reference image of the cartoon character performing a closing mouth action and a second reference image of the cartoon character performing a opening mouth action, so that the cartoon character can have facial action performance, especially facial speaking performance.

[0153] After the second animation diffusion, i.e., "video diffusion", the two reference images are driven by the action reference sequence to generate two action video sequences, specifically: the first reference image generates the first action sequence, i.e., a video of the cartoon character performing the mouth-closing action and performing different reference actions at the same time, and the second reference image generates the second action sequence, i.e., a video of the cartoon character performing the mouth-opening action and performing different reference actions at the same time, so that the cartoon character has body action performance. Of course, the body action performance depends on the reference actions in the action reference sequence, which can be selected by the user from a number of pre-provided action reference sequences, or automatically pushed to the user by the user end.

[0154] Finally, through animation post-processing such as video super-resolution, background removal by cutout, and video frame stitching, the output character animation has both facial and body movement expressions, which is no longer as single as in related technologies.

[0155] In this application scenario, on the one hand, there is no need for professional animators to participate. Users only need to upload pictures and circle the mouth area of ​​the character in the picture. It is simple and easy to use, which can not only effectively enrich the character animation generation materials, but also greatly save the expensive manpower cost of character animation production. On the second hand, in the character animation generation process, various detections, two animation diffusions, and animation post-processing are all automatically completed by the user end, with a high degree of automation. Character animation can be generated quickly without relying on animators to make animations frame by frame, which can save a lot of time cost for character animation production and is conducive to improving the efficiency of character animation production. On the third hand, the characters in the character animation can have both facial speaking performance and body movement performance, with richer character animation effects, which can meet the actual application needs of most scenes and is conducive to improving the versatility of character animation.

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

[0157] The following is an embodiment of the device of the present application, which can be used to execute the character animation generation method involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the character animation generation method involved in the present application.

[0158] See also Fig.14 In an embodiment of the present application, a character animation generating device 900 is provided, including but not limited to: an original image acquisition module 910, an input image determination module 930, a first animation diffusion module 950, a second animation diffusion module 970, and an animation post-processing module 990.

[0159] The original image acquisition module 910 is used to acquire an original image; the original image contains at least one target character with a full front view.

[0160] The input image determination module 930 is used to determine the face mask image and the target character image of the target character based on the target character and its face area in the original image.

[0161] The first animation diffusion module 950 is used to take the facial mask image and the target character image as input, perform the first animation diffusion related to the facial action, and obtain a plurality of reference images, each of which corresponds to a facial action.

[0162] The second animation diffusion module 970 is used to obtain a motion reference sequence, and use the motion reference sequence to drive each reference image to perform a second animation diffusion related to the body motion, thereby obtaining multiple motion sequences, each of which corresponds to a reference image.

[0163] The animation post-processing module 990 is used to perform animation post-processing on each action sequence to obtain the character animation of the target character.

[0164] In an exemplary embodiment, the first animation diffusion module 950 is also used to perform the following steps: determine the position of the facial area of ​​the target character in the facial mask image based on the visible area and the mask area in the facial mask image; and locally redraw the target character in the target character image according to the determined position to obtain a first reference image and a second reference image.

[0165] In an exemplary embodiment, the first animation diffusion module 950 is also used to perform the following steps: obtaining facial action prompt words; the facial action prompt words are used to describe different facial actions; the facial mask image and the target character image are input into the image diffusion model, and the facial action prompt words are used to guide the image diffusion model to generate different facial actions for the target character, and output multiple reference images; the reference image refers to an image of the target character performing the facial action.

[0166] In an exemplary embodiment, the second animation diffusion module 970 is also used to perform the following steps: input each reference image into a video diffusion model; using the video diffusion model, based on multiple reference actions in the action reference sequence, infer each reference image from a static image to a dynamic video to obtain multiple action sequences; the action sequence refers to a video in which a target character performing a facial action performs multiple reference actions simultaneously.

[0167] In an exemplary embodiment, the animation post-processing module 990 is also used to perform the following steps: sampling each action sequence in a set manner to obtain a number of frame blocks belonging to different action sequences; splicing a number of frame blocks belonging to different action sequences to obtain a character animation of the target character; character animation refers to a video of the target character performing multiple reference actions simultaneously on the basis of alternating different facial actions.

[0168] In an exemplary embodiment, the input image determination module 930 is also used to perform the following steps: in response to a first circle selection operation triggered on the facial area of ​​the target character in the original image, determine the position of the facial area of ​​the target character in the original image; based on the determined position, mark the facial area and other areas of the target character in the original image respectively to obtain a facial mask image.

[0169] In an exemplary embodiment, the input image determination module 930 is also used to perform the following steps: in response to a second circle selection operation triggered for the target character in the original image, determine the position of the target character in the original image; based on the determined position, perform image segmentation on the target character and other target characters in the original image to obtain a target character image.

[0170] In an exemplary embodiment, the character animation generating device 900 is also used to perform the following steps: screening the original image; the screening process includes at least one of resolution detection, target character detection, and frontal full-body detection of the target character; deleting the original images that do not meet the set conditions, so that the original images that meet the set conditions execute the steps of determining the target character's facial mask image and the target character image based on the target character and its facial area in the original image.

[0171] In an exemplary embodiment, the facial area includes a mouth area, and the facial action includes a first mouth action and a second mouth action; the multiple reference images include a first reference image of the target character performing the first mouth action, and a second reference image of the target character performing the second mouth action; the multiple action sequences include a first action sequence in which the target character simultaneously performs the first mouth action and multiple reference actions, and a second action sequence in which the target character simultaneously performs the second mouth action and multiple reference actions; the character animation refers to a video of the target character simultaneously performing multiple reference actions on the basis of alternatingly performing the first mouth action and the second mouth action.

[0172] It should be noted that, when the character animation generation device provided in the above embodiment performs character animation generation, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the character animation generation device will be divided into different functional modules to complete all or part of the functions described above.

[0173] In addition, the character animation generation device and the character animation generation method provided in the above embodiments belong to the same concept, and the specific manner in which each module performs operations has been described in detail in the method embodiments, which will not be repeated here.

[0174] See also Fig.15 In an embodiment of the present application, an electronic device 4000 is provided, and the electronic device 4000 may include: a smart phone, a tablet computer, a desktop computer, a laptop computer, a server, etc.

[0175] exist Fig.15 In the embodiment, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.

[0176] The data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.15 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0177] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0178] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0179] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store a computer program in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to this.

[0180] The memory 4003 stores a computer program, and the processor 4001 can read the computer program stored in the memory 4003 through the communication bus 4002 .

[0181] The computer program is executed by one or more processors 4001 to implement the character animation generation method in the above-mentioned embodiments.

[0182] In addition, an embodiment of the present application provides a storage medium on which a computer program is stored. The computer program is executed by one or more processors to implement the character animation generation method as described above.

[0183] A computer program product is provided in an embodiment of the present application, including a computer program, which is executed by one or more processors to implement the character animation generation method as described above.

[0184] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating character animation, characterized in that: The method comprises: Acquire an original image; the original image contains at least one target character with a full body and a front view; Based on the target character and its facial region in the original image, determining a facial mask image and a target character image of the target character; Taking the facial mask image and the target character image as input, performing a first animation diffusion related to facial movements to obtain a plurality of reference images; each of the reference images corresponds to a facial movement; Acquire an action reference sequence, and use the action reference sequence to drive each reference image to perform a second animation diffusion related to the body action, thereby obtaining a plurality of action sequences; each action sequence corresponds to one reference image; Perform animation post-processing on each of the action sequences to obtain the character animation of the target character.

2. The method according to claim 1, characterized in that The method uses the facial mask image and the target character image as inputs to perform a first animation diffusion related to facial movements to obtain a plurality of reference images, including: Determining a position of the facial region of the target character in the facial mask image based on the visible region and the mask region in the facial mask image; According to the determined position and different facial movements, the target character in the target character image is partially redrawn to obtain a plurality of reference images.

3. The method according to claim 2, characterized in that The step of partially redrawing the target character in the target character image according to the determined position and different facial movements to obtain a plurality of reference images includes: Acquire facial action prompt words; the facial action prompt words are used to describe different facial actions; The facial mask image and the target character image are input into an image diffusion model, and the facial action prompt words are used to guide the image diffusion model to generate different facial actions for the target character, and multiple reference images are output; the reference image refers to an image of the target character performing the facial action.

4. The method according to claim 1, characterized in that The step of using the action reference sequence to drive each reference image to perform a second animation diffusion related to the body action to obtain multiple action sequences includes: Inputting each of the reference images into a video diffusion model; The video diffusion model is used to infer each of the reference images from a static image to a dynamic video according to multiple reference actions in the action reference sequence, thereby obtaining multiple action sequences; the action sequence refers to videos in which the target character performing the facial action performs multiple reference actions simultaneously.

5. The method according to claim 1, characterized in that The step of performing animation post-processing on each of the action sequences to obtain the character animation of the target character comprises: Sampling each of the action sequences according to a set method to obtain a plurality of frame blocks respectively belonging to different action sequences; Several frame blocks belonging to different action sequences are spliced ​​together to obtain the character animation of the target character; the character animation refers to a video in which the target character simultaneously performs a plurality of reference actions on the basis of alternately performing different facial actions.

6. The method according to claim 1, characterized in that The step of determining the face mask image and the target character image of the target character based on the target character and the face region thereof in the original image comprises: In response to a first circle selection operation triggered on a facial region of the target character in the original image, determining a position of the facial region of the target character in the original image; Based on the determined position, the facial region and other regions of the target character in the original image are respectively marked to obtain the facial mask image.

7. The method according to claim 1, characterized in that After acquiring the original image, the method further includes: Performing screening processing on the original image; the screening processing includes at least one of resolution detection, target character detection, and front and full body detection of the target character; The original images that do not meet the set conditions are deleted, so that the original images that meet the set conditions execute the step of determining the face mask image and the target character image of the target character based on the target character and its facial area in the original image.

8. The method according to any one of claims 1 to 7, characterized in that The facial region includes a mouth region, and the facial motion includes a first mouth motion and a second mouth motion; The plurality of reference images include a first reference image of the target character performing the first mouth action, and a second reference image of the target character performing the second mouth action; The plurality of action sequences include a first action sequence in which the target character performs the first mouth action and a plurality of reference actions simultaneously, and a second action sequence in which the target character performs the second mouth action and a plurality of reference actions simultaneously; The character animation refers to a video in which the target character simultaneously performs a plurality of reference actions on the basis of alternately performing the first mouth action and the second mouth action.

9. A character animation generating device, characterized in that: The device comprises: An original image acquisition module, used to acquire an original image; the original image contains at least one target character with a full body and a front view; An input image determination module is used to determine a facial mask image and a target character image of the target character based on the target character and its facial area in the original image; A first animation diffusion module, used to take the facial mask image and the target character image as input, perform a first animation diffusion related to facial movements, and obtain a plurality of reference images; each of the reference images corresponds to a facial movement; A second animation diffusion module is used to obtain an action reference sequence, and use the action reference sequence to drive each reference image to perform a second animation diffusion related to the body action, so as to obtain multiple action sequences; each action sequence corresponds to one reference image; The animation post-processing module is used to perform animation post-processing on each of the action sequences to obtain the character animation of the target character.

10. An electronic device comprising at least one processor and at least one memory, wherein: The memory stores a computer program, wherein the computer program, when executed by the processor, implements the character animation generation method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Animation production method of figure whole body actions

    CN104318602A

  • Expression creation method and device

    CN114140564A

  • Virtual character animation generation method and device, storage medium and terminal

    CN114219878A

  • Video generation method and device, equipment and medium

    CN117078817A

  • Animation generation method and device and electronic equipment

    CN117292026A

Cited By

  • Video animation intelligent generation system based on AIGC

    CN119383425A