Special effect image generation method and device, electronic equipment and storage medium
By optimizing the initial facial image to match the deformation data during the generation of virtual facial expression effects, the problem of facial feature loss was solved, and the visual expressiveness of the effect images was improved.
Patent Information
- Application Number
- CN202410459069.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2025-10-24
AI Technical Summary
In existing technologies, the facial features of the initial portrait are easily lost during the generation of virtual facial expression effects, resulting in poor realism and visual effects in the generated effect images.
By acquiring fused deformation data and an initial facial image, a corrected facial image is generated to match the element contours of the deformed elements in the fused deformation data. Based on the corrected facial image and the fused deformation data, a special effects expression image is generated to avoid loss of facial features.
Improved the shape matching between deformation elements and facial elements in special effect expression images, enhanced the visual expressiveness of expression effects, and ensured that facial features are not obscured.
Smart Images

Figure CN120833410A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of artificial intelligence, and particularly relate to a special effect image generation method and device, electronic equipment and storage medium. BACKGROUND
[0002] Currently, in various application programs with image and video editing functions, virtual expression special effects for portraits are provided for users. Through the virtual expression special effects, portrait features such as facial expressions and facial feature shapes can be changed, so as to add virtual expressions to the characters in the portrait and improve the interestingness and expressiveness of the generated portrait pictures or videos.
[0003] In the prior art, the generation process of the virtual expression special effects is usually based on fixed expression special effect templates to process the initial portrait, so as to achieve the purpose of changing the facial expression of the character in the initial portrait.
[0004] However, the prior art has the problem of loss of facial features in the initial portrait. SUMMARY
[0005] Embodiments of the present disclosure provide a special effect image generation method, device, electronic equipment and storage medium to overcome the problem of loss of facial features.
[0006] In a first aspect, embodiments of the present disclosure provide a special effect image generation method, comprising:
[0007] obtaining fusion deformation data and an initial facial image, wherein the fusion deformation data includes at least one deformation element constituting a target expression, and the initial facial image includes a first facial element of the same type as the deformation element; processing the initial facial image based on the fusion deformation data to generate a corrected facial image, wherein the corrected facial image includes a second facial element, and the second facial element matches the element contour of the corresponding deformation element in the fusion deformation data; and generating a special effect expression image with the target expression based on the corrected facial image and the fusion deformation data.
[0008] In a second aspect, embodiments of the present disclosure provide a special effect image generation device, comprising:
[0009] an obtaining module configured to obtain fusion deformation data and an initial facial image, wherein the fusion deformation data includes at least one deformation element constituting a target expression, and the initial facial image includes a first facial element corresponding to the deformation element;
[0010] The correction module is configured to process the initial face image based on the fusion deformation data to generate a corrected face image, wherein the corrected face image includes a second face element, and the second face element matches an element contour of a corresponding deformation element in the fusion deformation data.
[0011] The generation module is configured to generate a special effect expression image with the target expression based on the corrected face image and the fusion deformation data.
[0012] In a third aspect, an electronic device is provided, which includes a processor and a memory.
[0013] The memory stores computer-executable instructions.
[0014] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the special effect image generation method according to the first aspect and various possible designs of the first aspect.
[0015] In a fourth aspect, a computer-readable storage medium is provided, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the special effect image generation method according to the first aspect and various possible designs of the first aspect is implemented.
[0016] In a fifth aspect, a computer program product is provided, which includes a computer program. When a processor executes the computer program, the special effect image generation method according to the first aspect and various possible designs of the first aspect is implemented.
[0017] The special effects image generation method, apparatus, electronic device, and storage medium provided in this embodiment obtain blended deformation data and an initial facial image, wherein the blended deformation data includes at least one deformed element constituting a target expression, and the initial facial image includes a first facial element of the same element type as the deformed element; processes the initial facial image based on the blended deformation data to generate a modified facial image, wherein the modified facial image includes a second facial element, and the second facial element matches the element outline of the corresponding deformed element in the blended deformation data; and generates a special effects expression image having the target expression based on the modified facial image and the blended deformation data. Prior to merging the blended deformation data with the facial image, the initial facial image is optimized into a modified facial image so that the second facial element in the modified facial image matches the element outline of the corresponding deformed element in the blended deformation data. This prevents partial facial elements in the initial facial image from being covered due to differences between the blended deformation data and the initial facial image, thereby resolving the problem of facial feature loss and improving the shape matching between the deformed elements and facial elements in the generated special effects expression image, thereby enhancing the visual expressiveness of the expression effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 A diagram of an application scenario of the special effect image generation method provided in an embodiment of the present disclosure;
[0020] Figure 2 Schematic diagram of the process of the special effect image generation method provided in the embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 for Figure 2 A flowchart of a specific implementation method of step S102 in the embodiment shown;
[0022] Figure 4 A schematic diagram of generating a special effect expression image provided by an embodiment of the present disclosure;
[0023] Figure 5 Schematic diagram of the process of the special effect image generation method provided in the embodiment of the present disclosure Figure 2 ;
[0024] Figure 6 for Figure 5A flowchart of the specific implementation of step S203 in the illustrated embodiment;
[0025] Figure 7 For Figure 5 A flowchart of the specific implementation of step S204 in the illustrated embodiment;
[0026] Figure 8 A process schematic diagram for generating a first optimized special effect expression image provided by an embodiment of the present disclosure;
[0027] Figure 9 A process schematic diagram for generating a second optimized special effect expression image provided by an embodiment of the present disclosure;
[0028] Figure 10 A structural block diagram of a special effect image generation apparatus provided by an embodiment of the present disclosure;
[0029] Figure 11 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure;
[0030] Figure 12 A hardware structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] To make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0033] The application scenarios of the embodiments of the present disclosure are explained as follows:
[0034] The special effect image generation provided by the embodiments of the present disclosure can be applied to an application (APP, Application) with a video special effect function, for example, a short video application, a video clip application, and the like. More specifically, the special effect image generation can be applied to an application scenario of generating an expression special effect and training an expression special effect model. The execution subject of the embodiments can be a terminal device running the application with the video special effect function, a server of a server corresponding to the application, or other electronic devices with similar functions.
[0035] In some embodiments, the terminal device or the server can implement the special effect image generation method provided by the embodiments of the present disclosure by running various computer executable instructions or computer programs. For example, the computer executable instructions can be program-level commands, machine instructions, or software instructions. The computer program can be a native program in an operating system or a software module; can be a native application, that is, a program that needs to be installed in an operating system to run, or can be a small program embedded in any APP, that is, a program running based on a browser environment. In summary, the computer executable instructions described above can be any form of instructions, and the computer program described above can be any form of application, module, or plug-in, and the specific implementation form can be configured as needed. Further, in some embodiments, the server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud storage, cloud communication, cloud database, cloud computing, cloud function, network service, middleware service, domain name service, security service, content distribution network (CDN), and big data and artificial intelligence platform, and the like. The cloud service can be an interactive processing service, which can be called by a terminal device.
[0036] Figure 1 An application scenario diagram of the special effect image generation method provided by the embodiments of the present disclosure is shown in FIG. 1. As shown in FIG. 1, when a terminal device is used as an execution subject, the terminal device loads a face image by running an application and responding to a user instruction through an interactive interface of the application, and then changes shapes and positions of facial features in the face image by triggering a facial expression special effect control provided in the application, for example, a “smiling expression” control, so as to realize a special effect of changing a facial expression of the face image. Figure 1
[0037] In the prior art, the generation process of a virtual expression special effect is usually based on a fixed expression special effect template to process a portrait, so as to achieve the purpose of changing the expression of a person in an image. Specifically, the facial features map provided in the expression special effect template is pasted to the facial feature area in the facial image, so as to realize the coverage of the original facial features in the facial image, thereby realizing the expression control of the person.
[0038] However, in the prior art, since the facial feature map in the expression special effect template is different from the personalized facial image, for example, the contour of the mouth feature map is inconsistent with the contour of the mouth of the person in the facial image, therefore, directly pasting the facial feature map in the template back to the facial image will cause the mouth feature map to be unable to coincide with the mouth of the person, and further, after pasting the facial feature map back to the facial image, part of the area in the facial image will be blocked, so that part of the features in the facial image will be lost, for example, the facial beard will be blocked and disappeared by the facial feature map, which affects the authenticity and visual effect of the finally generated special effect image.
[0039] The embodiment of the present disclosure provides a special effect image generation method to solve the above problems.
[0040] Reference Figure 2 , Figure 2 The flowchart of the special effect image generation method provided by the embodiment of the present disclosure is shown in Figure 1 The method of the embodiment can be applied in a terminal device, and the special effect image generation method comprises the following steps.
[0041] Step S101: obtaining fusion deformation data and an initial facial image, wherein the fusion deformation data comprises at least one deformation element constituting a target expression, and the initial facial image comprises a first facial element of the same element type as the deformation element.
[0042] For example, referring to the application scenario diagram shown in Figure 1 The terminal device is, for example, a smart phone, a personal computer or the like. The terminal device runs an application program, and first loads an initial facial image in the application program. The initial facial image contains a facial region. In specific applications, the initial facial image can be a portrait picture containing a human face or a cartoon style comic picture. Of course, it can also be an image containing a facial region other than a human face, such as a picture of an animal face of a pet cat or a pet dog. Since the method provided by the embodiment is used to realize facial expression special effects, any image related to a face can be used as the initial facial image in the step, and this is not limited.
[0043] Further, in the initial face image, the face elements are contained, wherein the face elements refer to the object elements constituting the facial expression. Taking a human face as an example, in the initial face image containing the human face, the corresponding face elements can include the eye, nose, mouth and other facial objects on the human face, and can also include the chin, beard, hairstyle and other local objects. The above objects are element types. The above face elements contained in the initial face image can be obtained by identifying and three-dimensionally reconstructing the initial face image.
[0044] Further, the Blendshape (Bs) data, which can also be referred to as the mixed deformation data, is a model data used for describing the face shape. The Blendshape data is used to create rich facial expressions and animation effects by mixing multiple preset shapes or deformation targets onto a base model. By adjusting the weights of different deformation targets, smooth and natural transitions can be achieved, so that the facial expressions and movements of the character are more realistic and lively. In the embodiment, the Blendshape data is data for a target expression. In the Blendshape data, at least one deformation element constituting the target expression is contained, wherein the deformation element corresponds to the face element introduced in the previous step, for example, including the eye, nose and chin. In the prior art, the facial expression special effect is realized by directly pasting the corresponding map of the deformation element to the position of the corresponding first face element. The specific implementation of the Blendshape data is the prior art known to those skilled in the art, and will not be described in detail.
[0045] In the step of the embodiment, the face element in the initial face image which has not been processed and has the same element type as the deformation element in the Blendshape data is the first face element, for example, the deformation element and the first face element both correspond to the element type of “eye”.
[0046] Step S102: processing the initial face image based on the Blendshape data to generate a corrected face image, wherein the corrected face image includes a second face element, and the second face element matches the element contour of the corresponding deformation element in the Blendshape data.
[0047] Exemplarily, after the terminal device obtains the above Blendshape data and the initial face image, the initial face image is processed based on the Blendshape element to correct the shape and / or position of at least one first face element in the initial face image, so as to obtain a corrected face image matching the Blendshape element. In a possible implementation, the second face element matching the element contour of the deformation element means that the position, size and contour difference of the two are within a certain error range, and they can be recognized as matching. The specific value of the error range is set according to the need. Figure 3 As shown in FIG. 6, the specific implementation of step S102 includes:
[0048] Step S1021: three-dimensional reconstruction is performed on the initial face image to obtain initial face three-dimensional data.
[0049] Step S1022: face texture data corresponding to the initial face image is constructed according to the initial face three-dimensional data.
[0050] Step S1023: the face texture data is adjusted according to the fusion deformation data to generate a corrected face image.
[0051] Exemplarily, first, the terminal device analyzes the initial face image, and then performs three-dimensional reconstruction to obtain an image expressed based on a three-dimensional model, i.e., initial face three-dimensional data. The modelized initial face three-dimensional data is composed of a plurality of vertices and line segments between the vertices, for example. The initial face image is a two-dimensional image, and the specific implementation manner of performing three-dimensional reconstruction on the two-dimensional image to generate a three-dimensional model containing depth information is prior art, which is not described herein. Then, the face texture data corresponding to the first face element is constructed based on the initial face three-dimensional data. In a possible implementation manner, the face texture corresponding to each first face element is constructed to form face texture data containing a plurality of face textures. For example, a face texture A is constructed for the mouth in the portrait face, another face texture B is constructed for the eye in the portrait face, and still another face texture C is constructed for the skin area in the portrait face. Then, the face texture data is obtained based on the set of a plurality of face textures. Since the face texture data is constructed based on the initial face three-dimensional data, it also belongs to modelized data, i.e., the different face textures (texture vertices) described by the face texture data will be coupled and affect each other. Then, the face texture data is adjusted based on the contour of the deformation element in the fusion deformation data, specifically, the texture vertices corresponding to the face elements in the face texture data are adjusted to match the element contour of the contour deformation element of the face element.
[0052] Exemplarily, Figure 4 A schematic diagram of generating a special effect expression image provided by an embodiment of the present disclosure is as follows: Figure 4As shown in the figure, taking a portrait photo as an example, in the initial facial image, the mouth, eyes, beard, nose and other parts are facial elements in the initial facial image, and the corresponding deformation element in the fusion deformation data is the mouth. The first facial element in the initial facial image is the facial element P1, and the corresponding deformation element in the fusion deformation data is the deformation element P2. As shown in the figure, the contours of the facial element P1 and the deformation element P2 are inconsistent, so directly rendering the deformation element P2 as a map and pasting it back to the initial facial image will cause the facial feature P4 (beard) in the initial facial image to be blocked. In the step of the embodiment, first, the facial element P1 in the initial facial image is stretched to generate a second facial element whose contour shape matches that of the deformation element P2, that is, the facial element P3, and the image obtained by modifying the initial facial image to contain the facial element P3 is the modified facial image.
[0053] Step S103: generating a special effect expression image with a target expression based on the modified facial image and the fusion deformation data.
[0054] Then, the modified facial image and the fusion deformation data are fused, that is, after the deformation element in the fusion deformation data is rendered, the generated map is pasted to the position corresponding to the second facial element in the modified facial image, to generate a special effect expression image with a target expression corresponding to the fusion deformation data. The special effect expression image can be understood as an image in which a target expression is added to the subject (for example, a face) in the initial facial image. Referring to Figure 4 As shown in the figure, after the deformation element P2 is generated into a corresponding map and pasted back to the position of the facial element P3 in the modified facial image, a special effect expression image is generated. Since the shape of the facial element P1 in the modified facial image obtained by modifying the initial facial image has changed, and due to the modeling characteristics of the modified facial image, the position of the facial element P4 (beard) also changes in response, therefore, after the map corresponding to the deformation element P2 is pasted back to the position of the facial element P3, the facial element P4 is not blocked and can be normally displayed, avoiding the problem of facial element blocking.
[0055] Optionally, after step S103, based on the obtained special effect expression image with the target expression and the initial face image, a pair of training sample data can be further composed. Then, by using the training sample data, the expression special effect model for generating the second character image with the target expression based on the first character image in response to the user instruction indicating the target expression can be further trained. Specifically, the expression special effect model trained by the above training sample data can realize, for example, the mapping from the initial face image to the special effect expression image, that is, the mapping from the first character image to the second character image with the target expression. At the same time, since the special effect expression image is optimized in the element contour of the face element relative to the initial face image, the mapping characteristic will be learned by the expression special effect model in the training process, so that the expression special effect model has the above-mentioned ability to optimize the element contour of the face element in the first character image, and thus the second character image with the target expression output by the expression special effect model can also avoid the problem of losing the element face feature.
[0056] In the embodiments of the present disclosure, the fusion deformation data including at least one deformation element constituting a target expression and the initial face image including a first face element of the same element type as the deformation element are obtained; the initial face image is processed based on the fusion deformation data to generate a corrected face image, the corrected face image including a second face element matching the element contour of the corresponding deformation element in the fusion deformation data; and a special effect expression image with the target expression is generated based on the corrected face image and the fusion deformation data. By optimizing the initial face image to the corrected face image before merging the fusion deformation data and the face image, the second face element in the corrected face image matches the element contour of the corresponding deformation element in the fusion deformation data, thereby avoiding the problem of losing face features caused by the difference between the fusion deformation data and the initial face image, and improving the shape matching degree between the deformation element and the face element in the generated special effect expression image and the visual expressiveness of the expression special effect.
[0057] Reference Figure 5 , Figure 5 Flowchart of the special effect image generation method provided by the embodiments of the present disclosure Figure 2 The embodiments of the present disclosure are based on the embodiments shown in Figure 2 The special effect image generation method provided by the embodiments of the present disclosure includes:
[0058] Step S201: obtaining fusion deformation data and an initial face image, wherein the fusion deformation data includes at least one deformation element constituting a target expression, and the initial face image includes a first face element of the same element type as the deformation element.
[0059] Step S202: processing the initial face image based on the fusion deformation data to generate a corrected face image, the corrected face image including a second face element, the second face element matching an element contour of a corresponding deformation element in the fusion deformation data.
[0060] Step S203: rendering the deformation element in the fusion deformation data based on the second face element in the corrected face image to obtain a corresponding deformation element map.
[0061] Illustratively, referring to the introduction of the step of generating the corrected face image in the embodiment shown in Figure 2 After obtaining the corrected face image, the terminal device renders the fusion deformation data based on the content of the corrected face image. Specifically, the fusion deformation data is a modeling data describing a face, and through the deformation element in the fusion deformation data, the contour of an object such as a facial feature can be represented. On this basis, further adding texture features is needed to form a corresponding map. In this embodiment, after obtaining the second face element in the corrected face image, the texture features of the second face element are used to render the deformation element in the fusion deformation data, so that the texture features of the generated deformation element map are the same as or similar to the texture features of the second face element, so that the texture of the deformation element map in the final generated special effect expression image is more similar to the texture of the initial face image, and the authenticity of the portrait expression image is improved.
[0062] Further, as shown in Figure 6 The specific implementation of step S203 includes:
[0063] Step S2031: generating a corresponding feature parameter based on the texture features of the second face element;
[0064] Step S2032: calling an image generation model to render the deformation element based on the feature parameter to generate a deformation element map.
[0065] Exemplarily, first, the texture feature of the second face element in the modified face image is taken, which can be the same as the texture feature of other face elements in the modified face image, that is, the modified face image shares one texture feature, or can be different from the texture feature of other face elements in the modified face image, that is, the modified face image corresponds to at least two texture features. The texture feature corresponding to the modified face image is formed in the process of generating the modified face image and stored in the modeling data corresponding to the modified face image. For details, please refer to the introduction of the process of the modified face image in the previous embodiment. The terminal device activates the texture feature through the modified face image, and then converts the texture feature into a corresponding feature parameter based on the texture feature. The feature parameter is an input parameter corresponding to the image generation model in the subsequent step, and the specific implementation manner is determined based on the model interface of the image generation model, which will not be described in detail this time. Then, the terminal device calls the image generation model based on the feature parameter to render the deformation element, thereby generating a corresponding texture-containing map, that is, a deformation element map. Specifically, the deformation element map is, for example, a facial feature map used to paste back the modified face image to change the facial expression of the portrait in the modified face image, such as a mouth map.
[0066] Among them, the basic model of the image generation model is an image rendering model. The image rendering model can receive and render the blendshape data to generate a corresponding rendering image. The specific implementation principle of the image rendering model will not be described in detail here. The image generation model in this embodiment is based on the image rendering model as the basic model, and further sets a feature parameter interface, so that it can receive the feature parameter representing the texture feature while receiving the blendshape data, and then control the texture feature of the deformation element map while generating the corresponding deformation element map based on the blendshape data, so that the deformation element map is similar to the texture of the initial face image (and the modified face image), thereby improving the texture consistency and visual performance of the special effect expression image generated after pasting the deformation element map.
[0067] Step S204: based on the position information of the second face element, the deformation element map is pasted to the modified face image to generate a special effect expression image.
[0068] After generating the deformation element map, or before generating the deformation element map, the terminal device obtains the position information of the second face element, which is used to indicate the position of the second face element to be replaced in the modified face image. Based on the position information, the deformation element map is pasted to the modified face image to realize the replacement (covering) of the second face element, thereby generating a special effect expression image.
[0069] Exemplarily, as Figure 7As shown, the specific implementation of step S204 includes:
[0070] Step S2041: generating an image mask according to the position of the second face element in the modified face image;
[0071] Step S2042: pasting the morphing element map to the modified face image based on the image mask to generate the special effect expression image.
[0072] Illustratively, in the step of the embodiment, the terminal device generates a corresponding image mask (Mask) by analyzing the position of the second face element in the modified face image. Illustratively, the image mask represents the target position and non-target position in the form of 0 and 1, thereby realizing the indication of the position information of the second face element. Then, the terminal device pastes the morphing element map back to the modified face image based on the image mask, completes the replacement (covering) of the second face element, and generates a special effect expression image with a target expression.
[0073] Optionally, after step S204, it further includes:
[0074] Step S205: obtaining an image generation model corresponding to the target expression, the image generation model being used to optimize an input image based on the expression features of the target expression.
[0075] Step S206: processing the special effect expression image based on the image generation model to generate an optimized special effect expression image.
[0076] Illustratively, after generating the special effect expression image, since the step of using the map covering (i.e., step S204) is used in the generation process of the special effect expression image, it will inevitably cause the difference between the map (morphing element map) and the background (modified face image), such as inconsistent texture lines, inconsistent color styles, etc., affecting the authenticity and visual perception of the special effect expression image. In the embodiment, after the terminal device generates the special effect expression image, the image generation model is used to reprocess the special effect expression image, thereby further optimizing the image quality of the special effect expression image. Specifically, first, the terminal device obtains an image generation model corresponding to the target expression. In one possible implementation, the image generation model corresponds to the target expression one-to-one, i.e., the image generation model is a special model for the target expression, such as a special image generation model for the "smiling expression". In this case, processing the special effect expression image based on the image generation model can realize the optimization of the special effect expression image based on the expression features of the target expression, thereby improving the image quality of the special effect expression image with the target expression.
[0077] In one possible implementation, the image generation model includes a texture optimization model, and correspondingly, the specific implementation of step S206 includes:
[0078] The texture optimization model is used to process the special effect expression image to generate a first optimized special effect expression image, wherein the first optimized special effect expression image has a face texture corresponding to the target expression. Illustratively, the texture optimization model is an implementation of the image generation model described above. When the image generation model is the texture optimization model, the first optimized special effect expression image can be obtained by processing the special effect expression image through the texture optimization model. Compared with the original special effect expression image, the face texture in the first optimized special effect expression image is generated based on the target face texture corresponding to the target expression, and has the same texture characteristics, more specifically, for example, the same texture line pattern and texture line direction, in the face region corresponding to the face element or in the face region corresponding to the deformation element. Thus, the first optimized special effect expression image has better image consistency and improved image effect.
[0079] Figure 8 A process diagram for generating a first optimized special effect expression image is provided for the embodiments of the present disclosure, as shown in Figure 8 Illustratively, the terminal device inputs the special effect expression image into the image generation model M1, i.e., the texture optimization model, after the active special effect expression image, and then the image generation model M1 processes the special effect expression image to generate the first optimized special effect expression image. As shown in the diagram, the texture patterns in the Z1 region (deformation element corresponding region) and the Z2 region (region corresponding to other face elements in the initial face image) of the special effect expression image are different, while the texture pattern in the Z1 region of the first optimized special effect expression image is the same as that in the Z2 region, thereby having better texture consistency.
[0080] In another possible implementation, the image generation model includes a line optimization model, and the specific implementation of step S206 includes:
[0081] The line optimization model is used to process the special effect expression image to generate a second optimized special effect expression image, wherein the second optimized special effect expression image has face element lines corresponding to the target expression. Illustratively, the line optimization model is another implementation of the image generation model described above. When the image generation model is the line optimization model, the second optimized special effect expression image can be obtained by processing the special effect expression image through the line optimization model. Compared with the original special effect expression image, the second optimized special effect expression image has optimized lines constituting the expression, and the discontinuous lines in the special effect expression image caused by performing the mapping step are deleted, for example, by deleting or connecting the discontinuous lines, thereby reducing the discontinuous and unreasonable lines in the special effect expression image, making the lines of the second optimized special effect expression image more smooth, and improving the image effect.
[0082] Figure 9 A process diagram for generating a second optimized special effect expression image is provided for the embodiments of the present disclosure, as shown in Figure 8 As an example, the terminal device inputs the special effect expression image into the image generation model M2, i.e., the line optimization model, after the active special effect expression image, and then the image generation model M2 generates a second optimized special effect expression image after processing the special effect expression image. As shown in the figure, the line at the junction of the Z1 region (the region corresponding to the deformation element) and the Z2 region (the region corresponding to the other facial elements in the initial facial image) in the special effect expression image has a discontinuity problem, while the line at the junction of the Z1 region and the Z2 region in the first optimized special effect expression image is continuous, thereby making the line in the image smoother.
[0083] Of course, it can be understood that the above two models can be configured as needed, or they can be configured at the same time, i.e., the image generation model includes the texture optimization model and the line optimization model. Through the image generation model, the facial texture optimization and line optimization of the portrait expression image can be realized at the same time, thereby obtaining a third optimized special effect expression image that has been optimized in facial texture and line. The specific implementation mode of the image generation model can be set as needed, which is not limited here.
[0084] In this embodiment, the implementation mode of steps S201-S202 is the same as that of steps S101-S102 in the embodiment of the present disclosure Figure 2 shown in the embodiment of the present disclosure, which will not be repeated here.
[0085] Corresponding to the special effect image generation method of the above embodiment, Figure 10 The structure block diagram of the special effect image generation device provided for the embodiments of the present disclosure is shown. The method introduced in the above embodiments can be executed by the special effect image generation device, which can be realized by software and / or hardware. The device can be integrated in an electronic device with certain data processing function. The electronic device can include but is not limited to a mobile terminal with large data processing capacity, and a desktop computer, a supercomputer, and other fixed terminals with large data processing capacity.
[0086] For ease of illustration, only parts related to the embodiments of the present disclosure are shown. For details, refer to Figure 10 The special effect image generation device 3 includes:
[0087] The acquisition module 31 is configured to acquire the fusion deformation data and the initial facial image, wherein the fusion deformation data includes at least one deformation element constituting a target expression, and the initial facial image includes a first facial element corresponding to the deformation element;
[0088] The correction module 32 is configured to process the initial face image based on the fusion deformation data to generate a corrected face image, and the second face element in the corrected face image matches the element contour of the corresponding deformation element in the fusion deformation data.
[0089] The generation module 33 is configured to generate a special effect expression image with a target expression based on the corrected face image and the fusion deformation data.
[0090] According to one or more embodiments of the present disclosure, the correction module 32 is specifically configured to perform three-dimensional reconstruction on the initial face image to obtain initial face three-dimensional data, construct face texture data corresponding to the initial face image according to the initial face three-dimensional data, and generate the corrected face image by adjusting the face texture data according to the fusion deformation data.
[0091] According to one or more embodiments of the present disclosure, the generation module 33 is specifically configured to perform rendering on the deformation element in the fusion deformation data based on the second face element in the corrected face image to obtain a corresponding deformation element map, and paste the deformation element map to the corrected face image based on the position information of the second face element to generate the special effect expression image.
[0092] According to one or more embodiments of the present disclosure, when the generation module 33 performs rendering on the deformation element in the fusion deformation data based on the second face element in the corrected face image to obtain a corresponding deformation element map, the generation module 33 is specifically configured to generate a corresponding feature parameter based on the texture feature of the second face element, and call an image generation model to perform rendering on the deformation element based on the feature parameter to generate the deformation element map.
[0093] According to one or more embodiments of the present disclosure, when the generation module 33 pastes the deformation element map to the corrected face image based on the position information of the second face element to generate the special effect expression image, the generation module 33 is specifically configured to generate an image mask according to the position of the second face element in the corrected face image, and paste the deformation element map to the corrected face image based on the image mask to generate the special effect expression image.
[0094] According to one or more embodiments of the present disclosure, the generation module 33 is further configured to obtain an image generation model corresponding to the target expression, and the image generation model is used to optimize an input image based on the expression feature of the target expression, and process the special effect expression image based on the image generation model to generate an optimized special effect expression image.
[0095] According to one or more embodiments of the present disclosure, the image generation model comprises a texture optimization model; when the generation module 33 generates the optimized special effect expression image based on the image generation model processing the special effect expression image, specifically used for: processing the special effect expression image based on the texture optimization model, generating a first optimized special effect expression image, wherein the first optimized special effect expression image has a face texture corresponding to the target expression.
[0096] According to one or more embodiments of the present disclosure, the image generation model comprises a line optimization model; when the generation module 33 generates the optimized special effect expression image based on the image generation model processing the special effect expression image, specifically used for: processing the special effect expression image based on the line optimization model, generating a second optimized special effect expression image, wherein the second optimized special effect expression image has a face element line corresponding to the target expression.
[0097] According to one or more embodiments of the present disclosure, the generation module 33 is further configured to generate training sample data based on the special effect expression image with the target expression and the initial face image, the training sample data being used to train an expression special effect model, wherein the expression special effect model is used to generate a second character image with the target expression based on a first character image in response to a user instruction indicating the target expression.
[0098] Wherein, the acquisition module 31, the correction module 32 and the generation module 33 are connected in sequence. The special effect image generation device 3 provided in the embodiment can execute the technical solutions of the above-mentioned method embodiments, and the implementation principles and technical effects are similar. Herein, the embodiment will not be repeated.
[0099] Figure 11 A structural schematic diagram of an electronic device provided in an embodiment of the present disclosure is shown in FIG. 4, which comprises: Figure 11
[0100] A processor 41 and a memory 42 in communication connection with the processor 41;
[0101] The memory 42 stores computer execution instructions;
[0102] The processor 41 executes the computer execution instructions stored in the memory 42 to realize the special effect image generation method in the embodiment shown in FIG. 4. Figures 2-9
[0103] Wherein, optionally, the processor 41 and the memory 42 are connected through a bus 43.
[0104] The related description can be understood by referring to the related description and effects of the steps in the corresponding embodiments, which will not be repeated here. Figures 2-9
[0105] The embodiment of the present disclosure provides a computer readable storage medium, and the computer readable storage medium stores computer execution instructions. Figures 2-9 The special effect image generation method provided in any one of the corresponding embodiments.
[0106] The embodiment of the present disclosure provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the embodiment of the present disclosure Figures 2-9 The special effect image generation method provided in any one of the corresponding embodiments.
[0107] In order to implement the above-mentioned embodiments, the embodiment of the present disclosure further provides an electronic device.
[0108] Reference Figure 12 , which shows a structural schematic diagram of an electronic device 900 suitable for implementing the embodiment of the present disclosure. The electronic device 900 can be a terminal device or a server. The terminal device can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA), tablet computers (PAD), portable media players (PMP), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 12 The electronic device shown is only an example, and should not bring any limitation to the function and use range of the embodiment of the present disclosure.
[0109] As shown in Figure 12 , the electronic device 900 can include a processing device (such as a central processor, a graphics processor, etc.) 901, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 902 or programs loaded into a random access memory (RAM) 903 from a storage device 908. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0110] In general, the following devices can be connected to the I / O interface 905: input devices 906, including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 907, including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 908, including, for example, a magnetic tape, a hard disk, and the like; and communication devices 909. The communication devices 909 can allow the electronic device 900 to communicate wirelessly or via a wire with other devices to exchange data. Although Figure 12 The electronic device 900 is shown with various devices, but it is understood that all of the illustrated devices are not required to implement or be present. More or fewer devices can alternatively be implemented or present.
[0111] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication devices 909, or installed from the storage devices 908, or installed from the ROM 902. When the computer program is executed by the processing devices 901, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0112] It should be noted that the computer-readable medium in the above disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present disclosure, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to a wire, a cable, an RF (radio frequency) or the like, or any suitable combination of the above.
[0113] The computer-readable medium described above can be contained in the electronic device described above; or can exist separately and not be assembled into the electronic device.
[0114] The computer-readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0115] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0116] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block of the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or by combinations of dedicated hardware and computer instructions.
[0117] The units or modules involved in the embodiments of the present disclosure can be implemented by software or by hardware. In some cases, the name of the unit or module does not constitute a limitation on the unit itself.
[0118] The functions described above in the specification of the present disclosure can be performed at least in part by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0119] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0120] In a first aspect, according to one or more embodiments of the present disclosure, a special effect image generation method is provided, comprising:
[0121] obtaining fusion deformation data and an initial face image, wherein the fusion deformation data includes at least one deformation element constituting a target expression, and the initial face image includes a first face element of the same element type as the deformation element; processing the initial face image based on the fusion deformation data to generate a corrected face image, wherein the corrected face image includes a second face element that matches the element contour of the corresponding deformation element in the fusion deformation data; and generating a special effect expression image with the target expression based on the corrected face image and the fusion deformation data.
[0122] According to one or more embodiments of the present disclosure, the processing of the initial face image based on the fusion deformation data to generate a corrected face image comprises: performing three-dimensional reconstruction on the initial face image to obtain initial face three-dimensional data; constructing face texture data corresponding to the initial face image according to the initial face three-dimensional data; and adjusting the face texture data according to the fusion deformation data to generate the corrected face image.
[0123] According to one or more embodiments of the present disclosure, the generating of a special effect expression image with the target expression based on the corrected face image and the fusion deformation data comprises: rendering the deformation element in the fusion deformation data based on the second face element in the corrected face image to obtain a corresponding deformation element map; and pasting the deformation element map to the corrected face image based on the position information of the second face element to generate the special effect expression image.
[0124] According to one or more embodiments of the present disclosure, based on the second face element in the modified face image, the deformation element in the fusion deformation data is rendered to obtain a corresponding deformation element map, including: based on the texture feature of the second face element, a corresponding feature parameter is generated; based on the feature parameter, an image generation model is called to render the deformation element to generate the deformation element map.
[0125] According to one or more embodiments of the present disclosure, based on the position information of the second face element, the deformation element map is pasted to the modified face image to generate the special effect expression image, including: according to the position of the second face element in the modified face image, an image mask is generated; based on the image mask, the deformation element map is pasted to the modified face image to generate the special effect expression image.
[0126] According to one or more embodiments of the present disclosure, the method further comprises: obtaining an image generation model corresponding to the target expression, the image generation model being used for optimizing an input image based on expression features of the target expression; processing the special effect expression image based on the image generation model to generate an optimized special effect expression image.
[0127] According to one or more embodiments of the present disclosure, the image generation model comprises a texture optimization model; and the processing of the special effect expression image based on the image generation model to generate an optimized special effect expression image comprises: processing the special effect expression image based on the texture optimization model to generate a first optimized special effect expression image, wherein the first optimized special effect expression image has a face texture corresponding to the target expression.
[0128] According to one or more embodiments of the present disclosure, the image generation model comprises a line optimization model; and the processing of the special effect expression image based on the image generation model to generate an optimized special effect expression image comprises: processing the special effect expression image based on the line optimization model to generate a second optimized special effect expression image, wherein the second optimized special effect expression image has a face element line corresponding to the target expression.
[0129] According to one or more embodiments of the present disclosure, the method further comprises: based on the special effect expression image with the target expression and the initial face image, generating training sample data, the training sample data being used for training an expression special effect model, wherein the expression special effect model is used for generating a second character image with the target expression based on a first character image in response to a user instruction indicating the target expression.
[0130] In a second aspect, according to one or more embodiments of the present disclosure, a special effect image generation device is provided, comprising:
[0131] The acquisition module is configured to acquire fusion deformation data and an initial face image, wherein the fusion deformation data comprises at least one deformation element constituting a target expression, and the initial face image comprises a first face element corresponding to the deformation element.
[0132] The correction module is configured to process the initial face image based on the fusion deformation data to generate a corrected face image, wherein the corrected face image comprises a second face element, and the second face element matches an element contour of a corresponding deformation element in the fusion deformation data.
[0133] The generation module is configured to generate a special effect expression image with the target expression based on the corrected face image and the fusion deformation data.
[0134] According to one or more embodiments of the present disclosure, the correction module is specifically configured to perform three-dimensional reconstruction on the initial face image to obtain initial face three-dimensional data, construct face texture data corresponding to the initial face image according to the initial face three-dimensional data, and generate the corrected face image by adjusting the face texture data according to the fusion deformation data.
[0135] According to one or more embodiments of the present disclosure, the generation module is specifically configured to render a deformation element in the fusion deformation data based on a second face element in the corrected face image to obtain a corresponding deformation element map, and paste the deformation element map to the corrected face image based on position information of the second face element to generate the special effect expression image.
[0136] According to one or more embodiments of the present disclosure, when the generation module renders a deformation element in the fusion deformation data based on a second face element in the corrected face image to obtain a corresponding deformation element map, the generation module is specifically configured to generate a corresponding feature parameter based on a texture feature of the second face element, and render the deformation element based on the feature parameter to generate the deformation element map by invoking an image generation model.
[0137] According to one or more embodiments of the present disclosure, when the generation module pastes the deformation element map to the corrected face image based on position information of the second face element to generate the special effect expression image, the generation module is specifically configured to generate an image mask according to a position of the second face element in the corrected face image, and paste the deformation element map to the corrected face image based on the image mask to generate the special effect expression image.
[0138] According to one or more embodiments of the present disclosure, the generation module is further configured to: obtain an image generation model corresponding to the target expression, the image generation model being configured to optimize an input image based on expression features of the target expression; and process the special effect expression image based on the image generation model to generate an optimized special effect expression image.
[0139] According to one or more embodiments of the present disclosure, the image generation model comprises a texture optimization model; and when processing the special effect expression image based on the image generation model to generate an optimized special effect expression image, the generation module is specifically configured to: process the special effect expression image based on the texture optimization model to generate a first optimized special effect expression image, wherein the first optimized special effect expression image has a face texture corresponding to the target expression.
[0140] According to one or more embodiments of the present disclosure, the image generation model comprises a line optimization model; and when processing the special effect expression image based on the image generation model to generate an optimized special effect expression image, the generation module is specifically configured to: process the special effect expression image based on the line optimization model to generate a second optimized special effect expression image, wherein the second optimized special effect expression image has a face element line corresponding to the target expression.
[0141] According to one or more embodiments of the present disclosure, the generation module is further configured to: based on the special effect expression image with the target expression and the initial face image, generate training sample data, the training sample data being used to train an expression special effect model, wherein the expression special effect model is configured to generate a second character image with the target expression based on a first character image in response to a user instruction indicating the target expression.
[0142] In a third aspect, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0143] The memory stores computer-executable instructions;
[0144] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the special effect image generation method as described in the above first aspect and various possible designs of the first aspect.
[0145] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions, when a processor executes the computer-executable instructions, the special effect image generation method as described in the above first aspect and various possible designs of the first aspect is implemented.
[0146] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the special effect image generation method according to the first aspect and various possible designs of the first aspect.
[0147] The above description is merely illustrative of the exemplary embodiments of the present disclosure and the principles of the technology involved. It is understood that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and also covers other technical solutions formed by the combinations of the above technical features or equivalent features thereof without departing from the above disclosed concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions.
[0148] In addition, although each operation is described in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although several implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable subcombination.
[0149] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A special effect image generation method characterized by comprising: The method comprises: obtaining fusion deformation data and an initial face image, wherein the fusion deformation data comprises at least one deformation element constituting a target expression, and the initial face image comprises a first face element of the same element type as the deformation element; processing the initial face image based on the fusion deformation data to generate a corrected face image, wherein the corrected face image comprises a second face element matching an element contour of the corresponding deformation element in the fusion deformation data; generating a special effect expression image with the target expression based on the corrected face image and the fusion deformation data.
2. The method of claim 1, wherein, The processing of the initial face image based on the fusion deformation data to generate a corrected face image comprises: performing three-dimensional reconstruction on the initial face image to obtain initial face three-dimensional data; constructing face texture data corresponding to the initial face image according to the initial face three-dimensional data; adjusting the face texture data according to the fusion deformation data to generate the corrected face image.
3. The method of claim 1, wherein, The generation of a special effect expression image with the target expression based on the corrected face image and the fusion deformation data comprises: rendering the deformation element in the fusion deformation data based on the second face element in the corrected face image to obtain a corresponding deformation element map; pasting the deformation element map to the corrected face image based on the position information of the second face element to generate the special effect expression image.
4. The method of claim 3, wherein, The rendering of the deformation element in the fusion deformation data based on the second face element in the corrected face image to obtain a corresponding deformation element map comprises: generating a corresponding feature parameter based on the texture feature of the second face element; calling an image generation model to render the deformation element based on the feature parameter to generate the deformation element map.
5. The method of claim 3, wherein, The pasting of the deformation element map to the corrected face image based on the position information of the second face element to generate the special effect expression image comprises: generating an image mask according to the position of the second face element in the corrected face image; pasting the deformation element map to the corrected face image based on the image mask to generate the special effect expression image.
6. The method of claim 1, wherein, The method further comprises: obtaining an image generation model corresponding to the target expression, wherein the image generation model is used to optimize an input image based on the expression feature of the target expression; processing the special effect expression image based on the image generation model to generate an optimized special effect expression image.
7. The method of claim 6, wherein, The image generation model comprises a texture optimization model; the processing of the special effect expression image based on the image generation model to generate an optimized special effect expression image comprises: processing the special effect expression image based on the texture optimization model to generate a first optimized special effect expression image, wherein the first optimized special effect expression image has a face texture corresponding to the target expression.
8. The method of claim 6, wherein, The image generation model comprises a line optimization model; the processing of the special effect expression image based on the image generation model to generate an optimized special effect expression image comprises: The special effect expression image is processed based on the line optimization model to generate a second optimized special effect expression image, where the second optimized special effect expression image has face element lines corresponding to the target expression.
9. The method of claim 1, wherein, The method further includes: Based on the special effect expression image with the target expression and the initial face image, training sample data is generated, and the training sample data is used to train an expression special effect model, where the expression special effect model is used to generate a second character image with the target expression based on a first character image in response to a user instruction indicating the target expression.
10. An apparatus for generating an effect image, characterized by comprising: Comprise: An acquisition module is configured to acquire fusion deformation data and an initial face image, where the fusion deformation data includes at least one deformation element constituting a target expression, and the initial face image includes a first face element corresponding to the deformation element; A correction module is configured to process the initial face image based on the fusion deformation data to generate a corrected face image, where the corrected face image includes a second face element, and the second face element matches an element contour of a corresponding deformation element in the fusion deformation data; A generation module is configured to generate a special effect expression image with the target expression based on the corrected face image and the fusion deformation data.
11. An electronic device, comprising: Comprise: A processor and a memory; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the special effect image generation method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, and when the processor executes the computer execution instructions, the special effect image generation method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the special effect image generation method according to any one of claims 1 to 9.