Focusing convolution 3D target detection method based on single-stage point cloud density perception
By adopting a single-stage point cloud density-aware focused convolution method in 3D target detection, combined with dynamic voxelization and 3D residual focused sparse convolution network, the problem of sparse point cloud and low long-distance object detection performance is solved, significantly. Improved pedestrian and cyclist detection performance, and improved network stability and computational efficiency.
Patent Information
- Application Number
- CN202410786990.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-18
AI Technical Summary
Existing 3D target detection technology has poor detection performance when dealing with sparse point clouds and long-distance objects, especially low detection performance for pedestrians and cyclists, and sparse convolutional networks have limitations in feature extraction and computational efficiency.
Using a single-stage point cloud density-aware focused convolution 3D target detection method, through dynamic voxelization and additional point cloud density feature extraction, combined with a 3D residual focused sparse convolution network and a dual-branch 2D convolution backbone network, detection is improved accuracy and network stability.
Significantly improves the target detection accuracy, especially the detection performance on point cloud density-sensitive categories such as pedestrians and cyclists, improves the training efficiency and stability of the network, avoids the vanishing gradient problem, and ensures the stability and stability of feature extraction. effectiveness.
Smart Images

Figure CN118736288A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of 3D target detection, and in particular relates to point cloud density feature extraction and 3D sparse convolution spatial learning technology, which can be used for 3D target detection in a lidar sensor environment. Technical Background
[0002] In autonomous driving technology, scene perception is an indispensable component, and 3D object detection technology is the key core of the perception system. Its purpose is to predict the position, size and category of 3D objects near the autonomous vehicle.
[0003] There are many types of sensors that can provide raw data for 3D object detection, among which cameras and laser radar (LiDAR) are the two most widely adopted sensor types. Cameras are cheap and easy to use, but they only capture appearance information and cannot directly obtain the 3D structural information (such as depth) of the scene. Therefore, detection methods from images are often vulnerable to extreme weather and time conditions. As a better solution, LiDAR sensors can directly obtain the fine-grained 3D structure of the scene by emitting laser beams and then measuring their reflection information, which has a more robust detection effect. Because of this feature, LiDAR has become one of the main 3D object detection sensors in autonomous driving. However, the point pattern of LiDAR diverges with increasing distance, resulting in uneven sampling point clouds, which is not suitable for discrete volume feature extraction. Current methods either rely on voxelized point clouds or use inefficient farthest point sampling to mitigate the adverse effects caused by density changes, but largely ignore point density as a feature and its predictable relationship with the distance of the LiDAR sensor.
[0004] Point density also affects the detection of smaller objects such as pedestrians and cyclists. These objects have a smaller surface area that intersects the lidar’s laser beam, resulting in poor object localization. Current state-of-the-art methods largely ignore the detection performance of pedestrians and cyclists, focusing only on the car or vehicle class. As the autonomous driving landscape moves towards datasets with higher environmental coverage, it becomes necessary to scale the architecture to larger input spaces and serve as a multi-class solution for 3D object detection.
[0005] At the same time, the current voxel-based single-stage 3D object detection method uses the sparse convolutional network proposed in the SECOND network in the downsampling convolution link. The 3D sparse convolutional network consists of regular and submanifold sparse convolutional layers. Although these two types of sparse convolutions have been widely used, they both have their own limitations. Regular sparse convolution expands all sparse features, which inevitably adds a lot of computational burden to the model. In addition, the purpose of the detector is to distinguish the target object from a large number of background features, but the characteristics of regular sparse convolution greatly reduce the sparsity and blur the distinction between features. On the other hand, submanifold sparse convolution avoids computational problems by limiting the output feature positions of the input, but it ignores the necessary information flow, especially when dealing with spatially disconnected features. Summary of the invention
[0006] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a single-stage point cloud density-aware focused convolution 3D target detection method to solve the problems in the prior art of ignoring point cloud density features and sparse convolution being unable to dynamically process input features, and to improve detection accuracy.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] A single-stage point cloud density-aware focused convolution 3D object detection method comprises the following steps:
[0009] Step 1: Voxel feature extraction.
[0010] The point cloud data in the dataset are dynamically assigned to the voxels at the corresponding positions, and the distance from the point cloud to the physical center of the voxel and the distance from the point cloud to the center of gravity of the voxel are calculated as additional features. The features are fused through a feature fusion network based on a feedforward network to obtain voxel features.
[0011] Step 2, 3D sparse convolution.
[0012] The voxel features are input into a 3D residual focused sparse convolutional network for downsampling, thereby obtaining sparse 3D high-dimensional features that have learned the importance of spatial positions.
[0013] Step 3, BEV feature conversion.
[0014] The sparse 3D high-dimensional features are converted into dense tensors and compressed in the Z-axis direction, and the feature z-axis is multiplied by the number of feature channels to obtain the BEV 2D features.
[0015] Step 4, BEV convolution.
[0016] The BEV 2D features are sent to a dual-branch 2D convolutional backbone network for downsampling, upsampling, and channel connection operations to extract deeper semantic features and obtain the final BEV feature map.
[0017] Step 5: RPN network prediction training.
[0018] The final BEV characteristic map is used for prediction.
[0019] Compared with the prior art, the present invention has the following advantages:
[0020] 1) Due to the use of dynamic voxelization and additional point cloud density features, the network can obtain more useful features from sparse point cloud information and learn more semantic information. The improved object detection network has higher object detection accuracy, especially in the Pedestrian and Cyclist categories that are sensitive to point cloud density.
[0021] 2) The present invention performs residual connection on the regular sparse convolution layer and the submanifold sparse convolution layer in the 3D sparse convolution operation, which improves the training efficiency and stability of the network, avoids the gradient vanishing problem in the deep network, and ensures the stability and effectiveness of feature extraction.
[0022] 3) The present invention uses focusable sparse convolution instead of submanifold convolution in 3D sparse convolution operation, which solves the problem that sparse convolution cannot dynamically process input features, enables sparse convolution to learn more spatial information, and improves the performance of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a network structure diagram of a single-stage point cloud density-aware focused convolution 3D target detection method of the present invention;
[0024] Figure 2 A network diagram of the voxel feature extraction step in the present invention;
[0025] Figure 3 Schematic diagram of 3D sparse convolution steps in the present invention;
[0026] Figure 4 Schematic diagram of the aggregatable sparse convolution module in the present invention;
[0027] Figure 5 A comparison chart of the effects of using the present invention on target detection of people, bicycles, and cars in point cloud data. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the solution of the present invention will be clearly and completely described below in conjunction with the drawings in the accompanying drawings of the present invention specification. Based on the solution of the present invention, all other achievements obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.
[0029] The existing single-stage 3D object detection technology has deficiencies in feature extraction and sparse convolution processing, resulting in poor detection performance on some objects that are far away or have sparse point cloud information. In order to solve the above technical problems, the present invention provides a single-stage point cloud density-aware focused convolution 3D object detection method.
[0030] Combination Figure 1 As shown, the method of the present invention relies on a voxel feature extraction network, a downsampling module based on 3D sparse convolution, a Z-axis compression to generate BEV feature module, a BEV feature extraction module, an RPN network prediction module, etc. The above modules constitute the main part of the present invention.
[0031] Reference Figure 1 The main implementation steps of the single-stage point cloud density-aware focused convolution 3D object detection method of the present invention are as follows:
[0032] Step 1: Voxel feature extraction, that is, converting point cloud information into voxel features.
[0033] refer to Figure 2 ,This step mainly distributes the point cloud data in the data set dynamically to the voxels at the corresponding positions, calculates the distance from the point cloud to the physical center of the voxel and the distance from the point cloud to the center of gravity of the voxel as additional features, and fuses the features through a feature fusion network based on a feedforward network to obtain voxel features.
[0034] Specifically, in the embodiment of the present invention, the step of extracting voxel features includes:
[0035] Step 11, obtain point cloud data from the original data set, the format of which is [x p ,y p , z p ,i p ], respectively representing the 3D coordinates and laser intensity of the point cloud p. A unique voxel code is assigned to each point cloud according to the 3D coordinates and grid scale of the point cloud:
[0036] MC p =B p ×SC_xyz+PCx p ×SC_yz+PCy p ×SC_z+PCz p
[0037] MC p Represents the unique voxel code of point cloud p, B p Represents the batch where the point cloud p is located, PCx p , PCy p , PCz p is the grid coordinate of the point cloud p, SC_xyz, SC_yz, SC_z are different grid scaling factors used to construct a unique code for each voxel.
[0038] Step 12: Encode MC according to the unique voxel of each point cloud p , the position coordinates VC of v in each voxel can be obtained by methods such as deduplication function v And the mean PM of the point cloud coordinates within the voxel v v , whose value is the center of gravity of the voxel. According to the center of gravity of the voxel, the distance from the point cloud p to the center of gravity of the voxel is calculated as an additional feature f_core p .
[0039]
[0040] S v ={p|p∈v}
[0041] f_core p =[x p ,y p , z p ]-PM v
[0042] Where mean(·) represents the mean operation, S v is the set of point clouds within voxel v. This method of dynamic voxelization based on unique voxel coding effectively solves the problem of traditional voxelization methods fixing the maximum number of voxels and the maximum number of point clouds in each voxel. Fixed voxelization not only wastes computing space, but also randomly discards point cloud information that exceeds the maximum number, which is not conducive to feature extraction of sparse point cloud information. Point cloud unique voxel coding MC p After deduplication, the remaining MC p Restore and calculate the non-repeated voxel positions VC.
[0043] Step 13: Calculate the physical center of each voxel based on the size of the voxel and the range of the point cloud, and calculate the distance from the point cloud p to the physical center of the voxel based on the physical center of the voxel as an additional feature f_center p .
[0044] Step 14: The original features of the point cloud p, f_core p , f_center p Cascading to get new features f_core p , f_center p Two additional features reflect the density information of the point cloud, Input feature fusion network to get the feature f of voxel v v .
[0045]
[0046] S v ={p|p∈v}
[0047] Where max(·) represents the maximum pooling operation, G(·) represents a multi-layer perceptron network for extracting features. In this embodiment, the number of input feature channels of the multi-layer perceptron is The feature length is 11, and the number of output feature channels is 32, that is, this step obtains voxel features with 32 channels.
[0048] Step 2: 3D sparse convolution.
[0049] refer to Figure 3 , the voxel features are input into the 3D residual focused sparse convolutional network for downsampling operation, and sparse 3D high-dimensional features that have learned the importance of spatial positions are obtained. In this embodiment, 8× downsampling is performed, and the specific process can be described as follows:
[0050] Step 21, first generate a sparse voxel feature tensor f according to the voxel feature f obtained in step 1, the position coordinates of the voxel and the voxel scale initnv , whose spatial dimensions are [32, 41, 1600, 1408], where [41, 1600, 1408] is the spatial size of the input voxel features.
[0051] Step 22, f initial Feature input conv input Convolutional block, unifying the input feature dimensions to obtain f input , convolutional block conv input It consists of a residual submanifold sparse convolution layer, a batch normalization layer, and a ReLU activation function layer. Its function is to unify the number of input feature channels to 16 to facilitate subsequent convolution operations. input The spatial dimensions of are [16, 41, 1600, 1408].
[0052] Step 23, f input Input to conv 1 The convolution block performs convolution operation to obtain f conv1 , convolutional block conv 1 It consists of a residual submanifold sparse convolution module and an agglomerated sparse convolution module. This operation does not change the spatial dimension of the feature.
[0053] Step 24: conv Input to conv 2 The convolution block performs the first downsampling convolution operation to obtain f conv2 , convolutional block conv 2 It consists of a residual regularized sparse convolution module, two residual submanifold sparse convolution modules and an agglomerated sparse convolution module. The downsampling step is 2, and the number of feature channels changes from 16 to 32, so f conv The spatial dimension becomes [32, 800, 704, 21].
[0054] Step 25, f conv Input to conv 3 The convolution block performs a second downsampling convolution operation to obtain f conv3 , convolutional block conv 3 It consists of a residual regularized sparse convolution module, two residual submanifold sparse convolution modules and an agglomerated sparse convolution module. The downsampling step is 2, and the number of feature channels changes from 32 to 64, so f conv3 The spatial dimensions become [64, 400, 352, 11].
[0055] Step 26, f conv3 Input to conv 4 The convolution block performs a third downsampling convolution operation to obtain f co , convolutional block conv 4 It consists of a residual regularized sparse convolution module and two residual submanifold sparse convolution modules. The downsampling step size is 2, and the number of feature channels remains unchanged, so f conv4 The spatial dimensions become [64, 200, 176, 5].
[0056] Step 27, f conv4 Input to conv out The convolution block performs convolution operation to obtain f out , convolutional block conv out It consists of a regular sparse convolution layer, a batch normalization layer, and a ReLU activation function layer. The step size of the regular sparse convolution layer is [2, 1, 1], the convolution kernel size is [3, 1, 1], the padding is [0, 0, 0], and the number of feature channels is changed from 64 to 128. Therefore, f out The spatial dimension becomes [128, 200, 176, 2]. The purpose of this step is to further broaden the number of feature channels and change the size of the z-axis to 2 to facilitate the subsequent detection head processing.
[0057] In the above description, one residual submanifold sparse convolution module consists of a residual submanifold sparse convolution layer, a batch normalization layer, and a ReLU activation function layer. The specific operation of the residual submanifold sparse convolution layer is as follows:
[0058]
[0059] where f in1 Represents the characteristics of the input residual submanifold sparse convolution layer, conv subm (·) represents the submanifold sparse convolution operation, represents the residual connection, f out1 Represents the features obtained after the residual submanifold sparse convolution layer.
[0060] One of the residual regularized sparse convolution modules consists of a residual regularized sparse convolution layer, a batch normalization layer, and a ReLU activation function layer. The specific operations of the residual regularized sparse convolution layer are as follows:
[0061]
[0062] where f in2 Represents the characteristics of the input residual regularized sparse convolutional layer, conv reg (·) represents a regularized sparse convolution operation, represents the residual connection, f out2 Represents the features obtained after the residual regularized sparse convolutional layer.
[0063] It should be noted that the residual connection operation of the residual submanifold sparse convolution is different from the residual regular sparse convolution. Due to the sparsity of voxel features, the number of input features and the size of the space are actually not equal. The submanifold sparse convolution does not change the sparsity of the space, so the number of input features and the number of output features are the same and can be added directly. The regular sparse convolution will change the sparsity of the data. The number of input features is less than the number of output features, so the sparse_add() API needs to be used for the addition operation.
[0064] refer to Figure 4 , the specific operation of one of the clusterable sparse convolution modules is as follows:
[0065] (a) Using a submanifold sparse convolution conv imp , according to the voxel feature f_in of the input voxel v v The effective position of the prediction effective feature unit and its surrounding kernel_size 3 The importance of feature units, the importance values are mask_v v and mask_k v, where kernel_size refers to the convolution kernel size.
[0066] (b) Input voxel feature f_in v With mask_v v Multiplying them together enables the voxel features to learn the importance of spatial information and facilitates subsequent back propagation calculations:
[0067] f_ori v =mask_v v ×f_in v
[0068] Among them f_ori v Voxel features after learning spatial importance.
[0069] (c) According to the threshold threshold, the mask_v is obtained v The index mask of the foreground and background points in indices_v fore and indices_v back , and according to indices_v fore Get indices_k fore :
[0070] indices_v fore =mask_v v >threshold
[0071] indices_v back =mask_v v ≤threshold
[0072] indices_k fore =mask_k v [indices_v fore ]>threshold
[0073] Where [] represents the Boolean Indexing operation, indices_v fore Represents the index mask of valid feature units judged as foreground points, indices_k fore The index mask representing the units whose importance values are greater than the threshold value among the extended feature units that are determined to be valid feature units of the foreground point.
[0074] (d) Through indices_v fore and indices_v back Get f_ori v The foreground feature f_ori_fore vand background point features f_ori_back v , and filter out mask_k v The feature units mask_k_fore that belong to the foreground points and whose importance values are greater than the threshold v , the feature unit it represents is the important position where additional convolution calculations need to be added later:
[0075] f_ori_fore v =f_ori v [indices_v fore ]
[0076] f_ori_backv=f_ori v [indices_v back ]
[0077] mask_k_fore v =mask_k v [indices_v fore ][indices_k fore ]
[0078] (e) in f_ori_fore v The feature with a pre-connection value of 0 represents a new important position that needs to be added to the convolution calculation, so that the convolution network that has learned spatial information can output dynamically, and finally connect f_ori_back v Get the complete voxel feature output f_out v , expressed as:
[0079] f_out v ={[(0,...,0),...,(0,...,0)]},f_ori_fore v , f_ori_back v ]
[0080] Furthermore, we can also let f_out v with mask_k_fore v Multiply them together so that all feature units, including the new expansion, learn the spatial importance of , expressed as:
[0081] f_out′ v =[{(0,...,0),...,(0,...,0)},f_ori_fore v , f_ori_back v ]×mask_k_fore v
[0082] The number of (0, ..., 0) is mask_k_fore v The number of new positions that need to be added to the convolution calculation, the number of 0s in (0, ..., 0) is f_in v Dimensionality of voxel features.
[0083] (f) f_out v (or f_out′ v ) Input a sub-manifold sparse convolution layer, and then after the batch normalization layer and the ReLU activation function layer, the output of the final clusterable sparse convolution module is obtained
[0084] Furthermore, additional super-supervision can be added based on the more valuable prior knowledge of the foreground points. This step can be described as: (g) For mask_v v and mask_k v , calculate the focal loss between its importance prediction value and the true foreground point. Add the focal loss to the loss of the entire network to facilitate back propagation.
[0085] Step 3: BEV feature conversion.
[0086] In step 2, we finally get f out It is a sparse tensor and cannot participate in the subsequent 2D convolution calculation. Therefore, it is necessary to first convert the sparse 3D high-dimensional features into dense tensors. Considering that objects in 3D space do not overlap in the Z-axis direction, the 3D feature tensor is compressed in the Z-axis direction, and the feature z-axis is multiplied by the number of feature channels to obtain the BEV 2D feature. The spatial dimension information of the BEV 2D feature obtained in this embodiment is [128×2, 200, 176]. Such an operation simplifies the difficulty of designing the network detection head, increases the receptive field in the height direction, and speeds up the training and reasoning of the network.
[0087] Step 4: BEV convolution.
[0088] The BEV 2D features are fed into a dual-branch 2D convolutional backbone network for downsampling, upsampling, and channel connection operations to extract deeper semantic features, and the final BEV feature map is obtained. The implementation steps can be described as follows:
[0089] Step 41, input the BEV feature f_bev into the downsampling convolution branch 1 to obtain f_bev down1 .
[0090] Downsampling convolution conv2d of branch 1 dow Only the number of feature channels is changed. After the convolution operation, the BEV feature dimension becomes [128, 200, 176].
[0091] Step 42, input the BEV feature f_bev into the downsampling convolution branch 2 to obtain f_bev down2 .
[0092] Downsampling convolution of branch 2 cony2d dow Only the size of the feature map is changed. After the convolution operation, the BEV feature dimension becomes [128, 100, 88].
[0093] Step 43, f_bev down1 Input upsampling convolution branch 1 for upsampling to get f_bev up1 .
[0094] f_bev dawn1 Feed into the upsampling convolution conv2d of branch 1 up After the convolution operation, the BEV feature dimension is restored to [256, 200, 176].
[0095] Step 44, f_bev down Input upsampling convolution branch 2 for upsampling to get f_bev up .
[0096] f_bev dawn Feed into the upsampling convolution conv2d of branch 2 uv2 After the convolution operation, the BEV feature dimension is restored to [256, 200, 176].
[0097] Step 45, f_bev up and f_bev up Perform a concatenation operation in the channel dimension to obtain the final BEV feature map f_spa.
[0098] Because the feature maps have the same size, the calculations of the two branches are concatenated in the 0th dimension to obtain the final BEV feature f_spa, whose spatial dimension is [256×2, 200, 176].
[0099] Step 5: RPN network prediction training.
[0100] In this step, the final BEV feature map is sent to the RPN prediction head network for category prediction, bounding box regression, and direction classification tasks to obtain the final prediction result. The prediction step can be described as:
[0101] Step 51, generate all anchor boxes according to the size of the feature map and the category type, size type, and direction type to be detected.
[0102] Step 52, input the final BEV feature map f_spa into the classification convolution conv cls, border regression convolution conv box And direction classification convolution conv dir_cls , get the predicted classification result, predicted bounding box regression result and predicted direction classification result corresponding to each anchor box;
[0103] Step 53, calculate the loss function according to the assigned true value, and train the network through back propagation. Specifically:
[0104] First, according to the positive sample threshold and negative sample threshold of each category, the true value category, direction category and true value box are assigned to each anchor box. Then, the bounding box encoding is calculated based on each positive sample anchor box a and its assigned true value box Used for subsequent loss function calculation. Finally, according to the predicted classification results of each anchor box, the predicted direction classification results and the bounding box encoding Calculate the loss function and train the network via back-propagation.
[0105] Furthermore, the anchor frame generation method in step 51 is as follows: Since the size of individuals in each category is relatively fixed in the 3D world, the difference is not obvious, so the average length, width and height of the Car, Pedestrian and Cyclist categories in the KITTI dataset are directly used as the size of the anchor frame. At the same time, the anchor frame of each category has two direction angles, 0° and 90°. The size of the anchor frame is in meters, where the anchor frame size of the Car category is [3.9, 1.6, 1.56], and the center of the anchor frame is at -1 meters on the Z axis, the anchor frame size of the Pedestrian category is [0.8, 0.6, 1.73], and the center of the anchor frame is at -0.6 meters on the Z axis, and the anchor frame size of the Cyclist category is [1.76, 0.6, 1.73], and the center of the anchor frame is at -0.6 meters on the Z axis.
[0106] In order to prevent excessive loss caused by the anchor box prediction direction being exactly opposite to the true value box, each anchor box is assigned two one-hot vectors, one for direction classification (whether the object is forward or reverse) and one for category classification. In addition, there is a vector of length 7 for anchor box border regression, whose values are (x, y, z, l, w, h, θ), where x, y, z are the coordinates of the center point of the anchor box, l, w, h are the length, width and height of the anchor box, and θ is the orientation information of the object in the coordinate system.
[0107] Finally, we can get three categories of anchor boxes, and the spatial dimensions are all [z, y, x, num size , num rot ,7], where num size The number of scales of anchor boxes for each category (1), num rotThe number of directions of each category of anchor boxes (2) is the seven-dimensional vector (x, y, z, l, w, h, θ), which represents the information of the anchor box border. Finally, we get a list of three analogous anchor boxes with spatial dimensions of [1, 200, 176, 1, 2, 7].
[0108] Furthermore, the prediction head for prediction in step 52 is implemented as follows: the prediction head is used to regress the seven parameters of the type category, direction category and border corresponding to each anchor box prediction on the feature map. Each prediction or regression function is implemented by a convolution with a convolution kernel size of 1×1. The convolution conv used for type classification is cls The number of input channels is 512, and the number of output channels is 2×3×3, where 2×3 represents that 6 anchor boxes are generated for each pixel, and 3 represents that each anchor box is the expected value of the Car, Pedestrian, and Cyclist categories respectively; the convolution conv used for direction classification dir_cls The number of input channels is 512, and the number of output channels is 2×3×2, where 2×3 represents the generation of 6 anchor boxes for each pixel, and 2 represents the expected value of each anchor box in the forward or reverse direction; the convolution conv used for border regression box The number of input channels is 512, and the number of output channels is 2×3×7, where 2×3 represents the generation of 6 anchor boxes for each pixel, and 7 represents the regression value of the 7 position parameters of each anchor box. The spatial dimensions of the final category prediction are [200, 176, 18], the spatial dimensions of the direction classification are [200, 176, 12], and the spatial dimensions of the bounding box regression are [200, 176, 42].
[0109] The strategy for assigning a corresponding truth box to each anchor box is as follows: first set the truth box corresponding to each anchor box to the truth box with the largest IOU value, then calculate the anchor box corresponding to each truth box with the largest IOU value, and replace the truth box assigned to this part of the anchor box with the current truth box. The category label and truth box of the anchor box are updated to the assigned value.
[0110] In addition, it is also necessary to divide the anchor boxes into positive sample anchor boxes and negative sample anchor boxes according to the threshold. Anchor boxes greater than or equal to the positive sample threshold are assigned as foreground anchor boxes, and anchor boxes less than the negative sample threshold are assigned as background anchor boxes and do not participate in loss calculation. In order to adapt to targets of various scales and shapes and normalize the center coordinates and size changes, the parameters of the anchor boxes assigned as positive samples and the corresponding true value boxes are encoded:
[0111]
[0112] where x a ,y a , z a , w a , la ,h a ,θ a are the position parameters of the anchor box, d a is the diagonal distance of length and width; x p ,y g , z g , w g , l g ,h g ,θ g are the position parameters of the truth box respectively.
[0113] The loss function is calculated based on the true value box and category assigned to each anchor box. The total loss function is:
[0114] L total =β 1 L cls +β 2 (L reg-θ +L reg-other )+β 3 L air
[0115] where β 1 , β 2 , β 3 They are 1.0, 2.0, 0.2, L cls Represents the object type classification loss, L reg-θ represents the anchor box angle regression loss, L reg-other represents the anchor box position and size regression loss, L dir Represents the direction classification loss.
[0116] L cls The loss is calculated using the Focal loss method, and the formula is:
[0117] FL(p t )=-α t (1-p t ) γ log(p t )
[0118] where p t is the category probability predicted by the model, α t is the category weight, which is used to balance the category imbalance, and its value is 0.25. γ is an adjustment factor, which is used to adjust the impact of difficult and easy samples on the loss function, and its value is 2.
[0119] L reg-other Use the SmoothL1 function to calculate the loss, L reg-θ The calculation formula is as follows:
[0120] L reg-θ=SmoothL1(sin(θ p -θ t ))
[0121] θ p is the predicted direction angle, θ t is the true direction angle, when θ p and θ t When the phase difference is 180°, the loss also approaches 0. In order to solve the reverse problem, L is additionally introduced. dir Each anchor box uses a one-hot vector to determine the direction classification, L dir The loss is calculated using the cross entropy function.
[0122] Step 6: Reasoning step.
[0123] During inference, after predicting the classification result and bounding box regression of each anchor box, a decoding operation is performed according to the position of the anchor box and the prediction result to obtain the predicted bounding box, and finally NMS is performed to remove redundant predicted boxes to obtain the predicted result. Specifically, if the direction classification result is opposite, the angle of the predicted bounding box regression is increased by 180°.
[0124] The algorithm effect of the present invention can be further illustrated by the following comparative experiments:
[0125] 1. Experimental environment:
[0126] Operating system: Ubuntu 20.4.0
[0127] CPU: Intel Core i7-10700
[0128] GPU:RTX3060Ti
[0129] Deep Learning Framework: Pytorch
[0130] 2. Experimental Content
[0131] Comparative experiments show that the method of the present invention is compared with the existing single-stage 3D target detection network, which can significantly improve the utilization rate of sparse point cloud information, thereby improving the accuracy of target recognition results.
[0132] The dataset used is KITTI.
[0133] The KITTI dataset was jointly created by Karlsruhe Institute of Technology (KIT) and Toyota Technological Institute at Chicago (TTI-C) in 2012. It is one of the most commonly used computer vision algorithm evaluation datasets in the world for autonomous driving scenarios. The dataset is used to evaluate the performance of computer vision technologies such as stereo, optical flow, visual odometry, 3D object detection and 3D tracking in vehicle environments. The KITTI dataset contains real image data collected from scenes such as urban areas, rural areas and highways. Each image contains up to 15 cars and 30 pedestrians, as well as various degrees of occlusion and truncation. The KITTI dataset provides 14,999 images and corresponding point clouds for 3D object detection tasks, of which 7,481 groups are used for training and 7,518 groups are used for testing. The three types of objects in the scene, cars, pedestrians and bicycles, are annotated, with a total of 80,256 labeled objects.
[0134] Table 1: The AP|R of the existing single-stage 3D object detection network and the proposed method under the moderate difficulty 3D perspective 40 Value comparison
[0135] method Car (IOU 0.7) Pedestrian (IOU 0.5) Cyclist(IOU0.5) PointPillar 77.2846 47.1352 60.7532 SECOND 77.7459 47.7311 64.5856 CenterPoint-Pillar 77.3763 48.2386 65.3561 CenterPoint-Dynamic-Pillar 77.2397 48.3362 65.7378 CenterPoint 78.2481 48.3782 66.0331 Target detection network of the present invention 78.5145 50.9161 67.9398
[0136] Metrics:
[0137] Average precision is the average of the precision values on the PR curve. This indicator is usually used in the field of target detection. Its formula is as follows:
[0138] AP = ∫ 0 1 P(r)dr
[0139] Where P(r) is the precision-recall curve. The main difference from the AP metric in 2D object detection is the matching criteria between the ground truths and the predictions when calculating precision and recall. KITTI proposed two widely used AP metrics: AP3D and APBEV. When the 3D intersection of two cuboids (3D IoU) exceeds a certain threshold, AP3D matches the predicted object with its respective ground truths, while APBEV matches the IoU of the two cuboids based on a bird's-eye view (BEV IoU). However, due to the complexity of integral calculation, interpolation methods are often used to calculate AP values in practical applications.40 To evenly take 40 values between 0 and 1:
[0140]
[0141] p interp (r) = maxP(r′) r′>r
[0142] The experimental results are shown in Table 1. The AP|R of the Car category in the 3D perspective under the Moderate difficulty of the KITTI dataset and the IOU threshold of 0.7 is 40 The index is 78.5145. When the IOU threshold is 0.5, the AP|R in the 3D perspective of the Pedestrian category 40 The index is 50.9161. When the IOU threshold of the Cyclist category is 0.5, the AP|R in the 3D perspective 40 The index is 67.9398. The prediction accuracy of each category is improved compared with the existing single-stage invention method, which benefits from the learning of sparse spatial information and the sensitivity to point cloud density. Among them, the improvements of Pedestrian and Cyclist categories are more obvious.
[0143] Figure 5 (a) is the visualization of the prediction results of the SECOND network from the BEV perspective, 5(b) is the visualization of the prediction results of the present invention from the BEV perspective, 5(c) is the visualization of the prediction results of the SECOND network from the 3D perspective, and 5(d) is the visualization of the prediction results of the present invention from the 3D perspective. Blue represents the true value box, green is the prediction box of the Car category, yellow is the prediction box of the Pedestrian category, and sky blue is the prediction box of the Cyclist category. It can be concluded that the false positive prediction boxes in the detection results given by the present invention are significantly reduced, and the Pedestrian category and the Cyclist category are almost all true positive prediction boxes with accurate predictions. In addition, the quality of the true positive prediction box given by the present invention is significantly better than that of the SECOND network, proving that the method of the present invention can make full use of point cloud information, thereby improving the detection effect.
Claims
1. A single-stage point cloud density-aware focused convolutional 3D object detection method, It is characterized in that The steps include: Step 1: dynamically assign the point cloud data in the data set to the voxels at the corresponding positions, calculate the distance from the point cloud to the physical center of the voxel and the distance from the point cloud to the center of gravity of the voxel as additional features, and fuse the features through a feature fusion network based on a feedforward network to obtain voxel features; Step 2, inputting the voxel features into a 3D residual focused sparse convolutional network for downsampling to obtain sparse 3D high-dimensional features that learn the importance of spatial positions; Step 3, converting the sparse 3D high-dimensional features into dense tensors, compressing them in the Z-axis direction, and multiplying the feature z-axis by the number of feature channels to obtain BEV 2D features; Step 4, sending the BEV 2D features into a dual-branch 2D convolutional backbone network for downsampling, upsampling and channel connection operations to extract deeper semantic features and obtain the final BEV feature map; Step 5: Use the final BEV feature map to make predictions.
2. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 1, It is characterized in that The step 1, the step of extracting voxel features comprises: Step 11, obtain point cloud data from the original data set, and assign a unique voxel code to each point cloud according to the 3D coordinates and grid scale of the point cloud: MC p =B p ×SC_xyz+PCx p ×SC_yz+PCy p ×SC_z+PCz p MC p Represents the unique voxel code of point cloud p, B p Represents the batch where the point cloud p is located, PCx p , PCy p , PCz p is the grid coordinate of point cloud p, SC_xyz, SC_yz, SC_z are different grid scaling factors used to construct a unique code for each voxel; Step 12: Calculate the position coordinates VC of each voxel v according to the unique voxel code of each point cloud v And the mean PM of the point cloud coordinates within the voxel v v , whose value is the center of gravity of the voxel, calculate the distance from the point cloud p to the center of gravity of the voxel as an additional feature f_core p ; Step 13: Calculate the physical center of each voxel based on the size of the voxel and the range of the point cloud, and calculate the distance from the point cloud p to the physical center of the voxel as an additional feature f_center p ; Step 14: The original features of the point cloud p, f_core p , f_center p Cascading to get new features f_core p , f_center p Two additional features reflect the density information of the point cloud, Input feature fusion network to get the feature f of voxel v v ; S v ={p|p∈v} Where max(·) represents the maximum pooling operation, G(·) represents a multi-layer perceptron network for feature extraction, and S v is the set of point clouds within voxel v.
3. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 2, It is characterized in that The step 2 of obtaining sparse 3D high-dimensional features includes: Step 21, generating a sparse voxel feature tensor f according to the voxel features, the position coordinates of the voxels and the voxel scale initial ; Step 22, f initial Feature input conv input Convolutional block, unifying the input feature dimensions to obtain f input , convolutional block conv input It consists of a residual submanifold sparse convolution layer, a batch normalization layer, and a ReLU activation function layer; Step 23, f input Input to conv 1 The convolution block performs convolution operation to obtain f conv1 , convolutional block conv 1 It consists of a residual submanifold sparse convolution module and an aggregatable sparse convolution module; Step 24: conv1 Input to conv 2 The convolution block performs the first downsampling convolution operation to obtain f conv2 , convolutional block conv 2 It consists of a residual regularized sparse convolution module, two residual submanifold sparse convolution modules and an aggregatable sparse convolution module; Step 25: conv2 Input to conv 3 The convolution block performs a second downsampling convolution operation to obtain f conv3 , convolutional block conv 3 It consists of a residual regularized sparse convolution module, two residual submanifold sparse convolution modules and an aggregatable sparse convolution module; Step 26, f conv3 Input to conv 4 The convolution block performs a third downsampling convolution operation to obtain f conv4 , convolutional block conv 4 It consists of a residual regularized sparse convolution module and two residual submanifold sparse convolution modules; Step 27, f conv4 Input to conv out The convolution block performs convolution operation to obtain f out , convolutional block conv out It consists of a regular sparse convolution layer, a batch normalization layer, and a ReLU activation function layer.
4. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 3, It is characterized in that The residual submanifold sparse convolution module is composed of a residual submanifold sparse convolution layer, a batch normalization layer and a ReLU activation function layer; the residual regularized sparse convolution module is composed of a residual regularized sparse convolution layer, a batch normalization layer and a ReLU activation function layer; The operation of the residual submanifold sparse convolutional layer is as follows: f out1 =conv subm (f in )⊕f in1 where f in1 Represents the characteristics of the input residual submanifold sparse convolution layer, conv subm (·) represents the submanifold sparse convolution operation, ⊕ represents the residual connection, and f out1 Represents the features obtained after the residual submanifold sparse convolution layer; The operation of the residual regularized sparse convolutional layer is as follows: f out2 =conv reg (f in )⊕f in2 where f in2 Represents the characteristics of the input residual regularized sparse convolutional layer, conv reg (·) represents the regular sparse convolution operation, ⊕ represents the residual connection, and f out2 Represents the features obtained after the residual regularized sparse convolutional layer.
5. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 3 or 4, It is characterized in that The clusterable sparse convolution module operation includes: (a) Using a submanifold sparse convolution conv imp , according to the voxel feature f_in of the input voxel v v The effective position of the prediction effective feature unit and its surrounding kernel_size 3 The importance of feature units, the importance values are mask_v v and mask_k v , kernel_size refers to the convolution kernel size; (b) Input voxel feature f_in v With mask_v v Multiplying them together enables the voxel features to learn the importance of spatial information and facilitates subsequent back propagation calculations: f_ori v =mask_v v ×f_in v Among them f_ori v To learn the voxel features after spatial importance; (c) According to the threshold threshold, the mask_v is obtained v The index mask of the foreground and background points in indices_v fore and indices_v back , and according to indices_v fore Get indices_k fore : indices_v fore =mask_v v >threshold indices_v back =mask_v v ≤threshold indices_k fore =mask_k v [indices_v fore ]>threshold Where [] represents the Boolean Indexing operation, indices_k fore An index mask representing the units whose importance values are greater than a threshold value among the extended feature units that are determined to be valid feature units of foreground points; (d) Through indices_v fore and indices_v back Get f_ori v The foreground feature f_ori_fore v and background point features f_ori_back v , and filter out mask_k v The feature units mask_k_fore that belong to the foreground points and whose importance values are greater than the threshold v , the feature unit it represents is the important position where additional convolution calculations need to be added later: f_ori_fore v =f_ori v [indices_v fore ] f_ori_back v =f_ori v [indices_v back ] mask_k_fore v =mask_k v [indices_v fore ][indices_k fore ] (e) in f_ori_fore v The feature with a pre-connection value of 0 represents a new important position that needs to be added to the convolution calculation, so that the convolution network that has learned spatial information can output dynamically, and finally connect f_ori_back v Get the complete voxel feature output f_out v : f_out v ={[(0,…,0),…,(0,…,0)]},f_ori_fore v ,f_ori_back v ] The number of (0,…,0) is mask_k_fore v The number of new positions that need to be added to the convolution calculation, the number of 0s in (0,…,0) is f_in v Dimensionality of voxel features; (f) f_out v Input a sub-manifold sparse convolution layer, and then after the batch normalization layer and the ReLU activation function layer, the output of the final clusterable sparse convolution module is obtained.
6. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 5, It is characterized in that In (e), let f_out v with mask_k_fore v Multiply them together so that all feature units, including the new expansion, learn the spatial importance of , expressed as: f_out′ v =[{(0,…,0),…,(0,…,0)},f_ori_fore v ,f_ori_back v ]×mask_k_fore v Accordingly, in (f), let f_out′ v Alternative to f_out v .
7. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 5 or 6, It is characterized in that After (f), the method further includes: (g) Based on the more valuable prior knowledge of the foreground points, additional super-supervision is added. v and mask_k v , calculate the Focal loss between its importance prediction value and the true foreground point, and add the Focal loss to the loss of the entire network for back propagation.
8. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 1, It is characterized in that The step 4 of obtaining the final BEV characteristic diagram includes: Step 41, input the BEV feature f_bev into the downsampling convolution branch 1 to obtain f_bev down1 ; Step 42, input the BEV feature f_bev into the downsampling convolution branch 2 to obtain f_bev down2 ; Step 43, f_bev down1 Input upsampling convolution branch 1 for upsampling to get f_bev up1 ; Step 44, f_bev down2 Input upsampling convolution branch 2 for upsampling to get f_bev up2 ; Step 45, f_bev up1 and f_bev up2 Perform a concatenation operation in the channel dimension to obtain the final BEV feature map f_spa.
9. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 1, It is characterized in that In step 5, the final BEV feature map is sent to the RPN prediction head network for category prediction, bounding box regression, and direction classification tasks to obtain the final prediction result.
10. The single-stage point cloud density-aware focused convolution 3D object detection method according to claim 9, It is characterized in that The steps of obtaining the final prediction result include: Step 51, generating all anchor boxes according to the category, size, and direction types that need to be detected; Step 52, input the final BEV feature map f_spa into the classification convolution conv cls , border regression convolution conv box And direction classification convolution conv dir_cls , get the predicted classification result, predicted bounding box regression result and predicted direction classification result corresponding to each anchor box; Step 53, assigning a true value category, a direction category, and a true value box to each anchor box according to the positive sample threshold and the negative sample threshold of each category; Step 54, calculate the bounding box encoding according to each positive sample anchor box a and its assigned true value box Used for subsequent loss function calculation; Step 55, based on the predicted classification results of each anchor box, the predicted direction classification results and the bounding box encoding Calculate the loss function and train the network through back-propagation; Step 56, during inference, after predicting the classification result and bounding box regression of each anchor box, a decoding operation is performed according to the position of the anchor box and the prediction result, and finally NMS is performed to remove redundant prediction boxes to obtain the prediction result.
Citation Information
Patent Citations
Real-time three-dimensional target detection method based on point cloud cross-view feature conversion
CN114511846A
Road three-dimensional target detection method based on implicit context learning
CN114821508A
Single-stage three-dimensional point cloud target detection method based on target resampling
CN116229415A
Single-stage fine-grained lightweight point cloud 3D target detection system and method
CN116664874A
Cited By
Point cloud data sparse convolution training method and system
CN119399578A
Vehicle wind resistance coefficient determination method and device, electronic equipment and storage medium
CN120105973A
Improved PointPill three-dimensional target detection method based on fusion sparse enhancement and geometric attention
CN121437858A
Point cloud detection method and device without sparse convolution dependence, and electronic equipment
CN122368447A
