Video generation method and device, computer equipment, readable storage medium and program product
By performing frame-level decomposition, latent space feature extraction and noise processing on the video frame data, and using the target feature correlation model for correlation and denoising processing, the problem of temporal consistency in video generation is solved, and the accuracy of video frame alignment is improved and improved. Stability and consistency of object representation.
Patent Information
- Application Number
- CN202410862091.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-06
AI Technical Summary
Existing video generation technologies have significant challenges in achieving temporal consistency, resulting in breaks in the visual representation of objects in the video between different frames.
By performing frame-level decomposition, latent space feature extraction, noise processing, target feature association model association and denoising processing on video frame data, stylized decoding is achieved, improving the accuracy of video frame alignment and maintaining stable and consistent alignment in long video sequences. Object representation.
Improves the accuracy of video frame alignment in stylized videos, ensuring the stability and consistency of object representation in long video sequences.
Smart Images

Figure CN118612478A
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a video generation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid advancement of AI-generated content technology, video generation applications have attracted more and more attention from users. However, existing video generation technologies still face significant challenges in achieving temporal consistency. First, the generation continuity problem of objects in videos is particularly prominent, that is, in consecutive frames, targets that should have remained consistent may be mistakenly generated as other targets, resulting in a break in the visual representation of objects between different frames. Summary of the invention
[0003] Based on this, it is necessary to provide a video generation method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of video frame alignment while achieving more stable and consistent object representation in long video sequences in response to the above-mentioned technical problems.
[0004] In a first aspect, the present application provides a video generation method, comprising:
[0005] Decomposing the acquired video image at the frame level to obtain video frame data;
[0006] Performing latent space feature extraction on the video frame data to obtain latent space features;
[0007] Performing noise processing on the latent spatial features to obtain a noisy spatial frame;
[0008] Performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performing denoising on the associated spatial frame to obtain a denoised spatial frame;
[0009] The denoised spatial frame is stylized and decoded to obtain a stylized video.
[0010] In one embodiment, the target feature association model includes a target temporal network and a target image generation network; and the step of performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame includes:
[0011] Performing video global temporal association on the noisy spatial frame according to the target temporal network to obtain a temporally associated spatial frame;
[0012] The target image generation network performs video global spatiotemporal association on the temporally associated spatial frames to obtain the associated spatial frames.
[0013] In one of the embodiments, before associating the video features of the noisy spatial frame according to the target feature association model, the method further includes:
[0014] Acquire video-text pair data, and preprocess the video-text pair data to obtain training video-text pair data;
[0015] Performing frame-level decomposition on the training video data in the training video text pair data to obtain training video frame data;
[0016] Performing latent space feature extraction on the training video frame data to obtain training latent space features;
[0017] Performing noise processing on the training latent space features to obtain a training noisy space frame;
[0018] The original feature association model is trained for video feature association according to the training noisy spatial frame to obtain the target feature association model.
[0019] In one embodiment, the video-text pair data includes: video data and text data; the preprocessing of the video-text pair data to obtain training video-text pair data includes:
[0020] Performing video preprocessing on the video data to obtain the training video data;
[0021] Performing data cleaning on the text data to obtain training text data;
[0022] The training video-text pair data is constructed according to the training video data and the training text data.
[0023] In one embodiment, the original feature association model includes: an original temporal network and an original image generation network; the video feature association training is performed on the original feature association model according to the training noisy spatial frame to obtain the target feature association model, including:
[0024] Performing supervised learning training on the original time series network according to the training noisy spatial frame to obtain a candidate time series network;
[0025] Monitoring the candidate temporal network according to the validation set data corresponding to the training noisy spatial frame to obtain performance feedback data;
[0026] Adjusting the hyperparameters of the candidate timing network according to the performance feedback data to obtain a target timing network;
[0027] Performing three-dimensional convolution training on the original image generation network according to the training noisy spatial frame to obtain a target image generation network;
[0028] The target temporal network is embedded in the target image generation network to obtain the target feature association model.
[0029] In one embodiment, extracting latent space features from the video frame data to obtain latent space features includes:
[0030] Extracting features from the video frame data to obtain video frame features;
[0031] Perform dimensionality reduction mapping on the video frame features to obtain the latent space features.
[0032] In a second aspect, the present application further provides a video generation device, including:
[0033] A decomposition module is used to perform frame-level decomposition on the acquired video image to obtain video frame data;
[0034] A feature extraction module, used to extract latent space features from the video frame data to obtain latent space features;
[0035] A noise adding module, used for performing noise adding processing on the latent space features to obtain a noisy space frame;
[0036] A frame processing module, configured to perform video feature association on the noisy spatial frame according to a target feature association model to obtain an associated spatial frame, and perform denoising on the associated spatial frame to obtain a denoised spatial frame;
[0037] The decoding module is used to perform stylized decoding on the denoised spatial frame to obtain a stylized video.
[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0039] Decomposing the acquired video image at the frame level to obtain video frame data;
[0040] Performing latent space feature extraction on the video frame data to obtain latent space features;
[0041] Performing noise processing on the latent spatial features to obtain a noisy spatial frame;
[0042] Performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performing denoising on the associated spatial frame to obtain a denoised spatial frame;
[0043] The denoised spatial frame is stylized and decoded to obtain a stylized video.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0045] Decomposing the acquired video image at the frame level to obtain video frame data;
[0046] Performing latent space feature extraction on the video frame data to obtain latent space features;
[0047] Performing noise processing on the latent spatial features to obtain a noisy spatial frame;
[0048] Performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performing denoising on the associated spatial frame to obtain a denoised spatial frame;
[0049] The denoised spatial frame is stylized and decoded to obtain a stylized video.
[0050] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0051] Decomposing the acquired video image at the frame level to obtain video frame data;
[0052] Performing latent space feature extraction on the video frame data to obtain latent space features;
[0053] Performing noise processing on the latent spatial features to obtain a noisy spatial frame;
[0054] Performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performing denoising on the associated spatial frame to obtain a denoised spatial frame;
[0055] The denoised spatial frame is stylized and decoded to obtain a stylized video.
[0056] The above-mentioned video generation method, device, computer equipment, computer-readable storage medium and computer program product perform frame-level decomposition on the acquired video image to obtain video frame data; perform latent space feature extraction on the video frame data to obtain latent space features; perform noise processing on the latent space features to obtain noisy space frames; perform video feature association on the noisy space frames according to the target feature association model to obtain associated space frames, and perform denoising on the associated space frames to obtain denoised space frames; perform stylized decoding on the denoised space frames to obtain stylized videos. Therefore, by performing noise processing on the latent space features, it is easier to predict the noise of the latent space features, and the target feature association model is used to perform feature association on the noisy space frames to achieve the establishment of associated features between the noisy space frames, and then the associated space frames are denoised and stylized decoded to obtain stylized videos, thereby improving the accuracy of video frame alignment in the stylized video, and at the same time, in the stylized videos of the long video sequence type, more stable and consistent object representation can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0058] FIG1 is a diagram of an application environment of a video generation method according to an embodiment;
[0059] FIG2 is a schematic diagram of a flow chart of a video generation method in one embodiment;
[0060] FIG3 is a schematic diagram of a training process of a feature association model in one embodiment;
[0061] FIG4 is a structural block diagram of a video generating device in one embodiment;
[0062] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0064] The video generation method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1. The terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 performs frame-level decomposition on the acquired video image to obtain video frame data; extracts latent spatial features from the video frame data to obtain latent spatial features; performs noise processing on the latent spatial features to obtain a noisy spatial frame; performs video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performs denoising on the associated spatial frame to obtain a denoised spatial frame; performs stylized decoding on the denoised spatial frame to obtain a stylized video. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0065] In an exemplary embodiment, as shown in FIG2 , a video generation method is provided, which is described by taking the method applied to step 104 in FIG1 as an example, and includes the following steps 202 to 210. Among them:
[0066] Step 202: Decompose the acquired video image at frame level to obtain video frame data.
[0067] Among them, each frame in the video frame data is a static snapshot of the video image, which contains the visual information at the corresponding moment.
[0068] In some embodiments, the video image input by the user may be acquired in real time, or by acquiring video data in a preset video data set, but the present invention is not limited thereto.
[0069] In some embodiments, the acquired video image is decomposed at the frame level to decompose the video image into a series of independent frame images, and then all the decomposed frame images are constructed into video frame data.
[0070] The video image can be .
[0071] Step 204: extract latent space features from the video frame data to obtain latent space features.
[0072] In some embodiments, the video frame data is input into the encoder part of the variational autoencoder, latent space features are extracted from the video frame data through the variational autoencoder, and latent space features are output.
[0073] Among them, the variational autoencoder can be used as Variational Autoencoder, VAE, and the latent space feature can be .
[0074] In some embodiments, latent space features are extracted from video frame data to obtain latent space features, including: extracting features from video frame data to obtain video frame features; and performing dimensionality reduction mapping on the video frame features to obtain latent space features.
[0075] In some embodiments, by using a variational autoencoder to extract latent space features from video frame data, video frame features can be extracted as feature representations of each frame, and then the video frame features are reduced in dimension through nonlinear transformation, that is, high-dimensional pixel data in the video frame data is mapped to a low-dimensional latent space representation to obtain latent space features. Therefore, the latent space feature extraction process not only reduces the dimension of the video frame data, but also captures key information in the video frame data.
[0076] Step 206, performing noise processing on the latent spatial features to obtain a noisy spatial frame.
[0077] In some embodiments, after latent space feature extraction, the latent space feature obtained is a set of low-dimensional vectors encoding video frame data. The following noise addition model is used to perform noise addition processing on the latent space feature to obtain a noisy space frame.
[0078] The formula (1) of the noise model is as follows:
[0079] (1)
[0080] in, is the noisy spatial frame, is random noise, is the noise weight, is the latent space feature frame to which noise is to be added.
[0081] It should be noted that too low noise in the latent space features will lead to low subsequent noise prediction accuracy, which is not conducive to the subsequent feature association step. Therefore, the latent space features are processed by adding noise using a noise model to obtain a noisy space frame, which is conducive to the subsequent video feature association step of the noisy space frame.
[0082] Step 208, performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performing denoising on the associated spatial frame to obtain a denoised spatial frame.
[0083] Among them, the target feature association model is a pre-trained U-type network model, which includes an image generation network, which is used to associate the global spatiotemporal features in the noisy spatial frame, that is, to associate the global spatiotemporal features in the video image, and the U-type network model is also embedded with a timing network, which is used to associate the global temporal features in the noisy spatial frame.
[0084] In some embodiments, video feature association is performed on the noisy spatial frames according to a target feature association model to obtain associated spatial frames that can reflect the global features of the video, and the associated spatial frames are denoised multiple times to ensure that the noise of the denoised spatial frames meets a preset video generation standard.
[0085] In some embodiments, the target feature association model includes a target timing network and a target image generation network; video feature association is performed on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, including: performing video global timing association on the noisy spatial frame according to the target timing network to obtain a timing associated spatial frame; performing video global spatiotemporal association on the timing associated spatial frame according to the target image generation network to obtain an associated spatial frame.
[0086] The target time series network can be obtained by training a time series module based on Transformer, and the target image generation network can be obtained by training an improved U-type network, wherein the improved U-type network includes two parts: a convolutional layer and a conversion module, wherein the conversion module adopts a three-dimensional attention mechanism obtained by expanding a traditional two-dimensional attention mechanism. The conversion module can adopt a Transformer module.
[0087] In some embodiments, the noisy spatial frames are identified, analyzed and dynamic elements of the noisy spatial frames are controlled according to the target temporal network to obtain temporally correlated spatial frames that can reflect the global temporal characteristics of the video.
[0088] In some embodiments, the temporally associated spatial frames are subjected to global spatiotemporal association of the video according to the target image generation network to obtain associated spatial frames that can simultaneously reflect the global temporal characteristics and global spatiotemporal characteristics of the video, thereby ensuring that the stylized video subsequently generated according to the associated spatial frames can achieve more stable and consistent object representation.
[0089] Step 210: stylized decoding is performed on the denoised spatial frame to obtain a stylized video.
[0090] In some embodiments, the denoised spatial frame is decoded to obtain a decoded spatial frame of the original image resolution, and each frame in the decoded spatial frame is stylized by the decoder of the variational autoencoder to obtain a stylized video frame, and then a stylized video is constructed based on the stylized video frame. Therefore, the stylized decoding process not only restores the original resolution of the image, but also gives each frame a unique artistic style.
[0091] In the above video generation method, the acquired video image is decomposed at the frame level to obtain video frame data; the latent space feature is extracted from the video frame data to obtain the latent space feature; the latent space feature is denoised to obtain the noisy space frame; the noisy space frame is associated with the video feature according to the target feature association model to obtain the associated space frame, and the associated space frame is denoised to obtain the denoised space frame; the denoised space frame is stylized and decoded to obtain the stylized video. Therefore, by denoising the latent space feature, it is easier to predict the noise of the latent space feature, and the target feature association model is used to associate the noisy space frame with features to achieve the establishment of the associated features between the noisy space frames, and then the associated space frame is denoised and stylized to obtain the stylized video, thereby improving the accuracy of video frame alignment in the stylized video, and at the same time, in the stylized video of the long video sequence type, a more stable and consistent object representation can be achieved.
[0092] In an exemplary embodiment, as shown in FIG3 , before the video feature association is performed on the noisy spatial frame according to the target feature association model, it is necessary to construct the target feature association model through model training, and therefore, the above-mentioned video generation method further includes steps 302 to 310. Among them:
[0093] Step 302: Obtain video-text pair data, and pre-process the video-text pair data to obtain training video-text pair data.
[0094] The video-text pair data is composed of video data combined with corresponding text data, and there is no scene and shot transition between a series of coherent video clips in the video data of the video-text pair data, wherein the text description of the text data in the video-text pair data is closely related to the video content in the video data.
[0095] In some embodiments, the video-text pair data may be acquired through real-time collection, or acquired from other established data sets, but is not limited thereto.
[0096] In some embodiments, the video-text pair data includes: video data and text data; preprocessing the video-text pair data to obtain training video-text pair data, including: performing video preprocessing on the video data to obtain training video data; performing data cleaning on the text data to obtain training text data; and constructing training video-text pair data based on the training video data and the training text data.
[0097] Among them, video preprocessing includes format standardization, resolution unification, frame rate adjustment and denoising.
[0098] In some embodiments, the video data is format standardized, resolution unified, frame rate adjusted, and denoised to obtain more standardized training video data after preprocessing to improve the quality of the overall video text data.
[0099] In some embodiments, data cleaning is performed on the text data to ensure the accuracy of the text data and to ensure the consistency between the text description of the text data and the video content of the video data.
[0100] Step 304: perform frame-level decomposition on the training video data in the training video text pair data to obtain training video frame data.
[0101] In some embodiments, the training video data in the training video text pair data is decomposed at the frame level to decompose the training video data into a series of independent frame images, and then all the decomposed frame images are constructed as training video frame data.
[0102] Step 306: extract latent space features from the training video frame data to obtain training latent space features.
[0103] In some embodiments, the training video frame data is input into the encoder part of the variational autoencoder, latent space features are extracted from the video frame data through the variational autoencoder, and training latent space features are output.
[0104] Step 308: Noise the training latent space features to obtain a training noisy space frame.
[0105] In some embodiments, after latent space feature extraction, the obtained training latent space feature is a set of low-dimensional vectors encoding video frame data. The latent space feature is subjected to multiple noise addition processes using the noise addition model corresponding to the above formula (1) to obtain a training noisy space frame whose noise quantity meets the preset noise standard, so as to facilitate the subsequent video feature association training step of the noisy space frame.
[0106] Step 310 , performing video feature association training on the original feature association model according to the training noisy spatial frame to obtain a target feature association model.
[0107] In some embodiments, the original feature association model includes: an original temporal network and an original image generation network; the original feature association model is trained for video feature association according to the training noisy spatial frames to obtain a target feature association model, including: supervised learning training of the original temporal network according to the training noisy spatial frames to obtain a candidate temporal network; the candidate temporal network is monitored according to the validation set data corresponding to the training noisy spatial frames to obtain performance feedback data; the hyperparameters of the candidate temporal network are adjusted according to the performance feedback data to obtain a target temporal network; three-dimensional convolution training of the original image generation network is performed according to the training noisy spatial frames to obtain a target image generation network; the target temporal network is embedded in the target image generation network to obtain a target feature association model.
[0108] The original temporal network can use a transition-based temporal module, which is used to identify, analyze and control dynamic elements in the video, thereby improving the quality of motion generated by the video generation model. A latent space image diffusion model based on pre-training.
[0109] Among them, the original image generation network can adopt a U-type network. It should be noted that the U-type network mainly includes two parts: a convolutional layer and a conversion module. The U-type network can accept a 5D video tensor as input.
[0110] In some embodiments, the supervised learning training may be constrained by a corresponding loss function, so as to perform supervised learning training on the original temporal network according to the training noisy spatial frame and the loss function to obtain a candidate temporal network.
[0111] The loss function is calculated as shown in formula (2):
[0112] (2)
[0113] in, Used to represent the loss function value of the original timing network optimization, is the spatial frame to be noised, y represents Corresponding text data, t is the training time step (i.e. the time step of the diffusion model), is random noise; is a text encoder that maps text data into a vector sequence. In the pre-trained model, It is implemented as a pre-trained U-type network, which consists of downsampling / upsampling block pairs at four resolution levels and an intermediate block. Each network block includes a convolutional ResNet, a spatial self-attention layer, and a cross-attention layer that introduces text conditions, where the text conditions are used to filter text data.
[0114] It should be further explained that the loss function is an optimization formula for the consistent video network. In other words, the value of the network optimization loss function obtained by the optimization formula is used to represent the optimization progress of the original timing network.
[0115] In some embodiments, the candidate time series network is monitored according to the validation set data corresponding to the training noisy spatial frame to obtain performance feedback data, so as to monitor the performance of the candidate time series network in each round of training through the validation data set, and the predicted data of the candidate time series network in each round of training can be verified according to the validation data set to obtain predicted verification data, and the performance feedback data can be determined according to the predicted verification data. Then, the hyperparameters of the candidate time series network are adjusted according to the performance feedback data to ensure that the target time series network has high effectiveness and generalization ability.
[0116] Among them, the performance feedback data can be learning rate, batch size, training cycle, etc.
[0117] In some embodiments, in order to prevent overfitting during supervised learning training, regularization technology and early stopping strategy are also introduced into the target timing network. The target timing network obtained through the above training can realize the establishment of dense association of the global timing of the video.
[0118] In some embodiments, the original image generation network is trained with three-dimensional convolution according to the training noisy spatial frame to obtain a target image generation network, and the target temporal network is embedded in the target image generation network to obtain a target feature association model. When the internal feature map corresponding to the training noisy spatial frame passes through the image convolution layer of the original image generation network, the time axis is ignored by reshaping the internal feature map into an axis, allowing the network to process each frame independently.
[0119] Among them, the 5D video tensor can be , where b represents the batch axis and f represents the frame time axis.
[0120] On the other hand, the spatial axis of the transformation module is reshaped into the batch axis, and then reshaped back after passing through the transformation module, thereby ignoring the spatial axis, and realizing the extension of the traditional two-dimensional attention mechanism to a three-dimensional attention mechanism. This three-dimensional attention mechanism not only considers the planar features of the image, but also generalizes the similarity prior within the image to all frames, thereby achieving a more coherent and dynamic vision in the generation process.
[0121] Among them, the spatial axes can be h and w.
[0122] In this embodiment, video-text pair data is obtained and preprocessed to obtain training video-text pair data; frame-level decomposition is performed on the training video data in the training video-text pair data to obtain training video frame data; latent space features are extracted from the training video frame data to obtain training latent space features; noise processing is performed on the training latent space features to obtain training noisy spatial frames; video feature association training is performed on the original feature association model based on the training noisy spatial frames to construct a target feature association model that can perform video global space-time and time series feature association on spatial frames.
[0123] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0124] Based on the same inventive concept, the embodiment of the present application also provides a video generation device for implementing the video generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more video generation device embodiments provided below can refer to the limitations on the video generation method above, and will not be repeated here.
[0125] In an exemplary embodiment, as shown in FIG4 , a video generation device is provided, including: a decomposition module 402, a feature extraction module 404, a noise addition module 406, a frame processing module 408 and a decoding module 410, wherein:
[0126] A decomposition module 402 is used to perform frame-level decomposition on the acquired video image to obtain video frame data;
[0127] The feature extraction module 404 is used to extract latent space features from the video frame data to obtain latent space features;
[0128] A noise adding module 406 is used to perform noise adding processing on the latent space features to obtain a noisy space frame;
[0129] The frame processing module 408 is used to perform video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and perform denoising on the associated spatial frame to obtain a denoised spatial frame;
[0130] The decoding module 410 is used to perform stylized decoding on the denoised spatial frame to obtain a stylized video.
[0131] In some embodiments, the target feature association model includes a target timing network and a target image generation network; the frame processing module 408 is also used to perform video global timing association on the noisy spatial frame according to the target timing network to obtain a timing-associated spatial frame; and perform video global spatiotemporal association on the timing-associated spatial frame according to the target image generation network to obtain an associated spatial frame.
[0132] In some embodiments, before the noisy spatial frame is associated with video features according to the target feature association model, the video generation device also includes: a model training module, which is used to obtain video-text pair data and pre-process the video-text pair data to obtain training video-text pair data; perform frame-level decomposition on the training video data in the training video-text pair data to obtain training video frame data; perform latent space feature extraction on the training video frame data to obtain training latent space features; perform noise processing on the training latent space features to obtain training noisy spatial frames; perform video feature association training on the original feature association model according to the training noisy spatial frames to obtain a target feature association model.
[0133] In some embodiments, the video-text pair data includes: video data and text data; a model training module is also used to perform video preprocessing on the video data to obtain training video data; perform data cleaning on the text data to obtain training text data; and construct training video-text pair data based on the training video data and training text data.
[0134] In some embodiments, the original feature association model includes: an original time series network and an original image generation network; a model training module is also used to perform supervised learning training on the original time series network according to the training noisy spatial frame to obtain a candidate time series network; the candidate time series network is monitored according to the verification set data corresponding to the training noisy spatial frame to obtain performance feedback data; the hyperparameters of the candidate time series network are adjusted according to the performance feedback data to obtain a target time series network; the original image generation network is trained in three-dimensional convolution according to the training noisy spatial frame to obtain a target image generation network; the target time series network is embedded in the target image generation network to obtain a target feature association model.
[0135] In some embodiments, the feature extraction module 404 is further used to extract features from the video frame data to obtain video frame features; and perform dimensionality reduction mapping on the video frame features to obtain latent space features.
[0136] In the above-mentioned video generation device, the acquired video image is decomposed at the frame level to obtain video frame data; the latent space feature is extracted from the video frame data to obtain the latent space feature; the latent space feature is subjected to denoising to obtain the noisy space frame; the noisy space frame is subjected to video feature association according to the target feature association model to obtain the associated space frame, and the associated space frame is subjected to denoising to obtain the denoised space frame; the denoised space frame is subjected to stylized decoding to obtain the stylized video. Therefore, by performing denoising on the latent space feature, it is easier to predict the noise of the latent space feature, and the noisy space frame is subjected to feature association using the target feature association model to achieve the establishment of the associated features between the noisy space frames, and then the associated space frame is subjected to denoising and stylized decoding to obtain the stylized video, thereby improving the accuracy of video frame alignment in the stylized video, and at the same time, in the stylized video of the long video sequence type, a more stable and consistent object representation can be achieved.
[0137] Each module in the above video generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0138] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a video generation method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0139] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0140] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned video generation method when executing the computer program.
[0141] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned video generation method are implemented.
[0142] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the above-mentioned video generation method when executed by a processor.
[0143] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0144] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0145] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0146] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A video generation method, characterized in that: The method comprises: Decomposing the acquired video image at the frame level to obtain video frame data; Performing latent space feature extraction on the video frame data to obtain latent space features; Performing noise processing on the latent spatial features to obtain a noisy spatial frame; Performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame, and performing denoising on the associated spatial frame to obtain a denoised spatial frame; The denoised spatial frame is stylized and decoded to obtain a stylized video.
2. The method according to claim 1, characterized in that The target feature association model includes a target temporal network and a target image generation network; and the step of performing video feature association on the noisy spatial frame according to the target feature association model to obtain an associated spatial frame includes: Performing video global temporal association on the noisy spatial frame according to the target temporal network to obtain a temporally associated spatial frame; The target image generation network performs video global spatiotemporal association on the temporally associated spatial frames to obtain the associated spatial frames.
3. The method according to claim 1, characterized in that Before associating video features on the noisy spatial frame according to the target feature association model, the method further includes: Acquire video-text pair data, and preprocess the video-text pair data to obtain training video-text pair data; Performing frame-level decomposition on the training video data in the training video text pair data to obtain training video frame data; Performing latent space feature extraction on the training video frame data to obtain training latent space features; Performing noise processing on the training latent space features to obtain a training noisy space frame; The original feature association model is trained for video feature association according to the training noisy spatial frame to obtain the target feature association model.
4. The method according to claim 3, characterized in that The video-text pair data includes: video data and text data; the preprocessing of the video-text pair data to obtain training video-text pair data includes: Performing video preprocessing on the video data to obtain the training video data; Performing data cleaning on the text data to obtain training text data; The training video-text pair data is constructed according to the training video data and the training text data.
5. The method according to claim 3, characterized in that: The original feature association model includes: an original temporal network and an original image generation network; the video feature association training is performed on the original feature association model according to the training noisy spatial frame to obtain the target feature association model, including: Performing supervised learning training on the original time series network according to the training noisy spatial frame to obtain a candidate time series network; Monitoring the candidate temporal network according to the validation set data corresponding to the training noisy spatial frame to obtain performance feedback data; Adjusting the hyperparameters of the candidate timing network according to the performance feedback data to obtain a target timing network; Performing three-dimensional convolution training on the original image generation network according to the training noisy spatial frame to obtain a target image generation network; The target temporal network is embedded in the target image generation network to obtain the target feature association model.
6. The method according to any one of claims 1 to 5, characterized in that: The step of extracting latent space features from the video frame data to obtain latent space features includes: Extracting features from the video frame data to obtain video frame features; Perform dimensionality reduction mapping on the video frame features to obtain the latent space features.
7. A video generating device, characterized in that: The device comprises: A decomposition module is used to perform frame-level decomposition on the acquired video image to obtain video frame data; A feature extraction module, used to extract latent space features from the video frame data to obtain latent space features; A noise adding module, used for performing noise adding processing on the latent space features to obtain a noisy space frame; A frame processing module, configured to perform video feature association on the noisy spatial frame according to a target feature association model to obtain an associated spatial frame, and perform denoising on the associated spatial frame to obtain a denoised spatial frame; The decoding module is used to perform stylized decoding on the denoised spatial frame to obtain a stylized video.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, 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 6 are implemented.
10. A computer program product, comprising 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 6 are implemented.
Citation Information
Cited By
Video generation method and device, storage medium and computer program product
CN118861363A
Creative video generation method based on artificial intelligence
CN119136022A
