A method, device, and medium for training and applying a 3D point cloud data segmentation model.

By combining implicit fitting modules with segmentation and clustering modules, the problem of insufficient generalization ability of 3D point cloud data segmentation models when facing diverse geometric primitive types is solved, achieving higher accuracy and robustness, and effectively constructing 3D CAD models.

CN121482066BActive Publication Date: 2026-04-03BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-09
Publication Date
2026-04-03

Smart Images

  • Figure CN121482066B_ABST
    Figure CN121482066B_ABST
Patent Text Reader

Abstract

This application discloses a method, device, and medium for training and applying a 3D point cloud data segmentation model, relating to the field of 3D point cloud data segmentation technology. The method includes: constructing an implicit fitting module; for each type of geometric primitive, obtaining a first dataset corresponding to that geometric primitive type; training the implicit fitting module using the first dataset to obtain a post-trained implicit fitting module corresponding to the geometric primitive type; combining the segmentation module, clustering module, and the post-trained implicit fitting module corresponding to each type of geometric primitive into an initial 3D point cloud data segmentation model; training the initial 3D point cloud data segmentation model to obtain a 3D point cloud data segmentation model; and using the 3D point cloud data segmentation model to complete 3D point cloud data segmentation. This application introduces primitive geometric loss information by using post-trained implicit fitting modules with the same structure but different parameters, thereby improving the accuracy and robustness of the 3D point cloud data segmentation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of 3D point cloud data segmentation technology, and in particular to a method, device and medium for training and applying a 3D point cloud data segmentation model. Background Technology

[0002] In fields such as reverse engineering, digital twin systems, and computer-aided design (CAD), structuring unstructured 3D point cloud data and converting it into a 3D CAD model is a fundamental yet challenging task. 3D CAD models are typically modeled using boundary representation (B-Rep), which defines the shape of a 3D object by explicitly representing its boundaries. It decomposes the surface of a 3D object into a series of faces, edges, and vertices, and describes the shape and topology of the 3D object through the set of these geometric elements. In other words, this modeling method breaks down the overall shape of the 3D CAD model into several smoothly connected surface segments, each corresponding to a specific geometric primitive type (primitive surface, such as a plane, cylinder, or cone). Furthermore, B-Rep representation contains rich topological information, describing the hierarchical relationships between geometric elements such as faces, loops, edges, and points in the 3D CAD model. This representation not only ensures the structural consistency of the 3D CAD model but also provides excellent support for subsequent editing and modification.

[0003] Since raw 3D point cloud data is essentially disordered and lacks topological structure, consisting of discrete sampled points and explicit face and edge information, directly recovering a structured 3D CAD model that meets the requirements of B-Rep representation is an extremely challenging task. In this process, dividing the 3D point cloud data into several spatially coherent regions with consistent geometric attributes (i.e., geometric primitive types) (i.e., geometric primitive instances), and fitting each region with a parameterized fitted geometric primitive, is a key step in constructing the B-Rep representation. This geometric primitive-based segmentation method not only effectively captures the local geometric structure of 3D objects but also provides a clear and controllable foundation for subsequent topological reconstruction and parametric modeling.

[0004] Compared to traditional semantic or instance segmentation methods, geometric primitive-based segmentation offers a more compact, interpretable, and easily editable way of abstracting 3D geometry, enabling direct integration with the structural features of 3D CAD models. Furthermore, geometric primitive-based segmentation can uniformly represent diverse shapes without relying on specific semantic labels, making it particularly suitable for structural modeling tasks in manufacturing scenarios.

[0005] However, segmentation based on geometric primitives still faces challenges: there is no fixed and complete set of geometric primitives in reality, which makes it difficult for the model to generalize when faced with diverse or even unseen geometric primitive types. Summary of the Invention

[0006] The purpose of this application is to provide a method, device, and medium for training and applying a 3D point cloud data segmentation model, which can improve the generalization ability of the 3D point cloud data segmentation model.

[0007] To achieve the above objectives, this application provides the following solution.

[0008] In a first aspect, this application provides a method for training a three-dimensional point cloud data segmentation model, which includes the following steps.

[0009] An implicit fitting module is constructed; the implicit fitting module includes an encoder and a decoder connected in sequence. The encoder includes a PointNet++ backbone network and a first splicing layer. The input and output of the PointNet++ backbone network are both connected to the input of the first splicing layer. The decoder includes several decoding blocks connected in sequence. Each decoding block includes a first MLP model and a SoftPlus activation function layer connected in sequence. The input of the first MLP model of the first decoding block is connected to the output of the first splicing layer.

[0010] For each type of geometric primitive, a first dataset corresponding to the geometric primitive type is obtained, and the implicit fitting module is trained using the first dataset to obtain the trained implicit fitting module corresponding to the geometric primitive type; the first dataset includes the sample three-dimensional coordinates of each first sample point in the sample surface, and the type of the sample surface is the same as the geometric primitive type.

[0011] The initial 3D point cloud data segmentation model is composed of a segmentation module, a clustering module, and a trained implicit fitting module corresponding to each of the geometric primitive types. The output of the segmentation module is connected to the input of the clustering module, and the output of the clustering module is connected to the input of the trained implicit fitting module corresponding to each of the geometric primitive types.

[0012] The initial 3D point cloud data segmentation model is trained to obtain a 3D point cloud data segmentation model.

[0013] Secondly, this application provides a method for applying a three-dimensional point cloud data segmentation model, which includes the following steps.

[0014] Using the 3D coordinates of each point in the 3D point cloud data as input, the enhanced instance features, direction vector, and geometric primitive type of each point in the 3D point cloud data are determined by the post-training segmentation module in the 3D point cloud data segmentation model; the 3D point cloud data segmentation model is a model trained using the above-mentioned 3D point cloud data segmentation model training method.

[0015] Using the enhanced instance features, orientation vector, and geometric primitive type of each point in the 3D point cloud data as input, the clustering module in the 3D point cloud data segmentation model is used to determine multiple geometric primitive instances in the 3D point cloud data.

[0016] For each geometric primitive instance, the geometric primitive instance is used as input, and the trained implicit fitting module with the same geometric primitive type as the geometric primitive instance in the 3D point cloud data segmentation model is used to fit the geometric primitive instance to obtain the fitted geometric primitive.

[0017] The Marching Cubes algorithm is used to reconstruct each of the fitted geometric primitives to obtain a three-dimensional model.

[0018] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the above-described three-dimensional point cloud data segmentation model training method or the above-described three-dimensional point cloud data segmentation model application method.

[0019] Fourthly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described three-dimensional point cloud data segmentation model training method or the above-described three-dimensional point cloud data segmentation model application method.

[0020] According to the specific embodiments provided in this application, this application has the following technical effects.

[0021] This application provides a method, device, and medium for training and applying a 3D point cloud data segmentation model. Addressing the problem that a fixed and complete set of geometric primitives does not exist in reality, and that different methods are often used for fitting different geometric primitive types, making it difficult for the model to generalize when faced with diverse or even unseen geometric primitive types, this application constructs an implicit fitting module. For each geometric primitive type, a first dataset corresponding to that type is obtained, and the implicit fitting module is trained using this first dataset to obtain a trained implicit fitting module corresponding to that geometric primitive type. This allows for the use of trained implicit fitting modules with the same structure but different parameters to fit each type of geometric primitive. To improve generalization ability, the model is fitted with different types of geometric primitives. Subsequently, the segmentation module, clustering module, and the trained implicit fitting module corresponding to each type of geometric primitive are combined to form an initial 3D point cloud data segmentation model. This initial model is then trained to obtain a 3D point cloud data segmentation model, which is used to perform 3D point cloud data segmentation. Because trained implicit fitting modules with the same structure but different parameters are used to fit each type of geometric primitive, the generalization ability of the 3D point cloud data segmentation model is improved. Furthermore, the introduction of primitive geometric loss information enhances the accuracy and robustness of the 3D point cloud data segmentation model. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is an application environment diagram for a three-dimensional point cloud data segmentation model training method provided in Embodiment 1 of this application.

[0024] Figure 2 This is a flowchart illustrating a three-dimensional point cloud data segmentation model training method provided in Embodiment 1 of this application.

[0025] Figure 3 This is a schematic diagram of the structure of the three-dimensional point cloud data segmentation model provided in Embodiment 1 of this application.

[0026] Figure 4 This is a schematic diagram of the implicit fitting module provided in Embodiment 1 of this application.

[0027] Figure 5 This is a flowchart illustrating the application method of the three-dimensional point cloud data segmentation model provided in Embodiment 2 of this application.

[0028] Figure 6This is a schematic diagram of the geometric primitive instance segmentation results of different methods provided in Embodiment 2 of this application.

[0029] Figure 7 This is a schematic diagram of the robustness experiment visualization results provided in Embodiment 2 of this application.

[0030] Figure 8 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of this application. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0032] Example 1.

[0033] The 3D point cloud data segmentation model training method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown illustrates this. The terminal communicates with the server via a network. A data storage system stores the data the server needs to process. This system can be set up independently, integrated into the server, or located in the cloud or on another server. The terminal can send training requests to the server. Upon receiving the request, the server constructs an implicit fitting module. For each geometric primitive type, it obtains the first dataset corresponding to that type and uses it to train the implicit fitting module, resulting in a post-trained implicit fitting module for that geometric primitive type. The segmentation module, clustering module, and the post-trained implicit fitting module for each geometric primitive type are combined to form an initial 3D point cloud data segmentation model. This initial model is then trained to obtain a 3D point cloud data segmentation model. The server can then feed back the training result—the 3D point cloud data segmentation model for the training request—to the terminal.

[0034] In addition, in some embodiments, the training method for the 3D point cloud data segmentation model can also be implemented by a server or a terminal. For example, the terminal can directly process the training request to be processed, or the server can obtain the training request to be processed from the data storage system and process it.

[0035] In one exemplary embodiment, such as Figure 2As shown, a method for training a 3D point cloud data segmentation model is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 The following steps are used as an example of a server in the example.

[0036] Step S1: Construct an implicit fitting module; the implicit fitting module includes an encoder and a decoder connected in sequence. The encoder includes a PointNet++ backbone network and a first splicing layer. The input and output of the PointNet++ backbone network are both connected to the input of the first splicing layer. The decoder includes several decoding blocks connected in sequence. Each decoding block includes a first MLP model and a SoftPlus activation function layer connected in sequence. The input of the first MLP model of the first decoding block is connected to the output of the first splicing layer.

[0037] Step S2: For each type of geometric primitive, obtain the first dataset corresponding to the geometric primitive type, and use the first dataset to train the implicit fitting module to obtain the trained implicit fitting module corresponding to the geometric primitive type; the first dataset includes the sample three-dimensional coordinates of each first sample point in the sample surface, and the type of the sample surface is the same as the geometric primitive type.

[0038] Step S3: The segmentation module, the clustering module, and the trained implicit fitting module corresponding to each of the geometric primitive types are combined to form an initial 3D point cloud data segmentation model; the output of the segmentation module is connected to the input of the clustering module, and the output of the clustering module is connected to the input of the trained implicit fitting module corresponding to each of the geometric primitive types.

[0039] Step S4: Train the initial 3D point cloud data segmentation model to obtain a 3D point cloud data segmentation model.

[0040] By implementing steps S1 to S4 above, this embodiment constructs the same implicit fitting module for each type of geometric primitive. The implicit fitting module is trained using the first dataset corresponding to each type of geometric primitive, resulting in a trained implicit fitting module for each type of geometric primitive. Thus, the trained implicit fitting module with the same structure but different network parameters is used to fit each type of geometric primitive, enabling the model to generalize when faced with diverse or even unseen geometric primitive types, thereby improving the model's generalization ability. In other words, this embodiment proposes a geometric primitive fitting network (i.e., implicit fitting module) based on implicit shape representation to address the challenge of geometric primitive type generalization. Unlike previous methods that designed different fitting algorithms for different geometric primitive types, this embodiment uniformly handles various geometric primitive types in terms of structure, improving the model's expressive power and robustness. The initial 3D point cloud data segmentation model is further constructed by combining the segmentation and clustering modules. The initial 3D point cloud data segmentation model is then trained to obtain a 3D point cloud data segmentation model. This is equivalent to providing a 3D point cloud data segmentation model based on implicit primitive fitting (expressing and fitting geometric shapes through implicit functions). Subsequently, the 3D point cloud data segmentation model is used to complete the 3D point cloud data segmentation and construct a 3D CAD model that conforms to B-Rep representation.

[0041] This embodiment introduces a point cloud segmentation task based on geometric primitives. Its goal is to divide the point cloud into several spatially coherent regions, each of which can be accurately fitted using a parameterized geometric primitive. The following, combined with... Figure 3 The network structure of the 3D point cloud data segmentation model used in this embodiment is described below. Figure 3 middle, For instance truth value, For instance prediction, this embodiment proposes a 3D point cloud data segmentation model called IPFNet, which consists of three key modules: a Decomposition Module, a Cluster Module, and an Implicit Primitive Fitting Module. The number of implicit fitting modules is the same as the number of geometric primitive types, with one implicit fitting module corresponding to each geometric primitive type. Given a 3D point cloud dataset containing 3D coordinates but with or without normal vectors... , 3D point cloud data The first in One point, If the space is the real number space and contains only three-dimensional coordinates, then If it contains both three-dimensional coordinates and normal vectors, then , The number of points in the 3D point cloud data. The goal of the 3D point cloud data segmentation model designed in this embodiment is to effectively group points belonging to the same geometric primitive type and further fit their corresponding geometric representations to obtain fitted geometric primitives. Specifically, the segmentation module determines the enhanced instance features, direction vector, and geometric primitive type of each point in the 3D point cloud data. Based on the output of the segmentation module, the clustering module determines multiple geometric primitive instances in the 3D point cloud data. For each geometric primitive instance, the implicit fitting module trained with the same geometric primitive type as the geometric primitive instance is used to fit the geometric primitive instance to obtain the fitted geometric primitive.

[0042] The following section provides a detailed introduction to each module, and then describes the specific steps of the entire workflow of the 3D point cloud data segmentation model.

[0043] (a) Segmentation module.

[0044] The segmentation module is used to perform feature extraction and geometric primitive type determination. In the feature extraction and geometric primitive type determination stages, the segmentation module first extracts the instance features of each point from the 3D point cloud data. and semantic features Then, for instance features and semantic features Perform bidirectional augmentation to obtain the augmented instance features for each point. and enhanced semantic features Finally, based on instance features Generate the direction vector for each point. Based on enhanced semantic features The geometric primitive type of each point is determined. The enhanced instance features, direction vector, and geometric primitive type are then calculated using instance loss. Directional loss and classification loss Optimize the points to enhance their structural representation capabilities.

[0045] In this embodiment, the segmentation module includes a feature extraction unit, a first fusion unit, a second fusion unit, a direction mapping unit, and a type determination unit.

[0046] (1) Extracting instance features and semantic features Feature extraction unit.

[0047] This embodiment designs a shared encoder based on stacked EdgeConv layers (Edge Convolutional Layers, a type of convolutional layer used in graph neural networks, particularly suitable for processing graph-structured data, updating node feature representations by aggregating information from neighboring nodes). The shared encoder employs a DGCNN (Dynamic Graph Convolutional Neural Network) model for point-by-point feature extraction. Specifically, it uses a DGCNN model consisting of three EdgeConv layers (which can also be replaced with other numbers of layers) to process the input 3D point cloud data. To process, The value is 3 or 6, representing either 3D coordinates or 3D coordinates and a normal vector, to obtain the normalized point feature embedding. This is then projected onto the unit hypersphere. Subsequently, point feature embeddings, including the features of each point, are performed. The features are further divided into instance features of each point. and semantic features Instance features and semantic features We will then input two branches for further learning.

[0048] In this embodiment, the feature extraction unit is used to extract the instance features and semantic features of each point in the three-dimensional point cloud data.

[0049] The feature extraction unit includes a DGCNN model, a second MLP model, and a third MLP model. The output of the DGCNN model is connected to the input of the second MLP model and the input of the third MLP model, respectively. The DGCNN model is used to output the features of each point in the 3D point cloud data, the second MLP model is used to output the instance features of each point in the 3D point cloud data, and the third MLP model is used to output the semantic features of each point in the 3D point cloud data.

[0050] (2) The first fusion unit and the second fusion unit are enhanced bidirectionally.

[0051] This embodiment designs a bidirectional fusion module (i.e., the first fusion unit and the second fusion unit) that enhances instance features and semantic features in both directions, in order to further improve the representation effect.

[0052] To enhance the consistency of semantic features for the same instance, this embodiment modifies the semantic features. The process involves applying a pointwise fully connected layer (FC layer) and performing a non-linear transformation using a batch normalization layer (BatchNorm layer) and a ReLU activation function layer. The resulting processed semantic features are then compared with instance features. The features are added together using an additive layer, and then fed into an MLP model for fusion to obtain the final enhanced instance features. Enhanced instance features The calculation formula is as follows (1).

[0053] (1).

[0054] In equation (1), Represents the MLP model; This represents a fully connected layer, a batch normalized layer, and a ReLU activation function layer.

[0055] In this embodiment, the input of the first fusion unit is connected to the output of the feature extraction unit. The first fusion unit is used to enhance the semantic features to obtain the processed semantic features, and to fuse the instance features and the processed semantic features to obtain the enhanced instance features.

[0056] The first fusion unit comprises a fully connected layer, a batch normalization layer, a ReLU activation function layer, an addition layer, and a fourth MLP model connected in sequence. The input of the fully connected layer is connected to the output of the third MLP model to receive semantic features. The input of the addition layer is also connected to the output of the second MLP model to receive instance features. The fully connected layer, batch normalization layer, and ReLU activation function layer are used to output processed semantic features. The addition layer is used to add the processed semantic features and instance features to obtain the summed features. The fourth MLP model serves as... Figure 3 In , used to output enhanced instance features.

[0057] To better distinguish instances under different semantic categories, in the reverse enhancement process of semantic features, this embodiment performs a kNN search on each point in the instance embedding space, aggregates the semantic features of its neighbors, integrates them through a channel-dimensional max-pooling layer, and then feeds them into an MLP model to obtain the final enhanced semantic features. Enhanced semantic features The calculation formula is as follows (2).

[0058] (2).

[0059] In equation (2), Represents the max pooling layer; This represents the kNN model.

[0060] In this embodiment, the input of the second fusion unit is connected to the output of the feature extraction unit. The second fusion unit is used to enhance the instance features to obtain the processed instance features, and to fuse the semantic features and the processed instance features to obtain the enhanced semantic features.

[0061] The second fusion unit comprises a kNN model, a second concatenation layer, a max pooling layer, and a fifth MLP model connected in sequence. The input of the kNN model is connected to the output of the second MLP model to receive instance features. The input of the second concatenation layer is also connected to the output of the third MLP model to receive semantic features. The kNN model outputs processed instance features, and the second concatenation layer concatenates the processed instance features and semantic features to obtain concatenated features. The max pooling layer and the fifth MLP model together form the fusion unit. Figure 3 In It is used to output enhanced semantic features based on spliced ​​features.

[0062] The aforementioned bidirectional fusion mechanism enables semantic information to guide instance embedding learning and vice versa, thereby improving the accuracy and consistency of the two tasks.

[0063] (3) Generate direction vector Direction mapping unit.

[0064] Related technologies only perform instance clustering in the embedding space, but this embodiment assumes that points on the same geometric primitive should also have close spatial consistency in the three-dimensional physical space. Therefore, this embodiment introduces orientation mapping units (i.e., ...) in instance branches. Figure 3 In ), mapping instance features to three-dimensional direction vectors .

[0065] In this embodiment, the input of the orientation mapping unit is connected to the output of the feature extraction unit, and the orientation mapping unit is used to determine the orientation vector based on the instance features.

[0066] The orientation mapping unit includes a sixth MLP model, whose input is connected to the output of the second MLP model, and receives instance features.

[0067] (4) Determine the type determination unit for the geometric primitive type.

[0068] To predict the geometric primitive type of each point, this embodiment adds a classification head (i.e., type determination unit) on the basis of the enhanced semantic features, defining 6 types of geometric primitives: plane, cylindrical surface, conical surface, sphere, open spline surface, and closed spline surface. Among them, open spline surface and closed spline surface are both third-order spline surfaces. Of course, other types of geometric primitives can also be selected according to user needs. These 6 types of geometric primitives should not be construed as limitations on this embodiment.

[0069] In this embodiment, the input of the type determination unit is connected to the output of the second fusion unit, and the type determination unit is used to determine the geometric primitive type based on the enhanced semantic features.

[0070] The type determination unit includes several seventh MLP models connected in sequence. For example, it may include two seventh MLP models. The input of the first seventh MLP model is connected to the output of the fifth MLP model to receive the enhanced semantic features.

[0071] The loss function of the segmentation module will be described in detail below.

[0072] (1) Instance loss.

[0073] This embodiment adopts a class-independent instance embedding strategy, so that the embedding vector is used to distinguish different instances. The calculation formula for instance loss is shown in the following formula (3).

[0074] (3).

[0075] In equation (3), For instance loss; The embedding-close loss is used to bring points of the same instance closer together. This is the embedding separation loss, used to separate the embeddings of points from different instances; The weighting coefficient can be set. =0.001; The embedding size loss is used to regularize the embedding size.

[0076] (4).

[0077] In equation (4), The total number of instances, specifically the number of real geometric primitives in the sample 3D point cloud data; For the first The number of points in the instances, specifically referring to the _th The number of second sample points in each sample's true geometric primitive; For the hinge function; It is a 1-norm; For the first The mean embedding of the nth instance, specifically referring to the nth instance... The average value of the instance features after sample augmentation for each second sample point in the real geometric primitive of each sample; For the first The embedding of the nth point specifically refers to the nth point In the nth sample of real geometric primitives, the th Instance features after sample augmentation for the second sample point; The spacing threshold within the instance.

[0078] (5).

[0079] In equation (5), The spacing threshold between instances; For the first The average value of the instance features after sample augmentation for each second sample point in the real geometric primitive of each sample; For the first The average value of the instance features after sample augmentation for each second sample point in the real geometric primitive of each sample.

[0080] (6).

[0081] (2) Directional loss.

[0082] This embodiment introduces a direction loss, which explicitly encourages points to face the center of their geometric primitives in three-dimensional space. The direction loss is defined using cosine similarity, and the formula for calculating the direction loss is as follows (7).

[0083] (7).

[0084] In equation (7), For directional loss; The number of real geometric primitives in the sample 3D point cloud data; For the first The number of second sample points in each sample's true geometric primitive; For the first The first sample of real geometric primitives The direction vector of the second sample point (i.e., the transpose of the predicted direction vector); For the first The first sample of real geometric primitives The true direction vector of the second sample point.

[0085] (8).

[0086] In equation (8), For the first The three-dimensional coordinates of the nth point, specifically the nth point. The first sample of real geometric primitives The three-dimensional coordinates of the second sample point; For the first The center coordinates of the instance, specifically referring to the instance's... The second sample point belongs to the first The three-dimensional coordinates of the center of the real geometric primitive of each sample; For taking the mold.

[0087] (3) Classification loss.

[0088] The formula for calculating classification loss is as follows (9).

[0089] (9).

[0090] In equation (9), For classification loss; The total number of points, specifically the number of second sample points in the sample 3D point cloud data; This represents the total number of categories, specifically the number of geometric primitive types. Category weights are used to balance the importance of different categories, specifically referring to the weights of the first category. Weights of geometric primitive types; For the sample 3D point cloud data, the first The second sample point is the... The true probability of geometric primitive types, based on the first geometric primitive in the sample 3D point cloud data. The true geometric primitive type of the second sample point is determined if the sample 3D point cloud data contains the first... The true geometric primitive type of the second sample point is: If the value is 1, then the value is 1; otherwise, the value is 0. For the sample 3D point cloud data, the first The second sample point is the... Predicted probabilities of geometric primitive types, based on the first geometric primitive in the sample 3D point cloud data. The sample geometric primitive type of the second sample point is determined by the sample geometric primitive type of the model output sample 3D point cloud data. Each second sample point represents the predicted probability of each type of geometric primitive, and the geometric primitive type with the highest predicted probability is denoted as the sample geometric primitive type. For focusing parameters, a value of 2 can be used.

[0091] In related technologies, the number of geometric primitives and the number of points contained in each geometric primitive vary significantly among different objects, leading to class imbalance and placing higher demands on the flexibility and robustness of the model. To address this issue, this embodiment innovatively designs a classification loss that can solve the aforementioned problems.

[0092] Compared to geometric primitive-based segmentation methods in related technologies, this embodiment optimizes the segmentation module from two key perspectives to improve segmentation quality and consistency. First, this embodiment introduces a bidirectional fusion mechanism between semantic features and instance features, achieving mutual enhancement between semantic segmentation and instance grouping, thus addressing the issue of how to optimize network design for point cloud segmentation to ensure semantic consistency among segmented point clouds. Second, this embodiment introduces directional information in three-dimensional Euclidean space, ensuring that points within the same geometric primitive are not only adjacent in feature space but also maintain consistency in physical space, addressing the issue of how to leverage three-dimensional spatial information to assist in point cloud segmentation and promote spatial proximity among point clouds of the same instance.

[0093] Points assigned to the same geometric primitive not only need to be spatially coherent but also conform to the same geometric primitive type. This requires that segmentation and type prediction be completed collaboratively and satisfy geometric consistency. In the segmentation process, this embodiment introduces a bidirectional enhancement of instance features and semantic features, as well as a clustering strategy that jointly perceives the feature space and three-dimensional Euclidean space (i.e., introducing direction vectors in clustering). By fusing the spatial location of points with the learned feature information, the segmentation results are made more geometrically consistent.

[0094] (ii) Clustering module.

[0095] The clustering module is used to cluster point clouds. During the point cloud clustering stage, the enhanced instance features, orientation vectors and geometric primitive types of each point obtained by the segmentation module are used. The differentially differentiable clustering module divides the 3D point cloud data into different geometric primitive instances. The prediction results are aligned with the true labels through bipartite graph matching to ensure the consistency and accuracy of clustering.

[0096] The segmentation module in this embodiment not only learns the feature distribution of points but also regresses their orientation vectors. Therefore, this embodiment introduces this orientation information during the clustering process to further optimize the grouping effect. Specifically, for each point, its enhanced instance features are: 3D coordinates are The direction vector is In this embodiment, the dot product of the three-dimensional coordinates of the point and its normalized direction vector is first calculated to obtain a scalar weight, and the feature embedding is updated along its original direction accordingly, that is, the enhanced instance features are updated. The calculation formula of the updated features (i.e. the updated embedding representation) is as follows (10).

[0097] (10).

[0098] In equation (10), For the third point cloud data Updated features of each point; For the third point cloud data Enhanced instance features at each point; This is the step size coefficient; For the third point cloud data The three-dimensional coordinates of each point; For the third point cloud data The direction vectors of the points.

[0099] The aforementioned feature update process injects 3D orientation information into the feature space, thereby improving the separability of instance embeddings and benefiting clustering-based segmentation tasks. Since the number of geometric primitives varies across different models, this embodiment employs mean-shift clustering to generate the final primitive segmentation result, yielding multiple geometric primitive instances.

[0100] In this embodiment, the clustering module includes a feature update unit and a clustering unit.

[0101] The feature update unit is used to determine the updated features of each point in the 3D point cloud data based on the enhanced instance features, 3D coordinates, and orientation vector of each point. The enhanced instance features and orientation vector are both outputs of the segmentation module.

[0102] The input of the clustering unit is connected to the output of the feature update unit. The clustering unit is used to cluster and segment based on the updated features and geometric primitive type of each point in the 3D point cloud data, and obtain multiple geometric primitive instances. The geometric primitive type is the result output by the segmentation module.

[0103] The clustering units employ the mean-shift clustering algorithm.

[0104] (iii) Implicit Fitting Module.

[0105] The implicit fitting module is used for geometric fitting. During the geometric fitting stage, the clustering results output by the clustering module are input into a frozen implicit fitting module. This implicit fitting module is supervised by geometric loss (such as signed distance function error and normal vector error) to further refine the prediction results and improve the quality of geometric modeling.

[0106] Research on related technologies has demonstrated the importance of geometric information for primitive segmentation, but these methods typically rely on least squares fitting for local surface approximation. While least squares fitting is effective on simple geometric primitives with known parametric forms, it depends on manually designed equations for different geometric primitive types, making it difficult to handle complex free-form surfaces and highly sensitive to noise.

[0107] To address these issues, this embodiment proposes a unified paradigm based on a neural implicit geometric fitting network, namely, an implicit fitting module. To encode the geometry of each surface segment, this embodiment draws on neural shape representation techniques, employing an autoencoder-based framework for surface fitting. Considering that the target surface types in this embodiment are relatively simple and well-defined, a global latent encoding is used to represent each surface segment, thereby reducing model complexity. Unlike sample-by-sample optimization, the fitting network in this embodiment is a general model capable of uniformly handling various surface segments, such as... Figure 4 As shown, this fitting network employs an autoencoder structure. Given the three-dimensional coordinates of a point... The fitting network output function exist The value at a given point represents the distance from that point to the surface segment. The encoder uses an efficient PointNet++ backbone network to extract global features from the input 3D point cloud data and decodes the output using an MLP model. To represent continuous surface segments, this embodiment uses a SoftPlus activation function layer in the decoder and employs a geometric initialization method to initialize the network weights of the fitted network, ensuring the stability and effectiveness of training and addressing the problem of how to use a unified geometric architecture to assist in geometric supervision.

[0108] In this embodiment, the implicit fitting module includes an encoder and a decoder connected in sequence. The encoder includes a PointNet++ backbone network and a first stitching layer. The input and output of the PointNet++ backbone network are both connected to the input of the first stitching layer. The decoder includes a number of decoding blocks connected in sequence, with the number of decoding blocks being A. Each decoding block includes a first MLP model and a SoftPlus activation function layer connected in sequence. The input of the first MLP model of the first decoding block is connected to the output of the first stitching layer.

[0109] When training the implicit fitting module separately, the fitting network is mainly optimized using the following loss function.

[0110] (1) First position loss.

[0111] The first position loss is used to constrain the zero level set of the sample point close to the sample surface, and is defined as follows (11).

[0112] (11).

[0113] In equation (11), The loss was due to the first position. This represents the number of the first sample points in the sample surface; For the sample surface The distance from the first sample point to the sample surface. For the sample surface The three-dimensional coordinates of the first sample point These are the model parameters for the implicit fitting module.

[0114] (2) First normal loss.

[0115] The first normal loss is used to constrain the gradient ∇f at the sample point to be close to its true normal vector (direction unsigned), and adopts the absolute value of cosine similarity, defined as the following equation (12).

[0116] (12).

[0117] In equation (12), This is the first normal loss; For the sample surface The sample gradient of the first sample point is also the normal vector derived from it. For the sample surface The true normal vector of the first sample point.

[0118] (3) Eikonal equation loss.

[0119] Eikonal equation loss is used for constraints. It satisfies the properties of a signed distance field and is defined as follows (13).

[0120] (13).

[0121] In equation (13), The loss is for the Eikonal equation.

[0122] (4) Compare learning loss.

[0123] Contrastive learning loss is used to add contrastive loss to the latent coding space to enhance the fitting ability of the fitting network and improve the ability to discriminate geometric shapes, and is defined as Equation (14).

[0124] (14).

[0125] In equation (14), To compare learning loss; This represents the number of the first sample points in the sample surface; It is a function for maximizing the value; It is the square of the 2-norm; For anchor samples, specifically the first one in the sample facet. The sample encoding features of the first sample point; For positive samples (data augmentation), specifically referring to the first positive sample in the sample facet. The sample coding features of the positive samples corresponding to the first sample point; A negative sample refers specifically to the first negative sample in the sample surface. The sample encoding features of the negative samples corresponding to the first sample point; This is a hyperparameter and can be set to 1.0.

[0126] Positive samples are used to enhance the model's robustness to noise, while negative samples are used to improve the ability to distinguish different geometric primitive types. In this embodiment, a first complete surface is first obtained, then random noise is added to the first complete surface to obtain a sample surface. Then, a second complete surface with a different geometric primitive type from the sample surface is obtained. At this point, the points in the sample surface are the first sample points, the points in the first complete surface are the positive samples of the first sample points, and the points in the second complete surface are the negative samples of the first sample points. The three-dimensional coordinates of the first sample point, the positive sample of the first sample point, and the negative sample of the first sample point are the same.

[0127] To train the fitting network, this embodiment manually sampled and generated data on various basic surface types, such as planes, cones, cylinders, and spheres. For spline surfaces (i.e., open spline surfaces and closed spline surfaces), data was primarily extracted and sampled from publicly available datasets. During training, this embodiment can use various data augmentation strategies to improve the model's robustness.

[0128] When integrating neural implicit fields into the segmentation framework, this embodiment can constrain point cloud segmentation through geometric reconstruction loss. That is, when training the initial 3D point cloud data segmentation model, optimization is mainly performed through the following loss function.

[0129] The formula for calculating geometric reconstruction loss is as follows (15).

[0130] (15).

[0131] In equation (15), For geometric reconstruction loss; Loss at the second position; This is the second normal loss.

[0132] The formula for calculating the second position loss is as follows (16).

[0133] (16).

[0134] In equation (16), For the first The number of second sample points in the geometric primitives of each sample fitting; To provide explicit and stable geometric supervision for the initial 3D point cloud data segmentation model by fixing the pre-trained fitting network parameters (i.e., the parameters of the implicit fitting module after training) during the initial 3D point cloud data segmentation model training phase. For the first The first sample fitting geometric primitive in the th sample The distance from each second sample point to the geometric primitive of the sample fitting.

[0135] This embodiment also uses automatic differentiation to calculate the normal vector of each point from the fitted network, thereby defining the second normal loss in the initial three-dimensional point cloud data segmentation model training stage. The calculation formula for the second normal loss is as follows (17).

[0136] (17).

[0137] In equation (17), For the first The first sample fitting geometric primitive in the th sample The sample gradient of the second sample point; For the first The first sample fitting geometric primitive in the th sample The true normal vector of the second sample point.

[0138] After determining the network structure and loss function of the 3D point cloud data segmentation model, this embodiment further introduces the training and testing strategies. During the training phase, real geometric clusters (i.e., geometric primitive instances) are input into the encoder of the implicit fitting module to extract geometric features and supervise the optimization of the predicted clusters. During the testing phase, the predicted clusters are input into the unfrozen implicit fitting module to complete the fitting and optimization of the geometry. It is worth noting that during the training phase, this embodiment uses the real segmentation results as input, extracts the global latent code through the encoder, and supervises the SDF value of the corresponding points. During the inference phase, the predicted segmentation is used as input, the global code is extracted by the encoder, and finally, the Marching Cubes algorithm is used to extract the surface to achieve shape reconstruction.

[0139] At this point, the three-dimensional point cloud data segmentation model training method provided in this embodiment includes the following steps.

[0140] (1) Construct an implicit fitting module.

[0141] (2) For each type of geometric primitive, obtain the first dataset corresponding to the geometric primitive type, use the first dataset to train the implicit fitting module, and obtain the trained implicit fitting module corresponding to the geometric primitive type. The first dataset includes the sample three-dimensional coordinates of each first sample point in the sample surface. The type of the sample surface is the same as the geometric primitive type.

[0142] (3) The segmentation module, the clustering module and the training implicit fitting module corresponding to each type of geometric primitive are combined to form an initial three-dimensional point cloud data segmentation model. The output of the segmentation module is connected to the input of the clustering module, and the output of the clustering module is connected to the input of the training implicit fitting module corresponding to each type of geometric primitive.

[0143] (4) Train the initial three-dimensional point cloud data segmentation model to obtain the three-dimensional point cloud data segmentation model.

[0144] The implicit fitting module is trained using the first dataset to obtain the trained implicit fitting module corresponding to the geometric primitive type. The specific steps include the following steps.

[0145] (1) For each first sample point in the sample surface, the sample three-dimensional coordinates of the first sample point are used as input. The implicit fitting module is used to determine the sample encoding features of the first sample point and the sample distance from the first sample point to the sample surface. The sample encoding features are the output of the PointNet++ backbone network in the implicit fitting module, and the sample distance is the output of the SoftPlus activation function layer of the last decoding block in the implicit fitting module.

[0146] (2) The sample fitting surface is obtained by fitting the sample distance from each first sample point in the sample surface to the sample surface, and the sample gradient of each first sample point in the sample surface is calculated based on the sample fitting surface.

[0147] (3) Based on the sample distance from each first sample point in the sample plane to the sample plane, the first position loss is calculated. Based on the sample gradient of each first sample point in the sample plane, the first normal loss and Eikonal equation loss are calculated. Based on the sample encoding features of each first sample point in the sample plane, the contrastive learning loss is calculated. The sum of the first position loss, the first normal loss, the Eikonal equation loss and the contrastive learning loss is calculated to obtain the first total loss.

[0148] (4) The implicit fitting module is updated using the first total loss to obtain the updated implicit fitting module.

[0149] (5) Determine whether the first iteration termination condition has been met; if yes, use the updated implicit fitting module as the training implicit fitting module corresponding to the geometric primitive type; if no, use the updated implicit fitting module as the implicit fitting module for the next iteration, and return to the step of "for each first sample point in the sample surface, use the sample three-dimensional coordinates of the first sample point as input, and use the implicit fitting module to determine the sample encoding features of the first sample point and the sample distance from the first sample point to the sample surface".

[0150] The first iteration termination condition can be that the number of iterations reaches the first maximum number of iterations or the difference between the first total loss of the current iteration and the first total loss of the previous iteration is less than a first preset difference.

[0151] The process of training an initial 3D point cloud data segmentation model to obtain a 3D point cloud data segmentation model includes the following steps.

[0152] (1) Obtain the second dataset, which includes the sample three-dimensional coordinates of each second sample point in the sample three-dimensional point cloud data and the sample real geometric primitives in the sample three-dimensional point cloud data.

[0153] (2) Using the sample 3D coordinates of each second sample point in the sample 3D point cloud data as input, the segmentation module is used to determine the sample augmented instance features, sample direction vector and sample geometric primitive type of each second sample point in the sample 3D point cloud data.

[0154] (3) Using the sample augmented instance features, sample direction vector and sample geometric primitive type of each second sample point in the sample 3D point cloud data as input, the clustering module is used to determine multiple sample geometric primitive instances in the sample 3D point cloud data.

[0155] (4) For each sample geometric primitive instance, the sample geometric primitive instance is used as input, and the implicit fitting module after training with the same geometric primitive type as the sample geometric primitive instance is used to fit the sample geometric primitive instance to obtain the sample fitted geometric primitive.

[0156] (5) Calculate the instance loss based on the enhanced instance features of each second sample point in the sample 3D point cloud data, calculate the orientation loss based on the sample orientation vector of each second sample point in the sample 3D point cloud data, calculate the classification loss based on the sample geometric primitive type of each second sample point in the sample 3D point cloud data, calculate the geometric reconstruction loss based on the geometric primitives fitted to all samples, and sum the instance loss, orientation loss, classification loss and geometric reconstruction loss by weight to obtain the second total loss.

[0157] The second total loss is obtained by weighted summation of instance loss, orientation loss, classification loss and geometric reconstruction loss, and the calculation formula is as follows (18).

[0158] (18).

[0159] In equation (18), This is the second total loss; These are the weights for instance loss, orientation loss, classification loss, and geometric reconstruction loss, respectively.

[0160] (6) Update the segmentation module using the second total loss to obtain the updated segmentation module.

[0161] (7) Determine whether the second iteration termination condition has been met; if yes, use the updated segmentation module as the trained segmentation module, and combine the trained segmentation module, clustering module and the trained implicit fitting module corresponding to each type of geometric primitive to form a three-dimensional point cloud data segmentation model; if no, use the updated segmentation module as the segmentation module for the next iteration, and return to the step of “using the sample three-dimensional coordinates of each second sample point in the sample three-dimensional point cloud data as input, and using the segmentation module to determine the sample augmented instance features, sample direction vector and sample geometric primitive type of each second sample point in the sample three-dimensional point cloud data”.

[0162] The second iteration termination condition can be that the number of iterations reaches the second maximum number of iterations or the difference between the second total loss of the current iteration and the second total loss of the previous iteration is less than the second preset difference.

[0163] This embodiment of IPFNet effectively achieves accurate modeling from raw point clouds to parametric geometric models by integrating semantic and geometric supervision mechanisms, providing high-quality structured representations for applications such as reverse engineering and CAD modeling. Given an unordered point cloud, this embodiment performs instance segmentation and classification of the point cloud based on primitive forms, and fits the segmented regions to finally generate a compact CAD model representation. This embodiment mainly adopts a deep learning-based approach, and the technical problems it solves mainly include: (1) how to design the network and optimize point cloud segmentation so that the segmented point clouds are semantically consistent; (2) how to use information from three-dimensional space to assist in point cloud segmentation so that point clouds of the same instance are also spatially adjacent; (3) how to use a unified geometric architecture to assist in geometric supervision.

[0164] ParseNet is one of the related technical solutions directly relevant to this embodiment. This solution also takes point cloud data as input and outputs the corresponding primitive types and instances. ParseNet consists of three modules: a segmentation module, a fitting module, and a post-processing module. In the segmentation module, it uses the graph structure of DGCNN to extract point cloud features, which are then input into the classification head and segmentation head for classification and segmentation, respectively. For the segmentation task, an embedding loss is proposed, which, based on the ground truth, drives points of the same instance to be closer together in the feature space, and points of different instances to be further apart. For the classification task, cross-entropy loss is used to supervise the classification of the point cloud. In the fitting module, a differentiable mean-shift cluster algorithm is designed to segment the point cloud based on the aforementioned point cloud features. The type of each primitive instance is determined by the semantic type of the point cloud. Then, for each primitive instance, the parameters of each primitive type are fitted using the least squares method based on the type of the primitive instance. Finally, geometric constraints are applied by calculating the CD distance between the fitted surface and the ground truth. During fitting, the least squares method is used for parameter estimation for basic types (planar, cylindrical, conical, and spherical surfaces), and SplineNet is used for spline surfaces to estimate parameters such as control points for fitting. However, SplineNet has some issues, including the surface may not completely cover the point cloud (some points are not covered); the boundaries between different patches (local regions) may not be neatly aligned; and the initial control point grid resolution of the surface is 20×20, which may not meet the final accuracy requirements. Therefore, the post-processing module mainly optimizes the spline surface by using methods such as matching, deformation, and control point re-estimation to improve the fitting quality of the point cloud, ensuring that the surface completely covers the point cloud and meets the given fitting error tolerance.

[0165] However, this scheme also has certain drawbacks: (1) The Embedding Loss is calculated by random sampling. When there is only a single sample, there is no constraint on this. When the class distribution is unbalanced, some classes may be oversampled or undersampled. To solve this problem, this embodiment introduces instance loss, which does not require sampling and has less computation. (2) When the model performs geometric supervision, it predicts the surface parameters by segmenting the predicted point cloud instances and then supervises the model by the distance between the predicted surface and the ground truth. However, this geometric supervision method uses different fitting calculation methods for different geometric types, which is more complicated. Moreover, the constraint transmission of geometric parameters to each point is limited. To solve this problem, this embodiment introduces an implicit fitting module.

[0166] SED-Net is another directly related technical solution that aims to automatically extract a set of geometric primitives (such as planes, cylinders, spheres, freeform surfaces, etc.) from unstructured 3D point clouds, thereby constructing a compact, continuous, and editable structured 3D model. It proposes a neural network framework called SED-Net (Surface and Edge Detection Network), whose core innovation lies in simultaneously detecting geometric patches and boundary information, and combining the two to achieve high-precision primitive fitting. Unlike traditional methods that only focus on primitive patches, it significantly introduces boundary information to assist the segmentation and fitting process, thus effectively distinguishing different primitive surfaces with similar shapes but blurred boundaries. SED-Net adopts a dual-branch structure: one branch extracts the type and edge features of points (classification branch), and the other branch extracts the geometric distribution information of points (instance segmentation branch). The features output by the two branches are subsequently integrated through a two-stage feature fusion mechanism. The first stage is early fusion, embedding type and boundary features into the geometric feature space to enhance the original segmentation's ability to perceive semantic boundaries; the second stage is late fusion, re-inputting the prediction results into the instance segmentation branch for enhancement, achieving depth alignment between geometry and instances. By using this edge information, it eliminates interference caused by incorrect segmentation near the boundary, thus fitting each geometric primitive more accurately.

[0167] This scheme considers the application of geometric boundaries in point cloud segmentation, but ignores the role of geometric information. Moreover, the number of boundary points in the input point cloud is limited, so the information that can be provided is limited. Furthermore, this scheme adopts a two-stage segmentation and fitting process, that is, after segmentation, fitting is performed separately, without using geometric information to optimize the segmentation. To solve this problem, this embodiment first trains the implicit fitting module, and then trains the initial 3D point cloud data segmentation model.

[0168] This embodiment proposes an end-to-end geometric primitive segmentation network that uses an implicit fitting network to supervise the fitting of point clouds, enabling the direct recovery of structured CAD models from point clouds. A unified neural implicit fitting network architecture is designed to support the representation of various surface types and improve the robustness to input point clouds. A clustering strategy that integrates features and spatial information is proposed to improve segmentation consistency while maintaining the spatial coherence of point clouds.

[0169] Example 2.

[0170] This embodiment provides a method for applying a 3D point cloud data segmentation model, such as... Figure 5 As shown, the application method of the three-dimensional point cloud data segmentation model includes the following steps.

[0171] Step T1: Using the 3D coordinates of each point in the 3D point cloud data as input, the enhanced instance features, direction vector, and geometric primitive type of each point in the 3D point cloud data are determined by the post-training segmentation module in the 3D point cloud data segmentation model; the 3D point cloud data segmentation model is a model trained using the 3D point cloud data segmentation model training method described in Example 1.

[0172] Step T2 uses the enhanced instance features, direction vector, and geometric primitive type of each point in the 3D point cloud data as input, and uses the clustering module in the 3D point cloud data segmentation model to determine multiple geometric primitive instances in the 3D point cloud data.

[0173] Step T3: For each geometric primitive instance, using the geometric primitive instance as input, the trained implicit fitting module in the 3D point cloud data segmentation model with the same geometric primitive type as the geometric primitive instance is used to fit the geometric primitive instance to obtain the fitted geometric primitive.

[0174] Step T4: Reconstruct each of the fitted geometric primitives using the Marching Cubes algorithm to obtain a three-dimensional model.

[0175] In the final reconstruction, this embodiment uses the Marching Cubes algorithm to transform the implicit representation into an explicit 3D model, thereby achieving the final geometric reconstruction.

[0176] The advantages of this embodiment will be demonstrated through experiments below.

[0177] Dataset: This embodiment evaluates model performance on the widely used ABC Parts dataset, which contains a large number of CAD models with surface primitive labels and boundary information. Following standard settings, this embodiment uses 24K, 4K, and 4K CAD models for training, validation, and testing, respectively, with each CAD model containing 10,000 points. During the training phase, this embodiment also uses the SED-Net dataset for training.

[0178] Hyperparameter settings: For overall training, this embodiment sets the following parameters: = = =1.0, =0.5. In the segmentation module, it is used during network training. =0.5, =1.5. In the kNN search for instance feature fusion, k is set to 30. In the clustering module, The base learning rate was set to 0.1, and the optimizer used was AdamW. The entire network was trained for 100 epochs on a single A100 GPU. During testing, the bandwidth for mean-shift clustering was set to 0.015.

[0179] This embodiment compares the proposed method with existing methods, including ParseNet and SED-Net. For all methods, point coordinates and normal vectors are used as inputs during training. To ensure fairness, this embodiment uses 6-dimensional inputs (point coordinates and normal vectors) for all methods and evaluates them using publicly available pre-trained models.

[0180] The following metrics were used for comparative evaluation in this embodiment.

[0181] (1) Seg-mIoU (seg-mIoU).

[0182] The degree of overlap between the prediction and the actual segmentation is measured and defined as follows (19).

[0183] (19).

[0184] In equation (19), Number of instances; For intersection, union, and comparison; The assignment matrix from points to instances, i.e., whether a point belongs to a certain instance; To convert the soft allocation to one-hot; The predicted assignment results from point to instance.

[0185] (2) Primitive type IoU (type-mIoU).

[0186] The consistency between the predicted primitive type and the actual type is measured by the following equation (20).

[0187] (20).

[0188] In equation (20), For indicator functions; This is an estimate of the point cloud fragment type. This represents the actual value for the point cloud fragment type.

[0189] (3) Primitive Recall.

[0190] If the Chamfer distance between the predicted instance and the real instance is less than 0.1, the recall is considered successful, as defined in equation (21).

[0191] (twenty one).

[0192] In equation (21), The number of segments; The segment is marked with real information. To the An estimated fragment The distance.

[0193] (4) Fitting residual error.

[0194] The distance error between the predicted primitive and the real primitive from the point to the surface is represented by the following equation (22).

[0195] (twenty two).

[0196] In equation (22), This refers to the fitting residual error; For example The number of midpoints; In order to be in Points obtained by uniform sampling above, A surface segment with actual annotations; Point-to-predict segment for sampling the true value The distance.

[0197] Table 1 Comparison Results

[0198]

[0199] Table 1 shows the performance of different methods on segmentation and fitting metrics. The method in this embodiment achieves the best results in seg-mIoU (85.50%), type-mIoU (91.20%), and Primitive Recall (66.15%), indicating its greater advantages in accuracy, generalization ability, and completeness of geometric primitive recognition. This improvement is mainly due to the semantic enhancement mechanism and geometric-guided clustering strategy designed in this embodiment, which together improve the discriminativeness and spatial consistency of features. Although SED-Net performs similarly, the method in this embodiment is more balanced across all metrics and significantly outperforms ParseNet, verifying the robustness and effectiveness of the method in this embodiment.

[0200] Figure 6 The results of the qualitative comparison are presented. Figure 6 In this example, (a), (b), (c), (d), (e), and (f) represent comparison results of different surfaces, and GT represents the true label. The segmentation result of this embodiment is closer to the true label and can effectively avoid the following problems: erroneous merging of non-adjacent spatial regions (such as...). Figure 6In (a) and (b), ParseNet merges two separate regions into one primitive; adjacent but different primitives are merged (e.g., Figure 6 (c) and (d) in the text); the spline structure is not completely segmented (e.g. Figure 6 (e) in the middle); the segmentation boundary is blurred (e.g. Figure 6 In (f), the cylinder extends to the adjacent spline region. By introducing geometric supervision and semantic attention modules, this embodiment enhances the semantic consistency within instances while suppressing confusion between different semantic points.

[0201] The following embodiment further analyzes its robustness.

[0202] Table 2 Robustness Experimental Analysis

[0203]

[0204] To evaluate the robustness of the method, Gaussian noise was added along the normal direction in this embodiment, with a standard deviation of 5% of the radius of the bounding sphere. The performance of each method was tested at different noise standard deviations (Std = 0.02–0.04), as shown in Table 2. The method in this embodiment maintained optimal performance at all noise levels, especially with a significantly smaller decrease in the type-mIoU index compared to other methods, indicating strong noise resistance and generalization ability. This embodiment uses a neural implicit fitting network for geometric fitting, providing differentiable geometric supervision for point cloud segmentation and exhibiting strong robustness during the fitting process. During the training phase, the implicit fitting module can also be unfrozen to enable learning and optimization.

[0205] Figure 7 The visualization results of the two sets of experiments are shown, such as Figure 7 In Figures (a) and (b), each group represents the input point cloud, instance segmentation, fitted reconstructed surface, and edge extraction under noise-free and Gaussian noise (Std=0.04) conditions, respectively. Even under high noise conditions, the method in this embodiment can still maintain high-quality CAD surface reconstruction. It is worth noting that even if the segmentation accuracy decreases slightly, the fitting network can still effectively compensate for the error through implicit fitting. However, this embodiment also observed that edge extraction is more sensitive to noise, which causes sharp angles to be "blurred" in the presence of noise, which is an expected result of geometric perturbation.

[0206] Experiments on benchmark datasets show that the method in this embodiment significantly outperforms many existing methods.

[0207] This application also provides an application scenario in which the above-described 3D point cloud data segmentation model application method is applied. Specifically, the 3D point cloud data segmentation model application method provided in this embodiment can be applied in a CAD modeling scenario. A CAD modeling scenario includes a modeling stage and a display stage. The modeling stage is used to process 3D point cloud data to obtain a 3D model, and the display stage is used to display the 3D model. The 3D point cloud data segmentation model application method provided in this embodiment belongs to the modeling stage.

[0208] Example 3.

[0209] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a 3D point cloud data segmentation model training method or a 3D point cloud data segmentation model application method.

[0210] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0211] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the three-dimensional point cloud data segmentation model training method in Embodiment 1 or the three-dimensional point cloud data segmentation model application method in Embodiment 2.

[0212] Example 4.

[0213] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the 3D point cloud data segmentation model training method in Embodiment 1 or the 3D point cloud data segmentation model application method in Embodiment 2.

[0214] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0215] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0216] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for training a 3D point cloud data segmentation model, characterized in that, The training method for the 3D point cloud data segmentation model includes: An implicit fitting module is constructed; the implicit fitting module includes an encoder and a decoder connected in sequence. The encoder includes a PointNet++ backbone network and a first splicing layer. The input and output of the PointNet++ backbone network are both connected to the input of the first splicing layer. The decoder includes several decoding blocks connected in sequence. Each decoding block includes a first MLP model and a SoftPlus activation function layer connected in sequence. The input of the first MLP model of the first decoding block is connected to the output of the first splicing layer. For each type of geometric primitive, a first dataset corresponding to the geometric primitive type is obtained, and the implicit fitting module is trained using the first dataset to obtain the trained implicit fitting module corresponding to the geometric primitive type; the first dataset includes the sample three-dimensional coordinates of each first sample point in the sample surface, and the type of the sample surface is the same as the geometric primitive type. The initial 3D point cloud data segmentation model is composed of a segmentation module, a clustering module, and a trained implicit fitting module corresponding to each of the geometric primitive types. The output of the segmentation module is connected to the input of the clustering module, and the output of the clustering module is connected to the input of the trained implicit fitting module corresponding to each of the geometric primitive types. The initial 3D point cloud data segmentation model is trained to obtain a 3D point cloud data segmentation model. The segmentation module includes a feature extraction unit, a first fusion unit, a second fusion unit, a direction mapping unit, and a type determination unit; The feature extraction unit is used to extract the instance features and semantic features of each point in the 3D point cloud data; The input of the first fusion unit is connected to the output of the feature extraction unit; the first fusion unit is used to enhance the semantic features to obtain processed semantic features, and to fuse the instance features and the processed semantic features to obtain enhanced instance features; The input of the second fusion unit is connected to the output of the feature extraction unit; the second fusion unit is used to enhance the instance features to obtain processed instance features, and to fuse the semantic features and the processed instance features to obtain enhanced semantic features; The input of the orientation mapping unit is connected to the output of the feature extraction unit; the orientation mapping unit is used to determine the orientation vector based on the instance features. The input of the type determination unit is connected to the output of the second fusion unit; the type determination unit is used to determine the geometric primitive type based on the enhanced semantic features; The feature extraction unit includes a DGCNN model, a second MLP model, and a third MLP model. The output of the DGCNN model is connected to the input of the second MLP model and the input of the third MLP model, respectively. The second MLP model is used to output instance features, and the third MLP model is used to output semantic features. The first fusion unit includes a fully connected layer, a batch normalization layer, a ReLU activation function layer, an addition layer, and a fourth MLP model connected in sequence. The input of the fully connected layer is connected to the output of the third MLP model, and the input of the addition layer is also connected to the output of the second MLP model. The second fusion unit includes a kNN model, a second splicing layer, a max pooling layer and a fifth MLP model connected in sequence. The input of the kNN model is connected to the output of the second MLP model, and the input of the second splicing layer is also connected to the output of the third MLP model. The orientation mapping unit includes a sixth MLP model, the input of which is connected to the output of the second MLP model; The type determination unit includes a plurality of seventh MLP models connected in sequence, wherein the input of the first seventh MLP model is connected to the output of the fifth MLP model; The clustering module includes a feature update unit and a clustering unit; The feature update unit is used to determine the updated features of each point in the 3D point cloud data based on the enhanced instance features, 3D coordinates, and direction vector of each point in the 3D point cloud data; the enhanced instance features and the direction vector are both outputs of the segmentation module; The input of the clustering unit is connected to the output of the feature update unit; the clustering unit is used to perform clustering and segmentation based on the updated features and geometric primitive type of each point in the 3D point cloud data to obtain multiple geometric primitive instances; the geometric primitive type is the result output by the segmentation module. The formula for calculating the updated features is as follows: ; in, For the third point cloud data Updated features of each point; For the third point cloud data Enhanced instance features at each point; This is the step size coefficient; For the third point cloud data The three-dimensional coordinates of each point; For the third point cloud data The direction vectors of the points; The clustering unit uses the mean-shift clustering algorithm.

2. The three-dimensional point cloud data segmentation model training method according to claim 1, characterized in that, The implicit fitting module is trained using the first dataset to obtain the trained implicit fitting module corresponding to the geometric primitive type, specifically including: For each first sample point in the sample surface, the sample three-dimensional coordinates of the first sample point are used as input, and the implicit fitting module is used to determine the sample encoding features of the first sample point and the sample distance from the first sample point to the sample surface; the sample encoding features are the output of the PointNet++ backbone network in the implicit fitting module, and the sample distance is the output of the SoftPlus activation function layer of the last decoding block in the implicit fitting module. A sample fitting surface is obtained by fitting the sample distance from each first sample point in the sample surface to the sample surface, and the sample gradient of each first sample point in the sample surface is calculated based on the sample fitting surface. Based on the sample distance from each first sample point in the sample plane to the sample plane, the first position loss is calculated. Based on the sample gradient of each first sample point in the sample plane, the first normal loss and the Eikonal equation loss are calculated. Based on the sample encoding features of each first sample point in the sample plane, the contrastive learning loss is calculated. The sum of the first position loss, the first normal loss, the Eikonal equation loss, and the contrastive learning loss is calculated to obtain the first total loss. The implicit fitting module is updated using the first total loss to obtain the updated implicit fitting module; Determine whether the first iteration termination condition has been met; if yes, use the updated implicit fitting module as the trained implicit fitting module corresponding to the geometric primitive type; if no, use the updated implicit fitting module as the implicit fitting module for the next iteration, and return to the step of "for each first sample point in the sample surface, use the sample three-dimensional coordinates of the first sample point as input, and use the implicit fitting module to determine the sample encoding features of the first sample point and the sample distance from the first sample point to the sample surface".

3. The three-dimensional point cloud data segmentation model training method according to claim 2, characterized in that, The formula for calculating the contrastive learning loss is: ; in, To compare learning loss; This represents the number of the first sample points in the sample surface; It is a function for maximizing the value; It is the square of the 2-norm; For the sample surface The sample encoding features of the first sample point; For the sample surface The sample coding features of the positive samples corresponding to the first sample point; For the sample surface The sample encoding features of the negative samples corresponding to the first sample point; This is a hyperparameter.

4. The three-dimensional point cloud data segmentation model training method according to claim 1, characterized in that, The initial 3D point cloud data segmentation model is trained to obtain a 3D point cloud data segmentation model, specifically including: Obtain the second dataset; the second dataset includes the sample 3D coordinates of each second sample point in the sample 3D point cloud data and the sample true geometric primitives in the sample 3D point cloud data. Using the sample 3D coordinates of each second sample point in the sample 3D point cloud data as input, the segmentation module is used to determine the sample-enhanced instance features, sample direction vector, and sample geometric primitive type of each second sample point in the sample 3D point cloud data. Using the sample augmented instance features, sample orientation vector, and sample geometric primitive type of each second sample point in the sample 3D point cloud data as input, the clustering module is used to determine multiple sample geometric primitive instances in the sample 3D point cloud data. For each of the sample geometric primitive instances, the sample geometric primitive instance is used as input, and the trained implicit fitting module with the same geometric primitive type as the sample geometric primitive instance is used to fit the sample geometric primitive instance to obtain the sample fitted geometric primitive. The instance loss is calculated based on the enhanced instance features of each second sample point in the sample 3D point cloud data. The orientation loss is calculated based on the sample orientation vector of each second sample point in the sample 3D point cloud data. The classification loss is calculated based on the sample geometric primitive type of each second sample point in the sample 3D point cloud data. The geometric reconstruction loss is calculated based on the fitted geometric primitives of all the samples. The instance loss, orientation loss, classification loss and geometric reconstruction loss are weighted and summed to obtain the second total loss. The segmentation module is updated using the second total loss to obtain the updated segmentation module; Determine whether the second iteration termination condition has been met; if yes, then use the updated segmentation module as the trained segmentation module, and combine the trained segmentation module, the clustering module, and the trained implicit fitting module corresponding to each geometric primitive type to form a 3D point cloud data segmentation model; if no, then use the updated segmentation module as the segmentation module for the next iteration, and return to the step of "using the sample 3D coordinates of each second sample point in the sample 3D point cloud data as input, and using the segmentation module to determine the sample augmented instance features, sample direction vector, and sample geometric primitive type of each second sample point in the sample 3D point cloud data".

5. The three-dimensional point cloud data segmentation model training method according to claim 4, characterized in that, The formula for calculating the instance loss is: ; in, For instance loss; To embed the loss closer; For embedding separation loss; These are the weighting coefficients; For embedding size loss; ; in, The number of real geometric primitives in the sample 3D point cloud data; For the first The number of second sample points in each sample's true geometric primitive; For the hinge function; It is a 1-norm; For the first The average value of the instance features after sample augmentation for each second sample point in the real geometric primitive of each sample; For the first In the nth sample of real geometric primitives, the th Instance features after sample augmentation for the second sample point; The spacing threshold within the instance; ; in, The spacing threshold between instances; For the first The average value of the instance features after sample augmentation for each second sample point in the real geometric primitive of each sample; For the first The average value of the instance features after sample augmentation for each second sample point in the real geometric primitive of each sample; ; The formula for calculating the classification loss is: ; in, For classification loss; The number of second sample points in the sample 3D point cloud data; The number of geometric primitive types; For the first Weights of geometric primitive types; For the sample 3D point cloud data, the first The second sample point is the... The true probability of geometric primitive types, based on the first geometric primitive in the sample 3D point cloud data. The true geometric primitive type of each second sample point is determined; For the sample 3D point cloud data, the first The second sample point is the... Predicted probabilities of geometric primitive types, based on the first geometric primitive in the sample 3D point cloud data. The sample geometric primitive type of the second sample point is determined; For focusing parameters.

6. A method for applying a three-dimensional point cloud data segmentation model, characterized in that, The application method of the three-dimensional point cloud data segmentation model includes: Using the three-dimensional coordinates of each point in the three-dimensional point cloud data as input, the enhanced instance features, direction vector, and geometric primitive type of each point in the three-dimensional point cloud data segmentation model are determined by the post-training segmentation module in the three-dimensional point cloud data segmentation model; the three-dimensional point cloud data segmentation model is a model trained using the three-dimensional point cloud data segmentation model training method according to any one of claims 1-5. Using the enhanced instance features, orientation vector, and geometric primitive type of each point in the 3D point cloud data as input, the clustering module in the 3D point cloud data segmentation model is used to determine multiple geometric primitive instances in the 3D point cloud data. For each geometric primitive instance, the geometric primitive instance is used as input, and the trained implicit fitting module with the same geometric primitive type as the geometric primitive instance in the 3D point cloud data segmentation model is used to fit the geometric primitive instance to obtain the fitted geometric primitive. The Marching Cubes algorithm is used to reconstruct each of the fitted geometric primitives to obtain a three-dimensional model.

7. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the three-dimensional point cloud data segmentation model training method according to any one of claims 1-5 or the three-dimensional point cloud data segmentation model application method according to claim 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the three-dimensional point cloud data segmentation model training method according to any one of claims 1-5 or the three-dimensional point cloud data segmentation model application method according to claim 6.

Citation Information

Patent Citations

  • Point cloud structured modeling method, device and equipment based on geometric primitive assembly

    CN116821988A

  • Large-scene three-dimensional point cloud data modeling method based on CSG-BASE Net

    CN117593478A