Training method, device, equipment and medium for three-dimensional reconstruction model
By adding noise to the initial image and using the second deep learning model to remove noise and adjust parameters, the problem of insufficient viewing angles in 3D reconstruction technology is solved, and high-quality 3D reconstruction model generation is achieved.
Patent Information
- Application Number
- CN202311236381.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-09-22
AI Technical Summary
Existing 3D reconstruction technology requires capturing images of objects from multiple perspectives, making it difficult to obtain 360-degree images without blind spots under actual conditions, resulting in poor reconstruction quality.
By adding noise to the initial image generated by the first deep learning model, and using the second deep learning model to perform noise removal and parameter adjustment, three-dimensional reconstruction is achieved without the need for an image of the object to be reconstructed.
It improves the ability to generate three-dimensional reconstruction models, can generate target object images that comply with description information in the absence of complete perspective images, and improves the quality of reconstruction.
Smart Images

Figure CN117274491B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, specifically computer vision, augmented reality, virtual reality, deep learning and other technical fields, and can be applied to scenes such as the metaverse and digital humans, and in particular to a three-dimensional reconstruction model training method, a three-dimensional reconstruction model training device, an electronic device, a computer-readable storage medium and a computer program product. Background Art
[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0003] Three-dimensional reconstruction of objects is a hot branch in the field of computer vision. Existing methods can complete the three-dimensional reconstruction of the object by utilizing dense image data of the reconstructed object taken from various angles.
[0004] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0005] The present disclosure provides a training method for a three-dimensional reconstruction model, a training device for a three-dimensional reconstruction model, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to one aspect of the present disclosure, a training method for a three-dimensional reconstruction model is provided, including: determining descriptive information of a target object; generating an initial image using a first deep learning model, the initial image representing a prediction result of an image obtained by observing the target object from a specified target pose; adding noise to the initial image to obtain an image to be inferred; based on the descriptive information, inferring the image to be inferred using a second deep learning model to obtain an inference result, wherein the inference result can be used to remove noise from the image to be inferred and generate an image that conforms to the descriptive information; and adjusting parameters of the first deep learning model based on the noise and the inference result to obtain a three-dimensional reconstruction model corresponding to the target object that conforms to the descriptive information.
[0007] According to one aspect of the present disclosure, a training device for a three-dimensional reconstruction model is provided, comprising: a description information determination unit, configured to determine the description information of a target object; a first generation unit, configured to generate an initial image using a first deep learning model, the initial image representing a prediction result of an image obtained by observing the target object from a specified target pose; a noise adding unit, configured to add noise to the initial image to obtain an image to be inferred; a second generation unit, configured to infer the image to be inferred using a second deep learning model based on the description information to obtain an inference result, wherein the inference result can be used to remove noise from the image to be inferred and generate an image that conforms to the description information; and a parameter adjustment unit, configured to adjust the parameters of the first deep learning model based on the noise and the inference result to obtain a three-dimensional reconstruction model corresponding to the target object that conforms to the description information.
[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above method.
[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above method.
[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.
[0011] According to one or more embodiments of the present disclosure, noise is added to the initial image generated by the first deep learning model to obtain the image to be inferred, and the second deep learning model is used to generate an inference result that can be used to remove noise from the image to be inferred and generate an image that conforms to the input description information, and then the parameters of the first deep learning model are adjusted based on the noise and the inference result, so that the first deep learning model is trained using the image generation capability of the second deep learning model, so that the trained first deep learning model (i.e., the three-dimensional reconstruction model) can generate an image corresponding to the target object that conforms to the description information, thereby realizing three-dimensional reconstruction of the object to be reconstructed without the need for an image of the object to be reconstructed.
[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0014] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;
[0015] Figure 2 A flowchart of a method for training a three-dimensional reconstruction model according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 3 A flowchart of generating an initial image using a first deep learning model according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 4 A flowchart of performing reasoning on a to-be-reasoned image using a second deep learning model according to an exemplary embodiment of the present disclosure is shown;
[0018] Figure 5 A flowchart of performing reasoning on a to-be-reasoned image using a second deep learning model according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 6 A flowchart of performing reasoning on a to-be-reasoned image using a second deep learning model according to an exemplary embodiment of the present disclosure is shown;
[0020] Figure 7 A flowchart of encoding an image to be inferred using a first encoding subnetwork according to an exemplary embodiment of the present disclosure is shown;
[0021] Figure 8 A structural block diagram of a training device for a three-dimensional reconstruction model according to an exemplary embodiment of the present disclosure is shown; and
[0022] Fig. 9 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.
[0025] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.
[0026] In the related art, when performing three-dimensional reconstruction, some implementations need to provide images of the object to be reconstructed taken from various perspectives. However, due to the limitations of practical conditions, it is often difficult to obtain 360-degree images without blind spots for reconstruction.
[0027] To solve the above problems, the present invention adds noise to the initial image generated by the first deep learning model to obtain the image to be inferred, and uses the second deep learning model to generate an inference result that can be used to remove noise from the image to be inferred and generate an image that conforms to the input description information, and then adjusts the parameters of the first deep learning model based on the noise and the inference result, thereby realizing the training of the first deep learning model using the image generation capability of the second deep learning model, so that the trained first deep learning model (i.e., the three-dimensional reconstruction model) can generate an image corresponding to the target object that conforms to the description information, thereby realizing three-dimensional reconstruction of the object to be reconstructed without the need for an image of the object to be reconstructed.
[0028] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0029] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0030] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the execution of a training method for a three-dimensional reconstruction model.
[0031] In some embodiments, server 120 may also provide other services or software applications that may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) network.
[0032] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
[0033] The user can use client devices 101, 102, 103, 104, 105 and / or 106 to perform human-computer interaction. The client device can provide an interface that enables the user of the client device to interact with the client device. The client device can also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.
[0034] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.
[0035] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0036] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0037] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0038] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0039] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.
[0040] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the data repository used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the database used by the server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to a command.
[0041] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.
[0042] Figure 1The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0043] According to one aspect of the present disclosure, a training method for a three-dimensional reconstruction model is provided. Figure 2 As shown, the training method of the three-dimensional reconstruction model includes: step S201, determining the description information of the target object; step S202, using the first deep learning model to generate an initial image, the initial image representing the prediction result of the image obtained by observing the target object from a specified target posture; step S203, adding noise to the initial image to obtain the image to be inferred; step S204, based on the description information, using the second deep learning model to infer the image to be inferred to obtain an inference result, wherein the inference result can be used to remove noise from the image to be inferred and generate an image that meets the description information; and step S205, based on the noise and the inference result, adjusting the parameters of the first deep learning model to obtain a three-dimensional reconstruction model corresponding to the target object that meets the description information.
[0044] Therefore, by adding noise to the initial image generated by the first deep learning model to obtain the image to be inferred, and using the second deep learning model to generate an inference result that can be used to remove noise from the image to be inferred and generate an image that conforms to the input description information, and then adjusting the parameters of the first deep learning model based on the noise and the inference result, it is possible to train the first deep learning model using the image generation capability of the second deep learning model, so that the trained first deep learning model (i.e., the three-dimensional reconstruction model) can generate an image corresponding to the target object that conforms to the description information, thereby realizing three-dimensional reconstruction of the object to be reconstructed without the need for an image of the object to be reconstructed.
[0045] In some embodiments, the target object is a predetermined object that needs to be 3D reconstructed. The target object can be a human body, or other specific objects, such as a cup, a table, a car, etc. In this disclosure, the technical solution will be described using the human body as an example of the target object, but it is not intended to limit the specific category of the target object.
[0046] The description information of the target object may include information describing the category, attributes, appearance, etc. of the target object. In an embodiment where the target object is a human body, the description information may include relevant information about the posture and appearance characteristics of the human body.
[0047] The training goal of the first deep learning model corresponding to the target object is to generate a high-quality new perspective image based on a given pose (i.e., camera pose), that is, an accurate prediction result of the image obtained by observing the target object from the target pose. The first deep learning model (i.e., the 3D reconstruction model to be trained) can generate the corresponding image, but the quality is poor.
[0048] The target pose may be randomly determined or manually determined, corresponding to any position and posture (viewing angle) of observing the target object. In some embodiments, multiple target poses may be specified (for example, all poses that can observe the target object without blind spots), and the first deep learning model may be used to generate initial images corresponding to each pose, and then the first deep learning model may be trained based on these initial images using steps S203-S205 to obtain a three-dimensional reconstructed model. In some embodiments, the target pose may be iteratively determined and the corresponding initial image may be generated, and the training of the second deep learning model may be iteratively completed.
[0049] According to some embodiments, the first deep learning model and the three-dimensional reconstruction model obtained after training the first deep learning model can be based on a neural radiance field. The neural radiance field is a computer vision technology used to generate high-quality three-dimensional reconstruction models. It uses deep learning technology to extract the geometric shape and texture information of the object from images of multiple perspectives, and then uses this information to generate a continuous three-dimensional radiation field, so that the results obtained by observing the three-dimensional model from any angle (e.g., posture) can be obtained.
[0050] In some embodiments, Figure 3 As shown, step S202, generating an initial image using the first deep learning model may include: step S301, for each pixel in the initial image to be generated, determining, based on the first deep learning model, the voxel density and color of each of the multiple voxels on the ray corresponding to the pixel; and step S302, determining the pixel value of the pixel based on the voxel density and color of each of the multiple voxels on the ray corresponding to the pixel.
[0051] Therefore, by using the neural radiation field as the first deep learning model, it is possible to eventually train a high-quality and high-fidelity three-dimensional reconstruction model.
[0052] In some embodiments, the second deep learning model may be a diffusion model, or may be considered as a U-Net in the diffusion model. The diffusion model may include two processes: a forward diffusion process and a reverse reasoning process.
[0053] In the forward diffusion process, a real image x0 is given, and a preset probability distribution (for example, Gaussian distribution) noise is added to it by accumulating a preset value T times to obtain x1, x2…x T , the process can be expressed as q(x t |x t-1 Here, a series of preset parameters of the preset probability distribution (for example, the hyperparameters of the Gaussian distribution variance) are given. Since each moment t in the forward process is only related to the moment t-1, it can also be regarded as a Markov process. The specific formula is as follows:
[0054]
[0055] Among them, α t =1-β t , In the forward diffusion process, as t increases, x t is getting closer and closer to pure noise. When T approaches infinity, x T is a completely Gaussian noise. In practice, β t It increases with t, that is, β1<β2<…<β t Through a series of derivations, x can be quickly obtained from x0 and β. t The specific formula is as follows:
[0056]
[0057] in,
[0058] The forward diffusion process can be considered as a noise-adding process, and the reverse reasoning process can be considered as a denoising inference process. When training a diffusion model, it is necessary to first perform forward diffusion noise addition on the original image, and then use the diffusion model to perform reverse reasoning denoising, and make the model output result as close as possible to the result obtained in the forward diffusion process.
[0059] It should be noted that the inference of the inference image to obtain an image with completely eliminated noise is achieved through multiple iterations. t |x t-1 ), we can choose from a completely preset probability distribution (for example, Gaussian distribution ) restores the original image distribution x0 (or a new image that meets the additional conditions). However, since it is not possible to simply infer q(x t |x t-1 ), so we can use the second deep learning model (with parameter θ, and U-Net structure) to predict such an inverse distribution p θ , thus achieving the purpose of denoising.
[0060] In some embodiments, for an image to be inferred with a time step of t (i.e., an image obtained by adding noise t times), an inverse distribution p can be predicted. θ (e.g., Gaussian distribution), thereby achieving the purpose of denoising.
[0061]
[0062] Among them, μ θ (x t ,t) refers to the mean of the image after inference, x t is the image to be inferred with time step t, and the variance can be directly used The difference between the image to be inferred and the intermediate noise image calculated based on the preset parameters of the preset probability distribution can be expressed as:
[0063]
[0064] Among them, x t is the image to be inferred with time step t, z θ (x t ,t) is the deep learning model based on the image to be inferred x t (or fused image) and the inference result obtained by the number of time steps t.
[0065] When using a trained diffusion model to generate a new image based on an existing original image, it is necessary to first perform forward diffusion to add noise to the original image, then use the diffusion model to perform reverse reasoning to obtain a prediction result for the noise, and use the prediction result to denoise the original image to obtain a new image that is related to the original image (for example, contains the same object, content or theme) and conforms to the description information of the target object.
[0066] The diffusion model may also receive description information of an image to be generated, so that the generated image satisfies the description information. In some embodiments, the image to be inferred with noise and the description information may be input into the second deep learning model to obtain an inference result that can be used for denoising and can also make the final image satisfy the description information. The image with noise removed and meeting the description information may be obtained by subtracting the inference result from the image to be inferred.
[0067] In the method disclosed in the present invention, it is not necessary to obtain the final generated new image, but only the inference result generated by the second deep learning model, that is, the predicted result of the noise added to the initial image. Then, in step S205, the first deep learning model can be trained based on the inference result and the actual added noise (for example, based on the loss value of the difference between the two). In this way, when the original image quality is poor (for example, an image generated by an untrained neural radiation field), the image of the trained diffusion model can be used to generate an inference result that can be used to obtain a high-quality image, and the parameters of the first deep learning network are adjusted based on the inference result, so that the trained first deep learning network can output higher quality images, thereby improving the three-dimensional reconstruction capability of the first deep learning network.
[0068] Return to step S204. The diffusion model can receive description information in image format and generate a new image with the received image as a reference. In some embodiments, the first deep learning model generates an initial image with a corresponding target pose, and the initial image can represent the prediction result of the image obtained by observing the target object from the specified target pose. The meaning of the target pose can be understood as the position and viewing angle of the virtual observer in the three-dimensional reconstructed scene. The diffusion model can receive a human body posture image, so that the human body in the generated new image is consistent with the posture in the received human body posture image corresponding to the target pose. Therefore, the description information of the target object may include posture prior information describing the body posture of the target object.
[0069] According to some embodiments, Figure 4 As shown, step S204, based on the description information, using the second deep learning model to reason on the inference image to obtain the inference result may include: step S401, based on the posture prior information, determining the human body posture image corresponding to the target posture; and step S402, based on the human body posture image, using the second deep learning model to reason on the inference image to obtain the inference result.
[0070] The human posture image represents the human posture seen when observing the target object with the body posture described by the posture prior information from the target posture. Thus, through the above method, the inference result generated by the second deep learning model can be used to obtain a predicted image of the body posture of the target object corresponding to the target posture observation and conforming to the description information, thereby enabling the trained first deep learning model to learn the corresponding posture prior information, so that the modeling of the target object by the final three-dimensional reconstruction model conforms to the body posture.
[0071] In some embodiments, a control network ControlNet can be used as a second deep learning model. ControlNet is a neural network structure that controls the diffusion model by adding additional conditions. It provides a method to enhance stable diffusion and use conditional inputs such as human posture images in the image and / or text-to-image generation process.
[0072] According to some embodiments, the posture prior information may include three-dimensional human skeleton point information of the target object, and the human posture image may include a two-dimensional human skeleton image, which may be obtained by projecting the three-dimensional human skeleton point information according to the target posture.
[0073] It is understandable that the posture prior information and the human posture image may also be in other forms which are not limited here.
[0074] According to some embodiments, the description information may include a prompt text describing the appearance characteristics of the target object. In an exemplary embodiment, the prompt text may be, for example, "a girl in a white dress". Figure 5 As shown, step S402, based on the human body posture image, using the second deep learning model to reason on the inference image to obtain the inference result may include: step S501, based on the prompt text and the human body posture image, using the second deep learning model to reason on the inference image to obtain the inference result.
[0075] As a result, the second deep learning model generates an inference result under the explicit description information, and the inference result can be used to obtain a predicted image presenting the appearance feature, so that the trained first deep learning model can learn the corresponding appearance feature, so that the final three-dimensional reconstruction model models the target object in accordance with the appearance feature.
[0076] According to some embodiments, the second deep learning model may be based on a pre-trained diffusion model and include a first encoding subnetwork, a second encoding subnetwork, and a decoding subnetwork. Figure 6 As shown, step S501, based on the prompt text and the human body posture image, reasoning the image to be inferred using the second deep learning model to obtain the reasoning result may include: step S601, based on the encoded prompt text, encoding the image to be inferred using the first encoding subnetwork to obtain a first intermediate image, the size of the first intermediate image is smaller than the image to be inferred; step S602, based on the encoded prompt text, encoding the first fused image using the second encoding subnetwork to obtain the second intermediate image, the first fused image is obtained by fusing the image to be inferred and the human body posture image, and the second intermediate image has the same size as the first intermediate image; and step S603, based on the encoded prompt text, decoding the second fused image using the decoding subnetwork to obtain the reasoning result, the second fused image is obtained by fusing the first intermediate image and the second intermediate image.
[0077] Therefore, through the above method, it is possible to better reason the inference image based on the prompt text and the human posture image using the second deep learning model and obtain a more accurate reasoning result.
[0078] In some embodiments, the prompt text may be encoded using a text encoder (encoding network) to obtain an encoded prompt text. The time step (i.e., the time t of the diffusion process mentioned above) may also be encoded using a time encoder, and encoding and decoding are performed based on the encoded prompt text and the encoded time step in steps S601 to S603.
[0079] According to some embodiments, the first encoding subnetwork may include at least one first encoding block and at least one first attention layer arranged alternately, and each of the at least one first attention layer may be arranged to be immediately after the corresponding first encoding block. Figure 7 As shown, step S601, based on the encoded prompt text, using the first encoding subnetwork to encode the inference image to obtain a first intermediate image may include: step S701, using the first encoding block in at least one first encoding block to encode the input image of the first encoding block to obtain the encoded image output by the first encoding block; and step S702, using the first attention layer in at least one first attention layer, based on the encoded prompt text, determine the attention scores of the pixels in the input image of the first attention layer to obtain the first attention image output by the first attention layer, wherein the input image of the first attention layer is the encoded image output by the corresponding first encoding block, and the first attention image output by the last first attention layer in at least one first attention layer is the first intermediate image.
[0080] Therefore, the above method achieves better reasoning for the inference image based on the prompt text, so that the reasoning result can be used to generate a higher quality image that meets the appearance features described in the prompt text.
[0081] In some embodiments, the number of at least one first coding block and at least one first attention layer can be the same, and each first coding block has a corresponding first attention layer. That is, the output of the first coding block is the input of the corresponding first attention layer, and the output of the first attention layer can be the input of the next first coding block (or the final output of the first coding sub-network).
[0082] It can be understood that the alternating arrangement of at least one first coding block and at least one first attention layer means that each first coding block has a corresponding first attention layer, and the first coding block is immediately followed by the first attention layer corresponding to the first coding block, and then immediately followed by the next first coding block and the corresponding first attention layer, until the last first attention layer and the corresponding first attention layer.
[0083] In some embodiments, each of the at least one first coding block can be used to encode the input image of the first coding block to obtain an encoded image output by the first coding block, and each of the at least one first attention layer can be used to determine an attention score for each pixel in the input image of the first attention layer based on the encoded prompt text to obtain a first attention image output by the first attention layer.
[0084] In some embodiments, the first encoding subnetwork and the second encoding subnetwork perform downsampling on the image while encoding the corresponding input image, so that the size of the first intermediate image / the second intermediate image is smaller than the image to be inferred. On the contrary, the decoding subnetwork performs upsampling on the image while decoding the corresponding input image, so the size of the final output inference result is larger than the input image of the decoding subnetwork. In some embodiments, the size of the inference result is the same as the image to be inferred. Therefore, the second deep learning model can be U-Net.
[0085] In some embodiments, in step S702, a corresponding attention score may be determined based on the encoded prompt text and the encoded time step number.
[0086] In some embodiments, before step S602, the image to be inferred and the human body posture image may be fused in various ways to obtain a second intermediate image, such as splicing, direct addition, weighted summation, processing using a small neural network, etc., or any combination of the above methods. In an exemplary embodiment, the human body posture image may be processed using zero convolution (i.e., 1×1 convolution with zero initialization weights and biases), and the processing result may be spliced or added with the image to be inferred to obtain a second intermediate image.
[0087] In some embodiments, the second encoding subnetwork may include alternating encoding blocks and attention layers, and the decoding subnetwork may include alternating decoding blocks and attention layers to better implement encoding and decoding based on the prompt text (and time steps). The encoded image output by each encoding block in the second encoding subnetwork may be fused with a decoded image of the same size output by the corresponding decoding block in the decoding subnetwork to improve the prediction ability of the network.
[0088] In some embodiments, in step S205, a first loss value may be calculated based on the noise added to the initial image and the inference result, and the parameters of the first deep learning model may be adjusted based on the first loss value. The loss value may be positively correlated with the difference between the noise and the inference result. In an exemplary embodiment, the L2 loss of the difference between the two may be used as the corresponding loss value, that is:
[0089]
[0090] Among them, L1 is the loss value, ∈ is the noise, For the inference result.
[0091] According to some embodiments, the training method of the three-dimensional reconstruction model may further include: determining the entropy loss of the ray corresponding to each pixel in the initial image, including: for each pixel in the initial image, normalizing the voxel density of each of the multiple voxels located on the ray corresponding to the pixel to obtain the normalized voxel density of each of the multiple voxels; and determining the entropy loss of the ray based on the normalized voxel density of each of the multiple voxels. The parameters of the first deep learning model may be adjusted based on the entropy loss of the ray corresponding to each pixel in the initial image, noise, and inference results.
[0092] Therefore, by using the above-mentioned entropy loss-based loss value to adjust the parameters of the first deep learning model, the object surface of the three-dimensional modeling of the target object by the three-dimensional reconstruction model is made sharper.
[0093] According to some embodiments, determining the entropy loss of a ray based on the normalized voxel densities of each of a plurality of voxels may include: for each voxel in the plurality of voxels, determining a loss term corresponding to the voxel based on the inverse of the logarithm of the normalized voxel density of the voxel and the product of the normalized voxel density of the voxel; and determining the entropy loss of the ray based on the sum of the loss terms corresponding to each of the plurality of voxels.
[0094] In an exemplary embodiment, the entropy loss of each ray can be expressed as:
[0095] L2=∑ 0~n -σ i log(σ i )
[0096] Among them, L2 is the first loss value, 0~n represents all voxels, σ i Represents the normalized voxel density. Thus, through the above method, the entropy loss of the ray that can be used to accurately evaluate whether the surface is sharp can be obtained.
[0097] According to some embodiments, step S205, adjusting the parameters of the first deep learning model based on the noise and the reasoning results to obtain a three-dimensional reconstruction model corresponding to the target object that conforms to the description information may include: determining a first loss value based on the sum of the entropy losses of the rays corresponding to each pixel in the initial image; determining a second loss value based on the noise and the reasoning results, the second loss value being positively correlated with the difference between the noise and the reasoning results; and adjusting the parameters of the first deep learning model based on the first loss value and the second loss value.
[0098] In an exemplary embodiment, L1 and L2 of all rays may be added to obtain a total loss value L, and the parameters of the first deep learning model may be adjusted based on the loss value L. Thus, the parameters of the deep learning model may be adjusted based on the above two loss value calculation methods at the same time.
[0099] In some embodiments, after the three-dimensional reconstruction model is obtained through training, the voxel density isosurface can be extracted from the trained neural radiation field by using the marching cube method, thereby obtaining a mesh of the 3D object. In an exemplary embodiment, the density can be taken as 2.5.
[0100] According to another aspect of the present disclosure, a training device for a three-dimensional reconstruction model is provided. Figure 8 As shown, the device 800 includes: a description information determination unit 810, configured to determine the description information of the target object; a first generation unit 820, configured to generate an initial image using a first deep learning model, the initial image representing a prediction result of an image obtained by observing the target object from a specified target pose; a noise adding unit 830, configured to add noise to the initial image to obtain an image to be inferred; a second generation unit 840, configured to infer the image to be inferred using a second deep learning model based on the description information to obtain an inference result, wherein the inference result can be used to remove noise from the image to be inferred and generate an image that meets the description information; and a parameter adjustment unit 850, configured to adjust the parameters of the first deep learning model based on the noise and the inference result to obtain a three-dimensional reconstruction model corresponding to the target object that meets the description information.
[0101] It can be understood that the operations of units 810 to 850 in the device 800 are respectively Figure 2 The operations of step S201 to step S205 are similar and will not be described in detail here.
[0102] According to some embodiments, the first deep learning model and the three-dimensional reconstruction model may be based on a neural radiation field. The first generation unit may include: a voxel determination subunit configured to determine, for each pixel in the initial image to be generated, based on the first deep learning model, the voxel density and color of each of the multiple voxels located on the ray corresponding to the pixel; and a pixel value determination subunit configured to determine, for each pixel in the initial image to be generated, the pixel value of the pixel based on the voxel density and color of each of the multiple voxels on the ray corresponding to the pixel.
[0103] According to some embodiments, the description information may include posture prior information describing the body posture of the target object. The second generation unit may include: a human posture image determination subunit, configured to determine a human posture image corresponding to the target posture based on the posture prior information; and a generation subunit, configured to use a second deep learning model to infer the image to be inferred based on the human posture image to obtain an inference result.
[0104] According to some embodiments, the posture prior information may include three-dimensional human skeleton point information of the target object, and the human posture image may include a two-dimensional human skeleton image, which may be obtained by projecting the three-dimensional human skeleton point information according to the target posture.
[0105] According to some embodiments, the description information may include a prompt text describing the appearance features of the target object. The generation subunit may be configured to perform reasoning on the image to be inferred using a second deep learning model based on the prompt text and the human posture image to obtain a reasoning result.
[0106] According to some embodiments, the second deep learning model may be based on a pre-trained diffusion model and may include a first encoding subnetwork, a second encoding subnetwork and a decoding subnetwork. The generating subunit may include: a first encoding subunit configured to encode the image to be inferred using the first encoding subnetwork based on the encoded prompt text to obtain a first intermediate image, the size of the first intermediate image is smaller than the image to be inferred; a second encoding subunit configured to encode the first fused image using the second encoding subnetwork based on the encoded prompt text to obtain a second intermediate image, the first fused image is obtained by fusing the image to be inferred and the human body posture image, the second intermediate image is the same size as the first intermediate image; and a decoding subunit configured to decode the second fused image using the decoding subnetwork based on the encoded prompt text to obtain an inference result, the second fused image is obtained by fusing the first intermediate image and the second intermediate image.
[0107] According to some embodiments, the first coding subnetwork may include at least one first coding block and at least one first attention layer that are alternately arranged. The first coding subunit may be configured to: use a first coding block in at least one first coding block to encode the input image of the first coding block to obtain an encoded image output by the first coding block; and use a first attention layer in at least one first attention layer to determine the attention score of the pixel in the input image of the first attention layer based on the encoded prompt text to obtain the first attention image output by the first attention layer, wherein the input image of the first attention layer is the encoded image output by the corresponding first coding block, and the first attention image output by the last first attention layer in at least one first attention layer is the first intermediate image.
[0108] According to some embodiments, the device 800 may further include (not shown in the figure): an entropy loss determination unit configured to determine the entropy loss of the ray corresponding to each pixel in the initial image. The entropy loss determination unit may include: a normalization subunit configured to normalize the voxel density of each of the multiple voxels located on the ray corresponding to the pixel for each pixel in the initial image to obtain the normalized voxel density of each of the multiple voxels; an entropy loss determination subunit configured to determine the entropy loss of the ray based on the normalized voxel density of each of the multiple voxels. The parameters of the first deep learning model may be adjusted based on the entropy loss, noise, and inference results of the ray corresponding to each pixel in the initial image.
[0109] According to some embodiments, the entropy loss determination subunit may include: a loss term determination subunit configured to determine, for each voxel in a plurality of voxels, a loss term corresponding to the voxel based on the inverse of the logarithm of the normalized voxel density of the voxel and the product of the normalized voxel density of the voxel. The entropy loss determination subunit is configured to determine the entropy loss of the ray based on the sum of the loss terms corresponding to each of the plurality of voxels.
[0110] According to some embodiments, the parameter adjustment unit may include: a first loss value determination subunit, configured to determine a first loss value based on the sum of entropy losses of rays corresponding to each pixel in the initial image; a second loss value determination subunit, configured to determine a second loss value based on noise and inference results, the second loss value being positively correlated with the difference between the noise and the inference results; and a parameter adjustment subunit, configured to adjust parameters of the first deep learning model based on the first loss value and the second loss value.
[0111] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0112] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.
[0113] refer to Fig. 9, a block diagram of an electronic device 900 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0114] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0115] Multiple components in the device 900 are connected to the I / O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 can be any type of device that can input information to the device 900. The input unit 906 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 907 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 908 can include but is not limited to a disk, an optical disk. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0116] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning network algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a training method for a three-dimensional reconstruction model and / or a training method for a deep learning model. For example, in some embodiments, the training method for a three-dimensional reconstruction model and / or the training method for a deep learning model may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the training method for the three-dimensional reconstruction model and / or the training method for the deep learning model described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute a training method for a three-dimensional reconstruction model and / or a training method for a deep learning model in any other appropriate manner (for example, by means of firmware).
[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0118] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0119] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0121] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0122] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0124] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.
Claims
1. A training method for a three-dimensional reconstruction model, comprising: Determine the description information of the target object; Generate an initial image using a first deep learning model, wherein the initial image represents a predicted result of an image obtained by observing the target object from a specified target pose; Adding noise to the initial image to obtain an image to be inferred; Based on the description information, use a second deep learning model to infer the image to be inferred to obtain an inference result, wherein the second deep learning model is based on a pre-trained diffusion model, and the inference result can be used to remove noise from the image to be inferred and generate an image that conforms to the description information; and Based on the noise and the inference result, adjusting the parameters of the first deep learning model to obtain a three-dimensional reconstruction model corresponding to the target object that meets the description information includes: Based on the noise and the inference result, a second loss value is determined, and parameters of the first deep learning model are adjusted based on the second loss value, wherein the second loss value is positively correlated with a difference between the noise and the inference result, Wherein, the first deep learning model and the three-dimensional reconstruction model are based on neural radiation fields.
2. The method according to claim 1, wherein: The target object is a human body, and the description information includes posture prior information describing the body posture of the target object. Wherein, based on the description information, using a second deep learning model to reason on the image to be reasoned to obtain a reasoning result includes: Based on the posture prior information, determining a human body posture image corresponding to the target posture; and Based on the human body posture image, the image to be inferred is inferred using the second deep learning model to obtain the inference result.
3. The method according to claim 2, wherein: The posture prior information includes three-dimensional human skeleton point information of the target object, and the human posture image includes a two-dimensional human skeleton image, which is obtained by projecting the three-dimensional human skeleton point information according to the target posture.
4. The method according to claim 2, wherein: The description information includes a prompt text describing the appearance features of the target object, wherein, based on the human body posture image, the image to be inferred is inferred using the second deep learning model to obtain the inference result, including: Based on the prompt text and the human posture image, the image to be inferred is inferred using the second deep learning model to obtain the inference result.
5. The method according to claim 4, wherein: The second deep learning model includes a first encoding subnetwork, a second encoding subnetwork and a decoding subnetwork, Among them, based on the prompt text and the human body posture image, using the second deep learning model to reason on the image to be reasoned to obtain the reasoning result includes: Based on the encoded prompt text, using the first encoding subnetwork to encode the image to be inferred to obtain a first intermediate image, where the size of the first intermediate image is smaller than that of the image to be inferred; Based on the encoded prompt text, using the second encoding subnetwork to encode the first fused image to obtain a second intermediate image, wherein the first fused image is obtained by fusing the image to be inferred and the human body posture image, and the second intermediate image has the same size as the first intermediate image; and Based on the encoded prompt text, the decoding subnetwork is used to decode the second fused image to obtain the inference result, where the second fused image is obtained by fusing the first intermediate image and the second intermediate image.
6. The method according to claim 5, wherein: The first encoding subnetwork includes at least one first encoding block and at least one first attention layer alternately arranged, The step of encoding the image to be inferred based on the encoded prompt text using the first encoding subnetwork to obtain a first intermediate image includes: Using a first coding block in the at least one first coding block, encoding an input image of the first coding block to obtain an encoded image output by the first coding block; and Utilizing the first attention layer among the at least one first attention layer, the attention scores of pixels in the input image for the first attention layer are determined based on the encoded prompt text to obtain a first attention image output by the first attention layer, wherein the input image of the first attention layer is the encoded image output by the corresponding first encoding block, and the first attention image output by the last first attention layer among the at least one first attention layer is the first intermediate image.
7. The method according to claim 1, wherein: Generating an initial image using the first deep learning model includes: For each pixel in the initial image to be generated, Determine, based on the first deep learning model, a voxel density and a color of each of a plurality of voxels located on the ray corresponding to the pixel; and A pixel value of the pixel is determined based on the voxel density and color of each of the plurality of voxels on the ray corresponding to the pixel.
8. The method according to claim 7, further comprising: Determining the entropy loss of a ray corresponding to each pixel in the initial image includes: For each pixel in the initial image, normalize the voxel density of each of the plurality of voxels located on the ray corresponding to the pixel to obtain the normalized voxel density of each of the plurality of voxels; and determining an entropy loss of the ray based on a normalized voxel density of each of the plurality of voxels, The parameters of the first deep learning model are adjusted based on the entropy loss of the ray corresponding to each pixel in the initial image, the noise and the inference result.
9. The method according to claim 8, wherein: Determining the entropy loss of the ray based on the normalized voxel densities of each of the plurality of voxels includes: For each voxel of the plurality of voxels, determining a loss term corresponding to the voxel based on the inverse of a product of a logarithm of a normalized voxel density of the voxel and the normalized voxel density of the voxel; and The entropy loss of the ray is determined based on the sum of the loss terms corresponding to the multiple voxels.
10. The method according to claim 8, wherein: Adjusting the parameters of the first deep learning model based on the noise and the inference result to obtain a three-dimensional reconstruction model corresponding to the target object that meets the description information includes: Determine a first loss value based on the sum of entropy losses of the rays corresponding to each pixel in the initial image; Based on the noise and the inference result, determining a second loss value, the second loss value being positively correlated with a difference between the noise and the inference result; and Based on the first loss value and the second loss value, adjust parameters of the first deep learning model.
11. A training device for a three-dimensional reconstruction model, comprising: A description information determining unit, configured to determine description information of a target object; A first generating unit is configured to generate an initial image using a first deep learning model, wherein the initial image represents a prediction result of an image obtained by observing the target object from a specified target pose; A noise adding unit, configured to add noise to the initial image to obtain an image to be inferred; a second generating unit configured to, based on the description information, use a second deep learning model to infer the image to be inferred to obtain an inference result, wherein the second deep learning model is based on a pre-trained diffusion model, and the inference result can be used to remove noise from the image to be inferred and generate an image that conforms to the description information; and A parameter adjustment unit is configured to adjust the parameters of the first deep learning model based on the noise and the inference result to obtain a three-dimensional reconstruction model corresponding to the target object that meets the description information, including: Based on the noise and the inference result, a second loss value is determined, and parameters of the first deep learning model are adjusted based on the second loss value, wherein the second loss value is positively correlated with a difference between the noise and the inference result, Wherein, the first deep learning model and the three-dimensional reconstruction model are based on neural radiation fields.
12. The device according to claim 11, wherein The description information includes posture prior information describing the body posture of the target object, Wherein, the second generating unit comprises: a human body posture image determination subunit, configured to determine a human body posture image corresponding to the target posture based on the posture prior information; and A generating subunit is configured to perform reasoning on the image to be inferred based on the human posture image using the second deep learning model to obtain the reasoning result.
13. The device according to claim 12, wherein: The posture prior information includes three-dimensional human skeleton point information of the target object, and the human posture image includes a two-dimensional human skeleton image, which is obtained by projecting the three-dimensional human skeleton point information according to the target posture.
14. The device according to claim 12, wherein: The description information includes prompt text describing the appearance features of the target object, wherein the generation subunit is configured to use the second deep learning model to infer the image to be inferred based on the prompt text and the human posture image to obtain the inference result.
15. The device according to claim 14, wherein: The second deep learning model includes a first encoding subnetwork, a second encoding subnetwork and a decoding subnetwork, Wherein, the generating subunit comprises: A first encoding subunit is configured to encode the image to be inferred by using the first encoding subnetwork based on the encoded prompt text to obtain a first intermediate image, wherein the size of the first intermediate image is smaller than that of the image to be inferred; a second encoding subunit, configured to encode the first fused image using the second encoding subnetwork based on the encoded prompt text to obtain a second intermediate image, wherein the first fused image is obtained by fusing the image to be inferred and the human body posture image, and the second intermediate image has the same size as the first intermediate image; and The decoding subunit is configured to decode the second fused image using the decoding subnetwork based on the encoded prompt text to obtain the inference result, where the second fused image is obtained by fusing the first intermediate image and the second intermediate image.
16. The device according to claim 15, wherein: The first encoding subnetwork includes at least one first encoding block and at least one first attention layer alternately arranged, Wherein, the first encoding subunit is configured as: Using a first coding block in the at least one first coding block, encoding an input image of the first coding block to obtain an encoded image output by the first coding block; and Utilizing the first attention layer among the at least one first attention layer, the attention scores of pixels in the input image for the first attention layer are determined based on the encoded prompt text to obtain a first attention image output by the first attention layer, wherein the input image of the first attention layer is the encoded image output by the corresponding first encoding block, and the first attention image output by the last first attention layer among the at least one first attention layer is the first intermediate image.
17. The device according to claim 11, wherein: The first generating unit comprises: a voxel determination subunit configured to determine, for each pixel in the initial image to be generated, based on the first deep learning model, a voxel density and a color of each of a plurality of voxels located on a ray corresponding to the pixel; and The pixel value determination subunit is configured to determine the pixel value of the pixel based on the voxel density and color of each of the plurality of voxels on the ray corresponding to the pixel.
18. The apparatus according to claim 17, further comprising: An entropy loss determining unit is configured to determine the entropy loss of a ray corresponding to each pixel in the initial image, the entropy loss determining unit comprising: a normalization subunit configured to normalize, for each pixel in the initial image, the voxel densities of each of the plurality of voxels located on the ray corresponding to the pixel, so as to obtain the normalized voxel densities of each of the plurality of voxels; and an entropy loss determination subunit, configured to determine the entropy loss of the ray based on the normalized voxel density of each of the plurality of voxels, The parameters of the first deep learning model are adjusted based on the entropy loss of the ray corresponding to each pixel in the initial image, the noise and the inference result.
19. The device according to claim 18, wherein: The entropy loss determination subunit comprises: a loss term determining subunit configured to determine, for each voxel of the plurality of voxels, a loss term corresponding to the voxel based on the inverse of the product of the logarithm of the normalized voxel density of the voxel and the normalized voxel density of the voxel, The entropy loss determination subunit is configured to determine the entropy loss of the ray based on the sum of loss terms corresponding to each of the plurality of voxels.
20. The device according to claim 18, wherein The parameter adjustment unit comprises: A first loss value determining subunit is configured to determine a first loss value based on the sum of entropy losses of the rays corresponding to each pixel in the initial image; a second loss value determining subunit configured to determine a second loss value based on the noise and the inference result, wherein the second loss value is positively correlated with a difference between the noise and the inference result; and A parameter adjustment subunit is configured to adjust the parameters of the first deep learning model based on the first loss value and the second loss value.
21. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-10.
23. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
