Video generation method and device, electronic equipment and readable storage medium

By fusing image and text features in the video generation model, combined with gesture feature extraction and diffusion model training, the smoothness and coherence problems of video generation in the existing technology are solved, the generation and flexible control of high-quality videos are achieved, and the Application potential of video synthesis.

CN118632088APending Publication Date: 2024-09-10SHENZHEN XUMI YUNTU SPACE TECH CO LTD
View PDF 0 Cites 13 Cited by

Patent Information

Application Number
CN202410571462.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing video generation models are unable to generate high-quality videos in complex scenes and have difficulty understanding abstract concepts and emotional expressions in text, resulting in flaws in the fluency, coherence, and logic of the generated videos.

Method used

By obtaining the input image and text description, using the feature processing network to extract multiple feature representations, and performing feature fusion, combined with gesture feature extraction, input to the diffusion model for training and adjustment, generating a high-quality, coherent video frame sequence, allowing the user to control The posture and behavior of the protagonist in the video.

Benefits of technology

It achieves high-quality, high-coherence video generation with flexibility and scalability, can accurately control video content based on text description, meets the diverse needs of digital human creation, and expands the creativity and content creation potential of video synthesis technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118632088A
    Figure CN118632088A
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, and provides a video generation method and device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring an input image and text description, processing the input image through different feature processing networks to obtain various feature representations, and performing feature fusion to obtain text fusion features and image fusion features; simultaneously extracting posture features of the input image and text features of the text description; the features and the noise image are input into a first diffusion model, an initial image is generated, and the model is trained to learn attitude features. And taking the trained model parameters as priori knowledge, adjusting the structure of the first diffusion model to obtain a second diffusion model, processing text features and noise images by using the second diffusion model, generating a video frame sequence, and finally obtaining a target video. According to the invention, the quality and coherence of the generated video can be improved, and the posture of the target object in the video can be controlled by adjusting the input text description.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a video generation method, device, electronic device and readable storage medium. Background Art

[0002] With the rapid development of artificial intelligence technology, remarkable results have been achieved in the field of text-to-image synthesis. Through advanced algorithms and models, text descriptions can be quickly transformed into vivid and realistic visual works. However, although the technology of text-to-image is quite mature, the current technology still faces some challenges in text-to-video generation.

[0003] Existing video generation models have not yet fully met actual needs. Although conditional video synthesis models based on GAN (Generative Adversarial Network) can generate realistic images, these models still have limitations in editing and driving video content based on text descriptions. For example, it may be difficult for the model to accurately understand certain abstract concepts or emotional expressions in the text, resulting in the generated video deviating from the original intention. Secondly, the text-to-video conversion capabilities of these models are not strong enough. Although they can generate some basic video frames based on text descriptions, the performance of the models is often unsatisfactory when dealing with complex dynamic scenes, temporal relationships, or character interactions. As a result, the generated videos have defects in fluency, coherence, or logic. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a video generation method, device, electronic device and readable storage medium to solve the problem that the prior art cannot generate high-quality videos in complex scenarios.

[0005] According to a first aspect of an embodiment of the present application, a video generation method is provided, including:

[0006] An input image and a text description are obtained, wherein the input image contains a target object, and the text description is used to characterize the state information of the target object; the input image is input into different feature processing networks for feature processing to obtain a plurality of feature representations corresponding to the input image, and the plurality of feature representations are feature fused according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image; posture feature extraction is performed on the input image to obtain a skeleton posture feature corresponding to the input image, and feature extraction is performed on the text description to obtain text features corresponding to the text description; the text fusion features, image fusion features, skeleton posture features, text features and a pre-generated noise image are input into a first diffusion model, and an initial generated image is obtained by processing the first diffusion model, and the feature processing network and the first diffusion model are trained based on the initial generated image to learn the posture features of the input image; the trained model parameters are used as prior knowledge, and the model structure of the first diffusion model is adjusted to obtain a second diffusion model, and based on the text features corresponding to the text description and the plurality of pre-generated noise images, the state information of the target object is processed by the second diffusion model to obtain a video frame sequence, and a target video is obtained based on the video frame sequence.

[0007] According to a second aspect of the embodiments of the present application, a video generating device is provided, including:

[0008] The acquisition module is configured to acquire an input image and a text description, wherein the input image contains a target object, and the text description is used to characterize the state information of the target object; the feature processing model is configured to input the input image into different feature processing networks for feature processing, obtain multiple feature representations corresponding to the input image, and perform feature fusion on the multiple feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image; the feature extraction model is configured to perform posture feature extraction on the input image to obtain the skeleton posture feature corresponding to the input image, and perform feature extraction on the text description to obtain the text feature corresponding to the text description; the training module is configured to perform text fusion on the text description to obtain the text feature corresponding to the text description; The fusion features, image fusion features, skeleton posture features, text features and pre-generated noise images are input into the first diffusion model, and the initial generated image is obtained by processing using the first diffusion model. The feature processing network and the first diffusion model are trained based on the initial generated image to learn the posture features of the input image; the video generation module is configured to use the trained model parameters as prior knowledge, and adjust the model structure of the first diffusion model to obtain a second diffusion model. Based on the text features corresponding to the text description and the pre-generated multiple noise images, the state information of the target object is processed using the second diffusion model to obtain a video frame sequence, and the target video is obtained based on the video frame sequence.

[0009] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0010] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0011] Compared with the prior art, the embodiments of the present invention have at least the following beneficial effects:

[0012] Acquire an input image and a text description; input the input image into different feature processing networks for feature processing to obtain a plurality of feature representations corresponding to the input image, and fuse the plurality of feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image; perform posture feature extraction on the input image to obtain a skeleton posture feature corresponding to the input image, perform feature extraction on the text description to obtain text features corresponding to the text description; input the text fusion features, image fusion features, skeleton posture features, text features and a pre-generated noise image into a first diffusion model, obtain an initial generated image by processing with the first diffusion model, and train the feature processing network and the first diffusion model based on the initial generated image to learn the posture features of the input image; use the trained model parameters as prior knowledge, and adjust the model structure of the first diffusion model to obtain a second diffusion model; based on the text features corresponding to the text description and the plurality of pre-generated noise images, use the second diffusion model to process the state information of the target object to obtain a video frame sequence, and obtain a target video based on the video frame sequence. This application not only generates high-quality and highly coherent videos through multi-feature fusion, posture feature extraction, integration of text and image features, application of diffusion models, and model training and adjustment, but also controls the posture and behavior of the protagonist in the video by adjusting the input text description. In addition, the video generation method of this application is also highly flexible and scalable. For example, users can control the behavior and posture of the target object in the generated video by changing the input text description, thereby meeting the diverse needs of digital human creation and expanding the application potential of video synthesis technology in creativity and content creation. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0014] Figure 1 It is a flowchart of a video generation method provided in an embodiment of the present application;

[0015] Figure 2 It is a flowchart of another video generation method provided in an embodiment of the present application;

[0016] Figure 3 is a structural schematic diagram of a first diffusion model provided in an embodiment of the present application;

[0017] Figure 4 is a structural schematic diagram of a second diffusion model provided in an embodiment of the present application;

[0018] Figure 5 is a structural schematic diagram of a video generating device provided in an embodiment of the present application;

[0019] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0021] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc. mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0023] A video generation method, device, electronic device, and readable storage medium according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0024] Figure 1 FIG. 1 is a flow chart of a video generation method provided in an embodiment of the present application. Figure 1 As shown, the method includes:

[0025] S101, obtaining an input image and a text description, wherein the input image includes a target object, and the text description is used to represent state information of the target object;

[0026] S102, inputting the input image into different feature processing networks for feature processing to obtain multiple feature representations corresponding to the input image, and performing feature fusion on the multiple feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image;

[0027] S103, performing posture feature extraction on the input image to obtain skeleton posture features corresponding to the input image, and performing feature extraction on the text description to obtain text features corresponding to the text description;

[0028] S104, inputting the text fusion feature, the image fusion feature, the skeleton posture feature, the text feature and the pre-generated noise image into the first diffusion model, processing the first diffusion model to obtain an initial generated image, and training the feature processing network and the first diffusion model based on the initial generated image to learn the posture feature of the input image;

[0029] S105, taking the trained model parameters as prior knowledge, and adjusting the model structure of the first diffusion model to obtain a second diffusion model, based on the text features corresponding to the text description and the pre-generated multiple noise images, using the second diffusion model to process the state information of the target object to obtain a video frame sequence, and obtaining the target video based on the video frame sequence.

[0030] Specifically, in order to obtain high-quality, high-coherence and character-posture-controllable generated videos, the present application provides a video generation method, that is, the user can input an image containing a target object (input image) and a text describing the state of the object (text description), and then generate a video with the object as the protagonist and the state consistent with the description through the method of the present application.

[0031] It can be understood that the present application will first use an advanced feature processing network to perform deep feature extraction on the input image, and these features include but are not limited to the text description features and image description features corresponding to the input image. At the same time, for the input text description, the present application will also perform feature extraction to capture the key information in the text. Further, the features extracted from the input image will be fused to form a comprehensive feature representation. The fused feature representation contains both the visual information in the input image and the semantic information corresponding to the input image. Then a special diffusion model (i.e., the first diffusion model) is used to process these fused features and the skeleton posture features corresponding to the input image and the text features corresponding to the text description. The model will generate an initial generated image based on the input features, and this image will serve as the basis for the subsequent training process. By training this model, it can be made to learn and understand the posture features in the process of obtaining the initial generated image based on the text description and the input image. When the model training is completed, the present application will use its training parameters as prior knowledge and fine-tune the model structure to obtain a new diffusion model (i.e., the second diffusion model). This model will generate a series of video frames based on the input text features and a series of noise images. These frames will be combined into a coherent video, and the posture and behavior of the protagonist will match the input text description. Finally, this application will combine these video frames in a certain order and frame rate to form the final target video.

[0032] In this way, the video generation method provided by the present application can not only generate high-quality and high-coherence videos, but also control the posture and behavior of the protagonist in the video by adjusting the input text description. In addition, the video generation method is also highly flexible and scalable. For example, users can control the behavior and posture of the target object in the generated video by changing the input text description, thereby meeting the diverse needs of digital human creation and expanding the application potential of video synthesis technology in creativity and content creation.

[0033] In some embodiments, the text fusion feature, the image fusion feature, the skeleton posture feature, the text feature, and the pre-generated noise image are input into the first diffusion model, and the initial generated image is obtained by processing using the first diffusion model, including:

[0034] The skeleton posture features are downsampled to obtain skeleton posture features of different resolutions, and the skeleton posture features of different resolutions are input into the posture encoder of the first diffusion model through residual connection for posture encoding. The posture encoder includes a preset number of three-dimensional convolutional layers for controlling the posture of the target object in the input image; the noise image is input into the first convolutional layer for processing, and the text features, text fusion features and image fusion features are sequentially fused with the noise image after convolution processing and the skeleton posture features after posture encoding by using a cross attention mechanism; the fused image is processed by using the feedforward network in the first diffusion model to obtain an initial generated image.

[0035] Specifically, the first diffusion model is a pre-trained diffusion model with a UNet architecture. In order to effectively integrate different feature information into the diffusion model and generate an initial generated image with precise posture control, this application obtains feature representations of different resolutions through downsampling processing for skeleton posture features. This multi-resolution feature representation helps the model better understand and process posture information at different levels. Specifically, high-resolution features contain more detailed information and are suitable for capturing the fine movements and posture changes of the target, while low-resolution features focus more on the overall structure and shape, which helps the model grasp the overall posture trend of the target.

[0036] Furthermore, the skeleton posture features of different resolutions will be input into the posture encoder of the first diffusion model through residual connection. The residual connection can effectively retain and process the original feature information, avoiding the problem of gradient disappearance or explosion in the deep network. At the same time, the preset number of three-dimensional convolutional layers in the posture encoder is responsible for further encoding and processing these features, and extracting information useful for the posture control of the target object. The specific number of three-dimensional convolutional layers can be set according to the actual task requirements and is not specifically limited here.

[0037] In addition, the pre-generated noise image will be input to the first convolutional layer for processing. The noise image is used to introduce randomness, making the generated image more diverse and natural. Furthermore, the cross-attention mechanism is used to fuse the text features, text fusion features, and image fusion features with the noise image after convolution processing and the skeleton posture features after posture encoding in turn. In order to effectively integrate information from different sources using the attention mechanism, the model can more comprehensively understand and process the input features.

[0038] Furthermore, the fused image is input into the feedforward network in the first diffusion model for processing. The feedforward network transforms the fused features into the final image representation through a series of nonlinear transformations and convolution operations. This initial generated image already contains basic information such as the posture, shape, and color of the target object, providing a basis for subsequent processing and optimization.

[0039] In this way, the present application achieves precise control of the target object's posture by effectively fusing multiple feature information and generating it using a diffusion model, and generates initial generated images with high quality and diversity, which provides strong support for subsequent model training.

[0040] In addition, in some embodiments, the trained model parameters are used as prior knowledge, and the model structure of the first diffusion model is adjusted to obtain the second diffusion model, including:

[0041] The first convolutional layer is adjusted to a three-dimensional convolutional network, where the three-dimensional convolutional network includes at least one convolutional layer with a convolution kernel size of 1*3*3, and a temporal attention network is added before the fused image is processed by the feedforward network in the first diffusion model to process the correlation between video frames, and a second diffusion model is obtained based on the adjusted three-dimensional convolutional network and the temporal attention network.

[0042] Specifically, in order to further improve the quality and coherence of the generated images, especially when processing video sequences, the present application further adjusts and optimizes the first diffusion model to obtain a second diffusion model. This model aims to better handle the correlation between video frames, capture the dynamic changes of the target object, and generate a more natural and coherent image sequence.

[0043] First, based on the first diffusion model, the first convolution layer is adjusted to a three-dimensional convolutional network. The purpose of this adjustment is to better process information in three-dimensional space, including the depth, width and height of the target. In particular, at least one convolution layer with a convolution kernel size of 1*3*3 is used. This convolution kernel design can simultaneously consider the spatial information and temporal information of the image, making it more effective in processing video sequences.

[0044] Secondly, in order to better capture the correlation between video frames, a temporal attention network is added before the feedforward network. By calculating the weights between different video frames, the temporal attention network can highlight important frames and suppress irrelevant frames, thereby improving the coherence and stability of the generated image. Specifically, the temporal attention network assigns weights to each video frame, so that the model can pay more attention to the information of key frames when generating images, while reducing the impact of redundancy and noise. Through the above adjustments and optimizations, the second diffusion model obtained not only has stronger feature extraction and fusion capabilities, but also can better handle dynamic changes in video sequences and generate more natural and coherent video frame sequences.

[0045] In addition, in some embodiments, based on the text features corresponding to the text description and the pre-generated multiple noise images, the state information of the target object is processed using a second diffusion model to obtain a video frame sequence;

[0046] Multiple noisy images are input into a three-dimensional convolutional network for processing, and the cross-attention mechanism is used to sequentially fuse text features, text fusion features and image fusion features with the multiple noisy images after three-dimensional convolution processing and the skeleton posture features after posture encoding; the fused images are processed using a temporal attention network to obtain temporal attention features, and the temporal attention features are processed using a feedforward network in the second diffusion model to obtain a video frame sequence.

[0047] Specifically, in order to generate a complete video frame sequence from the text description, the present application further uses the adjusted second diffusion model for processing. This process is based on the text features corresponding to the text description and multiple pre-generated noise images, and finally obtains a video frame sequence that conforms to the text description through a series of calculations and transformations.

[0048] First, multiple pre-generated noise images are input into a 3D convolutional network for processing. These noise images are designed to introduce randomness, making the generated video frame sequence more diverse and natural. The 3D convolutional network extracts the spatial and temporal features of the image by performing convolution operations on the noise images, providing support for the subsequent feature fusion and generation process. Then, using the cross-attention mechanism, the text features, text fusion features, and image fusion features are sequentially fused with multiple noise images processed by 3D convolution and the skeleton posture features after posture encoding. The information from different sources is effectively integrated, so that the generated video frame sequence is more in line with the requirements of the text description and presents accurate postures and movements.

[0049] Furthermore, the fused image is input into the temporal attention network for processing. The temporal attention network calculates the weights between different video frames, highlights important frames, and suppresses irrelevant frames, thereby improving the coherence and stability of the generated video frame sequence. This step helps capture the correlation between video frames, making the generated video more natural and smooth.

[0050] Finally, the temporal attention features are processed by the feedforward network in the second diffusion model to obtain the final video frame sequence. The feedforward network transforms the fused features into the final image representation through a series of nonlinear transformations and convolution operations. In this way, based on the text description and the pre-generated noise image, a video frame sequence that conforms to the text description is obtained through the processing of the second diffusion model, which is high quality, diverse and coherent.

[0051] According to the technical solution provided in the embodiment of the present application, by effectively fusing multiple feature information and using the adjusted diffusion model for generation, accurate conversion from text description to video frame sequence is achieved. This can not only improve the quality and diversity of generated images, but also enhance the coherence and stability of generated videos.

[0052] In some embodiments, the input image is input into different feature processing networks for feature processing to obtain multiple feature representations corresponding to the input image, and the multiple feature representations are feature fused according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image, including:

[0053] The input image is input into the BLIP2 model for feature processing to obtain the first text description feature, the input image is input into the contrastive language-image pre-training model for feature processing to obtain the second text description feature and the first image feature, the input image is input into the variational autoencoder for feature processing to obtain the second image feature; the first text description feature is fused with the second text description feature to obtain the text fusion feature, and the first image feature is fused with the second image feature to obtain the image fusion feature.

[0054] Specifically, in order to more comprehensively extract and fuse the features of the input image, this application uses multiple feature processing networks to process the input image and obtains multiple feature representations. These feature representations include text description features and image features, aiming to provide a rich information basis for subsequent feature fusion and image generation.

[0055] First, the input image is input into the BLIP2 model for feature processing. The BLIP2 model is a powerful vision and language model that can effectively extract visual features in the image and semantic features related to the text description. Through the processing of the BLIP2 model, the first text description feature is obtained, which contains the association information between the input image and the text description, providing important guidance for subsequent feature fusion and image generation.

[0056] Secondly, the input image is input into the Contrastive Language-Image Pre-Training (CLIP) model for feature processing. This model jointly trains the image and text encoders through contrastive learning so that they can be represented in the same semantic space. Through the processing of the Contrastive Language-Image Pre-Training model, the second text description feature and the first image feature are obtained. The second text description feature further enriches the text description information of the input image, while the first image feature captures the underlying visual features of the input image, providing strong support for subsequent feature fusion and image generation.

[0057] In addition, the input image is fed into a variational auto-encoder (VAE) for feature processing. A variational auto-encoder is a generative model that can generate new data similar to the original data by learning the potential representation of the input data. Through the processing of the variational auto-encoder, a second image feature is obtained, which captures the potential structure and generative ability of the input image, providing more possibilities for subsequent image generation.

[0058] It can be understood that after obtaining multiple feature representations, feature fusion is performed according to a preset fusion method. Specifically, the first text description feature is fused with the second text description feature to obtain a text fusion feature. This step combines the text features extracted by two different models to make the generated image more in line with the requirements of the text description and improve the accuracy and diversity of the generated image. At the same time, the first image feature is fused with the second image feature to obtain an image fusion feature. This step integrates the image features extracted by two different models to make the generated image have richer visual information and better generation quality.

[0059] According to the technical solution of the embodiment of the present application, through the above feature processing and fusion steps, the text fusion features and image fusion features corresponding to the input image are obtained. These features not only contain the underlying visual information of the input image, but also integrate the semantic information related to the text description, providing a comprehensive and accurate information basis for subsequent image generation. In this way, the present application further improves the quality and diversity of the generated image by using a variety of feature processing networks for feature extraction and fusion, so that the generated image is more in line with the requirements of the text description and presents a higher degree of naturalness and coherence.

[0060] In addition, in some embodiments, the first text description feature is fused with the second text description feature to obtain a text fusion feature, and the first image feature is fused with the second image feature to obtain an image fusion feature, including:

[0061] The second text description feature is input into the second convolution layer for processing to obtain a third text feature, and the third text feature is fused with the first text description feature to obtain a text fusion feature; the second image feature is input into the third convolution layer for processing to obtain a third image feature, and the third image feature is fused with the first image feature to obtain an image fusion feature.

[0062] Specifically, in the process of feature fusion, in order to further improve the quality and expression ability of the fused features, this application uses a convolutional layer to further process specific features to extract deeper information and make the fused features more representative and discriminative.

[0063] First, the second text description feature is input into the second convolutional layer for processing. The design of the second convolutional layer takes into account the semantic characteristics and structural information of the text description, and more advanced text features can be extracted through the convolution operation. After being processed by the second convolutional layer, the third text feature is obtained. Then, the third text feature is fused with the first text description feature. By combining the text features obtained by two different feature extraction methods, a more comprehensive and accurate text fusion feature is obtained. By fusing the two text features, the text fusion feature not only contains the semantic information of the original text description, but also incorporates the deeper information processed by the second convolutional layer, providing richer text guidance for subsequent image generation.

[0064] Secondly, the second image feature is input into the third convolutional layer for processing. The design of the third convolutional layer fully considers the visual characteristics and spatial structure of the image. Through the convolution operation, more detailed and distinctive features in the image can be extracted. After being processed by the third convolutional layer, the third image feature is obtained. Then, the third image feature is fused with the first image feature. By combining the image features obtained by two different feature extraction methods, a more comprehensive and accurate image fusion feature is obtained. By fusing the two image features, the image fusion feature contains both the underlying visual information of the original image and the deeper information after processing by the convolutional layer, providing a richer visual basis for subsequent image generation.

[0065] In this way, the present application not only improves the quality and expressiveness of the fused features, but also makes the generated images more consistent with the requirements of the text description in terms of both visual and semantics, and improves the accuracy and diversity of the generated images. At the same time, by combining multiple feature processing networks and convolutional layer processing, the quality and naturalness of image generation are further improved, making the generated images more realistic and coherent.

[0066] In addition, in some embodiments, performing posture feature extraction on the input image to obtain skeleton posture features corresponding to the input image, and performing feature extraction on the text description to obtain text features corresponding to the text description include:

[0067] The posture estimation model is used to extract the posture features of the input image to obtain the skeleton posture features corresponding to the input image; the contrastive language-image pre-training model is used to extract the features of the text description to obtain the text features corresponding to the text description.

[0068] Specifically, the embodiment of the present application uses a posture estimation model to extract posture features from the input image. The posture estimation model can identify the joint position of the character in the image, thereby constructing the skeleton posture features of the character. This feature extraction method can capture key information such as the character's movements and postures, and provide important posture guidance for subsequent image generation. Through the processing of the posture estimation model, the skeleton posture features corresponding to the input image can be obtained, providing rich posture information for subsequent image generation.

[0069] At the same time, the embodiment of the present application uses a contrastive language-image pre-training model to extract features from the text description. The contrastive language-image pre-training model can be trained on a large amount of text and image data to learn the association and correspondence between text and image. By extracting features from the text description, text features corresponding to the text description are obtained. These features contain key information in the text description, providing important semantic guidance for subsequent image frame generation, so that the generated image frames are more in line with the requirements of the text description.

[0070] In this way, this application realizes comprehensive feature extraction of input images and text descriptions by combining the posture estimation model and the contrastive language-image pre-training model. It not only improves the quality and expression ability of the fused features, but also provides richer posture and semantic guidance for subsequent image generation.

[0071] Figure 2 is a flow chart of another video generation method provided in an embodiment of the present application, such as Figure 2 As shown, the method includes:

[0072] First, the input image is input into the BLIP2 model for feature processing to obtain the first text description feature, the input image is input into the contrastive language-image pre-training model for feature processing to obtain the second text description feature and the first image feature, the input image is input into the variational autoencoder for feature processing to obtain the second image feature; the second text description feature is input into the second convolutional layer for processing to obtain the third text feature, the third text feature is fused with the first text description feature to obtain the text fusion feature; the second image feature is input into the third convolutional layer for processing to obtain the third image feature, the third image feature is fused with the first image feature to obtain the image fusion feature.

[0073] Then, the posture estimation model is used to extract the posture features of the input image to obtain the skeleton posture features corresponding to the input image; the contrastive language-image pre-training model is used to extract the features of the text description to obtain the text features corresponding to the text description.

[0074] Finally, the text fusion features, image fusion features, skeleton posture features, text features and the pre-generated noise image are input into the first diffusion model, and the initial generated image is obtained by processing with the first diffusion model. The feature processing network and the first diffusion model are trained based on the initial generated image to learn the posture features of the input image.

[0075] Figure 3 is a schematic diagram of the structure of a first diffusion model provided in an embodiment of the present application, such as Figure 3 As shown:

[0076] First, the skeleton posture features are downsampled to obtain skeleton posture features of different resolutions, and the skeleton posture features of different resolutions are input into the posture encoder of the first diffusion model through residual connection for posture encoding. The posture encoder includes a preset number of three-dimensional convolutional layers for controlling the posture of the target object in the input image;

[0077] Secondly, the noise image is input into the first convolutional layer for processing, and the text features, text fusion features and image fusion features are sequentially fused with the noise image after convolution processing and the skeleton posture features after posture encoding using the cross attention mechanism;

[0078] Finally, the fused image is processed by the feedforward network in the first diffusion model to obtain an initial generated image to train the feature processing network and the first diffusion model to learn the posture features of the input image.

[0079] Figure 4 is a schematic diagram of the structure of a second diffusion model provided in an embodiment of the present application, such as Figure 4 As shown:

[0080] On the basis of the first diffusion model, the first convolution layer of the first diffusion model is adjusted to a three-dimensional convolution network including at least one convolution layer with a convolution kernel size of 1*3*3, so as to better process the information in the three-dimensional space. At the same time, in order to better capture the correlation between video frames, a temporal attention network is added before the feedforward network, so that the model can pay more attention to the information of the key frame when generating images, while reducing the influence of redundancy and noise, and generating a more natural and coherent video frame sequence. Then, the model parameters trained in the first diffusion model stage are used as prior knowledge, so that the second diffusion model can learn and understand the posture features in the process of obtaining the initial image generation according to the text description and the input image. Then, based on the adjusted second diffusion model, multiple noise images are input into the three-dimensional convolution network for processing, and the text features, text fusion features and image fusion features are sequentially fused with the multiple noise images processed by the three-dimensional convolution and the skeleton posture features after posture encoding by using the cross attention mechanism; the fused image is processed by using the temporal attention network to obtain the temporal attention features, and the temporal attention features are processed by using the feedforward network in the second diffusion model to obtain the video frame sequence.

[0081] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.

[0082] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the process of the embodiments of the present application.

[0083] Figure 5 Schematic diagram of a video generation device provided in an embodiment of the present application. Figure 5 As shown, the device comprises:

[0084] An acquisition module 501 is configured to acquire an input image and a text description, wherein the input image includes a target object, and the text description is used to represent state information of the target object;

[0085] The feature processing model 502 is configured to input the input image into different feature processing networks for feature processing, obtain multiple feature representations corresponding to the input image, and perform feature fusion on the multiple feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image;

[0086] The feature extraction model 503 is configured to perform posture feature extraction on the input image to obtain the skeleton posture feature corresponding to the input image, and perform feature extraction on the text description to obtain the text feature corresponding to the text description;

[0087] The training module 504 is configured to input the text fusion feature, the image fusion feature, the skeleton posture feature, the text feature and the pre-generated noise image into the first diffusion model, process the first diffusion model to obtain an initial generated image, and train the feature processing network and the first diffusion model based on the initial generated image to learn the posture feature of the input image;

[0088] The video generation module 505 is configured to use the trained model parameters as prior knowledge, and adjust the model structure of the first diffusion model to obtain a second diffusion model, based on the text features corresponding to the text description and the pre-generated multiple noise images, use the second diffusion model to process the state information of the target object to obtain a video frame sequence, and obtain the target video based on the video frame sequence.

[0089] In some embodiments, the training module 504 is also used to downsample the skeleton posture features to obtain skeleton posture features of different resolutions, and input the skeleton posture features of different resolutions into the posture encoder of the first diffusion model through residual connection for posture encoding, the posture encoder includes a preset number of three-dimensional convolutional layers for controlling the posture of the target object in the input image; the noise image is input into the first convolutional layer for processing, and the text features, text fusion features and image fusion features are sequentially fused with the noise image after convolution processing and the skeleton posture features after posture encoding using a cross-attention mechanism; the fused image is processed using the feedforward network in the first diffusion model to obtain an initial generated image.

[0090] In some embodiments, the video generation module 505 is also used to adjust the first convolutional layer to a three-dimensional convolutional network, the three-dimensional convolutional network includes at least one convolutional layer with a convolution kernel size of 1*3*3, and add a temporal attention network before using the feedforward network in the first diffusion model to process the fused image to process the correlation between video frames, and obtain the second diffusion model based on the adjusted three-dimensional convolutional network and the temporal attention network.

[0091] In some embodiments, the video generation module 505 is also used to input multiple noise images into a three-dimensional convolutional network for processing, and use a cross-attention mechanism to fuse text features, text fusion features, and image fusion features with multiple noise images after three-dimensional convolution processing and skeleton posture features after posture encoding in sequence; use the temporal attention network to process the fused image to obtain the temporal attention features, and use the feedforward network in the second diffusion model to process the temporal attention features to obtain a video frame sequence.

[0092] In some embodiments, the feature processing model 502 is also used to input the input image into the BLIP2 model for feature processing to obtain a first text description feature, input the input image into the contrastive language-image pre-training model for feature processing to obtain a second text description feature and a first image feature, input the input image into the variational autoencoder for feature processing to obtain a second image feature; fuse the first text description feature with the second text description feature to obtain a text fusion feature, and fuse the first image feature with the second image feature to obtain an image fusion feature.

[0093] In some embodiments, the feature processing model 502 is also used to input the second text description feature into the second convolution layer for processing to obtain a third text feature, and fuse the third text feature with the first text description feature to obtain a text fusion feature; input the second image feature into the third convolution layer for processing to obtain a third image feature, and fuse the third image feature with the first image feature to obtain an image fusion feature.

[0094] In some embodiments, the feature processing model 503 is also used to extract posture features of the input image using a posture estimation model to obtain skeleton posture features corresponding to the input image; and to extract features of the text description using a contrastive language-image pre-training model to obtain text features corresponding to the text description.

[0095] The device provided in the embodiment of the present application can implement all the method steps of the above method embodiment and can achieve the same technical effect, which will not be repeated here.

[0096] Figure 6 Schematic diagram of an electronic device 6 provided in an embodiment of the present application. Figure 6As shown, the electronic device 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0097] The electronic device 6 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6 The electronic device 6 is merely an example and does not limit the electronic device 6 . The electronic device 6 may include more or less components than those shown in the figure, or different components.

[0098] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0099] The memory 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. The memory 602 may also include both an internal storage unit and an external storage device of the electronic device 6. The memory 602 is used to store computer programs and other programs and data required by the electronic device.

[0100] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0101] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The readable storage medium may include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0102] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A video generation method, characterized in that: include: Acquire an input image and a text description, wherein the input image contains a target object, and the text description is used to represent state information of the target object; Inputting the input image into different feature processing networks for feature processing to obtain multiple feature representations corresponding to the input image, and performing feature fusion on the multiple feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image; Performing posture feature extraction on the input image to obtain skeleton posture features corresponding to the input image, and performing feature extraction on the text description to obtain text features corresponding to the text description; Inputting the text fusion feature, the image fusion feature, the skeleton posture feature, the text feature and the pre-generated noise image into a first diffusion model, processing with the first diffusion model to obtain an initial generated image, and training the feature processing network and the first diffusion model based on the initial generated image to learn the posture feature of the input image; The trained model parameters are used as prior knowledge, and the model structure of the first diffusion model is adjusted to obtain a second diffusion model. Based on the text features corresponding to the text description and a plurality of pre-generated noise images, the state information of the target object is processed using the second diffusion model to obtain a video frame sequence, and a target video is obtained based on the video frame sequence.

2. The method according to claim 1, characterized in that The step of inputting the text fusion feature, the image fusion feature, the skeleton posture feature, the text feature and the pre-generated noise image into a first diffusion model, and obtaining an initial generated image by processing with the first diffusion model includes: Downsampling the skeleton posture features to obtain skeleton posture features of different resolutions, and inputting the skeleton posture features of different resolutions into a posture encoder of a first diffusion model through a residual connection for posture encoding, wherein the posture encoder includes a preset number of three-dimensional convolutional layers for controlling the posture of the target object in the input image; Input the noise image into the first convolution layer for processing, and use a cross attention mechanism to sequentially fuse the text features, the text fusion features, and the image fusion features with the noise image after convolution processing and the skeleton posture features after posture encoding; The fused image is processed using the feedforward network in the first diffusion model to obtain an initial generated image.

3. The method according to claim 2, characterized in that The method of using the trained model parameters as prior knowledge and adjusting the model structure of the first diffusion model to obtain the second diffusion model includes: The first convolutional layer is adjusted to a three-dimensional convolutional network, wherein the three-dimensional convolutional network includes at least one convolutional layer with a convolution kernel size of 1*3*3, and a temporal attention network is added before the fused image is processed by the feedforward network in the first diffusion model to process the correlation between video frames, and the second diffusion model is obtained based on the adjusted three-dimensional convolutional network and the temporal attention network.

4. The method according to claim 3, characterized in that The step of processing the state information of the target object by using the second diffusion model based on the text features corresponding to the text description and the pre-generated multiple noise images to obtain a video frame sequence includes: Input the multiple noise images into a three-dimensional convolutional network for processing, and use a cross attention mechanism to sequentially fuse the text features, the text fusion features, and the image fusion features with the multiple noise images processed by the three-dimensional convolution and the skeleton posture features after posture encoding; The fused image is processed using the temporal attention network to obtain temporal attention features, and the temporal attention features are processed using the feedforward network in the second diffusion model to obtain the video frame sequence.

5. The method according to claim 1, characterized in that The step of inputting the input image into different feature processing networks for feature processing to obtain a plurality of feature representations corresponding to the input image, and performing feature fusion on the plurality of feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image includes: Inputting the input image into the BLIP2 model for feature processing to obtain a first text description feature, inputting the input image into the contrastive language-image pre-training model for feature processing to obtain a second text description feature and a first image feature, and inputting the input image into a variational autoencoder for feature processing to obtain a second image feature; The first text description feature is fused with the second text description feature to obtain the text fusion feature, and the first image feature is fused with the second image feature to obtain the image fusion feature.

6. The method according to claim 5, characterized in that The step of fusing the first text description feature with the second text description feature to obtain the text fusion feature, and fusing the first image feature with the second image feature to obtain the image fusion feature, includes: Inputting the second text description feature into the second convolutional layer for processing to obtain a third text feature, and fusing the third text feature with the first text description feature to obtain the text fusion feature; The second image feature is input into a third convolutional layer for processing to obtain a third image feature, and the third image feature is fused with the first image feature to obtain the image fusion feature.

7. The method according to claim 1, characterized in that The step of extracting posture features from the input image to obtain skeleton posture features corresponding to the input image, and extracting features from the text description to obtain text features corresponding to the text description includes: Extracting posture features of the input image using a posture estimation model to obtain skeleton posture features corresponding to the input image; The text description is subjected to feature extraction using a contrastive language-image pre-training model to obtain text features corresponding to the text description.

8. A video generating device, characterized in that: include: An acquisition module is configured to acquire an input image and a text description, wherein the input image contains a target object, and the text description is used to represent state information of the target object; The feature processing model is configured to input the input image into different feature processing networks for feature processing, obtain multiple feature representations corresponding to the input image, and perform feature fusion on the multiple feature representations according to a preset fusion method to obtain text fusion features and image fusion features corresponding to the input image; A feature extraction model is configured to perform posture feature extraction on the input image to obtain a skeleton posture feature corresponding to the input image, and perform feature extraction on the text description to obtain a text feature corresponding to the text description; A training module is configured to input the text fusion feature, the image fusion feature, the skeleton posture feature, the text feature and the pre-generated noise image into a first diffusion model, obtain an initial generated image by processing with the first diffusion model, and train the feature processing network and the first diffusion model based on the initial generated image to learn the posture feature of the input image; The video generation module is configured to use the trained model parameters as prior knowledge, and adjust the model structure of the first diffusion model to obtain a second diffusion model, based on the text features corresponding to the text description and the pre-generated multiple noise images, use the second diffusion model to process the state information of the target object to obtain a video frame sequence, and obtain a target video based on the video frame sequence.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Video space expansion method and device, equipment and storage medium

    CN119206422A

  • A Video Spatial Expansion Method, Device, Equipment and Storage Medium

    CN119206422B

  • Video generation method and device, computer equipment and storage medium

    CN119211665A

  • Image generation method and device, electronic equipment and readable storage medium

    CN119338951A

  • Image generation method and device and display equipment

    CN119520934A