An automatic alignment method based on camera and millimeter wave radar data
Patent Information
- Application Number
- CN202210456868.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-04-28
AI Technical Summary
In the existing technology, automatic alignment of millimeter-wave radar and camera data is difficult to achieve. Common methods rely on manual design of components and rely heavily on high-quality spatio-temporal calibration, which is difficult to obtain.
An attention-based automatic alignment method is used to process visual image information and millimeter-wave radar point cloud data through the DLA-34 network structure, calculate the joint attention weight of the point cloud feature vector and image feature map, perform data alignment, and send it into The RetinaNet target detection sub-network performs processing to achieve automatic alignment of data.
It reduces the complexity of model design, improves the perception accuracy of target recognition, avoids the limitations of manual design components, and achieves automatic alignment of millimeter wave radar and camera data.
Smart Images

Figure CN114898144B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of unmanned driving perception algorithms, and specifically relates to a fusion technology of multi-heterogeneous data, in particular to an automatic alignment method of camera and millimeter wave radar data. Background Art
[0002] The technical structure of driverless cars is mainly divided into four aspects: environmental perception, navigation and positioning, path planning, and motion control. Environmental perception is the data basis for the other three key technologies. Sensors used in environmental perception technology include cameras, lidars, and millimeter-wave radars. These sensors have their own advantages and disadvantages and complement each other. Therefore, how to efficiently fuse multi-sensor data has naturally become one of the hot spots in perception algorithm research. Lidar is expensive and has poor all-weather performance. Millimeter-wave radar has stable detection performance and good environmental adaptability, and is a must-have sensor for future driverless driving. Due to the complementary advantages of millimeter-wave radars and cameras, research on using visual radar fusion strategies to accurately measure the types and coordinates of surrounding objects is becoming more and more extensive.
[0003] It is known that the existing millimeter-wave radar data only has radial and horizontal distance information, and the height information is not accurately measured, that is, there is only (X, H, Z) information in the camera coordinate system, and no Y-axis information (height H is uncertain). Therefore, a 3D point cloud is mapped to (fX / Z, fH / Z) during projection, and the possible mapping position is a vertical line on the image. For the fusion of vision and millimeter-wave radar, the main difficulty in technical implementation lies in data alignment. A common practice is to perform height padding on the radar point cloud. For example, assuming that the height of the target object corresponding to a point cloud is 3m, a point cloud is finally projected as a line segment on the image and aligned with the image; or the point cloud is extended in the height direction to form cylinders, which are aligned with the target candidate box after 3D reconstruction of the visual recognition object; another practice is to expand the point cloud into a circle to enhance the image effect.
[0004] Existing techniques all perform data alignment by hand-designing components, which may limit the learning ability of the neural network and rely heavily on high-quality calibration between the two sensors, which is often difficult to obtain due to inherent spatiotemporal biases.
[0005] To this end, the present invention proposes an automatic alignment method for camera and millimeter-wave radar data. The method performs implicit alignment through attention. Radar data contains radial and horizontal distances, RCS and other data, which can help data alignment. Summary of the invention
[0006] Purpose of the invention: In view of the problem that the prior art uses manually designed data alignment components and cannot realize automatic alignment of millimeter radar waves and camera data through modules, the present invention provides an automatic alignment method for camera and millimeter wave radar data.
[0007] Technical solution: An automatic alignment method based on camera and millimeter wave radar data, the method comprising the following steps:
[0008] (1) For the same visual scene, the millimeter wave radar scans to obtain millimeter wave point cloud data, and the camera obtains visual image information;
[0009] (2) Preprocessing the image information obtained in step (1) based on the DLA-34 network structure to obtain an image feature map;
[0010] (3) Mapping the millimeter-wave radar point cloud obtained in step (1) to the image feature map in step (2) to obtain the position of each millimeter-wave radar point cloud in the image feature map;
[0011] (4) Set the maximum number of targets and the attribute values of the radar points corresponding to the positions in the image feature map.
[0012] Calculate point cloud feature vector;
[0013] (5) Send the point cloud feature vector and image feature map to the attention fusion module for processing to obtain the radar and image fusion feature map after data alignment;
[0014] (6) Send the image fusion feature map to the RetinaNet target detection subnetwork for processing to obtain the positioning and classification results of the target in the image;
[0015] (7) Perform non-maximum suppression processing on all target recognition frames obtained in step (6) to obtain the final target positioning frame and the recognition result of each frame.
[0016] Furthermore, step (1) takes into account the sparsity of the millimeter-wave radar point cloud, applies several millimeter-wave radar point cloud data and image data of a single camera, and fuses the multi-frame point cloud data that is closest to the current image frame in time sequence.
[0017] Furthermore, the millimeter wave radar point cloud mapping process in step (3) is as follows:
[0018] (3.1) Screening and filtering out invalid radar points according to the status attribute values of the millimeter-wave radar points;
[0019] (3.2) The horizontal and vertical distances obtained by valid radar point detection are converted to the image coordinate system of the corresponding visual sensor through projection transformation and converted into the image pixel coordinate system, so as to achieve the unification of millimeter wave radar and visual sensor in time and space in the same coordinate system. If there is overlap between the radar points projected on the image pixel coordinate system, the rule of "keep the near and discard the far" is adopted, and the near radar points cover the far radar points;
[0020] Among them, the coordinate transformation is completed through the calibration matrix, and the calibration matrix formula is as follows:
[0021]
[0022] Among them, [X w ,Y w ,Z w ,1] is the coordinate of the millimeter wave radar point in the world coordinate system, [X c ,Y c ,Z c ,1] are the coordinates in the pixel coordinate system, and [u,v] are the coordinates in the image pixel coordinate system;
[0023] The downsampling factor between the image and the last feature map of DLA-34 is d, and the coordinates of the millimeter-wave radar point cloud P(u,v) in the feature map are P'(u',v'), where (u',v') = (u / d,v / d).
[0024] Furthermore, the steps of setting the maximum target number in step (4) are as follows:
[0025] The size of the image is h, w, the downsampling factor between the image and the last feature map of DLA-34 is d, the size of the feature map is h'=h / d, w'=w / d, and the number of channels is c1; the feature map can detect up to w' target objects, so the maximum number of targets can be set to N=w'.
[0026] Furthermore, the calculation step of the point cloud feature vector in step (4) includes creating a point cloud feature vector of size N×c2, and then selecting c2 attribute values from the attributes of the radar point at each position as the initial eigenvalues at the point cloud feature vector u, where: N is the maximum number of targets, and c2 is the number of attribute values of the millimeter wave radar point cloud data.
[0027] Furthermore, the image fusion feature map in step (5) includes the following process:
[0028] (5.1) Obtain the image feature map E∈R in step (2) L×C1 , the point cloud feature vector Q in step (4) q ∈R N ×C2, where L is the number of spatial features of the image feature map, i.e. (h'×w');
[0029] (5.2) Predict the center point position of the target object corresponding to each point cloud feature vector (c h' ,c w' ) and size(s h' ,s w' ), the calculation process is as follows:
[0030] c h' ,c w' =sigmoid(FC(Q q ))
[0031] s h' ,s w' =FC(Q q )
[0032] And use the predicted value to generate the two-dimensional Gaussian distribution G(i,j) of the target object, where β represents the bandwidth of the adjusted Gaussian distribution, and the expression is as follows:
[0033]
[0034] (5.3) Given a point cloud feature vector Q q ∈R N×c2 And the image feature map E∈R L×c1 , calculate the weight C of the joint attention C of the point cloud feature vector and image features weight ∈R N×L , the calculation process is as follows:
[0035] K=E
[0036] Q=FC(Q q )
[0037]
[0038] The point cloud feature vector is initialized by the millimeter wave radar point, which can provide a spatial prior for predicting the target object and obtain the Gaussian distribution weight G∈R in step (5.2) N×L , the corrected C weight ∈R N×L for:
[0039]
[0040] C weight The relationship between the image space pixel feature i and the point cloud feature vector j is modeled and expressed. weight Perform row addition and sigmoid operations to establish the cumulative impact of all point clouds on the pixel features of a certain point in the image space. The calculation expression is as follows:
[0041]
[0042] (5.4) Substitute the weight matrix C obtained in step (5.3) weight ∈R 1×L And the image feature map E∈R L×c1 The image fusion feature map FE∈R after data alignment is obtained by the following calculation formula L×c1 , the calculation expression is as follows:
[0043] V=E
[0044]
[0045] in, represents element-wise multiplication of each channel, Represents element-wise addition.
[0046] Beneficial effect: Compared with the prior art, the method of the present invention is based on the attention fusion module of camera and millimeter-wave radar data to achieve automatic data alignment, without the need for manual design of data alignment components, thus reducing the complexity of model design and improving the perception accuracy of target recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a process flow chart of the method of the present invention;
[0048] Figure 2 is a network structure diagram of the DLA-34 described in the present invention;
[0049] Figure 3 It is a structural diagram of the attention fusion module described in the present invention. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings and specific implementation methods in the embodiments of the present invention.
[0051] In view of the problems pointed out in the background technology, the millimeter-wave radar and camera data cannot be automatically aligned well, and the calculation and operation process are complicated. The present invention provides an automatic alignment method based on camera and millimeter-wave radar data. By studying the existing camera and millimeter-wave radar data alignment methods, an attention fusion module based on camera and millimeter-wave radar data is designed. The module can automatically align the data without manually designing the data alignment components, which reduces the complexity of the model design and improves the perception accuracy of target recognition.
[0052] According to the above technical solution, the steps of the present invention are as follows:
[0053] (1) For the same visual scene, the millimeter wave radar scans to obtain millimeter wave point cloud data, and the camera obtains visual image information;
[0054] In applications, such as unmanned driving scenarios, general cars will be equipped with sensors for perception. The present invention uses two sensors, camera and radar, for a certain visual scene. The camera obtains pictures and the millimeter-wave radar collects point cloud data. In the process of acquiring millimeter-wave radar point cloud and camera data, considering the sparsity of millimeter-wave radar point cloud, multiple millimeter-wave radar point cloud data and single camera image data are used, and the multi-frame point cloud data closest to the current image frame sequence is fused. Prioritize, the forward camera image data corresponds to the 3-frame radar data of the left front, right front and forward millimeter-wave radar.
[0055] (2) Preprocessing the image information obtained in step (1) based on the DLA-34 network structure to obtain an image feature map;
[0056] In the preprocessing process, the image data is normalized. The image pixel range is 0-255, and it is normalized to between 0 and 1. For the DLA-34 network structure processing, scaling can speed up the network training. Preferably, the image information is scaled to 448*800 pixels.
[0057] (3) Mapping the millimeter-wave radar point cloud obtained in step (1) to the image feature map in step (2) to obtain the position of each millimeter-wave radar point cloud in the image feature map;
[0058] According to the state attribute value of the millimeter wave radar, further distinguish the valid data and filter out invalid radar points, and then include the coordinate conversion processing.
[0059] (4) Setting the maximum number of targets and calculating the point cloud feature vector based on the attribute values of the radar points corresponding to the positions in the image feature map;
[0060] Because in the image data of the unmanned driving camera, the object in front will block the object behind, so there are at most target objects of the feature map width in the feature map.
[0061] (5) Send the point cloud feature vector and image feature map to the attention fusion module for processing to obtain the radar and image fusion feature map after data alignment;
[0062] First, establish the relationship between each millimeter-wave radar point feature vector and the image space pixel feature: transform the point cloud feature vector matrix Q q It is sent to the fully connected layer, and after feature expansion, it is dot-multiplied with each channel of the image feature matrix E to obtain the matrix C.
[0063] Use the millimeter-wave radar point feature vector to determine the key detection area of the visual image: send the point cloud feature vector to the fully connected layer and sigmoid layer to predict the center position and size of the target object corresponding to each point cloud feature vector. Use the predicted value to generate the Gaussian distribution matrix S to provide a spatial prior for the target object.
[0064] The matrix C and the matrix S are added element by element to enhance the connection between the radar point feature vector and the pixel features in the image space, and the matrix M is obtained. The matrix M is added row by row and sent to the sigmoid layer to establish the cumulative influence of all point clouds on the pixel features of a certain point in the image space, and the new matrix M' is obtained.
[0065] The fused radar image feature map is obtained by first performing channel-level dot multiplication on the matrix M' and the image matrix E and then performing element-level addition.
[0066] (6) Send the image fusion feature map to the RetinaNet target detection subnetwork for processing to obtain the positioning and classification results of the target in the image;
[0067] (7) Perform non-maximum suppression processing on all target recognition frames obtained in step (6) to obtain the final target positioning frame and the recognition result of each frame.
[0068] Example
[0069] In combination with the above steps, taking the autonomous driving application scenario as an example, this embodiment includes the following basic processes:
[0070] First, download the nuScenes dataset and read the key frame visual image of the forward camera and the three frames of millimeter-wave radar point cloud data closest to the key frame of the current image in the dataset, including the forward millimeter-wave radar data, the left front millimeter-wave radar data, and the right front millimeter-wave radar data.
[0071] The downloaded image and point cloud datasets are divided into training set, validation set and test set based on the number of positive and negative samples.
[0072] The visual image is scaled from 800*1600 to 448*800, and the image pixel range is normalized from 0-255 to 0-1 and then sent to the DLA-34 network structure to generate an image feature map.
[0073] Convert the millimeter-wave radar 3D point cloud data to a 2D vertical plane consistent with the visual image. Screen and filter out invalid radar points based on the three state attributes of the millimeter-wave radar point: invalid-state, dynprop-state, and ambig-state. Next, align the point cloud data with the image data. First, convert the coordinates in the millimeter-wave radar coordinate system to the vehicle coordinate system, convert the coordinates in the vehicle coordinate system to the world coordinate system, convert the coordinates in the world coordinate system to the vehicle coordinate system, convert the coordinates in the vehicle coordinate system to the image coordinate system, and finally, convert the coordinates in the image coordinate system to the image pixel coordinate system.
[0074] After obtaining the coordinates of the millimeter wave point cloud in the image pixel coordinate system, the coordinates of the millimeter wave point cloud in the image feature map are further obtained. The detection area of the millimeter wave radar is large, and the radar points that exceed the size of the visual image are first removed. If there is overlap between the radar points, the radar points that are closer are used to cover the radar points that are farther away; finally, according to the downsampling factor of 4 between the scaled visual image and the last feature map of DLA-34, the millimeter wave radar point coordinates (u, v) are reduced by 4*4 times to (u / 16, v / 16).
[0075] The above steps have obtained the position of the millimeter wave point in the image feature map and the maximum number of targets is 200. Create a point cloud feature vector of size 200*5, and use the attributes x, y, z, vx, vy of the millimeter wave radar point as the initial feature value.
[0076] The point cloud feature vector matrix Q q It is sent to the fully connected layer, and after feature expansion, it is dot-multiplied with each channel of the image feature matrix E to obtain the matrix C.
[0077] The point cloud feature vector is sent to the fully connected layer and sigmoid layer to predict the center position and size of the target object corresponding to each point cloud feature vector. Using the predicted value, a Gaussian distribution matrix S is generated to provide a spatial prior for the target object.
[0078] Add the matrix C and the matrix S element-wise to get the matrix M. Add the rows of the matrix M and feed it into the sigmoid layer to get the new matrix M'.
[0079] The fused radar image feature map is obtained by first performing channel-level dot multiplication on the matrix M' and the image matrix E and then performing element-level addition.
[0080] Finally, the image fusion feature map obtained in the above steps is sent to the target detection subnetwork RetinaNet for further feature extraction to obtain the predicted box position and category confidence of the target object.
[0081] During the training process, the predicted boxes of the target objects obtained above are calculated for the intersection-and-union ratio with the true labeled boxes, and only the predicted boxes with an intersection-and-union ratio greater than 0.5 and a confidence level greater than 0.3 are retained. More accurate target positioning and classification are achieved by continuously optimizing the classification loss and regression loss of these predicted boxes and true labeled boxes.
[0082] During the prediction process, the trained model weights are loaded, and the obtained prediction box is subjected to non-maximum suppression to obtain the final prediction result.
Claims
1. An automatic alignment method based on camera and millimeter wave radar data, characterized in that: The method comprises the following steps: (1) For the same visual scene, the millimeter wave radar scans to obtain millimeter wave point cloud data, and the camera obtains visual image information; (2) Preprocessing the image information obtained in step (1) based on the DLA-34 network structure to obtain an image feature map; (3) Mapping the millimeter-wave radar point cloud obtained in step (1) to the image feature map in step (2) to obtain the position of each millimeter-wave radar point cloud in the image feature map; (4) Setting the maximum number of targets and calculating the point cloud feature vector based on the attribute values of the radar points corresponding to the positions in the image feature map; The steps for setting the maximum target number are as follows: The size of the image is h, w, the downsampling factor between the image and the last feature map of DLA-34 is d, the size of the feature map is h'=h / d, w'=w / d, and the number of channels is c1; the feature map can detect at most w' target objects, so the maximum number of targets can be set to N=w'; The calculation steps of the point cloud feature vector include creating a point cloud feature vector of size N×c2, and then selecting c2 attribute values from the attributes of the radar point at each position as the initial eigenvalues at the point cloud feature vector u, where: N is the maximum number of targets, c2 is the number of attribute values of the millimeter wave radar point cloud data; (5) Send the point cloud feature vector and image feature map to the attention fusion module for processing to obtain the radar and image fusion feature map after data alignment; (6) Send the image fusion feature map to the RetinaNet target detection subnetwork for processing to obtain the positioning and classification results of the target in the image; The image fusion feature map includes the following processes: (6.1) Obtain the image feature map E∈R in step (2) L×C1 , the point cloud feature vector Q in step (4) q ∈R N×C2 , where L is the number of spatial features of the image feature map, i.e. (h'×w'); (6.2) Predict the center point position of the target object corresponding to each point cloud feature vector (c h' ,c w' ) and size(s h' ,s w' ), the calculation process is as follows: c h' ,c w' =sigmoid(FC(Q q )) with h' ,with w' =FC(Q q ) And use the predicted value to generate the two-dimensional Gaussian distribution G(i,j) of the target object, where β represents the bandwidth of the adjusted Gaussian distribution, and the expression is as follows: (6.3) Given a point cloud feature vector Q q ∈R N×c2 And the image feature map E∈R L×c1 , calculate the weight C of the joint attention C of the point cloud feature vector and image features weight ∈R N×L , the calculation process is as follows: K=E Q=FC(Q q ) The point cloud feature vector is initialized by the millimeter wave radar point, which can provide a spatial prior for predicting the target object and obtain the Gaussian distribution weight G∈R in step (6.2) N×L , the corrected C weight ∈R N×L for: C weight The relationship between the image space pixel feature i and the point cloud feature vector j is modeled and expressed. weight Perform row addition and sigmoid operations to establish the cumulative impact of all point clouds on the pixel features of a certain point in the image space. The calculation expression is as follows: (6.4) Substitute the weight matrix C obtained in step (6.3) weight ∈R 1×L And the image feature map E∈R L×c1 The image fusion feature map FE∈R after data alignment is obtained by the following calculation formula L×c1 , the calculation expression is as follows: V=E in, represents element-wise multiplication of each channel, represents element-wise addition; (7) Perform non-maximum suppression processing on all target recognition frames obtained in step (6) to obtain the final target positioning frame and the recognition result of each frame.
2. The automatic alignment method based on camera and millimeter wave radar data according to claim 1, characterized in that: Step (1) takes into account the sparsity of the millimeter-wave radar point cloud, applies several millimeter-wave radar point cloud data and image data of a single camera, and fuses the multi-frame point cloud data that is closest to the current image frame in time sequence.
3. The automatic alignment method based on camera and millimeter wave radar data according to claim 1, characterized in that: Step (3) for millimeter wave radar point cloud mapping process is as follows: (3.1) Screening and filtering out invalid radar points according to the status attribute values of the millimeter-wave radar points; (3.2) The horizontal and vertical distances obtained by valid radar point detection are converted to the image coordinate system of the corresponding visual sensor through projection transformation and converted into the image pixel coordinate system, so as to achieve the unification of millimeter wave radar and visual sensor in time and space in the same coordinate system. If there is overlap between the radar points projected on the image pixel coordinate system, the rule of "keep the near and discard the far" is adopted, and the near radar points cover the far radar points; Among them, the coordinate transformation is completed through the calibration matrix, and the calibration matrix formula is as follows: Among them, [X w ,Y w ,Z w ,1] is the coordinate of the millimeter wave radar point in the world coordinate system, [X c ,Y c ,Z c ,1] are the coordinates in the pixel coordinate system, and [u,v] are the coordinates in the image pixel coordinate system; The downsampling factor between the image and the last feature map of DLA-34 is d, and the coordinates of the millimeter-wave radar point cloud P(u,v) in the feature map are P'(u',v'), where (u',v') = (u / d,v / d).
Citation Information
Patent Citations
Target detection method based on 3D laser radar and image data
CN109100741A
Three-dimensional target detection method based on 4D millimeter wave and laser point cloud multi-view feature fusion
CN113158763A
Image-laser radar data fusion method based on mixed attention mechanism
CN114398937A
