Point cloud classification method and device
By extracting high-frequency and low-frequency features through parallel branches and combining it with the vector attention algorithm, the problem of low efficiency of point cloud classification is solved and efficient point cloud classification is achieved.
Patent Information
- Application Number
- CN202211494418.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-11-25
AI Technical Summary
In the existing technology, as the complexity of point cloud images increases, the efficiency of point cloud classification decreases significantly, making it difficult to effectively process high-complexity point cloud models.
Parallel branches are used to extract high-frequency and low-frequency features, and maximum pooling and average pooling are combined with residual processing and vector attention algorithms to establish long-distance dependencies between point cloud coordinates, reducing computational complexity and improving recognition rate. .
Through the splicing and dimensionality processing of high-frequency and low-frequency features, the computational complexity of point cloud classification is significantly reduced, and the recognition rate and efficiency of point cloud classification are improved.
Smart Images

Figure CN115830375B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a point cloud classification method and device. Background Art
[0002] With the rapid development of existing data acquisition hardware and computing power, the complexity of point cloud images is increasing. Three-dimensional point cloud data containing rich spatial information is used in various computer vision scenarios, such as autonomous driving, virtual reality, three-dimensional modeling and robotic operation.
[0003] In existing methods, the efficiency of point cloud classification is getting lower and lower due to the increasing complexity of the point cloud processing model. Summary of the invention
[0004] The present invention provides a point cloud classification method and device, which are used to solve the technical problem in the prior art that the complexity of point cloud processing models is getting higher and higher, resulting in lower and lower efficiency of point cloud classification.
[0005] The present invention provides a point cloud classification method, comprising:
[0006] Performing feature extraction on the original point cloud data to obtain local features of the original point cloud data;
[0007] Inputting the local features into the first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into the second processing branch to extract low-frequency features to obtain low-frequency features of the local features;
[0008] The high-frequency features are concatenated with the low-frequency features, and the concatenated features are subjected to dimensionality-enhancing processing to obtain target features of the original point cloud data;
[0009] The target feature is input into a classifier to obtain a classification result of the original point cloud data, and the classifier is trained based on point cloud data samples and their corresponding category labels.
[0010] According to a point cloud classification method provided by the present invention, the local features are input into a second processing branch to extract low-frequency features to obtain low-frequency features of the local features, including:
[0011] Performing average pooling processing on the local features to obtain a feature vector after average pooling processing;
[0012] Performing hierarchical binary clustering on the feature vector to obtain multiple feature clusters of the feature vector;
[0013] Based on the vector attention algorithm, the feature relationships in each feature cluster are determined respectively, and the obtained multiple feature relationships are merged to obtain the low-frequency features of the local features.
[0014] According to a point cloud classification method provided by the present invention, the inputting the local features into the first processing branch to extract high-frequency features to obtain high-frequency features of the local features includes:
[0015] Performing maximum pooling processing on the local features to obtain local features after maximum pooling processing;
[0016] The local features after the maximum pooling process are subjected to residual processing to obtain high-frequency features of the local features.
[0017] According to a point cloud classification method provided by the present invention, the feature extraction of the original point cloud data to obtain the local features of the original point cloud data includes:
[0018] Down-sampling the original point cloud data to obtain the sampling center point of the original point cloud data, and determining the neighboring points corresponding to the sampling center point based on the K nearest neighbor algorithm;
[0019] Based on the coordinates of the neighboring points and the coordinates of the sampling center point, the relative position coordinates of the neighboring points and the sampling center point are obtained;
[0020] Splicing the relative position coordinates and the sampling center point according to the coordinate dimension to obtain a spliced six-dimensional coordinate;
[0021] Based on a multi-layer perceptron, the six-dimensional coordinates are mapped to a high-dimensional space to obtain local features of the original point cloud data.
[0022] According to a point cloud classification method provided by the present invention, downsampling the original point cloud data to obtain the sampling center point of the original point cloud data includes:
[0023] Normalize the original point cloud data into a unit sphere, and uniformly sample the normalized original point cloud data to obtain a preset number of point cloud samples;
[0024] Based on the farthest point sampling method, the point cloud samples are downsampled to obtain the sampling center points of the point cloud samples.
[0025] According to a point cloud classification method provided by the present invention, the high-frequency features and the low-frequency features are spliced, and the spliced features are subjected to dimensionality-upgrading processing to obtain the target features of the original point cloud data, including:
[0026] The high-frequency feature and the low-frequency feature are concatenated to obtain the feature of the sampling center point;
[0027] The feature of the sampling center point is subjected to a preset number of dimensionality-upgrading processing, and the feature obtained after the dimensionality-upgrading processing is used as the target feature of the original point cloud data.
[0028] The present invention also provides a point cloud classification device, comprising:
[0029] A feature extraction module is used to extract features from the original point cloud data to obtain local features of the original point cloud data;
[0030] A processing module, used for inputting the local features into a first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into a second processing branch to extract low-frequency features to obtain low-frequency features of the local features;
[0031] A splicing module, used to splice the high-frequency features with the low-frequency features, and perform dimensionality-upgrading processing on the features obtained after splicing to obtain target features of the original point cloud data;
[0032] The classification module is used to input the target features into a classifier to obtain a classification result of the original point cloud data, and the classifier is trained based on point cloud data samples and their corresponding category labels.
[0033] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any of the above-mentioned point cloud classification methods is implemented.
[0034] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, any of the above-mentioned point cloud classification methods is implemented.
[0035] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the point cloud classification method described above is implemented.
[0036] The point cloud classification method and device provided by the present invention, after obtaining the local features of the original point cloud data, uses two parallel branches to extract high-frequency features and low-frequency features from the local features obtained, and uses the target features obtained by splicing the high-frequency features and low-frequency features for point cloud classification, thereby reducing the complexity of calculation. At the same time, when extracting low-frequency features, based on vector attention processing, a long-distance dependency relationship between point cloud coordinates can be established, further reducing the complexity of subsequent classification and improving the recognition rate of point cloud classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 It is a flow chart of the point cloud classification method provided by the present invention;
[0039] Figure 2 It is a schematic diagram of a process of applying the point cloud classification method provided by the present invention;
[0040] Figure 3 It is a schematic diagram of the local feature processing flow provided by the present invention;
[0041] Figure 4 It is a structural schematic diagram of the point cloud classification device provided by the present invention;
[0042] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] With the rapid development of data acquisition hardware and computing power, 3D data containing rich spatial information has been applied to various scenarios of computer vision, such as autonomous driving, virtual reality, 3D modeling and robotic operations. 3D data can be expressed in the form of depth maps, point clouds, grids and voxels. Among them, point cloud data is a set of points sampled from the surface of an object, which can retain the most original information of the environment and objects in three-dimensional space, such as position coordinates, color and reflection surface intensity. Compared with dense and regular 2D image data, 3D point cloud data is more sparse, and has the characteristics of storage disorder and uneven distribution, which makes it impossible for classic convolutional neural networks to directly process point clouds. At the same time, there are many noises (background and occlusion) in the three-dimensional point cloud of real scenes, which brings many challenges to the point cloud classification task.
[0045] Among the related methods, point cloud classification methods based on deep learning are divided into multi-view geometry, 3D voxel and point-based methods according to the different point cloud data processing methods. Among them, multi-view geometry and 3D voxel methods first need to project or rasterize the point cloud into a regular and orderly grid, such as a 2D image and 3D voxel, and then use a 2D or 3D convolutional neural network for learning. This data conversion will cause a certain degree of information loss. However, as the complexity of the acquired point cloud images increases, the efficiency of point cloud classification by related methods becomes lower and lower.
[0046] Aiming at the defects in the related methods, the present invention proposes a point cloud classification method. Figure 1 This is a flow chart of the point cloud classification method provided by the present invention. Figure 1 , the point cloud classification method provided by the present invention may include:
[0047] Step 110, extracting features of the original point cloud data based on a multi-layer perceptron to obtain local features of the original point cloud data;
[0048] Step 120, inputting the local feature into the first processing branch to extract high-frequency features to obtain high-frequency features of the local feature, and inputting the local feature into the second processing branch to extract low-frequency features to obtain low-frequency features of the local feature;
[0049] Step 130, concatenating the high-frequency features with the low-frequency features, and performing dimensionality-upgrading processing on the concatenated features to obtain target features of the original point cloud data;
[0050] Step 140: input the target feature into a classifier to obtain a classification result of the original point cloud data. The classifier is trained based on point cloud data samples and their corresponding category labels.
[0051] The execution subject of the point cloud classification method provided by the present invention can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), or a personal computer (PC), etc., which is not specifically limited by the present invention.
[0052] The following takes the point cloud classification method provided by the present invention executed by a computer as an example to describe the technical solution of the present invention in detail.
[0053] In step 110, original point cloud data is obtained, and feature extraction is performed on the obtained original point cloud data. The original point cloud data is point cloud data containing the target, which is used for the subsequent classification process. Feature extraction is performed on the obtained original point cloud data to obtain local features of the original point cloud data.
[0054] MLP (Multilayer Perceptron) is based on the multilayer perceptron to extract features from the acquired original point cloud data to obtain local features of the original point cloud.
[0055] MLP=ReLU(BatchNorm(Conv2d(X)));
[0056] Among them, X is the input original point cloud data, ReLU is the activation layer, BatchNorm is the normalization process, and Conv2d is the convolution process.
[0057] Optionally, before obtaining the original point cloud data and performing feature extraction on the original point cloud data, the obtained original point cloud data may be preprocessed. The preprocessing includes operations such as random scale transformation, displacement, and mixed sample data enhancement.
[0058] In step 120, after obtaining the local features, the obtained local features are input into the first processing branch. Based on the first processing branch, the obtained local features are processed in parallel by the first processing branch and the second processing branch. High-frequency features are extracted from the local features to obtain high-frequency features of the local features output by the first processing branch. The obtained local features are input into the second processing branch. Based on the second processing branch, low-frequency features are extracted from the local features to obtain low-frequency features of the local features output by the second processing branch.
[0059] Specifically, the first processing branch may be composed of a maximum pooling layer MaxPool and a residual MLP (ResMLP) function connected in series. After obtaining the local features, the obtained local features f g First, the maximum pooling layer MaxPool is input for processing, and then the features obtained after processing by the maximum pooling layer MaxPool are input into the residual MLP (ResMLP) function for processing, and finally the high-frequency features of the local features are obtained.
[0060] f mp =MaxPool(f g );
[0061] f h =ResMLP(f mp );
[0062] Among them, f g is a local feature, f mp is the feature obtained after processing by the maximum pooling layer MaxPool, f h It is the high-frequency feature of the local feature.
[0063] After the local features are obtained, the obtained local features are input into the second processing branch. Based on the second processing branch, the local features are processed to obtain high-frequency features of the local features output by the second processing branch.
[0064] Specifically, the second processing branch can be composed of an average pooling layer and a local attention module in series. First, the local feature f g Input the average pooling layer AvgPool to obtain the feature f after the average pooling layer processing ap .
[0065] f ap =AvgPool(f g );
[0066] The feature f after the average pooling layer ap Based on the local attention module, the feature f processed by the average pooling layer can be ap Points with similar features are clustered to obtain low-frequency features of local features.
[0067] By processing the local attention module based on the features processed by the average pooling layer, long-distance dependencies between point cloud coordinates can be established, reducing the complexity of subsequent classification.
[0068] It can be understood that the obtained local features are extracted using two parallel branches. One branch can be composed of a maximum pooling layer MaxPool and a residual MLP (ResMLP) in series to extract high-frequency features; the other branch can be composed of an average pooling layer AvgPool and a local attention module in series to extract low-frequency features, thereby realizing the separate extraction of high-frequency features and low-frequency features of local features.
[0069] In step 130, after obtaining the high-frequency features of the local features and the low-frequency features of the local features, the obtained high-frequency features and low-frequency features are spliced to obtain the target features of the original point cloud data.
[0070] The obtained high-frequency features and low-frequency features are spliced, and the features obtained after splicing are processed by dimensionality upgrade to obtain the target features of the original point cloud data for the subsequent point cloud classification process.
[0071] After the obtained high-frequency features and low-frequency features are spliced, the features of the sampling center point are obtained. The features of the sampling center point are processed by dimension increase, and the process of dimension increase processing can be: obtain the neighbor features of the spliced features, subtract the spliced features from the obtained neighbor features, and obtain relative features; splice the obtained relative features with the spliced features, and use a multi-layer perceptron to increase the dimensions of the obtained features; then extract the corresponding high-frequency features and low-frequency features from the obtained dimension increase features, and splice the extracted high-frequency features and low-frequency features, and use the obtained features as the target features of the original point cloud data.
[0072] In step 140, after the target features are obtained, the obtained target features are input into a classifier. The classifier is trained based on point cloud data samples and their corresponding category labels.
[0073] The obtained target is input into the classifier for classification, and the classification result output by the classifier is obtained. Among them, the classifier is a pre-trained supervised classifier.
[0074] The point cloud classification method provided by the embodiment of the present invention reduces the complexity of calculation by extracting high-frequency features and low-frequency features from the local features acquired after obtaining the local features of the original point cloud data using two parallel branches, and using the target features obtained by splicing the acquired high-frequency features and low-frequency features for point cloud classification. At the same time, when extracting low-frequency features, based on vector attention processing, a long-distance dependency relationship between point cloud coordinates can be established, further reducing the complexity of subsequent classification and improving the recognition rate of point cloud classification.
[0075] In one embodiment, the local features are input into a second processing branch for low-frequency feature extraction to obtain low-frequency features of the local features, including: performing average pooling processing on the local features to obtain a feature vector after average pooling; performing hierarchical binary clustering on the feature vector to obtain multiple feature clusters of the feature vector; based on a vector attention algorithm, respectively determining the feature relationship in each feature cluster, and merging the obtained multiple feature relationships to obtain the low-frequency features of the local features.
[0076] The second processing branch can be composed of an average pooling layer and a local attention module in series. The local features are averaged and pooled, which can be done by adding the local features f g Input the average pooling layer AvgPool to obtain the feature vector f after average pooling ap .
[0077] f ap =AvgPool(f g );
[0078] After getting the feature vector f apAfter that, f ap Input the local attention module containing the vector attention algorithm to obtain the low-frequency features f of the local features l .
[0079] f l =LocalAttention(f ap );
[0080] LocalAttention represents the local attention module, that is, for the feature vector (S×D is the dimension), through linear mapping, we get Queries, Keys, and Values, which are abbreviated as Q, K, and V. Then Hierarchical binary clustering is performed in high-dimensional feature space according to its content (features) to ensure that each class has the same size after clustering. The standard multi-head configuration in Transformer (setting 4 heads) is adopted, and each head independently performs the generation and clustering operations of Q, K, and V.
[0081] The specific process of hierarchical bisection clustering is expressed as follows:
[0082]
[0083]
[0084]
[0085]
[0086] Where c1, c2 represent the original cluster centers, represents the feature cluster obtained after hierarchical bipartite clustering. dist represents the Euclidean distance. After n (n=log2L) bipartite clustering iterations, L feature clusters of equal size are finally obtained. ( Can be set to 16). K and V are also divided into corresponding subsets according to the same index and In each feature cluster, the Vector Attention algorithm (VA) is used to calculate the feature relationship within the feature cluster:
[0087] Y i =VA(Q i ,K i ,V i );
[0088]
[0089] Finally, the features of each cluster Merge in original order Thus, the low-frequency features f of the local features are obtained l ;
[0090] f l =Linear(Y)+f ap ;
[0091] The point cloud classification method provided by the embodiment of the present invention clusters points with similar features into the same class in the feature space, calculates attention within each class, establishes long-distance dependencies, and significantly reduces the computational complexity of subsequent point cloud classification. At the same time, the calculation amount of vector attention is reduced by dividing the local area based on hierarchical bisection clustering.
[0092] In one embodiment, the local features are input into the first processing branch for high-frequency feature extraction to obtain high-frequency features of the local features, including: performing maximum pooling processing on the local features to obtain local features after maximum pooling processing; performing residual processing on the local features after maximum pooling processing to obtain high-frequency features of the local features.
[0093] The first processing branch can be composed of a maximum pooling layer MaxPool and a residual MLP (ResMLP) function connected in series. After obtaining the local features, the obtained local features f g First input the maximum pooling layer MaxPool for processing to obtain the local feature f after maximum pooling processing mp Then the feature f is obtained after the maximum pooling layer MaxPool is processed mp The input is processed by the residual MLP (ResMLP) function to finally obtain the high-frequency features of the local features.
[0094] f mp =MaxPool(f g );
[0095] f h =ResMLP(f mp );
[0096] Among them, f g is a local feature, f mp is the feature obtained after processing by the maximum pooling layer MaxPool, f h It is the high-frequency feature of the local feature.
[0097] ResMLP(f mp )=LeakyReLU(BatchNorm(Conv1d(f mp )))+f mp
[0098] Among them, LeakyReLU is the activation layer, BatchNorm is the normalization process, and Conv1d is the convolution process.
[0099] The point cloud classification method provided by the embodiment of the present invention realizes the extraction of high-frequency features in the local features by inputting the local features into the first processing branch to obtain the high-frequency features of the local features output by the first processing branch.
[0100] In one embodiment, feature extraction is performed on raw point cloud data to obtain local features of the raw point cloud data, including: downsampling the raw point cloud data to obtain a sampling center point of the raw point cloud data; determining neighboring points corresponding to the sampling center point based on a K-nearest neighbor algorithm; obtaining relative position coordinates of the neighboring points and the sampling center point based on coordinates of the neighboring points and the sampling center point; splicing the relative position coordinates with the sampling center point according to coordinate dimensions to obtain spliced six-dimensional coordinates; and mapping the six-dimensional coordinates to a high-dimensional space based on a multi-layer perceptron to obtain local features of the raw point cloud data.
[0101] Downsample the original point cloud data to obtain the sampling center point p of the original point cloud data i , then for each sampled center point p i Use the k-nearest neighbor algorithm (kNN) to find its nearest neighbor point p j ;
[0102] p i = FPS(p);
[0103] p j = kNN(p i ), k = 16;
[0104] The nearest neighbor point p j With the center point p i Subtract to get the relative position coordinate p j -p i , and then with the center point p i The coordinate dimensions are spliced together, and a multi-layer perceptron (MLP) is used to map the spatial relationship between the sampling center point and the neighborhood point to a high-dimensional space with a dimension of 64, denoted as D), thereby extracting deep local features:
[0105] f g =MLP(||p i ,p j -p i ||);
[0106] MLP=ReLU(BatchNorm(Conv2d(X)));
[0107] Among them, X is the input original point cloud data, ReLU is the activation layer, BatchNorm is the normalization process, and Conv2d is the convolution process.
[0108] The point cloud classification method provided by the embodiment of the present invention obtains local features of the original point cloud data by extracting features from the original point cloud data, and performs screening processing after downsampling the original point cloud data, thereby reducing the amount of point cloud data and facilitating subsequent processing.
[0109] In one embodiment, the original point cloud data is downsampled to obtain the sampling center point of the original point cloud data, including: normalizing the original point cloud data into a unit sphere, and uniformly sampling the normalized original point cloud data to obtain a preset number of point cloud samples; based on the farthest point sampling method, downsampling the point cloud samples to obtain the sampling center point of the point cloud samples.
[0110] After obtaining the original point cloud data, the three-dimensional coordinate data of the point cloud is first normalized to the unit sphere; then the normalized original point cloud data is uniformly sampled. For example, 1024 points can be uniformly sampled to obtain That is the preset number of point cloud samples.
[0111] Based on the farthest point sampling (FPS) method, the point cloud sample p is downsampled at a rate of 2 to obtain the sampling center point of the point cloud sample.
[0112] The point cloud classification method provided by an embodiment of the present invention normalizes the original point cloud data into a unit sphere, uniformly samples the normalized original point cloud data, obtains a preset number of point cloud samples, and downsamples the point cloud samples based on the farthest point sampling method to obtain the sampling center point of the point cloud samples, thereby providing a basis for the subsequent extraction of local features of the original point cloud data based on the sampling center point.
[0113] In one embodiment, the high-frequency features are spliced with the low-frequency features, and the features obtained after splicing are processed by dimensionality upgrading to obtain the target features of the original point cloud data, including: splicing the high-frequency features with the low-frequency features to obtain the features of the sampling center point; performing dimensionality upgrading on the features of the sampling center point for a preset number of times, and using the features obtained after the dimensionality upgrading as the target features of the original point cloud data.
[0114] After obtaining the high-frequency features and the low-frequency features of the local features, the high-frequency features and the low-frequency features are concatenated to obtain the features of the sampling center point, where the features of the sampling center point are the core features of the original point cloud data.
[0115] After obtaining the features of the sampling center point, in order to facilitate the subsequent point cloud classification process, the features of the sampling center point are subjected to a preset number of dimensionality upgrade processing, and the features obtained after the dimensionality upgrade processing are used as the target features of the original point cloud data. The target features are the features used for subsequent point cloud classification.
[0116] Among them, the dimension-upgrading processing of the features of the sampling center point may include: obtaining the neighboring features of the features of the sampling center point, subtracting the features of the sampling center point from the obtained neighboring features to obtain relative features; splicing the obtained relative features with the features of the sampling center point, and performing dimension-upgrading on the spliced features using a multi-layer perceptron; then extracting the corresponding high-frequency features and low-frequency features from the obtained dimension-upgrading features, and splicing the extracted high-frequency features and low-frequency features; finally, using the obtained spliced features as the features obtained after the dimension-upgrading processing.
[0117] The point cloud classification method provided by the embodiment of the present invention obtains the high-frequency features and the low-frequency features of the local features, and then splices the obtained high-frequency features and the low-frequency features to obtain the features of the sampling center point. The features of the center point are processed by dimensionality increase to obtain the target features of the original point cloud data, which provides a basis for subsequent point cloud classification.
[0118] The following is a flow chart of a point cloud classification method provided by the present invention: Figure 2 Take the following as an example to illustrate the technical solution provided by the present invention:
[0119] In step 210, after obtaining the original point cloud data, the three-dimensional coordinate data of the point cloud is first normalized to the unit sphere; then 1024 points are uniformly sampled to obtain
[0120] In step 220, the coordinates of the input point p are downsampled at a rate of 2 using the farthest point sampling method (FPS), and then the center point p of each sample is i Use the k-nearest neighbor algorithm (kNN) to find its nearest neighbor point p j ;
[0121] p i = FPS(p);
[0122] p j = kNN(p i ), k=16;
[0123] In step 230, the neighbor point p j With the center point p i Subtract to get the relative position coordinate p j -p i , and then with the center point p iThe spatial relationship between the sampling center point and the neighborhood point is mapped to a high-dimensional space with a dimension of 64 (denoted as D) using a multi-layer perceptron (MLP) to extract deep local features f g :
[0124] f g =MLP(||p i , p j -p i ||);
[0125] MLP=ReLU(BatchNorm(Conv2d(X)));
[0126] Among them, X is the input original point cloud data, ReLU is the activation layer, BatchNorm is the normalization process, and Conv2d is the convolution process.
[0127] In step 240, high-frequency features and low-frequency features of local features are extracted. The extraction process is as follows: Figure 3 As shown in the schematic diagram of the local feature processing flow provided by the present invention, the local feature f g Two parallel branches are used for feature aggregation. The first processing branch consists of a maximum pooling layer MaxPool and a residual function MLP (ResMLP) in series to obtain the high-frequency features f of local features. h The second processing branch consists of an average pooling layer AvgPool and a local attention module in series, aiming to extract the low-frequency features of local features f l .
[0128] The first processing branch is composed of the maximum pooling layer MaxPool and the residual MLP (ResMLP) function in series. After obtaining the local features, the local features f g First input the maximum pooling layer MaxPool for processing to obtain the local feature f after maximum pooling processing mp Then the feature f is obtained after the maximum pooling layer MaxPool is processed mp Input the residual MLP (ResMLP) function for processing, and finally obtain the high-frequency features f of the local features h .
[0129] f mp =MaxPool(f g );
[0130] f h =ResMLP(f mp );
[0131] Among them, f g is a local feature, f mpis the feature obtained after processing by the maximum pooling layer MaxPool, f h It is the high-frequency feature of the local feature.
[0132] The second processing branch is to first transform the local feature f g Input the average pooling layer AvgPool to obtain the feature vector f after the average pooling layer processing ap Then f ap Input the local attention module containing the vector attention algorithm to obtain the low-frequency features f of the local features l .
[0133] f ap =AvgPool(f g );
[0134] f l =LocalAttention(f ap );
[0135] in:
[0136] ResMLP(f mp )=LeakyReLU(BatchNorm(Conv1d(f mp )))+f mp
[0137] LocalAttention represents the local attention module, that is, for the feature vector (S is the number of sampling center points in step 220), and through linear mapping, we get Queries, Keys, and Values, which are abbreviated as Q, K, and V. Then Hierarchical binary clustering is performed in high-dimensional feature space according to its content (features) to ensure that each class has the same size after clustering. The standard multi-head configuration in Transformer (setting 4 heads) is adopted, and each head independently performs the generation and clustering operations of Q, K, and V. The specific process of hierarchical binary clustering is expressed by the formula:
[0138]
[0139]
[0140]
[0141]
[0142] Where c1, c2 represent the original cluster centers, represents the feature cluster obtained after binary clustering. dist represents the Euclidean distance. After n (n=log2L) binary clustering iterations, L feature clusters of equal size are finally obtained. ( K and V are also divided into corresponding subsets according to the same index. and In each feature cluster, Vector Attention (VA) is used to calculate the feature relationship within the feature cluster:
[0143] Y i =VA(Q i ,K i ,V i );
[0144]
[0145] Finally, the features of each feature cluster Merge in original order
[0146] f l =Linear(Y)+f ap
[0147] Step 250: aggregate the features f from the two processing branches h and f l They are concatenated according to the feature dimension, and then pass through a convolution layer with a convolution kernel of 1, a BatchNorm layer, and a LeakyReLU activation function as the feature f of each sampling center point. i :
[0148] f i =LeakyReLU(BatchNorm(Conv1d(||f h ,f l ||)));
[0149] Step 260, repeating step 220, according to the sampling center point in the three-dimensional coordinate space and neighboring points The index of f i The downsampled center point feature can be obtained and neighbor point features Center point feature and neighbor point features Subtract to get relative characteristics Then with the center point feature Concatenate them according to the feature dimension and use a multi-layer perceptron (MLP) to perform dimensionality increase (double the dimension):
[0150]
[0151] MLP=ReLU(BatchNorm(Conv2d(·)));
[0152] Then repeat step 240 and step 250;
[0153] Step 270, repeat step 260 three times, and finally obtain a 32×1024 feature vector, and obtain a 1×1024 feature vector as the final feature representation of the point cloud through a global maximum pooling layer, and finally pass it into the classifier to obtain the classification result.
[0154] Figure 4 A schematic diagram of the structure of the point cloud classification device provided by the present invention, such as Figure 4 As shown, the device comprises:
[0155] A feature extraction module 410 is used to extract features from the original point cloud data to obtain local features of the original point cloud data;
[0156] The processing module 420 is used to input the local feature into the first processing branch to extract the high-frequency feature to obtain the high-frequency feature of the local feature, and input the local feature into the second processing branch to extract the low-frequency feature to obtain the low-frequency feature of the local feature;
[0157] A splicing module 430 is used to splice the high-frequency features with the low-frequency features, and perform dimensionality-upgrading processing on the features obtained after splicing to obtain target features of the original point cloud data;
[0158] The classification module 440 is used to input the target feature into a classifier to obtain a classification result of the original point cloud data. The classifier is trained based on point cloud data samples and their corresponding category labels.
[0159] The point cloud classification device provided by the embodiment of the present invention reduces the complexity of calculation by extracting high-frequency features and low-frequency features from the local features acquired after acquiring the local features of the original point cloud data using two parallel branches, and using the target features after splicing the acquired high-frequency features and low-frequency features for point cloud classification. At the same time, when extracting low-frequency features, based on vector attention processing, a long-distance dependency relationship between point cloud coordinates can be established, further reducing the complexity of subsequent classification and improving the recognition rate of point cloud classification.
[0160] In one embodiment, the processing module 420 is specifically configured to:
[0161] Inputting the local feature into the second processing branch to extract the low-frequency feature to obtain the low-frequency feature of the local feature, including:
[0162] Performing average pooling processing on the local features to obtain a feature vector after average pooling processing;
[0163] Performing hierarchical binary clustering on the feature vector to obtain multiple feature clusters of the feature vector;
[0164] Based on the vector attention algorithm, the feature relationships in each feature cluster are determined respectively, and the obtained multiple feature relationships are merged to obtain the low-frequency features of the local features.
[0165] In one embodiment, the feature extraction module 410 is specifically used for:
[0166] Perform feature extraction on the original point cloud data to obtain local features of the original point cloud data, including:
[0167] Down-sampling the original point cloud data to obtain the sampling center point of the original point cloud data, and determining the neighboring points corresponding to the sampling center point based on the K nearest neighbor algorithm;
[0168] Based on the coordinates of the neighboring points and the coordinates of the sampling center point, the relative position coordinates of the neighboring points and the sampling center point are obtained;
[0169] Splicing the relative position coordinates and the sampling center point according to the coordinate dimension to obtain a spliced six-dimensional coordinate;
[0170] Based on a multi-layer perceptron, the six-dimensional coordinates are mapped to a high-dimensional space to obtain local features of the original point cloud data.
[0171] In one embodiment, the feature extraction module 410 is specifically used for:
[0172] Downsampling the original point cloud data to obtain the sampling center point of the original point cloud data includes:
[0173] Normalize the original point cloud data into a unit sphere, and uniformly sample the normalized original point cloud data to obtain a preset number of point cloud samples;
[0174] Based on the farthest point sampling method, the point cloud samples are downsampled to obtain the sampling center points of the point cloud samples.
[0175] In one embodiment, the splicing module 430 is specifically used for:
[0176] The high-frequency features and the low-frequency features are spliced together, and the spliced features are subjected to dimensionality-increasing processing to obtain target features of the original point cloud data, including:
[0177] The high-frequency feature and the low-frequency feature are concatenated to obtain the feature of the sampling center point;
[0178] The feature of the sampling center point is subjected to a preset number of dimensionality-upgrading processing, and the feature obtained after the dimensionality-upgrading processing is used as the target feature of the original point cloud data.
[0179] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the point cloud classification method, which includes:
[0180] Performing feature extraction on the original point cloud data to obtain local features of the original point cloud data;
[0181] Inputting the local features into the first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into the second processing branch to extract low-frequency features to obtain low-frequency features of the local features;
[0182] The high-frequency features are concatenated with the low-frequency features, and the concatenated features are subjected to dimensionality-enhancing processing to obtain target features of the original point cloud data;
[0183] The target feature is input into a classifier to obtain a classification result of the original point cloud data, and the classifier is trained based on point cloud data samples and their corresponding category labels.
[0184] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0185] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer can execute the point cloud classification method provided by the above methods, the method comprising:
[0186] Performing feature extraction on the original point cloud data to obtain local features of the original point cloud data;
[0187] Inputting the local features into the first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into the second processing branch to extract low-frequency features to obtain low-frequency features of the local features;
[0188] The high-frequency features are concatenated with the low-frequency features, and the concatenated features are subjected to dimensionality-enhancing processing to obtain target features of the original point cloud data;
[0189] The target feature is input into a classifier to obtain a classification result of the original point cloud data, and the classifier is trained based on point cloud data samples and their corresponding category labels.
[0190] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the above-mentioned point cloud classification method, the method comprising:
[0191] Performing feature extraction on the original point cloud data to obtain local features of the original point cloud data;
[0192] Inputting the local features into the first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into the second processing branch to extract low-frequency features to obtain low-frequency features of the local features;
[0193] The high-frequency features are concatenated with the low-frequency features, and the concatenated features are subjected to dimensionality-enhancing processing to obtain target features of the original point cloud data;
[0194] The target feature is input into a classifier to obtain a classification result of the original point cloud data, and the classifier is trained based on point cloud data samples and their corresponding category labels.
[0195] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0196] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0197] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A point cloud classification method, characterized in that: The method comprises: Performing feature extraction on the original point cloud data to obtain local features of the original point cloud data; Inputting the local features into the first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into the second processing branch to extract low-frequency features to obtain low-frequency features of the local features; The high-frequency features are concatenated with the low-frequency features, and the concatenated features are subjected to dimensionality-enhancing processing to obtain target features of the original point cloud data; Inputting the target feature into a classifier to obtain a classification result of the original point cloud data, wherein the classifier is trained based on point cloud data samples and their corresponding category labels; The step of inputting the local feature into a second processing branch to extract a low-frequency feature to obtain the low-frequency feature of the local feature includes: Performing average pooling processing on the local features to obtain a feature vector after average pooling processing; Performing hierarchical binary clustering on the feature vector to obtain multiple feature clusters of the feature vector; Based on the vector attention algorithm, feature relationships in each feature cluster are determined respectively, and the obtained multiple feature relationships are merged to obtain low-frequency features of the local features; The step of inputting the local feature into the first processing branch to extract high-frequency features to obtain high-frequency features of the local feature includes: Performing maximum pooling processing on the local features to obtain local features after maximum pooling processing; The local features after the maximum pooling process are subjected to residual processing to obtain high-frequency features of the local features.
2. The point cloud classification method according to claim 1, characterized in that: The extracting features of the original point cloud data to obtain local features of the original point cloud data includes: Down-sampling the original point cloud data to obtain the sampling center point of the original point cloud data, and determining the neighboring points corresponding to the sampling center point based on the K nearest neighbor algorithm; Based on the coordinates of the neighboring points and the coordinates of the sampling center point, the relative position coordinates of the neighboring points and the sampling center point are obtained; Splicing the relative position coordinates and the sampling center point according to the coordinate dimension to obtain a spliced six-dimensional coordinate; Based on a multi-layer perceptron, the six-dimensional coordinates are mapped to a high-dimensional space to obtain local features of the original point cloud data.
3. The point cloud classification method according to claim 2, characterized in that: The downsampling of the original point cloud data to obtain the sampling center point of the original point cloud data includes: Normalize the original point cloud data into a unit sphere, and uniformly sample the normalized original point cloud data to obtain a preset number of point cloud samples; Based on the farthest point sampling method, the point cloud samples are downsampled to obtain the sampling center points of the point cloud samples.
4. The point cloud classification method according to claim 1, characterized in that: The step of splicing the high-frequency features with the low-frequency features and performing dimension-upgrading processing on the features obtained after splicing to obtain the target features of the original point cloud data includes: The high-frequency feature and the low-frequency feature are concatenated to obtain the feature of the sampling center point; The feature of the sampling center point is subjected to a preset number of dimensionality-upgrading processing, and the feature obtained after the dimensionality-upgrading processing is used as the target feature of the original point cloud data.
5. A point cloud classification device, characterized in that: include: A feature extraction module is used to extract features from the original point cloud data to obtain local features of the original point cloud data; A processing module, used for inputting the local features into a first processing branch to extract high-frequency features to obtain high-frequency features of the local features, and inputting the local features into a second processing branch to extract low-frequency features to obtain low-frequency features of the local features; A splicing module, used to splice the high-frequency features with the low-frequency features, and perform dimensionality-upgrading processing on the features obtained after splicing to obtain target features of the original point cloud data; A classification module, used for inputting the target features into a classifier to obtain a classification result of the original point cloud data, wherein the classifier is trained based on point cloud data samples and their corresponding category labels; The step of inputting the local feature into a second processing branch to extract a low-frequency feature to obtain the low-frequency feature of the local feature includes: Performing average pooling processing on the local features to obtain a feature vector after average pooling processing; Performing hierarchical binary clustering on the feature vector to obtain multiple feature clusters of the feature vector; Based on the vector attention algorithm, feature relationships in each feature cluster are determined respectively, and the obtained multiple feature relationships are merged to obtain low-frequency features of the local features; The step of inputting the local feature into the first processing branch to extract high-frequency features to obtain high-frequency features of the local feature includes: Performing maximum pooling processing on the local features to obtain local features after maximum pooling processing; The local features after the maximum pooling process are subjected to residual processing to obtain high-frequency features of the local features.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the point cloud classification method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the point cloud classification method according to any one of claims 1 to 4 is implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the point cloud classification method according to any one of claims 1 to 4 is implemented.
