A fluid reconstruction method based on neural radiation field
Through a method based on neural radiation fields, using sparse perspective and strong physical constraints, the fluid density field and velocity field are modeled respectively, which solves the problems of high fluid reconstruction cost and limited generalization ability in the existing technology, and achieves flexible and effective Fluid reconstruction and analysis.
Patent Information
- Application Number
- CN202410985224.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Existing fluid reconstruction methods are expensive and difficult to flexibly capture complex fluids, especially in unknown environments. Moreover, methods based on visible light images have limited generalization capabilities and are difficult to apply to different fluid modeling and 3D spatial feature analysis.
A method based on the neural radiation field is adopted to model the density field and velocity field of the fluid respectively through sparse viewing angles and strong physical constraints. Multi-view images and temporal consistency constraints are used to train the neural radiation field model to achieve fluid reconstruction of composite scenes.
It reduces hardware costs, improves the flexibility and quality of fluid reconstruction, can effectively capture and analyze 3D features of different fluid forms, and is suitable for the reconstruction and analysis of complex fluids.
Smart Images

Figure CN118521718B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fluid analysis and reconstruction, and in particular to a fluid reconstruction method based on neural radiation field. Background Art
[0002] Fluid reconstruction has wide applications and far-reaching research significance in engineering, scientific research and daily life. Traditional fluid reconstruction methods usually rely on direct measurement and numerical simulation of fluid flow. These methods require a variety of instruments and techniques to obtain the physical properties of the fluid, for example, using particle image velocimetry and ultrasonic densitometers to measure instantaneous velocity fields and density fields, respectively. However, these methods are often costly and difficult to flexibly capture arbitrary fluids. In work such as field water conservancy exploration and fluid capture modeling based on mobile devices, higher requirements are placed on fluid reconstruction technology in unknown and complex environments.
[0003] Inspired by observation-based methods, some researchers have proposed fluid reconstruction through visible light images. For fluids that can be indirectly observed by the human eye, ordinary cameras are used to capture images and estimate the density field and velocity field of the fluid from them. This method improves the reconstruction quality while reducing hardware requirements. It mainly combines fluid reconstruction with data-driven end-to-end learning, from observational reasoning to passive scalar distribution, by combining multi-view geometry and differentiable rendering. Although fluid reconstruction algorithms based on visible light images have been freed from the constraints of laboratory environments to a certain extent, most methods use multi-view synchronized videos captured by high-speed cameras as supervision information, and only rely on fluid dynamics equations to construct strong physical constraints. They are mostly trained using the generative adversarial training paradigm and rely only on 2D image constraints. They usually have limited generalization capabilities, are difficult to apply to different fluid modeling, and obtain explicit 3D features at any time, and cannot be directly used for fluid 3D spatial feature analysis.
[0004] As an extension of differentiable rendering, Neural Radiance Fields (NeRF) has attracted much attention for its stunning new perspective rendering effects and powerful scene understanding capabilities. NeRF only uses the input image as supervision information, represents the scene as an implicit volume, and trains a coordinate-based network to approximate the continuous volumetric radiation field, and achieves implicit reconstruction through volume rendering. However, the current method is mainly aimed at static scenes, and requires dense perspectives for implicit scene training, which is not suitable for the fluid reconstruction task targeted by the present invention. The present invention proposes to use multiple separate neural radiation fields to separately model and learn the density field and velocity field of the scene, thereby achieving the purpose of reconstructing composite scenes and different fluid forms. Summary of the invention
[0005] In order to make up for the shortcomings of the existing technology, the present invention provides a fluid reconstruction method based on neural radiation field. For fluid reconstruction tasks, the existing advanced neural radiation field method is improved, and a composite scene expression model based on sparse perspective is proposed. By introducing strong physical constraints, temporal consistency constraints, etc., a fluid density field and velocity field reconstruction method with different characteristics is realized.
[0006] The present invention is implemented by the following technical solution: a fluid reconstruction method based on neural radiation field, specifically comprising the following steps:
[0007] Step S1, system calibration and calibration accuracy assessment, specifically includes the following steps:
[0008] Step S1-1, arrange several cameras at equal intervals along a horizontal arc, and the angles between each camera are evenly distributed; the center of the arc of the camera array is aligned with the target object, ensuring that all cameras are on the same horizontal plane and are at equal distances from the target object; the target object is located at the focus of the arc, and a black and white checkerboard is first placed for system calibration;
[0009] Step S1-2: Calibrate the camera parameters for the multi-view image sequence obtained in step S1-1:
[0010] First, the pixel coordinates of all black and white grid intersections in each camera are obtained through the detection algorithm ; Given the physical size of each grid on the chessboard, express the actual coordinates of these intersections in the world coordinate system ,in ; Using the corresponding points in the camera coordinate system and the world coordinate system, the camera's external parameters, namely the rotation matrix R and the translation vector t, are estimated through direct linear transformation (DLT); using the pinhole camera model, the points in the world coordinate system are projected onto the image plane, and the camera's internal parameters, including the focal length f, the principal point coordinates , tilt coefficient , and the distortion coefficient ;
[0011] Step S1-3: Quantitatively evaluate the accuracy of the system calibration in step S1-2 by calculating the reprojection error. Select any camera and project the intersection point in the world coordinate system onto the image plane using the estimated camera parameters to obtain the estimated pixel coordinates. :
[0012]
[0013] Calculate the actual intersection pixel coordinates With estimated coordinates The error between them is calculated and the average reprojection error of all intersection points is calculated. (Unit: Pixel):
[0014] ;
[0015] Step S2, fluid reconstruction and three-dimensional feature analysis, specifically includes the following steps:
[0016] Step S2-1, collect sparse multi-view image sequences and generate scene configuration files based on the camera parameters obtained in step S1-2: replace the black and white checkerboard with the fluid launch device, and take pictures of the fluid motion sequence from multiple perspectives. Fill the calibrated camera parameters and fluid field scene parameters into the json configuration file.
[0017] Step S2-2: training the proposed neural radiation field model using the multi-view image sequence and configuration file obtained in step S2-1, specifically including the following steps:
[0018] Step S2-2-1: Establish a neural radiation field model for fluid, which includes three components to describe the static color density field in the scene , dynamic color density field With dynamic velocity field :
[0019]
[0020] in Represents the color attribute of a 3D point in space; Represents the density attribute of a 3D point in space; Represents the velocity attribute of a 3D point in space; (x, y, z) describes the 3D coordinates, and t represents the timestamp;
[0021] Step S2-2-2: Based on the neural radiation field model constructed above, use each frame of each camera for training, sample 1024 rays (pixels) in the picture, convert the rays into a representation in the world coordinate system according to the camera pose in the configuration file, and sample N 3D space points on each ray according to the scene configuration, input the sampling point coordinates and timestamps into the three constructed radiation field models, and obtain the predicted Quantity;
[0022] Step S2-2-3: Based on the result obtained in step S2-2-2, use the volume rendering formula to render each ray Integrate the components of Integration of static and dynamic density field components:
[0023]
[0024]
[0025] in:
[0026]
[0027]
[0028] Step S2-2-4, constructing a loss function for the model prediction results to perform model training;
[0029] Step S2-3: The trained model can be used to render images of the fluid scene at any given viewing angle and timestamp, and the corresponding 3D spatial density field and velocity field data can be obtained, which can be used for feature data analysis of the fluid scene.
[0030] As a preferred solution, the fluid field scene parameters in step S2-1 include image resolution, camera intrinsic parameters, extrinsic parameters, the camera's horizontal viewing angle minimum distance, maximum distance, and scene scale resolution.
[0031] As a preferred solution, step S2-2-4 specifically includes the following steps:
[0032] Step S2-2-4-1: Reconstruct the ray color obtained in step S2-2-3 , and the captured pixel color to construct the rendering color loss & image multi-scale perceptual loss:
[0033]
[0034]
[0035] Step S2-2-4-2, the step S2-2-1 obtained The components construct the Navier-Stokes physical prior loss, so that the model learns the density and velocity field expression that conforms to the laws of physical motion:
[0036]
[0037] Step S2-2-4-3, the step S2-2-1 obtained The components construct the inter-frame density velocity torsion loss, so that the model learns the density velocity field expression with consistent time sequence:
[0038]
[0039] in Represents the twist operation based on the current density and velocity, twisting the density field and velocity field at time t to obtain the density field at time t+1.
[0040] Step S2-2-4-4, the step S2-2-1 obtained The components construct regularization constraints, restricting the 3D points in space to be represented only by static radiation fields or dynamic radiation fields, and adding a tilt parameter k to make the regularization term more penalizing for the dynamic radiation field. The parameter is dynamically adjusted during training, so that the static radiation field representation is learned more preferentially in the early stage of training, and the dynamic radiation field representation is gradually learned in subsequent iterations:
[0041] .
[0042] Due to the adoption of the above technical solution, the present invention has the following beneficial effects compared with the prior art: the commonly used methods currently require specific instruments to simulate and reconstruct fluids, and the NeRF-based methods are usually aimed at static scenes, and it is difficult to learn complex and highly dynamic fluid radiation field representations. The method proposed in the present invention can realize the reconstruction and analysis tasks of fluids with different properties (smoke, flames) at a low cost, such as Figure 3 As shown. The method adopted by the present invention has a simple principle and a clear idea. It can capture and reconstruct fluids in general scenarios using simple equipment, while reducing costs and improving flexibility while ensuring reconstruction quality. The reconstructed fluid density and velocity physical information can be further used in the fields of three-dimensional modeling, fluid dynamics analysis, etc.
[0043] Additional aspects and advantages of the present invention will become apparent from the following description or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0045] Figure 1 is a flow chart of the method of the present invention;
[0046] Figure 2 A schematic diagram of the camera placement for sampling in the present invention;
[0047] Figure 3 A new perspective synthesis result for fluid reconstruction of the present invention;
[0048] Figure 4 The fluid reconstruction result at a specified timestamp and observation angle obtained by the present invention, where (a) is the reconstructed image result and (b) is the fluid density field visualization result. DETAILED DESCRIPTION
[0049] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0051] Combine the following Figures 1 to 4 The fluid reconstruction method based on neural radiation field according to an embodiment of the present invention is described in detail.
[0052] like Figure 1 As shown, the present invention proposes a fluid reconstruction method based on neural radiation field.
[0053] Step S1, system calibration and calibration accuracy assessment, specifically includes the following steps:
[0054] Step S1-1, arrange multiple cameras at equal intervals along a horizontal arc, and the angles between each camera are evenly distributed. The center of the arc of the camera array is aimed at the target object, ensuring that all cameras are on the same horizontal plane and are at equal distances from the target object. The target object is located at the focus of the arc, and a 5 mm × 5 mm black and white checkerboard is first placed for system calibration. This arrangement ensures that the target object is photographed from multiple perspectives to obtain high-quality multi-perspective image data, such as Figure 2 shown.
[0055] Step S1-2: Calibrate the camera parameters for the multi-view image sequence obtained in step S1-1:
[0056] First, use a detection algorithm (such as findChessboardCorners in OpenCV) to obtain the pixel coordinates of all black and white grid intersections in each camera. Knowing the physical size of each grid (e.g. d mm), the actual coordinates of these intersections can be expressed in the world coordinate system ,in Using the corresponding points in the camera coordinate system and the world coordinate system, the camera's external parameters, namely the rotation matrix R and the translation vector t, are estimated through direct linear transformation (DLT). Using the pinhole camera model, the points in the world coordinate system are projected onto the image plane, and the camera's internal parameters, including the focal length f, the principal point coordinates, are estimated. , tilt coefficient , and the distortion coefficient .
[0057] Step S1-3: Quantitatively evaluate the accuracy of the system calibration in step 1.2 by calculating the reprojection error. Select any camera and project the intersection point in the world coordinate system onto the image plane using the estimated camera parameters to obtain the estimated pixel coordinates. :
[0058]
[0059] Calculate the actual intersection pixel coordinates With estimated coordinates The error between them is calculated and the average reprojection error of all intersection points is calculated. (Unit: Pixel):
[0060]
[0061] Through the above steps, the intrinsic and extrinsic parameters of multiple cameras can be effectively calibrated, and the accuracy of calibration can be evaluated by calculating and visualizing the reprojection error. These parameters are crucial for high-quality multi-view reconstruction and image processing.
[0062] Step S2: fluid reconstruction and three-dimensional feature analysis
[0063] Step S2-1: first collect a sparse multi-view image sequence and generate a scene configuration file based on the camera parameters obtained in step S1-2, as follows:
[0064] Replace the black and white checkerboard with a turbulent laminar mixed colored smoke launcher to capture fluid motion sequence images from multiple perspectives. Fill the calibrated camera parameters and colored smoke scene parameters (including image resolution, camera intrinsic parameters, extrinsic parameters, camera horizontal viewing angle minimum distance, maximum distance, and scene scale resolution) into the json configuration file.
[0065] Step S2-2: Next, the multi-view image sequence and configuration file obtained in step S2-1 are used in combination with the proposed neural radiation field model to perform training as follows:
[0066] Step S2-2-1: Establish a neural radiation field model for colored smoke, which includes three components to describe the static color density field in the scene , dynamic color density field With dynamic velocity field :
[0067]
[0068] in Represents the color attribute of a 3D point in space; Represents the density attribute of a 3D point in space; Represents the velocity attribute of a 3D point in space; (x, y, z) describes the 3D coordinates, and t represents the timestamp.
[0069] Step S2-2-2: Based on the neural radiation field model constructed above, use each frame of each camera for training, sample 1024 rays (pixels) in the picture, convert the rays into a representation in the world coordinate system according to the camera pose in the configuration file, and sample N 3D space points on each ray according to the scene configuration, input the sampling point coordinates and timestamps into the three constructed radiation field models, and obtain the predicted Quantity.
[0070] Step S2-2-3: Based on the result obtained in step S2-2-2, use the volume rendering formula to render each ray Integrate the components of Integration of static and dynamic density field components:
[0071]
[0072]
[0073] in:
[0074]
[0075]
[0076] Step S2-2-4: construct a loss function for the model prediction results to perform model training, as follows:
[0077] Step S2-2-4-1: Reconstruct the ray color obtained in step S2-2-3 , and the captured pixel color to construct the rendering color loss & image multi-scale perceptual loss:
[0078]
[0079]
[0080] Step S2-2-4-2, the step S2-2-1 obtained The components construct the Navier-Stokes physical prior loss, so that the model learns the density and velocity field expression that conforms to the laws of physical motion:
[0081]
[0082] Step S2-2-4-3, the step S2-2-1 obtained The components construct the inter-frame density velocity torsion loss, so that the model learns the density velocity field expression with consistent time sequence:
[0083]
[0084] in Represents the twist operation based on the current density and velocity, twisting the density field and velocity field at time t to obtain the density field at time t+1.
[0085] Step S2-2-4-3, the step S2-2-1 obtained The components construct regularization constraints, restricting the 3D points in space to be represented only by static radiation fields or dynamic radiation fields, and adding a tilt parameter k to make the regularization term more penalizing for the dynamic radiation field. The parameter is dynamically adjusted during training, so that the static radiation field representation is learned more preferentially in the early stage of training, and the dynamic radiation field representation is gradually learned in subsequent iterations.
[0086]
[0087] Step S2-3: The trained model can be used to render images of any given perspective and timestamp in the colored smoke scene. The results are as follows: Figure 3 As shown, the corresponding 3D spatial density field and velocity field data can be obtained at the same time. The results are as follows Figure 4 As shown, it is further used for the fluid characteristic analysis in the smoke diffusion process.
[0088] In the description of this specification, the description of the terms "one embodiment", "some embodiments", "specific embodiments", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0089] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A fluid reconstruction method based on neural radiation field, characterized in that: The specific steps include: Step S1, system calibration and calibration accuracy assessment, specifically includes the following steps: Step S1-1, arrange several cameras at equal intervals along a horizontal arc, and the angles between each camera are evenly distributed; the center of the arc of the camera array is aligned with the target object, ensuring that all cameras are on the same horizontal plane and are at equal distances from the target object; the target object is located at the focus of the arc, and a black and white checkerboard is first placed for system calibration; Step S1-2: Calibrate the camera parameters for the multi-view image sequence obtained in step S1-1: First, the pixel coordinates of all black and white grid intersections in each camera are obtained through the detection algorithm ; Given the physical size of each grid on the chessboard, express the actual coordinates of these intersections in the world coordinate system ,in ; Using the corresponding points in the camera coordinate system and the world coordinate system, estimate the external parameters of the camera through direct linear transformation, namely the rotation matrix R and the translation vector t; using the pinhole camera model, project the points in the world coordinate system onto the image plane and estimate the internal parameters of the camera, including the focal length f, the principal point coordinates , tilt coefficient , and the distortion coefficient ; Step S1-3: Quantitatively evaluate the accuracy of the system calibration in step S1-2 by calculating the reprojection error. Select any camera and project the intersection point in the world coordinate system onto the image plane using the estimated camera parameters to obtain the estimated pixel coordinates. : Calculate the actual intersection pixel coordinates With estimated coordinates The error between them is calculated and the average reprojection error of all intersection points is calculated. : ; Step S2, fluid reconstruction and three-dimensional feature analysis, specifically includes the following steps: Step S2-1, collect sparse multi-view image sequences and generate a scene configuration file based on the camera parameters obtained in step S1-2: replace the placed black and white checkerboard with the fluid emission device, and take fluid motion sequence pictures from multiple perspectives; fill the calibrated camera parameters and fluid field scene parameters into the json configuration file; Step S2-2, using the multi-view image sequence and configuration file obtained in step S2-1, combined with the proposed neural radiation field model for training; specifically comprising the following steps: Step S2-2-1: Establish a neural radiation field model for fluid, which includes three components to describe the static color density field in the scene , dynamic color density field With dynamic velocity field : in Represents the color attribute of a 3D point in space; Represents the density attribute of a 3D point in space; Represents the velocity attribute of a 3D point in space; (x, y, z) describes the 3D coordinates, and t represents the timestamp; Step S2-2-2: Based on the neural radiation field model constructed above, each frame of each camera is used for training, 1024 rays are sampled in the picture, and the rays are converted into a representation in the world coordinate system according to the camera pose in the configuration file. N 3D space points are sampled on each ray according to the scene configuration, and the sampling point coordinates and timestamps are input into the three constructed radiation field models to obtain the predicted Quantity; Step S2-2-3: Based on the result obtained in step S2-2-2, use the volume rendering formula to render each ray Integrate the components of Integration of static and dynamic density field components: in: Step S2-2-4, constructing a loss function for the model prediction results to perform model training; specifically comprising the following steps: Step S2-2-4-1: Reconstruct the ray color obtained in step S2-2-3 , and the captured pixel color to construct the rendering color loss & image multi-scale perceptual loss: Step S2-2-4-2, the step S2-2-1 obtained The components construct the Navier-Stokes physical prior loss, so that the model learns the density and velocity field expression that conforms to the laws of physical motion: Step S2-2-4-3, the step S2-2-1 obtained The components construct the inter-frame density velocity torsion loss, so that the model learns the time-consistent density velocity field expression: in Represents the twist operation based on the current density and velocity, twisting the density field and velocity field at time t to obtain the density field at time t+1; Step S2-2-4-4, the step S2-2-1 obtained The components construct regularization constraints, restricting the 3D points in space to be represented only by static radiation fields or dynamic radiation fields, and adding a tilt parameter k to make the regularization term more penalizing for the dynamic radiation field. The parameter is dynamically adjusted during training, so that the static radiation field representation is learned more preferentially in the early stage of training, and the dynamic radiation field representation is gradually learned in subsequent iterations: ; Step S2-3: The trained model can be used to render images of the fluid scene at any given viewing angle and timestamp, and the corresponding 3D spatial density field and velocity field data can be obtained, which can be used for feature data analysis of the fluid scene.
2. The method for fluid reconstruction based on neural radiation field according to claim 1, characterized in that: The fluid field scene parameters in step S2-1 include image resolution, camera intrinsic parameters, extrinsic parameters, the camera's horizontal viewing angle minimum distance, maximum distance, and scene scale resolution.
