Neural radiation field three-dimensional reconstruction method and system based on depth dynamic sampling

Through the depth dynamic sampling neural radiation field method, RGB-D images are used to train the neural radiation field network and perform depth completion, which solves the problems of blurred rendering and high computing cost caused by a small number of images in the existing technology, and achieves high-quality 3D Reconstruction and fast rendering effects.

CN118840474APending Publication Date: 2024-10-25NINGBO INST OF MATERIALS TECH & ENG CHINESE ACAD OF SCI
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202310461310.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-25
Publication Date
2024-10-25

Smart Images

  • Figure CN118840474A_ABST
    Figure CN118840474A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional reconstruction method and system of a neural radiation field based on depth dynamic sampling. The three-dimensional reconstruction method comprises the steps that S1, RGB-D images of all view angles of a scene are acquired; s2, training a neural radiation field network by using the RGB-D image; s3, generating a color point cloud of the scene based on the RGB-D image of each view angle of the scene, performing forward projection on the training image based on depth information and ICP fusion point cloud, and constructing a three-dimensional model; obtaining a depth image of a corresponding pose of a new view angle to be rendered on the point cloud model; s4, a depth image with a hole under a new visual angle is complemented through a depth complementation algorithm; and S5, rendering the RGB image under the specified new view angle by using the depth image under the new view angle. The neural radiation field reconstruction method disclosed by the invention has relatively good performance and also has a relatively good visual effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a three-dimensional reconstruction method of a neural radiation field based on depth dynamic sampling, and in particular to a three-dimensional reconstruction method and system of an implicit neural radiation field using depth information as prior information, belonging to the field of image processing technology. Background Art

[0002] Graphically realistic rendering has a wide range of applications, including virtual reality, autonomous driving, 3D capture, and even 3D visualization, but there are significant challenges in displaying photorealistic renderings of the world from any angle. Traditional modeling methods, while producing high-quality scene geometry, are often too expensive and time-consuming. Therefore, researchers have developed image-based rendering (IBR), which combines scene-based geometry modeling and image-based view interpolation. Despite great progress, there are still certain problems. For some environments, it is necessary not only to depict realistic and complex scenes, but also to consider changes in light and shadow and visual angles. To overcome these limitations, the rise of neural radiance fields (NeRF) technology has made the interaction between humans and scenes closer. This method models the scene as a continuous volume field parameterized by a neural network, and uses MLP to minimize the loss of all observed views, which produces amazing results in the synthesis of new views of real scenes.

[0003] Although NeRF is able to synthesize photo-quality images with complex geometry and appearance, there are still many problems with NeRF: First, the NeRF method requires a large number of images, usually hundreds of images for a "classroom" size scene. Figure 2 As shown in the figure, the NeRF method is not suitable for scenes with dozens of images, and the rendering results will have most of the blurred areas. This is because NeRF relies purely on RGB values ​​to determine the correspondence between images. Only a sufficient number of images can overcome this blur generation to achieve high-quality visual effects. When the images are significantly reduced, NeRF can no longer build a good 3D scene by relying solely on color supervision. Secondly, the surface of the 3D model obtained by NeRF with a small amount of input is rough. Because NeRF does not intersect the surface of the object at a single point, but represents the probability of a series of points, the rendering process of the model depends on the RGB values ​​of the image. Therefore, when only a small number of input images are available, the difference between the rendered image and the training image view is too large, making the NeRF method unable to find the exact intersection of the camera light and the scene geometry, and displaying blurred rendering ( Figure 2). Third, the NeRF method requires nearly 200 forward predictions for the MLP deep model for each pixel when generating the original image. Although the scale of a single calculation is small, in order to complete the rendering of the entire image, the pixel-by-pixel calculation requires a lot of computational cost. Secondly, the training time required for each scene by NeRF is also slow because each pixel requires a large number of sampling points to determine its spatial position. Summary of the invention

[0004] In view of the above-mentioned defects or problems of the existing neural radiation field technology, the main purpose of the present invention is to provide a three-dimensional reconstruction method and system of the neural radiation field based on deep dynamic sampling, so as to overcome the shortcomings of the prior art.

[0005] In order to achieve the aforementioned object of the invention, the present invention adopts the following scheme:

[0006] One aspect of the present invention provides a three-dimensional reconstruction method of a neural radiation field based on deep dynamic sampling, the three-dimensional reconstruction method comprising the following steps:

[0007] Step S1: Obtain RGB-D images of each viewpoint of the scene;

[0008] Step S2: training a neural radiation field network using the RGB-D image;

[0009] Step S3: generating a three-dimensional model of the scene based on the RGB-D images of each viewing angle of the scene; obtaining a depth map of the corresponding position of the new viewing angle to be rendered on the three-dimensional model;

[0010] Step S4: using a depth completion algorithm to complete the depth image with holes under a new perspective;

[0011] Step S5: Rendering the RGB image at the specified new perspective using the depth image after depth completion at the new perspective.

[0012] In one embodiment, in step S2, using the RGB-D image to train the neural radiation field network specifically includes: using multiple RGB-D images to train the neural radiation field, and for each RGB-D image, performing the following operations:

[0013] Step S21: construct a truncated signed distance function, taking the distance between the depth image and the sampling point as a factor;

[0014] Step S22: determining the current sampling position according to the value of the truncated signed distance function;

[0015] Step S23: truncating the sampling space of the neural radiation field based on the current distance function value;

[0016] Step S24: Calculate the total loss function based on the current color image and depth data.

[0017] In one embodiment, in step S2, depth information is used to enhance the training of neural radiation field, and the total loss function It is expressed as:

[0018]

[0019]

[0020]

[0021] Among them, L depth is the depth loss, is the depth value predicted by the network, Z(r) is the actual depth value; L color is the color loss; r is the ray set of each batch, C(r) is the real RGB color, is the RGB color predicted by the coarse network, is the RGB color predicted by the fine network; λ is the weight; R is the ray set.

[0022] In one embodiment, in step S2, depth information is used to enhance the training of the neural radiation field, and the ray sampling method is expressed as:

[0023] For any pixel P i,j ∈R 3×3 , use the Level Set method to construct the distance function D i,j , when the sampling point is on the surface of the object D i,j = 0, when the sampling point is from near to far, D i,j It gradually increases between the interval [-0.5, 0.5], and the expression is as follows:

[0024] F(z_val)=z_val-depth,z_val∈Ω

[0025] Among them, z_val is the position of the sampling point, depth is the depth value, and Ω is the sampling space.

[0026] In one embodiment, in step S5, rendering the RGB image at the specified new viewing angle using the depth image at the new viewing angle specifically includes:

[0027] Step S51: synthesizing a depth image under a new viewing angle according to the depth image, and completing the depth image using a depth completion algorithm;

[0028] Step S52: Rendering an RGB image at the new perspective by volume rendering according to the depth data at the new perspective.

[0029] Another aspect of the present invention provides a three-dimensional reconstruction system of a neural radiation field based on deep dynamic sampling, the three-dimensional reconstruction system comprising:

[0030] An RGB-D image acquisition module, wherein the RGB-D image acquisition module is used to acquire RGB-D images of each viewing angle of the scene;

[0031] A neural radiation field network training module, wherein the neural radiation field network training module is used to train a neural radiation field network using the RGB-D image;

[0032] A new-viewing-angle depth image acquisition module is used to generate a three-dimensional model of the scene based on the RGB-D images of each viewing angle of the scene; and obtain a depth map of the corresponding position of the new viewing angle to be rendered on the three-dimensional model;

[0033] A depth image completion module, wherein the depth image completion module is used to complete a depth image with holes under a new perspective by using a depth completion algorithm;

[0034] An image rendering module is used to render an RGB image at a specified new viewing angle using a depth image after depth completion at a new viewing angle.

[0035] In one embodiment, the neural radiation field network training module uses the RGB-D image to train the neural radiation field network, specifically: using multiple RGB-D images to train the neural radiation field, for each RGB-D image, performing the following operations: constructing a truncated signed distance function, taking the distance between the depth image and the sampling point as a factor; judging the current sampling position according to the value of the truncated signed distance function; truncating the sampling space of the neural radiation field based on the current distance function value; and calculating the total loss function based on the current color image and depth data.

[0036] In one embodiment, the neural radiation field network training module uses depth information to enhance the training of the neural radiation field, and the total loss function It is expressed as:

[0037]

[0038]

[0039]

[0040] Among them, L depth is the depth loss, is the depth value predicted by the network, Z(r) is the actual depth value; L color is the color loss; r is the ray set of each batch, C(r) is the real RGB color, is the RGB color predicted by the coarse network, is the RGB color predicted by the fine network; λ is the weight; R is the ray set.

[0041] In one embodiment, the neural radiation field network training module uses depth information to enhance the training of the neural radiation field, and the ray sampling method is expressed as:

[0042] For any pixel P i,j ∈R 3×3 , use the Level Set method to construct the distance function D i,j , when the sampling point is on the surface of the object D i,j = 0, when the sampling point is from near to far, D i,j It gradually increases between the interval [-0.5, 0.5], and the expression is as follows:

[0043] F(z_val)=z_val-depth,z_val∈Ω

[0044] Among them, z_val is the position of the sampling point, depth is the depth value, and Ω is the sampling space.

[0045] In one embodiment, the image rendering module uses the depth image at the new perspective to render a specified RGB image at the new perspective, specifically: synthesizing a depth image at the new perspective based on the depth image, and completing the depth image using a depth completion algorithm; rendering the RGB image at the new perspective through volume rendering based on the depth data of the new perspective.

[0046] Compared with the prior art, the present invention has at least the following advantages:

[0047] (1) The present invention provides a three-dimensional reconstruction method and system of a neural radiation field based on deep dynamic sampling, which can synthesize high-quality new-perspective images using sparse perspective images.

[0048] (2) The present invention provides a three-dimensional reconstruction method and system of a neural radiation field based on deep dynamic sampling, which can achieve a fast rendering effect in the rendering stage.

[0049] (3) The present invention provides a three-dimensional reconstruction method and system of neural radiation field based on deep dynamic sampling, which can reconstruct large-scale scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 It is a graph showing the variation of the sampling range of light and the constructed distance function;

[0052] Figure 2 It is the local effect of the NeRF reconstructed image on the image; Figure 2 (a) in the equation is the real data. Figure 2 (b) in the figure is the local real data. Figure 2 (c) in the figure is the nerve radiation field;

[0053] Figure 3 It is the overall framework of the network of the three-dimensional reconstruction method of the neural radiation field based on deep dynamic sampling, including the MLP network structure and the right half sampling range part;

[0054] Figure 4 is a schematic diagram of a rendering part of a three-dimensional reconstruction method of a neural radiation field based on deep dynamic sampling;

[0055] Figure 5 are kernels of different sizes for processing hole images; Figure 5 (a) in the figure is the Diamond kernel. Figure 5 (b) in the figure is the Full kernel. Figure 5 (c) in the figure is the Cross kernel. Figure 5 (d) in the figure is the Circle kernel;

[0056] Figure 6 (a) in the figure is a depth defect on the depth data; Figure 6 (b) in the figure is the deep recovery achieved by the complementary algorithm;

[0057] Figure 7 It is a flowchart of a three-dimensional reconstruction method of neural radiation field based on deep dynamic sampling. DETAILED DESCRIPTION

[0058] In view of the shortcomings of the prior art, the inventors proposed the technical solution of the present invention, which effectively solves the above-mentioned defects or problems of the existing neural radiation field technology. The present invention is a three-dimensional reconstruction method of neural radiation field based on deep dynamic sampling. The proposed method is comparable to some of the most advanced neural radiation field reconstruction methods in performance and has good visual effects.

[0059] In order to make the purpose, technical scheme and advantages of the present invention clearer, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Examples of these preferred embodiments are illustrated in the accompanying drawings. The embodiments of the present invention shown in the accompanying drawings and described according to the accompanying drawings are merely exemplary, and the present invention is not limited to these embodiments.

[0060] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0061] In a typical implementation of the present application, the following steps are included:

[0062] Step 1: Get an RGB-D image of a scene. The RGB-D image includes an RGB image and a depth image. Specifically, the RGB-D image of the scene can be obtained through an RGB-D camera. The RGB-D image is 10-20 randomly collected pictures.

[0063] Step 2: Use RGB-D images to train the neural radiation field network. This includes: constructing a truncated signed distance function, taking the distance between the depth image and the sampling point as a factor; judging the current sampling position based on the value of the truncated signed distance function; truncating the sampling space of the neural radiation field based on the current distance function value; and calculating the total loss function based on the current color image and depth data.

[0064] The above-described use of RGB-D images to train the neural radiance field network is combined with dynamic depth supervision and color supervision. Dynamic depth supervision refers to limiting the sampling range of sampling points based on depth information.

[0065] Using depth information to enhance the training of neural radiation fields, the total loss function It is expressed as:

[0066]

[0067]

[0068]

[0069] Among them, L depth is the depth loss, is the depth value predicted by the network, Z(r) is the actual depth value; L color is the color loss; r is the ray set of each batch, C(r) is the real RGB color, is the RGB color predicted by the coarse network, is the RGB color predicted by the fine network; λ is the weight, which is generally 0.1; R is the ray set.

[0070] Note that even if the final rendering comes from We still minimize loss so that the weight distribution from the coarse network can be used to distribute samples in the fine network.

[0071] Specifically, the above step 2 includes: inputting multiple RGB-D images into the MLP network, and performing the following operations for each RGB-D image input:

[0072] Sub-step 1: Construct a truncated signed distance function, taking the distance between the depth image and the sampling point as the constraint of the function;

[0073] like Figure 1 As shown in Figure 2, for any pixel P i,j ∈R 3×3 , we use the Level Set method to construct the distance function D i,j When the sampling point is on the surface of the object D i,j = 0, when the sampling point is from near to far, D i,j It gradually increases between the interval [-0.5, 0.5], and the expression is as follows:

[0074] F(z_val)=z_val-depth,z_val∈Ω

[0075] Among them, z_val is the position of the sampling point, depth is the depth value, and Ω is the sampling space.

[0076] Sub-step 2: Color values ​​and voxel density are trained by inputting the position, orientation, and truncated signed distance function values ​​into the MLP network.

[0077] like Figure 3 As shown, we propose a new network architecture that replaces the traditional 5D vector function to represent the depth of the scene with a 6D vector function. Previously, we approximated this continuous 6D scene display MLP network F Θ and optimize its weights Θ, mapping from each input 6d coordinate to the corresponding volume density and directional emission color:

[0078] F Θ (X, d, D) = (c, σ)

[0079] Where X is the three-dimensional position (×, y, z), d is the viewing direction (θ, φ), D is the relationship function between the point and the depth information, c is the output radiation (RGB color) at X, and σ is the volume density at X.

[0080] Step 3: Forward project the training image based on the depth information and ICP fusion point cloud to build a 3D model, and then obtain the depth information of the point cloud model that needs to render the corresponding pose of the new perspective.

[0081] like Figure 4 As shown, we project each pixel into the three-dimensional space according to the depth information. For adjacent RGBD images, the identity matrix is ​​used as initialization. For non-adjacent RGBD images, wide baseline matching is used as initialization.

[0082] Specifically, we compute OpenCV ORB features to match sparse features on a wide baseline image and then perform 5-point RANSAC to estimate a rough alignment.

[0083] Finally, a depth image from a new perspective is obtained on the 3D model.

[0084] Step 4: Use the depth completion algorithm to complete the depth image with holes under the new perspective.

[0085] Since there is a lot of noise in the LiDAR scan data, especially there will be depth holes in the glass material, and the depth image under the new perspective will have some holes due to the difference in perspective. We use IP_Basic depth completion technology to complete the depth. The depth completion problem can be described as follows. Given a graph I∈R M×N and depth data D sparse ∈R M×N turn up It approximates a real function f: R M×N ×R M×N →R M×N , where f(I, D sparse )=D dense . This problem can be stated as:

[0086]

[0087] Here, D sparse is related to I and D sparse Output dense depth map of the same size as , and replace zero values ​​with depth estimates. Figure 5 We achieve this by using kernels of different sizes to process the operations as shown in Figure 6For the depth image shown in (a), the first step is to use the Diamond kernel to fill the missing information next to the valid depth. The second step is to use a 5×5 Full kernel for closure operation to connect nearby depth values. The third step is to use a 7×7 Full kernel to handle small to medium-sized holes. The fourth step is to use a 31×31 Full kernel to handle the remaining larger holes, keeping the original valid pixels unchanged. The fifth step is to use a 5×5 Cross kernel to remove outliers that appear during the expansion process. Finally, a 5×5 Gaussian blur is used for smoothing. The result of the supplemented depth is obtained, as shown in Figure 6 (b) as shown.

[0088] Step 5: Use the depth image at the new perspective to render the RGB image at the specified new perspective, including synthesizing the depth image at the new perspective based on the depth image, completing the depth image with a depth completion algorithm; and rendering the RGB image at the new perspective through volume rendering based on the depth data of the new perspective.

[0089] Specifically, perform the following operations:

[0090] To get an image of the new view, we need to render the color of each pixel individually. Figure 2 As shown, to render pixel P, we emit a ray r(t) = r o +tr d , t∈[t n , t f ], at t n , t f N sampling points are distributed between The color C of each pixel p is obtained by the volume rendering formula along the ray r:

[0091]

[0092] Among them, δ i =ti+1-ti is the distance between adjacent samples. This is from (c i , σ i ) values ​​are calculated from the set The function is differentiable and simplifies to the traditional alpha value α i =1-exp(-σ i δ i ).

[0093] It should be understood that although this specification is described according to implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions of each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A three-dimensional reconstruction method of neural radiation field based on deep dynamic sampling, characterized in that: The three-dimensional reconstruction method comprises the following steps: Step S1: Obtain RGB-D images of each viewpoint of the scene; Step S2: training a neural radiation field network using the RGB-D image; Step S3: generating a three-dimensional model of the scene based on the RGB-D images of each viewing angle of the scene; obtaining a depth map of the corresponding position of the new viewing angle to be rendered on the three-dimensional model; Step S4: using a depth completion algorithm to complete the depth image with holes under a new perspective; Step S5: Rendering the RGB image at the specified new perspective using the depth image after depth completion at the new perspective.

2. The three-dimensional reconstruction method according to claim 1, characterized in that: In the step S2, the neural radiation field network is trained using the RGB-D image, specifically including: using multiple RGB-D images to train the neural radiation field, and for each RGB-D image, performing the following operations: Step S21: construct a truncated signed distance function, taking the distance between the depth image and the sampling point as a factor; Step S22: determining the current sampling position according to the value of the truncated signed distance function; Step S23: truncating the sampling space of the neural radiation field based on the current distance function value; Step S24: Calculate the total loss function based on the current color image and depth data.

3. The three-dimensional reconstruction method according to claim 2, characterized in that: In step S2, the depth information is used to strengthen the training of the neural radiation field, and the total loss function It is expressed as: Among them, L depth is the depth loss, is the depth value predicted by the network, Z(r) is the actual depth value; L color is the color loss; r is the ray set of each batch, C(r) is the real RGB color, is the RGB color predicted by the coarse network, is the RGB color predicted by the fine network; λ is the weight; R is the ray set.

4. The three-dimensional reconstruction method according to claim 2, characterized in that: In step S2, depth information is used to strengthen the training of the neural radiation field, and the ray sampling method is expressed as: For any pixel P i,j ∈R 3×3 , use the Level Set method to construct the distance function D i,j , when the sampling point is on the surface of the object D i,j = 0, when the sampling point is from near to far, D i,j It gradually increases between the interval [-0.5, 0.5], and the expression is as follows: F(z_val)=z_val-depth,z_val∈Ω Among them, z_val is the position of the sampling point, depth is the depth value, and Ω is the sampling space.

5. The three-dimensional reconstruction method according to claim 1, characterized in that: In step S5, rendering the RGB image at the specified new viewing angle using the depth image at the new viewing angle specifically includes: Step S51: synthesizing a depth image under a new viewing angle according to the depth image, and completing the depth image using a depth completion algorithm; Step S52: Rendering an RGB image at the new perspective through volume rendering according to the depth data at the new perspective.

6. A three-dimensional reconstruction system of neural radiation field based on deep dynamic sampling, characterized in that: The three-dimensional reconstruction system comprises: An RGB-D image acquisition module, wherein the RGB-D image acquisition module is used to acquire RGB-D images of each viewing angle of the scene; A neural radiation field network training module, wherein the neural radiation field network training module is used to train a neural radiation field network using the RGB-D image; A new-viewing-angle depth image acquisition module is used to generate a three-dimensional model of the scene based on the RGB-D images of each viewing angle of the scene; and obtain a depth map of the corresponding position of the new viewing angle to be rendered on the three-dimensional model; A depth image completion module, wherein the depth image completion module is used to complete a depth image with holes under a new perspective by using a depth completion algorithm; An image rendering module is used to render an RGB image at a specified new viewing angle using a depth image after depth completion at a new viewing angle.

7. The three-dimensional reconstruction system according to claim 6, characterized in that: The neural radiation field network training module uses the RGB-D image to train the neural radiation field network, specifically: using multiple RGB-D images to train the neural radiation field, for each RGB-D image, performing the following operations: constructing a truncated signed distance function, taking the distance between the depth image and the sampling point as a factor; judging the current sampling position according to the value of the truncated signed distance function; truncating the sampling space of the neural radiation field based on the current distance function value; and calculating the total loss function based on the current color image and depth data.

8. The three-dimensional reconstruction system according to claim 7, characterized in that: The neural radiation field network training module uses depth information to enhance the training of the neural radiation field. The total loss function It is expressed as: Among them, L depth is the depth loss, is the depth value predicted by the network, Z(r) is the actual depth value; L color is the color loss; r is the ray set of each batch, C(r) is the real RGB color, is the RGB color predicted by the coarse network, is the RGB color predicted by the fine network; λ is the weight; R is the ray set.

9. The three-dimensional reconstruction system according to claim 7, characterized in that: The neural radiation field network training module uses depth information to enhance the training of the neural radiation field. The ray sampling method is expressed as: For any pixel P i,j ∈R 3×3 , use the Level Set method to construct the distance function D i,j , when the sampling point is on the surface of the object D i,j = 0, when the sampling point is from near to far, D i,j It gradually increases between the interval [-0.5, 0.5], and the expression is as follows: F(z_val)=z_val-depth,z_val∈Ω Among them, z_val is the position of the sampling point, depth is the depth value, and Ω is the sampling space.

10. The three-dimensional reconstruction system according to claim 6, characterized in that: The image rendering module uses the depth image at the new perspective to render the RGB image at the specified new perspective, specifically: synthesizing the depth image at the new perspective according to the depth image, and completing the depth image with a depth completion algorithm; rendering the RGB image at the new perspective through volume rendering according to the depth data of the new perspective.

Citation Information

Cited By

  • Three-dimensional reconstruction method and system

    CN119229029A

  • Universal and controllable radiation field enhancement method based on space perception

    CN119399346A

  • Target object refined three-dimensional reconstruction method based on YOLOv8 labeling

    CN119494923A

  • Orchard three-dimensional reconstruction and fruit tree semantic segmentation method based on neural radiation field

    CN119516195A

  • Orchard 3D reconstruction and fruit tree semantic segmentation method based on neural radiation field

    CN119516195B