Special effect generation method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202311363139.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-10-20
AI Technical Summary
[0004]本公开实施例提供一种特效生成方法、装置、电子设备及存储介质,以克服特效存在样式固定、种类受限的问题
[0016] The special effects generation method, apparatus, electronic device, and storage medium provided in this embodiment receive user-inputted requirement information, which describes the generation requirements of the target special effects using natural language; based on the requirement information, generate special effects material that matches the image content of the currently displayed target image; and generate the target special effects in the target image based on the special effects material. By converting the user-inputted requirements for generating the target special effects into special effects material that matches the image content of the target image in real time, and then generating the target special effects based on the special effects material, personalized special effects can be generated in real time. This expands the content forms of special effects, makes the special effects match the image content, and improves the application effect in the image.
Smart Images

Figure CN119865562B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, and storage medium for generating special effects. Background Technology
[0002] Currently, in media content creation applications, users can add special effects to images or videos using the special effects tools provided by the platform or application, thereby giving the images or videos a better visual effect.
[0003] In the existing technology, the special effects props provided within the aforementioned platforms or applications are usually preset within the platform or application, which have problems such as fixed styles and limited types, affecting the application effect of special effects in images or videos. Summary of the Invention
[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for generating special effects, thereby overcoming the problems of fixed styles and limited types of special effects.
[0005] In a first aspect, embodiments of this disclosure provide a method for generating special effects, including:
[0006] The system receives user input request information, which describes the generation requirements of the target effect based on natural language; generates special effect material that matches the image content of the currently displayed target image based on the request information; and generates the target effect in the target image based on the special effect material.
[0007] Secondly, embodiments of this disclosure provide a special effects generation apparatus, comprising:
[0008] An interaction module is used to receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language.
[0009] The generation module is used to generate special effects materials that match the image content of the currently displayed target image based on the required information;
[0010] A rendering module is used to generate the target special effects in the target image based on the special effects material.
[0011] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0012] The memory stores computer-executed instructions;
[0013] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the special effects generation method as described in the first aspect and various possible designs of the first aspect.
[0014] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the special effects generation method described in the first aspect and various possible designs of the first aspect.
[0015] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the special effects generation method described in the first aspect and various possible designs of the first aspect.
[0016] The special effects generation method, apparatus, electronic device, and storage medium provided in this embodiment receive user-inputted requirement information, which describes the generation requirements of the target special effects using natural language; based on the requirement information, generate special effects material that matches the image content of the currently displayed target image; and generate the target special effects in the target image based on the special effects material. By converting the user-inputted requirements for generating the target special effects into special effects material that matches the image content of the target image in real time, and then generating the target special effects based on the special effects material, personalized special effects can be generated in real time. This expands the content forms of special effects, makes the special effects match the image content, and improves the application effect in the image. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 An application scenario diagram of the special effects generation method provided in this disclosure embodiment;
[0019] Figure 2 Flowchart of the special effects generation method provided in the embodiments of this disclosure Figure 1 ;
[0020] Figure 3 This is a schematic diagram illustrating an interaction for user input of demand information, provided as an embodiment of the present disclosure.
[0021] Figure 4 for Figure 2 A flowchart illustrating the specific implementation of step S102 in the illustrated embodiment;
[0022] Figure 5 This is a schematic diagram illustrating a process for determining target special effects material, provided in an embodiment of the present disclosure.
[0023] Figure 6 for Figure 2 A flowchart illustrating the specific implementation of step S103 in the illustrated embodiment;
[0024] Figure 7 Flowchart of the special effects generation method provided in the embodiments of this disclosure Figure 2 ;
[0025] Figure 8 for Figure 7 A flowchart illustrating the specific implementation of step S202 in the illustrated embodiment;
[0026] Figure 9 for Figure 8 A flowchart illustrating the specific implementation of step S2022 in the illustrated embodiment;
[0027] Figure 10 This is a schematic diagram illustrating a process for generating a second prompt word, provided in an embodiment of the present disclosure.
[0028] Figure 11 for Figure 7 A flowchart illustrating the specific implementation of step S205 in the illustrated embodiment;
[0029] Figure 12 A structural block diagram of the special effects generation apparatus provided in the embodiments of this disclosure;
[0030] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0031] Figure 14 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0033] 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 used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0034] The application scenarios of the embodiments of this disclosure are explained below:
[0035] Figure 1 This diagram illustrates an application scenario of the special effects generation method provided in this embodiment. The method can be applied to applications with special effects editing capabilities, and more specifically, to applications involving shooting videos and photos with special effects. The executing entity in this embodiment can be a terminal device running the aforementioned application with special effects editing capabilities, a server deploying the server-side component corresponding to the application, or other electronic devices performing similar functions. (Reference) Figure 1 As shown in the diagram, taking a terminal device as an example, such as a smartphone, the terminal device takes a picture of the user through its camera unit and displays the real-time image of the user in the viewfinder. Then, in response to the user's operation, a target effect is triggered in the viewfinder, such as the virtual "glasses" shown in the diagram, thereby displaying the target effect in the real-time image. Afterward, the terminal device can take pictures or record videos based on the target effect, thereby generating special effects videos and images with the aforementioned target effect.
[0036] Of course, the method provided in this embodiment can also be applied to scenarios where non-real-time images are edited. For example, the terminal device can load the captured images or videos and use the special effects tools provided by the application to add video effects to the captured images or videos.
[0037] In existing technologies, the process of adding target effects to real-time or non-real-time images through user operation typically utilizes effect tools provided within the platform or application. Users can select one or more of these effect tools to add effects. However, on the one hand, manually selecting effect tools is time-consuming and inefficient, affecting the overall efficiency of effect editing; on the other hand, since effect tools are pre-generated, their styles and types are limited, often preventing users from obtaining target effects that match the video content or that interest them, thus affecting the application effect of the effects in the image. Furthermore, these two problems are mutually restrictive: a limited number and variety of preset effects affects their application effect in the image, while unilaterally increasing the number of preset effects increases the difficulty of user retrieval, impacting efficiency.
[0038] This disclosure provides a special effects generation method to solve the above-mentioned problems.
[0039] refer to Figure 2 , Figure 2 Flowchart of the special effects generation method provided in the embodiments of this disclosure Figure 1 The method of this embodiment can be applied to terminal devices, and the special effects generation method includes:
[0040] Step S101: Receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language.
[0041] For example, refer to Figure 1 The illustrated application scenario shows that before triggering a target effect, the terminal device needs to determine the target effect based on user actions. In one possible implementation, the terminal device displays an input control, such as an editable text box or a voice input button, on a first interface. The user inputs characters or voice information into the terminal device through this control, allowing the terminal device to obtain the required information. This required information describes the generation requirements of the target effect using natural language. For example, the required information could be a text message with the content "Help me generate a science fiction-style background effect."
[0042] Figure 3 This is a schematic diagram illustrating an interaction for user input of demand information provided in an embodiment of this disclosure. The following is in conjunction with... Figure 3 The above step S101 will be described in detail. For example... Figure 3 As shown, after the terminal device runs the target application, it invokes a viewfinder interface for shooting video. Within this viewfinder interface, a control #1 for adding special effects is provided. In response to the user's click on control #1, a first interface is displayed within the viewfinder interface. This first interface includes an editable text box, edit_text_1 (shown as edit_text_1 in the diagram). The user then enters text into this editable text box, such as "Generate a sci-fi style background effect for me." The terminal device performs semantic analysis based on the input text to generate requirement information; alternatively, it directly uses the input text as requirement information to execute subsequent steps.
[0043] Step S102: Based on the requirements, generate special effects material that matches the image content of the currently displayed target image.
[0044] For example, firstly, the currently displayed target image refers to the image currently displayed within the interactive interface of the terminal device, that is, the image to which the target effect is to be inserted. Specifically, the currently displayed target image can be, for example, an image captured in real time by the camera unit displayed in the camera viewfinder, or an image from a pre-generated image or video that is currently being loaded. For example, the target image is a video frame from a pre-loaded video. More specifically, the target image can be the cover image of a video, or a video frame determined by a user-applied seek operation. Depending on the application scenario, the implementation of the currently displayed target image may vary, and no specific limitations are imposed here.
[0045] Furthermore, after the terminal device receives the demand information, it processes the demand information to generate special effects material, and matches the special effects material with the image content of the currently displayed target image. The special effects material is media data used to generate the special effects, and may include one or more of the following: images, frame sequences, video, and audio.
[0046] Image content matching between special effects footage and target images can be achieved in various ways. Taking the case where the special effects footage is an image as an example, content matching could mean that the scale information of the special effects footage matches the scale information of the target image. Scale information represents the proportional relationship between the size of an object in the image and its actual size. Alternatively, it could mean that the overall color tone (cool or warm tone) of the special effects footage matches the overall color tone of the target image; or it could mean that the image style of the special effects footage (e.g., cartoon style, realistic style) matches the image style of the target image, and so on.
[0047] Specifically, the terminal device processes demand information, and there are various ways to generate special effects materials. For example, based on the demand information, it searches for matching network resource images from the network, processes the network resource images, and then generates special effects materials. One possible implementation is as follows: Figure 4 As shown, the specific implementation of step S102 includes:
[0048] Step S1021: Based on the requirement information, generate the first prompt word, which is used to characterize the target effect category to which the target effect belongs.
[0049] Step S1022: Obtain the data index based on the first prompt word. The data index is used to indicate the user-generated content library corresponding to the target effect category.
[0050] Step S1023: Obtain the corresponding special effects material based on the data index and the image content of the target image.
[0051] For example, firstly, the terminal device generates a corresponding first prompt word based on demand information, such as a descriptive text, to represent the category to which the target effect belongs. The first prompt word can be text generated by a language model that represents the semantics of the demand information, or it can be one or more keywords or key terms from the demand information. Specifically, the first prompt word may include, for example, "background category," "headwear category," or "makeup category."
[0052] Next, based on preset mapping rules, the first prompt word is summarized and mapped to obtain the corresponding data index. The data index is used to indicate the user-generated content library corresponding to the target effect category. Specifically, the data index can be an identifier representing a specific user-generated content library, or it can be the library address of the user-generated content library. For example, "background category" is mapped to the corresponding UCG_01 library, and "headwear material" is mapped to the corresponding UCG_02 library. Here, the user-generated content library in this embodiment is a resource library used to store user-generated content (UGC). The user-generated content library can be pre-installed inside the terminal device, or it can be stored on a server or network (such as the Internet) outside the terminal device; there are no restrictions here. Then, based on the data index, media data matching the image content of the target image is obtained from the corresponding user-generated content library, thereby obtaining the effect material.
[0053] In this embodiment, the demand information is converted into a first prompt word representing the target effect category to which the target effect belongs. Then, user-generated content is obtained based on the first prompt word. This fully utilizes external user-generated content to obtain effect materials and improves the richness of the effect materials.
[0054] Furthermore, in one possible implementation, after step S1022, the following is also included:
[0055] Step S1022A: Based on the first prompt word, obtain the first rendering parameters. The first rendering parameters are used to characterize the position and / or distribution of the target special effects generated based on the special effects material in the target image.
[0056] For example, after obtaining the first cue word representing the category to which the target effect belongs, the video footage corresponding to different effect categories will have different rendering positions or different positional distributions when the effect is applied. For instance, when the target effect category is "headwear material," the target effect generated based on the effect material is located at the upper outline of the portrait's head; when the target effect category is "glasses material," the target effect generated based on the effect material is located at the outline of the portrait's eyes. When the target effect category is, for example, "starry sky background effect," the target effect generated based on the effect material "stars" is evenly distributed around the portrait's outline.
[0057] The information describing the position and / or distribution of the target special effects generated from the special effects material in the target image is the first rendering parameter. This rendering parameter can be pre-generated. After obtaining the first cue word, it is mapped to the corresponding first rendering parameter. Then, during the subsequent generation of the target special effects, the special effects material is rendered based on this first rendering parameter, thereby ensuring the special effects material appears at the precise position in the target image. In other words, the target special effects are generated in the target image based on the special effects material and the first rendering parameter.
[0058] In this embodiment, by generating a first rendering parameter based on the first prompt word, a first rendering parameter is generated that represents the position and / or distribution of the target special effect generated based on the special effect material in the target image. In the subsequent step of generating the target special effect in the target image, the special effect material can be accurately rendered in the corresponding image position based on the first rendering parameter, thereby improving the visual effect of the target special effect, saving the step of manually setting the position of the target special effect, and improving the efficiency of configuring special effects.
[0059] Furthermore, one possible implementation includes, after generating the special effects footage:
[0060] Step S102A: Display at least one special effects material on the first interface of the terminal device.
[0061] Step S102B: In response to the user's selection operation, determine the target special effects material.
[0062] For example, Figure 5 This is a schematic diagram illustrating a process for determining target special effects material according to an embodiment of the present disclosure, with reference to... Figure 5As shown in the diagram, after the terminal device obtains the special effects material, it displays at least one special effects material generated in the above steps on the first interface. These are shown as special effects material A, special effects material B, and special effects material C. Subsequently, the user performs a selection operation through the interactive interface. The terminal device responds to the selection operation, identifying one or more of these materials as target special effects materials to participate in subsequent target special effects generation steps. For example, as shown in the diagram, in response to the user's selection operation, special effects material B is identified as the target special effects material. In subsequent steps, processing is performed based on this target special effects material (i.e., the "special effects material" in subsequent steps is the "target special effects material" identified in this step) to generate the corresponding target special effects.
[0063] Step S103: Generate target effects in the target image based on the special effects material.
[0064] For example, after obtaining the special effects material, the terminal device further processes the special effects material, such as processing the size or resolution of the special effects material, cropping the outline of the special effects material, and / or cropping the target image based on the outline of the special effects material, etc. Then, the special effects material is rendered onto the target image, thereby displaying the target special effects in the target image, completing the process of adding special effects to the target image.
[0065] In one possible implementation, such as Figure 6 As shown, the specific implementation of step S103 includes:
[0066] Step S1031: Based on the requirements information, generate the first special effects material and the second special effects material, wherein the first special effects material is pre-generated user-generated content, and the second special effects material is real-time generated model-generated content;
[0067] Step S1032: Generate special effects material based on the combination of the first special effects material and the second special effects material.
[0068] For example, in one possible implementation, corresponding first and second special effects materials are obtained according to the demand information, wherein the first special effects material is pre-generated user-generated content, and the method of obtaining the first special effects material can be referred to the above. Figure 4The specific implementation steps of step S102 shown are not repeated here. The second special effects material is content generated based on the generative model, that is, special effects material generated through generative artificial intelligence (AIGC) technology. Specifically, for example, corresponding prompts can be generated based on demand information, and then the generative model can be guided to generate the second special effects material based on the prompts. Other implementation methods for generating the second special effects material will be further introduced in subsequent embodiments, and will not be repeated here. Afterwards, the first and second special effects materials are combined, such as splicing, overlaying, or merging, to generate special effects material.
[0069] In this embodiment, by obtaining user-generated content and model-generated content separately and combining them, the resulting special effects material can possess both the specific typicality of user-generated content and the flexibility of model-generated content. This ensures that the target special effects generated based on the special effects material can both carry specific meaning and express specific existing information (utilizing the specific typicality of user-generated content) and increase diversity and reduce style repetition (utilizing the flexibility of model-generated content), thereby improving the quality of the target special effects generated based on the special effects material.
[0070] The special effects generation method, apparatus, electronic device, and storage medium provided in this embodiment receive user-input request information, which describes the generation requirements of the target special effects using natural language. Based on the request information, special effects material matching the image content of the currently displayed target image is generated. Based on the special effects material, the target special effects are generated in the target image. By converting the user-input request for the generation of the target special effects into special effects material matching the image content of the target image in real time, and then generating the target special effects based on the special effects material, personalized special effects are generated in real time. This expands the content forms of special effects, matches the special effects with the image content, and improves the application effect in the image.
[0071] refer to Figure 7 , Figure 7 Flowchart of the special effects generation method provided in the embodiments of this disclosure Figure 2 This embodiment is in Figure 2 Based on the illustrated embodiment, steps S102-S103 are further refined by using generative artificial intelligence (AIGC) technology to generate the target special effects. This special effects generation method includes:
[0072] Step S201: Receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language.
[0073] Step S202: Based on the requirements information, generate a second prompt word. The second prompt word is used to guide the target model to generate special effects materials that meet the generation requirements.
[0074] For example, the second prompt is the prompt or hint used to input the generative model. It serves to clarify the task or requirements, limit the scope or theme, specify the format or structure, determine the tone or style, and specify key information or elements, thereby guiding the target model to generate special effects materials that meet the generation requirements. The target model is the generative model used to generate the materials (refer to the relevant introduction to the second special effects materials). For example, such as... Figure 8 As shown, the specific implementation of step S202 includes:
[0075] Step S2021: Obtain the image content features of the currently displayed target image.
[0076] Step S2022: Generate a second prompt word based on image content features and demand information.
[0077] For example, firstly, the currently displayed target image, such as a real-time captured image displayed within the camera viewfinder, is processed to obtain the image content features corresponding to the target image. These image content features can be identifiers representing the image content type or feature arrays representing the image content. Each element in the feature array represents the content (category) of a content dimension of the target image. Image content features can also be more complex feature matrices, which will not be elaborated further here. Alternatively, in another possible implementation, the image content features can be a pixel matrix obtained after processing the pixels in the target image, such as through pooling (resolution reduction). The specific implementation method can be set as needed and will not be elaborated here.
[0078] Furthermore, based on the set of image content features and requirement information, a second prompt word is generated. This generated prompt word describes the generation requirements while simultaneously incorporating the image content of the target image, thus achieving the goal of matching the special effects material generated based on the second prompt word with the image content of the target image. One possible implementation is to map image content features to specific parameters and insert them into the requirement information to obtain the second prompt information; another possible implementation is to use a template for generating the prompt word, combining image content features and requirement information to generate the second prompt word, which will not be elaborated further.
[0079] Furthermore, such as Figure 9 As shown, the specific implementation of step S2022 includes:
[0080] Step S2022A: Based on the image content features, generate a first text parameter, which is used to describe the semantic content of the target image.
[0081] Step S2022B: Based on the requirements information and combined with the prompt word template, generate prompt word text. The prompt word text includes input parameters. The prompt word text represents the processing logic for processing the input parameters to generate special effects materials that meet the generation requirements.
[0082] Step S2022C: Use the first text parameter as the input parameter, insert the prompt text, and generate the second prompt.
[0083] Furthermore, in one possible implementation, firstly, based on image content features, a first text parameter representing the semantic content of the target image is mapped. For example, the image content features are the pixel matrix obtained after image processing of the target image. The image content features are identified and summarized, generating a first text parameter, Context_1, whose corresponding parameter value includes the text "jogging in the park," which is a description of the semantic content of the target image. Then, combining the prompt word template and requirement information, a prompt word text with input parameters is generated. The first text parameter is then used as input to insert the prompt word text, generating a second prompt word.
[0084] Figure 10 This is a schematic diagram illustrating a process for generating a second prompt word according to an embodiment of the present disclosure, with reference to... Figure 10 As shown, exemplarily, firstly, feature extraction is performed on the target image P1 to obtain the image content feature feature_1 (shown as feature_1 in the figure). Based on the image content feature feature_1, the first text parameter "running in the park" is obtained. Then, the user's input requirement information includes "generate a sci-fi style background for me". Based on the requirement information and the prompt word template, a prompt word text Info_1 with input parameters is generated, as shown in the figure. Its content includes, for example, "generate a [sci-fi style] image for the [input] scene". The keyword "sci-fi style" in the above content is generated by the prompt word template based on the requirement information, while the keyword "input" can be considered a reserved parameter. The prompt word text Info_1 represents the processing logic for processing the input parameter input to generate special effects materials that meet the generation requirements. Then, the first text parameter is used as the input parameter input, and the prompt word text (shown as input = first text parameter in the figure) is inserted. The resulting second prompt word Info_2 includes the content "generate a [sci-fi style] image for the [running in the park] scene". Optionally, the prompt word template can be determined based on the requirements information.
[0085] Step S203: Generate special effects materials based on the second prompt word and the target model.
[0086] For example, subsequently, based on the generated second prompt word and the corresponding target model, the target model can be guided to generate corresponding content, i.e., special effects material. In this embodiment, the second prompt word is generated by combining image content features, and the target model is guided to output special effects material based on the second prompt word. Since the second prompt word incorporates the image content features of the target image, the special effects material generated based on the second prompt word can match the image content of the target image. This improves the matching degree between the target special effects and the target image, and enhances the application effect of the special effects in the image, while generating personalized target special effects.
[0087] Step S204: Obtain the effect template corresponding to the target effect, wherein the effect template is used to process at least one effect material.
[0088] Step S205: Render the image based on the special effects template and special effects materials to generate the target special effects in the target image.
[0089] For example, after obtaining the special effects material, a special effects template is used to further process the material, thereby obtaining special effects rendering data that matches the target image, and thus realizing the generation and display of the target special effects. Specifically, for example, the target special effects category is determined based on the requirement information, such as "background effects," "headwear effects," and "makeup effects." The specific implementation can be based on the first prompt word. For a detailed explanation of how to determine the target special effects category based on the first prompt word, please refer to [link to relevant documentation]. Figure 4 The related descriptions in the illustrated embodiments are not exhaustive; in other implementations, the corresponding effect template can also be directly mapped based on the requirement information. This can be set as needed and will not be elaborated upon here. Next, based on the target effect category, the corresponding effect template is obtained, and the effect material is processed using the effect template, including size conversion and cropping. For example, when the effect category corresponding to the effect template is "background effect," the effect material is cropped to prevent it from overlapping with objects in the target image, and corresponding effect rendering data is generated. The effect rendering data is then rendered to generate the target effect in the target image.
[0090] Furthermore, exemplarily, the effects template includes at least one effects field, which is used to add at least one effects element to the target image, such as... Figure 11 As shown, the specific implementation of step S205 includes:
[0091] Step S2051: Map the target special effects material to the corresponding target special effects field in the special effects template to obtain the target special effects template.
[0092] Step S2052: Use the rendering engine to process the target effect template and generate the target effect in the target image.
[0093] For example, the effects fields in the effects template are used to add at least one effects element to the target image. For instance, the effects template includes fields #1, #2, and #3. Field #1 corresponds to "headwear effect," used to add a virtual headwear (effect element, hereinafter the same) to the person in the target image; field #2 corresponds to "makeup effect," used to add makeup effects to the face of the person in the target image; and field #3 corresponds to "background effect," used to add a virtual background to the person in the target image. The target effects materials are mapped to the corresponding target effects fields in the effects template. For example, the first effects material generated based on user-generated content in the above steps is mapped to field #1; the two (two sets) of second effects materials generated based on the model in the above steps are mapped to fields #2 and #3 respectively. This achieves the goal of simultaneously adding "headwear effect," "makeup effect," and "background effect" to the target image. Then, the configured target effects template is processed using a rendering engine to generate the target image from the target image. The specific implementation principle of image rendering is based on existing technology and will not be elaborated here.
[0094] The aforementioned special effects templates can be manually configured by the user or automatically generated based on the requirements. The specific implementation method can be achieved through a pre-trained model, which will not be elaborated here.
[0095] In this embodiment, by configuring special effects templates, multiple special effects elements can be added at once. The special effects materials corresponding to each special effects element are obtained independently based on the previous steps, thus having better matching degree and diversity with the image content. At the same time, by mapping different types of special effects materials (first special effects material and second special effects material) through special effects templates, the personalized configuration needs of users can be met.
[0096] Furthermore, each effect field corresponds to at least one parameter field. These parameter fields characterize the rules for processing the effect material corresponding to the effect field to generate the corresponding effect element. Taking the #1 field in the example above, for instance, the #1 field corresponds to three parameter fields: parameter a, parameter b, and parameter c. Parameter a characterizes the position of the "headwear effect" in the image, more specifically, for example, the distance from the outline of a person's head in the target image; parameter b characterizes the color of the "headwear effect"; and parameter c characterizes the transparency of the "headwear effect."
[0097] In this embodiment, by further configuring one or more parameter fields corresponding to the special effects field in the special effects template, the visual effect of the target special effects can be further refined, thereby improving the visual performance and diversity of the target special effects, increasing the generation efficiency of the target special effects, and enhancing their application effect in the image.
[0098] In this embodiment, the implementation of step S201 is the same as that in this disclosure. Figure 2 The implementation of step S101 in the illustrated embodiment is the same, and will not be described in detail here.
[0099] Corresponding to the special effects generation method in the above embodiments, Figure 12 This is a structural block diagram of a special effects generation apparatus provided in an embodiment of this disclosure. For ease of explanation, only the parts relevant to the embodiments of this disclosure are shown.
[0100] Reference Figure 12 The special effects generation device 3 includes:
[0101] The interaction module 31 is used to receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language.
[0102] The generation module 32 is used to generate special effects materials that match the image content of the currently displayed target image based on the requirements information.
[0103] Rendering module 33 is used to generate target effects in the target image based on special effects materials.
[0104] In one embodiment of this disclosure, the interaction module 31 is further configured to: display at least one special effects material in a first interface; and, in response to a selection operation of a target special effects material among the at least one special effects material, display the target special effects corresponding to the target special effects material in a target image.
[0105] In one embodiment of this disclosure, the generation module 32 is specifically used to: generate a first prompt word based on the demand information, the first prompt word being used to characterize the target effect category to which the target effect belongs; obtain a data index based on the first prompt word, the data index being used to indicate the user-generated content library corresponding to the target effect category; and obtain the corresponding effect material based on the data index and the image content of the target image.
[0106] In one embodiment of this disclosure, the generation module 32 is further configured to: obtain a first rendering parameter based on a first prompt word, wherein the first rendering parameter is used to characterize the position and / or distribution of the target special effect generated based on the special effect material in the target image; and the rendering module 33 is specifically configured to: generate the target special effect in the target image according to the special effect material and the first rendering parameter.
[0107] In one embodiment of this disclosure, the generation module 32 is specifically used to: generate a second prompt word based on the requirement information, the second prompt word being used to guide the target model to generate special effects material that meets the generation requirements; and generate special effects material based on the second prompt word and the target model.
[0108] In one embodiment of this disclosure, when generating a second prompt word based on the demand information, the generation module 32 is specifically used to: obtain the image content features of the currently displayed target image; and generate a second prompt word based on the image content features and the demand information.
[0109] In one embodiment of this disclosure, when generating a second prompt word based on image content features and requirement information, the generation module 32 is specifically used to: generate a first text parameter based on image content features, the first text parameter being used to describe the semantic content of the target image; generate prompt word text based on requirement information and in conjunction with a prompt word template, the prompt word text including input parameters, the prompt word text representing the processing logic of processing the input parameters to generate special effects material that meets the generation requirements; and insert the prompt word text using the first text parameter as input parameters to generate the second prompt word.
[0110] In one embodiment of this disclosure, the generation module 32 is specifically used to: generate a first special effects material and a second special effects material according to the demand information, wherein the first special effects material is pre-generated user-generated content and the second special effects material is real-time generated model-generated content; and generate special effects material based on the combination of the first special effects material and the second special effects material.
[0111] In one embodiment of this disclosure, the rendering module 33 is specifically used to: obtain a special effect template corresponding to the target special effect, wherein the special effect template is used to process at least one special effect material; and perform image rendering based on the special effect template and the special effect material to generate the target special effect in the target image.
[0112] In one embodiment of this disclosure, the special effects template includes at least one special effects field, which is used to add at least one special effects element to the target image; when the rendering module 33 performs image rendering based on the special effects template and special effects material to generate the target special effects in the target image, it is specifically used to: map the target special effects material to the corresponding target special effects field in the special effects template to obtain the target special effects template; and process the target special effects template using the rendering engine to generate the target special effects in the target image.
[0113] In one embodiment of this disclosure, the special effects field corresponds to at least one parameter field, which is used to characterize the rules for processing the special effects material corresponding to the special effects field to generate the corresponding special effects element.
[0114] The interaction module 31, generation module 32, and rendering module 33 are connected sequentially. The special effects generation device 3 provided in this embodiment can execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0115] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 13 As shown, the electronic device 4 includes:
[0116] Processor 41, and memory 42 communicatively connected to processor 41;
[0117] Memory 42 stores instructions executed by the computer;
[0118] Processor 41 executes computer execution instructions stored in memory 42 to achieve, for example, Figures 2-11 The special effects generation method in the illustrated embodiment.
[0119] Optionally, the processor 41 and the memory 42 are connected via a bus 43.
[0120] For relevant instructions, please refer to the corresponding text. Figures 2-11 The relevant descriptions and effects of the steps in the corresponding embodiments are understood, and will not be elaborated on here.
[0121] This disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement this disclosure. Figures 2-11 The special effects generation method provided in any of the corresponding embodiments.
[0122] To implement the above embodiments, this disclosure also provides an electronic device.
[0123] refer to Figure 14 The diagram illustrates a structural schematic of an electronic device 900 suitable for implementing embodiments 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, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 14 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0124] like Figure 14 As shown, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0125] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 14 An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0126] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of embodiments of this disclosure.
[0127] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0128] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0129] The aforementioned computer-readable medium 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.
[0130] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0132] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0133] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0134] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0135] In a first aspect, according to one or more embodiments of this disclosure, a method for generating special effects is provided, comprising:
[0136] The system receives user input request information, which describes the generation requirements of the target effect based on natural language; generates special effect material that matches the image content of the currently displayed target image based on the request information; and generates the target effect in the target image based on the special effect material.
[0137] According to one or more embodiments of this disclosure, the method further includes: displaying at least one of the special effects materials in a first interface; and, in response to a selection operation for a target special effects material among the at least one of the special effects materials, displaying a target special effects corresponding to the target special effects material in the target image.
[0138] According to one or more embodiments of this disclosure, generating special effects material that matches the image content of the currently displayed target image based on the demand information includes: generating a first prompt word based on the demand information, the first prompt word being used to characterize the target special effects category to which the target special effects belong; obtaining a data index based on the first prompt word, the data index being used to indicate the user-generated content library corresponding to the target special effects category; and obtaining the corresponding special effects material based on the data index and the image content of the target image.
[0139] According to one or more embodiments of this disclosure, the method further includes: obtaining a first rendering parameter based on the first prompt word, the first rendering parameter being used to characterize the position and / or distribution of the target effect generated based on the special effects material in the target image; generating the target effect in the target image based on the special effects material, including: generating the target effect in the target image according to the special effects material and the first rendering parameter.
[0140] According to one or more embodiments of this disclosure, generating special effects material that matches the image content of the currently displayed target image based on the requirement information includes: generating a second prompt word based on the requirement information, the second prompt word being used to guide the target model to generate special effects material that meets the generation requirements; and generating the special effects material based on the second prompt word and the target model.
[0141] According to one or more embodiments of this disclosure, generating a second prompt word based on the demand information includes: obtaining image content features of the currently displayed target image; and generating the second prompt word based on the image content features and the demand information.
[0142] According to one or more embodiments of this disclosure, generating the second prompt word based on the image content features and the requirement information includes: generating a first text parameter based on the image content features, the first text parameter being used to describe the content semantics of the target image; generating prompt word text based on the requirement information and in conjunction with a prompt word template, the prompt word text including input parameters, the prompt word text representing processing logic for processing the input parameters to generate special effects material that meets the generation requirements; and inserting the first text parameter as an input parameter into the prompt word text to generate the second prompt word.
[0143] According to one or more embodiments of this disclosure, generating special effects material that matches the image content of the currently displayed target image based on the demand information includes: generating a first special effects material and a second special effects material based on the demand information, wherein the first special effects material is pre-generated user-generated content and the second special effects material is real-time generated model-generated content; and generating special effects material based on a combination of the first special effects material and the second special effects material.
[0144] According to one or more embodiments of this disclosure, generating the target special effect in the target image based on the special effect material includes: obtaining a special effect template corresponding to the target special effect, wherein the special effect template is used to process at least one special effect material; and performing image rendering based on the special effect template and the special effect material to generate the target special effect in the target image.
[0145] According to one or more embodiments of this disclosure, the special effects template includes at least one special effects field, which is used to add at least one special effects element to the target image; the step of rendering the image based on the special effects template and the special effects material to generate the target special effects in the target image includes: mapping the target special effects material to the corresponding target special effects field in the special effects template to obtain the target special effects template; and processing the target special effects template using a rendering engine to generate the target special effects in the target image.
[0146] According to one or more embodiments of this disclosure, the special effects field corresponds to at least one parameter field, and the parameter field is used to characterize the rules for processing the special effects material corresponding to the special effects field to generate the corresponding special effects element.
[0147] Secondly, according to one or more embodiments of this disclosure, a special effects generation apparatus is provided, comprising:
[0148] An interaction module is used to receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language.
[0149] The generation module is used to generate special effects materials that match the image content of the currently displayed target image based on the required information;
[0150] A rendering module is used to generate the target special effects in the target image based on the special effects material.
[0151] According to one or more embodiments of this disclosure, the interaction module is further configured to: display at least one of the special effects materials in a first interface; and, in response to a selection operation for a target special effects material among the at least one of the special effects materials, display the target special effects corresponding to the target special effects material in the target image.
[0152] According to one or more embodiments of this disclosure, the generation module is specifically configured to: generate a first prompt word based on the demand information, the first prompt word being used to characterize the target effect category to which the target effect belongs; obtain a data index based on the first prompt word, the data index being used to indicate the user-generated content library corresponding to the target effect category; and obtain corresponding effect materials based on the data index and the image content of the target image.
[0153] According to one or more embodiments of this disclosure, the generation module is further configured to: obtain a first rendering parameter based on the first prompt word, wherein the first rendering parameter is used to characterize the position and / or distribution of the target effect generated based on the special effects material in the target image; the rendering module 33 is specifically configured to: generate the target effect in the target image based on the special effects material and the first rendering parameter.
[0154] According to one or more embodiments of this disclosure, the generation module is specifically used to: generate a second prompt word based on the requirement information, the second prompt word being used to guide the target model to generate special effects material that meets the generation requirements; and generate the special effects material based on the second prompt word and the target model.
[0155] According to one or more embodiments of this disclosure, when the generation module generates a second prompt word based on the requirement information, it is specifically used to: obtain the image content features of the currently displayed target image; and generate the second prompt word based on the image content features and the requirement information.
[0156] According to one or more embodiments of this disclosure, when the generation module generates the second prompt word based on the image content features and the requirement information, it is specifically configured to: generate a first text parameter based on the image content features, wherein the first text parameter is used to describe the content semantics of the target image; generate prompt word text based on the requirement information and in combination with a prompt word template, wherein the prompt word text includes input parameters, and the prompt word text represents the processing logic for processing the input parameters to generate special effects material that meets the generation requirements; and insert the first text parameter as an input parameter into the prompt word text to generate the second prompt word.
[0157] According to one or more embodiments of this disclosure, the generation module is specifically used to: generate a first special effects material and a second special effects material based on the requirement information, wherein the first special effects material is pre-generated user-generated content and the second special effects material is real-time generated model-generated content; and generate special effects material based on a combination of the first special effects material and the second special effects material.
[0158] According to one or more embodiments of this disclosure, the rendering module is specifically configured to: obtain an effect template corresponding to the target effect, wherein the effect template is used to process at least one effect material; perform image rendering based on the effect template and the effect material, and generate the target effect in the target image.
[0159] According to one or more embodiments of this disclosure, the special effects template includes at least one special effects field, which is used to add at least one special effects element to the target image; when the rendering module 33 performs image rendering based on the special effects template and the special effects material to generate the target special effects in the target image, it is specifically used to: map the target special effects material to the corresponding target special effects field in the special effects template to obtain the target special effects template; and process the target special effects template using a rendering engine to generate the target special effects in the target image.
[0160] According to one or more embodiments of this disclosure, the special effects field corresponds to at least one parameter field, and the parameter field is used to characterize the rules for processing the special effects material corresponding to the special effects field to generate the corresponding special effects element.
[0161] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0162] The memory stores computer-executed instructions;
[0163] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the special effects generation method as described in the first aspect and various possible designs of the first aspect.
[0164] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, and when a processor executes the computer-executable instructions, the special effects generation method described in the first aspect and various possible designs of the first aspect is implemented.
[0165] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the special effects generation method as described in the first aspect and various possible designs of the first aspect.
[0166] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0167] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0168] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for generating special effects, characterized in that, include: Receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language; Based on the aforementioned requirements, generate special effects materials that match the image content of the currently displayed target image; Based on the special effects material, the target special effects are generated in the target image; The step of generating special effects material that matches the image content of the currently displayed target image based on the required information includes: Obtain the image content features of the currently displayed target image; Based on the image content features and the requirement information, a second prompt word is generated; the second prompt word is used to guide the target model to generate special effects materials that meet the generation requirements; The special effects material is generated based on the second prompt word and the target model.
2. The method according to claim 1, characterized in that, The method further includes: Within the first interface, at least one of the aforementioned special effects materials is displayed; In response to a selection operation for a target effect material among the at least one of the effect materials, the target effect corresponding to the target effect material is displayed in the target image.
3. The method according to claim 1, characterized in that, The step of generating special effects material that matches the image content of the currently displayed target image based on the required information includes: Based on the required information, a first prompt word is generated, which is used to characterize the target effect category to which the target effect belongs; Based on the first prompt word, a data index is obtained, which is used to indicate the user-generated content library corresponding to the target effect category; Based on the data index and the image content of the target image, the corresponding special effects material is obtained.
4. The method according to claim 3, characterized in that, The method further includes: Based on the first prompt word, a first rendering parameter is obtained. The first rendering parameter is used to characterize the position and / or distribution of the target special effect generated based on the special effect material in the target image. Based on the special effects material, the target special effects are generated in the target image, including: The target effect is generated in the target image based on the special effects material and the first rendering parameters.
5. The method according to claim 1, characterized in that, The step of generating the second prompt word based on the image content features and the demand information includes: Based on the image content features, a first text parameter is generated, which is used to describe the content semantics of the target image; Based on the aforementioned requirements, and in conjunction with the prompt word template, prompt word text is generated. The prompt word text includes input parameters, and the prompt word text represents the processing logic for processing the input parameters to generate special effects materials that meet the generation requirements. Using the first text parameter as input, insert the prompt text to generate the second prompt.
6. The method according to claim 1, characterized in that, The step of generating the target special effect in the target image based on the special effect material includes: Obtain the special effect template corresponding to the target special effect, wherein the special effect template is used to process at least one special effect material; Image rendering is performed based on the special effects template and the special effects materials to generate the target special effects in the target image.
7. The method according to claim 6, characterized in that, The special effects template includes at least one special effects field, which is used to add at least one special effects element to the target image; The step of rendering an image based on the special effects template and the special effects materials, and generating the target special effects in the target image, includes: The target special effects material is mapped to the corresponding target special effects field in the special effects template to obtain the target special effects template; The target effect template is processed using a rendering engine to generate the target effect in the target image.
8. The method according to claim 7, characterized in that, The special effects field corresponds to at least one parameter field, and the parameter field is used to characterize the rules for processing the special effects material corresponding to the special effects field to generate the corresponding special effects element.
9. A method for generating special effects, characterized in that, include: Receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language; Based on the aforementioned requirements, a first special effects material and a second special effects material are generated; the first special effects material is pre-generated user-generated content, and the second special effects material is real-time generated model-generated content. Based on the combination of the first special effects material and the second special effects material, generate special effects material; Based on the aforementioned special effects material, the target special effects are generated in the target image.
10. The method according to claim 9, characterized in that, The method further includes: Within the first interface, at least one of the aforementioned special effects materials is displayed; In response to a selection operation for a target effect material among the at least one of the effect materials, the target effect corresponding to the target effect material is displayed in the target image.
11. The method according to claim 9, characterized in that, The step of generating the target special effect in the target image based on the special effect material includes: Obtain the special effect template corresponding to the target special effect, wherein the special effect template is used to process at least one special effect material; Image rendering is performed based on the special effects template and the special effects materials to generate the target special effects in the target image.
12. The method according to claim 11, characterized in that, The special effects template includes at least one special effects field, which is used to add at least one special effects element to the target image; The step of rendering an image based on the special effects template and the special effects materials, and generating the target special effects in the target image, includes: The target special effects material is mapped to the corresponding target special effects field in the special effects template to obtain the target special effects template; The target effect template is processed using a rendering engine to generate the target effect in the target image.
13. The method according to claim 12, characterized in that, The special effects field corresponds to at least one parameter field, and the parameter field is used to characterize the rules for processing the special effects material corresponding to the special effects field to generate the corresponding special effects element.
14. A special effects generation device, characterized in that, include: An interaction module is used to receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language. The generation module is used to obtain the image content features of the currently displayed target image; Based on the image content features and the demand information, a second prompt word is generated; The second prompt is used to guide the target model to generate special effects materials that meet the generation requirements; Based on the second prompt word and the target model, the special effects material is generated; A rendering module is used to generate the target special effects in the target image based on the special effects material.
15. A special effects generation device, characterized in that, include: An interaction module is used to receive user input of requirement information, which is used to describe the generation requirements of the target effect based on natural language. The generation module is used to generate a first special effects material and a second special effects material based on the required information; the first special effects material is pre-generated user-generated content, and the second special effects material is real-time generated model-generated content; special effects material is generated based on the combination of the first special effects material and the second special effects material; The rendering module is used to generate the target special effects in the target image based on the special effects material.
16. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the special effects generation method as described in any one of claims 1 to 13.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the special effects generation method as described in any one of claims 1 to 13.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the special effects generation method as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Virtual article processing method and device, electronic equipment and storage medium
CN116366909A