Three-dimensional object generation method, device, equipment, and storage medium

By obtaining text and images, determining the initial model and training based on the loss function, a consistent three-dimensional object that conforms to the shape of the text and image is finally generated, which solves the problem of insufficient controllability of the three-dimensional object generation results in the existing technology and achieves accurate and reliable three-dimensional objects. control.

CN117315149BActive Publication Date: 2024-09-17BEIJING ZHIXIANG FUTURE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311248957.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2024-09-17
Estimated Expiration
2043-09-26

AI Technical Summary

Technical Problem

Existing text-based 3D object generation methods cannot precisely control the geometry of the object, resulting in less controllable generation results.

Method used

By obtaining text and images, the initial model is determined and trained based on the loss function, and finally a consistent three-dimensional object that conforms to the text description and image shape is generated.

Benefits of technology

It achieves precise controllability of three-dimensional objects, and the generated objects not only conform to the text description, but also are consistent with the shape depicted in the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117315149B
    Figure CN117315149B
Patent Text Reader

Abstract

The present application provides a method, device, equipment, and storage medium for generating a three-dimensional object. The method obtains text and a first image; determines an initial model for generating a three-dimensional object; determines a loss function based on the text and the first image; trains the initial model based on the loss function to obtain a final model; and generates a three-dimensional object based on the final model. The method provided in the present application generates a three-dimensional object based on text and an image, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional modeling technology, and in particular to a three-dimensional object generation method, device, equipment, and storage medium. Background Art

[0002] The technology of generating 3D objects based on text is one of the basic technologies in the fields of computer vision, computer graphics, and multimedia. Given a natural language description text as input, Rongguang 3D object generation technology automatically generates a 3D object corresponding to the input text.

[0003] The basic technologies for generating 3D objects based on text can be divided into three categories: methods based on 3D generation models, methods based on 2D pre-trained text-image matching models, and methods based on 2D pre-trained text-image generation models.

[0004] The first type of method uses a 3D generative model (such as a 3D generative adversarial network) to predict the 3D object corresponding to the input text by learning a large amount of text descriptions and corresponding 3D object data. The second type of method uses a pre-trained text-image matching model (such as the CLIP (Contrastive Language-Image Pre-Training) model) to directly optimize a 3D object represented by NeRF (Neural Radiance Field). During the optimization process, a differentiable rendering method is used to render a 2D image, and the rendered image is constrained to match the input text through a pre-trained text-image matching model, so that NeRF is optimized in the direction of the text description, and finally a 3D object that conforms to the text description is generated. The third type of method is similar to the second type of method in concept, but uses a pre-trained text-image generation diffusion model (StableDiffusion) and score distillation sampling (Score Distillation Sampling) to optimize NeRF to make it conform to the content of the input text description.

[0005] In the existing text-based 3D object generation, the generation method can only generate corresponding three-dimensional objects based on the input natural language text, but cannot further finely control the geometric shape of the object, making the generated results less controllable. Summary of the invention

[0006] In order to solve one of the above-mentioned technical defects, the present application provides a three-dimensional object generation method, device, equipment, and storage medium.

[0007] In a first aspect of the present application, a method for generating a three-dimensional object is provided, the method comprising:

[0008] Get the text and the first image;

[0009] Determine an initial model for generating a three-dimensional object;

[0010] Determine a loss function based on the text and the first image;

[0011] According to the loss function, train the initial model to obtain the final model;

[0012] Generate a three-dimensional object based on the final model.

[0013] Optionally, determining to generate an initial model of the three-dimensional object includes:

[0014] Determine the light rays starting from the current camera optical center position to any viewing angle direction, with time as the independent variable;

[0015] According to the light, the color value of each pixel is determined to generate the initial model of the three-dimensional object.

[0016] Optionally, determining a loss function according to the text and the first image includes:

[0017] determining a second image generated by the initial model;

[0018] Obtain a third image based on the text and the first image;

[0019] Based on the first image, the second image, and the third image, a loss function is determined.

[0020] Optionally, determining a loss function based on the first image, the second image, and the third image includes:

[0021] Based on the second image and the third image, determining an initial loss function;

[0022] Determine a modified loss function based on the first image and the second image;

[0023] The initial loss function is superimposed with the modified loss function to obtain the loss function.

[0024] Optionally, based on the second image and the third image, determining an initial loss function includes:

[0025] calculating a difference between the third image and the second image;

[0026] The initial loss function is determined based on the expectation of the derivative of the difference.

[0027] Optionally, determining a modified loss function according to the first image and the second image includes:

[0028] extracting a first feature of the first image and a second feature of the second image;

[0029] According to the similarity between the first feature and the second feature, a modified loss function is obtained.

[0030] Optionally, the similarity between the first feature and the second feature is determined based on the transposition of the second feature and the first feature.

[0031] In a second aspect of the present application, a three-dimensional object generation device is provided, the device comprising:

[0032] An acquisition module, used for acquiring text and a first image;

[0033] A first determination module, used to determine an initial model for generating a three-dimensional object;

[0034] A second determination module, used to determine a loss function according to the text and the first image acquired by the acquisition module;

[0035] A training module, used to train the initial model determined by the first determination module according to the loss function determined by the second determination module to obtain a final model;

[0036] The generation module is used to generate a three-dimensional object according to the final model obtained by the training module.

[0037] In a third aspect of the present application, an electronic device is provided, including:

[0038] Memory;

[0039] Processor; and

[0040] Computer programs;

[0041] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect above.

[0042] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the method described in the first aspect above.

[0043] The present application provides a method, device, equipment, and storage medium for generating a three-dimensional object. The method obtains text and a first image; determines an initial model for generating a three-dimensional object; determines a loss function based on the text and the first image; trains the initial model based on the loss function to obtain a final model; and generates a three-dimensional object based on the final model. The method provided in the present application generates a three-dimensional object based on text and an image, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 A schematic diagram of a flow chart of a three-dimensional object generation method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of an implementation model of a three-dimensional object generation method provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of a three-dimensional object generation device provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0050] In the process of implementing the present application, the inventors discovered that in the existing text-based 3D object generation, the generation method can only generate corresponding three-dimensional objects based on the input natural language text, but cannot further finely control the geometric shape of the object, thus making the generated results not controllable enough.

[0051] In view of the above problems, the embodiments of the present application provide a method, device, equipment, and storage medium for generating a three-dimensional object. The method obtains text and a first image; determines an initial model for generating a three-dimensional object; determines a loss function based on the text and the first image; trains the initial model based on the loss function to obtain a final model; and generates a three-dimensional object based on the final model. The method provided in the present application generates a three-dimensional object based on text and an image, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable.

[0052] See also Figure 1 The implementation process of the three-dimensional object generation method provided in this embodiment is as follows:

[0053] 101, obtain text and a first image.

[0054] The text and the first image both describe the three-dimensional object, such as the natural language prompt text y and the sketch image I provided by the user. S .

[0055] Here, the "first" in the first image is only used to distinguish other images and has no other substantive meaning. That is, the image describing the three-dimensional object is recorded as the first image. The image obtained by the current model in the subsequent model training process is recorded as the second image, and the image obtained by the text and the first image is recorded as the third image.

[0056] The method provided in this embodiment generates a final three-dimensional object through the text and image used to describe the three-dimensional object obtained in step 101, so that the final generated three-dimensional object not only conforms to the attributes and features described in the text, but also is consistent with the geometric shape depicted in the image (such as a sketch).

[0057] 102, determining and generating an initial model of a three-dimensional object.

[0058] In this step, the light rays starting from the optical center position of the current camera in any viewing direction may be determined first, and then the color value of each pixel may be determined based on the light rays to determine the initial model of the generated three-dimensional object.

[0059] Among them, light takes time as the independent variable.

[0060] In the specific implementation, the initial model of this step is implemented based on NeRF (Neural Radiance Field), that is, NeRF is used to implicitly represent three-dimensional objects.

[0061] NeRF can be formally defined as a mapping function F θ :(p, d)→(c, σ), where p is any point in the 3D model, d is any view angle, c is the color value of any point, and σ is the radiation field intensity of the 3D object at view angle d. NeRF takes each 3D point p and view angle d as input and passes it through the neural network F θ The radiation field intensity σ and RGB color value c of the 3D point at this viewing angle are predicted. Based on the radiation field, an image can be synthesized by volume rendering.

[0062] Therefore, when determining the light rays starting from the current camera optical center position to any viewing angle direction, if the current camera optical center position is o, a light ray r(k)=o+kd can be obtained according to the optical center o and the viewing angle d direction, where r is the light ray and k is the time.

[0063] When determining the color value of each pixel point according to the light and determining the initial model of the three-dimensional object, the light can be emitted from the optical center o along the viewing angle d direction. According to the volume rendering principle, the color value of the pixel point rendered by the light is: Then the obtained color value The calculation model is determined as the initial model for generating the three-dimensional object, and then based on the loss function obtained in step 103, step 104 is used to The parameters in are trained to obtain the final model.

[0064] Among them, k n is the starting point of the light, k f is the end point of the light, W(k) is the cumulative transmittance of the light,

[0065] 103 , determining a loss function according to the text and the first image.

[0066] During the training process of the initial model obtained in step 102, the loss function provides an optimization direction for the model by comparing the difference between the predicted output and the actual output of the model, thereby obtaining the final model for generating the three-dimensional object.

[0067] The loss function in this step not only considers the traditional difference in text dimension when characterizing the difference, but also adds the difference in image dimension, that is, it considers the difference between the image output by the model and the image obtained in step 101 (that is, the first image), and then optimizes the model so that the three-dimensional object obtained by the final model not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable.

[0068] The implementation process of step 103 can be implemented based on the distillation sampling technology, wherein the implementation process of the distillation sampling technology adopts the existing process, and the specific implementation process of step 103 is as follows:

[0069] 103-1, determine the second image ∈ generated by the initial model.

[0070] After the initial model is obtained in step 102, an image at any viewing angle is rendered from NeRF by volume rendering. In order to distinguish it from other images, the image according to the initial model is recorded as the second image. For the convenience of description, the second image is abbreviated as ∈.

[0071] 103-2, obtain a third image ∈ according to the text and the first image φ (x k ; k, y, I s ).

[0072] Before this step, a training text-generated graph model (Stable Diffusion) will be trained. The text-generated graph model will generate corresponding images based on the input sketch and text. After the text-generated graph model is trained, the relevant parameters φ of the text-generated graph model will be obtained, and the weight w(k) will also be obtained. The weight takes time as the independent variable.

[0073] This step will be based on the text y and the first image I obtained in step 101. s , the image is obtained by the correlation parameter φ. In order to distinguish other images, the image obtained by the correlation parameter φ is recorded as the third image. For the convenience of description, the third image is simply recorded as ∈ φ (x k ; k, y, I s ), where x k is the independent variable.

[0074] x k can be rendered using the differentiable volume renderer g θ (π) renders the image obtained under the camera view angle π. Among them, θ is the parameter of the initial function. If the initial function is a NeRF-based function, then θ is the parameter of NeRF. In other words, the differentiable volume renderer g θ (π) Randomly initialize the initial function built based on NeRF with the parameters as the purpose, perform rendering operations on NeRF, and render the light under the camera perspective π pixel by pixel.

[0075] 103-3, determine a loss function based on the first image, the second image, and the third image.

[0076] Specifically,

[0077] 103-3-1, determining an initial loss function based on the second image and the third image.

[0078] In step 103-3-1, the difference between the third image and the second image is calculated, and the initial loss function is determined based on the expectation of the derivative of the difference.

[0079] The second image is the image obtained in step 103-1, and the third image is the image obtained in step 103-2. φ (x k ; k, y, I s ), then the difference between the third image and the second image is ∈ φ (x k ; k, y, I s )-∈. At the same time, when training the Wensheng graph model (StableDiffusion), the weight w(k) will be obtained. Therefore, based on w(k) and ∈ φ (x k ; k, y, I s )-∈ derivative to get the initial loss function L C-SDS ,Right now

[0080] E k,∈ [] is the expected function for time k and the image obtained by the model (i.e., the second image ∈).

[0081] Initial loss function L C-SDS The condition of the first image (i.e., the sketch) forces the rendered image (i.e., the second image) to be aligned with the sketch, so that the probability distribution of the rendered second image (e.g., the rendered image obtained based on NeRF) is further reduced by the sketch condition. Therefore, by using the initial loss function L C-SDS This ensures that the final model trained can obtain three-dimensional objects that are closely aligned with both the input text and the sketch.

[0082] 103-3-2, determining a corrected loss function based on the first image and the second image.

[0083] In order to further ensure that the generated 3D object is consistent with the input sketch in terms of geometry, we obtain the initial loss function L C-SDS Then we will modify the loss function L sketch Cross-perspective grass Figure 1 Cause constraints.

[0084] That is, in step 103-3-2, the first feature of the first image and the second feature of the second image are extracted, and a modified loss function is obtained according to the similarity between the first feature and the second feature.

[0085] The similarity between the first feature and the second feature is determined based on the transposition of the second feature and the first feature.

[0086] The specific implementation process is:

[0087] 1. Estimate the sketch G(x) of the NeRF rendered image (i.e., the second image) through the image-to-sketch conversion model G.

[0088] Among them, G() is the image to sketch conversion model.

[0089] In this process, a sketch G(x) of the image rendered by the current model (i.e., the second image) is generated, which is used for subsequent comparison with the sketch obtained in step 101 (i.e., the first image I s ) for comparison.

[0090] 2. Extract standardized image features of the estimated sketch and the input sketch through the image encoder E of the cross-modal text-image matching model CLIP (Contrastive Language-Image Pre-Training).

[0091] That is, at this time, the first feature E(I s ) and the second feature E(G(x)) of the sketch of the second image.

[0092] Here, E() is the image encoder of the cross-modal text-image matching model CLIP. The image encoder of CLIP has been trained with hundreds of millions of online images, enabling it to understand sketch modal images. On the other hand, it can capture consistent semantic-level representations between different perspectives.

[0093] At this time, the features of the sketch obtained in step 101 (ie, the first features) and the features of the sketch corresponding to the image generated by the model (ie, the second features) are obtained.

[0094] 3. By minimizing the cosine similarity between the normalized image features of the estimated sketch and the input sketch - E(G(x)) T E(I s ) represents the modified loss function L sketch (i.e. grass Figure 1 consistency constraints).

[0095] L sketch = -E(G(x)) T E(I s )

[0096] Where T is the transpose.

[0097] By modifying the loss function L sketch Can realize grass Figure 1 The consistency constraint is performed by minimizing the cosine similarity between the normalized image features of the estimated sketch (i.e., the sketch of the second image) and the input sketch (i.e., the first image).

[0098] 103-3-3, superimpose the initial loss function and the modified loss function to obtain the loss function.

[0099] In step 103-3-3, the initial loss function L obtained in step 103-3-1 is used. C-SDS The sketch-based conditional score distillation sampling of the representation and the modified loss function L obtained in step 103-3-2 sketch Characterization of grass Figure 1 The superposition of constraints leads to the final loss function L total .

[0100] L total =L C-SDS +L sketch

[0101] By L total The initial model is trained so that the three-dimensional objects represented by the model are consistent with both the content described in the input natural language text and the geometric shape depicted in the input sketch.

[0102] 104. According to the loss function, the initial model is trained to obtain the final model.

[0103] This step is a conventional model training process, such as the NeRF training process. It will not be elaborated here, and reference can be made to the existing model training methods. However, the loss function used in the training process is the loss function L determined in step 103. total .

[0104] 105, generating a three-dimensional object according to the final model.

[0105] Since the loss function L total is the initial loss function L C-SDS Sketch-based conditional fractional distillation sampling and revised loss function L for representation sketch Characterization of grass Figure 1 The superposition of the constraints is obtained through the loss function L total It can effectively ensure that the generated three-dimensional object accurately conforms to the content described and depicted by the input text and sketch, and then according to the loss function L total The final model obtained can generate a corresponding three-dimensional object model based on the natural language text description and sketch input simultaneously, thereby further improving the controllability of three-dimensional object generation.

[0106] The method provided in this embodiment can be based on Figure 2 The model structure shown is implemented.

[0107] The method provided in this embodiment obtains text and a first image; determines an initial model for generating a three-dimensional object; determines a loss function based on the text and the first image; trains the initial model based on the loss function to obtain a final model; generates a three-dimensional object based on the final model, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable.

[0108] Based on the same inventive concept of the three-dimensional object generation method, this embodiment provides a three-dimensional object generation device, see Figure 3 , the three-dimensional object generating device comprises:

[0109] The acquisition module 301 is used to acquire text and a first image.

[0110] The first determination module 302 is used to determine and generate an initial model of a three-dimensional object.

[0111] The second determination module 303 is used to determine the loss function according to the text and the first image acquired by the acquisition module 301.

[0112] The training module 304 is used to train the initial model determined by the first determination module 302 according to the loss function determined by the second determination module 303 to obtain a final model.

[0113] The generation module 305 is used to generate a three-dimensional object according to the final model obtained by the training module 304.

[0114] Optionally, the first determining module 302 includes:

[0115] The first determining unit is used to determine the light rays starting from the current camera optical center position to any viewing angle direction, where the light rays take time as an independent variable.

[0116] The second determining unit is used to determine the color value of each pixel point according to the light, and determine to generate an initial model of the three-dimensional object.

[0117] Optionally, the second determining module 303 includes:

[0118] The third determining unit is used to determine the second image generated by the initial model.

[0119] The fourth determining unit is used to obtain a third image according to the text and the first image.

[0120] The fifth determining unit is used to determine a loss function based on the first image, the second image and the third image.

[0121] Optionally, the fifth determining unit includes:

[0122] The first determination subunit is used to determine an initial loss function based on the second image and the third image.

[0123] The second determining subunit is used to determine a modified loss function according to the first image and the second image.

[0124] The superposition subunit is used to superimpose the initial loss function and the modified loss function to obtain the loss function.

[0125] Optionally, the first determination subunit is used to calculate the difference between the third image and the second image, and to determine an initial loss function according to an expectation of a derivative of the difference.

[0126] Optionally, the second determining subunit is used to extract the first feature of the first image and the second feature of the second image, and obtain a modified loss function according to the similarity between the first feature and the second feature.

[0127] Optionally, the similarity between the first feature and the second feature is determined based on the transposition of the second feature and the first feature.

[0128] The device provided in this embodiment obtains text and a first image; determines an initial model for generating a three-dimensional object; determines a loss function based on the text and the first image; trains the initial model based on the loss function to obtain a final model; generates a three-dimensional object based on the final model, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable.

[0129] Based on the same inventive concept of the three-dimensional object generation method, this embodiment provides an electronic device, such as Figure 4 As shown, it includes: a memory 401, a processor 402, and a computer program.

[0130] The computer program is stored in the memory 401 and is configured to be executed by the processor 402 to implement the above three-dimensional object generation method.

[0131] Specifically,

[0132] Get the text and the first image.

[0133] Determine the initial model for generating a three-dimensional object.

[0134] Based on the text and the first image, a loss function is determined.

[0135] According to the loss function, the initial model is trained to obtain the final model.

[0136] Generate a three-dimensional object based on the final model.

[0137] Optionally, determining to generate an initial model of the three-dimensional object includes:

[0138] Determine the light rays starting from the current camera optical center position in any viewing direction, with time as the independent variable.

[0139] According to the light, the color value of each pixel is determined to generate the initial model of the three-dimensional object.

[0140] Optionally, determining a loss function according to the text and the first image includes:

[0141] A second image generated by the initial model is determined.

[0142] A third image is obtained according to the text and the first image.

[0143] Based on the first image, the second image, and the third image, a loss function is determined.

[0144] Optionally, determining a loss function based on the first image, the second image, and the third image includes:

[0145] Based on the second image and the third image, an initial loss function is determined.

[0146] A modified loss function is determined based on the first image and the second image.

[0147] The initial loss function is superimposed with the modified loss function to obtain the loss function.

[0148] Optionally, based on the second image and the third image, determining an initial loss function includes:

[0149] The difference between the third image and the second image is calculated.

[0150] The initial loss function is determined based on the expectation of the derivative of the difference.

[0151] Optionally, determining a modified loss function according to the first image and the second image includes:

[0152] A first feature of the first image and a second feature of the second image are extracted.

[0153] According to the similarity between the first feature and the second feature, a modified loss function is obtained.

[0154] Optionally, the similarity between the first feature and the second feature is determined based on the transposition of the second feature and the first feature.

[0155] The electronic device provided by this embodiment has a computer program on which a processor executes to generate a three-dimensional object based on text and images, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is precise and controllable.

[0156] Based on the same inventive concept of the three-dimensional object generation method, this embodiment provides a computer-readable storage medium, and a computer program is stored thereon. The computer program is executed by a processor to implement the three-dimensional object generation method.

[0157] Specifically,

[0158] Get the text and the first image.

[0159] Determine the initial model for generating a three-dimensional object.

[0160] Based on the text and the first image, a loss function is determined.

[0161] According to the loss function, the initial model is trained to obtain the final model.

[0162] Generate a three-dimensional object based on the final model.

[0163] Optionally, determining to generate an initial model of the three-dimensional object includes:

[0164] Determine the light rays starting from the current camera optical center position in any viewing direction, with time as the independent variable.

[0165] According to the light, the color value of each pixel is determined to generate the initial model of the three-dimensional object.

[0166] Optionally, determining a loss function according to the text and the first image includes:

[0167] A second image generated by the initial model is determined.

[0168] A third image is obtained according to the text and the first image.

[0169] Based on the first image, the second image, and the third image, a loss function is determined.

[0170] Optionally, determining a loss function based on the first image, the second image, and the third image includes:

[0171] Based on the second image and the third image, an initial loss function is determined.

[0172] A modified loss function is determined based on the first image and the second image.

[0173] The initial loss function is superimposed with the modified loss function to obtain the loss function.

[0174] Optionally, based on the second image and the third image, determining an initial loss function includes:

[0175] The difference between the third image and the second image is calculated.

[0176] The initial loss function is determined based on the expectation of the derivative of the difference.

[0177] Optionally, determining a modified loss function according to the first image and the second image includes:

[0178] A first feature of the first image and a second feature of the second image are extracted.

[0179] According to the similarity between the first feature and the second feature, a modified loss function is obtained.

[0180] Optionally, the similarity between the first feature and the second feature is determined based on the transposition of the second feature and the first feature.

[0181] The computer-readable storage medium provided in this embodiment has a computer program on which a processor executes to generate a three-dimensional object based on text and images, so that the three-dimensional object not only conforms to the description of the text, but also is consistent with the shape depicted in the image, and the generated three-dimensional object is accurate and controllable.

[0182] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0183] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0184] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0185] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0186] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0187] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0188] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for generating a three-dimensional object, It is characterized in that The method comprises: Get the text and the first image; Determine a ray of light starting from the current camera optical center position in any viewing angle direction, wherein the ray of light takes time as an independent variable; determine the color value of each pixel point based on the ray of light, and determine to generate an initial model of a three-dimensional object; Determining a loss function based on the text and the first image; According to the loss function, the initial model is trained to obtain a final model; A three-dimensional object is generated according to the final model.

2. The method according to claim 1, It is characterized in that Determining a loss function according to the text and the first image includes: determining a second image generated by the initial model; Obtain a third image based on the text and the first image; Based on the first image, the second image, and the third image, a loss function is determined.

3. The method according to claim 2, It is characterized in that The determining of a loss function based on the first image, the second image, and the third image comprises: Determining an initial loss function based on the second image and the third image; Determining a modified loss function according to the first image and the second image; The initial loss function and the modified loss function are superimposed to obtain a loss function.

4. The method according to claim 3, It is characterized in that The determining of an initial loss function based on the second image and the third image comprises: calculating a difference between the third image and the second image; An initial loss function is determined based on the expectation of the derivative of the difference.

5. The method according to claim 3, It is characterized in that The step of determining a modified loss function according to the first image and the second image includes: extracting a first feature of the first image and a second feature of the second image; A modified loss function is obtained according to the similarity between the first feature and the second feature.

6. The method according to claim 5, It is characterized in that The similarity between the first feature and the second feature is determined based on the transposition of the second feature and the first feature.

7. A three-dimensional object generation device, It is characterized in that The device comprises: An acquisition module, used for acquiring text and a first image; A first determination module, used to determine an initial model for generating a three-dimensional object; A second determination module, used to determine a loss function according to the text and the first image acquired by the acquisition module; A training module, used to train the initial model determined by the first determining module according to the loss function determined by the second determining module to obtain a final model; A generation module, used to generate a three-dimensional object according to the final model obtained by the training module; Wherein, the first determination module includes: A first determining unit is used to determine a ray of light starting from the current camera optical center position in any viewing angle direction, with time being an independent variable of the ray of light; The second determining unit is used to determine the color value of each pixel point according to the light, and determine to generate an initial model of the three-dimensional object.

8. An electronic device, It is characterized in that include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 6.