Three-dimensional target detection method based on data-level and feature-level depth fusion

By constructing data-level and feature-level deep fusion modules and combining image and point cloud data, the accuracy and complexity problems of existing 3D target detection methods in sparse and occluded target detection are solved, and a more efficient and robust 3D Target detection.

CN118570597APending Publication Date: 2024-08-30XIDIAN UNIV

Patent Information

Application Number
CN202410692906.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing 3D target detection methods have low detection accuracy when dealing with sparse targets and occluded targets in lidar point clouds, and have high model complexity and low robustness. They fail to fully utilize the shallow structural information and deep semantic information of the image. Perform deep cross-modal fusion.

Method used

By constructing a data-level fusion module to fuse the shallow structural information of the image, a global cross-attention feature fusion module is constructed to fuse the deep semantic information of the image, a voxel feature extraction network is constructed to remove noise, and a local self-attention feature enhancement module is constructed to enhance the local information of the target. Modeling, and reducing model complexity through lightweight image feature extraction network, forming a three-dimensional target detection network based on deep fusion of data level and feature level.

Benefits of technology

The model improves the feature extraction and cross-modal fusion capabilities of point clouds and visible light images, improves the detection accuracy of sparse point clouds and occluded targets, reduces model complexity, and improves detection efficiency and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570597A
    Figure CN118570597A
Patent Text Reader

Abstract

The invention discloses a three-dimensional target detection method based on data-level and feature-level deep fusion, and mainly solves the problems of low model robustness, serious false detection, missing detection and low detection precision in the prior art. According to the implementation scheme, a data set with labels is selected and preprocessed into a training set and a test set which are uniform in size; constructing a three-dimensional target detection network comprising a data level fusion module, a voxel feature extraction module, an image feature extraction module, a global cross attention feature fusion module, a local self-attention feature enhancement module and a detection head; dividing the training set and the annotation information into a plurality of paired point cloud image groups, and sequentially and circularly inputting the paired point cloud image groups into the three-dimensional target detection network to complete training; and inputting the test set into the trained three-dimensional target detection network to output a detection result. The method has high robustness, false detection and missing detection can be effectively reduced under the condition that the point cloud is sparse or the target is shielded, the detection accuracy is improved, and the method can be used for 3D scene perception in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection, and in particular relates to a three-dimensional target detection method, which can be used by artificial intelligence machines and equipment to perceive surrounding 3D scenes. Background Art

[0002] In the past few years, the rapid development of artificial intelligence (AI) technology has spawned many emerging fields such as autonomous driving, intelligent robots, augmented reality (AR) and virtual reality (VR), which are driving the development of target detection technology from two-dimensional to three-dimensional. Three-dimensional target detection technology plays an increasingly important role in the fields of computer vision and automation. It enables computer systems to perceive and understand objects in three-dimensional space, provides rich information for various application scenarios, and enables artificial intelligence devices to adapt to complex and changing real environments. The use of data obtained by smart device sensors for three-dimensional target detection has received widespread attention from experts and scholars around the world. At present, three-dimensional target detection technology is mainly based on two types of data: lidar point cloud and visible light image. The detection methods for three-dimensional targets are mainly divided into single-modal three-dimensional target detection methods based on point cloud data and multi-modal three-dimensional target detection methods based on the fusion of point cloud and visible light image.

[0003] The input of the single-modal 3D target detection method based on point cloud data is only the lidar point cloud. According to the processing method of the point cloud, it is mainly divided into voxel-based detection method, projection-based detection method and point-based detection method, among which:

[0004] The voxel-based detection method can divide the entire point cloud scene into three-dimensional grids to obtain voxel grids of fixed size, and then encode the point cloud in each grid so that features can be extracted using a three-dimensional convolutional neural network. A typical method is Zhou et al. in Voxelnet: End-to-end learning for point cloud based 3D object detection [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2018: 4490-4499, which voxelizes point cloud data at a specific spatial resolution, and converts the voxel set in the vertical column into a feature vector through artificial feature encoding to construct a three-dimensional pseudo image. The advantage of this voxel-based detection method is that it has a low algorithm complexity and is easy to implement in hardware, but the detection performance of this voxel-based method is relatively poor.

[0005] The detection method based on projection converts point cloud data into a two-dimensional image expression by creating projection views such as the front view FV and the bird's-eye view BEV. A typical method such as Bin et al. in Pixor: Real-time 3d object detection from point clouds [C] / / Proceedings of the IEEE conference on Computer Vision and Pattern Recognition. 2018: 7652-7660 projects the point cloud of the entire scene into a bird's-eye view. This projection-based method will cause a loss of high information, with a large number of missed detections and false detections, and has great limitations.

[0006] Point-based detection methods use point clouds as direct input to learn features. Their significant advantage is that they retain the complete geometric information of the target. A typical method is Shi et al.'s Pointrcnn:3d object proposal generation and detection from point cloud[C] / / Proceedings of the IEEE / CVFconference on computer vision and pattern recognition.2019:770-779, in which PointNet++ is used to segment the point cloud and generate three-dimensional region proposals and refine them to obtain the final detection results. Although this method can retain more original structural information, it needs to balance the detection effect with the overall complexity of the algorithm, and is difficult to apply directly.

[0007] The single-modal 3D target detection method based on point cloud data only uses lidar point cloud data for feature extraction, which can effectively solve the problem of smart devices perceiving targets with dense and complete point clouds. However, it cannot perform accurate detection when processing sparse targets and occluded targets in lidar point clouds.

[0008] In view of the problems of the above-mentioned single-modal 3D target detection methods based on voxels, projections and points, the multimodal 3D target detection method that fuses point clouds and visible light images has shown great potential. It is extremely feasible to apply the fusion of point clouds and visible light images to 3D target detection. Multimodal 3D target detection based on the fusion of point clouds and visible light images has become one of the current hot research topics. Compared with point clouds, images have higher resolution and contain rich semantic information such as color and texture, which can serve as a good information supplement for point cloud data. Fully fusing them can well solve the problems of false detection and misdetection caused by the lack of information of sparse targets and occluded targets in lidar point clouds.

[0009] In the patent document "Three-dimensional object detection method based on multimodal fusion and deep attention mechanism" with application number CN202311853756.6, a fast and effective three-dimensional object detection backbone network VirSpconv based on virtual points and sparse convolution is proposed. The latest lidar depth completion model SemAttNet is used to generate virtual points, and a distance-based sampling strategy is used for all voxels to discard noise and redundant information. This method solves the problem that the density of virtual points generated using images is too high, resulting in a large number of redundant calculations involved in the detection process, and the noise caused by inaccurate depth completion significantly reduces the accuracy of detection.

[0010] In the patent document "Three-dimensional target detection method based on multimodal fusion and deep attention mechanism" with application number CN202310438843.9, a three-dimensional target detection method with deep attention mechanism is proposed. A fusion module based on deep attention mechanism is built between point cloud features and image features of consistent scales to fuse multimodal features. The fused features obtained by the multi-scale feature fusion backbone network are used to perform detection output, achieving higher-precision environmental perception.

[0011] Pang et al. projected the 3D target detection results onto a 2D plane in CLOCs: Camera-LiDAR object candidates fusion for 3D object detection[C] / / 2020IEEE / RSJ International Conference on Intelligent Robots and Systems(IROS).IEEE,2020:10386-10393, performed intersection and union calculations with the 2D target detection results, and re-encoded these results to form a sparse tensor. Finally, the optimized confidence score was output, which improved the accuracy of target detection.

[0012] Huang et al. proposed a new fusion module in Epnet: Enhancing point features with image semantics for 3d object detection [C] / / Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XV 16. Springer International Publishing, 2020: 35-52, which enhances point features with semantic image features in a point-by-point manner without any image annotations.

[0013] Zhu et al. proposed a new architecture in Vpfnet: Improving 3D object detection with virtual pointbased lidar and stereo data fusion[J].IEEE Transactions on Multimedia, 2022, which cleverly aligns and aggregates point cloud and image data in virtual points. In particular, the density of virtual points is between 3D points and 2D pixels, which can well bridge the resolution gap between the two sensors, thereby retaining more information for processing.

[0014] The above five multimodal 3D target detection methods based on the fusion of point cloud and visible light image have improved the accuracy of target detection through the fusion of point cloud and image. However, due to the relatively simple fusion method, they do not fully utilize the shallow structural information and deep semantic information of the image for deep cross-modal fusion, and introduce a large amount of noise during fusion. They lack fine-grained modeling of the local information of the target, resulting in low model robustness, low detection accuracy for sparse point cloud targets and occluded targets, and high model complexity, which reduces detection efficiency. Summary of the invention

[0015] The purpose of the present invention is to address the deficiencies of the above-mentioned prior art and propose a three-dimensional target detection method based on deep fusion of data level and feature level, so as to improve the feature extraction and cross-modal fusion capabilities of the detection model for both point cloud and visible light image data, and to improve the model's fine-grained modeling capabilities for local target information, so as to improve the accuracy of the detection model when the point cloud is sparse and the target is occluded; at the same time, reduce the model complexity and improve the model detection efficiency.

[0016] The technical ideas for achieving the purpose of the present invention are: by constructing a data-level fusion module, the shallow structural information of the image is fused; by constructing a global cross-attention feature fusion module, the deep semantic information of the image is fused; by constructing a voxel feature extraction network, the noise introduced during data-level fusion is removed; by constructing a lightweight image feature extraction network, the complexity of the model is reduced; by constructing a local self-attention feature enhancement module, the fine-grained modeling of the target local information is enhanced.

[0017] According to the above technical ideas, the implementation steps of the present invention include the following:

[0018] (1) Obtain laser point cloud and visible light image multimodal datasets from public websites, crop, normalize and generate information files for preprocessing, and then divide the preprocessed datasets into training and test sets in a ratio of 8:2;

[0019] (2) Construct a 3D object detection network based on deep fusion of data level and feature level in the Pytorch framework:

[0020] (2a) establishing a data-level fusion module including a depth value encoding module, a depth value processing module and a coordinate conversion module;

[0021] (2b) establishing a voxel feature extraction module including a voxel sampling layer, a noise removal layer and an output convolution layer;

[0022] (2c) establishing an image feature extraction module including a convolution operation unit, a maximum pooling operation unit, and three residual blocks;

[0023] (2d) establishing a global cross-attention feature fusion module including two fully connected operation units and an attention mechanism;

[0024] (2e) establishing a local self-attention feature enhancement module including a region proposal unit, a voxel ROI pooling unit, a ROI grid point position encoding unit, and a Transformer encoding unit;

[0025] (2f) establishing a detection head including a linear operation unit and two fully connected operation units;

[0026] (2g) After the voxel feature extraction module and the image feature extraction module are connected in parallel, they are connected after the data-level fusion module, and then cascaded with the global cross-attention feature fusion module, the local self-attention feature enhancement module and the detection head in sequence to form a 3D object detection network based on deep fusion of data level and feature level;

[0027] (2h) Select the existing region proposal loss L RPN , confidence prediction loss L conf and the bounding box regression loss L regAs the loss function of the network L = L RPN +L conf +αL reg , where α is a training hyperparameter;

[0028] (3) Input the training set into the 3D object detection network, use the Adam optimizer and gradient descent method to perform iterative training with the goal of minimizing the loss function, and obtain a trained 3D object detection network;

[0029] (4) Input the test set into the trained 3D object detection network and output the detection results.

[0030] The present invention constructs a three-dimensional object detection network based on data-level and feature-level deep fusion, including a data-level fusion module, a voxel feature extraction module, an image feature extraction module, a global cross-attention feature fusion module, and a local self-attention feature enhancement module. Compared with the prior art, the present invention has the following advantages:

[0031] First, the fusion of laser point cloud and visible light image is more complete, and the model is highly robust.

[0032] The existing fusion method of the multimodal 3D target detection model based on point cloud and visible light image fusion is relatively simple, the cross-modal fusion is insufficient, and a large amount of noise is introduced, resulting in low model robustness.

[0033] The present invention performs shallow and high-level multimodal fusion in two dimensions: data-level fusion and feature-level fusion, which makes up for the information loss caused by the sparsity of point clouds. In terms of data-level fusion, the present invention generates dense virtual point clouds based on image data by establishing a data-level fusion module to make up for the information loss caused by the sparse point clouds far away from the laser radar in the three-dimensional scene; in terms of feature-level fusion, the present invention establishes a global cross-attention feature fusion module and utilizes the multi-level semantic features of image data to enhance the network's perception and understanding of the target, especially when there are noise or missing point cloud data, using image features as an effective supplement to improve the detection performance and robustness of the model.

[0034] Second, the ability to model the local information of the target in a fine-grained manner is improved, which improves the robustness of the model.

[0035] Existing multimodal 3D object detection models based on point cloud and visible light image fusion do not model the potential information of the target in the region of interest, and do not consider the long-range dependency relationship between the information.

[0036] The present invention establishes a local self-attention feature enhancement module to model the local details and shape changes of the target in more detail, so that the network can more sensitively capture the key features of the occluded target, thereby improving the accuracy and robustness of detection.

[0037] Experimental results show that, compared with the existing single-modal 3D target detection method based on point cloud data and the multi-modal 3D target detection method based on the fusion of point cloud and visible light image, the present invention pays more attention to the cross-modal deep fusion between point cloud and visible light image, improves the robustness of the model, and can achieve more accurate detection when the target point cloud is sparse and occluded. Its accuracy is higher than that of the existing 3D target detection method. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 2 A schematic diagram of a three-dimensional target detection network structure based on deep fusion of data level and feature level constructed in the present invention;

[0040] Figure 3 for Figure 2 Schematic diagram of the data level fusion module structure;

[0041] Figure 4 for Figure 2 Schematic diagram of the voxel feature extraction module structure;

[0042] Figure 5 for Figure 2 Schematic diagram of the image feature extraction module structure;

[0043] Figure 6 for Figure 2 Schematic diagram of the global cross-attention feature fusion module structure in;

[0044] Figure 7 for Figure 2 Schematic diagram of the local self-attention feature enhancement module structure in ;

[0045] Figure 8 for Figure 7 Schematic diagram of the structure of the region proposal unit, voxel ROI pooling unit and ROI grid point position encoding unit in;

[0046] Fig. 9 for Figure 2 Schematic diagram of the detection head structure in FIG.

[0047] Fig.10 This is a comparison chart of the detection results of the present invention and the existing three-dimensional target detection method. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without creative work should all fall within the scope of protection of the present invention.

[0049] This example is based on a three-dimensional target detection network with deep fusion of data level and feature level, which is used to perform accurate three-dimensional target detection when the point cloud is sparse and the target is occluded. It first sends the paired point cloud and image data to the data-level fusion module to obtain a dense virtual point cloud to make up for the information loss of the sparse point cloud. The virtual point cloud and image data are then sent to the voxel feature extraction module and the image feature extraction module respectively to extract features. The extracted features are then sent to the global cross-attention feature fusion module for attention feature fusion, and then the local self-attention features of the fused features are enhanced. Finally, the enhanced features are sent to the detection head to obtain the detection results.

[0050] Reference Figure 1 The specific implementation steps of this example are as follows:

[0051] Step 1: Get the dataset and perform preprocessing and segmentation.

[0052] 1.1) Download the KITTI 3D object detection algorithm evaluation dataset from the public website. There are 7481 point cloud files and 7481 paired visible light images with an image resolution of 1242×375. The dataset includes three main categories: cars, pedestrians, and bicycles.

[0053] 1.2) Preprocess the point cloud files and visible light images:

[0054] For the point cloud file in KITTI, set the legal 3D space range, that is, the X axis is 0 to 70.4m, the Y axis is -40 to 40m, and the Z axis is -3 to 1m. Erase the point cloud beyond this range, and obtain the point cloud within the camera field of view from the erased point cloud through the KITTI annotation file;

[0055] For the visible light image in KITTI, its size is cropped to 1024×375; and the cropped visible light image is normalized, that is, its pixel value is divided by 255 to obtain the normalized visible light image;

[0056] 1.3) Save the preprocessed point cloud files and visible light images in different folders, and save the file paths of the point cloud files, image files and annotation files, the category and annotation box information of the target in the KITTI dataset, and the number of point cloud data in a txt file as the generated information file;

[0057] 1.4) The point cloud files and visible light images saved in 1.3) are redivided in a ratio of 8:2, and 5985 point cloud files and corresponding visible light images are randomly selected as the training set, and the remaining point cloud files and visible light images are used as the test set.

[0058] Step 2: Build a 3D object detection network based on deep fusion of data level and feature level.

[0059] Reference Figure 2 The three-dimensional object detection network structure constructed in this step includes: voxel feature extraction module, image feature extraction module, data-level fusion module, global cross-attention feature fusion module, local self-attention feature enhancement module and detection head.

[0060] The structure and construction steps of each module are as follows:

[0061] 2.1) Construct data-level fusion module:

[0062] 2.1.1) Establish a depth value encoding module including two branches with the same structure, such as Figure 3 (a) as shown:

[0063] Each branch is composed of five convolution blocks and five deconvolution blocks in cascade, each convolution block is composed of a convolution layer, a normalization layer and a ReLU function layer in cascade, and each deconvolution block is composed of a deconvolution layer, a normalization layer and a ReLU function layer in cascade; the output features of the first convolution block, the second convolution block, the third convolution block and the fourth convolution block are respectively added element by element with the output features of the first deconvolution block, the second deconvolution block, the third deconvolution block and the fourth deconvolution block as the output; the convolution kernel size of the convolution layer of the five convolution blocks is 3×3, and the step size is 2; the convolution kernel size of the convolution layer of the five deconvolution blocks is 5×5, and the step size is 2;

[0064] The two branches are spliced, that is, the output features of the fourth deconvolution block, the third deconvolution block, the second deconvolution block, and the first deconvolution block in the first branch are spliced ​​with the output features of the first convolution block, the second convolution block, the third convolution block, and the fourth convolution block in the second branch, respectively, and the output features of the fifth convolution block in the first branch are added element by element with the output features of the fifth convolution block in the second branch, and then the output of the fifth deconvolution block in the first branch is added with the output of the fifth deconvolution block in the second branch, so as to form a depth value encoding module whose output is a fused depth map;

[0065] 2.1.2) Setting a depth value processing module, which is used to set the depth values ​​less than 0.01 in the depth map output by the depth value encoding module to 0, so as to filter out invalid or close-range depth values, and extract the depth values ​​greater than 0 in the depth map, and record their corresponding two-dimensional coordinates;

[0066] 2.1.3) Build the coordinate transformation module:

[0067] The coordinate conversion module uses the calibration information in the data set to convert the two-dimensional coordinates recorded in the depth value processing module into three-dimensional coordinates in the laser radar coordinate system, and saves the three-dimensional coordinates and their corresponding depth values ​​in the first four columns of an array with a dimension of 8, which represent the coordinates and reflection intensity of the virtual point, and then stores the normalized color information of the image pixels corresponding to the virtual point in the next three columns, and uses the last column to identify the source of the point, which is set to 1, indicating that the point comes from the depth map;

[0068] 2.1.4) The depth value encoding module, the depth value processing module and the coordinate conversion module are cascaded in sequence, and the output of the coordinate conversion module is spliced ​​with the original point cloud to form a data-level fusion module, such as Figure 3 As shown in (b), its structural relationship is: depth value encoding module → depth value processing → coordinate conversion → splicing.

[0069] 2.2) Construct voxel feature module:

[0070] 2.2.1) Set up a voxel sampling layer to randomly remove the input voxel features to ensure the robustness of the network;

[0071] 2.2.2) Establish a noise removal layer including a 3D convolution layer, a voxel index mapping module and a 2D convolution layer, such as Figure 4 (a), where:

[0072] The 3D convolution layer is composed of three 3D convolution blocks cascaded in sequence. Each 3D convolution block is composed of a 3D sub-population convolution, a normalization layer and a ReLU function layer cascaded. The convolution kernel size of the 3D sub-population convolution is 3×3×3, and the step size is 1. The voxel features that have been randomly removed are passed through the 3D convolution layer to obtain a 3D sparse tensor T 3D ;

[0073] The voxel index mapping module is used to convert the tensor T output by the 3D convolution layer 3D Convert to a 2D sparse tensor T 2D , implemented as follows:

[0074] The first step is to multiply the 3D voxel index by the voxel size in the X, Y, and Z dimensions and add the minimum coordinate of the corresponding dimension to obtain the new coordinate system of the 3D voxel index to the lidar:

[0075] new_index[x]=voxel_index[x]×voxel_size[x]+min_x

[0076] new_index[y]=voxel_index[y]×voxel_size[y]+min_y

[0077] new_index[z]=voxel_index[z]×voxel_size[z]+min_z

[0078] Where voxel_index[x], voxel_index[y] and voxel_index[z] represent the three-dimensional voxel index in the X, Y and Z dimensions respectively, voxel_size[x] represents the length of the voxel, voxel_size[y] represents the width of the voxel, voxel_size[z] represents the height of the voxel, min_x represents T 3D The minimum coordinate of the first dimension, min_y represents T 3D The minimum coordinate of the second dimension, min_z represents T 3D The minimum coordinate of the third dimension, new_index[x], new_index[y], new_index[z] are the X coordinate, Y coordinate, and Z coordinate of the point cloud in the lidar coordinate system respectively;

[0079] The second step is to convert the point cloud coordinates obtained in the first step from the lidar coordinate system to the camera coordinate system through the external parameter matrix in the camera calibration parameters to obtain the three-dimensional coordinates of the point cloud in the camera coordinate system;

[0080] The third step is to transform the point cloud coordinates obtained in the second step into the two-dimensional coordinates of the image plane through the intrinsic parameter matrix in the camera calibration parameters;

[0081] The fourth step is to convert the T corresponding to the two-dimensional coordinates of the image plane 3D The features are concatenated in order to obtain a 2D sparse tensor T 2D , complete T 3D to a 2D sparse tensor T 2D 's mapping.

[0082] The 2D convolution layer is composed of three 2D convolution blocks cascaded in sequence, each 2D convolution block is composed of a 2D sub-manifold convolution, a normalization layer and a ReLU function layer cascaded, and the convolution kernel size of the 2D sub-manifold convolution is 3×3 and the step size is 1;

[0083] The 3D convolution layer, the voxel index mapping module and the 2D convolution layer are cascaded in sequence, and the output of the 3D convolution layer is concatenated with the output of the 2D convolution layer along the last dimension to form a noise removal layer;

[0084] 2.2.3) The four voxel sampling layers, four noise removal layers and one output convolution layer are cross-connected to form a voxel feature extraction module, such as Figure 4 (b) shows that its structural relationship is:

[0085] First voxel sampling layer → first noise removal module → second voxel sampling layer → second noise removal module → third voxel sampling layer → third noise removal module → fourth voxel sampling layer → fourth noise removal module → output convolution layer;

[0086] The output convolution layer is a 2D convolution with a kernel size of 3×3 and a stride of 1.

[0087] 2.3) A convolutional layer, a maximum pooling layer and three residual blocks are cascaded to form an image feature extraction module, such as Figure 5 (a) shows that its structural relationship is:

[0088] First convolutional layer → maximum pooling layer → first residual block → second residual block → third residual block;

[0089] The convolution kernel size of the first convolutional layer is 7×7, the step size is 2, and the structures of the three residual blocks are the same. The structural relationship is as follows: Figure 5 As shown in (b): the first convolution layer → ReLU function layer → the second convolution layer, the output of the second convolution layer is multiplied by the input of the first convolution layer and then passes through a ReLU function layer to obtain the output result.

[0090] 2.4) Establish a global cross-attention feature fusion module including two fully connected operation units and attention mechanism, such as Figure 6(a). Where:

[0091] The first fully connected operation unit is composed of a linear layer, a normalization layer, a ReLU function layer and a maximum pooling layer cascaded in sequence, and the output of the ReLU function layer is concatenated with the output of the maximum pooling layer, such as Figure 6 (b)

[0092] The second fully connected operation unit is composed of a feature mapping layer, a linear layer, a normalization layer, a ReLU function layer and a maximum pooling layer cascaded in sequence, such as Figure 6 As shown in (c), the feature mapping layer uses the mapping matrix in the data set to map the multi-level image features in the image feature extraction module to the point cloud in the voxel, and concatenates the mapped multi-level features to form a 640-dimensional feature vector;

[0093] The attention mechanism is used to fuse the input features with the voxel features output by the voxel feature extraction module as follows:

[0094] First, create a voxel query weight matrix W initialized using a standard normal distribution Q , fusion index weight matrix W K , fusion content weight matrix W V ;

[0095] Next, the voxel feature F output by the voxel feature extraction module is used l and W Q Calculate the voxel query vector Q, using the point-by-point fusion feature F i and W K Calculate the fusion key vector K and use the point-by-point fusion feature F i and W V Calculate the fused value vector V:

[0096] Q=F l ×W Q

[0097] K=F i ×W K ;

[0098] V=F i ×W V

[0099] Next, the attention feature F is calculated using the voxel query vector Q, the fusion key vector K, the fusion value vector V and the Softmax function attention :

[0100] F attention =Softmax(Q×K)×V;

[0101] Then, the attention feature F attention The voxel feature F output by the voxel feature extraction module l The global fusion features are obtained by splicing.

[0102] The above-mentioned first fully connected operation unit and the second fully connected operation unit are connected in parallel, and the 128-dimensional voxel feature vector output by the first fully connected operation unit is added to the 128-dimensional image feature vector output by the second fully connected operation unit, and then connected with the attention mechanism, and then the input of the first fully connected operation unit is connected with the attention mechanism to form a global cross-attention feature fusion module.

[0103] 2.5) Construct a local self-attention feature enhancement module, such as Figure 7 As shown:

[0104] 2.5.1) Construct a region proposal unit consisting of ten convolutional blocks and two deconvolutional blocks cascaded in sequence, such as Figure 8 (a) as shown:

[0105] Each convolution block is composed of a convolution layer, a normalization layer and a ReLU function layer cascaded in sequence, and each deconvolution block is composed of a deconvolution layer, a normalization layer and a ReLU function layer cascaded in sequence. The convolution kernel size of the convolution layer of the sixth convolution block is 3×3, and the step size is 2. The convolution kernel size of the convolution layer of the remaining nine convolution blocks is 3×3, and the step size is 1; the convolution kernel size of the convolution layer of the first deconvolution block is 1×1, and the step size is 1. The convolution kernel size of the convolution layer of the second deconvolution block is 2×2, and the step size is 2. The global fusion features output by the global cross-attention feature fusion module are sent to the region proposal unit to obtain the region of interest.

[0106] 2.5.2) Construct voxel ROI pooling unit, such as Figure 8 (b) shows that it consists of a voxel sampling layer, two convolutional layers, two normalization layers, a ReLU function layer and a maximum pooling layer. Its structural relationship is: voxel sampling layer → first convolutional layer → first normalization layer → second convolutional layer → second normalization layer → ReLU function layer → maximum pooling layer;

[0107] The convolution kernel size of each convolution layer is 3×3, and the step size is 1; the voxel sampling layer is used to divide the region of interest obtained by the region proposal unit into a 6×6×6 grid, and for each grid point, the K voxel features around the sample are set by setting the Manhattan distance and transmitted to the first convolution layer;

[0108] 2.5.3) Construct a ROI grid point position encoding unit consisting of a relative coordinate calculation layer, two convolutional layers, a normalization layer and a ReLU function layer, such as Figure 8As shown in (c), its structural relationship is: relative coordinate calculation layer → first convolution layer → first normalization layer → ReLU function layer → second convolution layer;

[0109] The convolution kernel size of each convolution layer is 3×3, and the step size is 1; the relative coordinate calculation layer divides the region of interest obtained by the region proposal unit into a 6×6×6 grid. For each grid point, the local relative coordinate is calculated with the center of the region of interest as the origin, and the relative coordinate is transmitted to the first convolution layer;

[0110] 2.5.4) Construct a Transformer encoding unit, which uses attention calculation to obtain self-attention output features, as follows:

[0111] In the first step, the pooling features output by the voxel ROI pooling unit and the local position features output by the ROI grid point position encoding unit are concatenated to obtain the ROI feature F ROI , create a ROI index weight matrix W initialized using a standard normal distribution K' , ROI query weight matrix W Q' and ROI content weight matrix W V' ;

[0112] The second step is to use the ROI index weight matrix W K' , ROI query weight matrix W Q' , ROI content weight matrix W V' and ROI feature F ROI , calculate the ROI key vector K', ROI query vector Q' and ROI value vector V':

[0113] K'=F ROI ×W K'

[0114] Q'=F ROI ×W Q' ;

[0115] V'=F ROI ×W V'

[0116] The third step is to calculate the self-attention output feature F using the ROI key vector K', ROI query vector Q' and ROI value vector V' self-attention :

[0117]

[0118] Where d is the dimension of the query vector Q'.

[0119] 2.5.5) The voxel ROI pooling unit is connected in parallel with the ROI grid point position encoding unit, connected to the region proposal unit, and then cascaded with the Transformer encoding unit to form a local self-attention feature enhancement module, such as Figure 7 .

[0120] 2.6) Establish a detection head consisting of a linear operation unit and two fully connected operation units, such as Fig. 9 (a) as shown:

[0121] The linear operation unit consists of two linear layers, two normalization layers and two ReLU function layers, as shown in Fig. 9 As shown in (b), its structural relationship is: first linear layer → first normalization layer → ReLU function layer → second linear layer → second normalization layer → ReLU function layer;

[0122] The two fully connected operation units are each composed of a linear layer, a normalization layer, and a ReLU function layer connected in sequence, and the output of the linear operation unit is passed through the first fully connected operation unit to obtain a 3D detection frame, and the output of the linear operation unit is passed through the second fully connected operation unit to obtain a target category;

[0123] The first fully connected operation unit and the second fully connected operation unit are connected in parallel and connected after the linear operation unit to form a detection head.

[0124] 2.7) After the voxel feature extraction module and the image feature extraction module are connected in parallel, they are connected after the data-level fusion module, and then cascaded with the global cross-attention feature fusion module, the local self-attention feature enhancement module and the detection head in sequence to form a 3D object detection network based on deep fusion of data level and feature level, as shown in Figure 2 shown.

[0125] Step 3: Train the 3D object detection network based on deep fusion of data level and feature level.

[0126] 3.1) Set the number of training rounds T and the training hyperparameter α;

[0127] 3.2) Divide the preprocessed point cloud and visible light image into multiple point cloud image groups according to the batch size, and input the first point cloud image group and the corresponding annotation information into the 3D object detection network to obtain the initial weights and bias values ​​of each convolution operation of the network;

[0128] 3.3) Calculate the loss value L corresponding to each point cloud image group in the training set:

[0129] L=L RPN +L conf +αL reg

[0130] Among them, LRPN represents the regional proposal loss, L conf Represents the confidence prediction loss, L reg represents the bounding box regression loss;

[0131] 3.4) Using the Adam optimizer to update the parameters of the 3D object detection network, and obtaining the 3D object detection network model after the first parameter update;

[0132] 3.5) Input the second point cloud image group into the 3D object detection model after the first parameter update, repeat steps 3.3) and 3.4) to obtain the 3D object detection network model after the second parameter update, and so on, until all image groups are input and one training round is completed;

[0133] 3.6) Repeat steps 3.3) to 3.5) until the set number of training rounds T is reached to obtain a trained 3D object detection model. In this example, the number of rounds is set but not limited to 80.

[0134] Step 4: Input the test set into the trained 3D object detection network and output the detection results.

[0135] The effect of the present invention is further illustrated by the following simulation test:

[0136] 1. Test conditions

[0137] Dataset: The KITTI dataset proposed by Andreas et al. is used;

[0138] Experimental platform: CPU is Intel(R) Core(TM) i9-10900X@3.70GHz, 64GB memory, operating system is Ubuntu20.04, graphics card is NVIDIAGeForceRTX3090, and Pytorch version is 1.8.1;

[0139] Parameter setting: In the present invention, the training batch size is set to 8, the initial learning rate is set to 0.01, the number of training rounds T is set to 80, and the hyperparameter α is set to 1.

[0140] 2. Simulation test content

[0141] Test 1: The three multimodal 3D target detection methods based on point cloud and visible light image fusion, namely CLOCs, EPNet and VPFNet, are used to perform 3D target detection on the KITTI dataset respectively, and the detection results of different categories and different difficulties are obtained. The average precision index AP of each method is calculated. The results are shown in Table 1.

[0142] Table 1 Comparison of average detection accuracy of the present invention and three existing three-dimensional target detection methods

[0143]

[0144] AP is calculated as follows:

[0145] Define the precision rate Precision and recall rate Recall as:

[0146]

[0147] TP is the number of positive samples predicted as positive samples, FP is the number of negative samples predicted as positive samples, TN is the number of negative samples predicted as negative samples, FN is the number of positive samples predicted as negative samples, T is the number of correct predictions, P is the total number of positive samples, and N is the total number of samples. According to the precision rate Precision and recall rate Recall, the PR curve is drawn, that is, p(r), and the AP is obtained by calculating the definite integral of p(r). The calculation formula is as follows:

[0148]

[0149] As can be seen from Table 1, the detection accuracy of the present invention for the three types of targets, namely, cars, pedestrians and bicycles, under various levels of difficulty is better than that of the other three three-dimensional target detection methods, indicating that the present invention has obvious advantages in detection performance.

[0150] Test 2: Use the present invention and the existing VPFNet method to perform 3D target detection on the KITTI dataset, and visualize the detection results, such as Fig.10 As shown, where:

[0151] Figure (a) shows the 260th image in the KITTI dataset and the detection results of VPFNet and the present invention;

[0152] Figure (b) shows the 190th image in the KITTI dataset and the detection results of VPFNet and the present invention;

[0153] Figure (c) shows the 366th image in the KITTI dataset and the detection results of VPFNet and the present invention;

[0154] Figure (d) shows the 52nd picture in the KITTI dataset and the detection results of VPFNet and the present invention;

[0155] Figure (e) shows the 2035th image in the KITTI dataset and the detection results of VPFNet and the present invention;

[0156] Figure (f) shows the 2076th image in the KITTI dataset and the detection results of VPFNet and the present invention;

[0157] In each picture, the gray dots are the lidar point cloud, the three-dimensional black frame is the detected target, the black dotted circle represents the missed detection area, and the black solid circle represents the misdetected area.

[0158] from Fig.10 It can be seen that the VPFNet method has a large number of false detections and missed detections, especially when the point cloud is sparse and the target is occluded. The method of the present invention can not only achieve accurate positioning of the target, but also improve the detection accuracy of the model for sparse point cloud targets and occluded targets.

[0159] In summary, the three-dimensional target detection network based on data-level and feature-level deep fusion proposed in the present invention has very high robustness to target size and scene changes, and obtains the best detection performance, which can effectively reduce false alarm rate and recall rate while improving detection rate. Based on the comparison of the above four methods in simulation results, the three-dimensional target detection performance of the method of the present invention on the lidar point cloud is better than that of the other three existing methods.

[0160] It should be noted that the step numbers in the specification and claims of the present invention are only for a clear description of the implementation scheme of the present invention to facilitate understanding, and the order of the step numbers is not limited.

Claims

1. A three-dimensional object detection method based on deep fusion of data level and feature level, characterized in that: The steps include: (1) Obtain laser point cloud and visible light image multimodal datasets from public websites, crop, normalize and generate information files for preprocessing, and then divide the preprocessed datasets into training and test sets in a ratio of 8:2; (2) Construct a 3D object detection network based on deep fusion of data level and feature level in the Pytorch framework: (2a) establishing a data-level fusion module including a depth value encoding module, a depth value processing module and a coordinate conversion module; (2b) establishing a voxel feature extraction module including a voxel sampling layer, a noise removal layer and an output convolution layer; (2c) establishing an image feature extraction module including a convolution operation unit, a maximum pooling operation unit, and three residual blocks; (2d) establishing a global cross-attention feature fusion module including two fully connected operation units and an attention mechanism; (2e) establishing a local self-attention feature enhancement module including a region proposal unit, a voxel ROI pooling unit, a ROI grid point position encoding unit, and a Transformer encoding unit; (2f) establishing a detection head including a linear operation unit and two fully connected operation units; (2g) After the voxel feature extraction module and the image feature extraction module are connected in parallel, they are connected after the data-level fusion module, and then cascaded with the global cross-attention feature fusion module, the local self-attention feature enhancement module and the detection head in sequence to form a 3D object detection network based on deep fusion of data level and feature level; (2h) Select the existing region proposal loss L RPN , confidence prediction loss L conf and the bounding box regression loss L reg As the loss function of the network L = L RPN +L conf +αL reg , where α is a training hyperparameter; (3) Input the training set into the 3D object detection network, use the Adam optimizer and gradient descent method to perform iterative training with the goal of minimizing the loss function, and obtain a trained 3D object detection network; (4) Input the test set into the trained 3D object detection network and output the detection results.

2. The method according to claim 1, characterized in that Step (1) performs cropping, normalization and information file preprocessing on the laser point cloud and visible light image multimodal dataset, which is implemented as follows: For the input point cloud, the point cloud range of the X, Y, and Z axes is specified, the point cloud that exceeds the point cloud range is erased, and the point cloud within the camera field of view is obtained from the erased point cloud through the annotation file; For the input visible light image, its size is cropped to 1024×375; Normalize the cropped visible light image, that is, divide its pixel value by 255 to obtain a normalized visible light image; Save the processed point cloud and visible light image in different folders, and save the file paths of the point cloud file, image file and annotation file, the category and annotation box information of the target in the dataset, and the number of point cloud data in a txt file as the generated information file.

3. The method according to claim 1, characterized in that: Step (2a) establishes a depth value encoding module, a depth value processing module and a coordinate conversion module in the data level fusion module, and its structural parameters are as follows; The depth value encoding module comprises two branches with the same structure, each branch is composed of five convolution blocks and five deconvolution blocks in cascade, each convolution block is composed of a convolution layer, a normalization layer and a ReLU function layer in cascade, and each deconvolution block is composed of a deconvolution layer, a normalization layer and a ReLU function layer in cascade; the output features of the first convolution block, the second convolution block, the third convolution block and the fourth convolution block are respectively added element by element with the output features of the first deconvolution block, the second deconvolution block, the third deconvolution block and the fourth deconvolution block as output; the convolution kernel size of the convolution layer of the five convolution blocks is 3×3, and the step size is 2; the convolution kernel size of the convolution layer of the five deconvolution blocks is 5×5, and the step size is 2; The two branches are spliced, that is, the output features of the fourth deconvolution block, the third deconvolution block, the second deconvolution block, and the first deconvolution block in the first branch are spliced ​​with the output features of the first convolution block, the second convolution block, the third convolution block, and the fourth convolution block in the second branch, respectively, and the output features of the fifth convolution block in the first branch are added element by element with the output features of the fifth convolution block in the second branch, and then the output of the fifth deconvolution block in the first branch is added with the output of the fifth deconvolution block in the second branch to obtain a depth map; The depth value processing module is used to set the depth values ​​in the depth map output by the depth value encoding module that are less than the set threshold to 0, so as to filter out invalid or close-distance depth values, and extract the depth values ​​greater than 0 in the depth map, and record their corresponding two-dimensional coordinates; The coordinate conversion module uses the calibration information in the data set to convert the two-dimensional coordinates recorded in the depth value processing module into three-dimensional coordinates in the laser radar coordinate system, and saves the three-dimensional coordinates and their corresponding depth values ​​in the first four columns of an array with a dimension of 8, which represent the coordinates and reflection intensity of the virtual point, and then stores the normalized color information of the image pixels corresponding to the virtual point in the following three columns, and uses the last column to identify the source of the point, which is set to 1, indicating that the point comes from the depth map; The depth value encoding module, the depth value processing module and the coordinate conversion module are cascaded in sequence, and the output of the coordinate conversion module is spliced ​​with the original point cloud to form a data-level fusion module.

4. The method according to claim 1, characterized in that: Step (2b) establishes the voxel sampling layer, noise removal layer and output convolution layer in the voxel feature extraction module, and its structural parameters are as follows; The voxel sampling layer is used to randomly remove the input voxel features to ensure the robustness of the network; The noise removal layer includes a 3D convolution layer, a voxel index mapping module, a 2D convolution layer and a fusion splicing operation. The 3D convolution layer is composed of three 3D convolution blocks cascaded in sequence, each of which is composed of a 3D sub-manifold convolution, a normalization layer and a ReLU function layer cascaded in sequence, and the convolution kernel size of the 3D sub-manifold convolution is 3×3×3, and the step size is 1; the 2D convolution layer is composed of three 2D convolution blocks cascaded in sequence, each of which is composed of a 2D sub-manifold convolution, a normalization layer and a ReLU function layer cascaded in sequence, and the convolution kernel size of the 2D sub-manifold convolution is 3×3, and the step size is 1; The randomly removed voxel features are input to the 3D convolution layer, and the output is a 3D sparse tensor T. 3D , the tensor T 3D Converted to a 2D sparse tensor T through the voxel index mapping module 2D , and T 2D The output of the 2D convolution layer is sent to the output of the 3D convolution layer T 3D Splice along the last dimension to obtain the fused voxel features; The output convolution layer is a two-dimensional convolution with a convolution kernel size of 3×3 and a step size of 1; Four voxel sampling layers, four noise removal layers and one output convolutional layer are cross-connected to form a voxel feature extraction module, and its structural relationship is: first voxel sampling layer→first noise removal layer→second voxel sampling layer→second noise removal layer→third voxel sampling layer→third noise removal layer→fourth voxel sampling layer→fourth noise removal layer→output convolutional layer.

5. The method according to claim 4, characterized in that The tensor T 3D Converted to a 2D sparse tensor T through the voxel index mapping module 2D , implemented as follows: The first step is to multiply the 3D voxel index by the voxel size in the X, Y, and Z dimensions and add the minimum coordinate of the corresponding dimension to obtain the new coordinate system of the 3D voxel index to the lidar: new_index[x]=voxel_index[x]×voxel_size[x]+min_x new_index[y]=voxel_index[y]×voxel_size[y]+min_y new_index[z]=voxel_index[z]×voxel_size[z]+min_z Where voxel_index[x], voxel_index[y] and voxel_index[z] represent the three-dimensional voxel index in the X, Y and Z dimensions respectively, voxel_size[x] represents the length of the voxel, voxel_size[y] represents the width of the voxel, voxel_size[z] represents the height of the voxel, min_x represents T 3D The minimum coordinate of the first dimension, min_y represents T 3D The minimum coordinate of the second dimension, min_z represents T 3D The minimum coordinate of the third dimension, new_index[x], new_index[y], new_index[z] are the X coordinate, Y coordinate, and Z coordinate of the point cloud in the lidar coordinate system respectively; The second step is to convert the point cloud coordinates obtained in the first step from the lidar coordinate system to the camera coordinate system through the external parameter matrix in the camera calibration parameters to obtain the three-dimensional coordinates of the point cloud in the camera coordinate system; The third step is to transform the point cloud coordinates obtained in the second step into the two-dimensional coordinates of the image plane through the intrinsic parameter matrix in the camera calibration parameters; The fourth step is to convert the T corresponding to the two-dimensional coordinates of the image plane 3D The features are concatenated in order to obtain a 2D sparse tensor T 2D , complete T 3D to a 2D sparse tensor T 2D 's mapping.

6. The method according to claim 1, characterized in that Step (2c) establishes the convolution operation unit, the maximum pooling operation unit, and three residual blocks in the image feature extraction module, and its structural parameters are as follows: The convolution operation unit is a two-dimensional convolution with a convolution kernel size of 7×7 and a step size of 2; The maximum pooling operation unit is used to retain the maximum value of the last dimension of the input tensor; The three residual blocks are composed of two convolutional layers and two ReLU function layers. The structural relationship of each residual block is: first convolutional layer → ReLU function layer → second convolutional layer. The output of the second convolutional layer is multiplied by the input of the submodule and then passed through a ReLU function layer to obtain the output result. A convolution operation unit, a maximum pooling unit and three residual blocks are cascaded in sequence to form an image feature extraction module.

7. The method according to claim 1, characterized in that Step (2d) establishes two fully connected operation units and attention mechanism in the global cross-attention feature fusion module, and its structural parameters are as follows; (2d1) The two fully connected operation units are composed of a linear layer, a normalization layer, a ReLU function layer and a maximum pooling layer cascaded in sequence, and their structural relationship is as follows: The voxel features output by the voxel feature extraction module are passed through the linear layer, normalization layer and ReLU function layer of the first fully connected operation unit to obtain the features of each point in the voxel, and the features of each point in the voxel are passed through the maximum pooling layer of the first fully connected operation unit to obtain the global features. Finally, the features of each point in the voxel are concatenated with the global features after pooling to obtain a 128-dimensional voxel feature vector. Through the mapping matrix, the multi-level image features of the image feature extraction network are mapped to the point cloud in the voxel. The mapped multi-level features are concatenated to form a 640-dimensional feature vector, which is then reduced in dimension by the second fully connected operation unit to obtain a 128-dimensional image feature vector. Finally, the 128-dimensional voxel feature vector obtained by the first fully connected operation unit and the 128-dimensional image feature vector obtained by the second fully connected operation unit are concatenated to obtain point-by-point fusion features; (2d2) The attention mechanism is used to fuse the point-by-point fusion features with the voxel features output by the voxel feature extraction module as follows: First, create a voxel query weight matrix W initialized using a standard normal distribution Q , fusion index weight matrix W K , fusion content weight matrix W V ; Next, the voxel feature F output by the voxel feature extraction module is used l and W Q Calculate the voxel query vector Q, using the point-by-point fusion feature F i and W K Calculate the fusion key vector K and use the point-by-point fusion feature F i and W V Calculate the fused value vector V: Next, the attention feature F is calculated using the voxel query vector Q, the fusion key vector K, the fusion value vector V and the Softmax function attention : F attention =Softmax(Q×K)×V; Then, the attention feature F attention The voxel feature F output by the voxel feature extraction module l The global fusion features are obtained by splicing.

8. The method according to claim 1, characterized in that Step (2e) establishes the region proposal unit, voxel ROI pooling unit, ROI grid point position encoding unit, and Transformer encoding unit in the local self-attention feature enhancement module, and its structural parameters are as follows; The region proposal unit is composed of ten convolution blocks and two deconvolution blocks cascaded in sequence, each convolution block is composed of a convolution layer, a normalization layer and a ReLU function layer cascaded in sequence, each deconvolution block is composed of a deconvolution layer, a normalization layer and a ReLU function layer cascaded in sequence, the convolution kernel size of the convolution layer of the sixth convolution block is 3×3, the step size is 2, the convolution kernel size of the convolution layer of the remaining nine convolution blocks is 3×3, and the step size is 1; the convolution kernel size of the convolution layer of the first deconvolution block is 1×1, the step size is 1, the convolution kernel size of the convolution layer of the second deconvolution block is 2×2, and the step size is 2, and the global fusion feature output by the global cross-attention feature fusion module is sent to the region proposal unit to obtain the region of interest. The voxel ROI pooling unit is composed of a voxel sampling layer, two convolutional layers, two normalization layers, a ReLU function layer and a maximum pooling layer, and its structural relationship is: voxel sampling layer → first convolutional layer → first normalization layer → second convolutional layer → second normalization layer → ReLU function layer → maximum pooling layer, and the convolution kernel size of each convolutional layer is 3×3, and the step size is 1; the voxel sampling layer is used to divide the region of interest obtained by the region proposal unit into a 6×6×6 grid, and for each grid point, the K voxel features around the sample are set by setting the Manhattan distance, and transmitted to the first convolutional layer; The ROI grid point position encoding unit is composed of a relative coordinate calculation layer, two convolution layers, a normalization layer and a ReLU function layer, and its structural relationship is: relative coordinate calculation layer → first convolution layer → first normalization layer → ReLU function layer → second convolution layer, the convolution kernel size of each convolution layer is 3×3, and the step size is 1; the relative coordinate calculation layer divides the region of interest obtained by the region proposal unit into a 6×6×6 grid, and for each grid point, the local relative coordinate is calculated with the center of the region of interest as the origin, and the relative coordinate is transmitted to the first convolution layer; The Transformer encoding unit uses attention calculation to obtain self-attention output features. The voxel ROI pooling unit is connected in parallel with the ROI grid point position encoding unit, connected to the region proposal unit, and then cascaded with the Transformer encoding unit to form a local self-attention feature enhancement module.

9. The method according to claim 7, characterized in that: The Transformer encoding unit uses attention calculation to obtain self-attention output features, which is implemented as follows: In the first step, the pooling features output by the voxel ROI pooling unit and the local position features output by the ROI grid point position encoding unit are concatenated to obtain the ROI feature F ROI , create a ROI index weight matrix W initialized using a standard normal distribution K' , ROI query weight matrix W Q' and ROI content weight matrix W V' ; The second step is to use the ROI index weight matrix W K' , ROI query weight matrix W Q' , ROI content weight matrix W V' and ROI feature F ROI , calculate the ROI key vector K', ROI query vector Q' and ROI value vector V': The third step is to calculate the self-attention output feature F using the ROI key vector K', ROI query vector Q' and ROI value vector V' self-attention : Where d is the dimension of the query vector Q'.

10. The method according to claim 1, characterized in that Step (2f) establishes a linear operation unit and two fully connected operation units in the detection head, and its structural parameters are as follows; The linear operation unit is composed of two linear layers, two normalization layers and two ReLU function layers, and its structural relationship is: first linear layer→first normalization layer→ReLU function layer→second linear layer→second normalization layer→ReLU function layer; The two fully connected operation units are each composed of a linear layer, a normalization layer, and a ReLU function layer cascaded in sequence, and the output of the convolution operation unit is passed through the first fully connected operation unit to obtain a 3D detection frame, and the output of the convolution operation unit is passed through the second fully connected operation unit to obtain a target category; The first fully connected operation unit and the second fully connected operation unit are connected in parallel and connected after the linear operation unit to form a detection head.

11. The method according to claim 1, characterized in that: In step (3), the Adam optimizer and gradient descent method are used to iteratively train the 3D object detection network with the goal of minimizing the loss function, as follows: (3a) Set the number of training rounds T and the training hyperparameter α; (3b) dividing the preprocessed point cloud and visible light image into multiple point cloud image groups according to the batch size, and inputting the first point cloud image group and the corresponding annotation information into the 3D object detection network to obtain the initial weights and bias values ​​of each convolution operation of the network; (3c) Calculate the loss value L corresponding to each point cloud image group in the training set: L=L RPN +L conf +αL reg Among them, L RPN represents the regional proposal loss, L conf Represents the confidence prediction loss, L reg represents the bounding box regression loss, α is the training hyperparameter; (3d) Using the Adam optimizer to update the parameters of the three-dimensional object detection network, a three-dimensional object detection network model is obtained after the first parameter update; (3e) Input the second point cloud image group into the 3D object detection model after the first parameter update, repeat (3c) and (3d) to obtain the 3D object detection network model after the second parameter update, and so on, until all image groups are input and one training round is completed; (3f) Repeat (3c) to (3e) until the set number of training rounds T is reached to obtain a trained 3D object detection model.

Citation Information

Patent Citations

  • Three-dimensional target detection method based on multi-modal fusion and deep attention mechanism

    CN116612468A

  • Multi-modal three-dimensional target detection method and system based on virtual points and sparse convolution

    CN117788937A

Cited By

  • Construction method and device of binocular stereo matching recursive network based on deep learning

    CN119250117A

  • Automobile automatic obstacle avoidance system based on real-time 3D target detection

    CN119323777A

  • Target detection method and device based on large model and electronic equipment

    CN119339066A

  • Target detection method, device and electronic device based on large model

    CN119339066B

  • Automatic driving scene three-dimensional target detection method and device based on spatio-temporal information fusion

    CN119445534A