Method and device for generating dynamic three-dimensional video through text input, electronic equipment and storage medium
By generating reference videos and static 3D models, combined with the optimization supervision of dynamic information generation models, the problem of poor dynamic effects in traditional 3D data generation is solved, and high-quality dynamic 3D video generation is achieved.
Patent Information
- Application Number
- CN202410756606.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional 3D data generation methods cannot guarantee the display quality and dynamic continuity of generated dynamic 3D, resulting in poor dynamic effects.
A reference video is generated by obtaining text data. Based on the static 3D model and the dynamic information generation model, a hybrid prior optimization strategy is used for supervision to generate a dynamic 3D video that conforms to the text description. Specific steps include generating a static 3D model, determining a dynamic information generation model, and performing optimization supervision based on direct priors from the reference video and distilled priors from the diffusion model.
The dynamic effect of 3D video is enhanced, the amplitude and diversity of motion are improved, and the geometric and texture quality and dynamic continuity of the generated results are ensured.
Smart Images

Figure CN118741069A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, electronic device, computer storage medium and computer program product for generating dynamic three-dimensional video by text input. Background Art
[0002] In terms of 3D digital content, the generation of 3D digital content relies on a large amount of 3D data as training data. Due to the lack of high-quality 3D data and the difficulty in collecting and producing it, the idea of generating 3D data with the help of existing large-scale generation models has emerged.
[0003] In traditional 3D data generation methods, three-dimensional consistency is usually enhanced by introducing three-dimensional priors, or the fractional distillation sampling loss function is improved, combined with technologies such as mesh differentiable rendering based on physical rendering materials, to achieve the results of text-to-3D or image-to-3D generation.
[0004] However, in the traditional 3D data generation method, the display quality and dynamic continuity of the generated dynamic 3D cannot be guaranteed, resulting in poor dynamic effect of the generated dynamic 3D. Summary of the invention
[0005] The present disclosure provides a method, device, electronic device, computer storage medium and computer program product for generating dynamic three-dimensional video by text input, so as to at least solve the problem of poor dynamic effect of generating dynamic 3D in related technologies. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a method for generating a dynamic three-dimensional video by text input is provided, the method comprising:
[0007] Acquire text data, and generate a reference video satisfying the description content of the text data based on the text data;
[0008] Using the text data and the reference picture in the reference video as constraints, generating a static three-dimensional model that satisfies the description of the text data and the reference picture;
[0009] Based on the static three-dimensional model, determining a dynamic information generation model;
[0010] The dynamic information generation model is optimized and supervised based on a hybrid prior optimization strategy, and a three-dimensional video corresponding to the text data is generated based on the optimized and supervised dynamic information generation model; the hybrid prior optimization strategy includes a direct prior of a reference video and a distilled prior of a diffusion model.
[0011] In one embodiment, generating a reference video satisfying the description content of the text data based on the text data includes:
[0012] Determining the text length of the text data;
[0013] In the case where the text length meets the text length condition, based on a text video generation algorithm, generating a reference video that meets the description content of the text data;
[0014] When the text length does not satisfy the text length condition, the text data is expanded based on a large language model so that the text length satisfies the text length condition.
[0015] In one embodiment, the static three-dimensional model includes a static neural radiation field network; the static neural radiation field network includes a multi-resolution hash-coded feature grid and a shallow fully connected network; the text data and the reference picture in the reference video are used as constraints to generate a static three-dimensional model that satisfies the text data description and the reference picture, including:
[0016] Determine an observation angle, generate a camera ray according to a camera parameter of the observation angle under the observation angle, and sample the camera ray to obtain target sampling point data;
[0017] Encoding the data of the target sampling point based on the feature grid of the multi-resolution hash code to obtain index features of the target sampling point on the feature grid of the multi-resolution hash code in a three-dimensional scene;
[0018] The index feature is input into the shallow fully connected network, the volume density and color value corresponding to the target sampling point are determined, and a multi-view image is obtained.
[0019] In one embodiment, the method further comprises:
[0020] Based on the joint fractional distillation sampling loss function, the multi-view image rendered by the static neural radiation field network is supervised; the joint fractional distillation sampling loss function includes a two-dimensional fractional distillation sampling loss function and a three-dimensional fractional distillation sampling loss function.
[0021] In one embodiment, the supervising the multi-view image rendered by the static neural radiance field network based on the joint fractional distillation sampling loss function includes:
[0022] Determining a first loss value between the rendered image at the observation angle and the noise image output by the two-dimensional diffusion model based on the two-dimensional fractional distillation sampling loss function;
[0023] Determining a second loss value between the reference image at the observation angle and the noise image output by the three-dimensional diffusion model based on the three-dimensional fractional distillation sampling loss function;
[0024] The rendered multi-view image is supervised based on the first loss value and the second loss value.
[0025] In one embodiment, the method further comprises:
[0026] Based on the color loss function and the mask loss function, respectively determine a third loss value between the multi-view picture and the reference picture, and a fourth loss value between the multi-view picture mask and the reference picture mask;
[0027] Based on the first loss value, the second loss value, the third loss value and the fourth loss value, rendering supervision is performed on the multi-view image.
[0028] In one embodiment, the dynamic information generation model includes a dynamic feature grid, a deformation field network, a topological network and the static three-dimensional model, and the three-dimensional video corresponding to the text data is generated based on the dynamic information generation model after optimization supervision, including:
[0029] Determine an observation angle, generate a camera ray according to a camera parameter of the observation angle under the observation angle, and sample the camera ray to obtain target sampling point data; the target sampling point data is a feature vector including the target sampling point coordinates and time;
[0030] Inputting the data of the target sampling point into the deformation field network through the dynamic feature grid, and outputting the displacement vector corresponding to the target sampling point;
[0031] updating the data of the target sampling point based on the displacement vector, and encoding the updated data of the target sampling point based on the multi-resolution hash-coded feature grid in the static three-dimensional model to obtain an index feature of the target sampling point on the multi-resolution hash-coded feature grid in the three-dimensional scene;
[0032] Inputting the target sampling point data into the topological network through the dynamic feature grid, and outputting a topological vector;
[0033] The index feature and the topological vector are input into a shallow fully connected network of the static three-dimensional model, and the volume density and color value corresponding to the target sampling point are determined to obtain a three-dimensional video.
[0034] In one embodiment, the direct prior of the reference video is used for calculating the color loss function, the mask loss function and the optical flow loss function, and the optimization supervision of the dynamic information generation model based on the hybrid prior optimization strategy includes:
[0035] Sampling the three-dimensional video, and supervising the dynamic information generation model based on the fractional distillation sampling loss function of the preset Vincent video diffusion model and the three-dimensional video;
[0036] An observation angle is determined, and at the observation angle, rendering supervision is performed on the dynamic information generation model through the color loss function, the mask loss function, and the optical flow loss function.
[0037] In one embodiment, sampling the three-dimensional video and supervising the dynamic information generation model based on a preset fractional distillation sampling loss function of the Vincent video diffusion model and the three-dimensional video includes:
[0038] Sampling the three-dimensional video, and performing noise addition and noise removal processing on the sampled three-dimensional video based on the Vincent video diffusion model to obtain a reconstructed video;
[0039] Based on a preset video score distillation sampling loss function, a fifth loss value between the rendered video and the reconstructed video is determined.
[0040] In one embodiment, the rendering supervision of the dynamic information generation model by using a color loss function, a mask loss function, and an optical flow loss function includes:
[0041] Determine, by means of a color loss function and a mask loss function, a sixth loss value between the three-dimensional video and each frame image in the reference video, and a seventh loss value between the three-dimensional video mask and each frame image mask in the reference video;
[0042] The scene flow predicted by the deformation field network in the dynamic information generation model is mapped to a two-dimensional image plane using camera parameters, and the optical flow prediction network is used to predict the optical flow of adjacent frames of the video, and the optical flow loss function between the projected scene flow and the predicted optical flow is calculated to obtain an eighth loss value.
[0043] In one embodiment, the method further comprises:
[0044] Adding the three-dimensional fractional distillation sampling loss function to each frame of the reference video image;
[0045] Adding a total variation loss function in the image domain, and determining a total optimization loss function corresponding to the dynamic modeling expression based on the video fractional distillation sampling loss function, the three-dimensional fractional distillation sampling loss function, the total variation loss function, the color loss function, the mask loss function and the optical flow loss function;
[0046] Substitute the loss value of each loss function to determine the total loss value of the dynamic modeling expression, and perform supervised optimization on the dynamic modeling expression based on the total loss value.
[0047] According to a second aspect of an embodiment of the present disclosure, a device for generating a dynamic three-dimensional video by text input is provided, the device comprising:
[0048] an acquisition unit configured to acquire text data and generate a reference video satisfying the description content of the text data based on the text data;
[0049] A generating unit is configured to generate a static three-dimensional model satisfying the description of the text data and the reference picture by taking the text data and the reference picture in the reference video as constraints;
[0050] A determination unit is configured to determine a dynamic information generation model based on the static three-dimensional model;
[0051] The optimization generation unit is configured to perform optimization supervision on the dynamic information generation model based on a hybrid prior optimization strategy, and generate a three-dimensional video corresponding to the text data based on the dynamic information generation model after optimization supervision; the hybrid prior optimization strategy includes a direct prior of a reference video and a distillation prior of a diffusion model.
[0052] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0053] processor;
[0054] a memory for storing instructions executable by the processor;
[0055] The processor is configured to execute the instructions to implement the method for generating dynamic three-dimensional video by text input as described in any one of the first aspects.
[0056] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method of generating dynamic three-dimensional video by text input as described in any one of the first aspects.
[0057] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, wherein the computer program product includes instructions, and when the instructions are executed by a processor of a server, the server is able to execute the method for generating dynamic three-dimensional video by text input as described in any one of the first aspects.
[0058] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0059] This method uses existing text data to generate a reference video that meets the text description, and uses the reference video as a direct prior. In the static generation stage, the text data and the reference image of the reference video are input, and a loss function is added to constrain the 3D generation process so that the 3D generation result conforms to the reference image. In the dynamic generation stage, the dynamic information generation model is optimized and supervised based on the hybrid prior optimization strategy of the direct prior of the reference video and the distillation prior of the diffusion model, which enhances the motion amplitude and diversity and the dynamic effect of the 3D video.
[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0062] Figure 1 The present invention is a diagram showing an application environment of a method for generating dynamic three-dimensional video by text input according to an exemplary embodiment.
[0063] Figure 2 The figure is a flowchart showing a step of generating a reference video according to an exemplary embodiment.
[0064] Figure 3 The figure is a schematic structural diagram of a static three-dimensional model according to an exemplary embodiment.
[0065] Figure 4 The present invention is a flowchart of a method for obtaining multi-view images from a static three-dimensional model according to an exemplary embodiment.
[0066] Figure 5 The present invention is a flowchart of a static 3D model rendering supervision step according to an exemplary embodiment.
[0067] Figure 6 The present invention is a flowchart of a direct supervision step in a static three-dimensional model rendering supervision according to an exemplary embodiment.
[0068] Figure 7It is a structural diagram of a dynamic information generation model according to an exemplary embodiment.
[0069] Figure 8 The present invention is a flowchart of generating a three-dimensional video using a dynamic information generation model according to an exemplary embodiment.
[0070] Fig. 9 The present invention is a flowchart of a dynamic information generation model rendering supervision step according to an exemplary embodiment.
[0071] Fig.10 It is a flowchart of a distillation sampling rendering supervision step of a dynamic information generation model according to an exemplary embodiment.
[0072] Fig.11 It is a flowchart of a reference video direct supervision step in a dynamic information generation model according to an exemplary embodiment.
[0073] Fig.12 It is a flowchart of supervised optimization steps of a total optimization loss function of a dynamic information generation model according to an exemplary embodiment.
[0074] Fig.13 It is a schematic diagram for comparing three-dimensional videos generated by another method according to an exemplary embodiment and the method for generating dynamic three-dimensional videos by text input disclosed in the present invention.
[0075] Fig.14 The diagram is a schematic diagram showing the result of generating a dynamic 3D video from text data according to a method for generating a dynamic 3D video from text input disclosed in the present invention according to an exemplary embodiment.
[0076] Fig.15 It is a schematic diagram showing a comparison between the method for generating dynamic three-dimensional video from text input provided by the present disclosure and the task of generating dynamic 3D video from monocular video according to an exemplary embodiment and the existing 4DGen method and Consistent4D.
[0077] Fig.16 It is a schematic diagram comparing the output results of ablation experiments of main modules involved in a method for generating dynamic three-dimensional video by text input according to an exemplary embodiment of the present disclosure.
[0078] Fig.17 The invention is a block diagram of a device for generating dynamic three-dimensional video by text input according to an exemplary embodiment.
[0079] Fig.18 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0080] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0081] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0082] It should also 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 display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0083] The production and synthesis of digital content has always relied on capturing from the real world or manual creation by professionals. With the emergence of large-scale generative models, especially cross-modal generative models, such as diffusion models, two-dimensional images can be generated from text inputs, which has brought about a wave of AI content generation, allowing traditional PCG (Professional Content Generation) to transition to UCG (User Content Generation), that is, every ordinary user can create a variety of two-dimensional digital content. In 3D digital content, some studies have conducted extensive explorations on explicit representation. However, these generation methods rely on a large amount of 3D data as training data. Due to the lack of high-quality 3D data and the difficulty of acquisition and production, it has become an idea to use existing large-scale generation models to help generate 3D data.
[0084] At present, traditional 3D data generation methods usually use fractional distillation sampling loss functions or introduce mesh differentiable rendering based on physical rendering materials to achieve the results of text-to-3D or image-to-3D.
[0085] For example, in one of the traditional 4D data generation methods, in the static optimization stage, the three time-related feature planes are fixed to 0, and the score distillation sampling loss function (SDS) based on the Vincent image diffusion model is used to optimize the static feature planes to achieve static generation. Then, in the dynamic optimization stage, 64*64*16 frames of video are rendered from 8 cameras, and all six planes are optimized in combination with the video-based SDS loss function. The dynamic camera trajectory is used to reduce the data distribution gap between the training data of the text generation video model, and finally the super-resolution variability module in the text generation video model is used to improve the resolution of the generated results. However, the geometry and texture quality of the generated results in the traditional 4D data generation method are low.
[0086] The second traditional 4D data generation method is to generate a static 3D model through SDS loss function optimization, then use VSD loss function to improve texture quality, and finally add video-based SDS loss function to generate motion. In dynamic 3D representation, a hybrid feature representation combining static and dynamic multi-scale hash feature voxels is used. However, traditional 3D data generation methods are difficult to ensure the continuity of generated dynamics, and may result in geometric mutations. At the same time, it is difficult to control the generated dynamics and cannot guarantee the generated dynamic effects.
[0087] Therefore, the present disclosure provides a method for generating dynamic three-dimensional video by text input, which uses existing text data to generate a reference video that meets the text description, and uses the reference video as a direct prior. In the static generation stage, the text data and the reference image of the reference video are input, and a loss function is added to constrain the three-dimensional generation process so that the three-dimensional generation result conforms to the reference image. In the dynamic generation stage, the dynamic information generation model is optimized and supervised by a hybrid prior optimization strategy based on the direct prior of the reference video and the distillation prior of the diffusion model, which enhances the motion amplitude and diversity and the dynamic effect of the three-dimensional video.
[0088] Figure 1 is a flow chart of a method for generating dynamic three-dimensional video by text input according to an exemplary embodiment. Figure 1 As shown, the method for generating dynamic three-dimensional video by text input is used in a terminal or a server, and the embodiments of the present disclosure do not limit this. The embodiments of the present disclosure are described by taking the method applied to a terminal as an example, and include the following steps.
[0089] In step S110 , text data is acquired, and a reference video satisfying the description content of the text data is generated based on the text data.
[0090] In the implementation, in order to convert the text data given by the user into a realistic three-dimensional dynamic video (also called 3D (3-Dimensional) dynamic video), and to freely select the viewing angle of the observed object during the viewing of the three-dimensional dynamic video to improve the video viewing effect, the terminal first obtains the text data given by the user, and based on the text data, uses the text-to-video generation model to convert the text data into a video that conforms to the text description content, and uses the video as a reference video for direct priori of the three-dimensional video generation process.
[0091] Among them, the text-to-video generation model includes text-to-video generation methods such as Runway and Stable Video Diffusion.
[0092] In step S120, the text data and the reference picture in the reference video are used as constraints to generate a static three-dimensional model that satisfies the text data and the reference picture.
[0093] In implementation, the 3D video generation process includes the generation of static 3D models and the generation of dynamic 3D videos (i.e., dynamic 3D information). In the generation of static 3D models, joint supervision of 2D and 3D fractional distillation sampling loss functions is used to ensure the diversity and 3D consistency of generated images. Specifically, the terminal uses text data and reference images in the generated reference video as input to constrain the construction process of the static 3D model, and adds a loss function to constrain the generation process of the static 3D model, so that the 3D generation result (i.e., multi-view image) output by the static 3D model conforms to the reference image and text description, that is, a static 3D model that satisfies the text data and reference image is obtained.
[0094] Optionally, the reference picture in the reference video may be, but is not limited to, the first frame of the reference video, and this embodiment of the present disclosure does not limit this.
[0095] In step S130, a dynamic information generation model is determined based on the static three-dimensional model.
[0096] Among them, the display content contained in the output result of the optimized static three-dimensional model (that is, the display content of the multi-view image) is consistent with the text data description content and is consistent with the reference image.
[0097] During implementation, the terminal uses the optimized static three-dimensional model obtained in the process of static three-dimensional model generation as the basis, decouples the object movement into continuous movement with unchanged topology and movement with changed topology, and uses deformation network and topological network to model respectively to ensure the continuity and diversity of the generated movement, thereby determining the dynamic information generation model.
[0098] In step S140, the dynamic information generation model is optimized and supervised based on a hybrid priori optimization strategy, and a three-dimensional video corresponding to the text data is generated based on the optimized and supervised dynamic information generation model.
[0099] Among them, the hybrid prior optimization strategy includes a direct prior of the reference video and a distilled prior of the diffusion model.
[0100] In implementation, the terminal optimizes and supervises the dynamic information generation model based on a hybrid prior optimization strategy, and generates a three-dimensional video (with a dynamic three-dimensional display effect) corresponding to the text data based on the dynamic information generation model after optimization and supervision. Specifically, the direct prior of the reference video includes but is not limited to optimization supervision based on the color loss function, the mask loss function and the optical flow loss function. The distillation prior of the diffusion model includes optimization supervision based on the fractional distillation sampling loss function and the three-dimensional fractional distillation sampling loss function of the Vincent video diffusion model. By optimizing and supervising the dynamic information generation model through each loss function, the generated dynamic information generation model can obtain a three-dimensional dynamic video that conforms to the description of the text data, and the three-dimensional dynamic video can switch different observation angles based on user selection.
[0101] In the above-mentioned method of generating dynamic three-dimensional video by text input, the existing text data is used to generate a reference video that meets the text description, and the reference video is used as a direct prior. In the static generation stage, the text data and the reference image of the reference video are input, and a loss function is added to constrain the three-dimensional generation process so that the three-dimensional generation result conforms to the reference image. In the dynamic generation stage, the dynamic information generation model is optimized and supervised by a hybrid prior optimization strategy based on the direct prior of the reference video and the distillation prior of the diffusion model, which enhances the motion amplitude and diversity and the dynamic effect of the three-dimensional video.
[0102] In an exemplary embodiment, if Figure 2 As shown, the specific processing process of generating a reference video satisfying the description content of the text data based on the text data in step 110 includes:
[0103] Step S201, determining the text length of the text data.
[0104] In implementation, the terminal determines the text length of the text data. If the text length is too short, it is not convenient to convert the text data into a three-dimensional video, and the text data with too short text needs to be expanded.
[0105] Step S202: When the text length meets the text length condition, a reference video that meets the description content of the text data is generated based on the text-based video generation algorithm.
[0106] In implementation, when the text length meets the text length condition, the terminal generates a reference video that meets the description content of the text data based on the text generation video algorithm. Text description information representing "under a certain fixed camera angle" can be added to the text data to ensure that the generated reference video is presented at a fixed camera angle.
[0107] Step S203: when the text length does not meet the text length condition, the text data is expanded based on the large language model so that the text length meets the text length condition.
[0108] In implementation, when the text length does not meet the text length condition, the text data will be expanded using a text expansion model, and the text expansion model will be used to guide the generation of a more comprehensive description paragraph. A reference video will be generated based on the expanded text data. The generation process of the reference video is the same as the above step 202, and the embodiments of the present disclosure will not be repeated here.
[0109] Generally, methods for generating videos from text include Runway, Stable Video Diffusion, etc., which are not limited in the embodiments of the present disclosure. The text expansion model may be a natural language processing model such as a large language model.
[0110] In this embodiment, since the supervision of the fractional distillation sampling loss function is not direct, the text data is directly used to generate a reference video in this application, and the reference video is used as a direct prior. In the early stage of training the dynamic information generation model, the direct prior is relied upon to stabilize the motion generation, and in the later stage of training, the generation model is relied upon to distill to enhance the motion amplitude and diversity.
[0111] In an exemplary embodiment, if Figure 3 As shown, the static three-dimensional model includes a static neural radiation field network; the static neural radiation field network includes a multi-resolution hash-coded feature grid (i.e. Figure 3 ) and a shallow fully connected network, i.e., containing Figure 3 The geometric network MLP (Multilayer Perceptron) and color network MLP in the static 3D model are constructed as follows: Figure 4 As shown, in step S120, using the reference picture in the text data reference video as a constraint condition, generating a static three-dimensional model that satisfies the text data description and the reference picture can be specifically achieved by the following steps:
[0112] In step S401, an observation angle is determined, and under the observation angle, a camera ray is generated according to a camera parameter of the observation angle, and target sampling point data is acquired by sampling on the camera ray.
[0113] In the implementation, first, for the static neural radiation field network, the terminal uses a multi-resolution hash-coded feature grid to encode the geometric and texture information of the scene. Specifically, the terminal first determines the viewing angle (randomly selected or specified by the user), and casts light from the camera center to the space according to the camera parameters of the camera view (viewing angle) at this camera view. , the projected light will pass through the image pixels, and then uniformly sample some target sampling points on the light to obtain the target sampling point data. The target sampling point data includes the three-dimensional position coordinates of the target sampling point And the sampling time of the target sampling point in the three-dimensional scene.
[0114] In step S402, data of the target sampling point is encoded based on the multi-resolution hash-coded feature grid to obtain index features of the target sampling point on the multi-resolution hash-coded feature grid in the three-dimensional scene.
[0115] In the implementation, the terminal encodes the three-dimensional coordinates contained in the data of each target sampling point, and estimates the index feature of the target sampling point on the multi-resolution hash-coded feature grid in the 3D scene storing the feature. .
[0116] In step S403, the index feature is input into a shallow fully connected network to determine the volume density and color value corresponding to the target sampling point to obtain a multi-view image.
[0117] In the implementation, the terminal inputs the index feature into the shallow fully connected network in the static 3D model to predict the volume density value corresponding to the sampling point and color values Finally, the volume density values of all target sampling points on each ray are and color values The discrete volume rendering is aggregated to obtain the rendering result of the entire image, that is, a multi-view image.
[0118] Specifically, the discrete volume rendering formula is:
[0119]
[0120] in, It's light The pixel rendering result of the corresponding target sampling point, , is a constant, , For the The opacity of the sampling points, For the When rendering an image, the present disclosure traverses all image pixels and repeatedly calculates the above formula to obtain the entire rendered image result.
[0121] Optionally, the present disclosure adopts the proposed multi-resolution hash-coded feature grid, wherein the maximum resolution of the multi-resolution hash-coded feature grid is 4096.
[0122] Optionally, sample 128 points uniformly on the cast ray when rendering.
[0123] Optionally, the shallow fully connected network includes a density network for predicting volume density values and a color network for predicting color values, both of which have two hidden layers of dimension 64.
[0124] In this embodiment, a static three-dimensional model is used to analyze and process text data and reference images, and the static three-dimensional model is trained and optimized based on joint supervision using joint supervision from 2D and 3D fractional distillation sampling loss functions, so that the static three-dimensional model obtained after training and optimization can obtain accurate multi-view images.
[0125] In an exemplary embodiment, the method further comprises:
[0126] Based on the joint fractional distillation sampling loss function, the multi-view images rendered by the static neural radiance field network are supervised.
[0127] Among them, the joint fractional distillation sampling loss function includes a two-dimensional fractional distillation sampling loss function and a three-dimensional fractional distillation sampling loss function.
[0128] In the implementation, the terminal adopts a 2D fractional distillation sampling loss function and 3D fractional distillation sampling loss function The joint fractional distillation sampling loss function supervises multi-view images rendered by static neural radiance field networks.
[0129] In this embodiment, the static three-dimensional model is trained and optimized through the joint supervision of the 2D and 3D fractional distillation sampling loss functions, so that the static three-dimensional model obtained after training and optimization can obtain accurate multi-view images.
[0130] In an exemplary embodiment, Figure 5 As shown, in the step of supervising the multi-view images rendered by the static neural radiation field network based on the joint fractional distillation sampling loss function, the following is specifically included:
[0131] In step S501, based on the two-dimensional fractional distillation sampling loss function, a first loss value between a rendered image under an observation angle and an image output by a two-dimensional diffusion model is determined.
[0132] The rendered image is an image obtained by performing image rendering based on the sampling point data.
[0133] In the implementation, the terminal determines a first loss value between the rendered image under the observation angle and the image output by the two-dimensional diffusion model based on a two-dimensional fractional distillation sampling loss function, wherein the 2D fractional distillation sampling loss function distills the generated prior from the pre-trained text-to-image diffusion model for the generation of three-dimensional information. The specific definitions are as follows:
[0134]
[0135] in, is represented by the static neural radiation field On Camera The implicit representation of the image rendered at are the parameters of the static neural radiation field representation; For expectations, It is based on the two-dimensional diffusion model to output two-dimensional noise Yes An estimate of (rendered image), is text data input, is the time step Gaussian noise The result of the forward diffusion process.
[0136] Optionally, the present disclosure adopts the open source “High-resolution image synthesis with latent diffusion models” as the text generation image diffusion model, and other text generation image diffusion models may also be used.
[0137] In step S502, based on the three-dimensional fractional distillation sampling loss function, a second loss value between the rendered image under the observation angle and the image output by the three-dimensional diffusion model is determined.
[0138] In the implementation, the terminal determines the second loss value between the rendered image at the selected viewing angle and the noise image output by the 3D diffusion model based on the 3D fractional distillation sampling loss function. The 3D fractional distillation sampling loss function also generates priors by distilling the diffusion model, but the diffusion model it uses is fine-tuned and embeds the 3D prior. The fine-tuned diffusion model takes the input image and the relative viewing angle as conditional inputs and outputs an image at the new viewing angle. The specific definitions are as follows:
[0139]
[0140] in, is represented by the static neural radiation field On Camera The implicit representation of the image rendered at is the parameter represented by the neural radiation field; expect, It is based on the three-dimensional diffusion model to output three-dimensional noise (also called second noise) The estimate, is the input reference image, is the relative perspective between the rendering perspective and the input image perspective, is the time step Gaussian noise The result of the forward diffusion process.
[0141] Optionally, this application uses the Stable Zero-1-to-3 model as a diffusion model with 3D priors. The model used in the fractional distillation sampling loss function can also be replaced by other diffusion models, such as "ImageDream: Image-Prompt Multi-view Diffusion for 3D Generation".
[0142] In step S503, rendering supervision is performed on the rendered multi-view image based on the first loss value and the second loss value.
[0143] In implementation, the terminal performs rendering supervision on the rendered multi-view images based on the first loss value and the second loss value. Specifically, when the terminal performs training supervision on the static three-dimensional model, a training number is preset. When the training number does not reach the preset training number, the terminal continuously adjusts the parameters in the static three-dimensional model through the calculated first loss value and the second loss value, and continuously renders the multi-view images to perform rendering supervision on the multi-view images.
[0144] In this embodiment, by calculating the loss based on the two-dimensional and three-dimensional fractional distillation sampling loss functions, the difference between the static three-dimensional model rendering image and the diffusion model output image can be more accurately evaluated, thereby better guiding the training and optimization of the static three-dimensional model in the rendering supervision process, improving the quality and realism of the rendering results, and improving the rendering effect and quality of multi-view images.
[0145] In an exemplary embodiment, Figure 6 As shown, the method also includes:
[0146] Step S601, based on the color loss function and the mask loss function, respectively determine a third loss value between the multi-view picture and the reference picture, and a fourth loss value between the multi-view picture mask and the reference picture mask.
[0147] In the implementation, the terminal adds a color loss function at the initial viewing angle (i.e., the predetermined viewing angle) based on the reference image input. And the mask loss function , to ensure that the generated multi-view images (i.e., the output results of the static 3D model) are consistent with the reference images, which is conducive to the supervision brought by the reference video in the subsequent dynamic information generation stage. It is calculated as the mean square error between the rendered image (multi-view picture) and the first frame of the reference video. It is calculated as the cross entropy loss function between the rendered mask and the mask of the reference image.
[0148] Optionally, the embodiment of the present disclosure uses the “Modular interactive video objects segmentation: Interaction-to-mask, propagation and difference-aware fusion” method to extract the mask of each frame of the reference video through simple interaction.
[0149] Step S602: Rendering supervision is performed on the multi-view image based on the first loss value, the second loss value, the third loss value and the fourth loss value.
[0150] In the implementation, the terminal performs rendering supervision on the multi-view images based on the first loss value, the second loss value, the third loss value and the fourth loss value calculated by each loss function. Finally, the total optimization loss function of the static 3D model generation stage is for:
[0151]
[0152] in is the weight of the corresponding loss function. Under the joint supervision of the 2D and 3D fractional distillation sampling loss functions, the disclosed embodiment can avoid the impact of the "one body with multiple faces" problem as much as possible. Figure 3 The optimization process of the static generation phase is shown in , , and The difference between the reference image and the multi-view image output by the static 3D model is calculated to supervise the training of the static 3D model.
[0153] Optionally, , , , The values are 0.025, 1, 1000, and 100 respectively.
[0154] Optionally, this training phase optimizes the static multi-resolution hash-encoded feature grid, density network and color network, with learning rates of 0.01, 0.001, and 0.001, respectively. Optionally, this phase is trained for 10,000 iterations.
[0155] In this embodiment, for the static three-dimensional model generated in the static generation stage, joint supervision of two-dimensional and three-dimensional fractional distillation sampling loss functions is adopted, combined with the color loss function and mask loss function based on the reference image, to ensure the diversity and three-dimensional consistency of the generated multi-view images.
[0156] In an exemplary embodiment, if Figure 7 As shown, the dynamic information generation model includes a dynamic feature grid (i.e. Figure 7 4D dynamic feature grid in), deformation field network MLP, topology network MLP and static 3D model ( Figure 7 The static 3D model in contains 3D static feature grid and NeRF (neural radiation field), NeRF contains geometric network and color network. Figure 7 Specifically, based on the optimized supervised static 3D model, a dynamic modeling method combining a deformation field network and a topological network is adopted to break the topological restrictions while ensuring the continuity of the action, enrich the action types, and achieve a large degree of dynamic generation, such as Figure 8 As shown, the specific processing process of generating a three-dimensional video corresponding to the text data based on the optimized supervised dynamic information generation model in step S140 includes:
[0157] In step S801, an observation angle is determined, and under the observation angle, a camera ray is generated according to a camera parameter of the observation angle, and target sampling point data is acquired by sampling on the camera ray.
[0158] The data of the target sampling point is a feature vector (4D feature vector) including the coordinates of the target sampling point and time.
[0159] In implementation, the terminal determines an observation angle, under which the terminal generates a camera ray according to a camera parameter of the observation angle, and samples the camera ray to obtain target sampling point data.
[0160] In step S802, the data of the target sampling point is input into the deformation field network through the dynamic feature grid, and the displacement vector corresponding to the target sampling point is output.
[0161] In the implementation, the terminal inputs the data of the target sampling point into the deformation field network through the dynamic feature grid, and outputs the displacement vector corresponding to the target sampling point. Specifically, in the 4D dynamic generation based on text data. First, in order to ensure the full encoding of the timing information without affecting the encoding of the static position information, the present disclosure uses a 4D multi-scale hash-coded feature grid (i.e., dynamic feature grid) to encode the 4D feature vector input composed of coordinates and time, and outputs the corresponding time. The temporal features output by the dynamic feature grid are input into the deformation field network, which is composed of several fully connected layers. The displacement vector corresponding to the target sampling point is output through the processing of the temporal feature vector by several fully connected layers in the deformation field network ( ), which is used to transform the target sampling point from the current observation space back to the canonical space where the static 3D model is located.
[0162] In step S803, the data of the target sampling point is updated based on the displacement vector, and the updated data of the target sampling point is encoded based on the multi-resolution hash-coded feature grid in the static three-dimensional model to obtain the index features of the target sampling point on the multi-resolution hash-coded feature grid in the three-dimensional scene.
[0163] In implementation, after the deformation field network outputs a displacement vector, the terminal updates the data of the target sampling point based on the displacement vector, that is, the displacement value of the displacement vector is applied to the coordinate data of the target sampling point. Then, the displacement vector is transmitted to the supervised optimized static three-dimensional model contained in the dynamic information generation model. The terminal encodes the updated data of the target sampling point based on the multi-resolution hash-coded feature grid in the static three-dimensional model to obtain the index feature of the target sampling point on the multi-resolution hash-coded feature grid in the three-dimensional scene.
[0164] In step S804, the target sampling point data is input into the topological network through the dynamic feature grid, and a topological vector is output.
[0165] In the implementation, the topology vector is connected in series with the dynamic feature grid, and the terminal inputs the target sampling point data into the topology network through the dynamic feature grid and outputs the topology vector. Figure 7 As shown, the 4D feature vector input consisting of coordinates and time is encoded in the dynamic feature grid (4D multi-scale hash-coded feature grid), and the corresponding time is output Then, the potential topological changes are modeled based on the topological network introduced in the dynamic information generation model of the present disclosure. The topological network also inputs the temporal features of the feature grid output of the 4D multi-scale hash code and outputs a topological vector as a representation of the current topological state.
[0166] In step S805, the index features and the topological vectors are input into a shallow fully connected network of the static three-dimensional model, the volume density and color value corresponding to the target sampling point are determined, and a three-dimensional video is obtained.
[0167] In the implementation, the terminal inputs the index features and topological vectors into the shallow fully connected network of the static 3D model, determines the volume density and color value corresponding to the target sampling point, and obtains the 3D video. Specifically, the generation process of the 3D video is similar to the generation process of the multi-view picture, and the volume density and color value use the same calculation formula, which will not be repeated in the embodiments of the present disclosure.
[0168] Optionally, the maximum resolution of the feature grid for dynamic multi-resolution hash encoding is 4096.
[0169] Optionally, both the deformation network and the topological network have two hidden layers with a dimension of 64, and the topological vector dimension of the topological network output is 16.
[0170] In this embodiment, the dynamic generation stage decouples the object motion into continuous motion with unchanged topology and motion with changed topology. That is, on the basis of the static three-dimensional model, a deformation field network and a topological network are added to model the generated dynamic information generation model, which can ensure the continuity and diversity of the motion.
[0171] In an exemplary embodiment, if Fig. 9 As shown, the direct prior of the reference video is used for the calculation of the color loss function, the mask loss function and the optical flow loss function. Then, in step S140, the dynamic information generation model is optimized and supervised based on the hybrid prior optimization strategy, and the three-dimensional video corresponding to the text data is generated based on the optimized and supervised dynamic information generation model, including:
[0172] Step S901, sampling a three-dimensional video, and supervising a dynamic information generation model based on a preset fractional distillation sampling loss function of a Vincent video diffusion model and the three-dimensional video.
[0173] In the implementation, the terminal samples the dynamic information to generate a continuous camera trajectory in the 3D video output by the model. And render a 24-frame video. Similar to the image score distillation sampling loss function, the dynamic information generation model is supervised based on the score distillation sampling loss function of the preset Vincent video diffusion model and 3D video.
[0174] Step S902, determining an observation angle, and performing rendering supervision on the dynamic information generation model under the observation angle through a color loss function, a mask loss function, and an optical flow loss function.
[0175] In the implementation, in addition to the fractional distillation sampling loss function, because the terminal pre-generates a reference video that conforms to the text description, the dynamic information generation stage can obtain direct supervision from the generated video, similar to the static generation stage. Therefore, the terminal assumes that the generated video has a fixed camera perspective as the observation perspective, and uses the reference video rendered under this observation perspective for direct supervision. The specific terminal uses the color loss function , mask loss function And the optical flow loss function Rendering supervision is performed on the dynamic information generation model. and , calculated and averaged for each frame. The optical flow loss function first projects the scene flow predicted by the deformation network onto the 2D image plane using the camera parameters, and then calculates the estimated optical flow between adjacent images. Loss function. Previous generation methods all rely only on the fractional distillation sampling loss function, while the disclosed embodiment introduces a direct prior from the reference video, which promotes the generation of three-dimensional video and can ensure better results.
[0176] Generally, embodiments of the present disclosure use the method proposed in “Raft: Recurrent all-pairs field transforms for optical flow” to estimate the optical flow between adjacent images.
[0177] In this embodiment, in the dynamic generation stage, the dynamic information generation model is supervised by using the fractional distillation sampling loss function of the preset Vincent video diffusion model and the initial three-dimensional video generated by the dynamic information generation model to help the dynamic information generation model learn and improve the accuracy and quality of the generated dynamic information. Based on the reference video under the selected observation angle as the direct prior, the rendering result of the dynamic information generation model is supervised by the color loss function, the mask loss function and the optical flow loss function, that is, a hybrid prior optimization strategy combining the direct prior of the reference video and the distillation prior of the diffusion model is used to enhance the motion amplitude and diversity and enhance the dynamic effect of the three-dimensional video.
[0178] In an exemplary embodiment, if Fig.10 As shown, in step 901, a three-dimensional video is sampled, and based on the fractional distillation sampling loss function of the preset Vincent video diffusion model and the three-dimensional video, the dynamic information generation model is supervised. The specific processing process includes:
[0179] In step S1001, a three-dimensional video is sampled, and noise is added and denoised based on the Vincent video diffusion model to obtain a reconstructed video.
[0180] In the implementation, the terminal samples a continuous camera trajectory in the 3D video A 24-frame video is rendered, and the sampled 3D video is subjected to noise addition and noise removal processing based on the Vincent video diffusion model to obtain a reconstructed video.
[0181] In step S1002, based on a preset video score distillation sampling loss function, a fifth loss value between the rendered video and the reconstructed video is determined, wherein the rendered images at different times are connected together to construct a rendered video.
[0182] In the implementation, the terminal determines the fifth loss value between the rendered video and the reconstructed video based on a preset video score distillation sampling loss function. Specifically, based on the video score distillation sampling loss function for:
[0183]
[0184] in, is represented by the dynamic neural radiation field Along the camera trajectory The implicit representation of the rendered video, is the parameter represented by the neural radiation field; represent expectations between It is based on the output of Vincent video diffusion model with added noise (also called third noise) (rendered 3D video) estimation, is text data input, is the time step Gaussian noise The result of the forward diffusion process.
[0185] Optionally, the embodiment of the present disclosure uses the Modelscope text to generate a video diffusion model as a 2D motion prior. Similarly, this model can be replaced by other diffusion models, such as Zeroscope, which is not limited in the embodiment of the present disclosure.
[0186] In this embodiment, by adding noise and denoising the reconstructed video, the generation prior of the pre-trained two-dimensional video generation model can be introduced, and by calculating the fifth loss value, the difference between the reconstructed video and the rendered video can be more accurately measured, thereby guiding the training and rendering process of the dynamic information generation model, so that the generated three-dimensional video has a stronger dynamic effect.
[0187] In an exemplary embodiment, if Fig.11As shown, in step 902, the dynamic information generation model is rendered and supervised by the color loss function, the mask loss function and the optical flow loss function. The specific processing process includes:
[0188] In step S1101, the sixth loss value between the 3D video and each frame image in the reference video, and the seventh loss value between the 3D video mask and each frame image mask in the reference video are determined respectively by the color loss function and the mask loss function.
[0189] In implementation, the terminal determines the sixth loss value between the 3D video and each frame image in the reference video, and the seventh loss value between the 3D video mask and each frame image mask in the reference video, respectively, through the color loss function and the mask loss function. Specifically, the embodiment of the present disclosure adopts the color loss function , mask loss function And the optical flow loss function Rendering supervision is performed on the dynamic information generation model. and Consistent with the definition of the static 3D model generation process, each frame of the image is calculated and averaged.
[0190] In step S1102, the scene flow predicted by the deformation field network in the dynamic information generation model is mapped to the two-dimensional image plane using camera parameters, and the optical flow prediction network is used to predict the optical flow of adjacent frames of the video, and the optical flow loss function between the projected scene flow and the predicted optical flow is calculated to obtain the eighth loss value.
[0191] In the implementation, the terminal maps the scene flow predicted by the deformation field network in the dynamic information generation model to the two-dimensional image plane using the camera parameters, and uses the optical flow prediction network to predict the optical flow of adjacent frames of the video, and calculates the optical flow loss function between the projected scene flow and the predicted optical flow to obtain the eighth loss value. Specifically, the optical flow loss function first projects the scene flow predicted by the deformation network to the 2D image plane using the camera parameters, and then the terminal calculates the optical flow between adjacent frame images, and then calculates the optical flow loss function between the projected scene flow and the predicted optical flow to obtain the eighth loss value.
[0192] Optionally, the embodiment of the present disclosure uses the method proposed in “Raft: Recurrent all-pairs field transforms for optical flow” to estimate the optical flow between adjacent images.
[0193] In this embodiment, in the direct prior process based on the reference video, the difference between the three-dimensional video generated by the dynamic information generation model and the reference video is calculated through the color loss function, mask loss function and optical flow loss function, thereby guiding the optimization of the dynamic information generation model, thereby improving the geometry and texture quality of the generation results of the dynamic information generation model, and enhancing the motion amplitude and motion continuity.
[0194] In an exemplary embodiment, if Fig.12 As shown, the method also includes:
[0195] In step S1201, a three-dimensional fractional distillation sampling loss function is added to each frame of the reference video.
[0196] In implementation, the terminal adds a three-dimensional fractional sampling loss function to each frame of the reference video to ensure the 3D consistency of each frame.
[0197] In step S1202, the total variation loss function is added to the image domain, and the total optimization loss function corresponding to the dynamic modeling expression is determined based on the video score distillation sampling loss function, the three-dimensional score distillation sampling loss function, the total variation loss function, the color loss function, the mask loss function and the optical flow loss function.
[0198] In the implementation, in order to eliminate the jitter that may exist in the generated motion in space and time, the terminal adds a total variation loss function in the image domain , that is, the two-dimensional displacement map of the constraint rendering is similar between adjacent pixels and adjacent moments. Specifically, the embodiment of the present disclosure renders the three-dimensional scene flow into a two-dimensional displacement map M, and then the total variation loss function can be calculated as:
[0199]
[0200] in, and is the image pixel index, It's time, Represents the displacement of the pixel point (i+1,j) at time t. Represents the displacement of the pixel point (i, j+1) at time t. Represents the displacement of the pixel point (i, j) at time t. Represents the displacement of the pixel point (i, j) at time t+1.
[0201] Then, the terminal determines the total optimization loss function corresponding to the dynamic modeling expression based on the video score distillation sampling loss function, the 3D score distillation sampling loss function, the total variation loss function, the color loss function, the mask loss function and the optical flow loss function. The specific total optimization loss function of the dynamic stage is:
[0202]
[0203] in is the weight corresponding to the loss function. Fig.11 The optimization process of the dynamic generation stage is demonstrated.
[0204] Generally, , , They are 0.1, 1, and 1 respectively. It gradually decays from 1000 to 0.1. It gradually decays from 100 to 0.1. It gradually decays from 10 to 1 from the beginning of training to the 5000th training step.
[0205] Optionally, in this stage, the learning rates of the static multi-resolution hash-coded feature grid, density network and color network are set to 0.00001, and the learning rates of the dynamic multi-resolution hash-coded feature grid, deformation network and topology network are 0.01, 0.001, and 0.0001, respectively.
[0206] Optionally, the number of training iterations in the dynamic phase can be set to 12,000.
[0207] In step S1203, the loss value of each loss function is substituted to determine the total loss value of the dynamic modeling expression, and the dynamic modeling expression is supervised and optimized based on the total loss value.
[0208] In the implementation, the terminal substitutes the loss value of each loss function, determines the total loss value of the dynamic modeling expression, and performs supervised optimization on the dynamic modeling expression based on the total loss value. For dynamic optimization, the embodiment of the present disclosure adopts more constraints, which can be roughly divided into three categories. One is direct supervision from the reference video, that is, at a fixed initial viewing angle. , one is the distillation supervision from the diffusion model, i.e. , and the constraint regularization term . In the experiments disclosed in the present invention, it was found that although the direct supervision from the reference video can help stabilize the generation of motion, it will gradually limit the motion generation, while the prior from the diffusion model will help enrich the motion generation and ensure that the generated motion has a larger amplitude. Therefore, the present invention proposes a prior switching training mechanism to switch between the two priors of generated video prior and diffusion model prior. That is, the hybrid prior optimization strategy that combines the direct prior of the reference video and the distilled prior of the diffusion model is coupled, which can give full play to the role of the two priors. Specifically, at the beginning of training, the direct loss function from the reference video will be given a larger weight so that it can play a guiding role. Then as the number of training steps increases, this embodiment will gradually reduce the weights of these loss functions. At this time, the loss function from the diffusion model will fully play a supervisory role to ensure the amplitude of the generated motion. In addition, in the video score distillation sampling loss function and 3D fractional distillation sampling loss function This embodiment found that there are certain difficulties in joint optimization. Therefore, this embodiment chooses to set a probability , in each iteration according to the probability To select which fractional distillation sampling loss function to use for supervision. This is actually a priori switching mechanism. Through this training mechanism, the final dynamic generation result will not fall into a completely disordered state, and a reasonable result with sufficient motion amplitude will be obtained. Optionally, select the probability Set to 0.5.
[0209] In this embodiment, a hybrid prior optimization strategy based on the direct prior of the reference video and the distilled prior of the diffusion model determines the total loss value of the dynamic modeling expression and supervises and optimizes the dynamic information generation model based on the loss value, thereby effectively improving the dynamic information generation effect of the dynamic information generation model and ensuring the geometric and texture quality of the generated dynamic three-dimensional video and the dynamic continuity.
[0210] In an optional embodiment, if Fig.13 As shown in the figure, the method of generating dynamic 3D video from text input proposed in the present disclosure is compared with two other methods MAV3D [2] and 4d-fy [4] in generating dynamic 3D video from text. Compared with MAV3D, the method of generating dynamic 3D video from text input proposed in the present disclosure has a significant advantage in generation quality. Compared with 4d-fy, the results displayed by the present disclosure are more realistic due to the introduction of direct priors from pre-generated reference videos. Some results of 4d-fy have unreasonable parts, for example, the third leg of the framed panda in the picture grows out from the back, and a phantom marked with an orange box appears in the smoke.
[0211] In an optional embodiment, if Fig.14As shown, the method for generating dynamic 3D video from text input proposed in the embodiment of the present disclosure generates a dynamic 3D video from text data input, showing the diversity of results. For example, Figure 6 If the Chinese text data is "A steaming cup of coffe", a 3D dynamic video that meets the text description from different perspectives will be given; if the text data is "A panda singing", a 3D dynamic video that meets the text description from different perspectives will be given.
[0212] In an alternative embodiment, Fig.15 The method of generating dynamic three-dimensional video from text input provided by the present invention is applied to the task of generating dynamic 3D video from monocular video and compared with the existing 4DGen method and Consistent4D. Fig.15 The leftmost column shows the corresponding input frames. The method for generating dynamic 3D video by text input provided by the present disclosure well maintains texture under new viewing angles and produces more vivid results.
[0213] In an alternative embodiment, Fig.16 The ablation experiment of the main modules involved in the method of generating dynamic 3D video from text input used in the present disclosure is demonstrated to verify the role of these modules. Fig.16 In the leftmost figure, w / o topology network, the 4D dynamic representation loses some modeling power, resulting in noise in the results. The lack of a direct prior on the reference video leads to uncontrollable optimization and blurry results. Fig.16 In the CNN, w / o prior-switching, the direct prior is dominant, which makes the quality of the generated reference video affect the result and is unsatisfactory. The lack of 3D score distillation sampling loss function will affect the 3D consistency (i.e. Fig.16 , w / o 3D SDS). For example, in some views, the panda has three legs. The lack of a fractional distillation sampling loss function is similar to the effect of the lack of a priori switching strategy, because the generated reference video guides the optimization, which restricts the generation and leads to poor results. The method of the present disclosure can achieve the best results in terms of appearance and dynamics. In the example of melting ice cream, compared with other alternative methods (i.e., methods that remove (ablate) certain modules based on the method of the present disclosure), the full version of the method of the present disclosure generates melting ice cream with a clearer appearance and more realistic dripping effects.
[0214] It should be understood that although Figure 2 , Figure 4-Figure 6 , Figure 8-Figure 12The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , Figure 4-Figure 6 , Figure 8-Figure 12 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0215] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.
[0216] Fig.17 is a block diagram of a device for generating dynamic three-dimensional video by text input according to an exemplary embodiment. Fig.17 The device includes an acquisition unit 1702, a generation unit 1704, a determination unit 1706 and an optimization generation unit 1708.
[0217] The acquisition unit 1702 is configured to acquire text data and generate a reference video satisfying the description content of the text data based on the text data.
[0218] The generating unit 1704 is configured to use the text data and the reference picture in the reference video as constraints to generate a static three-dimensional model that satisfies the text data description and the reference picture.
[0219] The determining unit 1706 is configured to determine a dynamic information generation model based on the static three-dimensional model.
[0220] The optimization generation unit 1708 is configured to optimize the supervision of the dynamic information generation model based on a hybrid prior optimization strategy, and generate a three-dimensional video corresponding to the text data based on the dynamic information generation model after optimization supervision; the hybrid prior optimization strategy includes a direct prior of the reference video and a distillation prior of the diffusion model.
[0221] In an exemplary embodiment, the acquiring unit 1702 specifically includes:
[0222] a determination subunit configured to determine a text length of the text data;
[0223] A generating subunit is configured to generate a reference video satisfying the description content of the text data based on a text video generating algorithm when the text length satisfies the text length condition;
[0224] The expansion subunit is configured to expand the text data based on the large language model when the text length does not meet the text length condition, so that the text length meets the text length condition.
[0225] In an exemplary embodiment, the static three-dimensional model includes a static neural radiation field network; the static neural radiation field network includes a multi-resolution hash-coded feature grid and a shallow fully connected network; the generation unit 1704 specifically includes:
[0226] The sampling subunit is configured to determine an observation angle, generate a camera ray according to a camera parameter of the observation angle under the observation angle, and sample the camera ray to obtain target sampling point data;
[0227] The encoding subunit is configured to encode the data of the target sampling point based on the feature grid of the multi-resolution hash code to obtain the index feature of the target sampling point on the feature grid of the multi-resolution hash code in the three-dimensional scene;
[0228] The image generation subunit is configured to input the index features into a shallow fully connected network, determine the volume density and color value corresponding to the target sampling point, and obtain a multi-view image.
[0229] In an exemplary embodiment, the apparatus 1700 further includes:
[0230] The first supervision unit is configured to supervise the multi-view images rendered by the static neural radiation field network based on the joint fractional distillation sampling loss function; the joint fractional distillation sampling loss function includes a two-dimensional fractional distillation sampling loss function and a three-dimensional fractional distillation sampling loss function.
[0231] In an exemplary embodiment, the first supervision unit comprises:
[0232] A first supervision subunit is configured to determine a first loss value between a rendered image at an observation angle and a noise image output by a two-dimensional diffusion model based on a two-dimensional fractional distillation sampling loss function;
[0233] A second supervision subunit is configured to determine a second loss value between a reference image under an observation perspective and a noise image output by the three-dimensional diffusion model based on a three-dimensional fractional distillation sampling loss function;
[0234] The joint supervision subunit is configured to perform rendering supervision on the rendered multi-view image based on the first loss value and the second loss value.
[0235] In an exemplary embodiment, the apparatus 1700 further includes:
[0236] A second supervision unit is configured to determine a third loss value between the multi-view picture and the reference picture, and a fourth loss value between the multi-view picture mask and the reference picture mask, respectively, based on the color loss function and the mask loss function;
[0237] The third supervision unit is configured to perform rendering supervision on the multi-view image based on the first loss value, the second loss value, the third loss value and the fourth loss value.
[0238] In an exemplary embodiment, the dynamic information generation model includes a dynamic feature grid, a deformation field network, a topological network and a static three-dimensional model, and the optimization generation unit 1708 includes:
[0239] The sampling subunit is configured to determine an observation angle, generate a camera ray according to a camera parameter of the observation angle under the observation angle, and sample the camera ray to obtain target sampling point data; the target sampling point data is a feature vector including the target sampling point coordinates and time;
[0240] A first processing output subunit is configured to input the data of the target sampling point into the deformation field network through the dynamic feature grid, and output a displacement vector corresponding to the target sampling point;
[0241] A generating subunit is configured to update the data of the target sampling point based on the displacement vector, and encode the updated data of the target sampling point based on the multi-resolution hash-coded feature grid in the static three-dimensional model to obtain an index feature of the target sampling point on the multi-resolution hash-coded feature grid in the three-dimensional scene;
[0242] A second processing output subunit is configured to input the target sampling point data into the topological network through the dynamic feature grid and output a topological vector;
[0243] The determination subunit is configured to input the index features and the topological vector into a shallow fully connected network of the static three-dimensional model, determine the volume density and color value corresponding to the target sampling point, and obtain the three-dimensional video.
[0244] In an exemplary embodiment, the direct prior of the reference video is used for the calculation of the color loss function, the mask loss function and the optical flow loss function, and the optimization generation unit 1708 includes:
[0245] a fourth supervision unit configured to sample the three-dimensional video and supervise the dynamic information generation model based on the fractional distillation sampling loss function of the preset Vincent video diffusion model and the three-dimensional video;
[0246] The fifth supervision unit is configured to determine an observation angle, and perform rendering supervision on the dynamic information generation model under the observation angle through a color loss function, a mask loss function, and an optical flow loss function.
[0247] In an exemplary embodiment, the fourth supervision unit includes:
[0248] The sampling subunit is configured to sample the three-dimensional video, and perform noise addition and noise removal processing on the sampled three-dimensional video based on the Vincent video diffusion model to obtain a reconstructed video;
[0249] The third supervision subunit is configured to determine a fifth loss value between the rendered video and the reconstructed video based on a preset video score distillation sampling loss function.
[0250] In an exemplary embodiment, the fifth supervisory unit comprises:
[0251] The fourth supervision subunit is configured to determine a sixth loss value between the three-dimensional video and each frame image in the reference video, and a seventh loss value between the three-dimensional video mask and each frame image mask in the reference video, respectively, through a color loss function and a mask loss function;
[0252] The fifth supervision subunit is configured to map the scene flow predicted by the deformation field network in the dynamic information generation model to a two-dimensional image plane using camera parameters, and use the optical flow prediction network to predict the optical flow of adjacent frames of the video, calculate the optical flow loss function between the projected scene flow and the predicted optical flow, and obtain an eighth loss value.
[0253] In an exemplary embodiment, the apparatus 1700 further includes:
[0254] A first adding unit is configured to add a three-dimensional fractional distillation sampling loss function to each frame of the reference video image;
[0255] A loss function construction unit is configured to add a total variation loss function on the image domain, and determine a total optimization loss function corresponding to the dynamic modeling expression based on a video score distillation sampling loss function, a three-dimensional score distillation sampling loss function, a total variation loss function, a color loss function, a mask loss function, and an optical flow loss function;
[0256] The supervised optimization unit is configured to substitute the loss value of each loss function, determine the total loss value of the dynamic modeling expression, and perform supervised optimization on the dynamic modeling expression based on the total loss value.
[0257] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0258] Fig.18 1 is a block diagram of an electronic device 1800 for generating three-dimensional video according to an exemplary embodiment. For example, the electronic device 1800 may be a server. Fig.18 , the electronic device 1800 includes a processing component 1820, which further includes one or more processors, and a memory resource represented by a memory 1822 for storing instructions executable by the processing component 1820, such as an application. The application stored in the memory 1822 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1820 is configured to execute the instructions to perform the above method.
[0259] The electronic device 1800 may further include a power supply component 1824 configured to perform power management of the electronic device 1800, a wired or wireless network interface 1826 configured to connect the electronic device 1800 to a network, and an input / output (I / O) interface 1828. The electronic device 1800 may operate based on an operating system stored in the memory 1822, such as Windows 18 18erver, Mac O18 X, Unix, Linux, FreeB18D or the like.
[0260] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1822 including instructions, and the above instructions can be executed by a processor of the electronic device 1800 to complete the above method. The storage medium can be a computer-readable storage medium, for example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0261] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions, and the instructions can be executed by a processor of the electronic device 1800 to complete the above method.
[0262] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments, which will not be described one by one here.
[0263] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0264] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for generating dynamic three-dimensional video by text input, characterized in that: The method comprises: Acquire text data, and generate a reference video satisfying the description content of the text data based on the text data; Using the text data and the reference picture in the reference video as constraints, generating a static three-dimensional model that satisfies the description of the text data and the reference picture; Based on the static three-dimensional model, determining a dynamic information generation model; The dynamic information generation model is optimized and supervised based on a hybrid prior optimization strategy, and a three-dimensional video corresponding to the text data is generated based on the optimized and supervised dynamic information generation model; the hybrid prior optimization strategy includes a direct prior of a reference video and a distilled prior of a diffusion model.
2. The method for generating dynamic three-dimensional video by text input according to claim 1, characterized in that: The step of generating a reference video satisfying the description content of the text data based on the text data includes: Determining the text length of the text data; In the case where the text length meets the text length condition, generating a reference video that meets the description content of the text data based on a text video generation algorithm; When the text length does not satisfy the text length condition, the text data is expanded based on a large language model so that the text length satisfies the text length condition.
3. The method for generating dynamic three-dimensional video by text input according to claim 1, characterized in that: The static three-dimensional model includes a static neural radiation field network; the static neural radiation field network includes a multi-resolution hash-coded feature grid and a shallow fully connected network; the text data and the reference picture in the reference video are used as constraints to generate a static three-dimensional model that satisfies the text data description and the reference picture, including: Determine an observation angle, generate a camera ray according to a camera parameter of the observation angle under the observation angle, and sample the camera ray to obtain target sampling point data; Encoding the data of the target sampling point based on the feature grid of the multi-resolution hash code to obtain index features of the target sampling point on the feature grid of the multi-resolution hash code in a three-dimensional scene; The index feature is input into the shallow fully connected network, the volume density and color value corresponding to the target sampling point are determined, and a multi-view image is obtained.
4. The method for generating dynamic three-dimensional video by text input according to claim 3, characterized in that: The method further comprises: Based on the joint fractional distillation sampling loss function, the multi-view image rendered by the static neural radiation field network is supervised; the joint fractional distillation sampling loss function includes a two-dimensional fractional distillation sampling loss function and a three-dimensional fractional distillation sampling loss function.
5. The method for generating dynamic three-dimensional video by text input according to claim 4, characterized in that: The method of supervising the multi-view image rendered by the static neural radiation field network based on the joint fractional distillation sampling loss function includes: Determining a first loss value between the rendered image at the observation angle and the noise image output by the two-dimensional diffusion model based on the two-dimensional fractional distillation sampling loss function; Determining a second loss value between the reference image at the observation angle and the noise image output by the three-dimensional diffusion model based on the three-dimensional fractional distillation sampling loss function; The rendered multi-view image is supervised based on the first loss value and the second loss value.
6. The method for generating dynamic three-dimensional video by text input according to claim 5, characterized in that: The method further comprises: Based on the color loss function and the mask loss function, respectively determine a third loss value between the multi-view picture and the reference picture, and a fourth loss value between the multi-view picture mask and the reference picture mask; Based on the first loss value, the second loss value, the third loss value and the fourth loss value, rendering supervision is performed on the multi-view image.
7. The method for generating dynamic three-dimensional video by text input according to claim 1, characterized in that: The dynamic information generation model includes a dynamic feature grid, a deformation field network, a topological network and the static three-dimensional model. The dynamic information generation model based on the optimized supervision generates a three-dimensional video corresponding to the text data, including: Determine an observation angle, generate a camera ray according to a camera parameter of the observation angle under the observation angle, and sample the camera ray to obtain target sampling point data; the target sampling point data is a feature vector including the target sampling point coordinates and time; Inputting the data of the target sampling point into the deformation field network through the dynamic feature grid, and outputting the displacement vector corresponding to the target sampling point; updating the data of the target sampling point based on the displacement vector, and encoding the updated data of the target sampling point based on the multi-resolution hash-coded feature grid in the static three-dimensional model to obtain an index feature of the target sampling point on the multi-resolution hash-coded feature grid in the three-dimensional scene; Inputting the target sampling point data into the topological network through the dynamic feature grid, and outputting a topological vector; The index feature and the topological vector are input into a shallow fully connected network of the static three-dimensional model, and the volume density and color value corresponding to the target sampling point are determined to obtain a three-dimensional video.
8. The method for generating dynamic three-dimensional video by text input according to claim 1, characterized in that: The direct prior of the reference video is used for calculating the color loss function, the mask loss function and the optical flow loss function, and the optimization supervision of the dynamic information generation model based on the hybrid prior optimization strategy includes: Sampling the three-dimensional video, and supervising the dynamic information generation model based on the fractional distillation sampling loss function of the preset Vincent video diffusion model and the three-dimensional video; An observation angle is determined, and at the observation angle, rendering supervision is performed on the dynamic information generation model through the color loss function, the mask loss function, and the optical flow loss function.
9. The method for generating dynamic three-dimensional video by text input according to claim 8, characterized in that: The sampling of the three-dimensional video and supervising the dynamic information generation model based on the fractional distillation sampling loss function of the preset Vincent video diffusion model and the three-dimensional video include: Sampling the three-dimensional video, and performing noise addition and noise removal processing on the sampled three-dimensional video based on the Vincent video diffusion model to obtain a reconstructed video; Based on a preset video score distillation sampling loss function, a fifth loss value between the rendered video and the reconstructed video is determined.
10. The method for generating dynamic three-dimensional video by text input according to claim 8, characterized in that: The rendering supervision of the dynamic information generation model by using the color loss function, the mask loss function and the optical flow loss function includes: Determine, by means of the color loss function and the mask loss function, a sixth loss value between the three-dimensional video and each frame image in the reference video, and a seventh loss value between the three-dimensional video mask and each frame image mask in the reference video; The scene flow predicted by the deformation field network in the dynamic information generation model is mapped to a two-dimensional image plane using camera parameters, and the optical flow prediction network is used to predict the optical flow of adjacent frames of the video, and the optical flow loss function between the projected scene flow and the predicted optical flow is calculated to obtain an eighth loss value.
11. The method for generating dynamic three-dimensional video by text input according to claim 9, characterized in that: The method further comprises: Adding the three-dimensional fractional distillation sampling loss function to each frame of the reference video image; Adding a total variation loss function in the image domain, and determining a total optimization loss function corresponding to the dynamic modeling expression based on the video fractional distillation sampling loss function, the three-dimensional fractional distillation sampling loss function, the total variation loss function, the color loss function, the mask loss function and the optical flow loss function; Substitute the loss value of each loss function to determine the total loss value of the dynamic modeling expression, and perform supervised optimization on the dynamic modeling expression based on the total loss value.
12. A device for generating dynamic three-dimensional video by text input, characterized in that: The device comprises: an acquisition unit configured to acquire text data and generate a reference video satisfying the description content of the text data based on the text data; A generating unit is configured to generate a static three-dimensional model satisfying the description of the text data and the reference picture by taking the text data and the reference picture in the reference video as constraints; A determination unit is configured to determine a dynamic information generation model based on the static three-dimensional model; The optimization generation unit is configured to perform optimization supervision on the dynamic information generation model based on a hybrid prior optimization strategy, and generate a three-dimensional video corresponding to the text data based on the dynamic information generation model after optimization supervision; the hybrid prior optimization strategy includes a direct prior of a reference video and a distillation prior of a diffusion model.
13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for generating dynamic three-dimensional video by text input as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for generating dynamic three-dimensional video by text input according to any one of claims 1 to 11.
15. A computer program product, comprising instructions, characterized in that: When the instructions are executed by a processor of an electronic device, the electronic device is enabled to execute the method for generating dynamic three-dimensional video by text input as described in any one of claims 1 to 11.
Citation Information
Cited By
Four-dimensional scene generation method and electronic equipment
CN121190684A
A method for generating four-dimensional scenes and an electronic device
CN121190684B
