Road 3D Object Detection Method Based on Implicit Context Learning

Through the implicit context learning and attention fusion module, the problems of low detection accuracy and high false detection rate of sparse point cloud targets in the existing technology are solved, and better detection results for targets of different scales are achieved.

CN114821508BActive Publication Date: 2024-09-24XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210555478.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2024-09-24
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

When existing 3D target detection methods detect sparse point cloud targets, especially targets far away from lidar, they suffer from insufficient features and high false detection rates, and have poor detection effects on targets of different scales.

Method used

A road three-dimensional target detection algorithm based on implicit context learning is adopted. By expanding the grid point pooling and cross-attention modules, the implicit context information around the target is obtained, reducing background noise interference, and merging targets of different scales through the attention fusion module. feature.

Benefits of technology

It improves the detection accuracy of targets far away from the lidar, reduces the false detection rate, and improves the detection performance of small targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114821508B
    Figure CN114821508B
Patent Text Reader

Abstract

The present invention discloses a road three-dimensional target detection method based on implicit context learning, which mainly solves the problem that the existing method has low detection accuracy for sparse point cloud targets and small targets far from the radar, and is easily disturbed by background noise. Its implementation scheme is: voxelize the point cloud data; build a sparse convolutional network; build a region proposal network RPN composed of a cascade of an existing convolutional neural network and a detection network; construct an implicit context learning module and an attention fusion module, and cascade with the existing detection network to form an RCNN network; construct a three-dimensional target detection network composed of a sparse convolutional network, a region proposal network RPN and an RCNN network; train the three-dimensional target detection network; input the voxelized point cloud data into the trained three-dimensional target detection network, output the target detection frame, and obtain the specific position and category of the target. The present invention improves the detection accuracy of sparse point cloud targets and small targets, and reduces the false detection rate of targets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a three-dimensional target detection method, which can be used for detecting sparse point cloud targets. Background Art

[0002] Autonomous driving technology can realize the automatic driving of vehicles, freeing people's hands from meaningless commuting driving, reducing the incidence of traffic accidents, and protecting the lives and property of citizens. Three-dimensional object detection is one of the core technologies of autonomous driving. It can detect cars and pedestrians in the surrounding environment in real time, realize the perception part of the autonomous driving system, enable the autonomous driving system to make safe and reasonable operations, and reduce the occurrence of safety accidents. At present, deep learning has become the mainstream method in three-dimensional object detection due to its powerful nonlinear and feature learning capabilities.

[0003] In the article "PV-RCNN: Point-Voxel Feature Set Abstraction for 3D Object Detection" published by Shi et al. at the "IEEE Conference on Computer Vision and Pattern Recognition" conference, a 3D object detection method based on raw point cloud and voxel joint detection was proposed. First, the point cloud data is voxelized, and non-empty voxel features are extracted through a sparse convolutional network to obtain a voxel feature map, which is then converted into a voxel bird's-eye view feature map and input into the region proposal network RPN to predict the proposed box; then the original point cloud is downsampled to a fixed number of key points, and the multi-scale voxel features and bird's-eye view features are fused through the key points. The key point features are input into the detection network to fine-tune the proposed box and obtain the final detection box. Although this method can improve the detection effect of multi-scale objects by fusing voxel features of different scales through key points, the detection effect of sparse point cloud objects is poor because only the internal voxel features of the proposed box are considered in the grid point pooling mechanism of the RCNN stage.

[0004] Deng et al. proposed a voxel-based 3D object detection method in the article "Voxel R-CNN: Towards High Performance Voxel-based 3D Object Detection" published at the "Association for the Advance of Artificial Intelligence" conference. The network structure of this method is divided into three parts: sparse convolutional network, region proposal network RPN and region-based convolutional neural network RCNN. This method first voxelizes the point cloud data, then uses a sparse convolutional network to learn the feature representation of the voxelized point cloud, extracts features from the non-empty voxels, obtains the voxel feature map, and maps the voxel feature map to a bird's-eye view. The feature is extracted through the region proposal network RPN, and the initial proposal box is predicted; finally, the voxel features in the proposal box are grid-point pooled through the RCNN network to further optimize the initial proposal box and obtain a more accurate detection box. This method improves the grid point pooling mechanism in the RCNN stage, splits the relative coordinates and features of the voxels, avoids repeated calculations, and improves the efficiency of pooling. However, its disadvantage is that since only the voxel features within the proposed box are considered during grid point pooling, the detection effect of sparse point cloud targets is affected, especially the detection accuracy of sparse point cloud targets far away from the point cloud acquisition device is low. Summary of the invention

[0005] The purpose of the present invention is to propose a road three-dimensional target detection algorithm based on implicit context learning in response to the deficiencies of the above-mentioned prior art, so as to solve the problems that the existing method only extracts features from non-empty voxels in the suggestion box, resulting in insufficient features obtained for targets far away from the lidar, the network model has low detection accuracy for such targets, when introducing implicit context information around the target, the background noise is not suppressed, resulting in a high false detection rate of the target by the network model, and the network model has poor fusion effect on target features of different scales, resulting in poor detection performance for small targets.

[0006] To achieve the above object, the technical solution of the present invention includes the following:

[0007] (1) 3712 point cloud data scenes were selected from the KITTI dataset as the training set, and the remaining 3769 point cloud scenes were used as the test set;

[0008] (2) Voxelization of point cloud data:

[0009] The space where the point cloud is located is divided into voxels of the same size, and the point cloud data is assigned to the corresponding voxels according to its spatial coordinates. According to the sparse characteristics of the point cloud, most of the voxels are empty voxels that do not contain point cloud data, and the remaining small part is non-empty voxels that contain point cloud data;

[0010] (3) Using the existing sparse convolutional network to extract non-empty voxel features, a voxel feature map is obtained, that is, the voxel feature map is first compressed in the depth dimension, and then its depth dimension features are fused into the channel dimension features to transform the voxel feature map into a bird's-eye view voxel feature map, and then the voxel feature map is transformed into a voxel bird's-eye view feature map;

[0011] (4) Selecting an existing region proposal network RPN composed of a cascade of a convolutional neural network and a detection network, extracting target features from a voxel bird's-eye view feature map through its convolutional neural network, obtaining a feature map containing multi-scale target information, obtaining target information in the feature map through its detection network, and predicting a proposal box for initial positioning of the target;

[0012] (5) Constructing a region-based convolutional neural network RCNN:

[0013] (5a) Establishing an implicit context learning module:

[0014] (5a1) Build an extended grid point pooling submodule: multiply the size of the proposal box by 4 different expansion factors to obtain 4 extended sub-proposal boxes of different sizes, evenly place different numbers of grid points in the original proposal box and the 4 extended sub-proposal boxes, perform grid point pooling on the voxel features in the original proposal box, perform extended grid point pooling on the voxel features in each extended sub-proposal box, and cascade the grid point features obtained from the 4 extended sub-proposal boxes;

[0015] (5a2) Build a cross-attention submodule consisting of a multi-head attention group and a fully connected layer, where the multi-head attention group consists of two parallel attention heads, and the output features of each attention head are calculated by the query matrix, key matrix and value matrix through the scaled dot product formula;

[0016] (5a3) The extended grid point pooling submodule and the cross attention submodule are cascaded to form an implicit context learning module;

[0017] (5b) Building an attention fusion module consisting of four convolutional sub-networks. Each convolutional sub-network includes 2 convolutional layers, 2 batch normalization layers, and 1 non-linear activation layer. The non-linear activation layer uses the linear rectifier unit activation function ReLU.

[0018] (5c) The implicit context learning module, the attention fusion module and the existing detection network are cascaded to form the RCNN network;

[0019] (6) The existing sparse convolutional network, the region proposal network RPN and the RCNN network constructed in (5) are cascaded to form a 3D object detection network;

[0020] (7) Training 3D object detection network:

[0021] The voxelized point cloud data is input into the 3D object detection network, and the classification loss function L is used cls (p,c), regression loss function L reg (δ,t) and confidence loss function L conf (p conf , IoU') respectively calculates the classification loss value loss of the category prediction probability p of the three-dimensional object detection network and the category label c cls , regression prediction result δ and regression loss value loss of regression label t regr , confidence prediction result p conf Confidence loss value loss with confidence label IoU' conf , the network parameters are iteratively updated through the Adam_onecycle optimizer with an initial learning rate of 0.003 and 80 training rounds until the classification loss function, regression loss function and confidence loss function of the network converge, and a trained network model is obtained;

[0022] (8) Detecting road 3D point cloud data:

[0023] The same method as step (2) is used to voxelize the point cloud data to be detected, and the obtained voxel features are input into the trained 3D target detection network to output the 3D detection frames of different targets such as cars, pedestrians and riders.

[0024] Compared with the prior art, the present invention has the following advantages:

[0025] 1. The implicit context learning module constructed by the present invention aims at targets that are far away from the lidar device. The extended grid point pooling submodule therein expands the suggestion box by different expansion factors to obtain implicit context information around the target and supplement the characteristics of this type of target. Compared with the existing technology, the detection accuracy of the network model for targets that are far away from the lidar is improved.

[0026] 2. The implicit context learning module constructed by the present invention has a cross-attention submodule for fusing the target features and the implicit context features around them, assigning a larger weight coefficient to similar features, thus avoiding the interference of background noise and reducing the false detection rate of the network model for the target.

[0027] 3. The attention fusion module constructed by the present invention can better focus on the global semantic information and local detail information in the target features when fusing target features of different scales, thereby improving the fusion effect of multi-scale targets and having better detection performance for small-scale targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart for realizing the present invention;

[0029] Figure 2 It is a structural block diagram of the sparse convolutional network in the present invention;

[0030] Figure 3 This is a block diagram of the convolutional neural network structure in the region proposal network RPN of the present invention;

[0031] Figure 4 A structural block diagram of a detection network in a regional proposal network RPN of the present invention;

[0032] Figure 5 It is a model block diagram of constructing a region-based convolutional neural network RCNN in the present invention;

[0033] Figure 6 for Figure 2 The structural diagram of the cross-attention submodule;

[0034] Figure 7 for Figure 2 The structural diagram of the implicit context learning module in the paper;

[0035] Figure 8 for Figure 2 The structural diagram of the attention fusion module;

[0036] Fig. 9 The simulation results of point cloud in the scene of two cars and one pedestrian using the present invention and the existing method;

[0037] Fig.10 The simulation results of point clouds in seven car scenes using the present invention and existing methods are shown;

[0038] Fig.11 The simulation results of point cloud in the scene of three cars and one rider using the present invention and the existing method;

[0039] Fig.12 The simulation results of point clouds in three car scenes using the present invention and existing methods are shown; DETAILED DESCRIPTION

[0040] The embodiments and effects of the present invention are further described below in conjunction with the accompanying drawings.

[0041] Reference Figure 1 , the implementation steps for this example are as follows:

[0042] Step 1. Get the training set and test set.

[0043] This example uses the KITTI dataset, and selects 3712 point cloud data scenes as the training set, and the remaining 3769 point cloud scenes as the test set.

[0044] Step 2: Voxelize the point cloud.

[0045] 2.1) Divide the space where all point clouds in the training set and the test set are located into voxels of the same size, that is, according to the distribution range of the point cloud data in the three-dimensional space of the x-axis [-40, 40], the distribution range of the y-axis [0, 70.4], and the distribution range of the z-axis [-3, 1], the sizes of the voxels in the corresponding three dimensions are set to [0.05, 0.05, 0.1] respectively;

[0046] 2.2) Divide the space where the point cloud is located into voxels according to the size set in 2.1), and obtain a majority of empty voxels that do not contain point cloud data and a minority of non-empty voxels that contain point cloud data.

[0047] Step 3. Build a sparse convolutional network and output voxel feature map.

[0048] Reference Figure 2 , the specific implementation of this step is as follows:

[0049] 3.1) A sparse convolutional network is constructed by 8 submanifold sparse convolutional layers, 4 spatial sparse convolutional layers, 12 batch normalization layers, and 12 ReLU activation function layers. The structures are as follows:

[0050] Input layer → 1st submanifold sparse convolution layer → 1st batch normalization layer → 1st ReLU activation function layer → 2nd submanifold sparse convolution layer → 2nd batch normalization layer → 2nd ReLU activation function layer → 1st spatial sparse convolution layer → 3rd batch normalization layer → 3rd ReLU activation function layer → 3rd submanifold sparse convolution layer → 4th batch normalization layer → 4th ReLU activation function layer → 4th submanifold sparse convolution layer → 5th batch normalization layer → 5th ReLU activation function layer → 2nd spatial sparse convolution layer → 6th batch normalization layer → 6th ReLU activation function layer → 5th submanifold Manifold sparse convolution layer → 7th batch normalization layer → 7th ReLU activation function layer → 6th sub-manifold sparse convolution layer → 8th batch normalization layer → 8th ReLU activation function layer → 3rd spatial sparse convolution layer → 9th batch normalization layer → 9th ReLU activation function layer → 7th sub-manifold sparse convolution layer → 10th batch normalization layer → 10th ReLU activation function layer → 8th sub-manifold sparse convolution layer → 11th batch normalization layer → 11th ReLU activation function layer → 4th spatial sparse convolution layer → 12th batch normalization layer → 12th ReLU activation function layer → output layer;

[0051] The convolution kernel size of each submanifold sparse convolution layer is 3, the stride is 1, and the padding is 1;

[0052] The convolution kernel size of each spatial sparse convolution layer is 3, the stride is 2, and the padding is 2;

[0053] In the sparse convolution network, the number of convolution kernels from the first submanifold sparse convolution layer to the second submanifold sparse convolution layer is 16;

[0054] The number of convolution kernels in the first spatial sparse convolution layer to the fourth submanifold sparse convolution layer is 32;

[0055] The number of convolution kernels in the second spatial sparse convolution layer to the eighth submanifold sparse convolution layer is 64;

[0056] The number of convolution kernels in the 4th spatial sparse convolution layer is 128;

[0057] 3.2) Input the voxelized point cloud data into the constructed sparse convolutional network and output the voxel feature map.

[0058] Step 4. Build the region proposal network RPN.

[0059] 4.1) Construct a convolutional neural network consisting of two convolutional sub-networks:

[0060] 4.1.1) Construct the first convolutional subnetwork with 5 convolutional layers, 1 transposed convolutional layer, 6 batch normalization layers, and 6 ReLU activation function layers, where the stride of all convolutional layers and transposed convolutional layers is set to 1, and the size of convolution kernel and transposed convolution kernel is set to 3;

[0061] The structure of the first convolutional subnetwork is as follows:

[0062] 1st convolution layer → 1st batch normalization layer → 1st ReLU activation function layer → 2nd convolution layer → 2nd batch normalization layer → 2nd ReLU activation function layer → 3rd convolution layer → 3rd batch normalization layer → 3rd ReLU activation function layer → 4th convolution layer → 4th batch normalization layer → 4th ReLU activation function layer → 5th convolution layer → 5th batch normalization layer → 5th ReLU activation function layer → 1st transposed convolution layer → 6th batch normalization layer → 6th ReLU activation function layer;

[0063] 4.1.2) Construct the second convolutional subnetwork with 5 convolutional layers, 1 transposed convolutional layer, 6 batch normalization layers, and 6 ReLU activation function layers, where the stride of the convolutional layer in the first convolutional block and the transposed convolutional block is set to 2, the stride of the convolutional layer in the remaining convolutional blocks is set to 1, and the size of all convolutional kernels and transposed convolutional kernels is set to 3;

[0064] The structure of the second convolutional subnetwork is as follows:

[0065] 6th convolution layer → 7th batch normalization layer → 7th ReLU activation function layer → 7th convolution layer → 8th batch normalization layer → 8th ReLU activation function layer → 8th convolution layer → 9th batch normalization layer → 9th ReLU activation function layer → 9th convolution layer → 10th batch normalization layer → 10th ReLU activation function layer → 10th convolution layer → 11th batch normalization layer → 11th ReLU activation function layer → 2nd transposed convolution layer → 12th batch normalization layer → 12th ReLU activation function layer;

[0066] 4.1.3) The first convolutional subnetwork and the second convolutional subnetwork are cascaded to form a convolutional neural network, such as Figure 3 shown.

[0067] 4.2) Construct a detection network consisting of three branches in parallel: classification prediction, regression prediction, and rotation angle range prediction. Each branch is implemented by a two-dimensional convolution layer with a convolution kernel size of 1×1, such as Figure 4 As shown;

[0068] 4.3) The convolutional neural network and the detection network are cascaded to form a region proposal network RPN.

[0069] Step 5. Output the proposal box through the region proposal network RPN.

[0070] 5.1) Compress the voxel feature map output by the sparse convolutional network in the depth dimension, and then fuse its depth dimension features into the channel dimension features to transform the voxel feature map into a bird's-eye view voxel feature map;

[0071] 5.2) The bird's-eye view voxel feature map is input into the region proposal network RPN, and the target features in the feature map are extracted through the convolutional neural network, and the voxel features are output in two ways, namely, one way is through the first convolutional subnetwork → the second convolutional subnetwork to output the voxel features; the other way is through the first convolutional subnetwork to cross-connect and output the voxel features.

[0072] 5.3) The voxel features of the two outputs are cascaded and input into the detection network to predict and output the proposed box for initial positioning.

[0073] Step 6. Build the RCNN network.

[0074] Reference Figure 5 , the specific implementation of this step is as follows:

[0075] 6.1) Constructing implicit context learning module:

[0076] 6.1.1) Set up the extended grid point pooling submodule:

[0077] The size of the suggestion box is multiplied by four different expansion factors, namely [1,1,1], [1.2,1.2,1], [1.5,1.5,1], and [2,2,1], to obtain four expanded sub-suggestion boxes of different scales;

[0078] Different numbers of grid points are evenly placed in the original proposal box and the four extended sub-proposal boxes, that is, 6×6×6 grid points are placed in the original proposal box, and 4×4×4, 4×4×4, 4×4×4, and 1×1×1 grid points are placed in the four extended sub-proposal boxes respectively;

[0079] Search for voxels in the neighborhood of each grid point in the original suggestion box within the set range, and sample the neighborhood voxels of each grid point to 16 voxels. Perform maximum pooling on the features of these 16 neighborhood voxels to obtain the grid point features in the original suggestion box.

[0080] Search for voxels in the neighborhood of each grid point in the four extended sub-suggestion boxes within the set range, and sample the neighborhood voxels of each grid point in the first sub-suggestion box to 16 voxels and perform maximum pooling. Sample the neighborhood voxels of each grid point in the second sub-suggestion box to 16 voxels and perform maximum pooling. Sample the neighborhood voxels of each grid point in the third sub-suggestion box to 16 voxels and perform maximum pooling. Sample the neighborhood voxels of each grid point in the fourth sub-suggestion box to 32 voxels and perform maximum pooling to obtain the grid point features in the four extended sub-suggestion boxes.

[0081] 6.1.2) Construct cross-attention submodule:

[0082] Reference Figure 6 , this module contains two attention heads, and the specific implementation of each attention head is as follows:

[0083] The grid point features in the original proposal box are mapped through a fully connected layer to obtain the query matrix Q;

[0084] The grid point features in the four extended sub-proposal boxes are mapped through two fully connected layers to obtain the key matrix K1 and the value matrix V1;

[0085] Multiply the query matrix Q and the key matrix K1, scale them in d dimensions, and input them into the softmax function, and then multiply them with the value matrix V1 to get the output feature head of the attention head:

[0086]

[0087] The output features of the two attention heads are cascaded as the output features of the cross-attention sub-module;

[0088] 6.1.3) Cascade the extended grid point pooling submodule and the cross attention submodule to obtain the implicit context learning module, such as Figure 7 As shown;

[0089] 6.2) Constructing attention fusion module:

[0090] Reference Figure 8 The attention fusion module consists of four convolutional subnetworks, which are respectively recorded as the first convolutional subnetwork, the second convolutional subnetwork, the third convolutional subnetwork, and the fourth convolutional subnetwork. Each convolutional subnetwork includes 2 convolutional layers, 2 batch normalization layers, and 1 ReLU activation function layer; among them, the number of channels of the two convolutional layers of each convolutional subnetwork are set to 1, the step size is set to 1, and the padding is set to 0; these two convolutional layers downsample and upsample the channels of the grid point features respectively, and the downsampling coefficient is set to 1 / 4 and the upsampling coefficient is set to 4;

[0091] The target grid point features of the two inputs are added and summed, and the channel dimension and spatial dimension of the grid point features are pooled respectively. The first convolutional subnetwork and the second convolutional subnetwork are used to map the pooled point cloud grid point features respectively to obtain the attention weight matrix of the global semantic features; the third convolutional subnetwork and the fourth convolutional subnetwork are used to map the original input grid point features respectively to obtain the attention weight matrix of the local detail features;

[0092] The two attention weight matrices are added together as the fusion weight coefficient matrix of the target grid point features to achieve attention fusion of target grid point features with different inputs.

[0093] 6.3) Cascade the implicit context learning module, attention fusion module and the existing detection network to form the RCNN network:

[0094] The detection network consists of a feature extraction submodule and two parallel branches cascaded, the two branches are the confidence prediction branch and the regression prediction branch;

[0095] The feature extraction submodule contains two fully connected layers, two batch normalization layers and two ReLU activation function layers. The structure is as follows: first fully connected layer → first batch normalization layer → first ReLU activation function layer → second fully connected layer → second batch normalization layer → second ReLU activation function layer;

[0096] Both the confidence prediction branch and the regression prediction branch contain three fully connected layers, two batch normalization layers, and two ReLU activation function layers;

[0097] The confidence prediction branch structure is: the third fully connected layer → the third batch normalization layer → the third ReLU activation function layer → the fourth fully connected layer → the fourth batch normalization layer → the fourth ReLU activation function layer → the fifth fully connected layer;

[0098] The regression prediction branch structure is: the sixth fully connected layer → the fifth batch normalization layer → the fifth ReLU activation function layer → the seventh fully connected layer → the sixth batch normalization layer → the sixth ReLU activation function layer → the eighth fully connected layer.

[0099] 6.4) The prediction results of the RCNN network output target:

[0100] 6.4.1) According to the coordinates of the proposed box, the large-scale target voxel features are cut out from the voxel feature map output by the third spatial sparse convolution block of the sparse convolution network, and the small-scale target voxel features are cut out from the voxel feature map output by the fourth spatial sparse convolution block;

[0101] 6.4.2) Set suggestion box parameters:

[0102] The two search ranges for grid point pooling of the large-scale target voxel features in the original proposal box are set to 0.8 and 1.2 respectively, and the two search ranges for extended grid point pooling of the large-scale target voxel features in the four sub-proposal boxes are set to [[1.6, 2.4, 3.2, 6.4] and [2.4, 3.2, 4.0, 6.4] respectively;

[0103] The two search ranges for grid point pooling of the small-scale target voxel features in the original proposal box are set to 0.4 and 0.8 respectively, and the two search ranges for extended grid point pooling of the small-scale target voxel features in the four sub-proposal boxes are set to [0.8, 1.2, 1.6, 3.2] and [1.6, 2.4, 3.2, 6.4] respectively;

[0104] 6.4.3) Inputting the target voxel features of two different scales into the RCNN network, extracting the implicit context information around the target through the implicit context learning module, and the implicit context learning module outputs the target grid point features containing implicit context information of two different scales;

[0105] 6.4.4) Use the attention fusion module to fuse the two target grid point features, input the fused features into the existing detection network, and output the prediction results of the target.

[0106] Step 7. Build a 3D object detection network.

[0107] The existing sparse convolutional network, the region proposal network RPN and the RCNN network constructed in step 5 are combined into a 3D object detection network. The three networks are composed of two paths, one of which is a cascade connection of the sparse convolutional network → the region proposal network RPN, and the other is a cross-connection of the sparse convolutional network. The outputs of the two paths are merged and connected to the RCNN network in a cascade manner to form a 3D object detection network.

[0108] The voxelized point cloud data is input into the sparse convolutional network → region proposal network RPN to obtain the proposal box for initial positioning of the target; and the voxelized point cloud data is input into the sparse convolutional network to obtain the voxel feature map; according to the coordinates of the proposal box, the voxel features of the proposal box area are intercepted in the voxel feature map and input into the RCNN network to obtain the detection box to be optimized.

[0109] Step 8. Calculate the total loss value Loss of the 3D object detection network.

[0110] 8.1) Calculate the classification loss value loss cls :

[0111] The classification loss function L cls (p,c) is used as the loss function of the 3D object detection network to calculate the classification loss value of the category prediction probability p of the 3D object detection network and the category label c. cls :

[0112]

[0113] Among them, N fg represents the number of suggested boxes predicted as targets, i represents the sequence number of the suggested boxes, c i Indicates the category label of the suggestion box, m is set to 0.25, p i Represents the category prediction probability of the network model for the suggestion box, n is set to 2;

[0114] 8.2) Calculate the regression loss value loss regr :

[0115] 8.2.1) Construct the regression loss function L of the proposed box by the regional proposal network RPN rpn_reg (δ, t), the rotation angle range loss function L of the region proposal network RPN for the proposal box rpn_dir (δ dir ,t dir ), the regression loss function L of the RCNN network for the detection box rcnn_reg The regression loss function L of the three-dimensional object detection network composed of (δ,t) reg (δ,t):

[0116] L reg(δ,t)=α×L rpn_reg (δ,t)+β×L rpn_dir (δ dir ,t dir )+L rcnn_reg (δ,t),

[0117] Where: α represents L rpn_reg The weight coefficient of (δ,t), β represents L rpn_dir (δ dir ,t dir )’s weight coefficient;

[0118] The regression loss function L of the region proposal network RPN for the proposal box rpn_reg (δ,t) is expressed as:

[0119]

[0120] In the formula, N fg represents the number of suggested boxes predicted as targets, i represents the sequence number of the suggested boxes, c i represents the category label of the i-th suggestion box, c i ≥1 indicates the index of the proposed box predicted as the target, k is set to 1 / 9, δ i represents the regression prediction result of the network model for the i-th suggestion box, t i represents the regression label of the i-th suggestion box;

[0121] The region proposal network RPN proposes a rotation angle range loss function L for the proposed box rpn_dir (δ dir ,t dir ) is expressed as:

[0122]

[0123] Where N fg represents the number of suggested boxes predicted as targets, i represents the sequence number of the suggested boxes, c i represents the category label of the i-th suggestion box, t dir is the rotation angle range label in the suggestion box regression label, indicating that the rotation angle of the suggestion box is within [0,π) or [π,2π), δ dir represents the rotation angle range prediction result of the 3D object detection network, Indicates the rotation angle range label of the i-th suggestion box, Represents the network model's prediction result of the rotation angle range of the i-th suggestion box;

[0124] The RCNN network has a regression loss function L for the detection box. rcnn_reg (δ,t) is expressed as:

[0125]

[0126] In the formula, N s represents the number of detection boxes, θ reg Indicates the threshold of the detection box intersection ratio, which is set to 0.55. Represents the regression prediction result of the network model for the i-th detection box, represents the regression label of the i-th detection box, and k is set to 1 / 9;

[0127] 8.2.2) Using the regression loss function L of the 3D object detection network reg (δ,t) calculates the regression loss value of the 3D object detection network regr :

[0128] loss regr =L reg (δ,t)=α×L rpn_reg (δ,t)+β×L rpn_dir (δ dir ,t dir )+L rcnn_reg (δ,t)

[0129] Among them, α is set to 2 and β is set to 0.2;

[0130] 8.3) Calculate the confidence loss value loss conf :

[0131] Through the confidence loss function L conf (p conf , IoU') calculates the confidence prediction result p of the 3D object detection network conf Confidence loss value loss with confidence label IoU' conf , the formula is as follows:

[0132]

[0133] in, N s represents the number of detection boxes, i represents the sequence number of the detection box, and p conf_i Represents the confidence prediction result of the network model for the i-th detection box, IoU i It represents the intersection-over-union ratio between the i-th detection box and the corresponding true target box, and θ is set to 0.25.

[0134] 8.4) According to the classification loss value loss cls , regression loss value loss regr And confidence loss loss confCalculate the total loss value Loss of the 3D target detection network:

[0135] Loss = loss cls +loss regr +loss conf .

[0136] Step 9. Train the 3D object detection network.

[0137] 9.1) Set the initial learning rate of the Adam_onecycle optimizer to 0.003 and the number of training rounds to 80;

[0138] 9.2) The total loss value Loss of the three-dimensional object detection network is back-propagated, and the weights of the three-dimensional object detection network are iteratively updated using the Adam_onecycle optimizer according to the gradient descent method until the total loss value Loss of the three-dimensional object detection network converges to obtain a trained network model.

[0139] Step 10. Detect the three-dimensional point cloud data.

[0140] The point cloud data to be detected is voxelized according to the method in step 2, and the obtained voxel features are input into the trained 3D target detection network. The 3D detection frames of different targets such as cars, pedestrians and riders are output, the specific position and category of the target are obtained, and the 3D detection of the target is completed.

[0141] The effect of the present invention is further described below in conjunction with simulation experiments:

[0142] 1. Simulation experiment conditions:

[0143] The hardware platform of the simulation experiment of the present invention: the processor is Intel (R) Core i9-11900F CPU, the memory is 64GB, and the graphics card is GeForce RTX3090.

[0144] The software platform of the simulation experiment of the present invention is: Python 3.7, Pytorch 1.8.

[0145] 2. Simulation content and results analysis:

[0146] Simulation 1: Under the above conditions, the present invention and the existing PV RCNN and Voxel RCNN methods are used to detect the car and pedestrian dual targets in the test set of the KITTI dataset. The results are as follows: Fig. 9 ,in:

[0147] Fig. 9 (a) is the real annotated image;

[0148] Fig. 9(b) is the result of the existing PV RCNN method, in which the background area is mistakenly detected as a pedestrian target;

[0149] Fig. 9 (c) is the result of the existing Voxel RCNN method, in which the background area is mistakenly detected as a vehicle target;

[0150] Fig. 9 (d) is a result diagram of the present invention, in which no false detection occurs;

[0151] Fig. 9 It shows that the present invention can avoid the interference of background noise and reduce the false detection rate of the target.

[0152] Simulation 2: Under the above conditions, the present invention and the existing PV RCNN and Voxel RCNN methods are used to detect a single target of a car. The results are as follows: Fig.10 ,in:

[0153] Fig.10 (a) is the real annotated image;

[0154] Fig.10 (b) is the result of the existing PV RCNN method, in which the background area is mistakenly detected as a car and a pedestrian target;

[0155] Fig.10 (c) is the result of the existing Voxel RCNN method, in which the background area is mistakenly detected as a car and a pedestrian target;

[0156] Fig.10 (d) is a result diagram of the present invention, in which no false detection occurs;

[0157] Fig.10 It shows that the present invention can avoid the interference of background noise and reduce the false detection rate of the target.

[0158] Simulation 3: Under the above conditions, the present invention and the existing PV RCNN and Voxel RCNN methods are used to detect the dual targets of the car and the rider. The results are as follows: Fig.11 ,in:

[0159] Fig.11 (a) is the real annotated image;

[0160] Fig.11 (b) is the result of the existing PV RCNN method, in which the smaller car and rider targets are not detected;

[0161] Fig.11 (c) is the result of the existing Voxel RCNN method, in which the smaller car and rider targets are not detected;

[0162] Fig.11 (d) is a result diagram of the prior art of the present invention, in which a rider target with a smaller size can be detected;

[0163] Fig.11 It shows that the present invention can improve the detection accuracy of rider targets with smaller sizes.

[0164] Simulation 4: Under the above conditions, the present invention and the existing PV RCNN and Voxel RCNN methods are used to detect a single car target. The results are as follows: Fig.12 ,in:

[0165] Fig.12 (a) is the real annotated image;

[0166] Fig.12 (b) is the result of the existing PV RCNN method, in which the smaller car target is not detected;

[0167] Fig.12 (c) is the result of the existing Voxel RCNN method, in which the smaller car target is not detected;

[0168] Fig.12 (d) is a result diagram of the existing invention, in which a car target with a smaller size can be successfully detected;

[0169] Fig.12 It shows that the present invention can improve the detection accuracy of car targets with smaller sizes.

[0170] Simulation 5. Under the above conditions, the test set of the KITTI dataset is detected using the present invention and the existing PV RCNN and Voxel RCNN methods. The average precision AP index and the average directional similarity AOS index are used to measure the detection performance of the three-dimensional target detection network for targets of three detection levels: simple, medium and difficult. The results are shown in Tables 1 and 2.

[0171] Table 1. AP index simulation experiment results of KITTI dataset test set

[0172]

[0173] Table 2 AOS index simulation experiment results of KITTI dataset test set

[0174]

[0175]

[0176] As can be seen from Table 1 and Table 2, the AP value and AOS value of the present invention for the medium and difficult levels of the three categories of targets are greater than or equal to the AP value and AOS value of the existing method, indicating that the present invention can improve the detection accuracy of targets far away from the laser radar.

[0177] The above simulation experiments show that the implicit context information used in the present invention supplements the features of targets far away from the laser radar, which can improve the detection accuracy of such targets. At the same time, the present invention uses a cross-attention sub-module to fuse the target grid point features in the original suggestion box and the grid point features in the extended sub-suggestion box, and assigns a larger weight value to the grid point features in the extended sub-suggestion box that are similar to the target grid point features, thereby avoiding the interference of background noise and solving the problem of high target false detection rate. In addition, the present invention uses an attention fusion module to fuse target grid point features of different scales, thereby solving the problem of small targets being difficult to detect. The present invention can effectively improve the detection accuracy of cars, pedestrians and riders, and is a road three-dimensional target detection method with high practical value.

Claims

1. A method for detecting three-dimensional objects on a road based on implicit context learning, characterized in that: The steps include: (1) 3712 point cloud data scenes were selected from the KITTI dataset as the training set, and the remaining 3769 point cloud scenes were used as the test set; (2) Voxelization of point cloud data: The space where the point cloud is located is divided into voxels of the same size, and the point cloud data is assigned to the corresponding voxels according to its spatial coordinates. According to the sparse characteristics of the point cloud, most of the voxels are empty voxels that do not contain point cloud data, and the remaining small part is non-empty voxels that contain point cloud data; (3) Using the existing sparse convolutional network to extract non-empty voxel features, a voxel feature map is obtained, that is, the voxel feature map is first compressed in the depth dimension, and then its depth dimension features are fused into the channel dimension features to transform the voxel feature map into a bird's-eye view voxel feature map, and then the voxel feature map is transformed into a voxel bird's-eye view feature map; (4) Selecting an existing region proposal network RPN composed of a cascade of a convolutional neural network and a detection network, extracting target features from a voxel bird's-eye view feature map through its convolutional neural network, obtaining a feature map containing multi-scale target information, obtaining target information in the feature map through its detection network, and predicting a proposal box for initial positioning of the target; (5) Constructing a region-based convolutional neural network RCNN: (5a) Establishing an implicit context learning module: (5a1) Building an extended grid point pooling submodule: Multiply the size of the proposal box by 4 different expansion coefficients to obtain 4 extended sub-proposal boxes of different sizes. Evenly place different numbers of grid points in the original proposal box and the 4 extended sub-proposal boxes, respectively. Perform grid point pooling on the voxel features in the original proposal box, and perform extended grid point pooling on the voxel features in each extended sub-proposal box. Cascade the grid point features obtained from the 4 extended sub-proposal boxes. (5a2) Build a cross-attention submodule consisting of a multi-head attention group and a fully connected layer, where the multi-head attention group consists of two parallel attention heads, and the output features of each attention head are calculated by the query matrix, key matrix and value matrix through the scaled dot product formula; (5a3) The extended grid point pooling submodule and the cross attention submodule are cascaded to form an implicit context learning module; (5b) Building an attention fusion module consisting of four convolutional sub-networks. Each convolutional sub-network includes 2 convolutional layers, 2 batch normalization layers, and 1 non-linear activation layer. The non-linear activation layer uses the linear rectifier unit activation function ReLU. (5c) The implicit context learning module, the attention fusion module and the existing detection network are cascaded to form the RCNN network; (6) The existing sparse convolutional network, the region proposal network RPN and the RCNN network constructed in (5) are cascaded to form a 3D object detection network; (7) Training 3D object detection network: The voxelized point cloud data is input into the 3D object detection network, and the classification loss function L is used cls (p,c), regression loss function L reg (δ,t) and confidence loss function L conf (p conf , IoU') respectively calculates the classification loss value loss of the category prediction probability p of the three-dimensional object detection network and the category label c cls , regression prediction result δ and regression loss value loss of regression label t regr , confidence prediction result p conf Confidence loss value loss with confidence label IoU' conf , the network parameters are iteratively updated through the Adam_onecycle optimizer with an initial learning rate of 0.003 and 80 training rounds until the classification loss function, regression loss function and confidence loss function of the network converge, and a trained network model is obtained; (8) Detecting road 3D point cloud data: The same method as step (2) is used to voxelize the point cloud data to be detected, and the obtained voxel features are input into the trained 3D target detection network to output the 3D detection frames of different targets such as cars, pedestrians and riders.

2. The method according to claim 1, characterized in that In (2), the space where the point cloud is located is divided into voxels of the same size. The distribution range of the point cloud data in the space is [-40, 40], [0, 70.4], [-3, 1], and the voxel size in the corresponding range is set to [0.05, 0.05, 0.1].

3. The method according to claim 1, characterized in that: The sparse convolutional network in (3) includes 8 submanifold sparse convolutional layers, 4 spatial sparse convolutional layers, 12 batch normalization layers and 12 ReLU activation function layers, and its structure is as follows: Input layer → 1st submanifold sparse convolution layer → 1st batch normalization layer → 1st ReLU activation function layer → 2nd submanifold sparse convolution layer → 2nd batch normalization layer → 2nd ReLU activation function layer → 1st spatial sparse convolution layer → 3rd batch normalization layer → 3rd ReLU activation function layer → 3rd submanifold sparse convolution layer → 4th batch normalization layer → 4th ReLU activation function layer → 4th submanifold sparse convolution layer → 5th batch normalization layer → 5th ReLU activation function layer → 2nd spatial sparse convolution layer → 6th batch normalization layer → 6th ReLU activation function layer → 5th submanifold Manifold sparse convolution layer → 7th batch normalization layer → 7th ReLU activation function layer → 6th sub-manifold sparse convolution layer → 8th batch normalization layer → 8th ReLU activation function layer → 3rd spatial sparse convolution layer → 9th batch normalization layer → 9th ReLU activation function layer → 7th sub-manifold sparse convolution layer → 10th batch normalization layer → 10th ReLU activation function layer → 8th sub-manifold sparse convolution layer → 11th batch normalization layer → 11th ReLU activation function layer → 4th spatial sparse convolution layer → 12th batch normalization layer → 12th ReLU activation function layer → output layer; The convolution kernel size of each submanifold sparse convolution layer is 3, the stride is 1, and the padding is 1; The convolution kernel size of each spatial sparse convolution layer is 3, the stride is 2, and the padding is 2; In the sparse convolution network, the number of convolution kernels from the first submanifold sparse convolution layer to the second submanifold sparse convolution layer is 16; The number of convolution kernels in the first spatial sparse convolution layer to the fourth submanifold sparse convolution layer is 32; The number of convolution kernels in the second spatial sparse convolution layer to the eighth submanifold sparse convolution layer is 64; The number of convolution kernels in the 4th spatial sparse convolution layer is 128.

4. The method according to claim 1, characterized in that The convolutional neural network and detection network structures in (4) are as follows: The convolutional neural network consists of two cascaded convolutional sub-networks, each of which contains 5 convolutional layers, 1 transposed convolutional layer, 6 batch normalization layers and 6 ReLU activation function layers, where: The structure of the first convolutional subnetwork is as follows: 1st convolution layer → 1st batch normalization layer → 1st ReLU activation function layer → 2nd convolution layer → 2nd batch normalization layer → 2nd ReLU activation function layer → 3rd convolution layer → 3rd batch normalization layer → 3rd ReLU activation function layer → 4th convolution layer → 4th batch normalization layer → 4th ReLU activation function layer → 5th convolution layer → 5th batch normalization layer → 5th ReLU activation function layer → 1st transposed convolution layer → 6th batch normalization layer → 6th ReLU activation function layer; the step size of each convolution layer and transposed convolution layer is set to 1, and the size of all convolution kernels is set to 3; The structure of the second convolutional subnetwork is as follows: The 6th convolution layer → the 7th batch normalization layer → the 7th ReLU activation function layer → the 7th convolution layer → the 8th batch normalization layer → the 8th ReLU activation function layer → the 8th convolution layer → the 9th batch normalization layer → the 9th ReLU activation function layer → the 9th convolution layer → the 10th batch normalization layer → the 10th ReLU activation function layer → the 10th convolution layer → the 11th batch normalization layer → the 11th ReLU activation function layer → the 2nd transposed convolution layer → the 12th batch normalization layer → the 12th ReLU activation function layer; the stride of the 6th convolution layer and the 2nd transposed convolution layer are both set to 2, the stride of the other convolution layers are all set to 1, and the size of all convolution kernels are set to 3; The detection network is composed of three branches in parallel: classification prediction, regression prediction, and rotation angle range prediction. Each branch is implemented by a two-dimensional convolution layer with a convolution kernel size of 1×1.

5. The method according to claim 1, characterized in that: The implementation of (5a1) is as follows: The size of the suggestion box is multiplied by 4 different expansion factors, namely [1,1,1], [1.2,1.2,1], [1.5,1.5,1], [2,2,1]; Different numbers of grid points are evenly placed in the original suggestion box and the four extended sub-suggestion boxes, that is, 6×6×6 grid points are placed in the original suggestion box, and 4×4×4, 4×4×4, 4×4×4, and 1×1×1 grid points are placed in the four extended sub-suggestion boxes respectively; Grid point pooling and extended grid point pooling first search for voxels in the neighborhood of each grid point within a set range, then sample the neighborhood voxels, and perform maximum pooling on the sampled neighborhood voxel features. The pooled features are the grid point features. The grid point pooling is performed on the voxel features in the original proposal box, which is to set the neighborhood voxel search range in the original proposal box to [0.4, 0.8], [0.8, 1.2], and the number of grid point sampling is set to 16; The voxel features in the four extended sub-proposal boxes are pooled with extended grid points by setting the neighborhood voxel search ranges in the four extended sub-proposal boxes to [[0.8, 1.2, 1.6, 3.2], [1.6, 2.4, 3.2, 6.4]], [[1.6, 2.4, 3.2, 6.4], [2.4, 3.2, 4.0, 6.4]], and the sampling number of grid points is set to [16, 16, 16, 32].

6. The method according to claim 1, characterized in that Step (5a2) calculates the output features of each attention head by using the scaled dot product formula from the query matrix, key matrix and value matrix, which is implemented as follows: The grid point features in the original proposal box are mapped through a fully connected layer to obtain the query matrix Q; The grid point features in the four extended sub-proposal boxes are mapped through two fully connected layers to obtain the key matrix K1 and the value matrix V1; Multiply the query matrix Q and the key matrix K1, scale them in d dimensions, and input them into the softmax function. Then multiply them with the value matrix V1 to get the output feature head of the attention head. The formula is as follows:

7. The method according to claim 1, characterized in that In step (5b), the two convolutional layers of each convolutional subnetwork have the number of channels set to 1, the step size set to 1, and the padding set to 0. The two convolutional layers downsample and upsample the channels of the grid point features, respectively. The downsampling coefficient is set to 1 / 4, and the upsampling coefficient is set to 4.

8. The method according to claim 1, characterized in that The detection network in (5c) is composed of a feature extraction submodule and two parallel branch cascades, wherein the two branches are a confidence prediction branch and a regression prediction branch; The feature extraction submodule contains two fully connected layers, two batch normalization layers and two ReLU activation function layers. The structure is as follows: first fully connected layer → first batch normalization layer → first ReLU activation function layer → second fully connected layer → second batch normalization layer → second ReLU activation function layer; Both the confidence prediction branch and the regression prediction branch contain three fully connected layers, two batch normalization layers, and two ReLU activation function layers; The confidence prediction branch structure is: the third fully connected layer → the third batch normalization layer → the third ReLU activation function layer → the fourth fully connected layer → the fourth batch normalization layer → the fourth ReLU activation function layer → the fifth fully connected layer; The regression prediction branch structure is: the sixth fully connected layer → the fifth batch normalization layer → the fifth ReLU activation function layer → the seventh fully connected layer → the sixth batch normalization layer → the sixth ReLU activation function layer → the eighth fully connected layer.

9. The method according to claim 1, characterized in that: In (7), the classification loss function L is used cls (p,c) Calculate the classification loss value loss of the category prediction probability p and category label c of the three-dimensional object detection network cls , the formula is as follows: Among them, N fg represents the number of suggested boxes predicted as targets, i represents the sequence number of the suggested boxes, c i represents the category label of the i-th proposal box, m is set to 0.25, p i Represents the category prediction probability of the network model for the i-th proposal box, and n is set to 2.

10. The method according to claim 1, characterized in that In (7), the regression loss function L is used reg (δ, t) Calculate the regression prediction result δ of the 3D object detection network and the regression loss value loss of the regression label t regr , the formula is as follows: loss regr =L reg (δ,t)=α×L rpn_reg (δ,t)+β×L rpn_dir (d dir ,t dir )+L rcnn_reg (δ,t) Among them, L rpn_reg (δ,t) represents the regression loss function of the region proposal network RPN for the proposal box, which is as follows: In the formula, N fg represents the number of suggested boxes predicted as targets, i represents the sequence number of the suggested boxes, c i represents the category label of the i-th suggestion box, (c i ≥1) indicates the index of the proposed box predicted as the target, k is set to 1 / 9, δ i represents the regression prediction result of the network model for the i-th suggestion box, t i represents the regression label of the i-th suggestion box; L rpn_dir (δ dir ,t dir ) represents the rotation angle range loss function of the region proposal network RPN for the proposal box, which is as follows: Where N fg represents the number of suggested boxes predicted as targets, i represents the sequence number of the suggested boxes, c i represents the category label of the i-th suggestion box, t dir is the rotation angle range label in the suggestion box regression label, indicating that the rotation angle of the suggestion box is within [0,π) or [π,2π), δ dir represents the rotation angle range prediction result of the 3D object detection network, Indicates the rotation angle range label of the i-th suggestion box, Represents the network model's prediction result of the rotation angle range of the i-th suggestion box; L rcnn_reg (δ,t) represents the regression loss function of the RCNN network for the detection box, which is as follows: in, N s represents the number of detection boxes, θ reg Indicates the threshold of the detection box intersection ratio, which is set to 0.

55. Represents the regression prediction result of the network model for the i-th detection box, represents the regression label of the i-th detection box, and k is set to 1 / 9; α is set to 2 and β is set to 0.

2.

11. The method according to claim 1, characterized in that: In (7), the confidence loss function L is used conf (p conf , IoU') calculates the confidence prediction result p of the 3D object detection network conf Confidence loss value loss with confidence label IoU' conf , the formula is as follows: in, N s represents the number of detection boxes, i represents the sequence number of the detection box, and p conf_i Represents the confidence prediction result of the network model for the i-th detection box, IoU i It represents the intersection-over-union ratio between the i-th detection box and the corresponding true target box, and θ is set to 0.25.

Citation Information

Patent Citations

  • Multimode data fusion-based three-dimensional target detection method

    CN112347987A

  • Multi-scale aware pedestrian detection method based on improved full convolutional network

    US20210056351A1