Three-dimensional attitude optimization method and device
By performing multi-view rendering and optimization of the NeRF model, combined with the affinity loss function and context information, the problem of large pose estimation deviations in the existing technology is solved, and the accuracy and robustness of the pose estimation are improved.
Patent Information
- Application Number
- CN202410682428.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing NeRF-based pose estimation methods obtain less useful information when training using color errors, and are difficult to capture large geometric and illumination changes in training data, resulting in large pose estimation deviations and low robustness.
By translating and rotating the pose data of the target object, using the rendering model for multi-view rendering, and using the affinity loss function combined with contextual information to iteratively train NeRF, and optimizing according to the color and geometric losses between the target object image and the rendered image. Attitude data, obtain optimized attitude data.
It improves the accuracy and robustness of pose estimation in different scenes and different viewing angles, reduces the deviation of local models, and enhances the capture and understanding of the scene geometry.
Smart Images

Figure CN118644546A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a three-dimensional posture optimization method and device. Background Art
[0002] Posture estimation is a key technology for robot positioning, grasping and obstacle avoidance tasks. With the development of neural network rendering, the development of inverse neural radiance field (NeRF) has been promoted. The NeRF-based posture estimation method has the advantages of end-to-end training, global consistency, efficient reasoning and generalization capabilities.
[0003] In related technologies, color errors are usually used to train the inversion neural radiance field model, and the model learns less useful information. In fact, similar colors do not necessarily correspond to the same depth of field, and in real scenes (occlusion, shadow), relying only on color information will reduce the accuracy of pose estimation, resulting in the inability to correctly capture the geometric structure of the scene, thereby causing deviations and errors in pose estimation. In addition, NeRF-based methods have difficulty capturing large geometric and illumination changes in training data, and may be subject to a certain degree of interference when processing samples in different scenes and different perspectives, which will also lead to low pose estimation accuracy. Summary of the invention
[0004] The present invention provides a three-dimensional posture optimization method and device, which are used to solve the problems that when the NeRF model is trained using color errors in the prior art, the model obtains less useful information and is difficult to capture large geometric and illumination changes in the training data, resulting in large posture estimation deviation and low robustness. The method improves the accuracy and robustness of posture estimation of target objects in different scenes and different viewing angles.
[0005] The present invention provides a three-dimensional posture optimization method, comprising the following steps: translating and rotating the posture data of a target object to obtain a multi-view posture, and rendering the multi-view posture using a rendering model to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train a neural radiation field NeRF; and optimizing the posture data according to the color and geometric loss between the corresponding image of the target object and the first rendered image to obtain the optimized posture data.
[0006] According to a three-dimensional posture optimization method provided by the present invention, the posture data is obtained through the following steps: randomly obtaining initial posture data of a camera; rendering the initial posture data using the rendering model to obtain a second rendered image and a depth image; performing depth feature matching on the second rendered image, the depth image and an image corresponding to the target object to obtain matching information, and performing posture estimation on the image corresponding to the target object based on the matching information to obtain the posture data.
[0007] According to a three-dimensional posture optimization method provided by the present invention, the color and geometric loss between the image corresponding to the target object and the first rendered image is calculated by the following formula: Among them, T * is the color and geometry loss function, λ is the trade-off hyperparameter between color and geometry loss, I i * is the pseudo image corresponding to the i-th image of the target object; * is a pseudo image corresponding to the image of the target object, and N is the total number of corresponding images of the target object.
[0008] According to a training method for a three-dimensional pose estimation model provided by the present invention, the affinity loss function used in the training of the adopted rendering model is expressed by the following formula: Among them, L affinity is the affinity loss function, H×W represents the image size, A(i, j) is the affinity matrix, A F (i, j) is the output affinity matrix.
[0009] According to a three-dimensional posture optimization method provided by the present invention, the rendering model is trained by the following steps: taking a sample image and a camera pose corresponding to the sample image as training samples, taking an affinity loss function as a training function and performing propagation training on the multiple groups of training samples according to an adaptive full-pixel group propagation strategy to obtain the rendering model.
[0010] According to a three-dimensional posture optimization method provided by the present invention, the sample image and the camera posture corresponding to the sample image are used as training samples, including: the sample image is processed into blocks to obtain multiple block sample images; each block sample image and the camera 6DoF posture corresponding to each block sample image are used as a group of training samples, and multiple groups of training samples are determined.
[0011] The present invention also provides a three-dimensional posture optimization device, comprising the following modules: a rendering module, used to translate and rotate the posture data of the target object to obtain a multi-view posture, and use a rendering model to render the multi-view posture to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train the neural radiation field NeRF; a posture optimization module, used to optimize the posture data according to the color and geometric loss between the corresponding image of the target object and the first rendered image to obtain optimized posture data.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the three-dimensional posture optimization methods described above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the three-dimensional posture optimization method as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the three-dimensional posture optimization method as described above is implemented.
[0015] The three-dimensional posture optimization method and device provided by the present invention translate and rotate the posture data of the target object, and use the rendering model obtained by NeRF training with an affinity loss function combined with context information to render the multi-view posture, optimize the posture data according to the color and geometric loss between the corresponding image of the target object and the first rendered image, and obtain the optimized posture data. Combined with the consistency of depth and color information, it is possible to more fully utilize geometric constraints and capture the relationship between adjacent points in the scene, promote local consistency, reduce the deviation of the local model, and improve the accuracy and robustness of posture estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a flow chart of the three-dimensional posture optimization method provided by the present invention.
[0018] Figure 2 It is a working schematic diagram of the rough pose generation network provided by the present invention.
[0019] Figure 3 It is a working schematic diagram of the fine posture generation network provided by the present invention.
[0020] Figure 4 It is a training schematic diagram of the NeRF model provided by the present invention.
[0021] Figure 5 It is a structural schematic diagram of the three-dimensional posture optimization device provided by the present invention.
[0022] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 creative work are within the scope of protection of the present invention.
[0024] Combine the following Figure 1-Figure 5 The three-dimensional posture optimization method and device of the present invention are described.
[0025] Figure 1 It is a flow chart of the three-dimensional posture optimization method provided by the present invention, such as Figure 1 As shown, the method includes the following steps 110 and 120.
[0026] Step 110, translate and rotate the posture data of the target object to obtain a multi-view posture, and use a rendering model to render the multi-view posture to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train the neural radiation field NeRF.
[0027] In this step, the target object may be a moving object or a movable object in a stationary state.
[0028] In this step, the posture data includes the position information and direction information of the moving object.
[0029] In this embodiment, the posture data may be a meaningful initial posture generated by a PnP (Perspective-n-Point) target posture estimation network, rather than a random value.
[0030] In this embodiment, the posture data is translated and rotated to generate a multi-view posture through the following steps.
[0031] (1) First, assume that the target image Itar The corresponding estimated posture is T tar , if there exists a T * and its corresponding image I * Satisfy the following formula: I * =F θ (T * ).
[0032] So that:
[0033] It is believed that T * It is T tar To avoid conflicts in the optimization process, the pose transformation only includes rotation and translation, and does not include non-rigid transformations such as scaling or shearing. Then, the loss function is constructed to calculate the gradient of the loss relative to T. Wherein L is represented by the following formula: L=ρ(|F θ (T)-I tar |).
[0034] Among them, F θ is the rendering equation of NeRF, ρ is the robust loss function for handling outliers; then update T through the above gradient iteration to obtain the corresponding T * .
[0035] In this embodiment, the initial pose image can be transformed and rotated by a small amount to generate multiple poses T i , i=0...N,T i By T * The formula is as follows: T i =[R i |t i ]T * .
[0036] Among them, R i represents the rotation matrix, t i Represents the translation variable; the posture contains multi-view information. When tracking of a posture fails or drift occurs, it can be corrected by other postures to enhance the stability of the image.
[0037] In this embodiment, the first rendered image includes a pseudo image and a depth image corresponding to a plurality of postures; for example, the plurality of posture information T i Input into the trained NeRF model and render the corresponding pseudo image and depth map.
[0038] In this embodiment, the pseudo image refers to an image generated by projecting the rendered image onto a hypothetical camera. The pseudo image is obtained by the following steps: according to the camera's posture information, rays are emitted from the camera position to each pixel in the scene. The direction of these rays is determined by the camera's observation direction, and the starting point is the camera's position; the color value of each pixel is associated with the corresponding image position, thereby generating the final synthetic image I i and the depth map D i , i=0...N; after that, change I i Reproject to T * On the image plane at j * .
[0039] In this embodiment, the sample image may be an image of the target object acquired in real time or historically, or may be an image of the target object acquired from a database.
[0040] In this embodiment, the rendering model is trained with each sample image and the corresponding camera posture as a training sample.
[0041] In this embodiment, the affinity loss function may be used to update the network parameters.
[0042] Specifically, the affinity loss function used in the training of the adopted rendering model is expressed by the following formula:
[0043] Among them, L affinity is the affinity loss function, H×W represents the image size, A(i, j) is the affinity matrix, A F (i, j) is the output affinity matrix.
[0044] In this embodiment, the size of the above image is represented by H×W. First, the affinity matrix of the true value image is calculated. Assuming that any two pixels in the image are I i,j and I k,m , then the affinity matrix is expressed by the following formula:
[0045] Among them, i, j, k, and m represent respectively; the feature map obtained from the backbone model is constrained by the affinity matrix, and the model output feature map is Where C is the number of feature map channels, the output affinity matrix can be expressed as follows:
[0046] Finally, the affinity loss function is obtained by using the above affinity matrix and the output affinity matrix through deformation calculation.
[0047] In this embodiment, the loss value of the model parameters is calculated using the affinity loss function, and NeRF is iteratively trained. When the model converges, the corresponding rendering model is obtained; the rendering model can effectively capture contextual information, thereby better understanding the scene structure and producing smoother and more coherent rendering results.
[0048] Step 120 : Optimize the posture data according to the color and geometric loss between the image corresponding to the target object and the first rendered image to obtain optimized posture data.
[0049] In this step, the color and geometric loss between the corresponding image of the target object and the first rendered image is calculated by the following formula:
[0050] Among them, T * is the color and geometry loss function, λ is the trade-off hyperparameter between color and geometry loss, I i * is the pseudo image corresponding to the i-th image of the target object; * is the pseudo image corresponding to the image of the target object, and N is the total number of corresponding images of the target object.
[0051] In this embodiment, after creating a pseudo image of the first rendered image, the pseudo image I is generated by iterative optimization. i * As much as possible with T tar near.
[0052] In this embodiment, by optimizing the above objective function, the 6DoF pose T of the target image can be estimated in a multi-view geometrically supervised manner. tar , through back propagation, the initial pose is continuously updated to obtain the 6DoF pose estimation of the target object.
[0053] A training method for a three-dimensional pose estimation model provided by an embodiment of the present invention translates and rotates the pose data of a target object, and uses a rendering model obtained by training NeRF with an affinity loss function combined with context information to render multi-view poses, optimizes the pose data according to the color and geometric losses between the corresponding image of the target object and the first rendered image, and obtains the optimized pose data. Combined with the consistency of depth and color information, it can make fuller use of geometric constraints and capture the relationship between adjacent points in the scene, promote local consistency, reduce the deviation of the local model, and improve the accuracy and robustness of pose estimation.
[0054] In some embodiments, the posture data is obtained through the following steps: randomly obtaining the initial posture data of the camera; using a rendering model to render the initial posture data to obtain a second rendered image and a depth image; performing depth feature matching on the second rendered image, the depth image and the image corresponding to the target object to obtain matching information, and performing posture estimation on the image corresponding to the target object based on the matching information to obtain posture data.
[0055] In this embodiment, a coarse-to-fine network framework for 6DoF pose estimation is set to obtain the initial pose; this is specifically achieved through the following steps.
[0056] Figure 2 is a schematic diagram of the rough pose generation network provided by the present invention. Figure 2 In the illustrated embodiment, initial pose data of a camera is randomly generated, the initial pose data including the position and direction of the camera, and then the initial pose data is input into a trained rendering model, and finally an image corresponding to the random pose is rendered.
[0057] Specifically, implicit neural rendering NeRF uses a neural network F θ Learn renderings of new views from multiple views of the scene, with learnable parameters θ, for a given camera pose T new , NeRF is able to render a new image I of the scene from a given view by predicting the density σ and color C at each point on a ray emanating from the camera center O, and integrating the color and density along the ray new and the depth map D new ; Through the end-to-end rendering method, NeRF establishes a differentiable relationship between pose T and image I and depth D. Therefore, the gradient of the image can be passed to the pose T, and the pose T can be optimized by the objective function established on the image I, depth map D, and weight parameter w. The optimization formula is as follows:
[0058] in, is the rendered pose data, and SE is the special Euclidean group.
[0059] exist Figure 2 In the illustrated embodiment, the rendered image is matched with the target image for deep features, and then the pose of the image is estimated using a PnP network to obtain an initial pose.
[0060] Specifically, N feature points are extracted from the target image, and a descriptor is generated for each feature point, which is represented as a set A. The set A is represented by the following formula:
[0061] Among them, k i is the pixel coordinate of the feature point in the image, di For k i Corresponding descriptors; then extract M feature points of the rendered image, and generate descriptors for each feature point, expressed as set B, which is expressed by the following formula:
[0062] In this embodiment, the feature points in set A are matched with the feature points in set B, and the corresponding relationship between the two sets is established through the cosine similarity of the descriptors. The cosine similarity is calculated by the following formula: in, represents the descriptor of the A set, A descriptor representing a B set.
[0063] In this embodiment, a RANSAC algorithm can be used to randomly select a certain number of samples from the matched feature points for estimating the camera's pose; the RANSAC algorithm refers to randomly selecting a minimum subset from the set of matched feature points, which contains enough points to estimate the 6DoF pose.
[0064] Specifically, assume that the minimum subset contains k matching points. Use the selected k matching points to estimate the initial pose of the target image. For the remaining matching points, calculate the distance between them and the predicted 3D points by transforming them to the coordinate system of the target image; if the distance is less than a certain threshold, mark these points as inliers, otherwise mark them as outliers; calculate the number of inliers and the error between the pose re-estimated with these inliers and the initial estimate; if the number of inliers is large enough or the error is within an acceptable range, the current estimate is considered valid; repeat the above steps multiple times, each time selecting a new random subset, re-estimating the pose, and calculating the inliers; during the iteration process, record the pose with the largest number of inliers as the final initial 6DoF pose estimate.
[0065] In this embodiment, after the feature point matching is completed, the EPnP algorithm is used to obtain the rotation matrix Rtar from the rendered image to the target image. 0 and translation vector ttar 0 , so the initial 6DoF posture Ttar of the target image is obtained 0 ; The calculation formula is as follows.
[0066] Ttar 0 =[Rtar 0 |ttar 0 ].
[0067] It should be noted that the EPnP algorithm is usually used for camera pose estimation in target detection. The input of the algorithm is n 3D space points and their positions, 2D coordinates projected on the image, and the camera intrinsic parameter K; the output is the camera pose, usually expressed in the form of a translation vector and a rotation matrix.
[0068] Figure 3 is a working schematic diagram of the fine pose generation network provided by the present invention. Figure 3 In the embodiment shown in the figure, the above initial posture is translated and rotated to obtain posture 1, posture 2 and posture 3, and the three posture images are rendered by NeRF to obtain the corresponding pseudo Figure 1 , fake Figure 2 and pseudo Figure 3 , and then calculate the color and geometric losses between each pseudo image and the target image, and use the loss to iteratively update the initial pose to obtain the optimized pose image.
[0069] A training method for a three-dimensional posture estimation model provided by an embodiment of the present invention randomly obtains initial posture data of a camera; uses a rendering model to render the initial posture data to obtain a second rendered image and a depth image; performs depth feature matching between the second rendered image, the depth image and an image corresponding to a target object to obtain matching information, and performs posture estimation on the image corresponding to the target object based on the matching information to obtain an initial posture, thereby reducing dependence on the initial posture, making the algorithm more robust and reliable, improving the accuracy of posture estimation, and accelerating the convergence speed of the algorithm.
[0070] In some embodiments, the rendering model is trained using the following steps: using sample images and camera poses corresponding to the sample images as training samples, using affinity loss function as training function and performing propagation training on multiple groups of training samples according to an adaptive full-pixel group propagation strategy to obtain a rendering model.
[0071] In this embodiment, taking the sample image and the camera pose corresponding to the sample image as the training sample includes: dividing the sample image into blocks to obtain a plurality of block sample images; taking each block sample image and the camera 6DoF pose corresponding to each block sample image as a group of training samples, determining a plurality of groups of training samples, and propagating the plurality of groups of training samples according to the adaptive full-pixel group propagation strategy.
[0072] It should be noted that the introduction of multi-context information in the training method requires gradient calculation of the model parameters of the entire image, which consumes a lot of memory; for example, in an image with a length and width of H and W respectively and the number of discrete sampling points on each ray is K, it is necessary to store H×W×K computational graphs for back propagation, so directly performing back propagation on the entire graph will lead to memory explosion.
[0073] In this embodiment, each training image is divided into multiple small blocks, each image block and its corresponding depth image, and the corresponding camera 6DoF pose are used as a training sample, and the NeRF model will learn to generate corresponding color and depth information.
[0074] Figure 4 is a training diagram of the NeRF model provided by the present invention. Figure 4 In the embodiment shown, the training data is divided into blocks to obtain multiple block samples, each block sample corresponds to an input pose, and the multiple block samples and the corresponding input poses are used as training samples to input into the NeRF model to obtain the corresponding rendered image, and then the affinity loss between the rendered image and the real image is calculated, and the loss is used to reversely update the network parameters of the NeRF model, and finally a usable three-dimensional pose estimation model is obtained.
[0075] A training method for a three-dimensional posture estimation model provided by an embodiment of the present invention divides the training samples into blocks, takes each block sample image and the camera 6DoF pose corresponding to each block sample image as a group of training samples, determines multiple groups of training samples, and propagates the multiple groups of training samples according to an adaptive full-pixel group propagation strategy. This can reduce the amount of calculation of the system in each gradient calculation, thereby avoiding the problem of gradient explosion.
[0076] The three-dimensional posture estimation method provided by the present invention is described below. The three-dimensional posture estimation method described below and the training method of the three-dimensional posture estimation model described above can be referred to each other.
[0077] The three-dimensional posture optimization device provided by the present invention is described below. The three-dimensional posture optimization device described below and the three-dimensional posture optimization method described above can be referenced to each other.
[0078] Figure 5 : is a schematic diagram of the structure of the three-dimensional posture optimization device provided by the present invention, such as Figure 5 As shown, the three-dimensional posture optimization device includes a rendering module 510 and a posture optimization module 5205.
[0079] The rendering module 510 is used to translate and rotate the posture data of the target object to obtain a multi-view posture, and use a rendering model to render the multi-view posture to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train the neural radiation field NeRF.
[0080] The posture optimization module 520 is used to optimize the posture data according to the color and geometric loss between the image corresponding to the target object and the first rendered image to obtain the optimized posture data.
[0081] A three-dimensional posture optimization device provided by an embodiment of the present invention translates and rotates the posture data of a target object, and uses a rendering model obtained by training NeRF with an affinity loss function combined with context information to render multi-view postures, optimizes the posture data according to the color and geometric losses between the corresponding image of the target object and the first rendered image, and obtains the optimized posture data. Combined with the consistency of depth and color information, it can make fuller use of geometric constraints and capture the relationship between adjacent points in the scene, promote local consistency, reduce the deviation of local models, and improve the accuracy and robustness of posture estimation.
[0082] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute a training method for a three-dimensional posture estimation model, the method comprising: translating and rotating the posture data of the target object to obtain a multi-view posture, and rendering the multi-view posture using a rendering model to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train the neural radiation field NeRF to obtain; the posture data is optimized according to the color and geometric loss between the corresponding image of the target object and the first rendered image to obtain the optimized posture data.
[0083] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0084] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the training method of the three-dimensional posture estimation model provided by the above methods, the method including: translating and rotating the posture data of the target object to obtain a multi-view posture, and using a rendering model to render the multi-view posture to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train the neural radiation field NeRF; and optimizing the posture data according to the color and geometric loss between the corresponding image of the target object and the first rendered image to obtain optimized posture data.
[0085] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the training method of the three-dimensional posture estimation model provided by the above-mentioned methods, the method comprising: translating and rotating the posture data of the target object to obtain a multi-view posture, and rendering the multi-view posture using a rendering model to obtain a first rendered image; the rendering model uses an affinity loss function combined with context information to iteratively train the neural radiation field NeRF; and optimizing the posture data according to the color and geometric loss between the corresponding image of the target object and the first rendered image to obtain optimized posture data.
[0086] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, 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. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional posture optimization method, characterized in that: include: Translating and rotating the posture data of the target object to obtain a multi-view posture, and rendering the multi-view posture using a rendering model to obtain a first rendered image; The rendering model is obtained by iteratively training the neural radiation field NeRF using an affinity loss function combined with context information; The posture data is optimized according to the color and geometric loss between the image corresponding to the target object and the first rendered image to obtain optimized posture data.
2. The three-dimensional posture optimization method according to claim 1, characterized in that: The posture data is obtained by the following steps: Randomly obtain the initial posture data of the camera; Rendering the initial posture data using the rendering model to obtain a second rendered image and a depth image; The second rendered image, the depth image and the image corresponding to the target object are matched with each other in terms of depth features to obtain matching information, and the posture of the image corresponding to the target object is estimated based on the matching information to obtain the posture data.
3. The three-dimensional posture optimization method according to claim 1, characterized in that: The color and geometric loss between the image corresponding to the target object and the first rendered image is calculated by the following formula: Among them, T * is the color and geometry loss function, λ is the trade-off hyperparameter between color and geometry loss, I i * is the pseudo image corresponding to the i-th image of the target object; * is a pseudo image corresponding to the image of the target object, and N is the total number of corresponding images of the target object.
4. The three-dimensional posture optimization method according to claim 1, characterized in that: The affinity loss function used by the adopted rendering model during training is expressed as follows: Among them, L affinity is the affinity loss function, H×W represents the image size, A(i,j) is the affinity matrix, A F (i, j) is the output affinity matrix.
5. The three-dimensional posture optimization method according to claim 1, characterized in that: The rendering model is trained using the following steps: The rendering model is obtained by taking sample images and camera poses corresponding to the sample images as training samples, taking affinity loss function as training function and performing propagation training on the multiple groups of training samples according to an adaptive full pixel group propagation strategy.
6. The three-dimensional posture optimization method according to claim 5, characterized in that: The taking the sample image and the camera pose corresponding to the sample image as the training sample comprises: The sample image is processed into blocks to obtain a plurality of block sample images; Each block sample image and the camera 6DoF pose corresponding to each block sample image are taken as a group of training samples, and multiple groups of training samples are determined.
7. A three-dimensional posture optimization device, characterized in that: include: A rendering module is used to translate and rotate the posture data of the target object to obtain a multi-view posture, and render the multi-view posture using a rendering model to obtain a first rendered image; the rendering model is obtained by iteratively training the neural radiation field NeRF using an affinity loss function combined with context information; The posture optimization module is used to optimize the posture data according to the color and geometric loss between the image corresponding to the target object and the first rendered image to obtain optimized posture data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the three-dimensional posture optimization method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the three-dimensional posture optimization method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the three-dimensional posture optimization method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Three-dimensional image rendering method and system based on neural radiation field
CN115937394A
Neural radiation field-based three-dimensional model reconstruction method and device, and medium
CN116958453A
Neural rendering method, system and equipment based on depth unbiased estimation
CN117745924A
3D GAN inversion method and apparatus with pose optimization
KR102625474B1
Method and apparatus for training 6d pose estimation network based on deep learning iterative matching
US20210004984A1
Cited By
Multi-scene compatible method and system of working ladder
CN119832403A
Multi-scenario compatible method and system for working ladder
CN119832403B
Multi-view object attitude estimation and attitude optimization method and electronic equipment
CN119919486A
Multi-view object pose estimation and pose optimization method and electronic device
CN119919486B
