A three-dimensional point cloud matching method based on dynamic multi-scale and double attention
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-29
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]本发明提供一种基于动态多尺度与双重注意力的三维点云匹配方法,用以解决现有技术中描述子的判别能力和稳定性有限的缺陷,实现三维点云的精确配准
动态多尺度融合:利用尺度门控模块自适应计算不同感受野的特征权重,有效提升了模型在跨数据集和不同场景下的泛化能力。
Smart Images

Figure CN122530630A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a three-dimensional point cloud matching method based on dynamic multi-scale and dual attention. Background Technology
[0002] 3D point cloud registration is a fundamental problem in the field of 3D vision. Its core lies in establishing correspondences between different point clouds to achieve spatial coordinate alignment and fusion. In applications such as autonomous driving, 3D reconstruction, and large-scale scene understanding, feature descriptor-based registration methods have become the mainstream approach due to their low dependence on initial pose and computational flexibility. These methods typically begin with keypoint extraction, then use local feature descriptors to encode the geometric structure information of the point clouds into high-dimensional feature vectors, and establish correspondences between point clouds using feature matching algorithms. Based on these corresponding point pairs, the spatial transformation relationship between the two sets of point clouds can be further estimated. Finally, robust estimation methods (such as RANSAC) and fine-grained registration algorithms (such as ICP) are combined to achieve accurate fusion of multi-source point cloud data.
[0003] For decades, the design and representation of 3D local feature descriptors has been a crucial research area in point cloud processing. Traditional methods typically rely on manually designed geometric operators to construct feature descriptions by statistically analyzing curvature, normal vector distribution, and spatial relationships within the neighborhood. With the development of deep learning technology, end-to-end learning methods based on neural networks have gradually become a research hotspot. These methods can automatically learn local geometric features in point clouds using deep network structures, thus exhibiting superior matching performance in complex and varied scenes.
[0004] However, with the continuous improvement of 3D sensor resolution and the increasing complexity of application scenarios, existing methods still face many challenges in practical applications. For example, under conditions of noise interference, density variation and low overlap, the discriminative ability and stability of descriptors are still limited, making it difficult to fully meet the requirements of high-precision registration. Summary of the Invention
[0005] This invention provides a 3D point cloud matching method based on dynamic multi-scale and dual attention, which solves the defects of limited discriminative ability and stability of descriptors in the prior art and achieves accurate registration of 3D point clouds.
[0006] A 3D point cloud matching method based on dynamic multi-scale and dual attention includes: S1: Acquire raw point cloud data from different perspectives of a static scene to extract raw local point cloud blocks corresponding to different perspectives; the raw point cloud data includes: source point cloud data and target point cloud data; S2: Based on the original local point cloud blocks, construct multi-scale local point cloud blocks with different spatial receptive fields; S3: Use a weight-sharing coding network to extract features from the multi-scale local point cloud blocks, and use a scale-gating module to achieve adaptive weighted fusion of multi-scale features to obtain a fused multi-scale feature map; S4: Based on the fused multi-scale feature map, feature descriptors of the source point cloud data and the target point cloud data are extracted respectively using a dual attention mechanism of space and channel.
[0007] S5: Based on the feature descriptors of the source point cloud data and the target point cloud data, the network is trained end-to-end using the model optimization function based on the contrast loss to obtain a trained 3D point cloud matching model. S6: Input the point cloud data to be matched into the trained 3D point cloud matching model, establish a matching relationship based on the feature descriptor and estimate the rigid transformation matrix to achieve 3D point cloud registration.
[0008] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, S2 includes: The original local point cloud blocks are preprocessed to obtain preprocessed local point cloud blocks; and based on the preprocessed local point cloud blocks, local neighborhoods are divided in a progressive multi-level scale under a local reference frame to construct multi-scale local point cloud blocks with different spatial receptive fields.
[0009] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, the preprocessing includes: The original local point cloud block is preprocessed according to the following formula to obtain the preprocessed local point cloud block;
[0010] in, The original point coordinates, These are the coordinates of the local center point. Let be a rotation matrix. These are the coordinates of the preprocessed local point cloud.
[0011] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, the construction of multi-scale local point cloud blocks with different spatial receptive fields includes: Based on the preprocessed local point cloud blocks, multi-layer spherical voxel centers are constructed in a local reference frame. For the constructed spherical voxel centers, a multi-level scale set consisting of multiple progressive nearest neighbor numbers is set. The K-nearest neighbor algorithm is used to independently query and sample the preprocessed local point cloud blocks at each scale to construct multi-scale local point cloud blocks with different spatial receptive fields.
[0012] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, S3 includes: S31: Using a weight-sharing coding network, preliminary features are extracted from local point cloud blocks at each scale, and the preliminary features are max-pooled in the dimension of nearest neighbors to reshape them into a set of three-dimensional multi-scale feature maps conforming to a multi-layer spherical voxel grid. S32: Input the three-dimensional multi-scale feature map set into the scale-gated module, and extract the global context information vector of each scale feature map through three-dimensional global average pooling, thereby obtaining the global context information vector of each scale; let the first... The three-dimensional feature map at each scale is Then its global context vector The calculation is as follows:
[0013] S33: After concatenating the global context information vectors of all scales, the original weights are output via a multilayer perceptron. And perform normalization processing. To find the minimum value, we obtain the adaptive weights for each scale. :
[0014] S34: Adaptive weights for each scale The feature maps are multiplied and weighted according to the corresponding 3D feature maps, and then stitched together along the channel dimension to obtain the fused multi-scale feature maps.
[0015] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, step S4 includes: S41: Input the fused multi-scale feature map into a multi-layer 3D convolutional neural network for layer-by-layer feature encoding to extract 3D local features at different depths; S42: For the 3D local features extracted by the feature layer with a depth ratio of r in the 3D convolutional neural network encoder, average and maximum pooling are performed along the channel dimension and then concatenated. Compression is then performed using 3D convolution and an activation function to generate spatial attention weights, wherein the feature layer index satisfies... This represents the total number of layers in the encoder. S43: Perform global max pooling and average pooling on the fused multi-scale feature map, sum the results, and then process them through a fully connected layer and activation function to generate channel attention weights; S44: After weighting the spatial attention weights and channel attention weights, the fused features are cross-channel stitched together with shallow high-precision features through local residual skip connections. After dimensionality reduction and activation, the fused features are L2 normalized to output point cloud feature descriptors. for:
[0016] in, This refers to the feature vectors output by the network.
[0017] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, step S5 includes: S51: Select source local point cloud blocks and corresponding target local point cloud blocks with pose transformation relationships as training samples, and extract source feature descriptors and target feature descriptors respectively; S52: Calculate the contrast loss between the source feature descriptor and the target feature descriptor, constrain matching key point descriptors in the physical space to be close to each other in the feature space, and non-matching key point descriptors to be far apart from each other in the feature space, thereby optimizing the network parameters end-to-end, and finally obtaining the trained 3D point cloud matching model.
[0018] Furthermore, in the 3D point cloud matching method based on dynamic multi-scale and dual attention as described above, step S6 includes: S61: Input the point cloud data to be matched into the trained 3D point cloud matching model, and extract the source point cloud feature descriptor and the target point cloud feature descriptor of the point cloud data to be matched through the model; S62: Based on the source point cloud feature descriptors and target point cloud feature descriptors of the point cloud data to be matched, establish initial matching point pairs based on the bidirectional nearest neighbor search strategy in the feature space; S63: Eliminate spatial geometric mismatches in the initial matching point pairs, and calculate the final rigid transformation matrix between the source point cloud and the target point cloud based on the retained interior points; S64: Align the source point cloud with the target point cloud using the rigid transformation matrix to complete the registration of the three-dimensional point cloud.
[0019] Compared with existing 3D point cloud feature extraction and registration methods, this application has the following advantages: Dynamic multi-scale fusion: The scale gating module adaptively calculates the feature weights of different receptive fields, which effectively improves the model's generalization ability across datasets and different scenarios.
[0020] Dual Attention Enhancement: Combining spatial and channel dual attention mechanisms, the network is guided to accurately focus on key geometric structures and suppress noise, effectively improving the registration recall rate in complex scenarios such as low overlap.
[0021] End-to-end metric optimization: Based on contrastive loss, feature descriptors are directly optimized, which aggregates matching features and excludes non-matching features, thereby enhancing the discriminative power of features and the reliability of matching.
[0022] Ultra-lightweight architecture and cross-layer feature completion: By combining a lightweight gating mechanism with cross-layer feature concatenation, a model architecture with a low parameter count is achieved; it effectively compensates for the loss of spatial details in deep networks, and ensures the efficiency of feature extraction and spatial positioning accuracy while significantly reducing computational power consumption. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating the three-dimensional point cloud matching method based on dynamic multi-scale and dual attention provided by the present invention. Figure 2 This is a flowchart illustrating the three-dimensional point cloud matching method provided in an embodiment of the present invention; Figure 3 These are schematic diagrams of the input data of the three-dimensional point cloud to be registered under different scenarios in embodiments of the present invention; Figure 4 This is a schematic diagram of the multi-scale feature map construction process in an embodiment of the present invention; Figure 5 This is a structural diagram of the three-dimensional feature extraction and encoder in an embodiment of the present invention; Figure 6 This is a visualization of the fine registration effect of point clouds in an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] The technical problem this invention aims to solve is: based on the aforementioned problems and the issues of noise interference, density variations, and low overlap rates in point cloud data under complex scenarios, a 3D point cloud matching method based on dynamic multi-scale and dual attention is proposed. This method first extracts key points and constructs neighborhoods from the input point cloud. Then, a dynamic multi-scale strategy is used to encode the features of the key point neighborhoods, and a dual attention mechanism is employed to enhance the expressive power of channel features and spatial structure information. Next, feature similarity is used to establish matching relationships, and a robust estimator is combined to eliminate incorrect matches. Finally, a fine registration algorithm is used to complete point cloud fusion. This method can still achieve high-precision and stable 3D point cloud matching under conditions of noise, sparse sampling, and low overlap.
[0027] To achieve the above objectives, the solution adopted by the present invention to solve its technical problem is as follows: Figure 1 As shown, the method includes the following steps: S1: Obtain raw point cloud data from different perspectives of a static scene to extract local point cloud blocks corresponding to different perspectives; the raw point cloud data includes: source point cloud data and target point cloud data.
[0028] S2: Based on the original local point cloud blocks, construct multi-scale local point cloud blocks with different spatial receptive fields; Specifically, this application utilizes a progressive multi-level scale (such as...) Local neighborhood partitioning is performed to construct multi-scale local point cloud blocks with different spatial receptive fields, thereby providing the descriptor with geometric structural information ranging from fine-grained micro-details to macro-context.
[0029] In terms of discrimination ability, the fine-grained scale can accurately capture the micro-geometric features of point clouds (such as small edges and corners), while the macro-scale provides a wider range of structural trends. This comprehensive perception from the surface to the core effectively avoids mismatches caused by extremely similar local features.
[0030] In terms of stability, the progressive multi-scale design ensures that no matter what density distribution the point cloud presents at different distances (e.g., denser nearby, sparser in distant areas), the network can always find the most robust geometric representation through neighbor queries of different scales, thus maintaining the consistency of feature extraction even in environments with noise interference and density changes.
[0031] S3: Use a weight-sharing coding network to extract features from the multi-scale local point cloud blocks, and use a scale-gating module to achieve adaptive weighted fusion of multi-scale features to obtain a fused multi-scale feature map.
[0032] Specifically, this application utilizes a scale-gating module to calculate adaptive weights and weightedly fuses features from different receptive fields. Its core function is to inject an intelligent filtering mechanism into the descriptors. This process is crucial for improving discriminative ability because not all scales contribute equally to each key point. The gating module can automatically highlight the most representative feature scales based on the geometric characteristics of the current point (e.g., assigning finer-grained higher weights to points with complex curvature), making the generated descriptors more unique in the feature space.
[0033] In terms of stability, adaptive weighted fusion can dynamically suppress scale features that are severely affected by noise contamination or sparse sampling. By assigning smaller weights, it reduces their negative interference and ensures that the final output descriptor maintains high robustness and matching recall even in complex and variable scenarios.
[0034] S4: Based on the fused multi-scale feature map, feature descriptors of the source point cloud data and the target point cloud data are extracted respectively using a dual attention mechanism of space and channel.
[0035] Specifically, the fused multi-scale feature map is input into a 3D convolutional neural network for layer-by-layer encoding, and a dual spatial and channel attention mechanism is used for feature enhancement to extract point cloud feature descriptors. This application effectively improves the discriminative power of point cloud feature descriptors by utilizing a dual spatial and channel attention mechanism to enhance the features of the fused multi-scale feature map.
[0036] S5: Based on the feature descriptors of the source point cloud data and the target point cloud data, the network is trained end-to-end using the model optimization function based on the contrast loss to obtain a trained 3D point cloud matching model. S6: Input the point cloud data to be matched into the trained 3D point cloud matching model, establish a matching relationship based on the feature descriptor and estimate the rigid transformation matrix to achieve 3D point cloud registration.
[0037] Compared with existing 3D point cloud feature extraction and registration methods, the method provided in this application has the following advantages: 1. Dynamic Multi-Scale Fusion: By utilizing a scale-gating module to adaptively calculate feature weights for different receptive fields, the model's generalization ability across datasets and different scenarios is effectively improved, ultimately enhancing the accuracy of 3D point cloud matching. Specifically, improving the model's generalization ability across datasets and different scenarios essentially ensures that the descriptors maintain extremely high stability and discriminative power even in unknown environments. Dynamic multi-scale fusion (S3) adaptively seeks a balance between fine-grained micro-details and macro-context through a scale-gating module. This adaptive multi-scale selection strategy dynamically adjusts the feature receptive field based on local geometric complexity, ensuring that even when switching from indoor scenes to complex outdoor scenes, the model can still stably extract features least affected by environmental interference (stability) and retain the most discriminative geometric features using the optimal receptive field (discriminative power). Therefore, the generalization ability is reflected in the fact that the descriptors still possess stable discriminative and distinguishing power under different data distributions.
[0038] 2. Dual Attention Enhancement: Combining spatial and channel dual attention mechanisms, the network is guided to accurately focus on key geometric structures and suppress noise, effectively improving the registration recall (RR) in complex scenarios such as low overlap.
[0039] 3. End-to-end metric optimization: Based on contrastive loss, feature descriptors are directly optimized, which aggregates matching features and excludes non-matching features, thereby enhancing the discriminative power of features and the reliability of matching.
[0040] Furthermore, step S2 specifically includes the following scheme: preprocessing the original local point cloud blocks to obtain preprocessed local point cloud blocks; and based on the preprocessed local point cloud blocks, performing local neighborhood division in a local reference frame based on progressive multi-level scales to construct multi-scale local point cloud blocks with different spatial receptive fields.
[0041] The preprocessing includes: The original local point cloud block is preprocessed according to the following formula to obtain the preprocessed local point cloud block;
[0042] in, The original point coordinates, These are the coordinates of the local center point. Let be a rotation matrix. These are the coordinates of the preprocessed local point cloud.
[0043] Specifically, the relative coordinates of each point in the original local point cloud block relative to the local center point are calculated, and a rotation matrix is constructed based on the Z-axis calculated according to the reference point. The relative coordinates are rotated and aligned to the local reference system, thereby obtaining the preprocessed local point cloud block.
[0044] This application achieves rotation invariance of features through preprocessing. Since the absolute coordinates of the original point cloud in space change with the rotation and displacement of the object, without alignment, the same geometric structure will be recognized as completely different features by the network under different poses. This application, through the construction and alignment of local reference frames, ensures that regardless of how the point cloud is positioned in global space, its local features are rotated to the same standard local coordinate system before entering the network.
[0045] Regarding stability, this application eliminates the impact of rotational noise on feature extraction through preprocessing. This means that even with significant rotational differences between the source and target point clouds, the extracted descriptors remain consistent (i.e., robust). Regarding discriminative ability, once the input features are standardized, the neural network no longer needs to expend a large number of parameters to learn how to recognize rotated objects. Instead, it can focus its energy and computational power on learning the deep semantics of geometric structures (such as corners, edges, and surface variations). This results in generated descriptors with stronger discriminative power in the feature space.
[0046] Furthermore, the construction of multi-scale local point cloud blocks with different spatial receptive fields in this application specifically includes the following steps: Based on the preprocessed local point cloud blocks, multi-layer spherical voxel centers are constructed in a local reference frame. For the constructed spherical voxel centers, a multi-level scale set consisting of multiple progressive nearest neighbor numbers is set. The K-nearest neighbor algorithm is used to independently query and sample the preprocessed local point cloud blocks at each scale to construct multi-scale local point cloud blocks with different spatial receptive fields.
[0047] Specifically, in the local reference frame, a set of center coordinates for a multi-layered spherical voxel mesh is constructed by dividing the step size according to the set radial, azimuth, and elevation angles, assuming the radial distance is... azimuth angle is Angle of elevation is The transformation formula for the Cartesian coordinates of the voxel center is:
[0048]
[0049]
[0050] For the center of the constructed spherical voxel, a number of progressively increasing nearest neighbor numbers (such as the first nearest neighbor number) are set. Second nearest neighbor Third nearest neighbor ,and A multi-scale set composed of points is used, and the K-nearest neighbor (KNN) algorithm is used to independently query and sample local point clouds at each scale to construct a set of point cloud neighborhoods with different spatial receptive fields.
[0051] Specifically, assume that a spherical voxel center has been determined in the local reference frame. .
[0052] First Scale (Fine-grained): Settings The algorithm is based on Centered on a point cloud, find the 16 nearest points. The area formed by these 16 points is very small and can only reflect the microscopic surface texture of the object (such as the tiny undulations on the surface).
[0053] Second Scale (Intermediate Structure): Setting Similarly, with Find the 30 nearest points centered on the target. As the number of points increases, the query radius automatically expands, and the neighborhood covers a wider area, reflecting the meso-geometry (such as a small corner or arc).
[0054] Third Scale (Macro Context): Setting Find the 64 nearest neighbors. This maximizes the neighborhood radius and captures the nearest neighbors. Larger macro-environmental information (such as whether the point is on a flat surface or at a complex boundary).
[0055] Furthermore, S3 specifically includes the following scheme: S31: Using a weight-sharing coding network, preliminary features are extracted from local point cloud blocks at each scale, and the preliminary features are max-pooled in the dimension of nearest neighbors to reshape them into a set of three-dimensional multi-scale feature maps conforming to a multi-layer spherical voxel grid. Specifically, a weight-sharing coding network is used to perform preliminary feature extraction on the point cloud. The input data here is the preprocessed local point cloud coordinates. The network processes these aligned local coordinates, mapping them into high-dimensional features. Without preprocessed local point cloud coordinates... The provided rotation invariance means that the extracted initial features will fluctuate wildly with changes in the point cloud pose, causing the entire subsequent network to fail. Then, max pooling the extracted initial features along the nearest neighbor dimension aims to achieve permutation invariance. Because a point cloud is essentially an unordered set of points, max pooling can extract the strongest geometric features (such as the sharpest corners or the most significant curvature changes) within that neighborhood, regardless of the points' order. For stability, this ensures that the output features remain consistent even if the input point cloud order changes; for discriminative ability, it filters out background noise, forcing the model to focus on the most representative geometric information within the neighborhood.
[0056] S32: Input the three-dimensional multi-scale feature map set into the scale-gated module, and extract the global context information vector of each scale feature map through three-dimensional global average pooling, thereby obtaining the global context information vector of each scale; let the first... The three-dimensional feature map at each scale is Then its global context vector The calculation is as follows:
[0057] S33: After concatenating the global context information vectors of all scales, the original weights are output via a multilayer perceptron. And perform normalization processing. To find the minimum value, we obtain the adaptive weights for each scale. :
[0058] in, This represents the original non-normalized weights at the j-th scale output by the multilayer perceptron (MLP). S is the minimum value; S is the total scale. For example, the system will consider multiple different nearest neighbor numbers (e.g., ...). Feature extraction is performed at a scale of S, with a total number of scales of S. This is the initial score calculated by MLP for these global context vectors at different scales.
[0059] S34: Adaptive weights for each scale The feature maps are multiplied and weighted according to the corresponding 3D feature maps, and then stitched together along the channel dimension to obtain the fused multi-scale feature maps.
[0060] Specifically, suppose that for the center of a spherical voxel, point cloud patches of three scales have been obtained: (16 points) (30 points) and (64 points).
[0061] In step S31, each point in the three-scale coordinate set is first mapped to a C-dimensional feature using a shared MLP, and then max pooling is performed in the point dimension to obtain feature vectors of the three scales (shape: ), and reshape it into a three-dimensional feature map In step S32, the spatial dimension is compressed through three-dimensional global average pooling to obtain three vectors representing global statistical information. In step S33, the spliced... The importance of each scale is learned through MLP, and normalized using formula (6) to obtain three adaptive weights, for example... (The fine grain is very clear) , In step S34, the feature map is... Multiply by the corresponding weight Then, the data is stitched together along the channel dimension to output a comprehensive multi-scale feature map that integrates microscopic details and macroscopic rings.
[0062] Among them, the normalized adaptive weights It is a scalar (numerical value) generated for each scale, while the three-dimensional scale feature map It is the four-dimensional tensor (channel) corresponding to this scale. depth high Width). Assume there are three scales ( The corresponding feature maps are feature maps. After calculation by the scale gating module, three adaptive weights are obtained. , , .Will and Multiply each pixel value in the array, and process them similarly. and The final weighted result will be... They are stitched together along the channel dimension. If each scale originally has 16 channels, the fusion results in a large feature map with 48 channels.
[0063] This application achieves dynamic feature selection through the above scheme, enabling the model to automatically select scale features that contribute more based on the current point cloud quality (e.g., the presence of noise). If a certain scale (e.g., fine-grained) is selected... Subjected to severe noise interference, adaptive weights It will automatically reduce, thereby suppressing the influence of noise on the final descriptor and maintaining the robustness of the features.
[0064] This application integrates features from different receptive fields according to their importance, so that the descriptor retains both fine local details and macroscopic contextual semantics, making it more unique in the feature space.
[0065] The core objective of the above series of processes is to construct a dynamic, hierarchical feature representation system. Through multi-scale construction in step S31, this application enables the model to simultaneously represent local fine-grained geometric texture and broader structural background information. The purpose of introducing a scale-gating module is to enhance the model's stability in the face of density variations or noise interference: when a certain scale (such as a macroscopic scale) becomes unreliable due to noise, the network can adaptively reduce its weights. The fusion of multi-scale features greatly enhances the discriminative power of descriptors, enabling them not only to distinguish local point distributions but also to combine surrounding environmental information. Even with low overlap or high scene similarity (such as repeated walls), they can still produce highly discriminative feature descriptors, thereby improving registration recall (RR).
[0066] This application combines a lightweight gating mechanism with cross-layer feature concatenation to achieve a model architecture with a low parameter count. It effectively compensates for the loss of spatial details in deep networks, significantly reducing computational consumption while ensuring high efficiency in feature extraction and spatial positioning accuracy. Specifically, this application utilizes a weight-sharing encoding network to extract features from the multi-scale local point cloud blocks and achieves adaptive weighted fusion of multi-scale features through a scale gating module. This design greatly reduces the number of model parameters (approximately...). At the same time, it avoids the redundant computational power consumption caused by multi-scale calculations, thus ensuring the high efficiency of feature extraction. Furthermore, through feature fusion, it can effectively compensate for the loss of spatial details and ensure the spatial positioning accuracy of feature descriptors.
[0067] Furthermore, S4 specifically includes the following scheme: S41: Input the fused multi-scale feature map into a multi-layer 3D convolutional neural network for layer-by-layer feature encoding to extract 3D local features at different depths; S42: For 3D local features at a specific depth, average and maximum pooling are performed along the channel dimension and then concatenated. This is then compressed using 3D convolution and an activation function to generate spatial attention weights. Here, the 3D local features at a specific depth refer to the 3D local features extracted from the feature layer with a depth ratio of r in the 3D convolutional neural network encoder, where the feature layer index satisfies... This represents the total number of layers in the encoder.
[0068] Specifically, in multi-layer 3D convolutional neural networks, depth usually refers to the number of layers in the network. Choosing a specific depth means selectively selecting a particular layer (such as an intermediate layer or a deeper layer near the output) in the multi-layer structure of a 3D CNN to add a spatial attention module, rather than stacking it in every layer.
[0069] In 3DCNNs, selecting 3D local features extracted from specific layers (usually mid-to-deep layers) and adding them to the spatial attention module is mainly based on the following three core logics: 1. Balancing Semantic Information and Spatial Details: Shallow features in neural networks contain rich raw spatial coordinate information but lack semantics, making it difficult to distinguish noise from geometric structures. Deep features, on the other hand, possess highly abstract geometric semantics (able to identify key structures such as corners and edges), but their spatial resolution decreases after multiple convolutional samplings, leading to blurred localization. Therefore, choosing to introduce attention into deeper layers allows modules to allocate weights based on an understanding of what constitutes important structures, offering the best cost-effectiveness.
[0070] 2. Effectiveness of noise suppression: The spatial attention mechanism acts like a "filter." In deep feature maps, noise signals have usually been initially filtered out. At this point, the spatial weight map extracted by average and max pooling can more accurately pinpoint the true geometric feature points, thereby effectively guiding the network to focus on key structures. 3. Computational efficiency and lightweight architecture: Adding attention modules to every layer would significantly increase the number of parameters and computational overhead. However, introducing them only at specific locations in deeper layers gives the model an ultra-lightweight architecture and can significantly improve registration recall (RR) with minimal computational cost, achieving the optimal trade-off between performance and efficiency.
[0071] The advantage of this design lies in the fact that shallow layers of neural networks often contain only messy raw geometric information, while mid-to-deep layers, after being encoded layer by layer, already possess a strong semantic sense (e.g., able to distinguish where the key corners are and where the irrelevant planes are). At this point, using spatial attention to strengthen these key regions and suppress noise can produce twice the result with half the effort. By selecting only the right layers, rather than every single layer, the model can accurately capture the most discriminative geometric details without significantly increasing computational power consumption, thus achieving a good balance between improving registration accuracy and maintaining the model's lightweight nature.
[0072] S43: Perform global max pooling and average pooling on the fused multi-scale feature map, sum the results, and then process them through a fully connected layer and activation function to generate channel attention weights; S44: After weighting the spatial attention weights and channel attention weights, the fused features are cross-channel stitched together with shallow high-precision features through local residual skip connections. After dimensionality reduction and activation, the fused features are L2 normalized to output point cloud feature descriptors. for:
[0073] in, This refers to the feature vectors output by the network.
[0074] Specifically, the spatial weight map in this application determines which spatial locations (such as corners and apexes) in the feature map have the highest importance through pooling and convolution along the channel direction; the channel weight vector, on the other hand, determines which feature channels (such as a specific geometric modality) have the most discriminative power through global pooling. During the feature fusion stage, the system applies these weights to the deep feature map through element-wise multiplication, thereby amplifying key information and suppressing noise signals. This logic of calculating first and then multiplying ensures that the final output feature descriptor is the essence of the information filtered by the attention mechanism.
[0075] This application ensures spatial localization accuracy through cross-layer feature stitching (i.e., local residual skip connections). Since deep networks are prone to losing accurate original spatial coordinate information during multi-layer convolution, this application effectively compensates for the loss of spatial details by directly stitching shallow features containing high-precision geometric details into deep features, ensuring that the descriptors have extremely high localization accuracy in the final registration.
[0076] Furthermore, as described above, S5 specifically includes the following steps: S51: Select source local point cloud blocks and corresponding target local point cloud blocks with pose transformation relationships as training samples, and extract source feature descriptors and target feature descriptors respectively; S52: Calculate the contrast loss between the source feature descriptor and the target feature descriptor, constrain matching key point descriptors in the physical space to be close to each other in the feature space, and non-matching key point descriptors to be far apart from each other in the feature space, thereby optimizing the network parameters end-to-end, and finally obtaining the trained 3D point cloud matching model.
[0077] Furthermore, as described above, S6 specifically includes the following steps: S61: Input the point cloud data to be matched into the trained 3D point cloud matching model, and extract the source point cloud feature descriptor and the target point cloud feature descriptor of the point cloud data to be matched through the model; S62: Based on the source point cloud feature descriptors and target point cloud feature descriptors of the point cloud data to be matched, establish initial matching point pairs based on the bidirectional nearest neighbor search strategy in the feature space; S63: Eliminate spatial geometric mismatches in the initial matching point pairs, and calculate the final rigid transformation matrix between the source point cloud and the target point cloud based on the retained interior points; S64: Align the source point cloud with the target point cloud using the rigid transformation matrix to complete the registration of the three-dimensional point cloud.
[0078] Example: This embodiment provides a 3D point cloud matching method based on dynamic multi-scale and dual attention, the process of which is as follows: Figure 2 As shown, the method includes aligning the input point cloud with a local reference frame and dividing it into multi-scale neighborhoods to construct multi-scale point cloud blocks; extracting multi-scale features using an encoding network and performing adaptive weighted fusion with the aid of a scale-gating module; performing feature enhancement and cross-layer concatenation in a dual-attention 3D convolutional network to extract high-dimensional feature descriptors; establishing initial matching point pairs based on the feature descriptors and using a robust estimation algorithm to eliminate mismatches and calculate the rigid transformation matrix to complete point cloud registration. The following examples illustrate a specific 3D point cloud matching method based on dynamic multi-scale and dual-attention provided by this invention.
[0079] First, acquire 3D point cloud data (including source and target point clouds) from different perspectives of the static scene, such as... Figure 3 As shown, local point cloud patches are extracted from the point cloud. The relative coordinates of each point with respect to the local center point are calculated, and a rotation matrix is constructed based on the Z-axis using a reference point. The relative coordinates are rotated and aligned to the local reference frame to achieve rotation invariance of the features. Under this local reference frame, a set of center coordinates for a multi-layered spherical voxel mesh is constructed. For the constructed spherical voxel centers, a multi-level scale set consisting of a first nearest neighbor number (e.g., 16), a second nearest neighbor number (e.g., 30), and a third nearest neighbor number (e.g., 64) is set. The K-nearest neighbor (KNN) algorithm is used to sample the local point cloud at each scale, thereby constructing a point cloud neighborhood set with different spatial receptive fields (fine-grained, intermediate-level structure, macroscopic context), as shown. Figure 4 As shown.
[0080] A weight-sharing encoding network is used to perform preliminary feature extraction on a multi-scale point cloud neighborhood set, followed by max pooling along the nearest neighbor dimension to reshape it into a set of 3D multi-scale feature maps. Subsequently, the 3D multi-scale feature map set is input into a scale-gating module (ScaleGate), where global context information vectors for each scale feature map are extracted using 3D global average pooling. The global information vectors from all scales are concatenated, processed by a multilayer perceptron (MLP), and normalized to calculate adaptive weights for each scale. These normalized adaptive weights are then multiplied and weighted by the corresponding 3D scale feature maps, and finally concatenated along the channel dimension to obtain the fused multi-scale feature map.
[0081] The fused multi-scale feature maps are input into a multi-layer 3D convolutional neural network for layer-by-layer feature encoding, such as... Figure 5 As shown, a dual attention mechanism is introduced in this encoding process: for a 3D feature map of a specific depth, mean pooling and max pooling are performed along the channel dimension and then concatenated. A spatial weight map is generated through 3D convolution and activation functions to guide the network to focus on key geometric structures such as corner points; simultaneously, global max pooling and mean pooling are performed on the 3D feature map, and the sum is passed through a fully connected layer and activation function to generate a channel weight vector. After deep features are weighted by spatial and channel attention, they are concatenated and fused with shallow high-precision features through local residual skip connections to compensate for the loss of spatial details in deep networks. After dimensionality reduction and activation, the fused features are L2 normalized to output high-dimensional (e.g., 32-dimensional) feature descriptors.
[0082] (4) In the model registration and inference stage, feature descriptors of the source and target point clouds are first extracted, and initial matching point pairs are established based on the bidirectional nearest neighbor search strategy in the feature space. Then, a random sampling consensus algorithm is used to eliminate spatial geometric mismatches in the initial matching point pairs, and the final rigid transformation matrix between the source and target point clouds is calculated based on the retained interior points. This transformation matrix is used to align the source and target point clouds, completing the fine registration of the 3D point clouds. The final registration result is as follows: Figure 6 As shown in the figure on the right. It is worth noting that, to ensure the reliability of feature extraction, the model of this invention performs end-to-end optimization of network parameters based on contrastive loss during the training phase by extracting descriptors of real matching pairs.
[0083] When the algorithm of this invention is applied to practical 3D point cloud registration (such as in scenarios with low overlap), the results are comparable to registration methods based on conventional single-scale or basic 3D convolution. Figure 6 As shown, the method of this invention not only achieves an ultra-lightweight architecture with a low parameter count (approximately 0.53M), but also effectively overcomes the limitations of traditional methods, resulting in more robust extracted features and significantly improving registration recall (RR) and cross-scene generalization ability.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A 3D point cloud matching method based on dynamic multi-scale and dual attention, characterized in that, include: S1: Obtain raw point cloud data from different perspectives of a static scene to extract raw local point cloud blocks corresponding to different perspectives; The raw point cloud data includes: source point cloud data and target point cloud data; S2: Based on the original local point cloud blocks, construct multi-scale local point cloud blocks with different spatial receptive fields; S3: Use a weight-sharing coding network to extract features from the multi-scale local point cloud blocks, and use a scale-gating module to achieve adaptive weighted fusion of multi-scale features to obtain a fused multi-scale feature map; S4: Based on the fused multi-scale feature map, feature descriptors of the source point cloud data and the target point cloud data are extracted respectively based on the spatial and channel dual attention mechanism; S5: Based on the feature descriptors of the source point cloud data and the target point cloud data, the network is trained end-to-end using the model optimization function based on the contrast loss to obtain a trained 3D point cloud matching model. S6: Input the point cloud data to be matched into the trained 3D point cloud matching model, establish the matching relationship based on the feature descriptor and estimate the rigid transformation matrix to achieve 3D point cloud registration.
2. The 3D point cloud matching method based on dynamic multi-scale and dual attention as described in claim 1, characterized in that, S2 includes: The original local point cloud blocks are preprocessed to obtain preprocessed local point cloud blocks; and based on the preprocessed local point cloud blocks, local neighborhoods are divided in a progressive multi-level scale under a local reference frame to construct multi-scale local point cloud blocks with different spatial receptive fields.
3. The 3D point cloud matching method based on dynamic multi-scale and dual attention as described in claim 2, characterized in that, The preprocessing includes: The original local point cloud block is preprocessed according to the following formula to obtain the preprocessed local point cloud block; in, The original point coordinates, These are the coordinates of the local center point. Let be a rotation matrix. These are the coordinates of the preprocessed local point cloud.
4. The 3D point cloud matching method based on dynamic multi-scale and dual attention as described in claim 3, characterized in that, The construction of multi-scale local point cloud blocks with different spatial receptive fields includes: Based on the preprocessed local point cloud blocks, multi-layer spherical voxel centers are constructed in a local reference frame. For the constructed spherical voxel centers, a multi-level scale set consisting of multiple progressive nearest neighbor numbers is set. The K-nearest neighbor algorithm is used to independently query and sample the preprocessed local point cloud blocks at each scale to construct multi-scale local point cloud blocks with different spatial receptive fields.
5. The 3D point cloud matching method based on dynamic multi-scale and dual attention as described in claim 4, characterized in that, S3 includes: S31: Using a weight-sharing coding network, preliminary features are extracted from local point cloud blocks at each scale, and the preliminary features are max-pooled in the dimension of nearest neighbors to reshape them into a set of three-dimensional multi-scale feature maps conforming to a multi-layer spherical voxel grid. S32: Input the three-dimensional multi-scale feature map set into the scale-gated module, and extract the global context information vector of each scale feature map through three-dimensional global average pooling, thereby obtaining the global context information vector of each scale; let the first... The three-dimensional feature map at each scale is Then its global context vector The calculation is as follows: S33: After concatenating the global context information vectors of all scales, the original weights are output via a multilayer perceptron. And perform normalization processing. To find the minimum value, we obtain the adaptive weights for each scale. : in, This represents the original non-normalized weights at the j-th scale output by the multilayer perceptron. S is the minimum value; S is the total scale; S34: Adaptive weights for each scale The feature maps are multiplied and weighted according to the corresponding 3D feature maps, and then stitched together along the channel dimension to obtain the fused multi-scale feature maps.
6. The 3D point cloud matching method based on dynamic multi-scale and dual attention as described in claim 1, characterized in that, S4 includes: S41: Input the fused multi-scale feature map into a multi-layer 3D convolutional neural network for layer-by-layer feature encoding to extract 3D local features at different depths; S42: For the 3D local features extracted by the feature layer with a depth ratio of r in the 3D convolutional neural network encoder, average and maximum pooling are performed along the channel dimension and then concatenated. Compression is then performed using 3D convolution and an activation function to generate spatial attention weights, wherein the feature layer index satisfies... This represents the total number of layers in the encoder. S43: Perform global max pooling and average pooling on the fused multi-scale feature map, sum the results, and then process them through a fully connected layer and activation function to generate channel attention weights; S44: After weighting the spatial attention weights and channel attention weights, the fused features are cross-channel stitched together with shallow high-precision features through local residual skip connections. After dimensionality reduction and activation, the fused features are L2 normalized to output point cloud feature descriptors. : in, This refers to the feature vectors output by the network.
7. The 3D point cloud matching method based on dynamic multi-scale and dual attention according to any one of claims 1-6, characterized in that, S5 includes: S51: Select source local point cloud blocks and corresponding target local point cloud blocks with pose transformation relationships as training samples, and extract source feature descriptors and target feature descriptors respectively; S52: Calculate the contrast loss between the source feature descriptor and the target feature descriptor, constrain matching key point descriptors in the physical space to be close to each other in the feature space, and non-matching key point descriptors to be far apart from each other in the feature space, thereby optimizing the network parameters end-to-end, and finally obtaining the trained 3D point cloud matching model.
8. The 3D point cloud matching method based on dynamic multi-scale and dual attention as described in claim 7, characterized in that, S6 includes: S61: Input the point cloud data to be matched into the trained 3D point cloud matching model, and extract the source point cloud feature descriptor and the target point cloud feature descriptor of the point cloud data to be matched through the model; S62: Based on the source point cloud feature descriptors and target point cloud feature descriptors of the point cloud data to be matched, establish initial matching point pairs based on the bidirectional nearest neighbor search strategy in the feature space; S63: Eliminate spatial geometric mismatches in the initial matching point pairs, and calculate the final rigid transformation matrix between the source point cloud and the target point cloud based on the retained interior points; S64: Align the source point cloud with the target point cloud using the rigid transformation matrix to complete the registration of the three-dimensional point cloud.