Three-dimensional model generation method and device, equipment, medium and program product
Through multi-view image generation model and texture mapping technology, the problem of the existing three-dimensional model generation methods requiring professional equipment and personnel is solved, and high-quality and convenient three-dimensional model generation is achieved, reducing costs and time.
Patent Information
- Application Number
- CN202411441264.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-14
AI Technical Summary
The existing three-dimensional model generation method requires professional equipment and personnel participation, which is time-consuming and labor-intensive, and increases cost and difficulty.
By obtaining the first image and texture description information of the target object, the second image and normal map are generated based on the multi-view image generation model, three-dimensional reconstruction and optimization are carried out, and high-quality three-dimensional model is generated, with only one arbitrary image. Just an image from the perspective.
It improves the convenience and quality of three-dimensional model generation, reduces costs, does not require professional participation, shortens modeling time, and improves generation efficiency.
Smart Images

Figure CN119313820A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to computer technology, and more particularly to a three-dimensional model generation method, apparatus, device, medium and program product. Background Art
[0002] With the rapid development of computer technology, it is usually necessary to reconstruct objects such as objects in three dimensions to obtain a three-dimensional model of the object. In the existing method, professional photography equipment is required to perform three-dimensional scanning and photography of the object, and a three-dimensional model is generated based on multiple images. However, this method requires the participation of professionals, is time-consuming and labor-intensive, and increases the cost of generating the three-dimensional model. Summary of the invention
[0003] The present disclosure provides a 3D model generation method, apparatus, device, medium and program product to improve the convenience of 3D model generation, reduce the generation cost of 3D model, and ensure the generation quality of 3D model.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating a three-dimensional model, comprising:
[0005] Acquire a first image and texture description information of a target object;
[0006] Based on the multi-view image generation model and the first image, generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image;
[0007] Performing three-dimensional reconstruction based on the plurality of second images to obtain a first three-dimensional model of the target object;
[0008] Based on the normal map, optimizing the first three-dimensional model to obtain an optimized second three-dimensional model;
[0009] Based on the first image and the texture description information, texture mapping is performed on the second three-dimensional model to obtain a target three-dimensional model of the target object.
[0010] In a second aspect, the present disclosure also provides a three-dimensional model generation device, including:
[0011] An information acquisition module, used to acquire a first image and texture description information of a target object;
[0012] A multi-view image generation module, used to generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on a multi-view image generation model and the first image;
[0013] A three-dimensional reconstruction module, used for performing three-dimensional reconstruction based on the plurality of second images to obtain a first three-dimensional model of the target object;
[0014] A model optimization module, used for optimizing the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model;
[0015] A texture mapping module is used to perform texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional model generation method as described in any of the embodiments of the present disclosure.
[0020] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the three-dimensional model generation method as described in any one of the embodiments of the present disclosure.
[0021] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the three-dimensional model generation method as described in any one of the embodiments of the present disclosure.
[0022] The disclosed embodiment generates a model and a first image of a target object based on multi-view images, generates a second image of the target object at each preset view and a normal map corresponding to the second image, and performs three-dimensional reconstruction based on multiple second images to obtain a first three-dimensional model of the target object; based on the normal map corresponding to the second image, the first three-dimensional model is optimized to obtain a higher quality second three-dimensional model; based on the first image and texture description information, a more realistic texture mapping is performed on the second three-dimensional model to obtain a higher quality target three-dimensional model of the target object, thereby ensuring the quality of the three-dimensional model generation. By only taking a first image of any view, there is no need for three-dimensional scanning and shooting, and thus no professional participation is required, the convenience of three-dimensional model generation is improved, and the cost of three-dimensional model generation is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0024] Figure 1 It is a flowchart of a three-dimensional model generation method provided by an embodiment of the present disclosure;
[0025] Figure 2 It is a flowchart of a three-dimensional model generation method provided by an embodiment of the present disclosure;
[0026] Figure 3 is a diagram showing an example of a network architecture of a multi-view image generation model involved in an embodiment of the present disclosure;
[0027] Figure 4 It is a flowchart of a three-dimensional model generation method provided by an embodiment of the present disclosure;
[0028] Figure 5 is an example diagram of a first three-dimensional model generation process involved in an embodiment of the present disclosure;
[0029] Figure 6 It is a flowchart of a three-dimensional model generation method provided by an embodiment of the present disclosure;
[0030] Figure 7 is a structural schematic diagram of a three-dimensional model generating device provided by an embodiment of the present disclosure;
[0031] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0033] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0034] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0035] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0037] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0038] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0039] Figure 1 A flow chart of a three-dimensional model generation method provided in an embodiment of the present disclosure is applicable to the case of generating a three-dimensional model of any object such as an article. The method can be executed by a three-dimensional model generation device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0040] like Figure 1 As shown, the three-dimensional model generation method specifically includes the following steps:
[0041] S110: Acquire a first image and texture description information of a target object.
[0042] The target object may refer to a single object for which a three-dimensional model is currently to be generated. For example, the target object may be any object such as an article or a person. The first image may refer to a color image of the target object taken at any viewing angle. The viewing angle of the first image is not limited. The texture description information may refer to text information used to describe the texture of the target object. The first image and the texture description information are respectively used to describe the presentation style of the target object in an image manner and a text manner.
[0043] Specifically, any color image of the target object captured by a user through an ordinary camera and the input texture description information of the target object are obtained. The background of the obtained color image can be removed to obtain a first image containing only the target object, thereby avoiding the influence of the background object, and then reconstructing a higher quality 3D model based on the first image containing only the target object.
[0044] S120: Generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on the multi-view image generation model and the first image.
[0045] The preset viewing angle is a preset viewing angle, and the number of preset viewing angles is multiple. For example, the preset viewing angle includes: viewing angles taken from the six directions of the top, bottom, left, right, front and back of the target object. The second image refers to the generated color image of the target object at the preset viewing angle. The second image corresponds to the preset viewing angle one by one. The second image and the normal map also correspond to each other one by one. The normal map may include normal information corresponding to each pixel in the second image. The normal map may be used to characterize the geometric shape information of the target object at the preset viewing angle. The multi-view image generation model may be a deep learning network model for generating multiple new viewing angle images and normal maps based on a single image. The multi-view image generation model may be obtained by fine-tuning the generative pre-trained model based on a sample data set in advance. The sample data set may include a sample image of the sample object at any viewing angle and a standard image and a standard normal map at each preset viewing angle. The generative pre-trained model may be any pre-trained model for generating images. For example, the generative pre-trained model may refer to a Diffusion diffusion model, such as a Stable Diffusion potential diffusion model.
[0046] Specifically, the first image of the target object is input into the multi-view image generation model to generate multiple preset view images, and based on the output of the multi-view image generation model, the second image of the target object at each preset view and the normal map corresponding to each second image are obtained. By using the multi-view image generation model, multiple second images and normal maps can be quickly generated at the same time, thereby obtaining multiple images at different view angles and richer geometric shape information, and then using the normal map can effectively improve the precision of geometric modeling.
[0047] S130: Perform three-dimensional reconstruction based on the multiple second images to obtain a first three-dimensional model of the target object.
[0048] The first three-dimensional model may refer to a three-dimensional mesh model that is initially reconstructed. The first three-dimensional model is a relatively rough three-dimensional mesh model.
[0049] Specifically, after generating a plurality of second images at different viewing angles, the plurality of second images can be used to perform preliminary reconstruction of the three-dimensional model of the target object to obtain a first three-dimensional model of the target object. For example, by using a hybrid three-dimensional representation method of a hybrid triplane (Triplane) and a Gaussian (Gaussian), the first three-dimensional model of the target object can be reconstructed from the plurality of second images with high quality and speed.
[0050] S140: Optimize the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model.
[0051] The second three-dimensional model may refer to an optimized three-dimensional mesh model. The second three-dimensional model is a relatively fine three-dimensional mesh model, which has richer details and higher precision than the first three-dimensional model.
[0052] Specifically, based on the normal map corresponding to each preset perspective, the first 3D model with missing details is optimized to restore the geometric details on the normal map, thereby obtaining a second 3D model with finer and richer details. By using the normal map to optimize the details of the rough first 3D model, the problem of difficult restoration of details under sparse perspective reconstruction is solved.
[0053] Exemplarily, step S140 may include: utilizing a continuous mesh reconstruction method to perform mesh smoothing optimization on the first three-dimensional model based on a normal map to obtain an optimized second three-dimensional model.
[0054] Specifically, the continuous-remeshing method is used to simplify the mesh of the first three-dimensional model based on the normal map, and the degenerate triangles on the mesh are removed, and the neighborhood area of the initial mesh vertices is increased, thereby enhancing the normal fitting ability of the three-dimensional model, restoring the geometric details on the normal map, and improving the detail fineness of the second three-dimensional model.
[0055] S150: Perform texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
[0056] Specifically, based on the first image and the texture description information, the target texture image of the target object can be more accurately generated, and the target texture image can be pasted on the second three-dimensional model, thereby giving the second three-dimensional model a presentation style and obtaining the final target three-dimensional model of the target object. Since the three-dimensional model of the target object can be efficiently and high-quality generated based on only one image of the target object, there is no need to scan and shoot multiple images, which facilitates user operation, improves the convenience of three-dimensional model generation, and also improves the rationality, fidelity and precision of the geometric shape of the three-dimensional model. Compared with the traditional modeling time of days, this embodiment can shorten the modeling time to minutes, improving the efficiency of three-dimensional model generation.
[0057] The technical solution of the disclosed embodiment is to generate a model and a first image of a target object based on a multi-view image, generate a second image of the target object at each preset view and a normal map corresponding to the second image, and perform three-dimensional reconstruction based on multiple second images to obtain a first three-dimensional model of the target object; optimize the first three-dimensional model based on the normal map corresponding to the second image to obtain a higher quality second three-dimensional model, and perform more realistic texture mapping on the second three-dimensional model based on the first image and texture description information to obtain a higher quality target three-dimensional model of the target object, thereby ensuring the quality of the three-dimensional model generation. By only taking a first image of any view, there is no need for three-dimensional scanning and shooting, and thus no professional participation is required, the convenience of three-dimensional model generation is improved and the cost of three-dimensional model generation is reduced.
[0058] On the basis of the above technical solution, the multi-view image generation model in step S120 is generated by fine-tuning the generative pre-trained model in advance based on the sample data set and the target loss function; wherein the target loss function includes a perceptual loss function and a noise loss function, wherein the perceptual loss function is used to characterize the loss value between the sample denoised image and the predicted denoised image, the sample denoised image is determined based on the sample noisy image and the sample noise, and the predicted denoised image is determined based on the sample noisy image and the predicted noise; the noise loss function is used to characterize the loss value between the sample noise and the predicted noise.
[0059] The sample data set may include a sample image of the sample object at any viewing angle and a standard image and a standard normal map at each preset viewing angle. The generative pre-trained model may be any pre-trained model for generating images. For example, the generative pre-trained model may refer to a Diffusion diffusion model, such as a Stable Diffusion potential diffusion model.
[0060] Among them, sample noise refers to the image noise randomly generated at the current moment. Prediction noise refers to the noise predicted by the generative pre-training model. The sample noisy image is the image obtained after adding the sample noise to the sample image. The sample denoised image is the image obtained after removing the sample noise from the sample noisy image. The predicted denoised image is the image obtained after removing the predicted noise from the sample noisy image. The one-step denoising method can more quickly obtain the sample denoised image and the predicted denoised image, reducing the amount of calculation. The perceptual loss function can be used to characterize the prediction error in visual perception. The noise loss function can be used to characterize the prediction error in noise.
[0061] Specifically, the generative pre-trained model can simultaneously output a color image and a normal map under a preset viewing angle. Both the color image and the normal map are in the form of images, so the output training process of the color image and the normal map is the same, and they can be trained separately. For example, the fine-tuning training process of the generative pre-trained model when outputting a color image or a normal map is: determining the perceptual loss value based on the perceptual loss function, the sample denoised image, and the predicted denoised image, determining the noise loss value based on the noise loss function, the sample noise, and the predicted noise, performing weighted summation of the perceptual loss value and the noise loss value to obtain the target loss value, and back-propagating the target loss value to the generative pre-trained model, adjusting the network parameters in the generative pre-trained model until the preset convergence condition is reached, such as when the number of iterations is equal to the preset number, or when the loss value changes tend to be stable, it is determined that the fine-tuning of the generative pre-trained model is completed, and a multi-view image generation model is obtained. By using the perceptual loss function to determine the perceptual loss value for training, perceptual constraints between multiple perspectives can be introduced, so that the multi-view image finally generated has higher quality and content consistency.
[0062] It should be noted that the generative pre-training model generates new images by using the input image as the conditional image and denoising the randomly generated noise image multiple times. When the generative pre-training model is a latent diffusion model, the sample image needs to be encoded during the fine-tuning training process to obtain the sample image in the latent space and perform image training in the latent space, that is, the sample noisy image, the sample denoised image and the predicted denoised image are all image data represented in the latent space.
[0063] Figure 2 This is a flow chart of a 3D model generation method provided by an embodiment of the present disclosure. Based on the above disclosed embodiments, the present disclosed embodiment optimizes the step of "generating a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on a multi-view image generation model and a first image". The explanations of the terms that are the same or corresponding to the above disclosed embodiments are not repeated here.
[0064] like Figure 2As shown, the three-dimensional model generation method specifically includes the following steps:
[0065] S210: Acquire a first image and texture description information of a target object.
[0066] S220: Input the first image into an image encoder in a multi-view image generation model to extract features, thereby obtaining feature information of the first image.
[0067] The image encoder may be any encoder for extracting image features. Figure 3 , the feature information of the first image can be extracted by utilizing the image encoder in the multi-view image generation model.
[0068] S230, inputting the feature information of the first image and the initial image and initial normal map corresponding to each preset viewing angle into multiple cascaded denoising networks in the multi-view image generation model for multiple iterative denoising, and obtaining the second image of the target object at each preset viewing angle and the normal map corresponding to the second image after the last iterative denoising.
[0069] The initial image may be a noise color image generated by initialization at each preset viewing angle, and the initialization may be generated by random Gaussian noise. The initial normal map may be a noise normal map generated by initialization at each preset viewing angle. There are multiple denoising networks, so that each denoising network is used to perform a denoising process. Multiple denoising networks are cascaded by using the output of the current denoising network as the input of the next denoising network, such as Figure 3 shown.
[0070] Specifically, by using multiple cascaded denoising networks, the feature information of the first image can be used as conditional information, and the initial image and initial normal map corresponding to each preset viewing angle can be denoised multiple times through iterative denoising, and the result after the last iterative denoising can be used as the second image and normal map finally generated at each preset viewing angle. Multiple iterative denoising can improve the generation quality of the second image and normal map, thereby improving the generation quality of the three-dimensional model.
[0071] It should be noted that when the generative pre-trained model is a latent diffusion model, the input initial image and initial normal map are the initial image and initial normal map represented in the latent space after encoding, and the result obtained by the final iteration is also the second image and normal map represented in the latent space, so it is necessary to decode the second image and normal map represented in the latent space to obtain the final second image and normal map.
[0072] For example, see Figure 3, each denoising network may include: a residual module, a first attention module, a second attention module, a third attention module and a fourth attention module. Each denoising network corresponds to a denoising process. Each denoising process is the same, wherein each denoising process may include the following steps S231-235:
[0073] S231, inputting the current image and the current normal map corresponding to each preset viewing angle into the residual module for convolution processing.
[0074] The residual module can be a network formed by stacking convolutional modules with skip connections. Specifically, for each denoising network, that is, each denoising process, the current image and the current normal map to be denoised are input into the residual module for convolution processing, and the processed current image and the current normal map are obtained and output. Figure 3 In the first denoising, the initial image and initial normal map corresponding to each preset view are respectively input as the current image and current normal map into the residual module in the first denoising network for convolution processing. In the subsequent denoising, the current image and current normal map output by the previous denoising network are input into the residual module in the current denoising network for convolution processing.
[0075] S232. Input the feature information of the first image and the current image and the current normal map corresponding to each preset viewing angle output by the residual module into the first attention module to perform embedding processing on the feature information of the first image.
[0076] Among them, the first attention module can be a multi-head attention module, which is used to embed the feature information of the first image. Specifically, the first attention module adds the feature information of the input first image to the noise level at the current moment and embeds it into the key information key and value information value of each input current image and current normal map for attention processing, so that the feature information of the first image exists in the current image and current normal map corresponding to each preset perspective output after embedding.
[0077] S233, input the current image and the current normal map corresponding to each preset perspective output by the first attention module into the second attention module to perform data fusion between multiple perspectives.
[0078] Specifically, the second attention module performs data fusion between multiple perspectives on the current image corresponding to each preset perspective of the input, obtains and outputs the current image corresponding to each preset perspective after fusion, and performs data fusion between multiple perspectives on the current normal map corresponding to each preset perspective of the input, obtains and outputs the current normal map corresponding to each preset perspective after fusion. Data fusion between multiple perspectives can improve the correlation level between different perspectives, thereby improving the content consistency between multiple perspectives.
[0079] Among them, in the data fusion process between multiple perspectives, for each preset perspective, based on the projection relationship between different preset perspectives, an associated perspective that overlaps with the preset perspective can be determined, and the current image corresponding to the preset perspective and the current image corresponding to the associated perspective are fused, such as multiplying or adding, to obtain the current image corresponding to the preset perspective after fusion, and the current normal map corresponding to the preset perspective and the current normal map corresponding to the associated perspective are fused, such as multiplying or adding, to obtain the current normal map corresponding to the preset perspective after fusion. By fusing only the data of the associated perspective, the fusion efficiency can be improved while ensuring the consistency of the multi-perspective content.
[0080] S234. Input the current image and the current normal map corresponding to each preset viewing angle output by the second attention module into the third attention module for joint optimization of the image and the normal map.
[0081] Specifically, the third attention module performs two optimizations on the current image and the current normal map corresponding to each preset input perspective, so that the current image and the current normal map output after optimization have a higher degree of alignment.
[0082] S235. Perform cross-attention processing on the feature information of the first image, the perspective information of each preset perspective, and the current image and current normal map corresponding to each preset perspective output by the third attention module to obtain the current image and current normal map corresponding to each preset perspective after denoising.
[0083] Specifically, the fourth attention module performs cross-attention processing on the input current image and the current normal map based on the feature information of the input first image and the perspective information of each preset perspective, so that the processed current image and the current normal map can maintain the feature information of the first image. The current image and the current normal map corresponding to each preset perspective output by the fourth attention module in the current denoising network are input into the residual module in the next denoising network for the next denoising process, and the current image and the current normal map corresponding to each preset perspective output by the fourth attention module in the last denoising network are used as the final second image and normal map of the target object at each preset perspective.
[0084] S240: Perform three-dimensional reconstruction based on the multiple second images to obtain a first three-dimensional model of the target object.
[0085] S250: Optimize the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model.
[0086] S260: Perform texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
[0087] The technical solution of the disclosed embodiment, by utilizing multiple denoising networks cascaded in a multi-view image generation model, performs multiple iterative denoising processes on the initial image and initial normal map corresponding to each preset view based on the first image, thereby generating a higher quality second image and normal map, further improving the generation quality of the three-dimensional model.
[0088] Figure 4 This is a flow chart of a method for generating a three-dimensional model provided by an embodiment of the present disclosure. Based on the above disclosed embodiments, the present disclosed embodiment optimizes the step of "performing three-dimensional reconstruction based on multiple second images to obtain a first three-dimensional model of the target object". The explanations of the terms that are the same or corresponding to the above disclosed embodiments are not repeated here.
[0089] like Figure 4 As shown, the three-dimensional model generation method specifically includes the following steps:
[0090] S410: Acquire a first image and texture description information of a target object.
[0091] S420: Generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on the multi-view image generation model and the first image.
[0092] S430: Perform encoding processing on each second image to obtain image feature information corresponding to each second image.
[0093] Specifically, see Figure 5 , input each second image into the image encoder for encoding processing, and obtain image feature information corresponding to each second image output by the image encoder. The image encoder can be but is not limited to a pre-trained ViT (Vision Transformer) model. The pre-trained ViT model is a deep learning model based on a visual attention mechanism, which is obtained by pre-training using a large-scale image dataset.
[0094] S440, performing synchronous iterative optimization of denoising and anchor point position updating based on the initial three-plane model, the initial offset grid and the image feature information to obtain a target three-plane model and a target offset grid.
[0095] Among them, the initial three-plane model can be a three-plane model Triplane generated by initializing with random Gaussian noise. The three-plane model Triplane is a way of representing a three-dimensional object using three planes. The initial offset grid can be a randomly generated offset network. The initial offset grid can include an initial offset corresponding to each anchor point in the three-dimensional space. The target three-plane model can be the three-plane model finally generated after denoising. The target offset grid can include a target position offset corresponding to each anchor point in the three-dimensional space. The anchor point can refer to the center point of each voxel in the three-dimensional space.
[0096] Specifically, efficient and high-quality 3D reconstruction can be achieved by using a hybrid three-plane model and a Gaussian three-dimensional representation. For example, the initial three-plane model and the initial offset mesh are generated by using random Gaussian noise initialization, and based on the image feature information of all second images, the initial three-plane model and the initial offset mesh are synchronously denoised and anchor point position updated iteratively optimized to obtain a more accurate target three-plane model and target offset mesh.
[0097] Exemplarily, step S440 may include the following steps S441-S446:
[0098] S441. Use the initial three-plane model and the initial offset mesh as the current three-plane model and the current offset mesh in the first iteration, respectively, wherein the current offset mesh includes the current position deviation corresponding to each anchor point in the three-dimensional space.
[0099] S442, input the current three-plane model and image feature information into the transformation network model for denoising, and obtain the current three-plane model after the current iteration.
[0100] Specifically, in each iteration, the current three-plane model is first denoised and then the anchor point position is updated. By using a transformation network model, such as a Transformer model, the current three-plane model is denoised based on the image feature information of all second images to obtain the current three-plane model after denoising.
[0101] S443. Determine the current position corresponding to each anchor point based on the current three-plane model after the current iteration and the current offset grid.
[0102] Specifically, based on the current position of each anchor point in the current three-plane model after the iterative denoising and the current position offset of each anchor point in the current offset grid, the current position and the current position offset of the same anchor point in the current three-plane model after the iterative denoising and the current offset grid are added, and the addition result is used as the updated current position to offset each anchor point and update the current position corresponding to each anchor point.
[0103] S444. Based on the image feature information set and the current position corresponding to each anchor point, determine the current image feature information corresponding to each anchor point, and based on the current three-plane model after the iteration and the current position corresponding to each anchor point, determine the current spatial feature information corresponding to each anchor point.
[0104] Specifically, projection mapping is performed on the current position corresponding to each anchor point to obtain the projection point of each anchor point in the second image, and based on the image feature information of each second image, the current image feature information corresponding to each anchor point is obtained. For example, the image feature information corresponding to the projection point of each anchor point in the second image is used as the current image feature information corresponding to the anchor point. Based on the current position corresponding to each anchor point, the current spatial feature information corresponding to each anchor point is determined from the current three-plane model after the current iteration, for example, the spatial feature information corresponding to the current position of a certain anchor point in the current three-plane model after the current iteration is used as the current spatial feature information corresponding to the anchor point.
[0105] S445, fusing the current image feature information and the current spatial feature information corresponding to each anchor point, predicting the offset grid generated by the current iteration, and adding the offset grid generated by the current iteration to the current offset grid to update the current offset grid.
[0106] Specifically, the current image feature information and current spatial feature information corresponding to each anchor point are input into the offset prediction model (such as the ConvGRU convolutional gated loop model) to predict the position offset of each anchor point generated during the current iteration, and the offset grid generated by the current iteration is obtained. The offset grid generated by the current iteration and the current offset grid are added to the position offset of the same anchor point, and the offset grid obtained after the addition is used as the updated current offset grid.
[0107] S446, performing the next iteration based on the updated current offset mesh and the current three-plane model after the current iteration, and using the current three-plane model and the current offset mesh obtained in the last iteration as the target three-plane model and the target offset mesh, respectively.
[0108] Specifically, based on the current offset mesh updated in the current iteration and the current three-plane model after the current iteration, the next iteration optimization is performed by returning to execute the above steps S442-S445, and the current three-plane model and current offset mesh obtained in the last iteration are used as the final target three-plane model and target offset mesh, respectively.
[0109] S450, based on the target three-plane model and the target offset grid, determine the target space feature information corresponding to each anchor point, and perform Gaussian decoding on the target space feature information corresponding to each anchor point to obtain a Gaussian volume corresponding to each anchor point.
[0110] Specifically, see Figure 5 Based on the current position of each anchor point in the target three-plane model and the target position offset of each anchor point in the target offset grid, the target position of each anchor point is determined, for example, the current position and target offset of the same anchor point are added to obtain the target position of the anchor point. The spatial feature information at the target position is obtained from the target three-plane model and used as the target spatial feature information corresponding to the anchor point. The target spatial feature information corresponding to each anchor point is Gaussian decoded by a Gaussian decoder, so that each anchor point is converted into an independent Gaussian volume.
[0111] S460: synthesize the Gaussian volumes of all anchor points to obtain a first three-dimensional model of the target object.
[0112] Specifically, according to the target position of each anchor point, the Gaussian bodies of all anchor points are synthesized to obtain a complete first three-dimensional model. By using the three-dimensional representation of the hybrid three-plane model and Gaussian, the three-dimensional model can be generated more quickly, and a Gaussian body is generated on each voxel, thereby improving the ability to depict the geometric details of the three-dimensional model. The expression of Gaussian bodies can also reduce video memory overhead, and the output Gaussian body position is not fixed at the position of the anchor point in the three-plane model, but is obtained through continuous iterative optimization, with higher accuracy and flexibility.
[0113] S470: Optimize the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model.
[0114] S480: Perform texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
[0115] The technical solution of the disclosed embodiment can quickly obtain a more accurate target three-plane model and target offset grid by performing synchronous iterative optimization of denoising and anchor point position updating based on the initial three-plane model, the initial offset grid and the image feature information of each second image; determine the target space feature information corresponding to each anchor point based on the target three-plane model and the target offset grid, and perform Gaussian decoding on the target space feature information corresponding to each anchor point to obtain a Gaussian body corresponding to each anchor point, synthesize the Gaussian bodies of all anchor points to obtain a first three-dimensional model of the target object, so that efficient and high-quality three-dimensional reconstruction can be achieved by using a hybrid three-plane model and Gaussian three-dimensional representation.
[0116] Figure 6This is a flow chart of a method for generating a three-dimensional model provided by an embodiment of the present disclosure. Based on the above disclosed embodiments, the present disclosed embodiment optimizes the step of "performing texture mapping on the second three-dimensional model based on the first image and texture description information to obtain a target three-dimensional model of the target object". The explanations of the terms that are the same or corresponding to the above disclosed embodiments are not repeated here.
[0117] like Figure 6 As shown, the three-dimensional model generation method specifically includes the following steps:
[0118] S610: Acquire a first image and texture description information of a target object.
[0119] S620: Generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on the multi-view image generation model and the first image.
[0120] S630: Perform three-dimensional reconstruction based on the multiple second images to obtain a first three-dimensional model of the target object.
[0121] S640: Optimize the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model.
[0122] S650, perform texture expansion on the second three-dimensional model, determine the texture coordinates corresponding to the surface position points in the second three-dimensional model, initialize the texture values corresponding to the texture coordinates, obtain an initial texture image corresponding to the second three-dimensional model, encode the initial texture image, and obtain texture feature information of the initial model.
[0123] The initial texture image is a noise texture image of the entire model, and the initial model texture feature information may be texture feature information of the entire model.
[0124] Specifically, the second three-dimensional model is texture-unwrapped in a texture coordinate system to obtain texture coordinates corresponding to surface positions in the second three-dimensional model, thereby establishing a mapping relationship between surface positions and texture coordinates. The texture value corresponding to each texture coordinate can be randomly initialized to obtain a complete initial texture image. The initial texture image is input into an image encoder for encoding processing to obtain initial model texture feature information in a latent space.
[0125] S660: Based on the first image and the texture description information, perform multiple iterations of denoising on the texture feature information of the initial model to obtain texture feature information of the target model corresponding to the second three-dimensional model.
[0126] Specifically, the first image, texture description information and initial model texture feature information can be input into the latent diffusion model for multiple iterative denoising. The latent diffusion model uses the input first image and texture description information as conditional information, performs multiple iterative denoising on the initial model texture feature information, and obtains the final target model texture feature information in the latent space.
[0127] Exemplarily, step S660 may include the following steps S661-S664:
[0128] S661. Use the initial model texture feature information as the current model texture feature information during the first iteration.
[0129] S662: Perform multi-view rendering on the texture feature information of the current model to obtain first texture feature information corresponding to each view.
[0130] Specifically, the current model texture feature information is rendered and projected to multiple viewing angles to obtain first texture feature information at each viewing angle. The first texture feature information refers to texture feature information of a single viewing angle. By sharing the current model texture feature information at multiple viewing angles, the consistency of content between different viewing angles can be ensured.
[0131] S663: Based on the first image and the texture description information, perform denoising on the first texture feature information to determine second texture feature information corresponding to each viewing angle.
[0132] Specifically, the first image and the texture description information are used as conditional information, the first texture feature information is denoised, and the second texture feature information corresponding to each viewing angle after denoising is determined.
[0133] Exemplarily, step S663 may include: inputting the first image and the texture description information into a potential diffusion model introduced into an image hint adapter to perform denoising processing on the first texture feature information, and obtaining second texture feature information corresponding to each viewing angle.
[0134] The image prompt adapter (IP adapter) is a method for simultaneously introducing images and texts into the latent diffusion model, so that the latent diffusion model can simultaneously denoise the images and texts as prompt information. The image prompt adapter can include two parts, namely, an image encoder that extracts image features from image prompts, and a decoupled cross-attention adaptation module that embeds image features into the latent diffusion model.
[0135] Specifically, by utilizing the latent diffusion model that introduces the image cue adapter, the association between the image and the text can be established, and denoising can be performed more accurately and efficiently based on the first image and the texture description information, directly generating the second texture feature information corresponding to each perspective, and ensuring the consistency of content between different perspectives. For example, the internal processing process of the latent diffusion model that introduces the image cue adapter is: feature extraction is performed on the first image and the texture description information respectively to obtain image feature information and text feature information, and cross-attention processing is performed on the image feature information and the text feature information respectively to obtain image attention information and text attention information; the image attention information, the text attention information and the first texture feature information are input into the latent diffusion model for denoising to obtain the second texture feature information corresponding to each perspective.
[0136] S664. Merge the second texture feature information corresponding to all viewing angles to obtain the current model texture feature information after the current iteration, perform the next iteration based on the current model texture feature information after the current iteration, and use the current model texture feature information obtained in the last iteration as the target model texture feature information corresponding to the second three-dimensional model.
[0137] Specifically, based on the weight corresponding to each perspective, the second texture feature information corresponding to all perspectives is weighted and summed to obtain the current model texture feature information of the entire model. The weight corresponding to each perspective may refer to the cosine value of the perspective and the normal. Based on the current model texture feature information after the current iteration, the next iteration denoising is performed by returning to execute the above steps S662-S664, the loop is iterated multiple times, and the current model texture feature information obtained in the last iteration is used as the final target model texture feature information.
[0138] S670: Decode the texture feature information of the target model to obtain a target texture image, and paste the target texture image onto the second three-dimensional model to obtain a target three-dimensional model of the target object.
[0139] Specifically, the texture feature information of the target model in the latent space is decoded to obtain a target texture image in the explicit space, and based on the mapping relationship between the surface position points and the texture coordinates, the target texture image is pasted onto the surface of the second three-dimensional model, thereby completing the texture mapping of the second three-dimensional model and obtaining a more realistic target three-dimensional model.
[0140] The technical solution of the disclosed embodiment obtains initial model texture feature information by encoding the initial texture image; performs multiple iterative denoising on the initial model texture feature information based on the first image and texture description information to obtain target model texture feature information corresponding to the second three-dimensional model; decodes the target model texture feature information to obtain a higher quality target texture image, and attaches the target texture image to the second three-dimensional model, thereby improving the realism and reconstruction quality of the target three-dimensional model.
[0141] Figure 7 A schematic diagram of the structure of a three-dimensional model generating device provided by an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the device specifically includes: an information acquisition module 710, a multi-view image generation module 720, a three-dimensional reconstruction module 730, a model optimization module 740 and a texture mapping module 750.
[0142] Among them, the information acquisition module 710 is used to acquire a first image and texture description information of a target object; the multi-view image generation module 720 is used to generate a second image of the target object at each preset viewpoint and a normal map corresponding to the second image based on a multi-view image generation model and the first image; the three-dimensional reconstruction module 730 is used to perform three-dimensional reconstruction based on multiple second images to obtain a first three-dimensional model of the target object; the model optimization module 740 is used to optimize the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model; the texture mapping module 750 is used to perform texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
[0143] The technical solution provided by the disclosed embodiment generates a model and a first image of a target object based on a multi-view image, generates a second image of the target object at each preset view and a normal map corresponding to the second image, and performs three-dimensional reconstruction based on multiple second images to obtain a first three-dimensional model of the target object; optimizes the first three-dimensional model based on the normal map corresponding to the second image to obtain a higher quality second three-dimensional model, and performs more realistic texture mapping on the second three-dimensional model based on the first image and texture description information to obtain a higher quality target three-dimensional model of the target object, thereby ensuring the quality of the three-dimensional model generation. By only taking a first image of any view, there is no need for three-dimensional scanning and shooting, and thus no professional participation is required, the convenience of three-dimensional model generation is improved and the cost of three-dimensional model generation is reduced.
[0144] Based on the above technical solution, the multi-view image generation module 720 includes:
[0145] An image feature extraction unit, configured to input the first image into an image encoder in the multi-view image generation model to perform feature extraction, thereby obtaining feature information of the first image;
[0146] A multi-view image generation unit is used to input the feature information of the first image and the initial image and initial normal map corresponding to each preset view into multiple cascaded denoising networks in the multi-view image generation model to perform multiple iterative denoising, and obtain the second image of the target object at each preset view and the normal map corresponding to the second image after the last iterative denoising.
[0147] On the basis of the above technical solutions, each denoising network includes: a residual module, a first attention module, a second attention module, a third attention module and a fourth attention module; wherein the multi-view image generation unit performs each denoising by executing the following steps:
[0148] Inputting the current image and the current normal map corresponding to each preset viewing angle into the residual module for convolution processing;
[0149] Inputting the feature information of the first image and the current image and the current normal map corresponding to each preset viewing angle output by the residual module into the first attention module to perform embedding processing on the feature information of the first image;
[0150] Inputting the current image and the current normal map corresponding to each preset perspective output by the first attention module into the second attention module to perform data fusion between multiple perspectives;
[0151] Inputting the current image and the current normal map corresponding to each preset viewing angle output by the second attention module into the third attention module for joint optimization of the image and the normal map;
[0152] The feature information of the first image, the perspective information of each preset perspective, and the current image and current normal map corresponding to each preset perspective output by the third attention module are cross-attention processed to obtain the current image and current normal map corresponding to each preset perspective after denoising.
[0153] On the basis of the above technical solutions, the multi-view image generation model is generated by fine-tuning the generative pre-trained model based on the sample data set and the target loss function in advance;
[0154] The target loss function includes a perceptual loss function and a noise loss function, wherein the perceptual loss function is used to characterize the loss value between the sample denoised image and the predicted denoised image, the sample denoised image is determined based on the sample noisy image and the sample noise, and the predicted denoised image is determined based on the sample noisy image and the predicted noise;
[0155] The noise loss function is used to characterize the loss value between sample noise and prediction noise.
[0156] Based on the above technical solutions, the 3D reconstruction module 730 includes:
[0157] An image encoding unit, configured to perform encoding processing on each of the second images to obtain image feature information corresponding to each of the second images;
[0158] an iterative optimization unit, configured to perform synchronous iterative optimization of denoising and anchor point position updating based on the initial three-plane model, the initial offset grid and the image feature information, to obtain a target three-plane model and a target offset grid, wherein the target offset grid includes a target position offset corresponding to each anchor point in the three-dimensional space;
[0159] A Gaussian volume generation unit is used to determine the target space feature information corresponding to each anchor point based on the target three-plane model and the target offset grid, and perform Gaussian decoding on the target space feature information corresponding to each anchor point to obtain a Gaussian volume corresponding to each anchor point;
[0160] The first three-dimensional model generating unit is used to synthesize the Gaussian volumes of all anchor points to obtain a first three-dimensional model of the target object.
[0161] On the basis of the above technical solutions, an iterative optimization unit is specifically used to:
[0162] The initial three-plane model and the initial offset grid are used as the current three-plane model and the current offset grid at the first iteration, respectively, wherein the current offset grid includes the current position deviation corresponding to each anchor point in the three-dimensional space; the current three-plane model and the image feature information are input into the transformation network model for denoising processing to obtain the current three-plane model after the iteration; the current position corresponding to each anchor point is determined based on the current three-plane model after the iteration and the current offset grid; the current image feature information corresponding to each anchor point is determined based on the image feature information set and the current position corresponding to each anchor point, and the current spatial feature information corresponding to each anchor point is determined based on the current three-plane model after the iteration and the current position corresponding to each anchor point; the current image feature information corresponding to each anchor point and the current spatial feature information are fused to predict the offset grid generated by the iteration, and the offset grid generated by the iteration and the current offset grid are added to update the current offset grid; the next iteration is performed based on the updated current offset grid and the current three-plane model after the iteration, and the current three-plane model and the current offset grid obtained in the last iteration are used as the target three-plane model and the target offset grid, respectively.
[0163] Based on the above technical solutions, the model optimization module 740 is specifically used to:
[0164] The first three-dimensional model is meshed smoothly and optimized based on the normal map by using a continuous mesh reconstruction method to obtain an optimized second three-dimensional model.
[0165] Based on the above technical solutions, the texture mapping module 750 includes:
[0166] an initial model texture feature information determination unit, configured to perform texture expansion on the second three-dimensional model, determine texture coordinates corresponding to surface points in the second three-dimensional model, initialize texture values corresponding to the texture coordinates, obtain an initial texture image corresponding to the second three-dimensional model, and perform encoding processing on the initial texture image to obtain initial model texture feature information;
[0167] a target model texture feature information determining unit, configured to perform multiple iterations of denoising on the initial model texture feature information based on the first image and the texture description information, so as to obtain the target model texture feature information corresponding to the second three-dimensional model;
[0168] The target three-dimensional model generating unit is used to decode the texture feature information of the target model to obtain a target texture image, and paste the target texture image onto the second three-dimensional model to obtain a target three-dimensional model of the target object.
[0169] On the basis of the above technical solutions, the target model texture feature information determination unit is specifically used to:
[0170] The initial model texture feature information is used as the current model texture feature information at the first iteration; the current model texture feature information is rendered from multiple perspectives to obtain first texture feature information corresponding to each perspective; based on the first image and the texture description information, the first texture feature information is denoised to determine second texture feature information corresponding to each perspective; the second texture feature information corresponding to all perspectives is merged to obtain the current model texture feature information after the iteration, the next iteration is performed based on the current model texture feature information after the iteration, and the current model texture feature information obtained from the last iteration is used as the target model texture feature information corresponding to the second three-dimensional model.
[0171] On the basis of the above technical solutions, the target model texture feature information determination unit is specifically used to:
[0172] The first image and the texture description information are input into a latent diffusion model introduced into an image prompt adapter to perform denoising on the first texture feature information, so as to obtain second texture feature information corresponding to each viewing angle.
[0173] The three-dimensional model generation device provided in the embodiments of the present disclosure can execute the three-dimensional model generation method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0174] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0175] Figure 8 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 8 , which shows an electronic device (eg, Figure 8 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0176] like Figure 8 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0177] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0178] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0179] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0180] The electronic device provided in the embodiment of the present disclosure and the three-dimensional model generation method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0181] An embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the three-dimensional model generation method provided in the above embodiment is implemented.
[0182] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0183] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0184] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0185] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a first image and texture description information of a target object; generates a second image of the target object at each preset perspective and a normal map corresponding to the second image based on a multi-perspective image generation model and the first image; performs three-dimensional reconstruction based on multiple second images to obtain a first three-dimensional model of the target object; optimizes the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model; and performs texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
[0186] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0187] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the three-dimensional model generation method provided in the above embodiment when executed by a processor.
[0188] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0189] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0190] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0191] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0192] 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.
[0193] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0194] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0195] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A three-dimensional model generation method, characterized in that: include: Acquire a first image and texture description information of a target object; Based on the multi-view image generation model and the first image, generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image; Performing three-dimensional reconstruction based on the plurality of second images to obtain a first three-dimensional model of the target object; Based on the normal map, optimizing the first three-dimensional model to obtain an optimized second three-dimensional model; Based on the first image and the texture description information, texture mapping is performed on the second three-dimensional model to obtain a target three-dimensional model of the target object.
2. The three-dimensional model generation method according to claim 1, characterized in that: Generating a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on a multi-view image generation model and the first image, comprising: Inputting the first image into an image encoder in the multi-view image generation model to perform feature extraction to obtain feature information of the first image; The feature information of the first image and the initial image and initial normal map corresponding to each preset viewing angle are input into multiple cascaded denoising networks in the multi-view image generation model for multiple iterative denoising, and the second image of the target object at each preset viewing angle and the normal map corresponding to the second image after the last iterative denoising are obtained.
3. The three-dimensional model generation method according to claim 2, characterized in that: Each denoising network includes: a residual module, a first attention module, a second attention module, a third attention module and a fourth attention module; wherein each denoising process includes: Inputting the current image and the current normal map corresponding to each preset viewing angle into the residual module for convolution processing; Inputting the feature information of the first image and the current image and the current normal map corresponding to each preset viewing angle output by the residual module into the first attention module to perform embedding processing on the feature information of the first image; Inputting the current image and the current normal map corresponding to each preset perspective output by the first attention module into the second attention module to perform data fusion between multiple perspectives; Inputting the current image and the current normal map corresponding to each preset viewing angle output by the second attention module into the third attention module for joint optimization of the image and the normal map; The feature information of the first image, the perspective information of each preset perspective, and the current image and current normal map corresponding to each preset perspective output by the third attention module are cross-attention processed to obtain the current image and current normal map corresponding to each preset perspective after denoising.
4. The three-dimensional model generation method according to claim 1, characterized in that: The multi-view image generation model is generated by fine-tuning a generative pre-trained model based on a sample data set and a target loss function; The target loss function includes a perceptual loss function and a noise loss function, wherein the perceptual loss function is used to characterize the loss value between the sample denoised image and the predicted denoised image, the sample denoised image is determined based on the sample noisy image and the sample noise, and the predicted denoised image is determined based on the sample noisy image and the predicted noise; The noise loss function is used to characterize the loss value between sample noise and prediction noise.
5. The three-dimensional model generation method according to claim 1, characterized in that: Performing three-dimensional reconstruction based on the plurality of second images to obtain a first three-dimensional model of the target object includes: Performing encoding processing on each of the second images to obtain image feature information corresponding to each of the second images; Based on the initial three-plane model, the initial offset grid and the image feature information, synchronous iterative optimization of denoising and anchor point position updating is performed to obtain a target three-plane model and a target offset grid, wherein the target offset grid includes a target position offset corresponding to each anchor point in the three-dimensional space; Based on the target three-plane model and the target offset grid, determine the target space feature information corresponding to each anchor point, and perform Gaussian decoding on the target space feature information corresponding to each anchor point to obtain a Gaussian volume corresponding to each anchor point; The Gaussian volumes of all anchor points are synthesized to obtain a first three-dimensional model of the target object.
6. The three-dimensional model generation method according to claim 5, characterized in that: Based on the initial three-plane model, the initial offset grid and the image feature information, synchronous iterative optimization of denoising and anchor point position update is performed to obtain a target three-plane model and a target offset grid, including: The initial three-plane model and the initial offset mesh are used as the current three-plane model and the current offset mesh in the first iteration, respectively, wherein the current offset mesh includes the current position deviation corresponding to each anchor point in the three-dimensional space; Inputting the current three-plane model and the image feature information into the transformation network model for denoising, and obtaining the current three-plane model after the current iteration; Determine the current position of each anchor point based on the current three-plane model and the current offset grid after the current iteration; Based on the image feature information set and the current position corresponding to each anchor point, determine the current image feature information corresponding to each anchor point, and based on the current three-plane model after the iteration and the current position corresponding to each anchor point, determine the current spatial feature information corresponding to each anchor point; The current image feature information and the current spatial feature information corresponding to each anchor point are fused to predict the offset grid generated by the current iteration, and the offset grid generated by the current iteration is added to the current offset grid to update the current offset grid; The next iteration is performed based on the updated current offset mesh and the current three-plane model after the current iteration, and the current three-plane model and the current offset mesh obtained in the last iteration are used as the target three-plane model and the target offset mesh, respectively.
7. The three-dimensional model generation method according to claim 1, characterized in that: Optimizing the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model includes: The first three-dimensional model is meshed smoothly and optimized based on the normal map by using a continuous mesh reconstruction method to obtain an optimized second three-dimensional model.
8. The three-dimensional model generation method according to claim 1, characterized in that: Based on the first image and the texture description information, texture mapping is performed on the second three-dimensional model to obtain a target three-dimensional model of the target object, including: Performing texture expansion on the second three-dimensional model, determining texture coordinates corresponding to surface points in the second three-dimensional model, initializing texture values corresponding to the texture coordinates, obtaining an initial texture image corresponding to the second three-dimensional model, encoding the initial texture image, and obtaining texture feature information of the initial model; Based on the first image and the texture description information, performing multiple iterations of denoising on the texture feature information of the initial model to obtain texture feature information of the target model corresponding to the second three-dimensional model; The texture feature information of the target model is decoded to obtain a target texture image, and the target texture image is pasted onto the second three-dimensional model to obtain a target three-dimensional model of the target object.
9. The three-dimensional model generation method according to claim 8, characterized in that: Based on the first image and the texture description information, the texture feature information of the initial model is optimized for multiple iterations to obtain the texture feature information of the target model corresponding to the second three-dimensional model, including: Using the initial model texture feature information as the current model texture feature information during the first iteration; Perform multi-view rendering on the texture feature information of the current model to obtain first texture feature information corresponding to each view; Based on the first image and the texture description information, denoising the first texture feature information to determine second texture feature information corresponding to each viewing angle; The second texture feature information corresponding to all viewing angles is merged to obtain the current model texture feature information after the current iteration, the next iteration is performed based on the current model texture feature information after the current iteration, and the current model texture feature information obtained in the last iteration is used as the target model texture feature information corresponding to the second three-dimensional model.
10. The three-dimensional model generation method according to claim 9, characterized in that: Based on the first image and the texture description information, denoising the first texture feature information to determine second texture feature information corresponding to each viewing angle includes: The first image and the texture description information are input into a latent diffusion model introduced into an image prompt adapter to perform denoising on the first texture feature information, so as to obtain second texture feature information corresponding to each viewing angle.
11. A three-dimensional model generating device, characterized in that: include: An information acquisition module, used to acquire a first image and texture description information of a target object; A multi-view image generation module, used to generate a second image of the target object at each preset viewing angle and a normal map corresponding to the second image based on a multi-view image generation model and the first image; A three-dimensional reconstruction module, used for performing three-dimensional reconstruction based on the plurality of second images to obtain a first three-dimensional model of the target object; A model optimization module, used for optimizing the first three-dimensional model based on the normal map to obtain an optimized second three-dimensional model; A texture mapping module is used to perform texture mapping on the second three-dimensional model based on the first image and the texture description information to obtain a target three-dimensional model of the target object.
12. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional model generation method as described in any one of claims 1-9.
13. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the three-dimensional model generation method as described in any one of claims 1-10 when executed by a computer processor.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the three-dimensional model generation method as described in any one of claims 1 to 10.
Citation Information
Cited By
Three-dimensional object model generation method and device, storage medium and computer equipment
CN119762681A
Surface normal estimation method, device and equipment of target object and medium
CN120147395A
Three-dimensional model generation method and apparatus, and device, medium and program product
WO2026081558A1