Neural radiation field reconstruction method, device, setting, medium and program

Through light cone projection and multi-level texture sampling models, the problem of insufficient visual quality of existing neural radiation field reconstruction methods is solved, and higher-quality three-dimensional reconstruction and image synthesis effects are achieved.

CN118864754APending Publication Date: 2024-10-29BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310474996.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-27
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing neural radiation field reconstruction methods cannot meet visual quality requirements, especially in 3D reconstruction and image synthesis scenarios.

Method used

Using the light cone projection method, the pixels are modeled as circles with areas, and multiple sampling balls are determined on the light cone. The multi-level texture sampling model and the multi-layer perceptron model are combined to perform multi-level texture sampling on multiple planes. and volume rendering, updating neural radiation field parameters to improve reconstruction quality.

Benefits of technology

Through light cone projection and multi-level texture sampling, the visual quality of neural radiation field reconstruction is improved, making the reconstructed image closer to the real physical imaging process, and improving the effects of three-dimensional reconstruction and image synthesis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864754A_ABST
    Figure CN118864754A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a neural radiation field reconstruction method and device, settings, a medium and a program, and the method comprises the steps: forming a light cone of a cone through light cone projection according to the pose of a camera during the projection of each pixel point, determining M sampling balls on the light cone of the pixel point, and carrying out the reconstruction of a neural radiation field according to the information of the sampling balls, performing multi-level texture sampling of a plurality of planes on the sampling balls to form feature vectors of the sampling balls, and processing the feature vectors of the sampling balls of the pixel points and the visual angle directions of the pixel points by the multi-layer perceptron model to obtain density information and color information of the sampling balls of the pixel points; and performing volume rendering on the density information and the color information of each sampling ball of each pixel point of the rendered image corresponding to the camera pose to obtain the rendered image. And calculating loss of the neural radiation field according to the sample image and the rendered image, and updating parameters of the neural radiation field according to the loss. The modeling of the pixel points into the circle with the area is closer to the real physical imaging process, so that the visual quality of reconstruction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of three-dimensional reconstruction technology, and in particular, to a method, device, setting, medium and program for reconstructing a neural radiation field. Background Art

[0002] Neural Radiance Field (NeRF) is a deep learning model for 3D implicit space modeling, also known as a fully connected neural network (or multi-layer perceptron). Neural Radiance Field is widely used in 3D reconstruction, image synthesis, 3D rendering and other scenarios.

[0003] The task that NeRF has to do is to synthesize new perspectives, that is, to capture a series of scenes at known perspectives, and synthesize images at new perspectives based on the camera's position, internal parameters, and images. Based on the NeRF representation method, the three-dimensional space is represented as a set of learnable and continuous radiation fields. After learning the input perspective and position, the density and color of the pixels are obtained. The reconstruction of the neural radiation field needs to be trained based on a series of images at different perspectives.

[0004] However, the quality of scenes reconstructed by existing neural radiation fields cannot meet the requirements. Summary of the invention

[0005] The embodiments of the present application provide a method, device, setting, medium and program for reconstructing a neural radiation field. Light cone projection is used during reconstruction. Light cone projection models pixel points as circles with areas, which is closer to the actual physical imaging process, thereby improving the visual quality of reconstruction.

[0006] In a first aspect, an embodiment of the present application provides a method for reconstructing a neural radiation field, the method comprising:

[0007] Obtain the camera pose of each sample image in the sample image sequence;

[0008] The neural radiation field is trained using the camera pose of the sample image, wherein the output of the neural radiation field is the density information and color information of each pixel point of the rendered image corresponding to the camera pose, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model;

[0009] The light cone projection module is used to perform light cone projection on the pixel point according to the camera posture to form a conical light cone, and determine M sampling spheres on the light cone of the pixel point, where M is an integer greater than or equal to 2;

[0010] The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball;

[0011] The multi-layer perceptron model is used to process the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain density information and color information of each sampling ball of the pixel point, and the viewing direction of the pixel point is determined according to the camera posture;

[0012] Performing volume rendering according to density information and color information of each pixel point of the rendered image to obtain the rendered image;

[0013] The loss of the neural radiation field is calculated according to the sample image and the rendered image, and the parameters of the neural radiation field are updated according to the loss.

[0014] In some embodiments, the step of performing light cone projection on the pixel points according to the camera posture to form a cone-shaped light cone includes:

[0015] A light cone of the pixel point is formed according to the optical center position of the camera, the center position and radius of the pixel circle corresponding to the pixel point, wherein the optical center position of the camera is the vertex of the light cone of the pixel point, the line connecting the optical center position of the camera and the center position of the pixel circle is the central axis of the light cone of the pixel point, and the generatrix of the light cone of the pixel is tangent to the pixel circle.

[0016] In some embodiments, forming the light cone of the pixel point according to the optical center position of the camera, the center position and radius of the pixel circle corresponding to the pixel point includes:

[0017] A line connecting the optical center position of the camera and the center position of the pixel circle is used as the central axis of the light cone of the pixel point;

[0018] Determining the length of the central axis according to the direction of the central axis and the size of the reconstructed three-dimensional space;

[0019] The optical center position of the camera is used as the vertex of the light cone of the pixel point, the optical center of the camera and the pixel circle are connected, and the connecting line is extended to form a generatrix of the light cone.

[0020] In some embodiments, it also includes:

[0021] Determining the area of ​​the pixel circle according to the intrinsic parameters of the camera and the resolution of the sample image;

[0022] The radius of the pixel circle is determined according to the area of ​​the pixel circle.

[0023] In some embodiments, determining the area of ​​the pixel circle according to the intrinsic parameters of the camera and the resolution of the sample image includes:

[0024] The area of ​​the pixel circle is determined by the following formula:

[0025]

[0026] Wherein, HW is the resolution of the sample image, f is the focal length of the camera, FoV x is the horizontal field of view of the camera, FoV y is the vertical field of view of the camera.

[0027] In some embodiments, determining M sampling spheres on the light cone of the pixel point includes:

[0028] Determine the sampling distance according to the number M of sampling balls and the length of the central axis of the light cone;

[0029] The center position and radius of the sampling sphere are determined according to the optical center position of the camera and the sampling distance, and the sampling sphere is inscribed in the light cone.

[0030] In some embodiments, determining the center position and radius of the sampling sphere according to the optical center position of the camera and the sampling distance includes:

[0031] Determine the distance from the sampling sphere to the optical center of the camera according to the sampling distance;

[0032] Determine the center position of the sampling sphere according to the optical center position of the camera and the distance from the sampling sphere to the optical center of the camera;

[0033] The radius of the sampling sphere is determined according to the distance from the sampling sphere to the optical center of the camera, the radius of the pixel circle and the focal length of the camera.

[0034] In some embodiments, determining the center position of the sampling sphere according to the optical center position of the camera and the distance from the sampling sphere to the optical center of the camera includes:

[0035] The coordinates of the center of the i-th sampling sphere on the light cone are determined by the following formula:

[0036] Pi=o+ti·d;

[0037] Wherein, ti is the optical-mechanical distance from the i-th sampling sphere on the light cone to the camera, o is the coordinate of the optical center of the camera, and d is the unit direction vector of the central axis of the light cone.

[0038] In some embodiments, determining the radius of the sampling sphere according to the distance from the sampling sphere to the optical center of the camera, the radius of the pixel circle, and the focal length of the camera includes:

[0039] The radius of the i-th sampling sphere on the light cone is determined by the following formula:

[0040]

[0041] Wherein, ti is the optical-mechanical distance from the i-th sampling sphere on the light cone to the camera, f is the focal length of the camera, and r p is the radius of the pixel circle.

[0042] In some embodiments, the multi-level texture sampling model is used to sample the multi-level textures of three planes of the sampling sphere, the three planes including: an XY plane, an XZ plane, and a YZ plane, wherein the multi-level texture of each plane includes N levels, and the resolution of the feature maps of the N levels gradually decreases, where N is an integer greater than or equal to 2;

[0043] The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball, including:

[0044] Determine sampling parameters of each plane according to the center position and radius of the sampling sphere, wherein the sampling parameters include pixel coordinates of the sampling and level coordinates of the sampling;

[0045] Sampling each plane of the sampling sphere according to the sampling parameters of each plane to obtain a characteristic graph of each plane of the sampling sphere;

[0046] The feature maps of the three planes are connected to form a feature vector of the sampling sphere.

[0047] In some embodiments, determining the sampling parameters of each plane according to the center position and radius of the sampling sphere includes:

[0048] Determine the components of the three-dimensional coordinates of the center of the sampling sphere on the two coordinate axes corresponding to the plane as the pixel coordinates of the sampling;

[0049] The level coordinates of the sampling are determined according to the ratio of the radius of the sampling sphere to the element radius of the feature map of the base level of the multi-level texture of the plane.

[0050] In some embodiments, determining the level coordinates of the sampling according to the ratio of the radius of the sampling sphere to the element radius of the feature map of the base level of the multi-level texture of the plane includes:

[0051] The level coordinates of the sampling are determined by the following formula:

[0052]

[0053] Among them, r feacture is the element radius of the feature map of the base level, r i is the radius of the sampling sphere.

[0054] In some embodiments, it also includes:

[0055] Determining the area of ​​the feature map of the base level of the multi-level texture of the plane according to the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane;

[0056] An element radius of the feature map of the base level of the multi-level texture of the plane is determined according to the area of ​​the feature map of the base level of the multi-level texture of the plane.

[0057] In some embodiments, determining the area of ​​the feature map of the base level of the multi-level texture of the plane according to the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane includes:

[0058] The area of ​​the feature map of the base level of the multi-level texture of the plane is determined according to the following formula:

[0059]

[0060] Among them, HW f is the resolution of the feature map of the base level of the multi-level texture of the plane, H f , W f are the length and width of the plane.

[0061] In some embodiments, sampling each plane of the sampling sphere according to the sampling parameters of each plane to obtain a feature map of each plane of the sampling sphere includes:

[0062] According to the sampled level coordinates, determining two adjacent levels of the sampled level coordinates;

[0063] Sampling is performed according to the sampled pixel coordinates and the adjacent level to obtain a feature map of the adjacent level;

[0064] According to the feature maps of the adjacent levels, trilinear interpolation is performed to obtain the feature map of the sampled level.

[0065] In some embodiments, the resolution of the feature map of the next level among the N levels is 1 / 2 of the resolution of the feature map of the previous level.

[0066] On the other hand, an embodiment of the present application provides a neural radiation field reconstruction device, the device comprising:

[0067] An acquisition module, used to acquire the camera pose of each sample image in the sample image sequence;

[0068] A training module, used to train a neural radiation field using the camera pose of the sample image, wherein the output of the neural radiation field is the density information and color information of each pixel of the rendered image corresponding to the camera pose, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model;

[0069] The light cone projection module is used to perform light cone projection on the pixel point according to the camera posture to form a conical light cone, and determine M sampling spheres on the light cone of the pixel point, where M is an integer greater than or equal to 2;

[0070] The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball;

[0071] The multi-layer perceptron model is used to process the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain density information and color information of each sampling ball of the pixel point, and the viewing direction of the pixel point is determined according to the camera posture;

[0072] A volume rendering module, used for performing volume rendering according to density information and color information of each pixel point of the rendered image to obtain the rendered image;

[0073] a loss module, configured to calculate a loss of the neural radiation field according to the sample image and the rendered image;

[0074] A parameter updating module is used to update the parameters of the neural radiation field according to the loss.

[0075] On the other hand, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.

[0076] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute any of the methods described above.

[0077] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, it implements any of the methods described above.

[0078] The neural radiation field reconstruction method, device, setting, medium and program provided in the embodiment of the present application obtain the camera pose of each sample image in the sample image sequence, and use the camera pose of the sample image to train the neural radiation field, wherein when projecting each pixel point of the rendered image corresponding to the camera pose, a light cone of a cone is formed by light cone projection according to the camera pose, and M sampling balls are determined on the light cone of the pixel point, and the sampling ball is subjected to multi-level texture sampling of multiple planes according to the information of the sampling ball to form a feature vector of the sampling ball, and the multi-layer perceptron model processes the feature vector of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain the density information and color information of each sampling ball of the pixel point, and the density information and color information of each sampling ball of each pixel point of the rendered image are volume rendered to obtain the rendered image. The loss of the neural radiation field is calculated based on the sample image and the rendered image, and the parameters of the neural radiation field are updated based on the loss. The light cone projection models the pixel point as a circle with an area, which is closer to the real physical imaging process, thereby improving the visual quality of the reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0080] Figure 1 A schematic diagram of the reconstruction of the neural radiation field provided in the present application;

[0081] Figure 2 A flowchart of a method for reconstructing a neural radiation field provided in Embodiment 1 of the present application;

[0082] Figure 3 Schematic diagram of light cone projection for pixel points;

[0083] Figure 4 A flowchart of a light cone projection provided in Embodiment 2 of the present application;

[0084] Figure 5 Schematic diagram of the intersection of the central axis of the light cone and the cuboid corresponding to the reconstructed three-dimensional space;

[0085] Figure 6 A flowchart of mipmap sampling provided in Embodiment 3 of the present application;

[0086] Figure 7 A schematic diagram of the structure of a neural radiation field reconstruction device provided in Embodiment 4 of the present application;

[0087] Figure 8 A schematic diagram of the structure of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION

[0088] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0089] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0090] The embodiment of the present application provides a method for reconstructing a neural radiation field, which can be applied to electronic devices such as mobile phones, XR devices, tablet computers, etc. XR is a general term for multiple technologies such as virtual reality (VR), augmented reality (AR), and mixed reality (MR).

[0091] Optionally, the XR device described in the embodiments of the present application, also known as a virtual reality device, may include but is not limited to the following types:

[0092] 1) Mobile virtual reality devices support the configuration of mobile terminals (such as smart phones) in various ways (such as head-mounted displays with dedicated card slots). Through wired or wireless connection with the mobile terminal, the mobile terminal performs relevant calculations of virtual reality functions and outputs data to the mobile virtual reality device, such as watching virtual reality videos through the mobile terminal's APP.

[0093] 2) All-in-one virtual reality devices have a processor for performing relevant calculations of virtual functions, and thus have independent virtual reality input and output functions. They do not need to be connected to a PC or mobile terminal and have a high degree of freedom in use.

[0094] 3) Computer-based virtual reality (PCVR) devices use the PC to perform relevant calculations and data output for virtual reality functions. External computer-based virtual reality devices use the data output by the PC to achieve virtual reality effects.

[0095] Neural radiation field is a deep learning model for three-dimensional implicit space modeling. This deep learning model is also called a fully connected neural network (also known as a multi-layer perceptron). Figure 1 A schematic diagram of the reconstruction of the neural radiation field provided in this application. Figure 1 As shown, the input is a set of sample image sequences, which are multi-view image sequences for the same scene. The pose estimation module estimates the pose of the sample images to obtain the camera pose of each sample image. According to the camera pose of the sample image, the viewing direction of each pixel point of the sample image can be determined. The light cone projection module performs light cone projection on each pixel of the rendered image corresponding to the camera pose according to the camera pose output by the pose estimation module to form a light cone corresponding to the pixel, and determines multiple sampling balls on the light cone, and outputs the center position and radius of the sampling ball to the multi-level texture (mipmap) sampling model. The multi-level texture sampling model is used to perform mipmap sampling on multiple planes of the sampling ball according to the three-dimensional coordinates and radius of the sampling ball to obtain the feature vector of the sampling ball. The multi-layer perceptron (Multi-Layer Perception, MLP for short) model determines the density and color of each sampling ball of the pixel point according to the camera view output by the pose estimation module and the feature vector of each sampling ball of the pixel point, and outputs the density and color of each sampling of each pixel point of the rendered image to the volume rendering module. The volume rendering module performs volume rendering on the density and color of each sampling ball of each pixel point of the rendered image to obtain the rendering color of each pixel point, and the rendering color of each pixel point constitutes the rendered image. The loss determination module is used to calculate the loss of the neural radiation field based on the sample image and the rendered image, and update the parameters of the multi-level texture sampling model and the multi-layer perceptron according to the loss. Through multiple iterations, the neural radiation field is obtained, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model.

[0096] Figure 2 This is a flowchart of a method for reconstructing a neural radiation field provided in Embodiment 1 of the present application. The adjustment method can be performed by a reconstruction device, which can be an electronic device such as a mobile phone, an XR device, or a computer. Figure 2 As shown, the method provided in this embodiment includes the following steps.

[0097] S101. Obtain the camera pose of each sample image in a sample image sequence.

[0098] The sample image sequence is a set of images used for reconstructing the neural radiation field. The sample image sequence is a multi-view sample image. The multi-view sample image sequence is obtained by shooting the same scene from multiple angles.

[0099] Taking XR devices as an example, head-mounted XR devices are usually integrated with monocular or multi-cameras. When the scene is photographed through the camera of the head-mounted XR device, images from different angles are captured as the user moves.

[0100] The camera pose of each sample image can be obtained through the pose estimation module. The camera pose includes the position and posture of the camera, wherein the position of the camera refers to the position of the optical center of the camera, and the position of the camera can be the three-dimensional coordinates of the optical center of the camera.

[0101] The viewing angle direction of the pixel point can be determined according to the camera posture of the sample image, and the viewing angle direction of the pixel point is used to subsequently determine the density information and color information of each sampling sphere of the pixel point. Among them, the viewing angle direction of the pixel point is the direction of the line connecting the optical center position of the camera and the center position of the pixel unit corresponding to the pixel point on the imaging plane. The imaging plane is the plane where the pixel array is located. The pixel array includes a plurality of pixel units arranged horizontally and vertically, and the pixel unit includes a component that receives light for photoelectric conversion.

[0102] The viewing direction of the pixel point can be obtained based on the three-dimensional coordinates of the optical center of the camera and the three-dimensional coordinates of the center of the pixel unit corresponding to the pixel point. Since the center positions of the pixel units on the imaging plane are different, the viewing directions of the pixels are different.

[0103] Optionally, the pose estimation module can use a structure from motion (SFM) algorithm to estimate the camera pose. SFM infers the relative pose of the camera when taking each image and the three-dimensional coordinates of the object point in the real world based on the pixel coordinates of the same object point in different images. After estimating the camera pose, the viewing direction of the pixel point is obtained based on the position of the camera and the center position of the pixel unit corresponding to the pixel point. The position of the camera is the position of the optical center of the camera.

[0104] Optionally, the pose estimation module can also use the simultaneous localization and mapping (SLAM) method to estimate the camera pose. In the XR device, the SLAM method is used to estimate the camera pose from the sample image and the inertial measurement unit (IMU) data in the headset. After the camera pose is estimated, the viewing direction of the pixel is obtained according to the position of the camera and the center position of the pixel unit corresponding to the pixel.

[0105] S102. Use the camera pose of the sample image to train the neural radiation field, the output of the neural radiation field is the density information and color information of each pixel of the rendered image corresponding to the camera pose, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model.

[0106] The training of neural radiation field is also called the reconstruction of neural radiation field. When reconstructing, all pixels in the imaging plane can be used, or the pixels in the imaging plane can be sampled and reconstructed using the sampled pixels. The output of the neural radiation field is the density information and color information of each pixel of the rendered image corresponding to the camera pose. The rendered image corresponding to the camera pose refers to the image rendered after a series of processing using the camera pose of the sample image. Therefore, the rendered image corresponding to the camera pose is also called the rendered image corresponding to the sample image (i.e., the sample image corresponding to the camera pose). When training the neural radiation field, in addition to using the camera extrinsic parameters (i.e., the camera pose of the sample image), the camera intrinsic parameters are also used.

[0107] The light cone projection module is used to perform light cone projection on pixel points according to the camera posture to form a conical light cone, and determine N sampling spheres on the light cone of the pixel point, where N is an integer greater than or equal to 2.

[0108] Traditional neural radiation fields use ray casting, which models pixels as arealess points. The projection ray of each pixel is a ray from the optical center of the camera to the pixel. Sampling is then performed on the projection ray, and the density and color information of each sampling point is determined according to the viewing direction of the pixel. The density and color information of each sampling point of the pixel is volume rendered to obtain the rendering color of the pixel.

[0109] In the embodiment of the present application, the neural radiation field no longer uses ray projection, but light cone projection. Each pixel point is modeled as a circle with an area, that is, the pixel unit corresponding to the pixel point is modeled as a circle with an area. It can be understood that the shape of the pixel unit itself may not be a circle, but may be a rectangle or an irregular shape, but the pixel unit is considered to be a circle with an area during projection. Therefore, the pixel circle corresponding to the pixel point can also be understood as the pixel unit corresponding to the pixel point. In the embodiment of the present application, the center position of the pixel circle corresponding to the pixel point is the same as the center position of the pixel unit corresponding to the pixel point.

[0110] Each pixel point projects a conical light cone, the vertex of which is the optical center of the camera. The central axis of the light cone is the line connecting the optical center of the camera and the center of the pixel circle corresponding to the pixel point. The line connecting the optical center of the camera and the center of the pixel circle corresponding to the pixel point is also the viewing direction of the pixel point, that is, the direction of the central axis of the light cone is the same as the viewing direction of the pixel point. The length of the central axis is determined according to the position of the camera and the size of the scene corresponding to the reconstructed neural radiation field. The length of the central axis is the height of the light cone. The size and position of a light cone can be uniquely determined according to the vertex of the light cone, the length of the central axis, and the radius of the pixel circle corresponding to the pixel point, where the pixel circle corresponding to the pixel point is inscribed in the light cone.

[0111] After the light cone of the pixel point is obtained by projection, N sampling spheres are determined on the light cone of the pixel point, where N is an integer greater than or equal to 2. Each sampling sphere is inscribed in the light cone, each sampling sphere has a different radius, and the center of each sampling sphere is located on the central axis of the light cone. The distances between the centers of each sampling sphere may be the same or different.

[0112] Figure 3 A schematic diagram of the light cone projection of a pixel point, such as Figure 3 As shown, the central axis of the light cone passes through the optical center of the camera and the center of the pixel circle corresponding to the pixel point. The pixel circle corresponding to the pixel point is the circular area on the imaging plane. The generatrix of the light cone passes through the pixel circle corresponding to the pixel point. The generatrix of the light cone can also be considered as a tangent line of the pixel circle passing through the optical center of the camera.

[0113] The multi-level texture (mipmap) sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball.

[0114] A mipmap represents a signal at a set of different discrete downsampling scales (usually called a feature map or texture or texture map), or a set of textures with decreasing resolutions, usually with a lower resolution the farther away from the observation point. For an object, the mipmap corresponding to the object includes N levels, that is, N textures or feature maps of different resolutions. Optionally, the resolution of the texture at the next level is 1 / 2 of the resolution of the previous level.

[0115] The information of the sampling ball includes the center position of the sampling ball and the radius of the sampling ball. The radius of the sampling ball can also be replaced by the diameter of the sampling ball.

[0116] Different from the sampling on the projection ray in the prior art, in the embodiment of the present application, each sampling sphere is sampled. When sampling each sampling sphere, sampling is performed at different sampling levels according to the center position and radius of the sampling sphere, and the sampling sphere is sampled from multiple planes during sampling, or it can be understood as sampling from different directions.

[0117] For each pixel point, the feature maps (also called feature vectors) of multiple planes of each sampling sphere are connected to form a feature vector of the sampling sphere.

[0118] In this embodiment, the mipmap sampling model is sampled at different levels of multiple sampling balls, that is, the mipmap prefitering technology is used to reconstruct the model, thereby improving the anti-aliasing problem of the image and further improving the image quality of the reconstructed scene, wherein pre-integration is also called pre-filtering, and anti-aliasing is also called aliasing effect.

[0119] The multi-layer perceptron model is used to process the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain the density information and color information of each sampling ball of the pixel point.

[0120] The multi-layer perceptron model is a fully connected neural network, including an input layer, a hidden layer, and an output layer. Both the hidden layer and the output layer are fully connected layers.

[0121] By projecting the pixel points as a light cone, the light cone occupies a certain volume, which is closer to the real physical imaging than projecting the pixel points as a ray. Sampling within the light cone can obtain more features and details, thereby improving the quality of the reconstructed image.

[0122] S103 . Perform volume rendering according to density information and color information of each pixel of the rendered image to obtain a rendered image.

[0123] Volume rendering is very different from traditional rasterization. Traditional rasterization imaging is to model objects by constructing triangular patches, while volume rendering uses cubic voxels for modeling. There is also a fundamental difference in the imaging method. Conventional rasterization rendering is to map or illuminate by shading vertices and faces, while volume rendering projects light into the object for scattering to construct the final color.

[0124] For each pixel, the density information and color information of the pixel point includes the density information and color information of all sampling balls in the light cone of the pixel point. The density information and color information of all sampling balls of each pixel point are volume rendered to obtain the rendering color of the pixel point. After volume rendering is performed on all pixels on the sample image to obtain the rendering color of the pixel point, the rendering image corresponding to the camera posture is obtained. The specific volume rendering method is not described in detail in the embodiments of this application.

[0125] S104. Calculate the loss of the neural radiation field according to the sample image and the rendered image, and update the parameters of the neural radiation field according to the loss.

[0126] Exemplarily, mean-square error (MSE) is used to calculate the loss of the neural radiation field. It is understandable that other loss functions may also be used to calculate the loss of the neural radiation field, such as absolute error, cross entropy loss, etc. This embodiment does not limit the loss function.

[0127] The parameters of the neural radiation field are updated according to the loss. The commonly used parameter update method for model training is gradient update. According to the loss, the gradient of the multi-level texture sampling model and the multi-layer perceptron model is returned to complete the parameter update of the two models.

[0128] The reconstruction of the neural radiation field requires multiple iterations until the training end condition is met, and the training model is used as the final neural radiation field. The training end condition is, for example, reaching the maximum number of iterations, or the loss is less than a preset loss threshold, or the loss difference between two iterations is less than a preset difference threshold.

[0129] After the neural radiation field is trained and obtained, given an arbitrary camera pose, the neural radiation field can output the density information and color information of each sampling sphere of each pixel point of the rendered image corresponding to the camera pose according to the camera pose, and perform volume rendering on the density information and color information of each sampling sphere of each pixel point of the rendered image to obtain the rendered image.

[0130] In this embodiment, when projecting the pixel points, a light cone of a cone is formed according to the camera posture using light cone projection, and M sampling balls are determined on the light cone of the pixel points. According to the information of the sampling balls, multi-level texture sampling of multiple planes is performed on the sampling balls to form a feature vector of the sampling balls. The multi-layer perceptron model processes the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain the density information and color information of each sampling ball of the pixel point. The density information and color information of each sampling ball of each pixel point of the rendered image corresponding to the camera posture are volume rendered to obtain a rendered image. The loss of the neural radiation field is calculated based on the sample image and the rendered image, and the parameters of the neural radiation field are updated based on the loss. Light cone projection models the pixel points as circles with areas, which is closer to the real physical imaging process, thereby improving the visual quality of reconstruction.

[0131] Based on the first embodiment, the second embodiment of the present application provides a method for reconstructing a neural radiation field, which is used to illustrate the processing flow of the light cone projection module in the first embodiment. Figure 4 A flowchart of a light cone projection provided in Embodiment 2 of the present application is as follows: Figure 4 As shown, the method provided in this embodiment includes the following steps.

[0132] S201, forming a light cone of the pixel point according to the optical center position of the camera, the center position and radius of the pixel circle corresponding to the pixel point.

[0133] The optical center of the camera is the vertex of the light cone of the pixel point, the line connecting the optical center position of the camera and the center position of the pixel circle corresponding to the pixel point is the central axis of the light cone, and the generatrix of the light cone is tangent to the pixel circle.

[0134] Light cone projection models pixel points as circles with area. After the pixel points are modeled as pixel circles, it is necessary to determine the size of the pixel circles, that is, to determine the radius or diameter of the pixel circles.

[0135] In one implementation, the area of ​​the pixel circle is determined based on the intrinsic parameters of the camera and the resolution of the sample image. Then, the radius of the pixel circle is determined based on the area of ​​the pixel circle.

[0136] The camera's internal parameters include the camera's focal length and the camera's field of view. The camera's field of view includes the horizontal field of view and the vertical field of view. The field of view determines the range that the camera can capture.

[0137] Exemplarily, the area S of the pixel circle is determined by the following formula (1): p :

[0138]

[0139] Among them, HW is the resolution of the sample image, f is the focal length of the camera, FoV xis the horizontal field of view of the camera, FoV y is the vertical field of view of the camera.

[0140] After determining the area of ​​the pixel circle, the radius r of the pixel circle is obtained by the following formula (2): p :

[0141]

[0142] For each pixel point in the same sample image, it can be known from the above formula that the radius of the pixel circle of each pixel point is the same. Therefore, for a sample image, the radius of the pixel circle only needs to be calculated once.

[0143] In another implementation, the radius of the pixel circle may also be a preset fixed value.

[0144] Exemplarily, the light cone of the pixel point is formed in the following manner: the line connecting the optical center position of the camera and the center position of the pixel circle is used as the central axis of the light cone of the pixel point; the length of the central axis is determined according to the direction of the central axis and the size of the reconstructed three-dimensional space; the optical center position of the camera is used as the vertex of the light cone of the pixel point, the optical center of the camera and the pixel circle are connected, and the connecting line is extended to form the generatrix of the light cone.

[0145] The optical center of the camera is the vertex of the light cone, and the direction of the central axis is the height direction of the light cone. After determining the height direction of the light cone, it is also necessary to determine the height of the light cone, that is, to determine the length of the central axis.

[0146] The size of the three-dimensional space that needs to be reconstructed for the neural radiation field is pre-set. Usually, the reconstructed three-dimensional space is defined as a cuboid, and the maximum and minimum values ​​of the X, Y, and Z axes are defined. During projection, the central axis of the light cone and the cuboid corresponding to the reconstructed three-dimensional space have two intersection points, which are called the near intersection point and the far intersection point.

[0147] Figure 5 is a schematic diagram of the intersection of the central axis of the light cone and the cuboid corresponding to the reconstructed three-dimensional space, as shown in Figure 5 As shown, the direction indicated by the arrow is the direction of the central axis. The direction of the central axis passes through the cuboid and has two intersections t1 and t2 with the cuboid. The intersection t1 is the near intersection, and the intersection t2 is the far intersection. The distance between the optical center of the camera and the far intersection is the length of the central axis. The three-dimensional coordinates of the two intersections can be determined according to the direction of the central axis and the size of the reconstructed three-dimensional space. The length of the central axis can be obtained according to the three-dimensional coordinates of the far intersection and the three-dimensional coordinates of the optical center of the camera.

[0148] After determining the vertex and height of the light cone, since the light cone needs to pass through the pixel circle, the center and radius of the pixel circle are known, so a cone can be uniquely determined, that is, the optical center of the camera and the pixel circle of the pixel point are connected, and the connecting line is extended to form the mother line of the light cone. The length of the connecting line is determined by the height of the light cone.

[0149] The direction of the central axis of each pixel point of the rendered image corresponding to the camera posture is different. The direction of the central axis is the viewing direction of the pixel point. Therefore, the direction of the light cone of each pixel point and the length of the central axis are different.

[0150] S202: Determine a sampling distance according to the number M of sampling balls and the length of the central axis of the light cone.

[0151] In one implementation, the sampling distance is equal to the ratio of the length of the central axis to M.

[0152] In another implementation method, it is necessary to determine the near intersection point of the central axis and the reconstructed three-dimensional space, and determine the first distance between the near intersection point and the optical center of the camera based on the three-dimensional coordinates of the near intersection point and the three-dimensional coordinates of the optical center of the camera. The second distance is obtained by subtracting the first distance from the length of the central axis, and the sampling distance is equal to the ratio of the second distance to M, wherein the second distance is the distance between the near intersection point and the far intersection point of the reconstructed three-dimensional space mentioned above.

[0153] S203, determining the center position and radius of the sampling sphere according to the optical center position of the camera and the sampling distance, and the sampling sphere is inscribed in the light cone.

[0154] Optionally, the distance from the sampling sphere to the optical center of the camera is determined according to the sampling distance, and the center position of the sampling sphere is determined according to the optical center position of the camera and the distance from the sampling sphere to the optical center of the camera. The radius of the sampling sphere is determined according to the distance from the sampling sphere to the optical center of the camera, the radius of the pixel circle, and the focal length of the camera.

[0155] In one implementation, sampling is performed once every the sampling distance starting from the optical center of the camera, and the distance ti from the i-th sampling ball to the optical center is: L*i, where L is the sampling distance.

[0156] In another implementation, an initial sampling position on the central axis may be determined, and sampling may be performed on the central axis of the light cone starting from the initial sampling position according to the sampling distance. Accordingly, the distance ti from the i-th sampling ball to the optical center is: L1+L*i, where L1 is the distance from the optical center to the initial sampling position, and L is the sampling distance.

[0157] The initial sampling position may be the near intersection of the central axis and the reconstructed three-dimensional space, or the position of a pixel circle, or a predefined fixed position. For example, the initial sampling distance is set to a position 2 meters from the center of the circle.

[0158] Exemplarily, the coordinates of the center of the i-th sampling sphere on the light cone are determined by the following formula (3):

[0159] Pi=o+ti·d (3)

[0160] Among them, ti is the optomechanical distance from the i-th sampling sphere on the light cone to the camera, o is the coordinate of the optical center of the camera, and d is the unit direction vector of the central axis of the light cone.

[0161] Exemplarily, the radius of the i-th sampling sphere on the light cone is determined by the following formula (4):

[0162]

[0163] Among them, ti is the optical-mechanical distance from the i-th sampling ball on the light cone to the camera, f is the focal length of the camera, and r p is the radius of the pixel circle.

[0164] In this embodiment, the light cone of the pixel point is formed according to the optical center position of the camera, the position of the pixel point, and the radius of the pixel circle. The sampling distance is determined according to the number M of sampling balls and the length of the central axis of the light cone. The center position and radius of the sampling ball are determined according to the optical center position of the camera and the sampling distance, and the sampling ball is inscribed in the light cone. This method can accurately model the light cone of the pixel point and determine the sampling interval of the sampling ball according to the length of the central axis of the light cone, so that a suitable sampling position can be obtained, which improves the quality of subsequent mipmap sampling.

[0165] Based on the first and second embodiments, the third embodiment of the present application provides a method for reconstructing a neural radiation field, which is used to illustrate the processing flow of the mipmap sampling model in the first embodiment. Figure 6 A flowchart of mipmap sampling provided in Example 3 of the present application is shown in FIG. Figure 6 As shown, the method provided in this embodiment includes the following steps.

[0166] S301. Determine sampling parameters of each plane according to the center position and radius of the sampling sphere, where the sampling parameters include sampled pixel coordinates and sampled level coordinates.

[0167] Exemplarily, the mipmap sampling model is used to sample multi-level textures of three planes of a sampling sphere, the three planes including: an XY plane, an XZ plane, and a YZ plane, wherein the multi-level texture of each plane includes N levels, and the resolution of feature maps of the N levels gradually decreases, where N is an integer greater than or equal to 2.

[0168] Optionally, the resolution of the feature map of the next level in the N levels is 1 / 2 of the resolution of the feature map of the previous level. The resolution of the feature map of the i-th level is also referred to as the resolution of the i-th level.

[0169] There is a base layer in the N layers. The resolution of the base layer is the largest. The resolution of the feature map of the base layer is a preset fixed value. Assume that the resolution of the base layer is H M0 ×W M0 , then the resolution of the remaining levels Mi is 1 / 2 of the resolution of the previous level Mi-1, which can be expressed as:

[0170] H Mi =1 / 2H Mi-1 , W Mi =1 / 2W Mi-1

[0171] For example, if the resolution of the feature map of the base level is 512*512, the resolutions of the feature maps of each level are: 512*512, 256*256, 128*128, 64*64, 32*32, 16*16, 8*8, 4*4, 2*2, and 1*1.

[0172] At the beginning of modeling, the feature map of the base layer is randomly initialized, and the feature maps of each remaining layer are obtained by downsampling the feature map of the previous layer.

[0173] Given the center position and radius of the sampling ball, its corresponding sampling parameters can be determined, and sampling is performed using the sampling parameters, where the center position of the sampling ball refers to the three-dimensional coordinates of the center of the sampling ball. The sampling parameters can be expressed as (u, v, l), where u and v are the sampled pixel coordinates, and l is the sampled level coordinates. The sampled pixel coordinates are used to determine the sampling position in the image, and the sampled level coordinates are used to determine at which level to sample. The mipmap has N levels, and the sampling levels on different sampling balls are different. In this embodiment, as the radius of the sampling ball increases, the sampling level gradually increases. The larger the sampling level, the lower the resolution of the feature map of the level, that is, the farther the position from the observation point, the lower the resolution of the sampled feature map.

[0174] Specifically, the components of the three-dimensional coordinates of the center of the sampling sphere on the two coordinate axes corresponding to each plane are determined as the sampled pixel coordinates. Taking the XY plane as an example, assuming that the three-dimensional coordinates of the center of the sampling sphere are p i , then the u and v coordinates are p i The X-axis and Y-axis components.

[0175] In one implementation, the sampling level coordinates are pre-set, and the sampling level coordinates gradually increase as the radius of the sampling ball increases. They can gradually increase according to a certain rule. Assuming there are 5 sampling balls, the sampling level coordinates are: 2, 3, 4, 6, 8, or 2, 3, 4.1, 5.3, 6.6.

[0176] In another implementation, the sampling level coordinates may be determined according to the ratio of the radius of the sampling sphere to the element radius of the feature map of the base level of the planar multi-level texture.

[0177] Exemplarily, the level coordinates of the sampling are determined by the following formula (5):

[0178]

[0179] Among them, r feacture is the element radius of the feature map at the base level, r i is the radius of the sampling sphere.

[0180] The element radius of the feature map of the base level of the multi-level texture of the plane may be a preset value, or may be determined according to the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane.

[0181] Exemplarily, the area of ​​the feature map of the base level of the multi-level texture of the plane is determined based on the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane; the element radius of the feature map of the base level of the multi-level texture of the plane is determined based on the area of ​​the feature map of the base level of the multi-level texture of the plane.

[0182] For example, the area of ​​the feature map of the base level of a multi-level texture of a plane is determined according to the following formula:

[0183]

[0184] Among them, HW f is the resolution of the feature map of the base level of the multi-level texture of the plane, HW f Can be a preset fixed value, H f , W f The sampling sphere is decomposed into XY, XZ and YZ planes. The radius of the sampling sphere is known, and the length and width of each plane can be obtained according to the radius of the sampling sphere.

[0185] After obtaining the area of ​​the feature map of the base level, the element radius of the feature map of the base level is obtained using the above formula (2).

[0186] For the same sampling sphere, the element radius of the feature map of the base level of the multi-level texture of each plane is the same, and accordingly, the level coordinates of the sampling of each plane are also the same.

[0187] It is understood that in the embodiment of the present application, mipmap sampling can also be performed on only one or two of the above three planes, for example, mipmap sampling is performed on the XY plane and the XZ plane. Of course, the planes are not limited to the above XY, XZ and YZ planes, and other planes can also be selected, for example, a plane obtained by rotating the XY plane by a certain angle.

[0188] S302: Sample each plane of the sampling sphere according to the sampling parameters of each plane to obtain a feature map of each plane of the sampling sphere.

[0189] In one implementation, for any plane, two adjacent levels of the sampled level coordinates are determined based on the sampled level coordinates; sampling is performed based on the sampled pixel coordinates and the adjacent levels to obtain feature maps of the adjacent levels; and based on the feature maps of the adjacent levels, trilinear interpolation is performed to obtain a feature map of the sampled level.

[0190] The sampled level coordinates calculated in the above manner may be integers or non-integers. Therefore, it is impossible to directly perform sampling to obtain the feature map of the sampled level. Trilinear interpolation can be used to obtain the feature map of the sampled level.

[0191] Trilinear interpolation is used in three-dimensional space for interpolation in three dimensions. For example, during interpolation, four adjacent points are determined on the adjacent previous level according to the sampled pixel coordinates, and four adjacent points are determined on the adjacent next level. The distances between the eight adjacent points and the sampled pixel coordinates are calculated respectively, and the inverse of the distance is taken as the weight. The weighted average algorithm is used to calculate the average of the three-dimensional coordinates of the eight adjacent points to obtain the three-dimensional coordinates of the difference point.

[0192] S303: Connect the feature maps of the three planes to form a feature vector of the sampling sphere.

[0193] In this embodiment, the sampling parameters of each plane are determined according to the center position and radius of the sampling sphere, and the sampling parameters include the sampled pixel coordinates and the sampled level coordinates. Each plane of the sampling sphere is sampled according to the sampling parameters of each plane to obtain a feature map of each plane of the sampling sphere. The feature maps of the three planes are connected to form a feature vector of the sampling sphere, so that more and richer features can be sampled in multiple different planes and multiple levels, so that the feature vector of the sampling sphere can contain more features.

[0194] In order to facilitate better implementation of the neural radiation field reconstruction method of the embodiment of the present application, the embodiment of the present application also provides a neural radiation field reconstruction device. Figure 7This is a schematic diagram of the structure of the neural radiation field reconstruction device provided in Example 4 of the present application, such as Figure 7 As shown, the neural radiation field reconstruction device 100 may include:

[0195] An acquisition module 11 is used to acquire the camera pose of each sample image in the sample image sequence;

[0196] A training module 12 is used to train a neural radiation field using the camera pose of the sample image, wherein the output of the neural radiation field is the density information and color information of each pixel of the rendered image corresponding to the camera pose, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model;

[0197] The light cone projection module is used to perform light cone projection on the pixel point according to the camera posture to form a conical light cone, and determine M sampling spheres on the light cone of the pixel point, where M is an integer greater than or equal to 2;

[0198] The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball;

[0199] The multi-layer perceptron model is used to process the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain density information and color information of each sampling ball of the pixel point, and the viewing direction of the pixel point is determined according to the camera posture;

[0200] A volume rendering module 13, configured to perform volume rendering according to density information and color information of each pixel point of the rendered image to obtain the rendered image;

[0201] A loss module 14, configured to calculate the loss of the neural radiation field according to the sample image and the rendered image;

[0202] The parameter updating module 15 is used to update the parameters of the neural radiation field according to the loss.

[0203] In some embodiments, the light cone projection module is specifically used to:

[0204] A light cone of the pixel point is formed according to the optical center position of the camera, the center position and radius of the pixel circle corresponding to the pixel point, wherein the optical center position of the camera is the vertex of the light cone of the pixel point, the line connecting the optical center position of the camera and the center position of the pixel circle is the central axis of the light cone of the pixel point, and the generatrix of the light cone of the pixel is tangent to the pixel circle.

[0205] In some embodiments, the light cone projection module is specifically used to:

[0206] A line connecting the optical center position of the camera and the center position of the pixel circle is used as the central axis of the light cone of the pixel point;

[0207] Determining the length of the central axis according to the direction of the central axis and the size of the reconstructed three-dimensional space;

[0208] The optical center position of the camera is used as the vertex of the light cone of the pixel point, the optical center of the camera and the pixel circle are connected, and the connecting line is extended to form a generatrix of the light cone.

[0209] In some embodiments, the light cone projection module is further used to:

[0210] Determining the area of ​​the pixel circle according to the intrinsic parameters of the camera and the resolution of the sample image;

[0211] The radius of the pixel circle is determined according to the area of ​​the pixel circle.

[0212] In some embodiments, the light cone projection module is specifically used to:

[0213] The area of ​​the pixel circle is determined by the following formula:

[0214]

[0215] Wherein, HW is the resolution of the sample image, f is the focal length of the camera, FoV x is the horizontal field of view of the camera, FoV y is the vertical field of view of the camera.

[0216] In some embodiments, the light cone projection module is specifically used to:

[0217] Determine the sampling distance according to the number M of sampling balls and the length of the central axis of the light cone;

[0218] The center position and radius of the sampling sphere are determined according to the optical center position of the camera and the sampling distance, and the sampling sphere is inscribed in the light cone.

[0219] In some embodiments, the light cone projection module is specifically used to:

[0220] Determine the distance from the sampling sphere to the optical center of the camera according to the sampling distance;

[0221] Determine the center position of the sampling sphere according to the optical center position of the camera and the distance from the sampling sphere to the optical center of the camera;

[0222] The radius of the sampling sphere is determined according to the distance from the sampling sphere to the optical center of the camera, the radius of the pixel circle and the focal length of the camera.

[0223] In some embodiments, the light cone projection module is specifically used to:

[0224] The coordinates of the center of the i-th sampling sphere on the light cone are determined by the following formula:

[0225] Pi=o+ti·d;

[0226] Wherein, ti is the optical-mechanical distance from the i-th sampling sphere on the light cone to the camera, o is the coordinate of the optical center of the camera, and d is the unit direction vector of the central axis of the light cone.

[0227] In some embodiments, the light cone projection module is specifically used to:

[0228] The radius of the i-th sampling sphere on the light cone is determined by the following formula:

[0229]

[0230] Wherein, ti is the optical-mechanical distance from the i-th sampling sphere on the light cone to the camera, f is the focal length of the camera, and r p is the radius of the pixel circle.

[0231] In some embodiments, the multi-level texture sampling model is used to sample the multi-level textures of three planes of the sampling sphere, the three planes including: an XY plane, an XZ plane, and a YZ plane, wherein the multi-level texture of each plane includes N levels, and the resolution of the feature maps of the N levels gradually decreases, where N is an integer greater than or equal to 2;

[0232] The multi-level texture sampling model is specifically used for:

[0233] Determine sampling parameters of each plane according to the center position and radius of the sampling sphere, wherein the sampling parameters include pixel coordinates of the sampling and level coordinates of the sampling;

[0234] Sampling each plane of the sampling sphere according to the sampling parameters of each plane to obtain a characteristic graph of each plane of the sampling sphere;

[0235] The feature maps of the three planes are connected to form a feature vector of the sampling sphere.

[0236] In some embodiments, the multi-level texture sampling model is specifically used for:

[0237] Determine the components of the three-dimensional coordinates of the center of the sampling sphere on the two coordinate axes corresponding to the plane as the pixel coordinates of the sampling;

[0238] The level coordinates of the sampling are determined according to the ratio of the radius of the sampling sphere to the element radius of the feature map of the base level of the multi-level texture of the plane.

[0239] In some embodiments, the multi-level texture sampling model is specifically used for:

[0240] The level coordinates of the sampling are determined by the following formula:

[0241]

[0242] Among them, r feacture is the element radius of the feature map of the base level, r i is the radius of the sampling sphere.

[0243] In some embodiments, the multi-level texture sampling model is further used to:

[0244] Determining the area of ​​the feature map of the base level of the multi-level texture of the plane according to the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane;

[0245] An element radius of the feature map of the base level of the multi-level texture of the plane is determined according to the area of ​​the feature map of the base level of the multi-level texture of the plane.

[0246] In some embodiments, the multi-level texture sampling model is specifically used for:

[0247] The area of ​​the feature map of the base level of the multi-level texture of the plane is determined according to the following formula:

[0248]

[0249] Among them, HW f is the resolution of the feature map of the base level of the multi-level texture of the plane, H f , W f are the length and width of the plane.

[0250] In some embodiments, the multi-level texture sampling model is specifically used for:

[0251] According to the sampled level coordinates, determining two adjacent levels of the sampled level coordinates;

[0252] Sampling is performed according to the sampled pixel coordinates and the adjacent level to obtain a feature map of the adjacent level;

[0253] According to the feature maps of the adjacent levels, trilinear interpolation is performed to obtain the feature map of the sampled level.

[0254] In some embodiments, the resolution of the feature map of the next level among the N levels is 1 / 2 of the resolution of the feature map of the previous level.

[0255] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here.

[0256] The above describes the device 100 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0257] An embodiment of the present application also provides an electronic device. Figure 8 A structural diagram of an electronic device provided in Embodiment 5 of the present application, such as Figure 8 As shown, the electronic device 200 may include:

[0258] The memory 21, the processor 22 and the dual camera module 23, the memory 21 is used to store the computer program and transmit the program code to the processor 22. In other words, the processor 22 can call and run the computer program from the memory 21 to implement the method in the embodiment of the present application. The dual camera module 23 is used to capture images and send the images to the memory 21 and the processor 22 for processing.

[0259] For example, the processor 22 may be configured to execute the above method embodiments according to instructions in the computer program.

[0260] In some embodiments of the present application, the processor 22 may include but is not limited to:

[0261] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0262] In some embodiments of the present application, the memory 21 includes but is not limited to:

[0263] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0264] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 22 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0265] like Figure 8 As shown, the electronic device 200 may further include: a transceiver 24 , which may be connected to the processor 22 or the memory 21 .

[0266] The processor 22 may control the transceiver 24 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 23 may include a transmitter and a receiver. The transceiver 24 may further include an antenna, and the number of antennas may be one or more.

[0267] Understandable, although Figure 8 Not shown, the electronic device 200 may also include a wireless fidelity WIFI module, a positioning module, a Bluetooth module, a display, a controller, etc., which will not be repeated here.

[0268] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0269] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0270] The present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device executes the corresponding process in the map relocation method combined with semantic information in the embodiment of the present application, which will not be described here for brevity.

[0271] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0272] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0273] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for reconstructing a neural radiation field, characterized in that: include: Obtain the camera pose of each sample image in the sample image sequence; The neural radiation field is trained using the camera pose of the sample image, wherein the output of the neural radiation field is the density information and color information of each pixel point of the rendered image corresponding to the camera pose, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model; The light cone projection module is used to perform light cone projection on the pixel point according to the camera posture to form a conical light cone, and determine M sampling spheres on the light cone of the pixel point, where M is an integer greater than or equal to 2; The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball; The multi-layer perceptron model is used to process the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain density information and color information of each sampling ball of the pixel point, and the viewing direction of the pixel point is determined according to the camera posture; Performing volume rendering according to density information and color information of each pixel point of the rendered image to obtain the rendered image; The loss of the neural radiation field is calculated according to the sample image and the rendered image, and the parameters of the neural radiation field are updated according to the loss.

2. The method according to claim 1, characterized in that The step of performing light cone projection on the pixel points according to the camera posture to form a conical light cone comprises: A light cone of the pixel point is formed according to the optical center position of the camera, the center position and radius of the pixel circle corresponding to the pixel point, wherein the optical center position of the camera is the vertex of the light cone of the pixel point, the line connecting the optical center position of the camera and the center position of the pixel circle is the central axis of the light cone of the pixel point, and the generatrix of the light cone of the pixel is tangent to the pixel circle.

3. The method according to claim 2, characterized in that The forming of the light cone of the pixel point according to the optical center position of the camera, the center position and radius of the pixel circle corresponding to the pixel point comprises: A line connecting the optical center position of the camera and the center position of the pixel circle is used as the central axis of the light cone of the pixel point; Determining the length of the central axis according to the direction of the central axis and the size of the reconstructed three-dimensional space; The optical center position of the camera is used as the vertex of the light cone of the pixel point, the optical center of the camera and the pixel circle are connected, and the connecting line is extended to form a generatrix of the light cone.

4. The method according to claim 2, characterized in that: Also includes: Determining the area of ​​the pixel circle according to the intrinsic parameters of the camera and the resolution of the sample image; The radius of the pixel circle is determined according to the area of ​​the pixel circle.

5. The method according to claim 4, characterized in that The determining the area of ​​the pixel circle according to the intrinsic parameters of the camera and the resolution of the sample image includes: The area of ​​the pixel circle is determined by the following formula: Wherein, HW is the resolution of the sample image, f is the focal length of the camera, FoV x is the horizontal field of view of the camera, FoV y is the vertical field of view of the camera.

6. The method according to claim 2, characterized in that The determining of M sampling spheres on the light cone of the pixel point comprises: Determine the sampling distance according to the number M of sampling balls and the length of the central axis of the light cone; The center position and radius of the sampling sphere are determined according to the optical center position of the camera and the sampling distance, and the sampling sphere is inscribed in the light cone.

7. The method according to claim 6, characterized in that The step of determining the center position and radius of the sampling sphere according to the optical center position of the camera and the sampling distance includes: Determine the distance from the sampling sphere to the optical center of the camera according to the sampling distance; Determine the center position of the sampling sphere according to the optical center position of the camera and the distance from the sampling sphere to the optical center of the camera; The radius of the sampling sphere is determined according to the distance from the sampling sphere to the optical center of the camera, the radius of the pixel circle and the focal length of the camera.

8. The method according to claim 7, characterized in that The step of determining the center position of the sampling sphere according to the optical center position of the camera and the distance from the sampling sphere to the optical center of the camera comprises: The coordinates of the center of the i-th sampling sphere on the light cone are determined by the following formula: Pi=o+ti·d; Wherein, ti is the optical-mechanical distance from the i-th sampling sphere on the light cone to the camera, o is the coordinate of the optical center of the camera, and d is the unit direction vector of the central axis of the light cone.

9. The method according to claim 8, characterized in that Determining the radius of the sampling sphere according to the distance from the sampling sphere to the optical center of the camera, the radius of the pixel circle, and the focal length of the camera includes: The radius of the i-th sampling sphere on the light cone is determined by the following formula: Wherein, ti is the optical-mechanical distance from the i-th sampling sphere on the light cone to the camera, f is the focal length of the camera, and r p is the radius of the pixel circle.

10. The method according to any one of claims 1 to 9, characterized in that: The multi-level texture sampling model is used to sample the multi-level textures of three planes of the sampling sphere, the three planes including: an XY plane, an XZ plane, and a YZ plane, wherein the multi-level texture of each plane includes N levels, and the resolution of the feature maps of the N levels gradually decreases, and N is an integer greater than or equal to 2; The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball, including: Determine sampling parameters of each plane according to the center position and radius of the sampling sphere, wherein the sampling parameters include pixel coordinates of the sampling and level coordinates of the sampling; Sampling each plane of the sampling sphere according to the sampling parameters of each plane to obtain a characteristic graph of each plane of the sampling sphere; The feature maps of the three planes are connected to form a feature vector of the sampling sphere.

11. The method according to claim 10, characterized in that Determining the sampling parameters of each plane according to the center position and radius of the sampling sphere includes: Determine the components of the three-dimensional coordinates of the center of the sampling sphere on the two coordinate axes corresponding to the plane as the pixel coordinates of the sampling; The level coordinates of the sampling are determined according to the ratio of the radius of the sampling sphere to the element radius of the feature map of the base level of the multi-level texture of the plane.

12. The method according to claim 11, characterized in that The step of determining the level coordinates of the sampling according to the ratio of the radius of the sampling sphere to the element radius of the feature map of the base level of the multi-level texture of the plane comprises: The level coordinates of the sampling are determined by the following formula: Among them, r feacture is the element radius of the feature map of the base level, r i is the radius of the sampling sphere.

13. The method according to claim 11, characterized in that Also includes: Determining the area of ​​the feature map of the base level of the multi-level texture of the plane according to the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane; An element radius of the feature map of the base level of the multi-level texture of the plane is determined according to the area of ​​the feature map of the base level of the multi-level texture of the plane.

14. The method according to claim 13, characterized in that The step of determining the area of ​​the feature map of the base level of the multi-level texture of the plane according to the resolution of the feature map of the base level of the multi-level texture of the plane and the size of the plane comprises: The area of ​​the feature map of the base level of the multi-level texture of the plane is determined according to the following formula: Among them, HW f is the resolution of the feature map of the base level of the multi-level texture of the plane, H f , W f are the length and width of the plane.

15. The method according to claim 10, characterized in that The sampling of each plane of the sampling sphere according to the sampling parameters of each plane to obtain a feature map of each plane of the sampling sphere includes: According to the sampled level coordinates, determining two adjacent levels of the sampled level coordinates; Sampling is performed according to the sampled pixel coordinates and the adjacent level to obtain a feature map of the adjacent level; According to the feature maps of the adjacent levels, trilinear interpolation is performed to obtain the feature map of the sampled level.

16. The method according to claim 10, characterized in that The resolution of the feature map of the next level in the N levels is 1 / 2 of the resolution of the feature map of the previous level.

17. A device for reconstructing a neural radiation field, characterized in that: include: An acquisition module, used to acquire the camera pose of each sample image in the sample image sequence; A training module, used to train a neural radiation field using the camera pose of the sample image, wherein the output of the neural radiation field is the density information and color information of each pixel of the rendered image corresponding to the camera pose, wherein the neural radiation field includes a light cone projection module, a multi-level texture sampling model and a multi-layer perceptron model; The light cone projection module is used to perform light cone projection on the pixel point according to the camera posture to form a conical light cone, and determine M sampling spheres on the light cone of the pixel point, where M is an integer greater than or equal to 2; The multi-level texture sampling model is used to perform multi-level texture sampling on multiple planes of the sampling ball according to the information of the sampling ball to form a feature vector of the sampling ball; The multi-layer perceptron model is used to process the feature vectors of each sampling ball of the pixel point and the viewing direction of the pixel point to obtain density information and color information of each sampling ball of the pixel point, and the viewing direction of the pixel point is determined according to the camera posture; A volume rendering module, used for performing volume rendering according to density information and color information of each pixel point of the rendered image to obtain the rendered image; a loss module, configured to calculate a loss of the neural radiation field according to the sample image and the rendered image; A parameter updating module is used to update the parameters of the neural radiation field according to the loss.

18. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 16.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.

Citation Information

Cited By

  • Human body three-dimensional reconstruction method based on conical ray nerve radiation field

    CN119206089A