Point cloud anomaly detection method based on registration guidance rotation invariant feature learning

CN121095140APending Publication Date: 2025-12-09SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511063790.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-12-09

Smart Images

  • Figure CN121095140A_ABST
    Figure CN121095140A_ABST
Patent Text Reader

Abstract

The invention discloses a point cloud anomaly detection method based on registration guide rotation invariant feature learning, which comprises the following steps: acquiring a normal point cloud, applying random rigid transformation to generate a point cloud template, and performing multi-scale voxel downsampling; a feature extraction model is built and trained, a loss function is optimized based on a block matching pair and a point matching pair, and an optimal feature extraction model is obtained through training; registering and aligning the normal point cloud with the template, integrating the local rotation invariant features and the registered coordinates to obtain the final features of the normal point cloud, and establishing a normal feature memory bank; during detection, the test point cloud and the template are registered and aligned, the final features of the test point cloud are obtained and then are compared with the features in the normal feature memory bank, and abnormal scores are calculated to judge abnormal points. According to the method, the problem of detection deviation caused by rotation change and insufficient feature representation capability in the prior art can be solved, the accuracy and robustness of point cloud anomaly detection in industrial quality inspection are remarkably improved, and the method is suitable for automatic defect detection of a high-precision three-dimensional scanning piece.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of point cloud anomaly detection, and in particular to a point cloud anomaly detection method based on registration-guided rotation-invariant feature learning. Background Technology

[0002] In industrial production, product quality inspection is a crucial step in ensuring manufacturing precision and reliability. Traditional industrial vision inspection technologies primarily rely on two-dimensional image analysis, using automated vision systems to identify defects such as scratches, dents, and impurities on product surfaces. However, image-based inspection methods have significant limitations when handling complex geometries or low-texture objects; for example, they struggle to accurately capture three-dimensional deformations, fine structural defects, or anomalies in occluded areas. In contrast, point clouds can provide complete geometric information about objects, including features such as depth, curvature, and spatial distribution, making them more advantageous for defect detection in complex industrial scenarios.

[0003] In recent years, point cloud anomaly detection technology has gradually become a research hotspot, mainly divided into reconstruction-based methods and memory-based methods. Reconstruction-based methods detect anomalies by reconstructing normal point clouds and utilizing reconstruction errors, but these methods are quite sensitive to noise and resolution variations. Memory-based methods detect anomalies by storing features of normal point clouds and calculating the deviation between the test point cloud and the stored features during testing, but due to the disordered and sparsity of point cloud data, these methods still face challenges in feature extraction and spatial alignment.

[0004] Existing memory-based methods typically employ FPFH features combined with the RANSAC algorithm for registration to reduce spatial misalignment between the test point cloud and the stored prototype. However, misalignment issues may still exist after registration, and the pre-trained feature extractor PointMAE used in existing methods primarily focuses on global semantic information, making it difficult to extract fine-grained local geometric structure information, especially lacking rotation invariance. This limitation leads to poor consistency of feature representations under different orientations and structural perturbations. Especially in the presence of anomalies, registration errors further exacerbate feature misalignment, thereby reducing the reliability of anomaly detection.

[0005] Therefore, there is an urgent need for a method that can jointly optimize registration and feature learning, guide feature extraction through registration tasks, and generate feature representations with rotation invariance and local discriminability, thereby improving the accuracy and robustness of point cloud anomaly detection. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and propose a point cloud anomaly detection method based on registration-guided rotation-invariant feature learning. By jointly optimizing point cloud registration and feature extraction, this invention solves the detection deviation problem caused by rotation changes and insufficient feature representation capabilities in the prior art, and significantly improves the accuracy and robustness of point cloud anomaly detection in industrial quality inspection.

[0007] To achieve the above objectives, the technical solution provided by this invention is: a point cloud anomaly detection method based on registration-guided rotation-invariant feature learning, comprising the following steps:

[0008] S1: Obtain a normal point cloud and apply a random rigid transformation to the normal point cloud, i.e., perform random rotation and translation to obtain a point cloud template. Then, perform multi-scale voxel downsampling on the normal point cloud and the point cloud template to obtain a multi-scale downsampled point cloud.

[0009] S2: Build a feature extraction model to extract features from multi-scale downsampled point clouds, extracting local rotation invariant features, point registration features, and block registration features;

[0010] S3: Use the multi-scale downsampled point cloud obtained in step S1 to train the feature extraction model. Calculate block matching pairs and point matching pairs based on the random rigid transformation applied in step S1, and calculate the final loss function based on the block matching pairs and point matching pairs. After multiple iterations until the loss value is minimized, the feature extraction model with the best performance is finally obtained.

[0011] S4: Input the normal point cloud and the point cloud template into the feature extraction model with the best performance. Based on the extracted features, register and align the normal point cloud to the point cloud template to obtain the coordinates of the registered points in the normal point cloud. Integrate the local rotation invariant features extracted from the normal point cloud with the coordinates of the registered points in the normal point cloud to obtain the final features of the normal point cloud. Establish a normal feature memory bank based on the final features of the normal point cloud.

[0012] S5: In the application phase, i.e. during detection, the test point cloud and the point cloud template are input into the feature extraction model with the best performance. Based on the extracted features, the test point cloud is registered and aligned with the point cloud template to obtain the coordinates of the registered points in the test point cloud. The local rotation invariant features extracted from the test point cloud and the coordinates of the registered points in the test point cloud are integrated to obtain the final features of the test point cloud. By comparing the L2 norm of the difference between the final features of the test point cloud and all features in the normal feature memory, the smallest L2 norm is selected as the anomaly score of the point. Whether the point is abnormal is determined based on whether the anomaly score of the point exceeds a preset threshold, thus realizing point cloud anomaly detection.

[0013] Further, in step S1, a random rigid transformation R is applied to the normal point cloud P to obtain a point cloud template Q. Then, voxel downsampling is performed on P and Q with voxel sizes v1, v2, and v3, respectively, where v3 > v2 > v1, to obtain multi-scale downsampled point clouds {P1, P2, P3} and {Q1, Q2, Q3}, where the number of points in P1, P2, and P3 are respectively... And the points of Q1, Q2, and Q3 are respectively at the same time and

[0014] Furthermore, in step S2, the constructed feature extraction model consists of RIConv++, KPConv-FPN, and Geotransformer. RIConv++ is a rotation-invariant convolutional module, KPConv-FPN is a module combining a core-point convolutional network and a feature pyramid network, and Geotransformer is a geometric self-attention module. First, RIConv++ is used to extract the local rotation-invariant features F of P1 and Q1. P1 and F Q1 Then, KPConv-FPN is used to integrate multi-scale features of the multi-scale downsampled point clouds {P1,P2,P3} and {Q1,Q2,Q3} to extract point registration features F. P2 and F Q2 Simultaneously, Geotransformer is used to extract block registration features F. P3 and F Q3 .

[0015] Furthermore, the specific steps of step S3 are as follows:

[0016] S31: For each point in P1 and Q1, calculate its distance to points in P3 and Q3 respectively. Group the points in P1 and Q1 according to their nearest points in P3 and Q3 respectively, and construct blocks accordingly:

[0017]

[0018] In the formula, This represents the i-th block constructed in P1. Let p1 represent the i'-th block constructed in Q1, and q1 represent the points in P1 and Q1 respectively. Let j be the j-th point in P3. Let be the j'th point in Q3, ||||2 represents the L2 norm, and argmin represents the variable value corresponding to the minimum value;

[0019] for and Its corresponding block registration feature is Fi P3 and according to and The indices of the points in P1 and Q1 corresponding to the points in the given points are obtained. and The corresponding local rotation invariant eigenma matrix F i P1 and and the point registration feature matrix F i P2 and

[0020] S32: For each and Based on the applied rigid transformation R, calculate the overlap rate between each pair of blocks. Block pairs with an overlap rate greater than α are set as block matching pairs M.

[0021]

[0022] In the formula, overlap represents the overlap ratio between two blocks;

[0023] To optimize block registration, overlap-aware circle loss is used for loss calculation, based on the extracted block registration features F. P3 and F Q3 Calculate the distance between each pair of block registration features, and then calculate the block registration loss L by combining the block matching pairs M. OC ;

[0024] S33: Randomly select N from M. g Block matching pairs, for the selected k-th block matching pair Based on the applied rigidity transformation R, calculate the point matching pair D in the selected k-th block matching pair. k :

[0025]

[0026] In the formula, t is the distance threshold for establishing point matching pairs between points;

[0027] For the selected k-th block matching pair The number of midpoints is n k , The number of midpoints is m k Calculate the local feature cost matrix C f,k The feature cost matrix C for point registration p,k :

[0028]

[0029] In the formula, d f Let d be the length of the locally rotation-invariant feature. p C is the length of the point registration feature. f,k and C p,k The dimensions are all (n) k ,m k );

[0030] Then, by adding a new row and column to populate the learnable parameters, the local feature cost matrix C is... f,k The feature cost matrix C for point registration p,k The local feature matching matrix Z is calculated by expanding the matrix separately and using the Sinkhorn algorithm. f,k And point registration feature matching matrix Z p,k Then, negative log-likelihood loss is used to optimize local rotation-invariant feature alignment and point registration. The local feature alignment loss L f for:

[0031]

[0032] In the formula, x is the local feature matching matrix Z. f,k The x-coordinate index, y is the local feature matching matrix Z. f,k The y-axis index, z f,k,(x,y) Z represents the local feature matching matrix f,k The element at position (x, y) in the middle, I k for J is a set of points that do not have matching points. k for The set of points without matching points, the local feature matching matrix Z f,k The dimension is (n k +1,m k +1), and x∈[1,2,...,n k ],y∈[1,2,...,m k ];

[0033] Point registration loss L p for:

[0034]

[0035] In the formula, x` is the point registration feature matching matrix Z. p,k The x-coordinate index, y' is the point registration feature matching matrix Z. p,k The y-axis index, z p,k,(x`,y`) Z represents the feature matching matrix for point registration. p,k The element at position (x`, y`) in the matrix Z is used for point registration feature matching. p,kThe dimension is also (n) k +1,m k +1), and x`∈[1,2,...,n k ],y`∈[1,2,...,m k ];

[0036] S34: The final loss function is:

[0037] loss = L OC +L p +L f .

[0038] Furthermore, the specific steps of step S4 are as follows:

[0039] S41: During the training phase, the point cloud template Q is generated from the normal point cloud P through a random rigid transformation R. In the application phase, the point cloud template Q is a defined normal point cloud, and the same data processing and feature extraction methods are used in the application phase as in the training phase.

[0040] S42: For block registration feature F P3 and F Q3 Calculate the Gaussian correlation matrix S, where each element s i,i` The calculation method is as follows:

[0041]

[0042] In the formula, exp represents an exponential function with the natural constant e as its base;

[0043] Then, a double normalization operation is performed on the Gaussian correlation matrix to obtain matrix S'. The K largest elements in S' are selected, and the block matching relation M' is established based on them:

[0044]

[0045] In the formula, l is the x-coordinate index of matrix S', and l' is the y-coordinate index of matrix S'. This represents the l-th block constructed in P1. Let represent the l-th block constructed in Q1, and topK represent the indices corresponding to the K largest elements in the matrix;

[0046] For the k-th block matching relationship in M` The corresponding point registration feature matching matrix Z p,k` Delete its last row and last column to obtain matrix Z` p,k` Filter the elements and establish point matching relationships D` accordingly:

[0047]

[0048] In the formula, x`` is the matrix Z` p,k` The x-coordinate index, y`` is the matrix Z` p,k` The y-coordinate index, mutual_topK`, represents the index of the element in the matrix that simultaneously satisfies the K` largest values ​​in both the row and column directions. express The x''th point in the middle, express The y''th point in the middle;

[0049] Based on the point matching relationship D`, the RANSAC algorithm is used to estimate the rigid transformation R` from the normal point cloud P1 to the point cloud template Q1. Then, P1 is registered and aligned to the template point cloud Q1 through the rigid transformation R` to obtain the registered point cloud P1`:

[0050] P1` = R`(P1)

[0051] S43: Local rotation-invariant feature F based on P1 P1 Feature integration is performed between the registered point cloud P1' and the feature data. First, F is calculated separately. P1 The standardized parameter λ of P1` f and λ p :

[0052]

[0053] In the formula, F P1 (a) F represents P1 The a-th feature, P1` (a) This represents the coordinates of the a-th point in P1`;

[0054] Subsequently, the local rotation-invariant feature F was analyzed. P1 The registered point cloud P1' is normalized and then stitched together to obtain the final normal point cloud feature F for anomaly detection:

[0055] F=Φ(F P1 / λ f ,P1` / λ p )

[0056] In the formula, Φ represents concatenating two sets of features;

[0057] S44: Using the core set sampling method, sample the final features F of the normal point cloud to establish a normal feature memory B.

[0058] Furthermore, the specific steps of step S5 are as follows:

[0059] S51: Test point cloud P testData processing and feature extraction are performed on the point cloud template Q to obtain the final test point cloud features F used for anomaly detection. test ;

[0060] S52: F test P is calculated by comparing it with the features in the normal feature memory B. test The outlier score at point b in the middle. b The calculation method is as follows:

[0061]

[0062] In the formula, For the final feature F test The b-th feature, f bank These are normal features in the normal feature memory bank B;

[0063] Point-level outlier score b The maximum value is used as the test point cloud P test The overall anomaly score is obtained, and the anomaly score of each point in the point cloud is obtained. Then, the point is judged to be abnormal based on whether the anomaly score of the point exceeds a preset threshold. If it exceeds the preset threshold, the point is judged to be abnormal; otherwise, the point is judged to be normal, thereby realizing point cloud anomaly detection.

[0064] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0065] 1. This invention proposes a technical solution that jointly optimizes the point cloud registration task and the feature learning process. By guiding rotation-invariant feature learning through registration, it effectively overcomes the technical problem of feature inconsistency caused by point cloud rotation due to the use of pre-trained feature extractors in existing methods.

[0066] 2. This invention achieves more accurate point cloud registration results and improves the robustness of point cloud anomaly detection by using multi-scale point cloud processing and feature extraction compared to the registration algorithms used in existing technologies.

[0067] 3. This invention proposes a feature construction method that combines local rotation-invariant features with registered spatial coordinate information. Through standardization and feature fusion, a more discriminative composite feature representation is constructed, which exhibits stronger discriminative ability in point cloud anomaly detection.

[0068] In summary, this invention significantly improves the performance of point cloud anomaly detection while maintaining computational efficiency through registration-guided rotation-invariant feature learning, multi-scale feature processing, and composite feature representation, providing a more effective and reliable solution for point cloud anomaly detection in industrial quality inspection. Attached Figure Description

[0069] Figure 1 This is a framework diagram of the method of the present invention.

[0070] Figure 2 This is a schematic diagram of point cloud downsampling and feature extraction.

[0071] Figure 3 This is a schematic diagram of the point cloud anomaly detection application stage. Detailed Implementation

[0072] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0073] like Figure 1 As shown, this embodiment discloses a point cloud anomaly detection method based on registration-guided rotation-invariant feature learning. It utilizes multi-scale feature processing and composite feature representation to achieve effective and reliable point cloud anomaly detection. The method includes the following steps:

[0074] 1) Obtain a normal point cloud and apply a random rigid transformation (random rotation and translation) to it to obtain a point cloud template. Then, perform multi-scale voxel downsampling on both the normal point cloud and the point cloud template to obtain a multi-scale downsampled point cloud, as detailed below:

[0075] like Figure 2 As shown, a random rigid transformation R is applied to a normal point cloud P to obtain a point cloud template Q. Then, voxel downsampling is performed on P and Q with voxel sizes v1, v2, and v3, respectively, where v3 > v2 > v1, resulting in multi-scale downsampled point clouds {P1, P2, P3} and {Q1, Q2, Q3}, where the number of points in P1, P2, and P3 are respectively... And the points of Q1, Q2, and Q3 are respectively at the same time and

[0076] 2) Build a feature extraction model to extract features from multi-scale downsampled point clouds, extracting local rotation invariant features, point registration features, and block registration features;

[0077] like Figure 2 As shown, the constructed feature extraction model consists of RIConv++, KPConv-FPN, and Geotransformer. RIConv++ is a rotation-invariant convolutional module, KPConv-FPN is a combination of a core-point convolutional network and a feature pyramid network, and Geotransformer is a geometric self-attention module. RIConv++ is first used to extract the local rotation-invariant features F of P1 and Q1. P1 and F Q1Then, KPConv-FPN is used to integrate multi-scale features of the multi-scale downsampled point clouds {P1,P2,P3} and {Q1,Q2,Q3} to extract point registration features F. P2 and F Q2 Simultaneously, Geotransformer is used to extract block registration features F. P3 and F Q3 .

[0078] 3) Train the feature extraction model using the multi-scale downsampled point cloud obtained in step 1). Calculate block matching pairs and point matching pairs based on the random rigid transformation applied in step S1, and calculate the final loss function based on the block matching pairs and point matching pairs. After multiple iterations until the loss value is minimized, the feature extraction model with optimal performance is finally obtained. The specific operation steps are as follows:

[0079] 31) For each point in P1 and Q1, calculate its distance to points in P3 and Q3 respectively. Group the points in P1 and Q1 according to their nearest points in P3 and Q3 respectively, and construct blocks accordingly:

[0080]

[0081] In the formula, This represents the i-th block constructed in P1. Let p1 represent the i'-th block constructed in Q1, and q1 represent the points in P1 and Q1 respectively. Let j be the j-th point in P3. Let be the j'th point in Q3, || ||2 represents the L2 norm, and argmin represents the variable value corresponding to the minimum value;

[0082] for and Its corresponding block registration feature is F i P3 and according to and The indices of the points in P1 and Q1 corresponding to the points in the given points are obtained. and The corresponding local rotation invariant eigenma matrix F i P1 and and the point registration feature matrix F i P2 and

[0083] 32) For each and Based on the applied rigid transformation R, calculate the overlap rate between each pair of blocks. Block pairs with an overlap rate greater than α are set as block matching pairs M.

[0084]

[0085] In the formula, overlap represents the overlap ratio between two blocks;

[0086] To optimize block registration, overlap-aware circle loss is used for loss calculation, based on the extracted block registration features F. P3 and F Q3 Calculate the distance between each pair of block registration features, and then calculate the block registration loss L by combining the block matching pairs M. OC ;

[0087] 33) Randomly select N from M g Block matching pairs, for the selected k-th block matching pair Based on the applied rigidity transformation R, calculate the point matching pair D in the selected k-th block matching pair. k :

[0088]

[0089] In the formula, t is the distance threshold for establishing point matching pairs between points;

[0090] For the selected k-th block matching pair The number of midpoints is n k , The number of midpoints is m k Calculate the local feature cost matrix C f,k The feature cost matrix C for point registration p,k :

[0091]

[0092]

[0093] In the formula, d f Let d be the length of the locally rotation-invariant feature. p C is the length of the point registration feature. f,k and C p,k The dimensions are all (n) k ,m k );

[0094] Then, by adding a new row and column to populate the learnable parameters, the local feature cost matrix C is... f,k The feature cost matrix C for point registration p,k The local feature matching matrix Z is calculated by expanding the matrix separately and using the Sinkhorn algorithm. f,kAnd point registration feature matching matrix Z p,k Then, negative log-likelihood loss is used to optimize local rotation-invariant feature alignment and point registration. The local feature alignment loss L f for:

[0095]

[0096] In the formula, x is the local feature matching matrix Z. f,k The x-coordinate index, y is the local feature matching matrix Z. f,k The y-axis index, z f,k,(x,y) Z represents the local feature matching matrix f,k The element at position (x, y) in the middle, I k for J is a set of points that have no matching points. k for The set of points without matching points, the local feature matching matrix Z f,k The dimension is (n k +1,m k +1), and x∈[1,2,...,n k ],y∈[1,2,...,m k ];

[0097] Point registration loss L p for:

[0098]

[0099] In the formula, x` is the point registration feature matching matrix Z. p,k The x-coordinate index, y' is the point registration feature matching matrix Z. p,k The y-axis index, z p,k,(x`,y`) Z represents the feature matching matrix for point registration. p,k The element at position (x`, y`) in the matrix Z is used for point registration feature matching. p,k The dimension is also (n) k +1,m k +1), and x`∈[1,2,...,n k ],y`∈[1,2,...,m k ];

[0100] 34) The final loss function is:

[0101] loss = L OC +L p +L f

[0102] 4) such as Figure 3As shown, the normal point cloud and the point cloud template are input into the feature extraction model with the best performance. Based on the extracted features, the normal point cloud is registered and aligned to the point cloud template to obtain the coordinates of the registered points. The local rotation-invariant features extracted from the normal point cloud and the coordinates of the registered points are integrated to obtain the final features of the normal point cloud. A normal feature memory is then established based on the final features of the normal point cloud. The specific operation steps are as follows:

[0103] 4.1) During the training phase, the point cloud template Q is generated from the normal point cloud P through a random rigid transformation R. In the application phase, the point cloud template Q is a defined normal point cloud, and the same data processing and feature extraction methods are used in the application phase as in the training phase.

[0104] 4.2) For block registration feature F P3 and F Q3 Calculate the Gaussian correlation matrix S, where each element s i,i` The calculation method is as follows:

[0105]

[0106] In the formula, exp represents an exponential function with the natural constant e as its base;

[0107] Then, a double normalization operation is performed on the Gaussian correlation matrix to obtain S'. The K largest elements in S' are selected, and the block matching relation M' is established accordingly.

[0108]

[0109] In the formula, l is the x-coordinate index of matrix S', and l' is the y-coordinate index of matrix S'. This represents the l-th block constructed in P1. Let represent the l-th block constructed in Q1, and topK represent the indices corresponding to the K largest elements in the matrix;

[0110] For the k-th block matching relationship in M` The corresponding point registration feature matching matrix Z p,k` Delete its last row and last column to obtain matrix Z` p,k` Filter the elements and establish point matching relationships D` accordingly:

[0111]

[0112]

[0113] In the formula, x`` is the matrix Z` p,k` The x-coordinate index, y`` is the matrix Z` p,k`The y-coordinate index, mutual_topK`, represents the index of the element in the matrix that simultaneously satisfies the K` largest values ​​in both the row and column directions. express The x''th point in the middle, express The y''th point in the middle;

[0114] Based on the point matching relationship D`, the RANSAC algorithm is used to estimate the rigid transformation R` from the normal point cloud P1 to the point cloud template Q1. Then, P1 is registered and aligned to the template point cloud Q1 through the rigid transformation R` to obtain the registered point cloud P1`:

[0115] P1` = R`(P1)

[0116] 4.3) Local rotation-invariant feature F based on P1 P1 Feature integration is performed between the registered point cloud P1' and the feature data. First, F is calculated separately. P1 The standardized parameter λ of P1` f and λ p :

[0117]

[0118] In the formula, F P1 (a) F represents P1 The a-th feature, P1` (a) This represents the coordinates of the a-th point in P1`;

[0119] Subsequently, the local rotation-invariant feature F was analyzed. P1 The registered point cloud P1' is normalized and then stitched together to obtain the final normal point cloud feature F for anomaly detection:

[0120] F=Φ(F P1 / λ f ,P1` / λ p )

[0121] In the formula, Φ represents splicing two sets of features together.

[0122] 4.4) Using the core set sampling method, the final features F of the normal point cloud are sampled to establish a normal feature memory B.

[0123] 5) such as Figure 3As shown, in the application phase, i.e., during detection, the test point cloud and point cloud template are input into the feature extraction model with the best performance. Based on the extracted features, the test point cloud is registered and aligned to the point cloud template to obtain the coordinates of the registered points. The locally rotation-invariant features extracted from the test point cloud and the coordinates of the registered points are integrated to obtain the final features of the test point cloud. By comparing the L2 norm of the differences between the final features of the test point cloud and all features in the normal feature memory, the smallest L2 norm is selected as the anomaly score of that point. Whether the point is abnormal is determined based on whether the anomaly score exceeds a preset threshold, thus realizing point cloud anomaly detection. The specific operation steps are as follows:

[0124] 51) Test point cloud P test Data processing and feature extraction are performed on the point cloud template Q to obtain the final test point cloud features F used for anomaly detection. test ;

[0125] 52) F test P is calculated by comparing it with the features in the normal feature memory B. test The outlier score at point b in the middle. b The calculation method is as follows:

[0126]

[0127] In the formula, For the final feature F test The b-th feature, f bank These are normal features in the normal feature memory bank B;

[0128] Point-level outlier score b The maximum value is used as the test point cloud P test The overall anomaly score is obtained, and the anomaly score of each point in the point cloud is obtained. Then, the point is judged to be abnormal based on whether the anomaly score of the point exceeds a preset threshold. If it exceeds the preset threshold, the point is judged to be abnormal; otherwise, the point is judged to be normal, thus realizing point cloud anomaly detection.

[0129] Anomaly-ShapeNet is a synthetic point cloud anomaly detection dataset containing 1600 samples across 40 categories. Four normal point clouds are provided for each category for training, while artificially synthesized anomaly point clouds are used to comprehensively evaluate algorithm performance. Real3D-AD is a high-precision real-world industrial point cloud anomaly detection dataset containing 12 categories of common industrial products, with four normal point clouds and 100 test point clouds provided for each category. In the experiments, the model was trained using the normal point clouds provided in the datasets during the training phase, and a normal feature memory was built during the application phase to perform anomaly detection on the test point clouds.

[0130] This experiment uses the area under the ROC curve, or AUROC, as the evaluation criterion; a larger AUROC value indicates better point cloud anomaly detection. Point-level anomaly scores are used to calculate the point-level AUROC, or P-AUROC. Overall anomaly scores are used to calculate the sample-level AUROC, or O-AUROC.

[0131] To verify the effectiveness of the method of this invention, P-AUROC and O-AUROC were used as evaluation criteria. The method was compared with BTF, M3DM, CPMF, Reg3D-AD and ISMP on two commonly used datasets, Anomaly-ShapeNet and Real3D-AD. The experimental results are shown in Table 1.

[0132] Table 1. Analysis of Experimental Results

[0133]

[0134] Experimental results fully demonstrate the effectiveness of the method of this invention. By learning rotation-invariant features guided by registration, the method effectively overcomes the technical problem of feature inconsistency caused by point cloud rotation due to the use of pre-trained feature extractors in existing methods. Furthermore, through multi-scale point cloud processing and feature extraction, it achieves more accurate point cloud registration results compared to existing registration algorithms, improving the robustness of point cloud anomaly detection. Moreover, the feature construction method combining local rotation-invariant features with registered spatial coordinate information, through standardization and feature fusion, constructs a more discriminative composite feature representation, exhibiting stronger discriminative ability in point cloud anomaly detection. Through these steps, the performance of point cloud anomaly detection is significantly improved, providing a more effective and reliable solution for point cloud anomaly detection in industrial quality inspection.

[0135] Experimental Conclusions: To address the detection bias issues caused by rotational variations and insufficient feature representation capabilities in existing algorithms, this invention proposes a point cloud anomaly detection method based on registration-guided rotation-invariant feature learning. Experimental evaluations on two publicly available point cloud anomaly detection datasets, Anomaly-ShapeNet and Real3D-AD, demonstrate that the proposed method significantly improves point cloud anomaly detection performance, outperforming existing methods.

[0136] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A point cloud anomaly detection method based on registration-guided rotation-invariant feature learning, characterized in that, Includes the following steps: S1: Obtain a normal point cloud and apply a random rigid transformation to the normal point cloud, i.e., perform random rotation and translation to obtain a point cloud template. Then, perform multi-scale voxel downsampling on the normal point cloud and the point cloud template to obtain a multi-scale downsampled point cloud. S2: Build a feature extraction model to extract features from multi-scale downsampled point clouds, extracting local rotation invariant features, point registration features, and block registration features; S3: Use the multi-scale downsampled point cloud obtained in step S1 to train the feature extraction model. Calculate block matching pairs and point matching pairs based on the random rigid transformation applied in step S1, and calculate the final loss function based on the block matching pairs and point matching pairs. After multiple iterations until the loss value is minimized, the feature extraction model with the best performance is finally obtained. S4: Input the normal point cloud and the point cloud template into the feature extraction model with the best performance. Based on the extracted features, register and align the normal point cloud to the point cloud template to obtain the coordinates of the registered points in the normal point cloud. Integrate the local rotation invariant features extracted from the normal point cloud with the coordinates of the registered points in the normal point cloud to obtain the final features of the normal point cloud. Establish a normal feature memory bank based on the final features of the normal point cloud. S5: In the application phase, i.e. during detection, the test point cloud and the point cloud template are input into the feature extraction model with the best performance. Based on the extracted features, the test point cloud is registered and aligned with the point cloud template to obtain the coordinates of the registered points in the test point cloud. The local rotation invariant features extracted from the test point cloud and the coordinates of the registered points in the test point cloud are integrated to obtain the final features of the test point cloud. By comparing the L2 norm of the difference between the final features of the test point cloud and all features in the normal feature memory, the smallest L2 norm is selected as the anomaly score of the point. Whether the point is abnormal is determined based on whether the anomaly score of the point exceeds a preset threshold, thus realizing point cloud anomaly detection.

2. The point cloud anomaly detection method based on registration-guided rotation-invariant feature learning according to claim 1, characterized in that, In step S1, a random rigid transformation R is applied to the normal point cloud P to obtain a point cloud template Q. Then, voxel downsampling is performed on P and Q with voxel sizes v1, v2, and v3, respectively, where v3 > v2 > v1, to obtain multi-scale downsampled point clouds {P1, P2, P3} and {Q1, Q2, Q3}, where the number of points in P1, P2, and P3 are respectively... And the points of Q1, Q2, and Q3 are respectively at the same time and 3. The point cloud anomaly detection method based on registration-guided rotation-invariant feature learning according to claim 2, characterized in that, In step S2, the constructed feature extraction model consists of RIConv++, KPConv-FPN, and Geotransformer. RIConv++ is a rotation-invariant convolutional module, KPConv-FPN is a module combining a core-point convolutional network and a feature pyramid network, and Geotransformer is a geometric self-attention module. RIConv++ is first used to extract the local rotation-invariant features F of P1 and Q1. P1 and F Q1 Then, KPConv-FPN is used to integrate multi-scale features of the multi-scale downsampled point clouds {P1,P2,P3} and {Q1,Q2,Q3} to extract point registration features F. P2 and F Q2 Simultaneously, Geotransformer is used to extract block registration features F. P3 and F Q3 .

4. The point cloud anomaly detection method based on registration-guided rotation-invariant feature learning according to claim 3, characterized in that, The specific steps for step S3 are as follows: S31: For each point in P1 and Q1, calculate its distance to points in P3 and Q3 respectively. Group the points in P1 and Q1 according to their nearest points in P3 and Q3 respectively, and construct blocks accordingly: In the formula, This represents the i-th block constructed in P1. Let p1 represent the i'-th block constructed in Q1, and q1 represent the points in P1 and Q1 respectively. Let j be the j-th point in P3. Let be the j'th point in Q3, ||||2 represents the L2 norm, and argmin represents the variable value corresponding to the minimum value; for and Its corresponding block registration feature is and according to and The indices of the points in P1 and Q1 corresponding to the points in the given points are obtained. and The corresponding local rotation invariant eigenma and and point registration feature matrix and S32: For each and Based on the applied rigid transformation R, calculate the overlap rate between each pair of blocks. Block pairs with an overlap rate greater than α are set as block matching pairs M. In the formula, overlap represents the overlap ratio between two blocks; To optimize block registration, overlap-aware circle loss is used for loss calculation, based on the extracted block registration features F. P3 and F Q3 Calculate the distance between each pair of block registration features, and then calculate the block registration loss L by combining the block matching pairs M. OC ; S33: Randomly select N from M. g Block matching pairs, for the selected k-th block matching pair Based on the applied rigidity transformation R, calculate the point matching pair D in the selected k-th block matching pair. k : In the formula, t is the distance threshold for establishing point matching pairs between points; For the selected k-th block matching pair The number of midpoints is n k , The number of midpoints is m k Calculate the local feature cost matrix C f,k The feature cost matrix C for point registration p,k : In the formula, d f Let d be the length of the locally rotation-invariant feature. p C is the length of the point registration feature. f,k and C p,k The dimensions are all (n) k ,m k ); Then, by adding a new row and column to populate the learnable parameters, the local feature cost matrix C is... f,k The feature cost matrix C for point registration p,k The local feature matching matrix Z is calculated by expanding the matrix separately and using the Sinkhorn algorithm. f,k And point registration feature matching matrix Z p,k Then, negative log-likelihood loss is used to optimize local rotation-invariant feature alignment and point registration. The local feature alignment loss L f for: In the formula, x is the local feature matching matrix Z. f,k The x-coordinate index, y is the local feature matching matrix Z. f,k The y-axis index, z f,k,(x,y) Z represents the local feature matching matrix f,k The element at position (x, y) in the middle, I k for J is a set of points that do not have matching points. k for The set of points without matching points, the local feature matching matrix Z f,k The dimension is (n k +1,m k +1), and x∈[1,2,...,n k ],y∈[1,2,...,m k ]; Point registration loss L p for: In the formula, x` is the point registration feature matching matrix Z. p,k The x-coordinate index, y' is the point registration feature matching matrix Z. p,k The y-axis index, z p,k,(x`,y`) Z represents the feature matching matrix for point registration. p,k The element at position (x`, y`) in the matrix Z is used for point registration feature matching. p,k The dimension is also (n) k +1,m k +1), and x`∈[1,2,...,n k ],y`∈[1,2,...,m k ]; S34: The final loss function is: loss=L OC +L p +L f 。 5. The point cloud anomaly detection method based on registration-guided rotation-invariant feature learning according to claim 4, characterized in that, The specific steps for step S4 are as follows: S41: During the training phase, the point cloud template Q is generated from the normal point cloud P through a random rigid transformation R. In the application phase, the point cloud template Q is a defined normal point cloud, and the same data processing and feature extraction methods are used in the application phase as in the training phase. S42: For block registration feature F P3 and F Q3 Calculate the Gaussian correlation matrix S, where each element s i,i` The calculation method is as follows: In the formula, exp represents an exponential function with the natural constant e as its base; Then, a double normalization operation is performed on the Gaussian correlation matrix to obtain matrix S'. The K largest elements in S' are selected, and the block matching relation M' is established based on them: In the formula, l is the x-coordinate index of matrix S', and l' is the y-coordinate index of matrix S'. This represents the l-th block constructed in P1. Let represent the l-th block constructed in Q1, and topK represent the indices corresponding to the K largest elements in the matrix; For the k-th block matching relationship in M` The corresponding point registration feature matching matrix Z p,k` Delete its last row and last column to obtain matrix Z` p,k` Filter the elements and establish point matching relationships D` accordingly: In the formula, x`` is the matrix Z` p,k` The x-coordinate index, y`` is the matrix Z` p,k` The y-coordinate index, mutual_topK`, represents the index of the element in the matrix that simultaneously satisfies the K` largest values ​​in both the row and column directions. express The x''th point in the middle, express The y''th point in the middle; Based on the point matching relationship D`, the RANSAC algorithm is used to estimate the rigid transformation R` from the normal point cloud P1 to the point cloud template Q1. Then, P1 is registered and aligned to the template point cloud Q1 through the rigid transformation R` to obtain the registered point cloud P1`: P1` = R`(P1) S43: Local rotation-invariant feature F based on P1 P1 Feature integration is performed between the registered point cloud P1' and the feature data. First, F is calculated separately. P1 The standardized parameter λ of P1` f and λ p : In the formula, F P1 (a) F represents P1 The a-th feature, P1` (a) This represents the coordinates of the a-th point in P1`; Subsequently, the local rotation-invariant feature F was analyzed. P1 The registered point cloud P1' is normalized and then stitched together to obtain the final normal point cloud feature F for anomaly detection: F=Φ(F P1 / l f ,P1` / l p ) In the formula, Φ represents concatenating two sets of features; S44: Using the core set sampling method, sample the final features F of the normal point cloud to establish a normal feature memory B.

6. The point cloud anomaly detection method based on registration-guided rotation-invariant feature learning according to claim 5, characterized in that, The specific steps for step S5 are as follows: S51: Test point cloud P test Data processing and feature extraction are performed on the point cloud template Q to obtain the final test point cloud features F used for anomaly detection. test ; S52: F test P is calculated by comparing it with the features in the normal feature memory B. test The outlier score at point b in the middle. b The calculation method is as follows: In the formula, For the final feature F test The b-th feature, f bank These are normal features in the normal feature memory bank B; Point-level outlier score b The maximum value is used as the test point cloud P test The overall anomaly score is obtained, and the anomaly score of each point in the point cloud is obtained. Then, the point is judged to be abnormal based on whether the anomaly score of the point exceeds a preset threshold. If it exceeds the preset threshold, the point is judged to be abnormal; otherwise, the point is judged to be normal, thereby realizing point cloud anomaly detection.

Citation Information

Cited By

  • Cross-scale point cloud defect recognition method based on small sample learning

    CN122530208A