Millimeter-wave radar BEV target detection method based on sparse attention mechanism
Through the millimeter wave radar BEV target detection method with sparse attention mechanism, the PointPillars architecture and self-variable attention mechanism are used to dynamically adjust the anchor box, solving the problems of data sparseness and noise interference of mmWave radar point cloud, and improving detection accuracy and robustness.
Patent Information
- Application Number
- CN202510709608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-29
AI Technical Summary
Millimeter-wave radar point cloud data sparsity and noise interference lead to a decrease in target detection accuracy, especially in complex environments, which is difficult to accurately identify target shapes and features, and traditional detection algorithms are poorly robust.
The millimeter-wave radar BEV target detection method based on sparse attention mechanism is adopted, and the point cloud is converted into a BEV feature map through the PointPillars architecture. Combining self-attention and variable attention mechanism, the anchor box is dynamically adjusted to adapt to the target geometric characteristics, and training is performed using Focal Loss and SmoothL1 Loss.
It significantly improves the accuracy and robustness of the object detection, reduces the computational complexity, and improves the network inference speed and detection effect.
Smart Images

Figure CN120236069B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of target detection, and in particular to a millimeter-wave radar BEV target detection method based on a sparse attention mechanism. Background Art
[0002] Millimeter-wave radar is a sensor that utilizes millimeter-wave frequency bands (typically 24 GHz, 77 GHz, or 79 GHz) for detection. It generates point cloud data by emitting electromagnetic waves and receiving reflected signals from targets. Millimeter-wave wavelengths range from 1 mm to 10 mm, with high frequencies and short wavelengths. This enables millimeter-wave radar to achieve highly accurate distance, velocity, and angle measurements. Furthermore, millimeter-waves have strong penetrating power, enabling them to maintain good detection performance in adverse weather conditions such as rain, snow, and fog. Therefore, they are invaluable for target detection in complex environments.
[0003] The point cloud data generated by millimeter-wave radar is obtained by processing the reflected signal. Each point usually contains information such as the target's distance, azimuth, pitch angle, speed, and reflection intensity. However, compared with the point cloud generated by lidar, the millimeter-wave radar point cloud has obvious sparsity and low resolution characteristics. This is because the beam of millimeter-wave radar is wide and the energy distribution of its transmitted signal is relatively dispersed, resulting in a low density of generated point cloud data, making it difficult to accurately describe the target's geometric shape and detailed features. In addition, millimeter-wave radar point cloud data is also susceptible to interference from noise, such as multipath effects, clutter in the environment, and interference from other electromagnetic signals. These noises will further reduce the quality of the point cloud data and increase the difficulty of target detection.
[0004] The sparsity and noise interference characteristics of millimeter-wave radar point cloud data present unique technical challenges for target detection technology. First, sparse point cloud data cannot provide sufficient information to accurately identify the boundaries and shape of the target. Detection accuracy tends to decline, especially when the target is far away or small. Second, noise interference can lead to a large number of false alarms or missed detections in the point cloud data, affecting the robustness and reliability of target detection. In addition, millimeter-wave radar point cloud data typically has a high dynamic range, and separating the target's velocity information from the static background is also a significant issue.
[0005] The point cloud data generated by millimeter-wave radar is inherently sparse and low-resolution, making it more difficult to extract and identify target features. This significantly reduces detection accuracy, especially in complex scenes or when the target is far away. Furthermore, radar signals are susceptible to noise interference, such as multipath effects, weather conditions (such as rain and snow), and other electromagnetic interference in the environment. This noise can degrade the quality of the point cloud data and, in turn, affect the robustness of the detection algorithm.
[0006] In terms of computational efficiency, the receptive field of using convolutional neural networks to process millimeter-wave radar point cloud features is limited, which affects the target detection effect; the computational complexity of using the self-attention mechanism to encode point cloud features is high.
[0007] In traditional target detection, fixed anchor box parameters are generally used, which is difficult to adapt to the geometric characteristics of different targets, resulting in inaccurate detection results. Summary of the Invention
[0008] The purpose of this invention is to address the shortcomings of the existing technology and propose a millimeter-wave radar BEV target detection method based on sparse attention mechanism.
[0009] The objective of the present invention is achieved through the following technical solution: a millimeter-wave radar BEV target detection method based on a sparse attention mechanism, the method comprising the following steps:
[0010] S1, obtain millimeter wave radar point cloud and perform preprocessing;
[0011] S2. Build a millimeter-wave radar BEV (Bird's-Eye View) target detection network, including: encoding point cloud features based on the PointPillars architecture to obtain feature maps, enhancing the feature maps using an anchor-guided self-attention mechanism, and iteratively processing the enhanced features using a cascaded optimization module to obtain prediction results.
[0012] The cascade optimization module has six cascade layers, each layer includes:
[0013] The self-attention mechanism of the target features and the variable attention mechanism based on PointPillars to extract point cloud features are used to perform variability sampling of features; the sampling results are decoded and the anchor frame is corrected;
[0014] S3. Train the target detection network and use Focal Loss and SmoothL1 Loss as the loss function for training.
[0015] S4. Use the trained network to perform target detection, post-process the network output, obtain the final result, and complete the BEV target detection task.
[0016] Furthermore, the obtaining of millimeter-wave radar point clouds and preprocessing thereof include:
[0017] First, the millimeter-wave radar transmits a frequency-modulated continuous wave and receives the echo signal, using fast Fourier transform to extract the target's range, speed, and azimuth information;
[0018] Through multi-frame data accumulation and point cloud clustering, point cloud data containing target coordinates and radar reflection intensity is generated; to adapt to network input, the point cloud is normalized to a unified coordinate system and outliers are removed;
[0019] Subsequently, in order to facilitate data processing of deep learning models, the point cloud is normalized to a uniform quantity scale.
[0020] Furthermore, the feature map obtained by performing point cloud feature encoding based on the PointPillars architecture is specifically:
[0021] First, the PointPillars architecture is used to divide the point cloud into a regular three-dimensional cylindrical grid. The spatial range of each cylinder is a fixed size on the plane. For each point in each cylinder, its offset relative to the center of the cylinder is calculated, and the original features are concatenated with the offset to obtain an enhanced feature vector. Then, the enhanced point cloud features are encoded by a multi-layer perceptron, and the encoded cylindrical features are mapped to a two-dimensional BEV grid according to their spatial position to form an initial BEV feature map. Finally, a two-dimensional convolutional network is used to aggregate the BEV feature map to obtain a feature map.
[0022] Furthermore, the feature enhancement of the feature map based on the anchor frame-guided self-attention mechanism is specifically as follows:
[0023] Complete the structured organization of target representation, including anchor boxes of target pose and size and feature vectors encoding target features; anchor boxes are initialized in a uniformly distributed manner in BEV space. Each anchor box is defined by its center coordinates, size and heading angle, which are all learnable tensors used to continuously optimize during training to adapt to the geometric characteristics of different targets; each target is represented by a 256-dimensional feature vector, which is initialized to all zeros and is used to gradually learn the semantic information of the target during training. The combination of anchor boxes and feature vectors enables the model to simultaneously capture the geometric properties and high-level semantic features of the target.
[0024] Furthermore, the self-attention mechanism of the target feature enhances the contextual information of the target feature by calculating the global correlation between feature vectors. For each feature vector, the query, key, and value vectors are calculated using a learnable weight matrix. Then, the attention score matrix is calculated using the query vector and the key vector, and the enhanced feature vector is obtained by weighted aggregation of the value vector. The formula for calculating the attention score matrix is:
[0025]
[0026] in, is the dimension of the feature vector, is the query vector corresponding to the i-th feature vector, is the key vector corresponding to the kth eigenvector, and N is the number of eigenvectors;
[0027] The enhanced feature vector is obtained by weighted aggregation value vector:
[0028]
[0029] is the value vector corresponding to the j-th eigenvector.
[0030] Furthermore, the variable attention mechanism for extracting point cloud features based on PointPillars includes:
[0031] For each target feature output by the self-attention mechanism , predict a set of sampling point coordinates , where K is the number of sampling points. Then, the sampling point features are obtained by bilinear interpolation on the BEV feature map:
[0032]
[0033] And aggregate the sampling point features through attention weights:
[0034]
[0035] in is a learnable attention weight. This mechanism enables target features to adaptively focus on key areas, improving the detection capability of non-rigid targets.
[0036] Furthermore, the feature decoding and anchor frame correction of the sampling results specifically include:
[0037] Target features output by the input variable attention mechanism . The target features are nonlinearly transformed through a multi-layer fully connected network:
[0038]
[0039] in is the learnable weight matrix, is the bias term;
[0040] Bounding box correction: For each target feature , predict the offset of the anchor box:
[0041]
[0042] And correct the anchor box by the following formula:
[0043]
[0044] in Parameters after decoding the anchor box.
[0045] Category prediction: Predict the target category probability through the fully connected layer and Softmax function:
[0046]
[0047] in and are the learnable weight matrices and bias terms.
[0048] Furthermore, the loss function of combining Focal Loss and SmoothL1 Loss as training specifically includes:
[0049] in, is the probability that the anchor box predicts that it belongs to a certain type of target, is the Focal Loss hyperparameter, To predict the difference between the target bounding box and the true value, use The weights weight the two types of losses.
[0050] On the other hand, the present invention also provides a millimeter-wave radar BEV target detection device based on a sparse attention mechanism, comprising a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, the millimeter-wave radar BEV target detection method based on a sparse attention mechanism is implemented.
[0051] On the other hand, the present invention also provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for detecting BEV targets using a millimeter-wave radar based on a sparse attention mechanism is implemented.
[0052] Beneficial effects of the present invention:
[0053] The present invention converts sparse point clouds into dense BEV feature maps through the PointPillars framework, significantly improving the efficiency and robustness of feature extraction while reducing the impact of noise on detection results.
[0054] This paper introduces a variable attention mechanism, dynamically samples BEV point cloud features, and adaptively focuses on key areas of the target, significantly improving target detection accuracy while reducing computational complexity and increasing network inference speed.
[0055] The present invention uses a learnable anchor frame initialization and optimization mechanism to enable the anchor frame to be dynamically adjusted to better match the actual shape and pose of the target, thereby improving detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 Flowchart of the millimeter-wave radar point cloud BEV target detection method provided by an embodiment of the present invention;
[0057] Figure 2 Schematic diagram of the millimeter-wave radar point cloud BEV target detection method provided by an embodiment of the present invention;
[0058] Figure 3 Schematic diagram of the millimeter-wave radar point cloud BEV target detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The specific embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0060] like Figure 1 and Figure 2 As shown, this embodiment provides a millimeter-wave radar BEV target detection method based on a sparse attention mechanism, including:
[0061] S1, obtain millimeter wave radar point cloud and perform preprocessing;
[0062] The acquisition and preprocessing of millimeter-wave radar point clouds are key steps in target detection tasks. First, the millimeter-wave radar transmits frequency modulated continuous wave (FMCW) and receives echo signals, and uses fast Fourier transform (FFT) to extract the target's distance, speed, and azimuth information. By accumulating multiple frames of data and clustering point clouds, a point cloud containing the target coordinates is generated. and radar reflection intensity Point cloud data. To adapt to network input, the point cloud is normalized to a unified coordinate system and outliers are removed. Subsequently, to facilitate data processing for deep learning models, the present invention normalizes the point cloud to a uniform size (for example, each frame of the point cloud is specified to contain 2000 points. If there are more than this value, 2000 points are randomly sampled from the entire point cloud. If there are fewer than this value, all points are padded with zeros). This serves as input for the PointPillars feature extraction module.
[0063] S2. Build a millimeter-wave radar BEV target detection network. The network architecture consists of a point cloud feature encoding module, a feature enhancement module, a deformable feature sampling module, and a cascade optimization module. It uses a six-layer iterative optimization to achieve a layer-by-layer improvement in detection accuracy.
[0064] During the point cloud feature encoding stage, a Point Pillars architecture is used for feature extraction. This converts the millimeter-wave radar point cloud into a regular grid of columns. A multi-layer perceptron (MLP) is used to extract the local geometric features of each column. A two-dimensional convolutional network is then used to construct a bird's-eye view feature map.
[0065] The feature enhancement module innovatively implements an anchor-guided self-attention mechanism. 900 anchor boxes are preset in the BEV (Bird's-Eye View) space (the specific number can be adjusted based on the target density of the application scenario). Each anchor box is parameterized by a 256-dimensional feature vector. This self-attention mechanism effectively enhances the contextual awareness of target features by calculating the global correlation between anchor box features. This is particularly effective for feature completion of partially occluded objects.
[0066] The deformable feature sampling module employs a two-stage attention fusion strategy. First, the coordinates of 13 dynamic sampling points are predicted based on the 256-dimensional target features. These sampling points form a region of interest on the BEV feature map. Subsequently, a deformable attention mechanism is used to obtain the feature vectors at the corresponding locations using bilinear interpolation, and features are aggregated using attention weights. This design overcomes the fixed receptive field limitation of traditional convolution operations, enabling the network to adaptively adjust the feature sampling region based on the target morphology. This is particularly suitable for processing sparse millimeter-wave radar point cloud features.
[0067] The cascade optimization architecture uses a 6-layer iterative processing unit, each layer contains a feature decoder and an anchor frame correction module. The feature decoder performs nonlinear transformation on the sampled features through a 3-layer fully connected network, and then predicts the probability of each category of the anchor frame. The anchor frame correction module adopts a divide-and-conquer strategy: a 128-dimensional sub-network is used to predict the center point offset, and a 128-dimensional sub-network is used to estimate the size and pose residuals. Through the layer-by-layer refinement mechanism, the network ultimately outputs the precise coordinates of the target. , heading angle ,size and category probabilities.
[0068] Specifically, the millimeter-wave radar BEV target detection network calculation process is as follows:
[0069] This network uses the PointPillars point cloud feature extraction module to convert input point cloud data from a sparse 3D space into a dense 2D BEV feature map. The input data has a dimension of (B, 2000, 5), where B (Batch Size) represents the batch size and 2000 represents the number of points to be normalized per frame. The 5-dimensional features include the target's 3D coordinates (x, y), velocity components (vx, vy), and radar reflection intensity (RCS).
[0070] First, the point cloud is divided into a regular 3D grid of cylinders, where the spatial extent of each cylinder is a fixed size on the (x, y) plane (e.g., [0.2m × 0.2m]). For each cylinder, the point cloud features are processed by the following steps:
[0071] (1) Feature enhancement: For each point, calculate its relative to the center of the column Offset:
[0072]
[0073] Concatenate the original features with the offset to obtain the enhanced feature vector:
[0074]
[0075] (2) Feature encoding: For each column, a multi-layer perceptron (MLP) is used to encode the point cloud features:
[0076]
[0077] Where N is the number of points in the column, and MLP outputs column features of fixed dimension (set to 256 dimensions in this application).
[0078] (3) BEV feature map generation.
[0079] The encoded columnar features are mapped onto a two-dimensional BEV grid according to their spatial position, forming an initial BEV feature map. Subsequently, the BEV feature map is further aggregated through a two-dimensional convolutional network, outputting a dense feature map of dimensions (B, H, W, C), where H and W represent the resolution of the BEV map and C represents the number of feature channels. This feature map serves as input to subsequent detection modules.
[0080] Organize anchor boxes (Anchor) representing the target pose and size and feature vectors (Feature) encoding target features. This part of the model mainly completes the structural organization of target representation, including anchor boxes (Anchor) representing the target pose and size and feature vectors (Feature) encoding target features. The anchor boxes are initialized in a uniformly distributed manner in the BEV space. Each anchor box is composed of its center coordinates (x, y), size ((w, l) and heading angle Definition. These parameters are set as learnable tensors and are continuously optimized during training through gradient descent to adapt to the geometric characteristics of different targets. At the same time, each target is represented by a 256-dimensional feature vector, which is initialized to all zeros and gradually learns the semantic information of the target during training. By combining anchor boxes with feature vectors, the model can simultaneously capture the geometric properties and high-level semantic features of the target, providing rich contextual information for subsequent target detection and classification. This design not only enhances the model's adaptability to complex scenes, but also improves the accuracy and robustness of target detection.
[0081] The self-attention mechanism for target features, the variable attention mechanism for extracting point cloud features based on PointPillars, the feedforward network, the anchor box correction, and the category prediction module are introduced below:
[0082] Self-attention mechanism for target features
[0083] The input of the self-attention mechanism is the target feature vector set generated in the third part , where each The feature vector representing an object. The self-attention mechanism enhances the contextual information of the target features by calculating the global correlation between feature vectors. The specific process is as follows:
[0084] First, for each eigenvector Calculate queries separately , Key Sum value vector :
[0085]
[0086] in is a learnable weight matrix. Then, the attention score matrix is calculated :
[0087]
[0088] in is the dimension of the feature vector, i and j represent the index of the target feature vector set, and exp(.) is the natural exponential function. Finally, the enhanced feature vector is obtained by weighted aggregation value vector:
[0089]
[0090] This mechanism enables each target feature to capture global context information and improve the modeling ability of complex scenes.
[0091] Modifiable attention mechanism for extracting point cloud features based on PointPillars
[0092] The input of the variable attention mechanism includes BEV point cloud features And the target features output by the self-attention mechanism This mechanism enhances the spatial information perception capability of target features by dynamically sampling point cloud features. The specific process is as follows:
[0093] For each target feature , predict a set of sampling point coordinates , where K is the number of sampling points. Then, the bilinear interpolation function is used on the BEV feature map. Get sampling point features:
[0094]
[0095] And aggregate the sampling point features through attention weights:
[0096]
[0097] in is a learnable attention weight. This mechanism enables target features to adaptively focus on key areas, improving the detection capability of non-rigid targets.
[0098] Feedforward Network (FFN)
[0099] The input of the feedforward network is the target feature output by the variable attention mechanism . The target features are nonlinearly transformed through a multi-layer fully connected network:
[0100]
[0101] in is the learnable weight matrix, is the bias term, and RELU (.) is the linear rectification function; this module further extracts the high-order semantic features of the target to provide support for subsequent bounding box correction and category prediction.
[0102] Anchor box correction and category prediction module
[0103] The input of this module is the target feature output by the feedforward network The output is the corrected anchor box parameters, target category probability and updated target features. The specific process is as follows:
[0104] Bounding box correction: For each target feature , predict the offset of the anchor box:
[0105]
[0106] And correct the anchor box by the following formula:
[0107]
[0108] in is the anchor frame decoding parameter, is the corrected anchor box parameter.
[0109] Category prediction: Predict the target category probability through the fully connected layer and Softmax function:
[0110]
[0111] in and are the learnable weight matrices and bias terms.
[0112] The self-attention mechanism of target features, the variable attention mechanism based on PointPillars to extract point cloud features, the forward network, the anchor box correction and the category prediction module are cascaded into 6 layers for iterative processing. The last layer model outputs the target pose and target category probability as the final result.
[0113] S3. Train the target detection network and use the combination of Focal Loss and SmoothL1 (.) as the loss function for training; specifically,
[0114] For the category loss function, Focal Loss is used to alleviate the category imbalance problem. For the target box regression, SmoothL1 Loss loss function SmoothL1 (.) is used, as shown below:
[0115]
[0116] in, is the focus loss value, To smooth the L1 loss value, is the total loss; is the probability that the anchor box predicts that it belongs to a certain type of target, is the Focal Loss hyperparameter, which is usually set to 0.25 and 2. To predict the difference between the target bounding box and the true value, this application uses The weights weight the two types of losses.
[0117] S4. Use the trained network to perform target detection, post-process the network output, obtain the final result, and complete the BEV target detection task.
[0118] Corresponding to the aforementioned embodiment of a millimeter-wave radar BEV target detection method based on a sparse attention mechanism, the present invention also provides an embodiment of a millimeter-wave radar BEV target detection device based on a sparse attention mechanism.
[0119] See also Figure 3 An embodiment of the present invention provides a millimeter-wave radar BEV target detection device based on a sparse attention mechanism, including a memory and one or more processors. The memory stores executable code. When the processor executes the executable code, it is used to implement a millimeter-wave radar BEV target detection method based on a sparse attention mechanism in the above embodiment.
[0120] The embodiment of the millimeter-wave radar BEV target detection device based on the sparse attention mechanism provided by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory for execution. From the hardware level, if Figure 3 As shown in the figure, a hardware structure diagram of a millimeter wave radar BEV target detection device based on a sparse attention mechanism provided by the present invention is provided in any device with data processing capabilities, except Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.
[0121] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0122] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present invention. A person of ordinary skill in the art can understand and implement the present invention without inventive work.
[0123] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a millimeter-wave radar BEV target detection method based on a sparse attention mechanism in the above embodiment is implemented.
[0124] The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium may also be an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.
[0125] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the millimeter-wave radar BEV target detection method based on a sparse attention mechanism.
[0126] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the claims.
[0127] It should be understood that the above general description and the detailed description that follows are exemplary and explanatory only and do not limit the present application. The present application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from the scope of the present application. The scope of the present application is limited only by the appended claims.
Claims
1. A millimeter-wave radar BEV target detection method based on sparse attention mechanism, characterized in that: The method comprises the following steps: S1, obtain millimeter wave radar point cloud and perform preprocessing; S2. Build a millimeter-wave radar BEV target detection network, including: encoding point cloud features based on the PointPillars architecture to obtain feature maps, enhancing the feature maps using an anchor-guided self-attention mechanism, and iteratively processing the enhanced features using a cascade optimization module to obtain prediction results. The variable attention mechanism based on PointPillars for extracting point cloud features includes: For each target feature f output by the self-attention mechanism i′ , predict a set of sampling point coordinates Where K is the number of sampling points. Then, the sampling point features are obtained by the bilinear interpolation function BilinearInterpolate(,) on the BEV feature map: g ij =BilinearInterpolate(P,p ij ) Where P is the BEV point cloud feature, And aggregate the sampling point features through attention weights: where w ij The attention weights are learnable; this mechanism enables target features to adaptively focus on key areas, improving the detection capability of non-rigid targets. The cascade optimization module has six cascade layers, each layer includes: The self-attention mechanism of the target features and the variable attention mechanism based on PointPillars to extract point cloud features are used to perform variability sampling of features; the sampling results are decoded and the anchor frame is corrected; The feature decoding and anchor frame correction of the sampling results specifically include: Input variable attention mechanism output target feature F″={f 1″ ,f 2″ ,…,f N″ }, perform nonlinear transformation on target features through multi-layer fully connected networks: <h2 style=";text-align:left;direction:ltr">f<h2 style=";text-align:left;direction:ltr"> i″′ <h2 style=";text-align:left;direction:ltr"> =FFN(f<h2 style=";text-align:left;direction:ltr"> i″ <h2 style=";text-align:left;direction:ltr"> )=W2ReLU(W1f<h2 style=";text-align:left;direction:ltr"> i″ <h2 style=";text-align:left;direction:ltr"> +b1)+b2 Where W1, W2 are learnable weight matrices, b1, b2 are bias terms; RELU(.) is a linear rectification function; Bounding box correction: For each target feature f i″′ , predict the offset of the anchor box: Δb i =(Δx i ,Δy i ,Δw i ,Δl i ,Δθ i ) And correct the anchor box by the following formula: Where (x i ,y i ,w i ,l i ,θ i ) is the anchor frame decoding parameter; (x i ,y i ,w i ,l i ,i) is the anchor frame parameter after correction; Category prediction: Predict the target category probability through the fully connected layer and Softmax function: p i =Softmax(W c f i″′ +b c ) Where W c and b c are the learnable weight matrices and bias terms; S3. Train the target detection network, using a combination of focal loss and smooth L1 loss as the training loss function; S4. Use the trained network to perform target detection, post-process the network output, obtain the final result, and complete the BEV target detection task.
2. The millimeter-wave radar BEV target detection method based on sparse attention mechanism according to claim 1 is characterized in that: The obtaining of millimeter wave radar point cloud and preprocessing includes: First, the millimeter-wave radar transmits a frequency-modulated continuous wave and receives the echo signal, using fast Fourier transform to extract the target's range, speed, and azimuth information; Through multi-frame data accumulation and point cloud clustering, point cloud data containing target coordinates and radar reflection intensity is generated; to adapt to network input, the point cloud is normalized to a unified coordinate system and outliers are removed; Subsequently, in order to facilitate data processing of deep learning models, the point cloud is normalized to a uniform quantity scale.
3. The method for BEV target detection using a millimeter-wave radar based on a sparse attention mechanism according to claim 1, wherein: The feature map obtained by performing point cloud feature encoding based on the PointPillars architecture is specifically: First, the PointPillars architecture is used to divide the point cloud into a regular three-dimensional cylindrical grid. The spatial range of each cylinder is a fixed size on the plane. For each point in each cylinder, its offset relative to the center of the cylinder is calculated, and the original features are concatenated with the offset to obtain an enhanced feature vector. Then, the enhanced point cloud features are encoded by a multi-layer perceptron, and the encoded cylindrical features are mapped to a two-dimensional BEV grid according to their spatial position to form an initial BEV feature map. Finally, a two-dimensional convolutional network is used to aggregate the BEV feature map to obtain a feature map.
4. The method for BEV target detection using a millimeter-wave radar based on a sparse attention mechanism according to claim 1, wherein: The feature enhancement of the feature map based on the anchor frame guided self-attention mechanism is specifically as follows: Complete the structured organization of target representation, including anchor boxes of target pose and size and feature vectors encoding target features; anchor boxes are initialized in a uniformly distributed manner in BEV space. Each anchor box is defined by its center coordinates, size and heading angle, which are all learnable tensors used to continuously optimize during training to adapt to the geometric characteristics of different targets; each target is represented by a 256-dimensional feature vector, which is initialized to all zeros and is used to gradually learn the semantic information of the target during training. The combination of anchor boxes and feature vectors enables the model to simultaneously capture the geometric properties and high-level semantic features of the target.
5. The method for BEV target detection using a millimeter-wave radar based on a sparse attention mechanism according to claim 1, wherein: The self-attention mechanism of the target feature enhances the contextual information of the target feature by calculating the global correlation between feature vectors. For each feature vector, the query, key, and value vectors are calculated using a learnable weight matrix. Then, the attention score matrix is calculated using the query vector and the key vector, and the enhanced feature vector is obtained by weighted aggregation of the value vector. The formula for calculating the attention score matrix is: Among them, d is the dimension of the feature vector, q i is the query vector corresponding to the i-th feature vector, k k is the key vector corresponding to the kth eigenvector, k j is the key vector corresponding to the jth eigenvector, N is the number of eigenvectors; exp(.) represents the natural exponential function; The enhanced feature vector is obtained by weighted aggregation value vector: v j is the value vector corresponding to the j-th eigenvector.
6. The method for BEV target detection using a millimeter-wave radar based on a sparse attention mechanism according to claim 1, wherein: The combination of focal loss and smooth L1 loss SmoothL1(.) as the loss function for training specifically includes: in, is the focus loss value, To smooth the L1 loss value, is the total loss; p a is the probability that the anchor box predicts that it belongs to a certain class of target, a, is the focal loss hyperparameter, Δb is the difference between the predicted target bounding box and the true value, (x, y, w, l,) is the anchor box parameter, and the two types of losses are weighted using λ1 and λ2 weights.
7. A millimeter-wave radar BEV target detection device based on a sparse attention mechanism, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, a millimeter-wave radar BEV target detection method based on a sparse attention mechanism is implemented as described in any one of claims 1 to 6.
8. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, a millimeter-wave radar BEV target detection method based on a sparse attention mechanism as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
4D millimeter wave radar target detection, tracking and speed measurement method based on deep learning
CN116403180A
Fusion 3D target detection method based on 4D millimeter wave radar and image
CN117274749A