Three-dimensional target detection method based on image and point cloud fusion
By improving the MVX-Net model, combining ResNeXt-50 and CBAM attention mechanisms, and using adaptive fusion technology, the problem of image and point cloud fusion in intelligent driving is solved, significantly improving the accuracy and robustness of three-dimensional target detection, and providing Intelligent driving provides more accurate environmental perception.
Patent Information
- Application Number
- CN202410854367.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
Existing 3D target detection algorithms for intelligent driving cannot fully integrate the rich semantic information of images and the depth information of point clouds, which limits the improvement of detection performance. It is especially difficult to accurately identify targets in complex traffic environments.
Improve the MVX-Net model by using ResNeXt-50 in the image backbone network and replacing the last two convolution stages with deformable convolution DCNv2, strengthening the CBAM attention mechanism, and using adaptive weighted fusion in the point cloud and image fusion stage , improve the accuracy and stability of feature expression.
The accuracy and robustness of three-dimensional target detection are significantly improved, and targets on the road can be more accurately identified, providing better environment perception support for intelligent driving.
Smart Images

Figure CN118736561A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of deep learning, and specifically relates to a three-dimensional target detection method based on image and point cloud fusion. Background Art
[0002] Cars have become the most important means of transportation for people. However, traffic safety issues on the road are becoming increasingly serious, and traffic accidents caused by factors such as improper driver operation and driving fatigue occur frequently. As a solution, intelligent driving technology can reduce driver involvement and improve traffic safety and traffic efficiency by perceiving the surrounding scenes and making corresponding manipulations. Among them, the environmental perception module is a crucial part of the intelligent driving system. It obtains effective detection results by processing the driving environment information collected by the sensor and provides necessary information for the decision-making planning and motion control modules. Therefore, the research on intelligent driving 3D target detection algorithm is of great significance.
[0003] Common on-board sensors for smart cars include: cameras, lidar, millimeter-wave radar, inertial measurement unit, global positioning system, etc. Among them, cameras and lidar are the most widely used. Different types of sensors have their own advantages and disadvantages. A single sensor is difficult to cope with complex and changing traffic environments. Lidar sensors have strong anti-interference capabilities, high reliability, and can obtain distance information, but they are expensive, data is sparse, resolution is low, and it is difficult to identify target types; cameras are low-cost, provide color and texture information, but cannot provide depth information and are easily affected by extreme weather and time conditions. Therefore, three-dimensional target detection based on image and point cloud fusion can effectively combine the advantages of the two and further improve detection performance.
[0004] Since point clouds and images have very different data formats, how to effectively fuse the two to maximize their respective advantages is also a difficult point in current research. According to the fusion of sensor information at different levels, the fusion methods can be divided into feature-level fusion and decision-level fusion.
[0005] Decision-level fusion directly uses the two-dimensional and three-dimensional object detection networks to detect images and point clouds respectively, and fuses the detection results. The advantages of decision-level fusion are: it avoids the interaction of image and point cloud features, the reasoning speed is fast, and the detection results do not depend on the registration accuracy of point clouds and images. However, there are also certain disadvantages: decision-level fusion cannot fully integrate the rich semantic information of images and the depth information of point clouds, which limits the potential for development.
[0006] Feature-level fusion is the fusion of image and lidar features in the intermediate stage of point cloud-based 3D object detectors, such as in the backbone network, or in the process generation stage, or in the RoI refinement stage. For example, MV3D, AVOD, and MVX-Net are multimodal 3D object detection models with feature-level fusion. Summary of the invention
[0007] In order to solve the problems in the background technology, the present invention aims to propose a multimodal 3D object detection algorithm based on an improved MVX-Net model based on a deep learning method. Compared with the original MVX-Net model, it has higher accuracy.
[0008] A three-dimensional object detection method based on image and point cloud fusion includes the following steps:
[0009] S1. Take images and obtain radar point clouds in the target area.
[0010] The image data acquisition is: using equipment such as drones or vehicle-mounted cameras to shoot and obtain high-resolution ground images; the point cloud data acquisition is: using equipment such as laser radar to scan the same scene and obtain high-density and high-precision point cloud data.
[0011] S2. Data registration: Using the camera intrinsic and extrinsic parameters obtained by camera calibration, as well as the surface geometry information in the radar point cloud data, the registration between the point cloud and the image is achieved through geometric constraints.
[0012] Since the image and point cloud data come from different sources, there are differences in spatial information between the two. Therefore, data registration is required to unify the image and point cloud data from different data sources into the same coordinate system through the checkerboard calibration method for subsequent feature extraction and target detection.
[0013] S3. Use the annotation software annotate and Labelme to annotate the point cloud and image respectively, and label the targets to be identified in turn. Through annotation, the direction, location and category information of the target are provided for each point cloud and image sample. The category information includes motor vehicles, pedestrians, and cyclists.
[0014] S4. After the labeling is completed, the improved MVX-Net model is used for training. The labeled images and point cloud samples are divided into training sets and validation sets in a ratio of 7:3, and the model is used for 3D object detection training. Through multiple rounds of iterative training, the model will gradually learn the feature information of the detected target and use it to determine the direction, location and category. After the training is completed, the model with the best detection performance in the validation set is selected as the final model.
[0015] Compared with the original MVX-Net multimodal 3D object detection method, the present invention has a significant improvement in accuracy and has the following improvements:
[0016] (a) Image backbone network stage: The backbone network of the image branch is replaced with ResNeXt-50, and the ordinary 3*3 convolutions in the last two convolution stages are changed to deformable convolution DCNv2.
[0017] In order to reduce the model complexity and speed up model training and inference, only the ordinary 3*3 convolution in the last two stages of ResNeXt-50 is replaced with deformable convolution DCNv2.
[0018] (b) Image neck network stage: CBAM attention is added to each feature map of the input. The CBAM attention mechanism consists of two modules: channel attention module and spatial attention module. The channel attention module adaptively adjusts the weight coefficient of each channel so that important feature channels receive more attention, which helps to improve the accuracy of feature expression. The spatial attention module processes the position information between channels, allowing the model to learn the interaction between features at different positions, thereby further improving the stability and robustness of feature expression.
[0019] The channel attention module adaptively adjusts the weight coefficient of each channel so that important feature channels receive more attention, which helps to improve the accuracy of feature expression; the spatial attention module processes the position information between channels, allowing the model to learn how features at different positions interact with each other, thereby further improving the stability and robustness of feature expression.
[0020] (c) Point cloud image fusion stage: Adaptive fusion is used in the fusion stage of point cloud and image. The features of point cloud and image are weighted fused based on the idea of attention, making the fusion more sufficient and effective. First, the feature tensors of point cloud and image are concatenated by channel, and then all features are averaged to obtain a new tensor. Then, the tensor is expanded to the same size as the concatenated tensor through two layers of full connection as the weight tensor. Finally, the weight tensor and the concatenated tensor are multiplied as the result of weighted fusion of point cloud and image features.
[0021] S5. When performing 3D target detection on new images and point clouds, data registration is also required. Load the model structure and weights and other parameters from the trained multimodal target detection model file, and input the 3D point cloud data and 2D image data into the model. Through the forward propagation algorithm, the model will calculate the input multimodal data and output the results containing information such as target direction, location and category. Use the non-maximum suppression (NMS) algorithm to further post-process the detection results, remove overlapping detection boxes, retain the most likely target box, and improve detection accuracy.
[0022] Through the above improvements, our method significantly improves the detection accuracy in 3D object detection, which is of great significance in fields such as intelligent driving because it can accurately detect the location and direction of each target on the road.
[0023] The three-dimensional target detection method of the improved MVX-Net model provided in the example of the present invention has important application value in the field of smart cars. By optimizing the model structure, it can more accurately identify targets on the road and provide strong support for environmental perception of autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flowchart of a three-dimensional target detection method based on image and point cloud fusion provided in an embodiment of the present invention.
[0025] Figure 2 A schematic diagram of the structure of the improved MVX-Net neural network provided in an embodiment of the present invention.
[0026] Figure 3 Flowchart of the underlying ResNeXt-50 network.
[0027] Figure 4 This is a schematic diagram of the improved ResNeXt-50 network of the present invention.
[0028] Figure 5 Schematic diagram of the structure of the CBAM attention module of the present invention.
[0029] Figure 6 Schematic diagram of the adaptive fusion module designed for the present invention.
[0030] Figure 7 Trend graphs for positioning loss, classification loss, and direction loss during training.
[0031] Figure 8 and Fig. 9 The three-dimensional target detection results of the improved MVX-Net model provided in the embodiment of the present invention. Implementation
[0033] The present invention is further described in detail below in conjunction with the accompanying drawings.
[0034] The present invention discloses a three-dimensional target detection method based on image and point cloud fusion.
[0035] Reference Figure 1 , a 3D object detection method based on image and point cloud fusion, including the following specific steps:
[0036] S1. In the target area where the vehicle is traveling, use the on-board camera and lidar to capture high-definition images and obtain point cloud data, which may contain cars, cyclists and pedestrians.
[0037] S2. Perform data registration on the corresponding images and point cloud samples to obtain the camera's intrinsic and extrinsic matrix and correction matrix, and realize the coordinate system conversion between the lidar and the camera for subsequent feature extraction and target detection.
[0038] S3. Use the annotation software annotate and Labelme to annotate the point cloud and image respectively, and label the targets to be identified (including cars, cyclists, and pedestrians) in turn, labeling pedestrians as 'Pedestrian', cyclists as 'Cyclist', and cars as 'Car'. Through annotation, provide the direction, location, and category information of the target for each point cloud and image sample.
[0039] S4. After labeling, the dataset is divided into a training set and a validation set in a ratio of 7:3, and trained using the improved MVX-Net model. The samples in the training set are input into the model for 3D target detection training, and the model parameters are optimized through the back propagation algorithm to minimize the loss function. Through multiple rounds of iterative training, the model will gradually learn the feature information of the detected target and use it to determine the direction, location and category of the target. After the training is completed, the model with the best detection performance in the validation set is selected as the final model.
[0040] S5. When performing 3D target detection on new images and point clouds, data registration is also required. Load the model structure and weights and other parameters from the trained multimodal target detection model file, and input the 3D point cloud data and 2D image data into the model. Through the forward propagation algorithm, the model will calculate the input multimodal data and output the results containing information such as target direction, location and category. Use the non-maximum suppression (NMS) algorithm to further post-process the detection results, remove overlapping detection boxes, retain the most likely target box, and improve detection accuracy.
[0041] Reference Figure 2 , Figure 3 and Figure 4The overall structure of the MVX-Net improved model and the specific details of the image branch backbone network are shown in the figure. The improved image branch includes the ResNeXt-50 module, the CBAM attention module, and the FPN module connected in sequence. The MVX-Net improved model replaces the backbone network of the image branch with ResNeXt-50, and changes the ordinary 3*3 convolution in the conv4 and conv5 convolution stages to deformable convolution DCNv2. ResNeXt-50 has a total of five convolution stages, which convert the multi-scale features output by the 2, 3, 4, and 5 stages into Figure 1 And used as input to the image neck network.
[0042] Reference Figure 2 and Figure 5 The structure of the CBAM attention module added to the MVX-Net improved model is shown in the figure. First, the feature map is input into the channel attention module, and two intermediate feature maps are obtained by maximum pooling and average pooling in the channel dimension. Then, it is input into the fully connected layer for dimensionality reduction and dimensionality increase, and the results are added. The weight of each channel is obtained by the sigmoid activation function. The result obtained by multiplying the input feature map with the corresponding channel weight is input into the spatial attention module, and the maximum pooling and average pooling are performed in the channel dimension. The results are spliced on the channel, and then the number of channels is reduced to 1 through 7*7 convolution. Then, the weight of each spatial position is output through the sigmoid activation function, and it is multiplied with the input feature map to obtain the final output. If the input is a feature map of H*W*C, the output is also a feature map of H*W*C.
[0043] Reference Figure 2 and Figure 6 The structure of the adaptive fusion module used in the MVX-Net improved model is shown in the figure. First, the feature tensors of the point cloud and the image are concatenated by channel, and then all features are averaged to obtain a new tensor. Then, this tensor is expanded to the same size as the concatenated tensor through two layers of full connection as the weight tensor. Finally, the weight tensor and the concatenated tensor are multiplied as the result of the weighted fusion of the point cloud and image features. If the input image and point cloud feature size is N*C, the feature map size of the output after adaptive fusion is N*2C.
[0044] The loss trend of model training is as follows Figure 7 As shown, the loss of MVX-Net consists of three parts: positioning loss (bbox_loss), classification loss (cls_loss) and direction loss (dir_loss). The positioning loss uses smoothL1Loss, the classification loss uses FocalLoss, and the direction loss uses CrossEntropyLoss. The total loss is the sum of the three losses multiplied by their respective weight coefficients. The specific formula is:
[0045] total_loss=λ1*bbox_loss+λ2*cls_loss+λ3*dir_loss
[0046] Among them, λ1 is 2.0, λ2 is 1.0, and λ3 is 0.2.
[0047] As described above, through the process implemented by the above invention, the accuracy and robustness of three-dimensional target detection are effectively improved by improving the backbone network of the model image branch, adding the CBAM attention module and adopting adaptive fusion.
[0048] MVX-Net and the improved model of the present invention are tested and compared on the validation set of the public dataset KITTI. Since there is very little data on cyclist and pedestrian classification in the KITTI dataset, there is a lot of randomness in the training, making it difficult to verify the model performance. Therefore, only the car classification is tested. The specific experimental data are as follows:
[0049] MVX-Net Design model of the present invention 3D AP 75.40 80.23 BEV AP 84.47 88.81
[0050] In three-dimensional object detection, three-dimensional average precision (3D AP) and bird's-eye view average precision (BEV AP) are two main indicators for evaluating model detection accuracy. 3D AP represents the average precision of the three-dimensional detection box in three-dimensional space, and BEV AP represents the average precision of the three-dimensional detection box in the bird's-eye view.
[0051] It can be seen from the above table that compared with the original model MVX-Net, the 3D AP of the model designed by the present invention is improved by 4.83, and the BEV AP is improved by 4.34, and the model performance is greatly improved.
Claims
1. A three-dimensional object detection method based on image and point cloud fusion, characterized in that: The following steps are involved: S1: Collect image data and point cloud data in the target area where the vehicle is traveling; S2: Data registration: The image data and point cloud data from different data sources are unified into the same coordinate system through the checkerboard calibration method; S3: Use annotation software to annotate the image data and point cloud data, and annotate the direction, location and category information of each target object for supervised learning training model; S4: Divide the labeled data set into a training set and a validation set, and train the improved MVX-Net model; Improvements to the MVX-Net model include: 4.1) Use ResNeXt-50 to replace the backbone network of the image branch, and replace the ordinary 3*3 convolution in the last two convolution stages of ResNeXt-50 with deformable convolution DCNv2; 4.2) Add CBAM attention mechanism in the neck network stage of the image branch; 4.3) Weighted fusion of point cloud and image features by adding an adaptive fusion module; S5: Input the new image and point cloud data into the improved MVX-Net model trained in step S4 to obtain the direction, location and category information of the target to be measured.
2. A three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: In step S1: Image data collection is as follows: using a vehicle-mounted camera to shoot and obtain ground images; Point cloud data collection is: use laser radar to scan the same scene and obtain point cloud data.
3. The three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: The step S4 is specifically as follows: After labeling, the dataset is divided into training set and validation set in a ratio of 7:3, and trained using the improved MVX-Net model. The samples in the training set are input into the improved model for 3D target detection training, and the model parameters are optimized through the back propagation algorithm to minimize the loss function. Through multiple rounds of iterative training, the model gradually learns the characteristic information of the detected target and uses it to determine the direction, location and category of the target. After the training, the model with the best detection performance in the validation set is selected as the final model.
4. The three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: The step 4.1) is specifically as follows: The backbone network of the image branch in the MVX-Net model is replaced from VGG16 to ResNeXt-50, and the ordinary 3*3 convolutions in the last two convolution stages of ResNeXt-50 are replaced with deformable convolution DCNv2; the multi-scale feature maps output by the last four convolution stages of ResNeXt-50 are used as the input of the image neck network; For the feature map of the input deformable convolution DCNv2: first perform a normal convolution to obtain the offset and weight of each sampling point in the x and y directions, and then perform the following convolution operation based on the offset and weight sampling of pixels at unfixed positions to achieve adaptive adjustment of the position and shape of the convolution kernel: Among them, w n Represents the parameters in the convolution kernel, a n Indicates the pre-specified offset value, △a n is the learned offset, △z n are the learned weights, x(a0) and y(a0) represent the features of position a0 in the input and output feature maps, respectively.
5. The three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: The step 4.2) is specifically as follows: in the neck network of the image branch, a CBAM attention mechanism is added to each input feature map; The CBAM attention mechanism includes a channel attention module and a spatial attention module; The input feature is input into the channel attention module and multiplied with the output of the channel attention module to obtain the intermediate feature. The intermediate feature is input into the spatial attention module, and the output of the spatial attention module is multiplied with the intermediate feature as the output of the CBAM attention mechanism.
6. The three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: The mathematical formula of the channel attention module is as follows: N c (X)=σ(W1(W0(AvgPool(X))+W1(W0(MaxPool(X))) Among them, σ is the sigmoid activation function, X is the input, W1, W0 are fully connected, AvgPool is the global average pooling, MaxPool is the global maximum pooling, N c (X) is the output; if the input is a feature map of H*W*C, the output is a feature map of H*W*C; The mathematical formula of the spatial attention module is as follows: N S (X)=σ(m 7×7 ([AvgPool(X);MaxPool(X)])) Among them, σ is the sigmoid activation function, m 7×7 is a 7×7 convolution kernel, X is the input, AvgPool is the global average pooling, MaxPool is the global maximum pooling, [a; b] means concatenating two tensors on the channel, N S (X) is the output; if the input is a feature map of H*W*C, the output is a feature map of H*W*C.
7. The three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: In step 4.3), the features of the point cloud and the image are weighted and fused by the adaptive fusion module and then input into the 3D region proposal network; the adaptive fusion module is specifically: The output features Fi of the image branch and the output features Fp of the point cloud branch are concatenated by channel, and then the concatenated features are averaged to obtain a new tensor. Then, this tensor is expanded to the same size as the concatenated tensor through two layers of full connection as the weight tensor. Finally, the weight tensor and the concatenated tensor are multiplied as the result of weighted fusion of point cloud and image features. The mathematical formula of the adaptive fusion module is as follows: Y=[X1;X2]·σ(w1(w2(Avg[X1;X2]))) Among them, X1 is the input point cloud feature, X2 is the input image feature, σ is the sigmoid activation function, [a; b] means concatenating the two tensors on the channel, w1 and w2 are fully connected, and Avg is the averaging operation; if the input is two H*W*C feature maps, the output is a H*W*2C feature map.
8. The three-dimensional target detection method based on image and point cloud fusion according to claim 1, characterized in that: The step S5 is specifically as follows: After data registration, the new image and point cloud data are input into the trained model. Through the forward propagation algorithm, the model will calculate the input multimodal data and output the detection results including the target direction, location and category. The non-maximum suppression algorithm is used to further post-process the detection results, remove overlapping detection frames, and retain the most likely target frame to obtain the final detection result.
9. A terminal, characterized in that: The terminal includes a memory, a processor, and a three-dimensional target detection program stored in the memory and executable on the processor. When the processor executes the three-dimensional target detection program, the three-dimensional target detection method based on image and point cloud fusion as described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a three-dimensional object detection program, and when the three-dimensional object detection program is executed by the processor, the three-dimensional object detection method based on image and point cloud fusion as described in any one of claims 1-8 is implemented.
Citation Information
Cited By
Crop leaf disease quantification method based on deep learning
CN119559239A
