A point cloud registration method based on recurrent twin attention mechanism

By introducing a circular twin attention mechanism and an external attention mechanism into the point cloud registration method, the problem of low registration efficiency of sparse point cloud data is solved, and efficient registration of adjacent target point cloud data is achieved.

CN118297993BActive Publication Date: 2025-02-11深圳市大正建设工程咨询有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410371555.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-02-11
Estimated Expiration
2044-03-29

Smart Images

  • Figure CN118297993B_ABST
    Figure CN118297993B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer graphics technology, and solves the technical problem that the existing point cloud registration methods are inefficient when facing sparse point cloud data, and in particular, relates to a point cloud registration method based on a cyclic twin attention mechanism, including: obtaining three-dimensional point cloud data of adjacent perspectives in a target scene, namely, source point cloud data and target point cloud data; constructing a point cloud registration model for predicting the rotation and translation required for registration between target point cloud data and source point cloud data; determining a loss function and optimization parameters for improving the point cloud registration model to accurately predict the rotation and translation required for registration; based on the rotation and translation of the target point cloud data predicted by the point cloud registration model, efficient registration of adjacent perspective point clouds is achieved. The point cloud registration method proposed in the present invention achieves efficient registration of adjacent target point cloud data when facing sparse point cloud data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graphics, and in particular to a point cloud registration method based on a cyclic twin attention mechanism. Background Art

[0002] Point cloud registration is a problem of estimating the transformation matrix between two point cloud scans. Using the transformation matrix, we can merge partial scans of the same 3D scene or object into a complete 3D point cloud. In recent years, the registration problem has been intensively studied from the optimization perspective. Optimization-based registration methods use optimization strategies to estimate the transformation matrix. Most of the existing optimization-based registration methods minimize the geometric projection error through two processes: correspondence search and transformation estimation. These two processes are performed alternately until the geometric projection error is minimized. However, the connection between optimization-based and deep learning methods is still unclear, and many existing methods still suffer from low efficiency when faced with sparse point cloud data. Summary of the invention

[0003] In view of the shortcomings of the existing technology, the present invention provides a point cloud registration method based on the recurrent twin attention mechanism, which solves the technical problem of low efficiency of the existing point cloud registration method when facing sparse point cloud data, and realizes efficient registration of adjacent target point cloud data.

[0004] To solve the above technical problems, the present invention provides the following technical solution: a point cloud registration method based on a cyclic twin attention mechanism, the method comprising the following steps:

[0005] S1, obtaining three-dimensional point cloud data of adjacent viewpoints in the target scene, i.e., source point cloud data and target point cloud data;

[0006] S2, constructing a point cloud registration model for predicting the rotation and translation required for registration between target point cloud data and source point cloud data;

[0007] S3, determining a loss function and optimization parameters for improving the point cloud registration model to accurately predict the rotation and translation required for registration;

[0008] S4. Based on the rotation and translation of the target point cloud data predicted by the point cloud registration model, efficient registration of adjacent viewpoint point clouds is achieved.

[0009] Furthermore, in step S2, the point cloud registration model uses the PointNet++ network as the backbone network for feature learning of point cloud data, and uses a random sampling method to replace the farthest point sampling method in the original PointNet++ network;

[0010] And add an external attention mechanism to encode the point cloud data in the downsampling layer of the backbone network;

[0011] The point cloud registration model also includes a recurrent twin attention mechanism for feature enhancement of source point cloud data and target point cloud data. The recurrent twin attention mechanism consists of two parts: a cross-attention mechanism and a self-attention mechanism. A linear attention mechanism is added to the cross-attention mechanism and the self-attention mechanism to enhance the local feature extraction capability.

[0012] Furthermore, in step S2, the specific process includes the following steps:

[0013] S21, constructing a backbone network for respectively extracting the correlation between the source point cloud data and the target point cloud data;

[0014] S22. A recurrent twin attention mechanism is constructed based on the backbone network to distinguish overlapping areas and non-overlapping areas in the source point cloud data and the target point cloud data;

[0015] S23. Input the feature map obtained by the cyclic twin attention mechanism into the BEV module to locate the overlapping area, and predict the rotation and translation required for the alignment between the target point cloud data and the source point cloud data.

[0016] Furthermore, in step S21, the specific process includes the following steps:

[0017] S211, selecting a backbone network for feature learning of point cloud data;

[0018] S212, by adding an external attention mechanism to the backbone network to obtain the correlation between different data samples;

[0019] S213. Design the network framework of the downsampling layer of the backbone network after adding the external attention mechanism;

[0020] S214, determining the input and output of the backbone network to enable the backbone network to extract the correlation between the source point cloud samples and the target point cloud samples.

[0021] Furthermore, in step S212, the encoding process of the external attention mechanism is as follows:

[0022] ;

[0023] in, is the input required by the external attention mechanism, Q is the query matrix obtained by processing the features through the linear layer after the SA module in the PointNet++ network, and the superscript E represents external-attention, i.e., the external attention mechanism; and are the matrix parameters of two linear transformations, replacing the key matrix K and value matrix V in the original attention mechanism, and the query matrix Perform matrix multiplication; softmax and L1-norm respectively represent normalization and regularization of the input values ​​in different dimensions.

[0024] Furthermore, in step S214, the input of the backbone network consists of two parts, namely: extracting sub-region point cloud data near the source point cloud bounding box in adjacent perspectives; ;

[0025] And, extract the sub-region point cloud data near the search target bounding box in the current perspective , where the sub-region point cloud data and All of them are 1024 three-dimensional space points obtained based on random sampling method, and their 1024 three-dimensional vertex coordinates are used as the input of the network;

[0026] The output of the backbone network also consists of two parts: sub-region point cloud data Features obtained after backbone network feature learning ;

[0027] And sub-region point cloud data Features obtained after backbone network feature learning , whose dimensions are all (B, 32, 1024).

[0028] Furthermore, in step S22, the specific process includes the following steps:

[0029] S221. The linear attention mechanism is improved to enhance the ability to extract local features. The expression of the improved linear attention mechanism is:

[0030] ;

[0031] In the above formula, is the feature mapping function; Q, K, and V are the query matrix, key matrix, and value matrix obtained by linear transformation of the feature map through different linear layers; the subscript i represents the i-th element; j is the traversal subscript, starting from 1 and going up to N, traversing all the point cloud samples to be processed; N is the number of point cloud samples to be processed by the linear attention mechanism;

[0032] S222, performing a cross attention operation on the source point cloud data and the target point cloud data respectively to achieve information interaction between the two point cloud data;

[0033] S223, performing a self-attention operation based on the result after the cross-attention operation to explore the intrinsic correlation between the source point cloud data and the target point cloud data;

[0034] S224. The ability of the backbone network to learn point cloud feature information is enhanced through multiple cycles, and a feature map containing overlapping areas and non-overlapping areas is output.

[0035] Furthermore, in step S23, it also includes: based on the target point cloud features obtained by the cyclic twin attention mechanism, dividing the three-dimensional space where the target point cloud is located into N voxels of the same size and a side length of L meters, performing an average pooling operation on the three-dimensional coordinates and features of the points in the same voxel, so that the point features of the search area are converted into voxel representations;

[0036] The voxelized target point cloud features are passed into the BEV module, and the two prediction heads it contains predict the rotation and translation required for the alignment between the target point cloud data and the source point cloud data.

[0037] Furthermore, in step S3, the loss function of the point cloud registration model is for:

[0038] ;

[0039] In the above formula, represents the rotational offset loss; represents the translational offset loss; , All are hyperparameters; and Respectively represent the predicted value and true value of the rotation amount between the target point cloud data and the source point cloud data; and They respectively represent the predicted value and true value of the translation between the target point cloud data and the source point cloud data.

[0040] By means of the above technical solution, the present invention provides a point cloud registration method based on a cyclic twin attention mechanism, which has at least the following beneficial effects:

[0041] 1. The present invention solves the problem of low efficiency of existing point cloud registration methods when facing sparse point cloud data, and realizes efficient registration of adjacent target point cloud data.

[0042] 2. The present invention improves the linear attention mechanism so that it can be reused for each query, so the time complexity can be reduced to O(N), thereby improving the efficiency of local feature extraction and reducing the influence of background points. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0044] Figure 1 is a flow chart of the point cloud registration method of the present invention;

[0045] Figure 2 A schematic diagram of the backbone network framework after adding an external attention mechanism to the present invention;

[0046] Figure 3 A schematic diagram of the cross attention operation after adding an improved linear attention mechanism to the present invention;

[0047] Figure 4 Schematic diagram of the self-attention operation after adding an improved linear attention mechanism to the present invention;

[0048] Figure 5 It is a schematic diagram of the registration results of two sets of adjacent viewpoint cloud data of the present invention. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0050] In recent years, with the rapid development of high-precision sensors such as LiDAR and Kinect, point clouds have become the main data format for representing the 3D world. Since sensors can only capture scans within their limited field of view, registration algorithms are needed to generate large 3D scenes. Point cloud registration is a problem of estimating the transformation matrix between two point cloud scans. Using the transformation matrix, we can merge partial scans of the same 3D scene or object into a complete 3D point cloud. Since point cloud registration plays a vital role in many valuable computer vision applications such as 3D reconstruction, 3D localization, pose estimation, etc., there is an urgent need for more in-depth research on point cloud registration to benefit these applications.

[0051] In recent years, the registration problem has been studied in depth from the optimization aspect. The optimization-based registration method estimates the transformation matrix using optimization strategies. Most of the existing optimization-based registration methods minimize the geometric projection error through two processes: correspondence search and transformation estimation. These two processes are performed alternately until the geometric projection error is minimized. On the basis of the known exact correspondence, the transformation estimation has an approximate solution. With the development of 3D deep learning technology, many registration methods have begun to use these technologies to extract the features of 3D points and find accurate corresponding points. These corresponding points are then used to estimate the transformation with a separate transformation estimation stage. At the same time, there are also some combinations of traditional registration optimization strategies and deep learning techniques in the end-to-end framework. These methods solve the registration problem through end-to-end neural networks, bringing significant performance improvements to point cloud registration technology. However, the connection between optimization-based and deep learning methods is still unclear, and many existing methods still have the problem of low efficiency when facing sparse point cloud data.

[0052] Based on the technical defects of existing technologies when facing sparse point cloud data, please refer to Figure 1-Figure 5 , this embodiment proposes a point cloud registration method based on the cyclic twin attention mechanism, which can greatly improve the efficiency of point cloud registration compared to the existing target point cloud registration method, and can achieve efficient registration of adjacent target point cloud data. Specifically, Figure 1 An optional flow chart of the method is shown as follows: Figure 1 As shown, the method comprises the following steps:

[0053] S1. Acquire three-dimensional point cloud data of adjacent viewpoints in the target scene, namely, source point cloud data and target point cloud data; wherein, the target point cloud data is extracted from sub-region point cloud samples near the target bounding box at the current viewpoint, and the source point cloud data is extracted from sub-region point cloud samples near the target bounding box at the adjacent viewpoint.

[0054] S2, constructing a point cloud registration model for predicting the rotation amount and translation amount required for registration between the target point cloud data and the source point cloud data; as a preferred implementation of step S2, specifically including the following steps:

[0055] S21, constructing a backbone network for respectively extracting the correlation between the source point cloud data and the target point cloud data; therefore, as a preferred implementation of step S21, specifically comprising the following steps:

[0056] S211. Select a backbone network for feature learning of point cloud data. In this embodiment, the PointNet++ network is selected as the backbone network for feature learning of point cloud data, and in order to improve coding efficiency, a random sampling method is used instead of the farthest point sampling method in the original PointNet++ network.

[0057] S212, by adding an external attention mechanism in the backbone network to obtain the correlation between different data samples; in order to improve the ability of the backbone network to extract the correlation between the source point cloud data and the target point cloud data, an external attention mechanism for encoding the point cloud data is added in the downsampling layer of the backbone network. The specific encoding process is as follows:

[0058] ;

[0059] in, is the input required by the external attention mechanism, Q is the query matrix obtained by processing the features through the linear layer after the SA module in the PointNet++ network, and the superscript E represents external-attention, i.e., the external attention mechanism; and are the matrix parameters of two linear transformations, replacing the key matrix K and value matrix V in the original attention mechanism, and the query matrix Perform matrix multiplication; softmax and L1-norm respectively represent normalization and regularization of the input values ​​in different dimensions.

[0060] S213. Design the network framework of the downsampling layer of the backbone network after adding the external attention mechanism; Figure 2 As shown in the figure, the network framework diagram of the downsampling layer of the backbone network after adding the external attention mechanism, the original SA module of the PointNet++ network is used to sample and MLP the input point cloud. There are three SA modules in the model, and the sampling points of each SA module are (512, 256, 128). The point cloud features obtained after one downsampling For example, its dimension is (B, 16, 512). After MLP processing in the SA module, its feature dimension is converted to 32. represents the features obtained after the SA module, and its dimension is (B, 32, 256), where B represents the batch size. Send it to the linear layer to get the corresponding query matrix Then, the query matrix is ​​input into the external attention mechanism. Finally, the corresponding output feature is obtained. , whose dimension is (B, 32, 256).

[0061] S214, determine the input and output of the backbone network to achieve the correlation between the source point cloud samples and the target point cloud samples extracted by the backbone network. The input of the backbone network consists of two parts: extracting sub-region point cloud data near the source point cloud bounding box in adjacent perspectives; , extract the sub-region point cloud data near the search target bounding box in the current perspective , where the sub-region point cloud data and The 1024 3D space points are obtained based on random sampling method, and the 1024 3D vertex coordinates are used as the input of the network. The output of the backbone network also consists of two parts: sub-region point cloud data Features obtained after backbone network feature learning And sub-region point cloud data Features obtained after backbone network feature learning , whose dimensions are all (B, 32, 1024).

[0062] S22, based on the backbone network, a cyclic twin attention mechanism is constructed to distinguish between overlapping areas and non-overlapping areas in the source point cloud data and the target point cloud data, and the source point cloud data and the target point cloud data are feature enhanced by the cyclic twin attention mechanism, so as to distinguish between overlapping areas and non-overlapping areas in the source point cloud data and the target point cloud data. Specifically, the point cloud registration model also has a cyclic twin attention mechanism for feature enhancement of the source point cloud data and the target point cloud data. The cyclic twin attention mechanism consists of two parts: a cross-attention mechanism and a self-attention mechanism, wherein a linear attention mechanism is added to the cross-attention mechanism and the self-attention mechanism to enhance the local feature extraction capability. Therefore, as a preferred implementation of step S22, it specifically includes the following steps:

[0063] S221. The linear attention mechanism is improved to enhance the ability to extract local features, thereby reducing the influence of background points. In this embodiment, in order to improve the efficiency of extracting local features, the softmax function in the traditional linear attention mechanism is replaced by an arbitrary similarity function, and a generalized attention equation is proposed, namely:

[0064] ;

[0065] Among them, Q, K, and V are the query matrix, key matrix, and value matrix obtained by linear transformation of feature maps through different linear layers; sim is a similarity function; subscript i represents the i-th element; j is the traversal subscript, starting from 1 to N, traversing all point cloud samples to be processed; N is the number of point cloud samples to be processed by the linear attention mechanism;

[0066] By replacing the similarity function sim with the feature mapping function , the generalized attention equation can be rewritten as:

[0067] ;

[0068] in, Is a feature mapping function, set as: , x is the input of the feature mapping function. When x>0, The output is x; when x 0 o'clock, The output is , which is the base of the natural logarithm, e, raised to the power of x.

[0069] Then, using the associative law of matrix multiplication, the above formula can be further rewritten as:

[0070] ;

[0071] After the improved linear attention mechanism, and It can be reused for each query, so the time complexity can be reduced to 0(N), thereby achieving the purpose of improving the efficiency of local feature extraction.

[0072] Furthermore, in order to adapt to the disorder of point cloud data, the disorder of point cloud data mainly comes from the defects of the acquisition equipment itself and the influence of the spatial coordinate system in the process of acquiring three-dimensional point cloud data, resulting in the point cloud data arrangement order obtained by using different scanning equipment for the same scanning object is very different. This disorder is manifested in many aspects such as uneven point cloud density, random point cloud distribution, the existence of missing parts, the influence of noise points, and different sizes. Therefore, this disorder not only brings difficulties to the processing and analysis of data, but also affects the application effect of the data. In order to solve this problem and thus improve the processing efficiency and accuracy of point cloud data, this embodiment uses the feature mapping function to transform the query matrix Q and the key matrix K in the original linear attention mechanism into a matrix Q and a key matrix K. After that, the equation for calculating the intermediate variable Z is:

[0073] ;

[0074] In this embodiment, the equation of the intermediate variable Z in the above formula is replaced by:

[0075] ;

[0076] Here, k represents the number of the nearest neighbors of the i-th point in the ball. This method makes the point that passes through the linear attention mechanism only affected by the points around it. It is more conducive to the extraction of local features and reduces the influence of background points.

[0077] S222, respectively perform cross attention operations on the source point cloud data and the target point cloud data to achieve information interaction between the two point cloud data; in this embodiment, the cross attention operation after adding the improved linear attention mechanism is as follows Figure 3 As shown. In each loop, the target point cloud feature is first used As a query, for the criss-cross attention module, a linear layer is applied to the target point cloud features The query matrix is ​​obtained (The superscript C stands for cross-attention, which is the cross attention mechanism in the following , The same meaning is also expressed in ), the linear layer is applied to the source point cloud features The key matrix is ​​obtained from , the source point cloud features And the sub-region point cloud data after MLP processing Perform element-by-element addition and pass through a linear layer to obtain a value matrix , and finally the query matrix , key matrix and the value matrix The target point cloud features are output by passing them into the improved linear attention mechanism . Similarly, using the source point cloud features As a query, the output source point cloud features are obtained through the twin attention module with consistent steps and shared weights .

[0078] S223, performing a self-attention operation based on the result after the cross-attention operation to explore the intrinsic correlation between the source point cloud data and the target point cloud data; in this embodiment, the self-attention operation after adding the improved linear attention mechanism is as follows Figure 4 As shown, k-nearest neighbor (KNN) search is used to aggregate the features and coordinates of the point cloud. For the self-attention operation, the query matrix is ​​obtained by the following equations , key matrix and the value matrix (The superscript S stands for self-attention, i.e. self-attention mechanism):

[0079] ;

[0080] ;

[0081] ;

[0082] Among them, LinearLayer represents linear layer; MLP represents multi-layer perceptron; KNN represents k-nearest neighbor search; Indicates extracting sub-region point cloud data near the search target bounding box in the current viewing angle; Represents the query matrix , key matrix and the value matrix The output is passed into the improved linear attention mechanism.

[0083] The query matrix obtained later is , key matrix and the value matrix The target point cloud features are passed into the improved linear attention mechanism to obtain the output . Similarly, using the source point cloud features As a query, the output is obtained through the twin attention module with consistent steps and shared weights After completing the self-attention operation, the target point cloud features can be obtained and source point cloud features The next cycle of cross-attention operation begins. After multiple cycles, the required target point cloud features are finally obtained.

[0084] S224. The ability of the backbone network to learn point cloud feature information is enhanced through multiple cycles, and a feature map containing overlapping areas and non-overlapping areas is output.

[0085] S23. Input the feature map obtained by the cyclic twin attention mechanism into the BEV module to locate the overlapping area, and predict the rotation and translation required for the registration between the target point cloud data and the source point cloud data. In this embodiment, based on the target point cloud features obtained by the cyclic twin attention mechanism, the three-dimensional space where it is located is divided into N voxels of the same size and a side length of 0.3 meters, and the three-dimensional coordinates and features of the points in the same voxel are averaged and pooled to convert the point features of the search area into voxel representations. The voxelized target point cloud features are passed into the BEV module, and the two prediction heads contained therein respectively predict the rotation and translation required for the registration between the target point cloud data and the source point cloud data. In this embodiment, the rotation is represented by a quaternion and the translation is represented by a translation vector.

[0086] S3, determine the loss function and optimization parameters used to improve the point cloud registration model to accurately predict the rotation and translation required for registration; in step S3, by minimizing the loss function To train the point cloud registration model to accurately predict the rotation and translation between the target point cloud data and the source point cloud data, the loss function of the point cloud registration model is for:

[0087] ;

[0088] In the above formula, represents the rotational offset loss; represents the translational offset loss; , All are hyperparameters; and Respectively represent the predicted value and true value of the rotation amount between the target point cloud data and the source point cloud data; and Respectively represent the predicted value and true value of the translation between the target point cloud data and the source point cloud data. Compared with other loss functions, this loss function can quickly and effectively make the predicted rotation and translation approach the true value, and the calculation of gradients is simpler, which can reduce the amount of calculation and memory usage during training.

[0089] In this embodiment, the Adam optimizer is used to update the parameters of the point cloud registration model, where the learning rate of the Adam optimizer is 0.001, the exponential decay rate is (0.9, 0.999), and the stability parameter is , iteratively update the model parameters until the loss function of the point cloud registration model Until convergence. After experimental verification, the optimizer parameters can achieve the best prediction effect through such setting.

[0090] S4. Based on the rotation and translation of the target point cloud data predicted by the point cloud registration model, efficient registration of adjacent viewpoint point clouds is achieved; therefore, efficient registration of target point cloud data in adjacent viewpoints is ultimately achieved through the rotation and translation of the target point cloud data predicted and output by the point cloud registration model. In this embodiment, the rotation and translation required for registration between the target point cloud and the source point cloud samples can be quickly and accurately predicted through the trained point cloud registration model, and the rotation and translation are applied to the target point cloud so that the target point cloud data and the source point cloud data tend to overlap and the two point cloud data are merged, ultimately achieving efficient registration of adjacent target point clouds. Based on the above algorithm, the results of the registration of two sets of adjacent viewpoint point clouds are as follows. Figure 5 As shown, Figure 5 (a) in the figure shows the source point cloud data, the target point cloud data and the overlapping area of ​​the two in adjacent perspectives. After being processed by the point cloud registration method proposed in this embodiment, the point cloud registration result is as follows: Figure 5 Therefore, this embodiment solves the problem that the existing point cloud registration method is inefficient when facing sparse point cloud data, and realizes efficient registration of adjacent target point cloud data.

[0091] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0092] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A point cloud registration method based on a cyclic twin attention mechanism, characterized in that: The method comprises the following steps: S1, obtaining three-dimensional point cloud data of adjacent viewpoints in the target scene, i.e., source point cloud data and target point cloud data; S2. Constructing a point cloud registration model for predicting the rotation and translation required for registration between the target point cloud data and the source point cloud data. The point cloud registration model also includes a recurrent twin attention mechanism for feature enhancement of the source point cloud data and the target point cloud data. The recurrent twin attention mechanism consists of a cross attention mechanism and a self-attention mechanism. A linear attention mechanism is added to the cross attention mechanism and the self-attention mechanism to enhance the local feature extraction capability. The specific process includes the following steps: S21, constructing a backbone network for respectively extracting the correlation between the source point cloud data and the target point cloud data; S22, constructing a recurrent twin attention mechanism based on the backbone network to distinguish overlapping areas and non-overlapping areas in the source point cloud data and the target point cloud data. In step S22, the specific process includes the following steps: S221. The linear attention mechanism is improved to enhance the ability to extract local features. The expression of the improved linear attention mechanism is: ; In the above formula, is the feature mapping function; Q, K, and V are the query matrix, key matrix, and value matrix obtained by linear transformation of the feature map through different linear layers; the subscript i represents the i-th element; j is the traversal subscript, starting from 1 and going up to N, traversing all the point cloud samples to be processed; N is the number of point cloud samples to be processed by the linear attention mechanism; S222, performing a cross attention operation on the source point cloud data and the target point cloud data respectively to achieve information interaction between the two point cloud data; S223, performing a self-attention operation based on the result after the cross-attention operation to explore the intrinsic correlation between the source point cloud data and the target point cloud data; S224, enhancing the ability of the backbone network to learn point cloud feature information through multiple cycles, and outputting a feature map containing overlapping areas and non-overlapping areas; S23, input the feature map obtained by the cyclic twin attention mechanism into the BEV module to locate the overlapping area, and predict the rotation and translation required for the registration between the target point cloud data and the source point cloud data; S3, determining a loss function and optimization parameters for improving the point cloud registration model to accurately predict the rotation and translation required for registration; S4. Based on the rotation and translation of the target point cloud data predicted by the point cloud registration model, efficient registration of adjacent viewpoint point clouds is achieved.

2. The point cloud registration method according to claim 1, characterized in that: In step S2, the point cloud registration model uses the PointNet++ network as the backbone network for feature learning of point cloud data, and uses a random sampling method to replace the farthest point sampling method in the original PointNet++ network; And add an external attention mechanism to encode the point cloud data in the downsampling layer of the backbone network.

3. The point cloud registration method according to claim 1, characterized in that: In step S21, the specific process includes the following steps: S211, selecting a backbone network for feature learning of point cloud data; S212, by adding an external attention mechanism to the backbone network to obtain the correlation between different data samples; S213. Design the network framework of the downsampling layer of the backbone network after adding the external attention mechanism; S214, determining the input and output of the backbone network to enable the backbone network to extract the correlation between the source point cloud samples and the target point cloud samples.

4. The point cloud registration method according to claim 2 or 3, characterized in that: The encoding process of the external attention mechanism is as follows: ; in, is the input required by the external attention mechanism, Q is the query matrix obtained by processing the features through the linear layer after the SA module in the PointNet++ network, and the superscript E represents external-attention, i.e., the external attention mechanism; and are the matrix parameters of two linear transformations, replacing the key matrix K and value matrix V in the original attention mechanism, and the query matrix Perform matrix multiplication; softmax and L1-norm respectively represent normalization and regularization of the input values ​​in different dimensions.

5. The point cloud registration method according to claim 2 or 3, characterized in that: The input of the backbone network consists of two parts: extracting sub-region point cloud data near the source point cloud bounding box in adjacent perspectives ; And, extract the sub-region point cloud data near the search target bounding box in the current perspective , where the sub-region point cloud data and All of them are 1024 three-dimensional space points obtained based on random sampling method, and their 1024 three-dimensional vertex coordinates are used as the input of the network; The output of the backbone network also consists of two parts: sub-region point cloud data Features obtained after backbone network feature learning ; And sub-region point cloud data Features obtained after backbone network feature learning , whose dimensions are all (B, 32, 1024).

6. The point cloud registration method according to claim 1, characterized in that: In step S23, it also includes: based on the target point cloud features obtained by the cyclic twin attention mechanism, dividing the three-dimensional space where the target point cloud is located into N voxels of the same size and a side length of L meters, performing an average pooling operation on the three-dimensional coordinates and features of the points in the same voxel, so that the point features of the search area are converted into voxel representations; The voxelized target point cloud features are passed into the BEV module, and the two prediction heads it contains predict the rotation and translation required for the alignment between the target point cloud data and the source point cloud data.

7. The point cloud registration method according to claim 1, characterized in that: In step S3, the loss function of the point cloud registration model is for: ; In the above formula, represents the rotational offset loss; represents the translational offset loss; , All are hyperparameters; and Respectively represent the predicted value and true value of the rotation amount between the target point cloud data and the source point cloud data; and They respectively represent the predicted value and true value of the translation between the target point cloud data and the source point cloud data.

Citation Information

Patent Citations

  • Position-enhanced attention mechanism-based point cloud registration method

    CN116912296A