Position coding enhancement-based point cloud rendering method, system and equipment
By adopting a positional encoding enhancement method that mixes hyperparameter network and Gaussian sampling in point cloud rendering, the impact of positional encoding on rendering results is solved, and higher-quality rendering image generation is achieved, especially in noisy scenes. Improve rendering effects.
Patent Information
- Application Number
- CN202410682122.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-03
AI Technical Summary
In the existing technology, the high and low frequency order of position coding during the point cloud rendering process affects the rendering results, resulting in holes and noise problems in the rendered images, and the position coding cannot be adjusted, affecting the rendering quality.
A hybrid method of hyperparameter network and Gaussian sampling is used to enhance positional encoding. By constructing a positional encoding enhancement network and a U-Net decoding network of a 5-layer perceptron, hyperparameters and loss functions are used to optimize the positional encoding process so that it can participate in the neural network. Differentiable optimization, resulting in more accurate and detailed rendered images.
The point cloud rendering quality is improved, and the generated rendered image performs well in PSNR, SSIM and LPIPS indicators, especially in indoor scenes with lots of noise, which significantly improves the rendering effect.
Smart Images

Figure CN118587341A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of point cloud rendering, and in particular relates to a point cloud rendering method, system and device based on position coding enhancement. Background Art
[0002] Point cloud refers to a collection of three-dimensional points, which is often used to describe the geometric shape of an object and is widely used in computer vision, computer graphics and other fields. Point clouds often have some noise, which causes problems such as holes and noise in the rendered images. Previous work usually encodes the position of the point cloud first and then inputs it into the neural network to obtain a very realistic rendering result. However, we found that the order of high and low frequencies of position encoding usually affects the final rendering result. Based on this, we designed a new position encoding method to improve the final rendering quality. Summary of the invention
[0003] The purpose of the present invention is to provide a point cloud rendering method, system and device based on position coding enhancement in view of the deficiencies in the prior art.
[0004] The present invention requires a 2D image aligned with the point cloud observation angle during the neural network training phase. During the training process, the point cloud is first position-encoded. Unlike the previous position encoding, we use a hyperparameter network and Gaussian sampling to enhance the position encoding, which is then input into the rendering network to obtain the final result.
[0005] A point cloud rendering method based on position coding enhancement includes the following steps:
[0006] Step 1: construct a position encoding enhancement network;
[0007] Step 2: The H×W×C color embedding expression obtained by the position encoding enhancement network is decoded into an RGB image through U-Net.
[0008] The constructed position encoding enhancement network includes 5 layers of perceptrons, and the input is in It refers to the direction of ray projection d, (x, y, z) is the three-dimensional position p of the sampling point; the position encoding enhancement network adopts a hybrid method of super network and Gaussian sampling, which is specifically described as follows:
[0009] γ(p)=(sin(2 0 πBp),cos(2 0 πBp),…,sin(2 M-1 πBp),cos(2 M-1 πBp)) (1)
[0010] Among them, p represents the three-dimensional position of the (x, y, z) input, and M represents the degree parameter of the position encoding, which is a hyperparameter indicating the degree of position encoding. In the specific operation, the degree parameter of the three-dimensional position of the sampling point is M=10, and the degree parameter of the light direction d is M=10. B is a value randomly sampled from a normal distribution with an expected value of 0 and a standard deviation of 0.4. The advantage of using B to embed the position encoding is that it can adjust to a more appropriate frequency bandwidth through randomness during the optimization process;
[0011] The linear layer I, ReLU layer, and linear layer II constitute a hyperparameter network for enhancing position encoding. The specific implementation of the hyperparameter network is as follows:
[0012] First, the linear layer I in the hyperparameter network is regarded as ω and b of the low-frequency band sin(wx+b);
[0013] Secondly, define the activation function in the ReLU layer;
[0014] Finally, the linear layer II in the hyperparameter network is regarded as ω and b of the high-frequency band sin(wx+b);
[0015] Furthermore, step 2 is specifically implemented as follows:
[0016] 2-1. The color embedding expression obtained by the position encoding enhancement network is not a color picture, so the color embedding expression needs to be passed through a U-Net network to predict the color embedding expression H×W×3 image result And use the loss function L with the true value y style ; It uses a different loss function from the original U-Net, with the goal of recovering color images from the high-dimensional representation of the neural network.
[0017] L style =λ c L content +λ feat L feat +λ TV L TV (2)
[0018]
[0019]
[0020]
[0021] Among them, λ c , feat , TV There are three hyperparameters, namely 2, 10 -6 , 0.02; K in formula (3) (4) f , H f , Wf are the number of channels, height, and width of the f-th layer feature after the true value y is processed by the VGG-19 network. i,j Indicates the pixel value of the i-th row and j-th column of the image; L TV is a regular term, which keeps the network output space smooth. Gram(.) represents the encoding of the Gram matrix. refers to the VGG-19 network, Indicates that the prediction is input into the intermediate features extracted by VGG. Indicates that the true value is input into the intermediate features extracted by VGG; finally, the complete loss function L is obtained:
[0022] L=λ style L style +λ d L d (10)
[0023] Among them, the selection of hyperparameters is as follows style =0.01,λ d =1.
[0024] A point cloud rendering system based on position coding enhancement includes a position coding enhancement network and U-Net.
[0025] Positional encoding enhancement network, including 5 layers of perceptron, the input is in Refers to the direction of ray projection d, (x, y, z) is the three-dimensional position p of the sampling point; the position encoding enhancement network adopts a hybrid method of super network and Gaussian sampling; the linear layer, ReLU layer, and line formation constitute a super parameter network for enhancing position encoding. U-Net decodes the H×W×C color embedding expression obtained by the position encoding enhancement network into an RGB image. The ω and b of different frequencies of the linear layer in the super parameter network are added to the 5-layer perceptron step by step through the sin function.
[0026] A point cloud rendering device based on position coding enhancement is installed with a point cloud rendering system based on position coding enhancement, so that the position coding process participates in the optimization of the entire differentiable process of the neural network, thereby generating a more accurate and detailed rendering image.
[0027] Features and beneficial effects of the present invention
[0028] The present invention realizes a point cloud rendering method based on position coding enhancement, which is of great significance in point cloud rendering. In the present invention, unlike the previous unadjustable position coding, Gaussian sampling and hypernetwork are used to enhance the position coding, so that the position coding process participates in the optimization of the entire differentiable process of the neural network, thereby generating a more accurate and detailed rendering image. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is the overall flow chart of the neural network used in the present invention.
[0030] Figure 2 The position coding enhancement network used in the present invention. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0032] The position coding enhanced point cloud rendering method proposed in the present invention comprises the following steps:
[0033] Step 1: Construct a position encoding enhancement network. The structural diagram is as follows: Figure 1 As shown;
[0034] The position encoding enhancement network includes 5 layers of perceptrons, and the input is in It refers to the direction of ray projection d, (x, y, z) is the three-dimensional position p of the sampling point; the position encoding enhancement network adopts a hybrid method of super network and Gaussian sampling, which is specifically described as follows:
[0035] γ(p)=(sin(2 0 πBp),cos(2 0 πBp),…,sin(2 M-1 πBp),cos(2 M-1 πBp)) (1)
[0036] Among them, p represents the three-dimensional position of the (x, y, z) input, and M represents the degree parameter interpretation of the position encoding, which is a hyperparameter indicating the degree of position encoding. In the specific operation, the degree parameter M of the three-dimensional position of the sampling point is 10, and the degree parameter M of the light direction d is 10. B is a value randomly sampled from a normal distribution with an expected value of 0 and a standard deviation of 0.4. The advantage of using B to embed the position encoding is that it can adjust to a more appropriate frequency bandwidth through randomness during the optimization process, thereby improving the rendering quality.
[0037] like Figure 1The figure shows a schematic diagram of the construction of a position coding enhancement network, in which the linear layer, ReLU layer, and line formation constitute a hyperparameter network for enhancing the position coding.
[0038] The pytorch pseudo code of the hyperparameter network is as follows:
[0039] hyper = nn.Sequential(
[0040] nn.Linear(120,256), #Linear layer, treat it as ω and b of the low-frequency band sin(wx+b) for subsequent use.
[0041] nn.ReLU(), #Activation function.
[0042] nn.Linear(256,8)#Linear layer, treat it as ω and b of high-frequency sin(wx+b) for subsequent use )
[0044] Furthermore, the linear layer of the hyperparameter network is considered as ω and b in sin(ωX+b), where X is Figure 1 The output of each linear layer except the hyperparameter network.
[0045] Furthermore, the pytorch-style pseudocode of the hyperparameter network enhanced position encoding is as follows:
[0046] For each input 3dposition xyz and direction dirs:
[0047] freq=hyper(xyz)
[0048] feat = nn.Linear (60, 256, X) # linear layer extracts features
[0049] feat=feat*sin(feat*freq[:,0]+freq[:,1])#Use the middle layer of the hyperparameter network as the phase of the sin function to enhance the features of the previous linear layer level by level.
[0050] feat=nn.Linear(256,256,feat)
[0051] feat=feat*sin(feat*freq[:,2]+freq[:,3])
[0052] feat=nn.Linear(256,256,feat)
[0053] feat=feat*sin(feat*freq[:,4]+freq[:,5])
[0054] feat=nn.Linear(256,256,feat)
[0055] feat = torch.cat ([feat, dirs], dim = -1) # concatenate the features of xyz encoded by the hyperparameter network with the input light direction;
[0056] feat = nn.Linear(280,128,feat) # Fusion features make the final output related to the light direction, so that the rendering result is related to the viewing angle;
[0057] feat=feat*sin(feat*freq[:,6]+freq[:,7])
[0058] output = nn.Linear(128,8,feat) #Linear layer decoding.
[0059] Step 2: The H×W×C color embedding expression obtained by the position encoding enhancement network is decoded into an RGB image through U-Net. The structural diagram is as follows Figure 2 shown.
[0060] 2-1. The color embedding expression obtained by the position encoding enhancement network is not a color image, so the color embedding expression needs to be passed through a U-Net (Convolutional Networks for Biomedical Image Segmentation) network to predict the color embedding expression H×W×3 image result And use the loss function L with the true value y style Different from the original U-Net for image segmentation, it uses a different loss function from the original U-Net, with the goal of recovering color images from the high-dimensional representation of the neural network.
[0061] L style =λ c L content +λ feat L feat +λ TV L TV (2)
[0062]
[0063]
[0064]
[0065] Among them, λ c , feat , TV There are three hyperparameters, namely 2, 10 -6 , 0.02; K in formula (3) (4) f , H f , W f The number of channels, height, and width of the f-th layer feature after the true value y is processed by the VGG-19 network. i,j Indicates the pixel value of the i-th row and j-th column of the image; L TV is a regular term, which keeps the network output space smooth. Gram(.) represents the encoding of the Gram matrix. refers to the VGG-19 network, Indicates that the prediction is input into the intermediate features extracted by VGG. Indicates that the true value is input into the intermediate features extracted by VGG; finally, the complete loss function L is obtained:
[0066] L=λ style L style +λ d L d (10)
[0067] Among them, the selection of hyperparameters is as follows style =0.01,λ d =1
[0068] Example:
[0069] The present invention uses PSNR (peak signal-to-noise ratio), SSIM (Structural Similarity), and LPIPS (perceptual similarity) as evaluation indicators of rendering results. PSNR is one of the commonly used indicators for measuring image rendering quality, and the specific formula is as follows:
[0070]
[0071] Among them, MAX refers to the possible maximum value of the image pixel, and MSE is the root mean square error between the rendered image and the true value. Since it uses the log function, it is difficult to improve the index. SSIM and LPIPS are different from PSNR, which take into account the structural information of the image and the perceptual characteristics of the human visual system.
[0072] The method of the present invention is verified on two public datasets, NeRF-Synthetic and ScanNet. NeRF-Synthetic is an object-centric virtual dataset, and ScanNet is a real scene dataset indoors. For NeRF-Synthetic, the present invention tests all eight scenes and takes the average value as the final result. For ScanNet, which has thousands of scenes, for the convenience of testing, three scenes, scan_00, scan_43, and scan_45, are selected for the experiment. The quantitative indicators of the experiment are shown in Table 1 below:
[0073] Table 1 Experimental quantitative indicators
[0074] In summary, as can be seen from Table 1, our experiments have achieved significant improvements in the objective PSNR index and have reached the level of human subjective perception indicators that are comparable to those of previous methods. It is worth noting that on the indoor scene ScanNet, our PSNR has been significantly improved. Unlike the NeRF-Synthetic simulation dataset, there is a lot of noise, making it difficult to render high-quality results.
Claims
1. A point cloud rendering method based on position coding enhancement, characterized in that The following steps are involved: Step 1: construct a position encoding enhancement network; Step 2: The H×W×C color embedding expression obtained by the position encoding enhancement network is decoded into an RGB image through U-Net. The constructed position encoding enhancement network includes 5 layers of perceptrons, and the input is in It refers to the direction of ray projection d, (x, y, z) is the three-dimensional position p of the sampling point; the position encoding enhancement network adopts a hybrid method of hyperparameter network and Gaussian sampling, which is specifically described as follows: γ(p)=(sin(2 0 πBp),cos(2 0 πBp),…,sin(2 M-1 πBp),cos(2 M-1 πBp)) (1) Where p represents the three-dimensional position of the (x, y, z) input, and M is a hyperparameter indicating the degree of position encoding. In the specific operation, the degree parameter of the three-dimensional position of the sampling point is M=10, and the degree parameter of the light direction d is M=4. B is a value randomly sampled from a normal distribution with an expected value of 0 and a standard deviation of 0.
4. The advantage of using B to embed position encoding is that it can be adjusted to a more appropriate frequency bandwidth through randomness during the optimization process. The linear layer and ReLU layer constitute a hyperparameter network to enhance the position encoding.
2. The point cloud rendering method based on position coding enhancement according to claim 1, characterized in that Step 2 is implemented as follows: 2-1. The color embedding expression obtained by the position encoding enhancement network is not a color image, so the color embedding expression needs to be passed through a U-Net network to obtain an H×W×3 image result. And use the loss function L with the true value y style ; Use a different loss function than the original U-Net, the goal is to recover the color image from the high-dimensional representation of the neural network; L style =λ c L content +λ feat L feat +λ TV L TV (2) Among them, λ c , feat , TV There are three hyperparameters, namely 2, 10 -6 , 0.02; K in formula (3) (4) f , H f , W f are the number of channels, height, and width of the f-th layer feature after the true value y is processed by the VGG-19 network; the image x in formula (5) i,j Indicates the pixel value of the i-th row and j-th column of the image; L TV is a regular term, which keeps the network output space smooth; Gram(.) represents the encoding of the Gram matrix, refers to the VGG-19 network, Indicates that the prediction is input into the intermediate features extracted by VGG. Indicates that the true value is input into the intermediate features extracted by VGG; finally, the complete loss function L is obtained: L=λ style L style +λ d L d (10) Among them, the selection of hyperparameters is as follows style =0.01,λ d =1.
3. A point cloud rendering method based on position coding enhancement according to claim 1 or 2, characterized in that The specific implementation of the hyperparameter network composed of linear layer I, ReLU layer, and linear layer II is as follows: First, the linear layer I in the hyperparameter network is regarded as ω and b of the low-frequency sin(wx+b); Secondly, define the activation function in the ReLU layer; Finally, the linear layer II in the hyperparameter network is regarded as ω and b of sin(wx+b) in the high-frequency band.
4. A point cloud rendering system based on position coding enhancement, characterized in that Including position encoding enhancement network and U-Net; Positional encoding enhancement network, including 5 layers of perceptron, the input is in It refers to the direction of light projection d, (x, y, z) is the three-dimensional position p of the sampling point; the position coding enhancement network adopts a mixture of hyperparameter network and Gaussian sampling; the linear layer, ReLU layer, and line formation constitute a hyperparameter network for enhancing position coding; U-Net is used to decode the H×W×C color embedding expression obtained by the position coding enhancement network into an RGB image.
5. The point cloud rendering system based on position coding enhancement according to claim 4, characterized in that The hyperparameter network in claim 3 is used to enhance the frequency perception effect, which is specifically implemented as follows: The ω and b of different frequency bands in the linear layer of the hyperparameter network are added step by step to the 5-layer perceptron in claim 4, and the adding method adopts the sin function in claim 3.
6. A point cloud rendering device based on position coding enhancement, characterized in that The device is equipped with the method as claimed in claim 3, so that the process of position encoding participates in the neural network, thereby generating a more accurate and detailed rendering image.
