Target detection method and system based on multi-scale fusion
Through multi-scale fusion methods, combining the characteristics of images and point cloud data, virtual point clouds are generated and fused across space, which solves the problem of insufficient information interaction and noise in the existing technology, and improves the accuracy and detection accuracy of three-dimensional object detection. .
Patent Information
- Application Number
- CN202410753353.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-12
AI Technical Summary
Existing multi-modal fusion methods have problems such as insufficient information interaction, noise and data redundancy in 3D object detection, and the detection performance of a single model limits the overall detection accuracy.
Using a target detection method based on multi-scale fusion, by obtaining the characteristics of image and point cloud data, using multi-layer networks for cross-space and feature-level fusion, generating virtual point clouds, reducing noise, enhancing feature interaction, and through the region proposal network and Multilayer perceptron performs candidate frame detection.
It improves the accuracy of three-dimensional object detection, integrates the advantages of data-level and feature-level fusion, reduces noise problems, achieves deep interactive feature enhancement, and improves target detection accuracy.
Smart Images

Figure CN118628718A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic digital data processing, and more particularly to a target detection method and system based on multi-scale fusion. Background Art
[0002] In the prior art, multimodal fusion methods based on cameras and lidar sensors include data-level fusion, feature-level fusion, and decision-level fusion. The data-level fusion refers to directly superimposing point cloud data and image data element by element, with minimal information entropy loss. However, this fusion method relies heavily on the accuracy of the sensor's external parameters, and the method also has problems with noise and data redundancy. The feature-level fusion method extracts features of point cloud data and image data respectively, and then maps, associates, and fuses the features. Therefore, it can make full use of low-level and high-level features of different modalities, and the calculation speed is also faster. However, this fusion method is not flexible enough, resulting in insufficient information interaction between modalities. The decision-level fusion combines the detection results of different modal models, and supplements the bounding box through deep learning and other methods, thereby improving the overall object detection accuracy and robustness. However, its effectiveness is limited by the detection performance of a single model, and it does not have an advantage in multimodal object detection.
[0003] In summary, in order to overcome the defects of the existing fusion methods, the present invention proposes a target detection method based on multi-scale fusion to improve the accuracy of three-dimensional object detection. Summary of the invention
[0004] The present invention is proposed based on the above-mentioned requirements of the prior art. The technical problem to be solved by the present invention is to provide a target detection method and system based on multi-scale fusion to improve the accuracy of target detection.
[0005] In order to solve the above problems, the present invention is implemented by adopting the following technical solutions:
[0006] A target detection method based on multi-scale fusion, the method comprising: obtaining image features corresponding to image data and voxel features corresponding to point cloud data; using a first network to process image features and voxel features to obtain cross-space fusion features, the first network comprising a first module, a second module and a third module; the first module comprises determining neighborhood features around voxel features; performing convolution processing on the data and image features projected into the image data by the neighborhood features, respectively, and splicing the processing results of the two to obtain fusion features; the second module comprises convolving the fusion features, splicing the convolution results and the image features in feature channels, and convolving the spliced results; performing average pooling and maximum pooling on the spliced results after convolution, respectively, and splicing the two pooling results to obtain a feature descriptor; performing convolution processing on the feature descriptor to obtain to the first spatial attention; multiplying the first spatial attention and the convolutional splicing result to obtain the noise perception feature; the third module includes splicing and fusing the voxel feature and the noise perception feature and downsampling to obtain a plurality of cross-space fusion features of different resolutions; performing a bird's-eye view conversion on the multiple cross-space fusion features of different resolutions, and extracting features from the converted bird's-eye view to obtain corresponding bird's-eye features of different resolutions; using a region proposal network to process each bird's-eye view feature to obtain a plurality of candidate boxes respectively; calculating local features at different resolutions, including dividing each candidate box at the same resolution to obtain a plurality of sub-regions, and calculating the local features of each sub-region; using a second network to fuse the spatial information and semantic information of local features with different resolutions to obtain candidate box feature information to detect the target.
[0007] Optionally, the method of acquiring image features corresponding to image data and voxel features corresponding to point cloud data includes: acquiring image data, performing feature extraction on the image data, and obtaining image features; acquiring original point cloud data, and processing the image data and original point cloud data using a PENet deep completion network to generate a virtual point cloud; performing hierarchical downsampling on the virtual point cloud according to the distance between the virtual point cloud and the center of the laser radar; combining the sampled virtual point cloud and the original point cloud data to obtain new point cloud data; dividing the point cloud space formed by the new point cloud data into multiple voxel units, and extracting a preset number of new point cloud data in each voxel unit; calculating the relative coordinates of the extracted new point cloud data and the center of mass of the corresponding voxel unit, and obtaining an extended feature vector based on the relative coordinates; performing feature extraction on the extended feature vector using a constructed feature extraction network to obtain voxel features; the feature extraction network includes multiple modules consisting of a fully connected layer and a maximum pooling layer.
[0008] Optionally, dividing each candidate box at the same resolution to obtain multiple sub-regions, and calculating the local features of each sub-region, includes: dividing each candidate box to obtain multiple sub-regions, and determining the center pixel position of the sub-region; using a multi-layer perceptron to aggregate multi-scale neighborhood features of the center pixel position of the sub-region, and performing maximum pooling on the aggregation results along the channel to obtain the local features of each sub-region of each resolution.
[0009] Optionally, the method of using a second network to fuse spatial information and semantic information of local features with different resolutions to obtain candidate frame feature information includes: performing a first operation on local features of a first resolution and a second resolution to obtain first fused data; the first operation includes: performing channel compression on two input data to obtain third data; normalizing and splitting the third data to obtain corresponding first weights and second weights; based on the first weights and the second weights, performing weighted summation on the two input data to obtain fused data; performing a first operation on the first fused data and local features of the third resolution to obtain second fused data; splicing local features of all resolutions and fusing them with the second fused data to obtain candidate frame feature information.
[0010] Optionally, the PENet deep completion network is used to process the image data and the original point cloud data to generate a virtual point cloud, which is expressed as: Among them, D f(u,v) Represents the pixel depth of the fused virtual point cloud, C cd (u, v) represents the pixel coordinates of the confidence map of the main color branch, e represents a constant, and D cd(u,v) The pixel coordinates of the depth map representing the color main branch, C dd (u, v) represents the pixel coordinates of the confidence map of the depth main branch, D dd(u,v) Represents the pixel coordinates of the depth map of the depth master branch.
[0011] Optionally, the extended feature vector is obtained based on the relative coordinates, and its expression is: Among them, V′ represents the expanded feature vector, represents the i-th point cloud data after expansion, x i Indicates the x-axis coordinate of the i-th point cloud data, y i Represents the y-axis coordinate of the i-th point cloud data, z i Represents the z-axis coordinate of the i-th point cloud data, r i Represents the intensity value of the i-th point cloud data, represents the x-axis coordinate of the center of mass, represents the y-axis coordinate of the center of mass, Indicates the z-axis coordinate of the center of mass.
[0012] Optionally, the local features of all resolutions are spliced and fused with the second fused data to obtain the candidate frame feature information, which is expressed as: η = MLP [MLP (K 3D ([η 2 ,η 4 ,η 8 ])),MLP(K 3D (η 2,4,8 ))], where η represents the feature information of the candidate box, MLP() represents the multi-layer perceptron network, and K 3D represents the standard 3D convolution, η 2 represents the local features of the first resolution, η 4 represents the local features of the second resolution, η 8 represents the local features of the third resolution, η 2,4,8 represents the second fused data.
[0013] A target detection system based on multi-scale fusion, the system comprising: an acquisition unit, acquiring image features corresponding to image data and voxel features corresponding to point cloud data; a three-dimensional feature extraction unit, using a first network to process image features and voxel features to obtain cross-space fusion features, the first network comprising a first module, a second module and a third module; the first module comprises determining neighborhood features around voxel features; performing convolution processing on the data and image features projected into the image data by the neighborhood features, respectively, and splicing the processing results of the two to obtain fusion features; the second module comprises convolving the fusion features, splicing the convolution results and the image features by feature channels, and convolving the spliced results; performing average pooling and maximum pooling on the spliced results after convolution, respectively, and splicing the two pooling results to obtain a feature descriptor; performing convolution processing on the feature descriptor to obtain a first spatial attention; The noise perception feature is obtained by multiplying the splicing result after attention and convolution; the third module includes splicing and fusing the voxel feature and the noise perception feature and performing downsampling to obtain multiple cross-space fusion features of different resolutions; a two-dimensional feature extraction unit performs a bird's-eye view conversion on the cross-space fusion features of multiple different resolutions, and extracts features from the converted bird's-eye view to obtain corresponding bird's-eye features of different resolutions; a candidate frame extraction unit uses a region proposal network to process each bird's-eye view feature to obtain multiple candidate frames respectively; a local feature extraction unit calculates local features at different resolutions, including dividing each candidate frame at the same resolution to obtain multiple sub-regions, and calculating the local features of each sub-region; a candidate frame feature extraction unit uses a second network to fuse the spatial information and semantic information of the local features corresponding to the cross-space fusion features of different resolutions to obtain candidate frame feature information to detect the target.
[0014] Optionally, the candidate frame feature extraction unit includes: performing a first operation on local features of a first resolution and local features of a second resolution to obtain first fused data; the first operation includes: performing channel compression on the two input data to obtain third data; normalizing the third data and splitting and calculating the corresponding first weight and second weight; based on the first weight and the second weight, performing weighted summation on the two input data to obtain fused data; performing a first operation on the first fused data and local features of the third resolution to obtain second fused data; splicing local features of all resolutions, and fusing them with the second fused data to obtain candidate frame feature information.
[0015] Optionally, the local feature extraction unit includes: dividing each candidate box into multiple sub-regions, and determining the central pixel position of the sub-region; using a multi-layer perceptron to aggregate multi-scale neighborhood features of the central pixel position of the sub-region, and performing maximum pooling on the aggregation results along the channel to obtain local features of each sub-region of each resolution.
[0016] Compared with the prior art, the object detection method and system based on multi-scale fusion provided by the present invention integrates the advantages of data-level fusion and feature-level fusion. Specifically, data-level fusion is achieved by generating a virtual point cloud, and feature-level fusion is achieved by a first network and a second network. The first network is used to reduce the noise problem, and deep interactive feature enhancement is achieved through cross-modal fusion, noise sensing and cross-space fusion. The second network is used to improve the bounding box by adaptively fusing cross-layer spatial semantic information, thereby improving the accuracy of object detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0018] Figure 1 is a flow chart of a target detection method based on multi-scale fusion provided in this embodiment;
[0019] Figure 2 is a data processing schematic diagram of a target detection method based on multi-scale fusion provided in this embodiment;
[0020] Figure 3 is a data processing diagram of the method for calculating feature information of candidate boxes provided in this embodiment;
[0021] Figure 4is a data processing schematic diagram of a three-dimensional feature extraction module in a target detection system based on multi-scale fusion provided in this embodiment;
[0022] Figure 5 This is a schematic diagram of refined data processing of a three-dimensional feature extraction module in a target detection system based on multi-scale fusion provided in this embodiment. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] To facilitate understanding of the embodiments of the present invention, further explanation will be given below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the protection scope of the present invention.
[0025] Example 1
[0026] This embodiment provides a target detection method based on multi-scale fusion, and its process is as follows: Figure 1 and Figure 2 As shown, including:
[0027] S1 obtains image features corresponding to the image data and voxel features corresponding to the point cloud data.
[0028] This step includes:
[0029] S100 acquires image data, extracts features from the image data, and obtains image features.
[0030] In this embodiment, a standard 2D convolution is performed on the image data to obtain a feature map X′.
[0031] S110 obtains the original point cloud data, processes the image data and the original point cloud data using the PENet deep completion network, and generates a virtual point cloud.
[0032] This embodiment uses the PENet depth completion network to achieve depth completion of the original point cloud guided by high-resolution color image data, and generates a dense virtual point cloud from the sparse original laser point cloud data. The PENet depth completion network includes a color main branch and a depth main branch. The color main branch constructs an encoder-decoder network to extract color-dominant features for depth prediction, so that the depth around the object boundary can be learned through the structural information in the color image. The depth main branch constructs an encoder-decoder network similar to the color main branch, aiming to predict dense depth maps by upsampling sparse depth maps. The PENet network also follows the strategy of FusionNet and fuses the depths from the two branches based on confidence information. The depth maps output by the color main branch and the depth main branch are D cd and D dd , the confidence maps are C cd and C dd , then the depth of the fused virtual point cloud is:
[0033]
[0034] Among them, D f(u,v) Represents the pixel depth of the fused virtual point cloud, C cd (u, v) represents the pixel coordinates of the confidence map of the main color branch, e represents a constant, and D cd(u,v) The pixel coordinates of the depth map representing the color main branch, C dd (u, v) represents the pixel coordinates of the confidence map of the depth main branch, D dd(u,v) Represents the pixel coordinates of the depth map of the depth master branch.
[0035] S120 performs hierarchical downsampling on the virtual point cloud according to the distance between the virtual point cloud and the center of the laser radar; combines the sampled virtual point cloud and the original point cloud data to obtain new point cloud data.
[0036] In this step, the purpose of using virtual point clouds for 3D target detection is to increase the density of point clouds. The original point cloud data that is dense enough at close range can meet the requirements of the detection model, while the original point cloud data at long distances is relatively sparse, which limits the improvement of detection accuracy. In order to enhance the contour representation of distant targets, this embodiment retains fewer virtual point clouds that are closer to the center of the laser radar and more virtual point clouds that are farther from the center of the laser radar. This can not only improve detection accuracy, but also reduce redundant calculations.
[0037] Specifically, the horizontal distance of all virtual point clouds from the center of the laser radar is calculated, and all virtual point clouds are grouped at equal distances according to the distance size. This embodiment is divided into 10 groups, namely [0, 10), [10, 20)...[90, 100), in meters. In different groups, virtual point clouds are retained according to the set ratio. For example, all virtual point clouds in the range of [0, 30) are discarded, and all virtual point clouds in the range of [70, 100) are retained. After graded downsampling, the processed virtual point cloud is obtained. The processed virtual point cloud and the original point cloud data are merged to obtain new point cloud data. Through the above processing, the problem of sparse point clouds at long distances is fundamentally solved, the contour recognition of targets at long distances can be enhanced, the model is helped to extract more target feature information, and the detection accuracy is improved.
[0038] The new point cloud data and image data are used as input data of the first network. The new point cloud data includes 3D space coordinate values and intensity values, and the intensity values are derived from the interpolation calculation of the original point cloud in the neighborhood. The image information includes pixel coordinate values and color channel values.
[0039] S130 divides the point cloud space formed by the new point cloud data into a plurality of voxel units, and extracts a preset number of new point cloud data in each voxel unit; calculates the relative coordinates of the extracted new point cloud data and the center of mass of the corresponding voxel unit, and obtains an expanded feature vector based on the relative coordinates.
[0040] The point cloud space is divided into stacked voxel units of the same size. In order to reduce the computational complexity, a point cloud set with a maximum number of T is randomly sampled in each voxel unit. The voxel unit contains non-empty point cloud data of t≤T point clouds, which is expressed as Where V represents the voxel unit, p i represents the i-th point cloud data, x i Indicates the x-axis coordinate of the i-th point cloud data, y i Represents the y-axis coordinate of the i-th point cloud data, z i Represents the z-axis coordinate of the i-th point cloud data, r i Represents the intensity value of the i-th point cloud data, and the coordinates of the point cloud centroid within the voxel are expressed as Calculate the relative coordinates of each point cloud and the centroid, and expand the feature vector of the voxel unit to:
[0041]
[0042] Among them, V′ represents the expanded feature vector, represents the i-th point cloud data after expansion, represents the x-axis coordinate of the center of mass, represents the y-axis coordinate of the center of mass, Indicates the z-axis coordinate of the center of mass.
[0043] S140 uses the constructed feature extraction network to extract features from the expanded feature vector to obtain voxel features; the feature extraction network includes multiple modules consisting of fully connected layers and maximum pooling layers.
[0044] Each module of the feature extraction network includes: constructing a fully connected layer (Full Connect Network, FCN) to extract point-by-point features f of a single point cloud within a non-empty voxel i , FCN consists of linear layers, normalization layers, and nonlinear layers. After obtaining point-by-point features, all f i Perform maximum pooling to obtain aggregated features Stack the point-by-point features and aggregate features of the point cloud to get the output features As the input data of the fully connected layer of the next module. Multiple modules are connected to increase the dimension of the feature vector block by block to extract more advanced depth information, and the maximum pooled aggregated features of the last layer are used as the input features of the first network. Let the number of non-empty voxels be N, and the set of non-empty voxel feature vectors is recorded as X.
[0045] S2 uses the first network to process image features and voxel features to obtain cross-space fusion features.
[0046] This step fuses voxel features and image features in 2D space, performs noise perception based on the attention mechanism, and fuses 3D space features with 2D space features. Figure 3 As shown, the first network takes voxel features and image features as input and performs multi-level feature encoding and feature fusion with 1×, 2×, 4× and 8× downsampling steps.
[0047] Geometric feature encoding is performed in 3D voxel space and 2D image space to obtain and in is a set of real numbers, N represents the size of the image, C in , C mid , C out denote the number of input, intermediate, and output feature channels, respectively, and Feature encoding is performed in 2D image space, and and Splice to get fusion features Furthermore, the attention mechanism is used to obtain noise-aware features; finally, the 3D sparse features Cross-space fusion is performed with 2D sparse noise perception features to obtain cross-space fusion features like Figure 4As shown, the first module is a cross-modal feature fusion module, the second module is an attention noise perception module, and the third module is a cross-spatial feature fusion module, which specifically includes:
[0048] S200 uses the first module to perform cross-modal feature fusion to obtain fused features.
[0049] Step 1: Determine the neighborhood features around the voxel features.
[0050] Sparse convolution of voxel features to obtain neighborhood features Specifically, for each voxel feature X in X i , based on the corresponding 3D index H i Determine the feature data within the k×k×k spatial neighborhood, and use the sparse 3D volume K 3D () Encode the feature data in the neighborhood to obtain the neighborhood features The specific calculation is as follows:
[0051]
[0052] in represents the feature data in the 3D spatial neighborhood of the i-th voxel feature, and Φ represents the nonlinear activation function.
[0053] Step 2: Perform convolution processing on the data and image features projected into the image data of the neighborhood features respectively, and concatenate the processing results of the two to obtain the fused features.
[0054] The neighborhood features are projected into the 2D image space and K is convolved with sparse 2D convolution 2D Obtained by encoding the projected neighborhood features Specifically, this embodiment transforms the neighborhood features from the 3D laser radar coordinate system space to the 2D image space. The specific formula is as follows:
[0055]
[0056] in, represents the index vector of the voxel in the 2D image space, P is the projection function, and H represents the index vector of the neighborhood feature.
[0057] For each neighborhood feature Based on the corresponding 2D index The non-empty voxels in the k×k neighborhood are further encoded with features to obtain the first data Its expression is:
[0058]
[0059] in represents the 2D spatial neighborhood data of the i-th neighborhood feature, and Φ represents the nonlinear activation function.
[0060] A standard 2D convolution is performed on the image feature X′ in the 2D image space to obtain the second data X″.
[0061] In this embodiment, the first data and the second data are spliced and fused in 2D space to obtain a 2D space fusion feature Y.
[0062] S210 utilizes the second module to perform noise perception based on the attention mechanism to obtain noise perception features.
[0063] Step 1: Convolve the fused features, splice the convolution results and image features in feature channels, and convolve the spliced results.
[0064] The method of generating a virtual point cloud based on depth estimation will cause noise in the depth value, which will significantly reduce the detection performance. This embodiment designs a 2D convolution module based on a spatial attention mechanism to encode noise features to perceive noise, thereby removing noise.
[0065] Use sparse 2D convolution K 2D Encode the fusion features, then concatenate the encoded fusion features with the image features in feature channels, and then perform standard 2D convolution on the concatenated results to obtain the concatenated result Y′. The specific formula is as follows:
[0066] Y′=Φ(K 2D [Φ(K 2D (Y)),X′])
[0067] Step 2: Perform average pooling and maximum pooling on the convolutional splicing results respectively, and concatenate the two pooling results to obtain the feature descriptor.
[0068] Average pooling and maximum pooling are performed on the concatenated results along the channel dimension to obtain and The two are concatenated to generate a feature descriptor.
[0069] Step 3: Convolve the feature descriptor to obtain a first spatial attention; multiply the first spatial attention and the concatenated result after the convolution to obtain a noise perception feature.
[0070] Use the 2D convolutional layer to generate the first spatial attention map for the concatenated feature descriptors The first spatial attention map encodes which area is highlighted or suppressed, that is, it encodes the degree to which the noise in different voxel areas is suppressed. Its expression is:
[0071]
[0072] Among them, σ represents the sigmoid function, K 2D Represents a standard 2D convolution.
[0073] Multiply the first spatial attention map with the concatenated result after convolution to get the noise perception feature The specific formula is as follows:
[0074] Y"=M s (Y)×Y′
[0075] S220 uses the third module to perform cross-space feature fusion to obtain cross-space fusion features.
[0076] According to the mapping relationship, the voxel features and noise perception features are spliced and fused to obtain multiple cross-space output features with different resolutions. Its expression is Then down-sampling is performed to obtain four sets of cross-space fusion features {Z 1X , Z 2X , Z 4X , Z 8X}, the corresponding spatial index is {H 1X , H 2X , H 4X , H 8X}.
[0077] S3 performs bird's-eye view transformation on multiple cross-space fusion features of different resolutions, and extracts features from the transformed bird's-eye view to obtain corresponding bird's-eye view features of different resolutions.
[0078] S4 uses the region proposal network to process each bird's-eye view feature to obtain multiple candidate boxes.
[0079] Training a region proposal network, including:
[0080] The region proposal network is a dense detection head that slides a small window on the bird's-eye view feature map to generate a series of bounding boxes of fixed size and aspect ratio; each bounding box is assigned a score to indicate the possibility that the region contains the target object; in addition, a bounding box regression is performed on each bounding box to correct its position and size.
[0081] Specifically, the intersection over union (IoU) is obtained based on the overlapping relationship between the true box and the bounding box, and the bounding box with the largest intersection over union is matched. The true box is the actual area where the detection target is located. The bounding box with an IoU greater than the foreground threshold is set as a positive sample, and the bounding box with an IoU less than the background threshold is set as a negative sample. The calculation formula of IoU is as follows:
[0082]
[0083] Where area(a) represents the spatial area of the true box, area(b) represents the spatial area of the bounding box, ∩ represents the spatial intersection of different targets, and ∪ represents the spatial union of different targets.
[0084] The positive and negative samples are filtered through the sigmoid activation function for prediction of the classification branch; and the regression deviation between the positive sample and the true frame is calculated through the regression function, which is used for the prediction of translation and scaling parameters of the regression branch.
[0085] Each bird's-eye view feature is input into the region proposal network, and the bounding boxes are sorted and screened using the non-maximum suppression algorithm to remove the regions with high overlap and bounding boxes with low confidence, thereby obtaining candidate boxes; the candidate boxes are input into the candidate box detection head for more refined bounding box detection. The candidate box detection head includes the following steps S5-S7.
[0086] S5 calculates local features at different resolutions, including dividing each candidate box at the same resolution into multiple sub-regions, and calculating local features of each sub-region.
[0087] This step includes:
[0088] Step 1: Divide each candidate box into multiple sub-regions and determine the central pixel position of the sub-region.
[0089] The candidate box is divided into G×G×G sub-regions. For the αth sub-region, this embodiment extracts the central spatial coordinates of each sub-region as the query center g α .
[0090] Step 2: Use the multi-layer perceptron to aggregate the multi-scale neighborhood features of the central pixel position of the sub-region, and perform maximum pooling on the aggregation results along the channel to obtain the local features of each sub-region at each resolution
[0091] Its expression is:
[0092]
[0093] Among them, this embodiment is from {Z 2X , Z 4X , Z 8X}Extract features from cross-space fusion features, β represents feature query and aggregation of cross-space fusion features of the βth resolution, γ represents the index of the queried non-empty voxel in the current feature layer, Represents relative space coordinates, Indicates that the spatial index is The cross-space fusion features of , MLP() represents the multi-layer perceptron network, and MaxPool() represents the maximum pooling.
[0094] S6 utilizes the second network to fuse the spatial information and semantic information of local features with different resolutions to obtain candidate box feature information to detect the target.
[0095] The local features at different resolutions map different information. The local features with high resolution and low channel values contain more geometric and spatial information, while the local features with low resolution and high channel values contain more category information and semantic information. In order to fully integrate the spatial information and semantic information, this embodiment designs a step-by-step adaptive aggregation module, such as Figure 5 shown.
[0096] Specifically, it includes:
[0097] S600 performs a first operation on the local features of the first resolution and the local features of the second resolution to obtain first fused data.
[0098] The first operation includes: compressing the channels of the two input data to obtain the third data; normalizing the third data and splitting and calculating the corresponding first weight and second weight; and performing weighted summation of the two input data based on the first weight and the second weight to obtain the fused data.
[0099] This embodiment compresses the channels of local features of two adjacent resolutions into one:
[0100] δ β =K 3D (η β ),δ β+1 =K 3D (η β+1 )
[0101] Among them, δ β Represents η β cascade channel, δ β+1 Represents η β+1 The cascade channels of , use the Softmax function to normalize the two cascade channels, and split them into two bird's-eye view attention maps, and get the first weight from the learned bird's-eye view attention map and the second weight These weighted features are fused by element-wise addition. The specific expression is: η β,β+1 =ω β ×η β +ω β+1 ×η β+1 , η β,β+1 Represent fused data.
[0102] Specifically, the local features with a resolution of 2X and the local features with a resolution of 4X are fused to obtain the first fused data η 2,4 .
[0103] S610 performs a first operation on the first fused data and the local features of the third resolution to obtain second fused data.
[0104] The first fusion data η 2,4 Continue to fuse the second fused data with the local features with a resolution of 8X to obtain η 2,4,8 .
[0105] S620 splices the local features of all resolutions and fuses them with the second fused data to obtain candidate frame feature information.
[0106] This embodiment splices all local features of all resolutions to obtain the fourth data, and uses the standard 3D convolution K 3D The fourth data is processed by a multi-layer perceptron to obtain fifth data; the fifth data and the processing result of the second fusion data by the multi-layer perceptron are spliced in the channel direction to obtain the final candidate box feature information, which is expressed as follows:
[0107] η=MLP[MLP(K 3D ([η 2 ,η 4 ,η 8 ])),MLP(K 3D (η 2,4,8 ))]
[0108] Among them, η represents the feature information of the candidate box, MLP() represents the multi-layer perceptron network, and K 3D represents the standard 3D convolution, η 2 represents the local features of the first resolution, η 4 represents the local features of the second resolution, η 8 represents the local features of the third resolution, η 2,4,8 represents the second fused data.
[0109] The adaptive fusion module helps to extract more robust features with rich spatial and semantic information, which can detect bounding boxes more accurately.
[0110] Based on S1-S6, a target detection model is constructed; the target detection model is trained, and the trained target detection model is used to recognize the input point cloud data and image data to obtain the target detection frame.
[0111] The loss function of the target detection model of this embodiment includes the loss of the dense detection head, namely the RPN loss, and the loss of the candidate box detection head, namely the RoI loss. The RPN loss is composed of the positive and negative sample classification loss, the detection box regression loss, and the detection box direction loss, and the RoI loss is composed of the detection box confidence loss, the detection box regression loss, and the detection box direction loss.
[0112] RPN loss
[0113] Define the positive and negative sample classification loss. Since there are usually only a few real detection boxes in each frame of data, this leads to an extreme imbalance between positive and negative samples. To solve this problem, this embodiment uses the Focal Loss loss function. Focal Loss deals with the problem of uneven distribution of positive and negative samples in target detection. It introduces an adjustable factor to balance the weights of different samples, so that the model pays more attention to key samples, thereby improving the overall detection performance of the model.
[0114] RoI Loss
[0115] Define the confidence loss, recalculate the true confidence value based on IoU, and the RoI Head loss value is a weighted combination of confidence loss, regression loss, and direction loss.
[0116] Total loss
[0117] The total loss consists of RPN loss and RoI loss, expressed as: L ToTAL =L RPN +L RoI , where L ToTAL represents the total loss, L RPN represents the RPN loss, L RoI Indicates ROI loss.
[0118] Compared with the prior art, the object detection method based on multi-scale fusion provided in this embodiment integrates the advantages of data-level fusion and feature-level fusion. Specifically, data-level fusion is achieved by generating a virtual point cloud, and feature-level fusion is achieved by a first network and a second network. The first network is used to reduce the noise problem, and deep interactive feature enhancement is achieved through cross-modal fusion, noise sensing, and cross-space fusion. The second network is used to improve the bounding box by adaptively fusing cross-layer spatial semantic information, thereby improving the accuracy of object detection.
[0119] Example 2
[0120] This embodiment provides a target detection system based on multi-scale fusion, which implements the target detection method based on multi-scale fusion described in Embodiment 1, including:
[0121] An acquisition unit, which acquires image features corresponding to the image data and voxel features corresponding to the point cloud data;
[0122] The three-dimensional feature extraction unit uses a first network to process image features and voxel features to obtain cross-space fusion features, wherein the first network includes a first module, a second module and a third module; the first module includes determining neighborhood features around voxel features; convolving the data and image features projected from the neighborhood features to the image data, respectively, and splicing the processing results of the two to obtain fusion features; the second module includes convolving the fusion features, splicing the convolution results and the image features in feature channels, and convolving the spliced results; performing average pooling and maximum pooling on the spliced results after convolution, respectively, and splicing the two pooling results to obtain a feature descriptor; convolving the feature descriptor to obtain a first spatial attention; multiplying the first spatial attention and the spliced result after convolution to obtain a noise perception feature; the third module includes splicing and fusing the voxel features and the noise perception features and downsampling to obtain a plurality of cross-space fusion features of different resolutions;
[0123] The two-dimensional feature extraction unit performs bird's-eye view conversion on multiple cross-space fusion features of different resolutions, and extracts features from the converted bird's-eye view to obtain corresponding bird's-eye view features of different resolutions;
[0124] The candidate box extraction unit uses the region proposal network to process each bird's-eye view feature to obtain multiple candidate boxes;
[0125] A local feature extraction unit calculates local features at different resolutions, including dividing each candidate box at the same resolution into multiple sub-regions, and calculating the local features of each sub-region;
[0126] The candidate box feature extraction unit uses the second network to fuse the spatial information and semantic information of the local features corresponding to the cross-space fusion features with different resolutions to obtain the candidate box feature information to detect the target.
[0127] Optionally, the candidate frame feature extraction unit includes:
[0128] A first operation is performed on the local features of the first resolution and the local features of the second resolution to obtain first fused data; the first operation includes: channel compressing the two input data to obtain third data; normalizing the third data and splitting and calculating to obtain corresponding first weights and second weights; based on the first weights and the second weights, weighted summing the two input data to obtain fused data;
[0129] Performing a first operation on the first fused data and the local features of the third resolution to obtain second fused data;
[0130] The local features of all resolutions are spliced and fused with the second fusion data to obtain the candidate frame feature information.
[0131] Optionally, the local feature extraction unit includes:
[0132] Divide each candidate box into multiple sub-regions and determine the central pixel position of the sub-region;
[0133] The multi-scale neighborhood features of the central pixel position of the sub-region are aggregated using a multi-layer perceptron, and the aggregation results are max-pooled along the channel to obtain the local features of each sub-region at each resolution.
[0134] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A target detection method based on multi-scale fusion, characterized in that: include: Obtain image features corresponding to the image data and voxel features corresponding to the point cloud data; The first network is used to process image features and voxel features to obtain cross-space fusion features, and the first network includes a first module, a second module and a third module; the first module includes determining neighborhood features around voxel features; convolution processing is performed on the data and image features projected into the image data by the neighborhood features respectively, and the processing results of the two are spliced to obtain fusion features; the second module includes convolution of the fusion features, splicing the convolution results and the image features in feature channels, and convolution processing of the spliced results; average pooling and maximum pooling are performed on the spliced results after convolution, and the two pooling results are spliced to obtain a feature descriptor; convolution processing is performed on the feature descriptor to obtain a first spatial attention; the first spatial attention and the spliced result after convolution are multiplied to obtain a noise perception feature; the third module includes splicing and fusing the voxel features and the noise perception features and downsampling to obtain a plurality of cross-space fusion features of different resolutions; Perform bird's-eye view transformation on multiple cross-space fusion features of different resolutions, and extract features from the transformed bird's-eye view to obtain corresponding bird's-eye view features of different resolutions; Use the region proposal network to process each bird's-eye view feature to obtain multiple candidate boxes; Calculate local features at different resolutions, including dividing each candidate box at the same resolution into multiple sub-regions, and calculate the local features of each sub-region; The second network is used to fuse the spatial information and semantic information of local features with different resolutions to obtain candidate box feature information to detect the target.
2. The target detection method based on multi-scale fusion according to claim 1, characterized in that: The acquiring of image features corresponding to the image data and voxel features corresponding to the point cloud data includes: Acquire image data, perform feature extraction on the image data, and obtain image features; Get the original point cloud data, use the PENet deep completion network to process the image data and the original point cloud data, and generate a virtual point cloud; According to the distance between the virtual point cloud and the center of the laser radar, the virtual point cloud is downsampled in stages; the sampled virtual point cloud and the original point cloud data are combined to obtain new point cloud data; The point cloud space formed by the new point cloud data is divided into a plurality of voxel units, and a preset number of new point cloud data are extracted in each voxel unit; the relative coordinates of the extracted new point cloud data and the center of mass of the corresponding voxel unit are calculated, and based on the relative coordinates, an expanded feature vector is obtained; The feature extraction network constructed is used to extract features from the expanded feature vector to obtain voxel features; the feature extraction network includes a plurality of modules consisting of a fully connected layer and a maximum pooling layer.
3. The target detection method based on multi-scale fusion according to claim 1, characterized in that: The step of dividing each candidate frame at the same resolution into multiple sub-regions and calculating the local features of each sub-region includes: Divide each candidate box into multiple sub-regions and determine the central pixel position of the sub-region; The multi-scale neighborhood features of the central pixel position of the sub-region are aggregated using a multi-layer perceptron, and the aggregation results are max-pooled along the channel to obtain the local features of each sub-region at each resolution.
4. The target detection method based on multi-scale fusion according to claim 1, characterized in that: The method of using the second network to fuse the spatial information and semantic information of local features with different resolutions to obtain candidate frame feature information includes: A first operation is performed on the local features of the first resolution and the local features of the second resolution to obtain first fused data; the first operation includes: channel compressing the two input data to obtain third data; normalizing the third data and splitting and calculating to obtain corresponding first weights and second weights; based on the first weights and the second weights, weighted summing the two input data to obtain fused data; Performing a first operation on the first fused data and the local features of the third resolution to obtain second fused data; The local features of all resolutions are spliced and fused with the second fusion data to obtain the candidate frame feature information.
5. The target detection method based on multi-scale fusion according to claim 2, characterized in that: The PENet deep completion network is used to process the image data and the original point cloud data to generate a virtual point cloud, which is expressed as: Among them, D f (u, v) represents the pixel depth of the fused virtual point cloud, C cd (u, v) represents the pixel coordinates of the confidence map of the main color branch, e represents a constant, and D cd(u,v) The pixel coordinates of the depth map representing the color main branch, C dd (u, v) represents the pixel coordinates of the confidence map of the depth main branch, D dd(u,v) Represents the pixel coordinates of the depth map of the depth master branch.
6. The target detection method based on multi-scale fusion according to claim 2, characterized in that: Based on the relative coordinates, the extended feature vector is obtained, and its expression is: Among them, V′ represents the expanded feature vector, represents the i-th point cloud data after expansion, x i Indicates the x-axis coordinate of the i-th point cloud data, y i Represents the y-axis coordinate of the i-th point cloud data, Z i Represents the z-axis coordinate of the i-th point cloud data, r i Represents the intensity value of the i-th point cloud data, represents the x-axis coordinate of the center of mass, represents the y-axis coordinate of the center of mass, Indicates the z-axis coordinate of the center of mass.
7. The target detection method based on multi-scale fusion according to claim 4, characterized in that: The local features of all resolutions are spliced and fused with the second fusion data to obtain the candidate frame feature information, which is expressed as: η=MLP[MLP(K 3D ([η 2 ,η 4 ,η 8 ])),MLP(K 3D (η 2,4,8 ))] Among them, η represents the feature information of the candidate box, MLP() represents the multi-layer perceptron network, and K 3D represents the standard 3D convolution, η 2 represents the local features of the first resolution, η 4 represents the local features of the second resolution, η 8 represents the local features of the third resolution, η 2,4,8 represents the second fused data.
8. A target detection system based on multi-scale fusion, characterized in that: include: An acquisition unit, which acquires image features corresponding to the image data and voxel features corresponding to the point cloud data; The three-dimensional feature extraction unit uses a first network to process image features and voxel features to obtain cross-space fusion features, wherein the first network includes a first module, a second module and a third module; the first module includes determining neighborhood features around voxel features; convolving the data and image features projected from the neighborhood features to the image data, respectively, and splicing the processing results of the two to obtain fusion features; the second module includes convolving the fusion features, splicing the convolution results and the image features in feature channels, and convolving the spliced results; performing average pooling and maximum pooling on the spliced results after convolution, respectively, and splicing the two pooling results to obtain a feature descriptor; convolving the feature descriptor to obtain a first spatial attention; multiplying the first spatial attention and the spliced result after convolution to obtain a noise perception feature; the third module includes splicing and fusing the voxel features and the noise perception features and downsampling to obtain a plurality of cross-space fusion features of different resolutions; The two-dimensional feature extraction unit performs bird's-eye view conversion on multiple cross-space fusion features of different resolutions, and extracts features from the converted bird's-eye view to obtain corresponding bird's-eye view features of different resolutions; The candidate box extraction unit uses the region proposal network to process each bird's-eye view feature to obtain multiple candidate boxes; A local feature extraction unit calculates local features at different resolutions, including dividing each candidate box at the same resolution into multiple sub-regions, and calculating the local features of each sub-region; The candidate box feature extraction unit uses the second network to fuse the spatial information and semantic information of the local features corresponding to the cross-space fusion features with different resolutions to obtain the candidate box feature information to detect the target.
9. The target detection system based on multi-scale fusion according to claim 8, characterized in that: The candidate frame feature extraction unit comprises: A first operation is performed on the local features of the first resolution and the local features of the second resolution to obtain first fused data; the first operation includes: channel compressing the two input data to obtain third data; normalizing the third data and splitting and calculating to obtain corresponding first weights and second weights; based on the first weights and the second weights, weighted summing the two input data to obtain fused data; Performing a first operation on the first fused data and the local features of the third resolution to obtain second fused data; The local features of all resolutions are spliced and fused with the second fusion data to obtain the candidate frame feature information.
10. The target detection system based on multi-scale fusion according to claim 8, characterized in that: The local feature extraction unit comprises: Divide each candidate box into multiple sub-regions and determine the central pixel position of the sub-region; The multi-scale neighborhood features of the central pixel position of the sub-region are aggregated using a multi-layer perceptron, and the aggregation results are max-pooled along the channel to obtain the local features of each sub-region at each resolution.
Citation Information
Patent Citations
Camera and millimeter wave radar front fusion road surface target detection method
CN116259024A
Multimodal 3D target detection method based on semantic propagation and cross-attention mechanism
CN117173655A
Deep learning-based high-precision point cloud completion method and apparatus
WO2024060395A1
Cited By
Depth estimation method and device based on multi-view fisheye camera, equipment and medium
CN120182347A
Multi-view fisheye camera-based depth estimation method, device, equipment and medium
CN120182347B
Radar vision post-fusion vehicle-mounted three-dimensional road target detection method and automobile
CN121564519A
Vehicle-mounted three-dimensional road target detection method based on radar vision post-fusion and automobile
CN121564519B
