A dynamic video generation method and device, electronic device, and storage medium

By processing the semantic expansion of the split-shot text script and the fusion redraw model, combined with the Tusheng video model and the user-selected dynamic area mask map, the problem of insufficient video content control and quality in the existing technology is solved, and high quality is achieved. Dynamic video generation.

CN118612367BActive Publication Date: 2024-10-29HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411081878.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-10-29
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

Existing video generation models cannot achieve refined control of video content, and the quality of the generated videos cannot meet the high-quality requirements of program videos.

Method used

Semantic expansion is performed by obtaining the text script of the shot, generating a static image, and using the fusion redrawing model and the image-based video model to generate the video, combined with the dynamic area mask map selected by the user, predicting the video frame frame by frame, and performing video post-processing to improve quality.

Benefits of technology

It achieves refined control and quality improvement of video content, can better meet user needs, and generates videos that meet high-quality standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118612367B_ABST
    Figure CN118612367B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for generating dynamic video, an electronic device, and a storage medium. The method comprises: obtaining a text script of a storyboard; semantically expanding the text script through a large language model to obtain multiple scene descriptions, and generating a storyboard static image corresponding to each scene description; redrawing a target storyboard static image selected from each storyboard static image using a fusion redrawing model; generating a mask image of a dynamic area on the target storyboard static image selected by a user; generating a dynamic video of the storyboard according to image generation prompt information using feature information of the target storyboard static image and the mask image through an image-generated video model; performing video post-processing on the dynamic video; generating audio generation prompt information according to the theme style of the dynamic video, and generating current video audio according to the audio generation prompt information through an audio generation model; and adding the current video audio to the dynamic video of the storyboard to obtain the final dynamic video of the storyboard.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video production technology, and in particular to a dynamic video generation method and device, electronic equipment, and storage medium. Background Art

[0002] At present, in the process of video production, whether it is real-life shooting or animation screen drawing, it takes a long time, that is, the efficiency is relatively low, and both require high costs. Therefore, a method that can produce video programs that meet the needs in an efficient and low-cost way is needed.

[0003] At present, artificial intelligence technology has made some progress in video generation. Some companies have provided text-generated video models and image-generated video models. Therefore, users can input the corresponding description text according to the video requirements to be generated, and generate the corresponding video completely through the text video model based on the semantic analysis of the input description text. Or, according to the video to be generated, first draw an image, then input it into the image-generated video model, and use the image-generated video model to expand the input image to a limited extent, so as to use the expanded image to form a short video.

[0004] However, since the current text-generated video model and image-generated video model are in the initial development stage, when generating videos, they are completely generated by the model independently based on analysis, and cannot perform fine control of the video screen content. They only generate a video that is relatively in line with the requirements as a whole, so they cannot meet the fine requirements of the program video screen content. In addition, the quality of the videos generated by the current model is also relatively limited, and cannot meet the high-quality requirements of the program video. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a dynamic video generation method and device, an electronic device, and a storage medium to solve the problem that the prior art performs fine control on video content and the quality cannot meet the requirements.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a dynamic video generation method, comprising:

[0008] Get the text script of the storyboard;

[0009] semantically expanding the text script of the storyboard by using a large language model to obtain a plurality of expanded scene descriptions of the storyboard, and generating a storyboard static image corresponding to each scene description;

[0010] Redrawing the target storyboard static image by using the fusion redrawing model to obtain the redrawn target storyboard static image; wherein the target storyboard static image is a storyboard static image selected from the storyboard static images;

[0011] Generate a mask image of a dynamic area on the target storyboard static image selected by a user;

[0012] Inputting the target storyboard static image, the mask image and the set image generation prompt information into a pre-built image-generated video model, the image-generated video model uses the feature information of the target storyboard static image and the mask image to gradually predict the next video frame according to the image generation prompt information, and uses the predicted video frames to form a dynamic video of the storyboard;

[0013] Performing video post-processing on the dynamic video of the split-lens;

[0014] Generate audio generation prompt information according to the theme style of the dynamic video of the split-shot, and generate the current video audio according to the audio generation prompt information through a pre-built audio generation model;

[0015] The current video audio is added to the dynamic video of the split-lens to obtain the final dynamic video of the split-lens.

[0016] Optionally, in the above-mentioned dynamic video generation method, the step of processing the target storyboard static image by using the fusion redrawing model to obtain the redrawn target storyboard static image comprises:

[0017] Inputting the target storyboard static image into the fusion redrawing model, and adjusting the image quality and / or size of the target storyboard static image through the drawing model in the fusion redrawing model to obtain the adjusted target storyboard static image;

[0018] Through the image redrawing plug-in in the fusion redrawing model, the defective area in the adjusted target storyboard static image is redrawn using the image edge information to obtain the redrawn target storyboard static image; wherein the image edge information is extracted from the adjusted target storyboard static image using an edge detection algorithm.

[0019] Optionally, in the above-mentioned dynamic video generation method, the target storyboard static image, the mask image and the set image generation prompt information are input into a pre-constructed image-generated video model, the image-generated video model uses the feature information of the target storyboard static image and the mask image, and gradually predicts the next video frame according to the image generation prompt information, and uses the predicted video frames to form the dynamic video of the storyboard, including:

[0020] Inputting the target storyboard static image, the mask image and the set image generation prompt information into the pre-built image-generated video model, encoding the target storyboard static image and the mask image to obtain image feature information;

[0021] Combining the internal parameters and the image feature information into guidance condition information;

[0022] Based on the gradually diffused noise introduced by the target storyboard at each time step, the next video frame is gradually predicted according to the guiding condition information and the image generation prompt information;

[0023] Arrange the video frames in time to obtain the dynamic video of the split-shot and output it.

[0024] Optionally, in the above-mentioned dynamic video generation method, the performing video post-processing on the dynamic video of the split-shot includes:

[0025] Extracting the first frame image of the dynamic video of the split-shot;

[0026] Displaying the first frame image on a drawing interface, and responding to a user's drawing operation to determine a mask area drawn by the user on the first frame image;

[0027] Using the image of the area on the static image of the target storyboard that is at the same position as the mask area, replace the image of the area on each frame of the dynamic video of the storyboard that is at the same position as the mask area;

[0028] The resolution and consistency of the dynamic video of the split-shot are improved through a video enhancement model.

[0029] Optionally, in the above-mentioned dynamic video generation method, generating the current video audio according to the audio generation prompt information by using a pre-built audio generation model includes:

[0030] The audio generation model constructed in advance by the audio data and the audio generation prompt information encodes the audio data through a variational autoencoder in the audio generation model to obtain audio encoding data, and encodes the audio generation prompt information through a text encoder in the audio generation model to obtain a high-dimensional feature vector;

[0031] The audio coding data, the high-dimensional feature vector and the time embedding are input into the image segmentation network in the audio generation model. After the image segmentation network uses the self-attention and cross-attention layers to perform feature fusion and noise reduction processing, the audio coding data, the high-dimensional feature vector and the time embedding are combined to obtain the current video audio.

[0032] A second aspect of the present application provides a dynamic video generation device, comprising:

[0033] An acquisition unit, used for acquiring a text script of a storyboard;

[0034] An image generation unit, configured to perform semantic expansion on the text script of the storyboard through a large language model to obtain a plurality of expanded scene descriptions of the storyboard, and generate a storyboard static image corresponding to each scene description;

[0035] A redrawing unit, used for redrawing the target storyboard static image by using the fusion redrawing model to obtain the redrawn target storyboard static image; wherein the target storyboard static image is a storyboard static image selected from the storyboard static images;

[0036] A mask image generating unit, used to generate a mask image of a dynamic area on the target storyboard static image selected by a user;

[0037] A video generation unit is used to input the target storyboard static image, the mask image and the set image generation prompt information into a pre-built image-generated video model, and the image-generated video model uses the feature information of the target storyboard static image and the mask image to gradually predict the next video frame according to the image generation prompt information, and uses the predicted video frames to form a dynamic video of the storyboard;

[0038] A post-processing unit, used for performing video post-processing on the dynamic video of the split-lens;

[0039] An audio generation unit, used to generate audio generation prompt information according to the theme style of the dynamic video of the split-shot, and generate the current video audio according to the audio generation prompt information through a pre-built audio generation model;

[0040] The adding unit is used to add the current video audio to the dynamic video of the split-lens to obtain the final dynamic video of the split-lens.

[0041] Optionally, in the above-mentioned dynamic video generation device, the redrawing unit includes:

[0042] An image adjustment unit, used for inputting the target storyboard static image into the fusion redrawing model, and adjusting the image quality and / or size of the target storyboard static image through the drawing model in the fusion redrawing model to obtain the adjusted target storyboard static image;

[0043] The area redrawing unit is used to redraw the defective area in the adjusted target storyboard static image using the image edge information through the image redrawing plug-in in the fusion redrawing model to obtain the redrawn target storyboard static image; wherein the image edge information is obtained by extracting the adjusted target storyboard static image using an edge detection algorithm.

[0044] Optionally, in the above-mentioned dynamic video generation device, the video generation unit includes:

[0045] A feature acquisition unit, used for inputting the target storyboard static image, the mask image and the set image generation prompt information into the pre-built image-generated video model, encoding the target storyboard static image and the mask image, and obtaining image feature information;

[0046] A feature combination unit, used for combining internal parameters and the image feature information into guidance condition information;

[0047] A prediction unit, configured to predict the next video frame step by step based on the gradually diffused noise introduced by the target storyboard at each time step, according to the guiding condition information and the image generation prompt information;

[0048] The image combination unit is used to arrange the video frames in time to obtain the dynamic video of the split-shot and output it.

[0049] Optionally, in the above-mentioned dynamic video generation device, the post-processing unit includes:

[0050] An extraction unit, used to extract the first frame image of the dynamic video of the split-shot;

[0051] A drawing unit, used for displaying the first frame image on a drawing interface, and in response to a user's drawing operation, determining a mask area drawn by the user on the first frame image;

[0052] A replacement unit, used to replace the image of the area at the same position as the mask area on each frame of the dynamic video of the storyboard with the image of the area at the same position as the mask area on the static image of the target storyboard;

[0053] The enhancement unit is used to improve the resolution and consistency of the dynamic video of the split-shot through a video enhancement model.

[0054] Optionally, in the above-mentioned dynamic video generation device, the audio generation unit includes:

[0055] An encoding unit, configured to encode the audio data and the audio generation prompt information pre-constructed audio generation model by a variational autoencoder in the audio generation model to obtain audio encoding data, and to encode the audio generation prompt information by a text encoder in the audio generation model to obtain a high-dimensional feature vector;

[0056] A feature processing unit is used to input the audio coding data, the high-dimensional feature vector and the time embedding into the image segmentation network in the audio generation model, and after performing feature fusion and noise reduction processing using self-attention and cross-attention layers through the image segmentation network, the audio coding data, the high-dimensional feature vector and the time embedding are combined to obtain the current video audio.

[0057] A third aspect of the present application provides an electronic device, including:

[0058] Memory and processor;

[0059] Wherein, the memory is used to store programs;

[0060] The processor is used to execute the program, and when the program is executed, it is specifically used to implement any one of the dynamic video generation methods described above.

[0061] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement a dynamic video generation method as described in any one of the above.

[0062] The embodiment of the present application provides a method for generating a dynamic video, which obtains a text script of a storyboard, and then semantically expands the text script of the storyboard through a large language model to obtain multiple scene descriptions of the expanded storyboard, and generates a storyboard static image corresponding to each scene description, thereby ensuring that a lens image that meets the needs of the user can be generated through an expansion method for the user to choose, thereby ensuring that the generated dynamic video is more in line with the actual needs of the user. Then, a fusion redrawing model is used to redraw the target storyboard static image selected by the user from each storyboard static image to obtain a redrawn target storyboard static image, thereby redrawing the area that needs to be adjusted in the static image to achieve refined control of the lens image, and ensure the quality of the lens image, thereby improving the quality of the generated video. Then, a mask image of the dynamic area on the target storyboard static image selected by the user is generated to allow the user to select and control the area that changes dynamically. After accommodating, the target storyboard static image, mask image and set image generation prompt information are input into the pre-built image-generated video model. The image-generated video model uses the feature information of the target storyboard static image and mask image to gradually predict the next frame of video according to the image generation prompt information, and uses the predicted frames of video to form the dynamic video of the storyboard, so as to dynamically change the dynamic video according to the dynamic area selected by the user. Then, the dynamic video of the storyboard is post-processed to improve the video of each frame of the generated dynamic video to ensure whether the dynamic video meets the requirements. Then, according to the theme style of the dynamic video of the storyboard, the audio generation prompt information is generated, and the current video audio is generated according to the audio generation prompt information through the pre-built audio generation model, so as to generate audio data that meets the theme style of the dynamic video. Finally, the current video audio is added to the dynamic video of the storyboard to obtain the final dynamic video of the storyboard. Thus, a video generation method that can be finely controlled is realized, which can well meet the needs of users and effectively ensure the quality of the video. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0064] Figure 1 A flowchart of a dynamic video generation method provided in an embodiment of the present application;

[0065] Figure 2 A flowchart of a method for redrawing a target storyboard static image provided by an embodiment of the present application;

[0066] Figure 3 A schematic diagram of an example of controlling a dynamic area of ​​an image provided by an embodiment of the present application;

[0067] Figure 4 A flowchart of a method for generating dynamic video by using an image-generated video model provided in an embodiment of the present application;

[0068] Figure 5 A flowchart of a method for post-processing a dynamic video provided in an embodiment of the present application;

[0069] Figure 6 A flowchart of a method for generating current video and audio provided in an embodiment of the present application;

[0070] Figure 7 A schematic diagram of the architecture of a dynamic video generation device provided in an embodiment of the present application;

[0071] Figure 8 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0074] The present application embodiment provides a method for generating a dynamic video. Figure 1 As shown, the following steps are included:

[0075] S101. Obtain the text script of the storyboard.

[0076] Among them, storyboard refers to any shot in the program.

[0077] Specifically, the user can edit the corresponding text script according to the storyboard video to be generated, that is, to describe the storyboard screen in text, so that the storyboard video can be generated based on the obtained storyboard text script, without the user having to draw the storyboard image. The storyboard text script can specifically adopt Prompt.

[0078] S102, semantically expanding the text script of the storyboard using a large language model to obtain multiple scene descriptions of the expanded storyboards, and generating a storyboard static image corresponding to each scene description.

[0079] Since the granularity of the content that can be described by the text script of the storyboard edited by the user is limited, the video generated directly based on the text script of the storyboard edited by the user may only meet the user's needs in terms of the overall theme, but cannot meet the user's real needs well. Therefore, in the implementation of this application, in order to generate a video that meets the real needs of the user, the text script of the storyboard is semantically expanded through a large language model, so that on the basis of the original storyboard scene description, multiple scene descriptions of multiple storyboards are further expanded, that is, multiple script prompts of the storyboard are generated. For example, if the user starts editing "I want a picture of a person laying bricks", then correspondingly, multiple scene descriptions such as "people laying bricks in mountains and rivers", "people laying bricks in busy streets", and "people laying bricks in the universe" can be expanded.

[0080] Then, using each scene description of the storyboard, a static storyboard image that meets the scene description is generated for the user to choose, allowing the user to select the storyboard image that meets their actual needs for subsequent video generation, and then obtain a video that meets the needs. That is, the storyboard image is generated in an extended manner to generate an image that meets the user's needs and is available for the user to choose.

[0081] Therefore, a static storyboard image corresponding to each scene description is generated, and the static storyboard image corresponding to each scene description can be displayed to the user for selection.

[0082] Optionally, the specific large language model used can be developed and constructed based on GPT-4.

[0083] S103, using the fusion redrawing model to redraw the target storyboard static image to obtain a redrawn target storyboard static image.

[0084] The target storyboard static image is a storyboard static image selected from the storyboard static images.

[0085] It should be noted that the target storyboard static image selected by the user is a static image that meets the user's needs as a whole, but the quality, size, etc. of the target storyboard static image, as well as some details in the target storyboard static image, such as character clothing, hair accessories, and some items, do not meet the needs. Therefore, in order to achieve refined control of the target storyboard static image and achieve refined control of the generated video, the target storyboard static image is further redrawn in the embodiment of the present application. Specifically, a fusion redrawing model is constructed by combining multiple models, and the target storyboard static image is redrawn according to the user's needs through the fusion redrawing model, that is, a partial area in the target storyboard static image is redrawn according to the user's needs, thereby achieving refined control of the target storyboard static image, so that the target storyboard static image also meets the user's needs in details.

[0086] Optionally, in another embodiment of the present application, a specific implementation of step S103 is as follows: Figure 2 As shown, the following steps are included:

[0087] S201, inputting the target storyboard static image into the fusion redrawing model, and adjusting the image quality and / or size of the target storyboard static image through the drawing model in the fusion redrawing model to obtain an adjusted target storyboard static image.

[0088] It should be noted that in the embodiment of the present application, the fused redrawing model is obtained by merging the drawing model and the image redrawing plug-in, and combining the mask technology. Among them, the drawing model is mainly used to adjust the target storyboard static image as a whole, and the mask technology can be used to select the area that needs to be redrawn in the target storyboard static image, and the image redrawing plug-in is used to redraw the selected area. Optionally, the drawing model can specifically use Stable diffusion, and the image redrawing plug-in is specifically Adetailer.

[0089] Therefore, after the target storyboard static image is input into the fusion redrawing model, the drawing model therein first adjusts the image quality and / or size of the target storyboard static image to obtain the adjusted target storyboard static image.

[0090] S202, by integrating the image redrawing plug-in in the redrawing model, using the image edge information to redraw the defective area in the adjusted target storyboard static image to obtain a redrawn target storyboard static image.

[0091] The image edge information is extracted from the adjusted target storyboard static image using an edge detection algorithm. The defect area refers to the area in the target storyboard static image that does not meet the user's expectations.

[0092] Specifically, the user can select the defective area by drawing a mask through interactive operation means such as a mouse, and then the image redrawing plug-in redraws the defective area. In addition, in order to make the redrawn area perfectly integrated with other areas. Therefore, in the embodiment of the present application, in the process of redrawing, an edge detection algorithm is also combined to extract the edge information in the original image through the edge detection algorithm, and redraw based on this edge information, so that the redrawn content and other content are more naturally integrated.

[0093] S104: Generate a mask image of the dynamic area on the target storyboard static image selected by the user.

[0094] It should be noted that, unlike the prior art, the model is completely autonomous in dynamically changing multiple objects in the static image to generate a dynamic video. In the embodiment of the present application, in order to meet the user's demand for program videos, the dynamic changes in the dynamic video are finely controlled. Specifically, in the embodiment of the present application, the user selects the dynamic area on the target storyboard static image, and a mask map of the dynamic area is generated accordingly, so that the dynamic area can be dynamically processed later, so that the objects in the dynamic area can achieve dynamic changes, and other areas will not be dynamically processed.

[0095] Optionally, the "pre-processing motion brush function" can be used to select the mask area that can be dynamically changed directly on the target storyboard static image by making a drawing mask interactive with the mouse, so as to achieve pixel-level control. Figure 3 As shown, the user only wants Figure 3 If the candle flame in the picture shown in the figure is shaking, you can select the candle flame through mouse interaction and other drawing methods, and then the corresponding Figure 3 The mask map of the dynamic area shown in (a) in the figure is the mask control map of the dynamic area. In the subsequent generated video, only the candle flame in each predicted image changes dynamically. For example, Figure 3 In (b), (c), (d), and (e), only the candle flame is different, so these images can constitute a video of the candle flame changing.

[0096] S105. The target storyboard static image, the mask image, and the set image generation prompt information are input into a pre-built image-generated video model. The image-generated video model uses the feature information of the target storyboard static image and the mask image to gradually predict the next video frame according to the image generation prompt information, and uses the predicted video frames to compose a dynamic video of the storyboard.

[0097] It should be noted that the mask image is mainly used to determine the area that needs to change dynamically. In order to control the change of the dynamic area according to the user's needs, in an embodiment of the present application, the user can also input a set Prompt for indicating image generation, that is, the set image generation prompt information.

[0098] Optionally, the image-generated video model can be a scalable diffusion model improved based on stable video diffusion, and the video generation effect is optimized by adding multiple temporal layers containing 3D convolutions in the U-Net part of the model, and then the autoregressive generation method and the pre-trained VAE model are used to encode and decode the input image.

[0099] Specifically, the image-generated video model can encode the target storyboard static image and mask image to obtain the feature information of the target storyboard static image and mask image, and then based on the target storyboard static image, mask image and feature information, generate prompt information according to the image, predict the next video frame of the target storyboard static image, and then predict the next video frame based on one video frame, so as to obtain multiple video frames after multiple predictions, and sort the video frames according to time to form a dynamic video of the storyboard.

[0100] Optionally, in another embodiment of the present application, a specific embodiment of step S105 is as follows: Figure 4 As shown, the following steps are included:

[0101] S401, input the target storyboard static image, the mask image and the set image generation prompt information into a pre-built image-generated video model, encode the target storyboard static image and the mask image, and obtain image feature information.

[0102] S402: Combine internal parameters and image feature information into guidance condition information.

[0103] The internal parameters refer to the parameters in the image-generated video model. Since the image can only be predicted based on the internal part of the image-generated video model, the internal parameters and image feature information are combined.

[0104] S403 , based on the gradually diffused noise introduced into the target storyboard at each time step, and in accordance with the guiding condition information and the image generation prompt information, the next video frame is gradually predicted.

[0105] S404: Arrange the video frames according to time, obtain a split-shot dynamic video and output it.

[0106] S106: Perform video post-processing on the dynamic video of the split-shot.

[0107] It should be noted that, considering that the quality of the video frames predicted by the image-generated video model may not meet the quality requirements of the program video, in the embodiment of the present application, it is also necessary to perform video post-processing on the generated dynamic video of the split-lens. Specifically, the quality of each video frame in the dynamic video of the split-lens may be optimized.

[0108] Optionally, in another embodiment of the present application, a specific implementation of step S106 is as follows: Figure 5 As shown, the following steps are included:

[0109] S501, extracting the first frame image of the split-shot dynamic video.

[0110] It should be noted that if there is a defect in a certain area of ​​the first frame image of the split-shot dynamic video, such as deformation of a person or object, the subsequent video frames will also have the same problem in the same area, so the first frame image of the split-shot dynamic video should be taken first to facilitate identification of the defective area.

[0111] S502: Display the first frame image on the drawing interface, and in response to the user's drawing operation, determine the mask area drawn by the user on the first frame image.

[0112] In order to facilitate processing according to user needs, the first frame image will be displayed on the drawing interface for the user to select the area to be processed. Specifically, the user can also use the "post-processing motion brush function" to draw the area to be processed on the interface, and a mask area will be generated accordingly.

[0113] S503, using the image of the area on the static image of the target storyboard that is at the same position as the mask area, to replace the image of the area on each frame of the dynamic video of the storyboard that is at the same position as the mask area.

[0114] It should be noted that since the generated target storyboard static image is processed through a fusion redrawing model, it has a higher quality, and the size of the target storyboard static image is consistent with that of each frame image of the dynamic video. Therefore, in an embodiment of the present application, the image of the same area in the target storyboard static image is selected to replace the mask area of ​​each frame image of the dynamic video, thereby replacing the image of the defective area.

[0115] S504: Improve the resolution and consistency of the dynamic video of the split-shot by using a video enhancement model.

[0116] Specifically, the video enhancement model combining U-Net and VAE-Decoder algorithms can be used to increase the resolution of the video to a specified resolution, such as 4k, and can also perform dynamic frame interpolation to supplement the frame rate to a set frame rate, such as 60fps. In addition, the model divides the dynamic video into multiple segments and processes them using U-Net with a time layer to achieve consistency within the segment.

[0117] S107, generating audio generation prompt information according to the theme style of the dynamic video of the split-shot, and generating the current video audio according to the audio generation prompt information through a pre-built audio generation model.

[0118] It should be noted that, since the generated dynamic video only contains the video part, it is also necessary to generate corresponding audio data for the dynamic video, so as to form a complete video together with the dynamic video. In order to generate audio that matches the dynamic video, the audio generation prompt information is generated according to the theme style of the dynamic video of the split shot, that is, according to the theme style of the dynamic video, multiple words are summarized as input prompts, which are input into the audio generation model, so that the audio generation prompt information is generated according to the audio through the audio generation model to generate audio that matches the theme style of the dynamic video.

[0119] Optionally, in another embodiment of the present application, a specific implementation of step S107 is as follows: Figure 6 As shown, the following steps are included:

[0120] S601. Encode the audio data and the audio generation prompt information in advance in the audio generation model, using a variational autoencoder in the audio generation model to obtain audio encoded data, and encode the audio generation prompt information through a text encoder in the audio generation model to obtain a high-dimensional feature vector.

[0121] Optionally, an audio generation model based on the optimized Transformer model can be used. First, the copyrighted audio data is input into the model, and the convolutional variational autoencoder (VAE) in the model is used to compress and represent it, retaining enough feature information to generate audio data that conforms to the dynamic video based on the audio data. Then, the pre-trained text encoder CLAP in the model is used to encode the audio generation prompt information into high-dimensional feature vectors, which establish meaningful connections between words and corresponding sounds, so audio generation can be based on them.

[0122] S602, input the audio coding data, high-dimensional feature vector and time embedding into the image segmentation network in the audio generation model, perform feature fusion and noise reduction processing through the image segmentation network using self-attention and cross-attention layers, and then combine the audio coding data, high-dimensional feature vector and time embedding to obtain the current video audio.

[0123] Specifically, the audio encoding data, high-dimensional feature vectors, and time embedding are input into the image segmentation network (U-Net architecture) in the audio generation model to use self-attention and cross-attention layers for feature fusion and noise reduction. Finally, U-Net generates high-quality audio clips that meet the user-specified length and text prompts through high-dimensional feature vectors, time embedding, and VAE-encoded audio encoding data.

[0124] S108: Add the current video and audio to the dynamic video of the split-shot to obtain the final dynamic video of the split-shot.

[0125] Specifically, the current video audio and the dynamic video of the split-shot may be combined according to time, thereby obtaining the final dynamic video of the split-shot.

[0126] The embodiment of the present application provides a method for generating a dynamic video, which obtains a text script of a storyboard, and then semantically expands the text script of the storyboard through a large language model to obtain multiple scene descriptions of the expanded storyboard, and generates a storyboard static image corresponding to each scene description, thereby ensuring that a lens image that meets the needs of the user can be generated through an expansion method for the user to choose, thereby ensuring that the generated dynamic video is more in line with the actual needs of the user. Then, a fusion redrawing model is used to redraw the target storyboard static image selected by the user from each storyboard static image to obtain a redrawn target storyboard static image, thereby redrawing the area that needs to be adjusted in the static image to achieve refined control of the lens image, and ensure the quality of the lens image, thereby improving the quality of the generated video. Then, a mask image of the dynamic area on the target storyboard static image selected by the user is generated to allow the user to select and control the area that changes dynamically. After accommodating, the target storyboard static image, mask image and set image generation prompt information are input into the pre-built image-generated video model. The image-generated video model uses the feature information of the target storyboard static image and mask image to gradually predict the next frame of video according to the image generation prompt information, and uses the predicted frames of video to form the dynamic video of the storyboard, so as to dynamically change the dynamic video according to the dynamic area selected by the user. Then, the dynamic video of the storyboard is post-processed to improve the video of each frame of the generated dynamic video to ensure whether the dynamic video meets the requirements. Then, according to the theme style of the dynamic video of the storyboard, the audio generation prompt information is generated, and the current video audio is generated according to the audio generation prompt information through the pre-built audio generation model, so as to generate audio data that meets the theme style of the dynamic video. Finally, the current video audio is added to the dynamic video of the storyboard to obtain the final dynamic video of the storyboard. Thus, a video generation method that can be finely controlled is realized, which can well meet the needs of users and effectively ensure the quality of the video.

[0127] Another embodiment of the present application provides a dynamic video generation device, such as Figure 7 As shown, including:

[0128] The acquisition unit 701 is used to acquire the text script of the storyboard.

[0129] The image generation unit 702 is used to perform semantic expansion on the text script of the storyboard through a large language model to obtain multiple scene descriptions of the expanded storyboards, and generate a storyboard static image corresponding to each scene description.

[0130] The redrawing unit 703 is used to redraw the target storyboard static image by using the fusion redrawing model to obtain the redrawn target storyboard static image.

[0131] The target storyboard static image is a storyboard static image selected from the storyboard static images.

[0132] The mask image generating unit 704 is used to generate a mask image of a dynamic area on the target storyboard static image selected by the user.

[0133] The video generation unit 705 is used to input the target storyboard static image, the mask image and the set image generation prompt information into a pre-constructed image-generated video model. The image-generated video model uses the feature information of the target storyboard static image and the mask image to gradually predict the next video frame according to the image generation prompt information, and uses the predicted video frames to form a dynamic video of the storyboard.

[0134] The post-processing unit 706 is used to perform video post-processing on the dynamic video of the split-shot.

[0135] The audio generation unit 707 is used to generate audio generation prompt information according to the theme style of the dynamic video of the split-shot, and generate the current video audio according to the audio generation prompt information through a pre-built audio generation model.

[0136] The adding unit 708 is used to add the current video and audio to the dynamic video of the split-shot to obtain the final dynamic video of the split-shot.

[0137] Optionally, in a dynamic video generating device provided in another embodiment of the present application, the redrawing unit includes:

[0138] The image adjustment unit is used to input the target storyboard static image into the fusion redrawing model, and adjust the image quality and / or size of the target storyboard static image through the drawing model in the fusion redrawing model to obtain the adjusted target storyboard static image.

[0139] The area redrawing unit is used to redraw the defective area in the adjusted target storyboard static image by integrating the image redrawing plug-in in the redrawing model and using the image edge information to obtain the redrawn target storyboard static image. The image edge information is obtained by extracting the adjusted target storyboard static image using an edge detection algorithm.

[0140] Optionally, in a dynamic video generating device provided in another embodiment of the present application, the video generating unit includes:

[0141] The feature acquisition unit is used to input the target storyboard static image, the mask image and the set image generation prompt information into a pre-built image-generated video model, encode the target storyboard static image and the mask image, and obtain image feature information.

[0142] The feature combination unit is used to combine internal parameters and image feature information into guidance condition information.

[0143] The prediction unit is used to gradually predict the next video frame based on the gradually diffused noise introduced by the target storyboard shot graph at each time step, according to the guidance condition information and the image generation prompt information.

[0144] The image combination unit is used to arrange each frame of video according to time, obtain a dynamic video of split shots and output it.

[0145] Optionally, in the dynamic video generating device provided in another embodiment of the present application, the post-processing unit includes:

[0146] The extraction unit is used to extract the first frame image of the dynamic video of the split-shot.

[0147] The drawing unit is used to display the first frame image on the drawing interface, and respond to the user's drawing operation to determine the mask area drawn by the user on the first frame image.

[0148] The replacement unit is used to replace the image of the area at the same position as the mask area on each frame image of the dynamic video of the storyboard with the image of the area at the same position as the mask area on the static image of the target storyboard.

[0149] The enhancement unit is used to improve the resolution and consistency of the dynamic video of the split-shot through a video enhancement model.

[0150] Optionally, in the dynamic video generating device provided in another embodiment of the present application, the audio generating unit includes:

[0151] The encoding unit is used to encode the audio data and the audio generation prompt information in advance in the audio generation model, encode the audio data through the variational autoencoder in the audio generation model to obtain audio encoding data, and encode the audio generation prompt information through the text encoder in the audio generation model to obtain a high-dimensional feature vector.

[0152] The feature processing unit is used to input the audio coding data, high-dimensional feature vectors and time embedding into the image segmentation network in the audio generation model. After the image segmentation network uses self-attention and cross-attention layers to perform feature fusion and noise reduction processing, the audio coding data, high-dimensional feature vectors and time embedding are combined to obtain the current video audio.

[0153] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the implementation process of the corresponding steps in the method embodiment provided in the above method embodiment, and will not be repeated here.

[0154] Another embodiment of the present application provides an electronic device, such as Figure 8 As shown, including:

[0155] Memory 801 and processor 802 .

[0156] The memory 801 is used to store programs.

[0157] The processor 802 is used to execute the program stored in the memory 801. When the program is executed, it is specifically used to implement the dynamic video generation method provided by any one of the above embodiments.

[0158] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the dynamic video generation method provided in any one of the above embodiments.

[0159] Computer storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program models or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0160] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0161] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for generating dynamic video, characterized in that: include: Get the text script of the storyboard; Performing semantic expansion on the text script of the storyboard using a large language model to obtain a plurality of expanded scene descriptions of the storyboard, and generating a storyboard static image corresponding to each scene description; Redrawing the target storyboard static image using the fusion redrawing model to obtain the redrawn target storyboard static image; wherein the target storyboard static image is a storyboard static image selected from the storyboard static images; Generate a mask image of the dynamic area on the target storyboard static image selected by the user; The target storyboard static image, the mask image and the set image generation prompt information are input into a pre-constructed image-generated video model, and the image-generated video model uses the feature information of the target storyboard static image and the mask image to gradually predict the next video frame according to the image generation prompt information, and uses the predicted video frames to form a dynamic video of the storyboard, including: inputting the target storyboard static image, the mask image and the set image generation prompt information into the pre-constructed image-generated video model, encoding the target storyboard static image and the mask image to obtain image feature information; forming guidance condition information with internal parameters and the image feature information; based on the gradually diffused noise introduced by the target storyboard static image at each time step, gradually predicting the next video frame according to the guidance condition information and the image generation prompt information; arranging the video frames according to time to obtain and output the dynamic video of the storyboard; the set image generation prompt information is instruction information input by the user for controlling the change of the dynamic area; Performing video post-processing on the dynamic video of the split-shot; Generate audio generation prompt information according to the theme style of the dynamic video of the split-shot, and generate current video audio according to the audio generation prompt information through a pre-constructed audio generation model, including: encoding the audio data and the audio generation prompt information in advance through the audio generation model, using a variational autoencoder in the audio generation model to obtain audio encoding data, and encoding the audio generation prompt information through a text encoder in the audio generation model to obtain a high-dimensional feature vector; input the audio encoding data, the high-dimensional feature vector and time embedding into a U-Net architecture in the audio generation model, and after performing feature fusion and noise reduction processing using self-attention and cross-attention layers in the U-Net architecture, the audio encoding data, the high-dimensional feature vector and time embedding are aggregated to obtain current video audio; The current video audio is added to the dynamic video of the split-shot to obtain the final dynamic video of the split-shot.

2. The method according to claim 1, characterized in that The method of processing the target storyboard static image by using the fusion redrawing model to obtain the redrawn target storyboard static image includes: Inputting the target storyboard static image into the fusion redrawing model, and adjusting the image quality and / or size of the target storyboard static image using the drawing model in the fusion redrawing model to obtain the adjusted target storyboard static image; Through the image redrawing plug-in in the fusion redrawing model, the defective area in the adjusted target storyboard static image is redrawn using the image edge information to obtain the redrawn target storyboard static image; wherein, the image edge information is extracted from the adjusted target storyboard static image using an edge detection algorithm.

3. The method according to claim 1, characterized in that The video post-processing of the dynamic video of the split-shot includes: Extracting the first frame image of the dynamic video of the split-shot; Displaying the first frame image on a drawing interface, and responding to a user's drawing operation to determine a mask area drawn by the user on the first frame image; Using the image of the area on the static image of the target storyboard that is at the same position as the mask area, replace the image of the area on each frame of the dynamic video of the storyboard that is at the same position as the mask area; The resolution and consistency of the dynamic video of the split-shot are improved through a video enhancement model.

4. A dynamic video generation device, characterized in that: include: An acquisition unit, used to acquire the text script of the storyboard; an image generation unit, configured to semantically expand the text script of the storyboard using a large language model to obtain a plurality of expanded scene descriptions of the storyboard, and generate a static image of the storyboard corresponding to each scene description; a redrawing unit, configured to redraw the target storyboard static image using a fusion redrawing model to obtain the redrawn target storyboard static image; wherein the target storyboard static image is a storyboard static image selected from the storyboard static images; A mask image generating unit, configured to generate a mask image of a dynamic area on the target storyboard static image selected by a user; The video generation unit is configured to input the target storyboard static image, the mask image, and set image generation prompt information into a pre-built image-generated video model, wherein the image-generated video model uses feature information of the target storyboard static image and the mask image to gradually predict the next video frame according to the image generation prompt information, and uses the predicted video frames to compose a dynamic video of the storyboard; the set image generation prompt information is instruction information input by a user for controlling changes in a dynamic area; The video generation unit includes: a feature acquisition unit, a feature combination unit, a prediction unit and an image combination unit; The feature acquisition unit is configured to input the target storyboard static image, the mask image, and the set image generation prompt information into the pre-built image-generated video model, encode the target storyboard static image and the mask image, and obtain image feature information; The feature combination unit is used to combine internal parameters and the image feature information into guidance condition information; The prediction unit is configured to predict the next video frame step by step based on the gradually diffused noise introduced by the target storyboard static image at each time step, in accordance with the guidance condition information and the image generation prompt information; The image combination unit is used to arrange the frames of the video according to time, obtain the dynamic video of the shot and output it; A post-processing unit, configured to perform video post-processing on the dynamic video of the split-shot; An audio generation unit, configured to generate audio generation prompt information according to the theme style of the dynamic video of the split-shot, and generate the current video audio according to the audio generation prompt information using a pre-built audio generation model; The audio generation unit includes: an encoding unit and a feature processing unit; The encoding unit is configured to encode the audio data and the audio generation prompt information pre-constructed audio generation model using a variational autoencoder in the audio generation model to obtain audio encoded data, and to encode the audio generation prompt information using a text encoder in the audio generation model to obtain a high-dimensional feature vector; The feature processing unit is configured to input the audio coding data, the high-dimensional feature vector, and the time embedding into a U-Net architecture in the audio generation model, perform feature fusion and noise reduction processing using self-attention and cross-attention layers through the U-Net architecture, and then combine the audio coding data, the high-dimensional feature vector, and the time embedding to obtain the current video audio; The adding unit is used to add the current video and audio to the dynamic video of the split-shot to obtain the final dynamic video of the split-shot.

5. The device according to claim 4, characterized in that The redrawing unit includes: an image adjustment unit, configured to input the target storyboard static image into the fusion redrawing model, and adjust the image quality and / or size of the target storyboard static image using the drawing model in the fusion redrawing model to obtain the adjusted target storyboard static image; The area redrawing unit is used to redraw the defective area in the adjusted target storyboard static image using the image edge information through the image redrawing plug-in in the fusion redrawing model to obtain the redrawn target storyboard static image; wherein the image edge information is obtained by extracting the adjusted target storyboard static image using an edge detection algorithm.

6. An electronic device, characterized in that: include: memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the dynamic video generation method according to any one of claims 1 to 3.

7. A computer storage medium, characterized in that Used to store a computer program, which, when executed, is used to implement the dynamic video generation method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Video generation method and device, medium and equipment

    CN109889849A

  • Method for redrawing planar object in video, electronic equipment and medium

    CN115880167A

  • Video generation method and device, medium and electronic equipment

    CN117319705A