Target point cloud detection method based on improved 3D target detector PointPillars
Through the improved PointPillars detector and various pre-processing technologies, combined with the PFN network and SSD detection network, the problem of time-consuming point cloud data processing and misjudgment in the existing technology is solved, efficient and accurate ship detection is achieved, and the waterway is improved. The reliability and accuracy of ship inspection in China.
Patent Information
- Application Number
- CN202411149424.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing ship detection methods are difficult to meet the needs of real-time and accurate detection when processing sparse and unstructured point cloud data. They require high computing power and are time-consuming to calculate. They are prone to misjudgment especially when large interfering point clouds appear in the waterway. .
The improved 3D target detector PointPillars is used to generate point cloud data without noise through point cloud pre-processing including straight-through filtering, outlier removal and voxel filtering, and random rotation, scaling, translation and cropping data enhancement are performed, combined with The PFN network performs feature encoding and two-dimensional convolution module processing, and is finally input into the SSD detection network to improve detection accuracy and anti-interference ability.
It significantly improves the quality of point clouds, improves the reliability and identification accuracy of ships operating in waterways, reduces detection time, and enhances anti-interference capabilities.
Smart Images

Figure CN118658071A
Abstract
Description
Technical Field
[0001] The invention relates to ship operation detection, and in particular to a target point cloud detection method based on an improved 3D target detector PointPillars. Background Art
[0002] Real-time and accurate detection of ships in waterways is crucial. Traditional ship detection methods mostly rely on video or image data, but due to the complexity of the environment and the diversity of ship shapes, these methods are often difficult to meet actual needs. With the development of lidar technology, point cloud data has become a new data source for ship detection, which contains a large amount of three-dimensional coordinate information of points in space. These point cloud data are usually sparse and unstructured, and effective processing and analysis methods are required to extract useful information. In ship detection, point cloud data can capture key information such as the shape, size, and relative position of the ship to other objects.
[0003] The existing laser point cloud ship detection algorithms mainly include: unsupervised region growing detection method, point cloud structural feature-based ship target detection method and deep learning-based ship target detection method.
[0004] Based on the unsupervised region growing detection method, a seed point cloud is continuously diffused and grown to find a point cloud in a connected area, cluster the entire point cloud, and make an AABB bounding box for each point cloud group to generate a target detection frame. However, when a large block of interfering point cloud appears in the channel, this method will consider the interfering point cloud block to be the hull.
[0005] The ship target detection method based on point cloud structural features mainly calculates the feature operator for the point cloud cluster detected by regional growth, and uses the feature operator to determine whether the point cloud cluster is a ship. Since the feature operator needs to be calculated for each point, the operation is very time-consuming.
[0006] The ship target detection method based on deep learning uses deep learning to train a ship point cloud target detection model to complete the target detection of the ship hull. However, the basic operators of the existing point cloud target detection network need to perform operations on points in three-dimensional space, which is also very time-consuming.
[0007] The entire ship target detection method in the prior art requires high computing power and is time-consuming to calculate. Summary of the invention
[0008] Purpose of the invention: In view of the above shortcomings, the present invention provides a target point cloud detection method based on an improved 3D target detector PointPillars with strong anti-interference ability and high recognition accuracy.
[0009] Technical solution: To solve the above problems, the present invention adopts a target point cloud detection method based on an improved 3D target detector PointPillars, comprising the following steps: (1) Obtain point cloud data of ships within the river detection range based on the laser radar, filter the acquired point cloud data to obtain noise-free point cloud data, and annotate it; (2) Randomly rotate, randomly scale, randomly translate, and randomly crop the annotated point cloud data, and merge the randomly rotated, randomly scaled, randomly translated, and randomly cropped point cloud data with the original annotated point cloud data to form a training point cloud set; (3) The training point cloud set is feature encoded through the PFN layer in the PointPillars algorithm to obtain a pseudo image; (4) The pseudo image is continuously convolved through a two-dimensional convolution module to obtain three feature maps of different sizes, which are then concatenated after deconvolution to obtain a feature tensor; (5) Input the concatenated feature tensor into the SSD detection network to obtain the detection result.
[0010] Furthermore, filtering the acquired point cloud data in step (1) includes sequentially performing through filtering, outlier removal, and voxel filtering; The straight-through filtering is as follows: setting a threshold range according to the river width, the detection length and the detection width, and filtering out the point cloud data outside the threshold range; The outlier removal is as follows: in the point cloud data after the straight-through filtering, take each point cloud as the center of the circle and calculate r is the number of point clouds within the radius. Points with a number less than the threshold are outliers and will be removed. The voxel filtering is: using a grid to perform voxel filtering on the point cloud data after removing outliers, retaining only the point cloud of each grid center point, and obtaining point cloud data without noise.
[0011] Furthermore, in step (2), the marked point cloud data is randomly rotated, randomly scaled, randomly translated, and randomly cropped as follows: The marked point cloud data is randomly rotated as follows: m Point cloud in the target box V m New target training data are generated by rotating the preset angles along the Z axis to simulate the ship's targets in the transverse and longitudinal channels, as well as in the upstream and downstream directions; The annotated point cloud data is randomly scaled as follows: m Point cloud in the target box V mThe scales of the target are reduced and enlarged to generate new target training data, simulating the target positions of ships of different sizes; The random translation of the annotated point cloud data is as follows: randomly generate an offset , mark the m Point cloud in the target box V m Plus the randomly generated displacement value , and add The point cloud after the simulation is still within the river channel, simulating the target point cloud position of the ship at different positions; The marked point cloud data is randomly cropped as follows: m Point cloud in the target box V m Perform random downsampling from V m Random selection n points form new point cloud data.
[0012] Furthermore, the feature encoding in step (3) includes: (31) Space division: The point cloud space in the training point cloud set is divided into pillar grids. Pillar represents the columnar structure in the point cloud space. Each pillar contains multiple point clouds, and the pillar that does not contain a point cloud is an empty pillar. (32) Pillar encoding: Count the number of non-empty pillars in the training point cloud set , and count the number of non-empty pillar midpoints. When the number of pillar midpoints is less than the threshold When the number of pillar midpoints is greater than the threshold, use zero to complete; When , random sampling is used to sample the number of pillar midpoints to the threshold ; For each pillar The encoding information of each point includes the coordinates of the point, the reflection intensity, the geometric center point of the pillar, and the relative position of each point in the pillar and the center point of the pillar. The length of the one-dimensional vector after encoding each point is recorded as , and finally get a -dimensional tensor; (33) Feature extraction: The encoded The dimensional tensor is input into a multi-layer perceptron structure and obtained dimensional feature tensor, and then perform maximum pooling on the number of points in the second dimension to obtain dimensional feature vector, and then transform the feature dimension to get the pseudo image. The feature tensor of the pseudo image is Dimensions represent the number of channels, height, and width of the pseudo image.
[0013] Furthermore, in step (4), the two-dimensional convolution module is used to The feature tensor of the pseudo image of dimension is downsampled three times, and we get dimension, dimension, The deconvolution module then upsamples the three-dimensional feature tensors to obtain three dimensional feature tensor, and then concatenate the three feature tensors on the first dimension to obtain -dimensional feature tensor.
[0014] Furthermore, the SSD detection network in step (5) is an improved SSD detection network, which uses the kmeans algorithm to cluster the ship data in the training data to generate anchor frames, and obtains three detection heads, namely, a category prediction head, a detection frame prediction head, and an angle prediction head, and outputs three prediction values.
[0015] Furthermore, the loss function of the SSD detection network is improved, including coordinate loss, length, width, height loss, and angle loss. The true box is expressed as , the prediction box is expressed as , the loss function formula is as follows: ; ; ; ; ; ; ; ; in, for Coordinate loss function, for Coordinate loss function, for Coordinate loss function, is a wide loss function, is the long loss function, is a high loss function, is the angle loss function, is the center coordinate of the real frame, is the width, length and height of the real frame, is the yaw rotation angle of the real frame around the Z axis, is the center coordinate of the prediction box, is the width, length and height of the prediction box, It is the yaw rotation angle of the prediction box around the Z axis.
[0016] Furthermore, it also includes classification loss function : ; in, is the weight factor, To adjust the hyperparameters of the weight factor, is the predicted probability of the model for the sample.
[0017] The present invention also adopts a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0018] The present invention also adopts a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0019] Beneficial effects: Compared with the prior art, the significant advantages of the present invention are that the quality of the extracted point cloud is improved through the pre-processing of the point cloud and the enhancement of the point cloud data. Through the improved PointPillars point cloud target detection network, the reliability of the ship's operation in the waterway is effectively improved, and the anti-interference ability is strong and the recognition accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of the workflow of the target point cloud detection method of the present invention.
[0021] Figure 2 It is a flow chart of the point cloud pre-processing steps in the present invention.
[0022] Figure 3 It is a processing flow chart of the PFN coding network in the present invention.
[0023] Figure 4 It is a structural diagram of the backbone network in the present invention.
[0024] Figure 5 It is a schematic diagram of the target point cloud detection result of the present invention. DETAILED DESCRIPTION
[0025] In this embodiment, a target point cloud detection method based on an improved 3D target detector PointPillars is used for river monitoring as an example. A calibrated lidar sensor is installed on a river bridge to scan the point cloud data on the river. The position and size of the ship are detected by performing target detection on the acquired point cloud data on the river.
[0026] like Figure 1 As shown, in this embodiment, a target point cloud detection method based on an improved 3D target detector PointPillars includes the following steps: Step 1, point cloud pre-processing: perform through filtering, outlier removal and voxel filtering pre-processing operations on the 3D point cloud acquired from the LiDAR within the river channel area, extract the noise-free target point cloud within the detection range, and mark it.
[0027] In this step, the original point cloud data is subjected to straight-through filtering to extract the point cloud within the effective detection range, and then the density of the point cloud is counted to remove the interference of outliers. Finally, voxel filtering is used to reduce the scale of the point cloud.
[0028] like Figure 2 As shown in Figure 1, the point cloud pre-processing steps include: Step 1-1, use a solid-state LiDAR sensor installed on a river bridge to continuously collect 3D point cloud data in the river. This point cloud data includes 3D spatial information of the river, ships, and other objects around the waterway. 2y , Detection length 2x and height 2 z , thereby setting the corresponding threshold range. This threshold range is set to determine the boundary of the region of interest so that subsequent processing steps can focus on the point cloud data within this specific area. Apply a pass filter to the collected raw point cloud data. The pass filter operates according to the set threshold range: For each point cloud data point, check its x , y , z Whether the coordinates are within the set width, length and height thresholds. If any coordinate of a point cloud data point exceeds the set threshold range, the point is filtered out and no longer retained. Only those point cloud data points whose coordinates are within the set threshold range are retained to extract the area of interest in the river. After the straight-through filtering process, the obtained point cloud data only includes the area of interest in the river.
[0029] Step 1-2, remove interference points from the point cloud processed by direct filtering. R For each point cloud in the area, set a fixed radius r , construct a spherical neighborhood centered on the point cloud. r The choice of must be determined in combination with the density of the point cloud and the size of the target object. r If it is too small, some sparse but valid point clouds will be mistaken as outliers; r If it is too large, it will include too many neighborhood points, making outlier detection ineffective. Count the number of other point clouds contained in the neighborhoodS . In determining r After the value of n , the threshold represents the minimum number of point clouds in a spherical neighborhood. If the number of point clouds in the spherical neighborhood of a point is less than this threshold, the point is considered an outlier. R All point clouds in the area, calculate the number of point clouds in the neighborhood of each point one by one S .if S Less than the set threshold N , then the point is considered an outlier. In a dense point cloud, isolated points are usually noise or abnormal data, not part of the target object. All detected outliers are removed from R The method removes the points in the area, retains the densely distributed parts in the point cloud, removes the sparse and unreliable points, and improves the model accuracy.
[0030] Steps 1-3: Divide the processed point cloud data into a three-dimensional voxel grid of uniform size, and the size of each voxel is recorded as leaf , by filtering each voxel, when the voxel contains point cloud data, the voxel grid is retained; when the voxel does not contain point cloud data, the voxel grid is ignored. The number of point clouds contained in each voxel is n, The coordinates of each point are , the coordinates of the center of mass Calculated by the following formula: ; ; ; Each calculated centroid point is used as the representative point of the voxel where it is located, so as to obtain a point cloud set V .
[0031] Step 2, point cloud data enhancement: Use four methods, random rotation, random scaling, random translation, and random cropping, to enhance the labeled ship point cloud data and expand the diversity of the data set.
[0032] In this step, the annotated target point cloud data and the annotation box are rotated by a certain angle along the Z axis of the annotation box, scaled by a certain proportion along the XYZ axis, translated by a certain amount along the XYZ axis, and randomly cropped to obtain data that is several times more than the redundant data set, thereby expanding the diversity of the data.
[0033] Point cloud data enhancement includes: Random rotation: Rotate the marked m Point cloud in the target box V mSelect to rotate along the Z axis and set the rotation angle to , the original coordinates of the point are , the rotated coordinates Calculated by the following formula: ; After the rotation transformation, the new point cloud set is recorded as V 1 .
[0034] Random scaling: m Point cloud in the target box V m The scaling factors are set to 0.5 and 1.5 respectively to simulate the situation of ships of different sizes in the river. After the scaling transformation, the new point cloud data is recorded as V 2 .
[0035] Random translation: Move the marked m Point cloud in the target box V m , randomly generate an offset , set the offset range , d is the maximum absolute value of the offset, so that the point cloud in the target box adds the randomly generated displacement value , plus The point cloud after translation is still within the river channel, simulating the target point cloud position of the ship at different positions. After translation transformation, the new point cloud data is recorded as V 3 .
[0036] Random cropping: m Point cloud in the target box V m Perform random downsampling and determine the target number of points N , using a uniformly distributed random number generator from the range Generated n Different random indices are generated. The corresponding data points are selected from the original data set according to the generated random indices. m The number of target points in the target box is given by N becomes n。 After the cropping transformation, the new point cloud data is recorded as V 4 .
[0037] The point cloud obtained in the above four steps and the original annotated target point cloud together constitute a new training set S train ,Right now Strain= V 1 + V 2 + V 3 + V 4 + V。
[0038] Step 3, PFN network coding: pre-processed spatial ship training set S train The point cloud data is fed into the PFN network for encoding to obtain a two-dimensional pseudo image tensor of the same size. These input tensors contain the position distribution information of the point cloud in space. According to the size and morphological characteristics of the ship, the appropriate pillar size and shape are set to better capture the local and global features of the ship. When counting the point cloud density within the grid, the shape information of the ship is used to enhance the pertinence of feature extraction.
[0039] like Figure 3 As shown, the PFN coding network steps include: Step 3-1, space division: divide the three-dimensional space of the training point cloud data into a series of columnar grids according to the preset size. Each grid appears as a cubic column in the three-dimensional space, called a pillar. The size of each pillar is set to . Divide the point cloud space of a single sample data in the training point cloud into Pillar grids are used to assign each point cloud data point to the corresponding pillar according to its coordinates. For each point cloud data point, the pillar number to which it belongs is calculated according to its XYZ coordinates. Suppose the coordinates of a point are , then the pillar number to which the point belongs can be determined by the following formula: ; ; ; in, is the minimum coordinate value of the point cloud data. During the entire division process, some pillars may not contain any point cloud data points, and these pillars are called empty pillars. These empty pillars are directly ignored. Through the above space division steps, each pillar contains multiple point cloud data points within a specific space range. In this way, the entire three-dimensional space is divided into many small columnar structures, each of which represents a spatial area and contains the point cloud data within the area.
[0040] Step 3-2, pillar encoding: count the number of non-empty pillars in the sample point cloud P In order to uniformly process the point cloud data in each pillar, it is necessary to set the maximum number of points in each pillar. N . Count the points in each pillar and calculate the actual number of points contained in each pillar. M .if M < N , then the pillar needs to be completed so that the number of points reaches N , calculate the number of points that need to be completed Z = N − M .generate Z zero points, and the length of the eigenvector of each zero point is the same as that of the eigenvector of the actual point. Assume that the length of the eigenvector of each point is D , then the eigenvector of each zero point is all zero D dimensional vector. Add the generated zero point to the point cloud data of the pillar so that the number of points of the pillar reaches N .if M> N , then the pillar needs to be randomly sampled and generated using a random number generator N Random indices whose values are in the range [1, M ] range. A uniformly distributed random number generator can be used to ensure that each point has the same probability of being selected. Based on the generated random index, select from all points in the pillar N points. Take these points as sampling results. Then, N The encoding information of each point includes the coordinates of the point , reflection intensity I , the geometric center point of the pillar , the relative position of each point in the pillar and the center point of the pillar , the length of the one-dimensional vector after encoding each point is recorded as D , combine the encoding vectors of all points in each pillar to form a vector with dimension N × D For the entire point cloud data, there are P non-empty pillars, each pillar corresponds to a N × D Finally, the feature tensors of all non-empty pillars are combined to obtain an overall point cloud feature tensor with a dimension of .
[0041] Step 3-3, feature extraction: For the encoded dimensional tensor, which is fed into a multi-layer perceptron structure (MLP) to obtain dimensional feature tensor, and then perform the maximum pooling (MaxPooling) on the points in the second dimension. For each non-empty pillar, select the maximum value of the feature vectors of all points in the pillar to form a new feature vector. In this way, the features of each pillar are transformed from the shape becomes , that is, each pillar only retains the most important features. The feature vectors are rearranged and mapped to the spatial position to form a two-dimensional feature map. These feature vectors are arranged into a two-dimensional plane according to their spatial position to form a pseudo image feature tensor with the shape of ,in C and H are the height and width of the space after division, W is the feature dimension. The final output pseudo image feature tensor can be directly input into the subsequent convolutional neural network for further feature extraction and target detection.
[0042] Step 4, backbone network module: The pseudo image tensor encoded by the PFN network is continuously convolved through a two-dimensional convolution module to obtain three feature maps of different sizes, and then the three feature maps are unified to the same size through deconvolution operations. Finally, the three feature maps are spliced together to obtain the final feature map tensor, which contains different scale information. Feature maps of different scales are combined to capture the characteristic information of ships at different scales, thereby improving the accuracy of detection.
[0043] like Figure 4 As shown, the backbone network processing steps include: Step 4-1, input the pseudo image feature tensor of dimension generated in step 3-3 into the 2D convolution module, and use the 2D convolution module to downsample the input feature tensor three times. Each downsampling is processed in sequence by a 2D convolution layer (Conv2d), a batch normalization layer (BatchNorm), and a nonlinear activation function (ReLU). The 2D convolution layer extracts local features, the batch normalization layer standardizes the output, and the ReLU activation function introduces nonlinearity. For the first downsampling, the input feature tensor shape is , the output feature tensor shape is The second downsampling takes the output feature tensor of the first downsampling As the input feature tensor, the output feature tensor shape is The third downsampling takes the output feature tensor of the second downsampling , the output feature tensor shape is Then, the feature tensors of the three dimensions are upsampled through three deconvolution modules to obtain three dimensional feature tensor, and then concatenate the first dimensions of these three tensors. The shape of the concatenated feature map is .
[0044] Step 5, detection network module: The feature tensor obtained by the backbone network module is input into the SSD detection network to obtain three detection heads, namely the category prediction head, the detection box prediction head and the angle prediction head. These three prediction modules distribute and output the corresponding category, position and rotation angle results, such as Figure 5 As shown in the figure, the purple frame is the anchor frame regenerated after optimization by the Kmeans clustering algorithm to determine the maximum range of the detected object. The cyan point cloud data in the figure is the point cloud in the anchor frame, marked as a ship.
[0045] Step 5: Detection network processing steps include: Step 5-1, improved SSD detector: For the selection of anchor boxes, extract the actual bounding box information of the ship from the training data set, which includes the length, width and height of the bounding box. Standardize the size of the bounding box to eliminate the impact of scale differences. Use the kmeans clustering algorithm to cluster the standardized bounding box data to obtain a set of cluster centers, each of which represents the size of an anchor box. Generate an anchor box based on the results of the cluster centers. The improved SSD detector will output three prediction values, namely The category prediction value of the dimension, The detection box prediction value of dimension, dimensional discrete angle prediction value.
[0046] Step 5-2, improved loss function: The position loss function consists of 7 parts, namely coordinate loss, length, width and height loss, and angle loss. The formula is as follows: ; ; ; ; ; ; ; ; in, for Coordinate loss function, for Coordinate loss function, for Coordinate loss function, is a wide loss function, is the long loss function, is a high loss function, is the angle loss function, is the center coordinate of the real frame, is the width, length and height of the real frame, is the yaw rotation angle of the real frame around the Z axis, is the center coordinate of the prediction box, is the width, length and height of the prediction box, It is the yaw rotation angle of the prediction box around the Z axis.
[0047] The position loss uses a weighted summation strategy, assigning different weights to positions and setting the weight of the xyz loss greater than the lwh and angle losses, so that the output result is more inclined to accurate positioning.
[0048] The classification loss function uses an improved Focal Loss to solve the problem of imbalance between positive and negative samples. When dealing with a large number of negative samples, the traditional cross entropy loss easily dilutes the contribution of positive samples, thus affecting the training effect of the model. Focal Loss introduces an adjustment factor to reduce the loss contribution of simple samples and enhance the influence of difficult-to-classify samples. The loss function is as follows: ; in, is the weight factor, To adjust the hyperparameters of the weight factor, is the prediction probability of the model for the sample. Based on the Pointpillars network, an improved optimization strategy is proposed, which greatly improves the detection accuracy and efficiency of river ship point cloud data.
[0049] In the specific implementation, through the implementation of the above technical solutions, the quality of point cloud data is significantly improved through the improved PointPillars network and multiple preprocessing techniques such as pass-through filtering, outlier removal and voxel filtering, ensuring that the target point cloud data is more accurate and clean; an optimized PFN coding network is designed, which fully utilizes the spatial structure information of point cloud data through spatial division and pillar coding, making feature extraction more efficient; the improved classification loss function uses Focal Loss, which effectively solves the problem of imbalance between positive and negative samples, enhances the model's learning ability for difficult-to-classify samples, and improves classification accuracy.
[0050] The present invention provides an effective method for 3D target detection, and innovatively uses an improved classification loss function adopting Focal Loss to build a target point cloud detection method based on the improved 3D target detector PointPillars, which has the advantages of accurate detection, precise dynamic point cloud filtering, and strong resistance to environmental interference.
Claims
1. A target point cloud detection method based on an improved 3D target detector PointPillars, characterized in that: The following steps are involved: (1) Obtain point cloud data of ships within the river detection range based on the laser radar, filter the acquired point cloud data to obtain noise-free point cloud data, and annotate it; (2) Randomly rotate, randomly scale, randomly translate, and randomly crop the annotated point cloud data, and merge the randomly rotated, randomly scaled, randomly translated, and randomly cropped point cloud data with the original annotated point cloud data to form a training point cloud set; (3) The training point cloud set is feature encoded through the PFN layer in the PointPillars algorithm to obtain a pseudo image; (4) The pseudo image is continuously convolved through a two-dimensional convolution module to obtain three feature maps of different sizes, which are then concatenated after deconvolution to obtain a feature tensor; (5) Input the concatenated feature tensor into the SSD detection network to obtain the detection result.
2. The target point cloud detection method according to claim 1, characterized in that: The filtering of the acquired point cloud data in step (1) includes sequentially performing through filtering, outlier removal and voxel filtering; The straight-through filtering is as follows: setting a threshold range according to the river width, the detection length and the detection width, and filtering out the point cloud data outside the threshold range; The outlier removal is as follows: in the point cloud data after the straight-through filtering, take each point cloud as the center of the circle and calculate r is the number of point clouds within the radius. Points with a number less than the threshold are outliers and will be removed. The voxel filtering is: using a grid to perform voxel filtering on the point cloud data after removing outliers, retaining only the point cloud of each grid center point, and obtaining point cloud data without noise.
3. The target point cloud detection method according to claim 2, characterized in that: In the step (2), the marked point cloud data is randomly rotated, randomly scaled, randomly translated, and randomly cropped respectively as follows: The marked point cloud data is randomly rotated as follows: m Point cloud in the target box V m New target training data are generated by rotating the preset angles along the Z axis to simulate the ship's targets in the transverse and longitudinal channels, as well as in the upstream and downstream directions; The annotated point cloud data is randomly scaled as follows: m Point cloud in the target box V m The scales of the target are reduced and enlarged to generate new target training data, simulating the target positions of ships of different sizes; The random translation of the annotated point cloud data is as follows: randomly generate an offset , mark the first m Point cloud in the target box V m Plus the randomly generated displacement value , and add The point cloud after the simulation is still within the river channel, simulating the target point cloud position of the ship at different positions; The marked point cloud data is randomly cropped as follows: m Point cloud in the target box V m Perform random downsampling from V m Random selection n points form new point cloud data.
4. The target point cloud detection method according to claim 3, characterized in that: The feature encoding in step (3) includes: (31) Space division: The point cloud space in the training point cloud set is divided into pillar grids. Pillar represents the columnar structure in the point cloud space. Each pillar contains multiple point clouds, and the pillar that does not contain a point cloud is an empty pillar. (32) Pillar encoding: Count the number of non-empty pillars in the training point cloud set , and count the number of non-empty pillar midpoints. When the number of pillar midpoints is less than the threshold When the number of pillar midpoints is greater than the threshold, use zero to complete; When , random sampling is used to sample the number of pillar midpoints to the threshold ; For each pillar The encoding information of each point includes the coordinates of the point, the reflection intensity, the geometric center point of the pillar, and the relative position of each point in the pillar and the center point of the pillar. The length of the one-dimensional vector after encoding each point is recorded as , and finally get a -dimensional tensor; (33) Feature extraction: The encoded The dimensional tensor is input into a multi-layer perceptron structure and obtained dimensional feature tensor, and then perform maximum pooling on the number of points in the second dimension to obtain dimensional feature vector, and then transform the feature dimension to get the pseudo image. The feature tensor of the pseudo image is Dimensions represent the number of channels, height, and width of the pseudo image.
5. The target point cloud detection method according to claim 4, characterized in that: In step (4), the two-dimensional convolution module is used to The feature tensor of the pseudo image of dimension is downsampled three times, and we get dimension, dimension, The deconvolution module then upsamples the three-dimensional feature tensors to obtain three dimensional feature tensor, and then concatenate the three feature tensors on the first dimension to obtain -dimensional feature tensor.
6. The target point cloud detection method according to claim 5, characterized in that: The SSD detection network in step (5) is an improved SSD detection network, which uses the kmeans algorithm to cluster the ship data in the training data to generate anchor frames, and obtains three detection heads, namely, a category prediction head, a detection frame prediction head, and an angle prediction head, and outputs three prediction values.
7. The target point cloud detection method according to claim 6, characterized in that: The loss function of the SSD detection network is improved, including coordinate loss, length, width, height loss, and angle loss. The true box is expressed as , the prediction box is expressed as , the loss function formula is as follows: ; ; ; ; ; ; ; ; in, for Coordinate loss function, for Coordinate loss function, for Coordinate loss function, is a wide loss function, is the long loss function, is a high loss function, is the angle loss function, is the center coordinate of the real frame, is the width, length and height of the real frame, is the yaw rotation angle of the real frame around the Z axis, is the center coordinate of the prediction box, is the width, length and height of the prediction box, It is the yaw rotation angle of the prediction box around the Z axis.
8. The target point cloud detection method according to claim 7, characterized in that: It also includes classification loss function : ; in, is the weight factor, To adjust the hyperparameters of the weight factor, is the predicted probability of the model for the sample.
9. A computer 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 steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Laser radar three-dimensional target rapid detection method based on pseudo-image technology
CN111242041A
Live main wire detection method and device based on point cloud
CN114155355A
Water surface large-size object detection method and system, and readable storage medium
CN118279840A
Cited By
Method and system for detecting target object in urban rail defense area
CN119478348A
A Detection Method and System for Target Objects within the Defense Area of Urban Rail Transit
CN119478348B
