A laser radar point cloud data completion system and method based on a PCN model
The LiDAR point cloud data completion system based on the PCN model solves the problems of data format compatibility and low completion accuracy, and achieves high-precision point cloud data processing and completion. It is applicable to point cloud data of various formats, and in particular, it improves the density and geometric continuity of vehicle point clouds in forest environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV OF SCI & TECH
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-05
AI Technical Summary
Existing PCN models suffer from poor data format compatibility, low completion accuracy, and unstable training when processing large-scale and complexly occluded LiDAR point cloud data, making it difficult to adapt to vehicle point cloud data completion in forest environments.
A LiDAR point cloud data completion system based on the PCN model was designed, including data loading, processing, completion, and visualization modules. The system reads point cloud data in various formats through a filename matching mechanism, performs data preprocessing and feature mapping, completes the data by combining an encoder and decoder, optimizes model training using a loss function, and generates high-precision point cloud data.
It improves the completion accuracy and robustness of point cloud data, and is suitable for processing point cloud data in various formats. In particular, it significantly improves the density and geometric continuity of vehicle point clouds in forest environments, thereby enhancing the integrity and usability of point cloud data.
Smart Images

Figure CN121616759B_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a point cloud data completion system and method based on the PCN model for LiDAR, relating to the field of point cloud data processing technology, and particularly to the field of three-dimensional point cloud data completion or data generation technology. Specifically, it refers to a point cloud data completion system and method that supports multiple point cloud formats and can adaptively process large-scale geographic coordinates such as LiDAR. Background Technology
[0002] LiDAR point cloud data accurately depicts the true three-dimensional structure of the vehicle's surrounding environment using millions of laser points per second. The data is stored in both LAX and LAZ formats. Each data point in the LiDAR point cloud data contains precise three-dimensional point cloud geographic coordinates, and the point cloud coordinate range is hundreds of meters, which is the foundation for realizing autonomous driving control.
[0003] PCN is a classic point cloud completion network that quickly completes point cloud data through point-by-point feature encoding. However, its accuracy is not high, and it is suitable for processing point cloud data with regular shapes and small coordinate ranges. But when processing point cloud data with complex occlusion and sparse data, it suffers from problems such as loss of geometric details. When processing large-scale coordinates, it suffers from data overflow, normalization failure, and training instability, making it difficult to handle LiDAR point cloud data completion for vehicles in forest environments. Existing point cloud data completion systems, especially those based on the PCN model, mostly only support reading and processing PLY format files when processing 3D point cloud data. This results in poor data format compatibility and makes it impossible to directly process LiDAR point cloud data. When processing LiDAR point cloud data, an additional format parser is required to convert the point cloud data file format. It cannot directly read different types of data or mixed data of multiple types, resulting in low data reading efficiency and a high risk of data reading and conversion errors.
[0004] Therefore, there is a need for a system and method that can read and parse multi-format point cloud data, improve the accuracy of point cloud data completion with complex occlusion structures, and is applicable to vehicle point cloud data completion in forest environments. Summary of the Invention
[0005] The purpose of this invention is to provide a lidar point cloud data completion system and method based on the PCN model, so as to solve the problems of low point cloud data completion accuracy caused by poor data format compatibility, numerical overflow or training instability when the point cloud data coordinate range is large, and low robustness of point cloud file matching and loading in the prior art.
[0006] To address the aforementioned issues, this invention provides a LiDAR point cloud data completion system based on the PCN model, comprising a data loading module, a data processing module, a data completion module, a model training and optimization module, and a data visualization module. The data loading module reads and parses point cloud data files in any of the four formats: LAS, LAZ, TXT, and PLY. Based on a filename matching mechanism, it pairs the point cloud data files to obtain incomplete and complete paired data, and constructs and divides the dataset.
[0007] The data processing module performs data preprocessing on the incomplete and complete pairing data to obtain standardized incomplete and complete pairing data, including incomplete point cloud data and complete point cloud data;
[0008] The data completion module constructs a point cloud data completion model based on the PCN model. It completes the incomplete point cloud data based on the encoder and decoder. The encoder and decoder are connected through feature mapping. The encoder's input is the incomplete point cloud data, and its output is global features and point-level features. The decoder's input is global features and point-level features, and its output is the point cloud completion data.
[0009] The model training and optimization module compares and analyzes point cloud completion data with complete point cloud data, performs training supervision and hyperparameter optimization on the point cloud data completion model based on the loss function, and obtains the weight file.
[0010] The visualization module provides a visual representation of the point cloud completion data.
[0011] In the data loading module, the path, category, and segmentation of point cloud data files are set, the data loading logic is defined, and a multi-source data reading and fusion interface is constructed. Based on the category of the point cloud data file, the file path is used to locate the point cloud data file. A unified interface is used to read and parse point cloud data files in LAS, LAZ, TXT, and PLY formats, obtaining the 3D coordinates of each data point in the point cloud data and constructing... The data matrix Represents data points in point cloud data The total number, The first point cloud data One data point;
[0012] For LAS and LAZ format point cloud data files, the scaling factor and offset parameters are parsed.
[0013] Perform delimiter recognition and error tolerance processing on TXT format point cloud data files;
[0014] Based on the filename matching mechanism, a three-level matching strategy is adopted to pair corresponding incomplete point cloud files and complete point cloud files in the point cloud data files and output matching logs to obtain incomplete and complete paired data, construct and divide the dataset. The pairing rules include complete matching, suffix stripping matching and prefix replacement matching.
[0015] Based on the data processing module, incomplete and complete pairing data are preprocessed, including data sampling, data denoising and data normalization, to obtain standardized incomplete and complete pairing data.
[0016] Data sampling includes defining a fixed number of points in the data processing module, performing point cloud sampling on incomplete and complete paired data based on the fixed number of points, repeating sampling for point cloud data with a total number of data points less than the fixed number of points, retaining all data points in the point cloud data for point cloud data with a total number of data points equal to the fixed number of points, and downsampling the point cloud data for point cloud data with a total number of data points greater than the fixed number of points, ensuring that the number of data points sampled in each point cloud data is a fixed number, and obtaining sampled paired data;
[0017] Data denoising includes defining the neighborhood radius and minimum threshold in the data processing module, denoising the sampled paired data based on neighborhood density statistics, removing isolated points and sparse data points in the residual cloud data, including counting the number of remaining data points in the residual cloud data whose distance from the center data point does not exceed the neighborhood radius, obtaining the statistical value of the center data point, deleting the center data points whose statistical value is less than the minimum threshold, and obtaining denoised paired data.
[0018] Data normalization includes eliminating geographic coordinate offset based on dynamic coordinate translation and unifying the scale of point cloud data based on adaptive normalization. Eliminating geographic coordinate offset based on dynamic coordinate translation includes calculating the centroid of each point cloud data in the denoised paired data, using the point cloud centroid as the origin to construct a coordinate system. Unifying the scale of point cloud data based on adaptive normalization includes calculating the distance between each data point in the point cloud data and the centroid, obtaining the maximum distance, scaling the point cloud data based on the maximum distance, scaling the point cloud data to a unit sphere, and obtaining standardized incomplete paired data, including incomplete point cloud data and complete point cloud data.
[0019] The data completion module includes an encoder and a decoder, which are cascaded and connected via feature mapping. The encoder's input is incomplete cloud data. Based on the KNN neighborhood aggregation algorithm, a KD-tree or ball query is used to perform a neighborhood search on each data point in the incomplete cloud data to find the nearest neighbor. Individual data points Construct data points from the nearest neighboring data points. neighborhood Calculate the neighborhood data points relative to The offset is used to obtain data points through a shared multilayer perceptron or one-dimensional convolution. neighborhood features Using symmetric functions to aggregate neighborhood features, structural cues are generated. ;
[0020] Build a shared multilayer perceptron to learn data points initial point features Combine original point features with structural cues Perform splicing to obtain structural features ;
[0021] Introducing a grouped vector attention mechanism to integrate initial point features Divided into The system calculates the attention weights for the initial point features in each group, obtains the weighted group features corresponding to each initial point feature based on the attention weights, and summarizes the weighted group features to obtain the data points. Point-level features;
[0022] Max pooling is used to process the point-level features of all data points in the residual cloud data to obtain global features. .
[0023] The decoder includes a coarse point cloud generation stage and a dense point cloud generation stage;
[0024] In the coarse point cloud generation stage, the decoder's input is global features. A coarse point cloud with a fixed number of points is generated by a multilayer perceptron, which serves as the skeleton for completing the point cloud data.
[0025] The input to the dense point cloud generation stage is global features. The system analyzes the point-level features of each data point in the incomplete point cloud data, and the coarse point cloud data. Based on the point-level features, it determines the completion strength and fine-point budget of each data point in the coarse point cloud data. A normalization function is used to dynamically allocate completion weights to the completion strength of each data point. Based on the completion weights and fine-point budgets, the system then applies completion weights to the data points. Fine dots are generated around it.
[0026] For each data point in the coarse point cloud data, a local two-dimensional grid is generated in the neighborhood of the data point based on the fine point budget. Global features are then processed within this grid. The point-level features and completion weights of the data points are spliced together to generate fine points. Based on the multi-dimensional sequence folding technology of direction vector and lattice tiling, the folding displacement of the local two-dimensional mesh to the three-dimensional mesh is predicted. The generated fine points are superimposed on the data points corresponding to the coarse point cloud data to generate dense point cloud data, which belongs to point cloud completion data.
[0027] The model training and optimization module includes a training phase and an inference phase. In the training phase, the model training and optimization module trains and optimizes the point cloud data completion model of the data completion module based on incomplete and complete paired data and loss function. It compares and analyzes the point cloud completion data with the complete point cloud data, obtains the model training parameters, and obtains the weight file.
[0028] During the inference phase, the weight file is called to import the weight parameters after model training into the data completion module. The point cloud data completion model completes the point cloud data to be completed, generating point cloud completion data. The point cloud completion data is then visualized through the visualization module.
[0029] The loss function is a joint loss, which includes coarse loss and dense loss. It is obtained by calculating the chamfer distance between coarse point cloud data and complete point cloud data, and between dense point cloud data and coarse point cloud data.
[0030] ;
[0031] ;
[0032] ;
[0033] in, Indicates the chamfer distance. Indicates joint loss, This is the roughness loss coefficient. For dense loss coefficient, Represents coarse point cloud data. Represents dense point cloud data. Represents complete point cloud data. Data points representing coarse point cloud data, Data points representing dense point cloud data, Data points representing complete point cloud data, This represents the square of the Euclidean distance.
[0034] To address the above problems, this invention also provides a method for completing lidar point cloud data based on a PCN model. The point cloud data completion system includes:
[0035] S1. Obtain the raw point cloud data file, including the dataset construction file and the point cloud data file to be completed. The dataset construction file includes the incomplete point cloud data file and the complete point cloud data file.
[0036] S2. Parse the original point cloud data file according to its file type to obtain the three-dimensional coordinates of each data point in the original point cloud data file;
[0037] S3. Based on the filename matching mechanism, pair the incomplete point cloud data file with the complete point cloud data file, obtain the incomplete and complete paired data, and construct the point cloud data completion dataset;
[0038] S4. Perform data preprocessing on the point cloud data in the point cloud data completion dataset and the point cloud data file to be completed to obtain standardized incomplete and complete paired data and standardized point cloud data to be completed;
[0039] S5. Construct a point cloud data completion model based on the PCN model. Divide the point cloud data completion dataset into a training set and a validation set according to the proportion. Train the point cloud data completion model based on the training set, obtain the weight parameters, construct the weight file, and perform hyperparameter optimization and performance evaluation on the point cloud data completion model based on the validation set.
[0040] S6. Input the point cloud data to be completed in S4 into the point cloud completion model in S5, call the weight file to complete the point cloud data to be completed, obtain the point cloud completion data, and visualize the point cloud completion data.
[0041] Point cloud data files to be completed are acquired using LiDAR. The LAS, LAZ, TXT, and PLY formats of the point cloud data files are parsed. This includes parsing scaling factors and offset parameters for LAS and LAZ format files, and delimiter identification and error correction for TXT format files, to obtain the point cloud data to be completed. , This indicates the total number of data points in the point cloud data to be completed. It stores the three-dimensional coordinate information and category labeling information of the data points;
[0042] right Data preprocessing is performed, including denoising the point cloud data to be completed based on neighborhood density statistics, removing isolated points and sparse points in the point cloud data, eliminating the geographic coordinate translation of the point cloud data to be completed based on dynamic coordinate translation, and unifying the coordinate scale of the point cloud data to be completed based on adaptive normalization.
[0043] The training weight file is called, and the data completion module is used to perform data processing based on the weight parameters. Perform data completion and obtain the completed point cloud data. Through the visualization module To provide a visual presentation.
[0044] Compared with existing technologies, this invention has the following advantages: This invention effectively suppresses broadband stationary noise interference in the ocean through improved local mean decomposition, achieves efficient calculation of the fundamental frequency estimation of dolphin whistle signals by combining matrix-accelerated nonlinear least squares estimation, and uses piecewise adaptive Gaussian process regression to synchronously complete noise-robust trajectory optimization and physiologically feasible gap reconstruction, which can significantly improve tracking accuracy in low signal-to-noise ratio environments, ensure robust gain in noisy scenarios, and ultimately effectively reduce fundamental frequency trajectory error, ensuring the complete extraction of individual identity features, and providing high-precision, low-latency reliable technical support for marine biological acoustic monitoring. Attached Figure Description
[0045] Figure 1 This is an overall structural diagram of the point cloud data completion system provided by the present invention;
[0046] Figure 2 This is a flowchart illustrating point cloud data completion based on the point cloud completion system and method provided by this invention;
[0047] Figure 3 This is the original point cloud data map;
[0048] Figure 4 To base on the original PCN model Figure 3 The result of point cloud data completion;
[0049] Figure 5 The point cloud data completion system provided by this invention provides... Figure 3 The result of point cloud data completion;
[0050] Figure 6 The image shows the result of the point cloud data completion system provided by this invention completing large-scale coordinate point cloud data. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0052] Example 1
[0053] A LiDAR point cloud data completion system based on the PCN model includes a data loading module, a data processing module, a data completion module, a model training and optimization module, and a data visualization module. The data loading module reads and parses point cloud data files in any of the four formats: LAS, LAZ, TXT, and PLY. It pairs point cloud data files based on a filename matching mechanism to obtain incomplete and complete paired data, and constructs and divides the dataset.
[0054] The data processing module performs data preprocessing on the incomplete and complete pairing data to obtain standardized incomplete and complete pairing data, including incomplete point cloud data and complete point cloud data;
[0055] The data completion module constructs a point cloud data completion model based on the PCN model. It uses an encoder and decoder to complete incomplete point cloud data. The encoder and decoder are connected via feature mapping. The encoder's input is the incomplete point cloud data, and its output is global features and point-level features. The decoder's input is global features and point-level features, and its output is the completed point cloud data. The point cloud data completion model consists of two parts: an encoder for learning features and a decoder for generating the complete point cloud. The encoder consists of two layers of one-dimensional convolution (Conv1D) and batch normalization (BatchNorm), which transforms the input 3D point coordinates (x, y, z) into higher-dimensional abstract features, captures local geometric relationships, and then extracts the global feature vector of the entire object through "global max pooling," providing global semantic information for decoding. The decoder generates a "coarse" point cloud structure using a multilayer perceptron (MLP). Then, using a "folding mechanism," essentially unfolding a 2D grid on the surface of the coarse point cloud, it refines each point locally, making the completed point cloud surface smoother and structurally complete. The final output consists of two levels of results: coarse point cloud and fine point cloud, used for multi-stage optimization.
[0056] The model training and optimization module compares and analyzes point cloud completion data with complete point cloud data. Based on the loss function, it performs supervised training and hyperparameter optimization on the point cloud data completion model and obtains the weight file. The model training and optimization module can automatically create directory hierarchy according to the category of point cloud data, and dynamically adjust file paths and logs. The number of training iterations is 300 epochs and the batch size is 16.
[0057] The visualization module provides a visual representation of the point cloud completion data, and the display range of the visualization module can be adjusted in real time according to the maximum radius of the scaled point cloud.
[0058] In the data loading module, the path, category, and segmentation of the point cloud data file are set, and the data loading logic is defined. In the ShapeNet class of the PCN model, the extended function `read_point_cloud` for reading point cloud data is set, and a multi-source data reading and fusion interface is constructed. Based on the category of the point cloud data file, the file path is used to locate the point cloud data file. A unified interface is used to read and parse point cloud data files in LAS, LAZ, TXT, and PLY formats. When reading point cloud data files of different formats, the corresponding database and custom parsing methods are called to obtain the 3D coordinates of each data point in the point cloud data, and a system is built. The data matrix Represents data points in point cloud data The total number, The first point cloud data One data point;
[0059] For LAS and LAZ format point cloud data files, the scaling factor and offset parameters are parsed.
[0060] For TXT format point cloud data files, delimiter recognition and error tolerance are performed. First, np.loadtxt is used to quickly read the TXT format point cloud data file. If the reading fails, regular expressions are used to process various delimiters.
[0061] Based on the filename matching mechanism, a three-level matching strategy is adopted to pair corresponding incomplete point cloud files and complete point cloud files in the point cloud data files and output matching logs to obtain incomplete and complete paired data, construct and divide the dataset. The pairing rules include complete matching, suffix stripping matching and prefix replacement matching.
[0062] The exact match filename must be exactly the same as the target string, including capitalization, extension, and path. The suffix stripping match ignores the suffix part of the filename (such as the extension) and only matches the body of the filename. The prefix replacement match replaces a specific prefix at the beginning of the filename with a uniform value before matching.
[0063] Based on the data processing module, incomplete and complete pairing data are preprocessed, including data sampling, data denoising and data normalization, to obtain standardized incomplete and complete pairing data.
[0064] Data sampling involves defining a fixed number of points in the data processing module, sampling incomplete and complete paired data based on this fixed number of points, and performing point cloud sampling on point cloud data with a total number of data points less than the fixed number. For point cloud data with a total number of data points equal to the fixed number, all data points in the point cloud data are retained. For point cloud data with a total number of data points greater than the fixed number, the farthest point sampling method is used to downsample the point cloud data, ensuring that the number of data points sampled in each point cloud data is the fixed number, thus obtaining sampled paired data. Downsampling the point cloud data with the farthest point sampling method for point cloud data with a total number of data points greater than the fixed number preserves the shape features of the point cloud. For empty files or files that fail to be read, the data processing module generates a random point cloud or a zero tensor to ensure the continuity of the training process.
[0065] Data denoising includes defining the neighborhood radius and minimum threshold in the data processing module, denoising the sampled paired data based on neighborhood density statistics, removing isolated points and sparse data points in the residual cloud data, including counting the number of remaining data points in the residual cloud data whose distance from the center data point does not exceed the neighborhood radius, obtaining the statistical value of the center data point, deleting the center data points whose statistical value is less than the minimum threshold, and obtaining denoised paired data.
[0066] Data normalization includes eliminating geographic coordinate offset based on dynamic coordinate translation and unifying the scale of point cloud data based on adaptive normalization; eliminating geographic coordinate offset based on dynamic coordinate translation includes calculating the centroid of each point cloud data in the denoised paired data. , This refers to data points in point cloud data. The total number of points is calculated by constructing a coordinate system with the centroid of the point cloud as the origin. Coordinates in a coordinate system The scaling of point cloud data based on adaptive normalization includes calculating the distance between each data point in the point cloud data and the centroid, and obtaining the maximum distance. Based on maximum distance Scaling the point cloud data to fit within a unit sphere. The maximum radius of the scaled point cloud, data points The Euclidean distance to the origin (centroid) is The system obtains standardized incomplete point cloud data, including incomplete point cloud data and complete point cloud data. During point cloud normalization, the data processing module detects the coordinate range of the point cloud data. If the range is too large (e.g., greater than 1000), the data points are first translated (minus the minimum value or centroid) before normalization, which helps in processing large-scale geographic coordinate point clouds. By setting a coordinate range threshold in the data processing module, the system automatically distinguishes between regular point clouds and geographic coordinate point clouds; point clouds exceeding the coordinate range threshold (e.g., greater than 1000) are classified as geographic coordinate point clouds.
[0067] The data completion module includes an encoder and a decoder, which are cascaded and connected via feature mapping. The encoder's input is incomplete cloud data. Based on the KNN neighborhood aggregation algorithm, a KD-tree or ball query is used to perform a neighborhood search on each data point in the incomplete cloud data to find the nearest neighbor. Individual data points Construct data points from the nearest neighboring data points. neighborhood Calculate the neighborhood data points relative to The offset is used to obtain data points through a shared multilayer perceptron or one-dimensional convolution. neighborhood features Using symmetric functions to aggregate neighborhood features, structural cues are generated. ;
[0068] Build a shared multilayer perceptron to learn data points initial point features Combine original point features with structural cues Perform splicing to obtain structural features ;
[0069] Introducing the Dynamic Group Attention (GVA) mechanism, initial point features are... Divided into The system calculates the attention weights for the initial point features in each group, obtains the weighted group features corresponding to each initial point feature based on the attention weights, and summarizes the weighted group features to obtain the data points. Point-level features; weighted group features are calculated using GVA, and weights are set for each group to replace the original PCN model's "equal weight for all channels". Higher weights are set for occlusion and edge regions, which improves the network model's learning of occlusion and improves the data completion accuracy of forest vehicle point clouds.
[0070] Max pooling is used to process the point-level features of all data points in the residual cloud data to obtain global features. .
[0071] The decoder includes a coarse point cloud generation stage and a dense point cloud generation stage;
[0072] In the coarse point cloud generation stage, the decoder's input is global features. A coarse point cloud with a fixed number of points is generated by a multilayer perceptron, which serves as the skeleton for completing the point cloud data.
[0073] The input to the dense point cloud generation stage is global features. The system analyzes the point-level features of each data point in the incomplete point cloud data, and the coarse point cloud data. Based on the point-level features, it determines the completion strength and fine-point budget of each data point in the coarse point cloud data. A normalization function is used to dynamically allocate completion weights to the completion strength of each data point. Based on the completion weights and fine-point budgets, the system then applies completion weights to the data points. Fine dots are generated around it.
[0074] For each data point in the coarse point cloud data, a local two-dimensional grid is generated in the neighborhood of the data point based on the fine point budget. Global features are then processed within this grid. The point-level features and completion weights of the data points are spliced together to generate fine points. Based on the multi-dimensional sequence folding technology of direction vector and lattice tiling, the folding displacement of the local two-dimensional mesh to the three-dimensional mesh is predicted. The generated fine points are superimposed on the data points corresponding to the coarse point cloud data to generate dense point cloud data, which belongs to point cloud completion data.
[0075] The model training and optimization module includes a training phase and an inference phase. In the training phase, the model training and optimization module trains and optimizes the point cloud data completion model of the data completion module based on incomplete and complete paired data and loss function. It compares and analyzes the point cloud completion data with the complete point cloud data, obtains the model training parameters, and obtains the weight file.
[0076] During the inference phase, the weight file is called to import the weight parameters after model training into the data completion module. The point cloud data completion model completes the point cloud data to be completed, generating point cloud completion data. The point cloud completion data is then visualized through the visualization module.
[0077] The loss function is a joint loss, which includes coarse loss and dense loss. It is obtained by calculating the chamfer distance between coarse point cloud data and complete point cloud data, and between dense point cloud data and coarse point cloud data.
[0078] ;
[0079] ;
[0080] ;
[0081] in, Indicates the chamfer distance. Indicates joint loss, This is the roughness loss coefficient. For dense loss coefficient, Represents coarse point cloud data. Represents dense point cloud data. Represents complete point cloud data. Data points representing coarse point cloud data, Data points representing dense point cloud data, Data points representing complete point cloud data, This represents the square of the Euclidean distance.
[0082] Example 2
[0083] A method for completing lidar point cloud data based on a PCN model, using the aforementioned point cloud data completion system, includes:
[0084] S1. Obtain the raw point cloud data file, including the dataset construction file and the point cloud data file to be completed. The dataset construction file includes the incomplete point cloud data file and the complete point cloud data file.
[0085] S2. Parse the original point cloud data file according to its file type to obtain the three-dimensional coordinates of each data point in the original point cloud data file;
[0086] S3. Based on the filename matching mechanism, pair the incomplete point cloud data file with the complete point cloud data file, obtain the incomplete and complete paired data, and construct the point cloud data completion dataset;
[0087] S4. Perform data preprocessing on the point cloud data in the point cloud data completion dataset and the point cloud data file to be completed to obtain standardized incomplete and complete paired data and standardized point cloud data to be completed;
[0088] S5. Construct a point cloud data completion model based on the PCN model. Divide the point cloud data completion dataset into a training set and a validation set according to the proportion. Train the point cloud data completion model based on the training set, obtain the weight parameters, construct the weight file, and perform hyperparameter optimization and performance evaluation on the point cloud data completion model based on the validation set.
[0089] S6. Input the point cloud data to be completed in S4 into the point cloud completion model in S5, call the weight file to complete the point cloud data to be completed, obtain the point cloud completion data, and visualize the point cloud completion data.
[0090] Point cloud data files to be completed are acquired using LiDAR. The LAS, LAZ, TXT, and PLY formats of the point cloud data files are parsed. This includes parsing scaling factors and offset parameters for LAS and LAZ format files, and delimiter identification and error correction for TXT format files, to obtain the point cloud data to be completed. , This indicates the total number of data points in the point cloud data to be completed. It stores the three-dimensional coordinate information and category labeling information of the data points; for Data preprocessing is performed, including denoising the point cloud data to be completed based on neighborhood density statistics, removing isolated and sparse points, eliminating geographic coordinate translation based on dynamic coordinate translation, and unifying the coordinate scale of the point cloud data based on adaptive normalization; the training weight file is called, and the data completion module is used to complete the data based on the weight parameters. Perform data completion and obtain the completed point cloud data. Through the visualization module To provide a visual presentation.
[0091] Figure 1 The overall structure diagram of the point cloud data completion system provided by this invention is as follows: Figure 1 As shown, the point cloud data completion system provided by this invention includes a data loading module, a data processing module, a data completion module, a model training and optimization module, and a data visualization module. The data loading module is used to process LAS, LAZ, TXT, and PLY data. The system reads and parses point cloud data files in LAX / LAZ format, and constructs paired datasets of incomplete and complete point clouds based on a filename matching mechanism. The data loading module takes the original point cloud data file as input, reads LAX / LAZ format lidar point cloud data files using the laspy library, calculates the scaling and offset parameters of the point cloud data, and converts the integer coordinates of the data points in the point cloud data to actual floating-point coordinates. The data processing module performs denoising, coordinate translation, and scale normalization on both incomplete and complete point clouds to obtain standardized point cloud data. The data completion module constructs a point cloud completion network based on the PCN model, extracts features from the incomplete point cloud and completes the point cloud through an encoder and decoder, generating completed point cloud data. The model training and optimization module compares and analyzes the completed and complete point cloud data, performs supervised training and parameter optimization on the point cloud completion model based on a loss function, and obtains the model weight file. The data visualization module visualizes the point cloud completion results.
[0092] Figure 2 The following is an overall flowchart of point cloud data completion based on the point cloud data completion system and method provided by this invention: Figure 2As shown, incomplete point cloud data files are obtained through LiDAR scanning, and data annotation is performed on the incomplete point cloud data files. Complete point cloud data files corresponding to some of the original point cloud data files to be completed are obtained through multi-angle LiDAR scanning and file data integration. A dataset file is constructed based on the pairable incomplete point cloud data files and complete point cloud data files, and the dataset file is supplemented by existing public datasets. The dataset file includes four formats: LAS, LAZ, TXT, and PLY. Point cloud data files in four formats—LAS, LAZ, TXT, and PLY—are input into the data loading module. The data loader is initialized in the point cloud data completion system, setting the data path, data category, and dataset partitioning (training set, validation set, test set, etc.). Data acquisition and loading are performed through the data loading model. First, the data loading module traverses the incomplete point cloud directory, collecting all supported incomplete point cloud files and constructing a set of incomplete point cloud data files (N sets of incomplete point cloud file paths). Simultaneously, it collects all point cloud files in the complete point cloud directory, constructing a set of complete point cloud files (N sets of complete point cloud file paths). The LAS, LAZ, TXT, and PLY point cloud data files are read and parsed to obtain the corresponding point cloud data files. For each incomplete point cloud file, a multi-strategy matching algorithm is used to find the corresponding complete point cloud file, establishing a correspondence between incomplete and complete point clouds using a three-level matching strategy. Point cloud data is read, selecting the appropriate reading method based on the file extension. The read point cloud data undergoes adaptive coordinate normalization processing using the data processing model. First, the data processing module calculates the coordinate range of the point cloud. If the range exceeds a threshold (e.g., 1000 units), it is determined to be geographic coordinates, and a translation operation (subtracting the minimum value) is performed before centering; otherwise, centering is performed directly. The point cloud data is first sampled. If the number of point clouds is greater than the target number, farthest point sampling (FPS) is used for downsampling; if the number of point clouds is less than the target number, repeated sampling is used until the target number is reached. Outliers are filtered out while maintaining spatial consistency of the point cloud. The point cloud center is calculated, the point cloud is translated to the center, and the maximum distance is calculated. The point cloud is then scaled to within a unit sphere (within a uniform scale). The processed point cloud pairs (incomplete and complete point clouds) are returned, outputting standardized incomplete point cloud data for subsequent point cloud completion model training or testing.The data completion module constructs a point cloud data completion model, GSD-PCFormer, based on the PCN model. The encoder extracts local geometric features from the point cloud data based on neighborhood relationships and then encodes these local geometric features layer by layer to extract global features. Global features are used to weight and enhance key structural information in the local features. The decoder estimates the local point density of the point cloud data through adaptive estimation and obtains density adjustment information. A coarse point cloud is generated based on the global features, and detailed completion and shape optimization are performed on the coarse point cloud based on the density adjustment information to obtain a fine point cloud. The completed point cloud structure is output. The model training and optimization module compares and analyzes the completed point cloud data with the complete point cloud data. Based on the loss function, the point cloud data completion model undergoes supervised training and hyperparameter optimization, and a weight file is obtained. The final completed point cloud result and model parameters are output through the visualization module.
[0093] Figure 3 This invention provides raw point cloud data obtained from a forest understory scene. In the image, green data points represent vegetation point cloud data, yellow data points represent ground point cloud data, and white data points represent vehicle point cloud data. When scanning with LiDAR, the vehicle point cloud data is sparsely distributed due to environmental occlusion, resulting in incomplete vehicle outlines and unclear overall vehicle structure. The vehicle point cloud data (the dataset composed of white data points) is used as the point cloud data to be completed. The original PCN model and the point cloud data completion model provided in this invention are then used to complete the data. Figure 3 The point cloud data of vehicles in the middle is completed. The result of the point cloud data completion based on the original PCN model is shown in the figure below. Figure 4 As shown in the figure, the result of data completion based on the point cloud data completion model provided by this invention is as follows: Figure 5 As shown. Comparison Figure 3 and Figure 4 It can be seen that the original PCN model can increase the density of point cloud data points when processing point cloud data. It achieves high completion accuracy for point cloud data with densely distributed and regularly shaped points (such as point cloud data from a vehicle hood), but lower completion accuracy for point cloud data with sparse points and complex geometric structures (such as the top of a vehicle). Figure 3 , Figure 4 , Figure 5 It can be seen that the point cloud data completion system provided by this invention can effectively recover the geometric structural features of objects (such as vehicles) when dealing with incomplete data in sparse point clouds or point clouds with complex occlusion structures. Figure 5The overall structure of the vehicle, the geometry of its side windows, and the roof window are all restored, achieving high accuracy in point cloud data completion, making it suitable for fields such as intelligent driving. This invention combines coarse and fine point cloud restoration to perform targeted completion of vehicle point clouds, effectively improving the integrity and structural representation of the point cloud. Compared to the incomplete point cloud before completion, this method significantly improves the density and geometric continuity of the vehicle point cloud, thereby enhancing the accuracy and usability of point cloud data completion.
[0094] Figure 6 This image shows the result of the point cloud data completion system provided by this invention performing data completion on a large-scale coordinate point cloud. A DJI Zenmuse L2 drone was used to scan the target area for large-scale point cloud data. During point cloud data acquisition, the drone equipped with a LiDAR flew at a speed of 15 m / s and an altitude of 80 m. The LiDAR's phase overlap rate was 60%, the point cloud density was 200 points / m², the forward overlap rate was 60%, and the lateral overlap rate was 40%. The acquired large-scale coordinate point cloud data was input into the point cloud data completion model for data completion. First, the point cloud data underwent dynamic coordinate translation and normalization processing, scaling all point cloud data to within a unit sphere. The loss function was constructed by calculating the average squared Euclidean distance or Euclidean distance in the normalized coordinate space. This invention sets the number of training iterations (Epoch) to 300. When Epoch=1, the total loss of the model is 937 and the CD is 916; when Epoch=300, the total loss of the model is 11 and the CD is 26. The lowest total loss of the model during the iteration process is 10.287. The model successfully completed the learning process from high loss to low loss, proving the effectiveness of the training process, loss function and model architecture.
[0095] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A lidar point cloud data completion system based on a PCN model, comprising a data loading module, a data processing module, a data completion module, a model training and optimization module, and a data visualization module, characterized in that, The data loading module reads and parses point cloud data files in any of the four formats: LAS, LAZ, TXT, and PLY. It then pairs the point cloud data files based on a filename matching mechanism to obtain incomplete and complete paired data, and constructs and divides the dataset. The data processing module performs data preprocessing on the incomplete and complete pairing data to obtain standardized incomplete and complete pairing data, including incomplete point cloud data and complete point cloud data; The data completion module constructs a point cloud data completion model based on the PCN model. It completes the incomplete point cloud data based on the encoder and decoder. The encoder and decoder are connected through feature mapping. The encoder's input is the incomplete point cloud data, and its output is global features and point-level features. The decoder's input is global features and point-level features, and its output is the point cloud completion data. The model training and optimization module compares and analyzes point cloud completion data with complete point cloud data, performs training supervision and hyperparameter optimization on the point cloud data completion model based on the loss function, and obtains the weight file. The visualization module provides a visual representation of the point cloud completion data; In the data loading module, the path, category, and segmentation of point cloud data files are set, the data loading logic is defined, and a multi-source data reading and fusion interface is constructed. Based on the category of the point cloud data file, the file path is used to locate the point cloud data file. A unified interface is used to read and parse point cloud data files in LAS, LAZ, TXT, and PLY formats, obtaining the 3D coordinates of each data point in the point cloud data and constructing... The data matrix Represents data points in point cloud data The total number, The first point cloud data One data point; For LAS and LAZ format point cloud data files, the scaling factor and offset parameters are parsed. Perform delimiter recognition and error tolerance processing on TXT format point cloud data files; Based on the filename matching mechanism, a three-level matching strategy is adopted to pair corresponding incomplete point cloud files and complete point cloud files in the point cloud data files and output matching logs to obtain incomplete and complete paired data, construct and divide the dataset. The pairing rules include complete matching, suffix stripping matching and prefix replacement matching. Based on the data processing module, incomplete and complete pairing data are preprocessed, including data sampling, data denoising and data normalization, to obtain standardized incomplete and complete pairing data. Data sampling includes defining a fixed number of points in the data processing module, performing point cloud sampling on incomplete and complete paired data based on the fixed number of points, repeating sampling for point cloud data with a total number of data points less than the fixed number of points, retaining all data points in the point cloud data for point cloud data with a total number of data points equal to the fixed number of points, and downsampling the point cloud data for point cloud data with a total number of data points greater than the fixed number of points, ensuring that the number of data points sampled in each point cloud data is a fixed number, and obtaining sampled paired data; Data denoising includes defining the neighborhood radius and minimum threshold in the data processing module, denoising the sampled paired data based on neighborhood density statistics, removing isolated points and sparse data points in the residual cloud data, including counting the number of remaining data points in the residual cloud data whose distance from the center data point does not exceed the neighborhood radius, obtaining the statistical value of the center data point, deleting the center data points whose statistical value is less than the minimum threshold, and obtaining denoised paired data. Data normalization includes eliminating geographic coordinate offset based on dynamic coordinate translation and unifying the scale of point cloud data based on adaptive normalization; Eliminating geographic coordinate offset based on dynamic coordinate translation involves calculating the centroid of each point cloud data in the denoised paired data, using the point cloud centroid as the origin, and constructing a coordinate system. The scaling of point cloud data based on adaptive normalization includes calculating the distance between each data point in the point cloud data and the centroid, obtaining the maximum distance, scaling the point cloud data based on the maximum distance, scaling the point cloud data to a unit sphere, and obtaining standardized incomplete paired data, including incomplete point cloud data and complete point cloud data. The data completion module includes an encoder and a decoder, which are cascaded and connected via feature mapping. The encoder's input is incomplete cloud data. Based on the KNN neighborhood aggregation algorithm, a KD-tree or ball query is used to perform a neighborhood search on each data point in the incomplete cloud data to find the nearest neighbor. Individual data points Construct data points from the nearest neighboring data points. neighborhood Calculate the neighborhood data points relative to The offset is used to obtain data points through a shared multilayer perceptron or one-dimensional convolution. neighborhood features Using symmetric functions to aggregate neighborhood features, structural cues are generated. ; Build a shared multilayer perceptron to learn data points initial point features Combine original point features with structural cues Perform splicing to obtain structural features ; Introducing a grouped vector attention mechanism to integrate initial point features Divided into The system calculates the attention weights for the initial point features in each group, obtains the weighted group features corresponding to each initial point feature based on the attention weights, and summarizes the weighted group features to obtain the data points. Point-level features; Max pooling is used to process the point-level features of all data points in the residual cloud data to obtain global features. ; The decoder includes a coarse point cloud generation stage and a dense point cloud generation stage; In the coarse point cloud generation stage, the decoder's input is global features. A coarse point cloud with a fixed number of points is generated by a multilayer perceptron, which serves as the skeleton for completing the point cloud data. The input to the dense point cloud generation stage is global features. The system analyzes the point-level features of each data point in the incomplete point cloud data, and the coarse point cloud data. Based on the point-level features, it determines the completion strength and fine-point budget of each data point in the coarse point cloud data. A normalization function is used to dynamically allocate completion weights to the completion strength of each data point. Based on the completion weights and fine-point budgets, the system then applies completion weights to the data points. Fine dots are generated around it.
2. The lidar point cloud data completion system based on the PCN model according to claim 1, characterized in that, For each data point in the coarse point cloud data, a local two-dimensional grid is generated in the neighborhood of the data point based on the fine point budget. Global features are then processed within this grid. The point-level features and completion weights of the data points are spliced together to generate fine points. Based on the multi-dimensional sequence folding technology of direction vector and lattice tiling, the folding displacement of the local two-dimensional mesh to the three-dimensional mesh is predicted. The generated fine points are superimposed on the data points corresponding to the coarse point cloud data to generate dense point cloud data, which belongs to point cloud completion data.
3. The lidar point cloud data completion system based on the PCN model according to claim 2, characterized in that, The model training and optimization module includes a training phase and an inference phase. In the training phase, the model training and optimization module trains and optimizes the point cloud data completion model of the data completion module based on incomplete and complete paired data and loss function. It compares and analyzes the point cloud completion data with the complete point cloud data, obtains the model training parameters, and obtains the weight file. During the inference phase, the weight file is called to import the weight parameters after model training into the data completion module. The point cloud data completion model completes the point cloud data to be completed, generating point cloud completion data. The point cloud completion data is then visualized through the visualization module.
4. The lidar point cloud data completion system based on the PCN model according to claim 3, characterized in that, The loss function is a joint loss, which includes coarse loss and dense loss. It is obtained by calculating the chamfer distance between coarse point cloud data and complete point cloud data, and between dense point cloud data and coarse point cloud data. ; ; ; in, Indicates the chamfer distance. Indicates joint loss, This is the roughness loss coefficient. For dense loss coefficient, Represents coarse point cloud data. Represents dense point cloud data. Represents complete point cloud data. Data points representing coarse point cloud data, Data points representing dense point cloud data, Data points representing complete point cloud data, This represents the square of the Euclidean distance.
5. A method for completing lidar point cloud data based on a PCN model, characterized in that, The point cloud data completion system according to claim 1 includes: S1. Obtain the raw point cloud data file, including the dataset construction file and the point cloud data file to be completed. The dataset construction file includes the incomplete point cloud data file and the complete point cloud data file. S2. Parse the original point cloud data file according to its file type to obtain the three-dimensional coordinates of each data point in the original point cloud data file; S3. Based on the filename matching mechanism, pair the incomplete point cloud data file with the complete point cloud data file, obtain the incomplete and complete paired data, and construct the point cloud data completion dataset; S4. Perform data preprocessing on the point cloud data in the point cloud data completion dataset and the point cloud data file to be completed to obtain standardized incomplete and complete paired data and standardized point cloud data to be completed; S5. Construct a point cloud data completion model based on the PCN model. Divide the point cloud data completion dataset into a training set and a validation set according to the proportion. Train the point cloud data completion model based on the training set, obtain the weight parameters, construct the weight file, and perform hyperparameter optimization and performance evaluation on the point cloud data completion model based on the validation set. S6. Input the point cloud data to be completed in S4 into the point cloud completion model in S5, call the weight file to complete the point cloud data to be completed, obtain the point cloud completion data, and visualize the point cloud completion data.
6. The method for completing lidar point cloud data based on the PCN model according to claim 5, characterized in that, Point cloud data files to be completed are acquired using LiDAR. The LAS, LAZ, TXT, and PLY formats of the point cloud data files are parsed. This includes parsing scaling factors and offset parameters for LAS and LAZ format files, and delimiter identification and error correction for TXT format files, to obtain the point cloud data to be completed. , This represents the total number of data points in the point cloud data to be completed. It stores the three-dimensional coordinate information and category labeling information of the data points; right Data preprocessing is performed, including denoising the point cloud data to be completed based on neighborhood density statistics, removing isolated points and sparse points in the point cloud data, eliminating the geographic coordinate translation of the point cloud data to be completed based on dynamic coordinate translation, and unifying the coordinate scale of the point cloud data to be completed based on adaptive normalization. The training weight file is called, and the data completion module is used to perform data processing based on the weight parameters. Perform data completion and obtain the completed point cloud data. Through the visualization module To provide a visual presentation.