Small target detection method of plural dynamic attention mechanism
By constructing a small target detection method with a complex dynamic attention mechanism, and utilizing the complex domain information of radar echoes, the problem of difficult small target detection in traditional radar detection is solved, and high-precision detection and segmentation are achieved in complex clutter backgrounds.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHWESTERN POLYTECHNICAL UNIV
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional radar target detection methods struggle to effectively detect small targets in complex clutter backgrounds, resulting in residual clutter, false alarms, and missed alarms. Furthermore, existing deep learning methods do not fully utilize the complex domain information of radar signals.
A small target detection method employing a complex dynamic attention mechanism is proposed. This method constructs a small target detection and segmentation network based on U-Net, embeds a complex domain dynamic attention module, and combines multi-scale spatial attention and channel interactive weight allocation to utilize the complex domain information of radar echoes for target detection and segmentation.
It significantly improves the accuracy and robustness of small target detection in low signal-to-noise ratio environments, effectively suppresses background noise, and enhances the accuracy and adaptability of target detection.
Smart Images

Figure CN122017777A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of radar signal processing and target detection, specifically to a small target detection method based on a complex dynamic attention mechanism. It achieves accurate detection and segmentation of small targets and clutter in the range-Doppler domain based on deep learning, image segmentation, and signal processing. Background Technology
[0002] Radar, as an active microwave target detection device, possesses all-weather, all-day, and high-precision detection capabilities, and is widely used in various fields such as military defense, autonomous driving, and environmental perception. Traditional radar target detection methods mainly rely on the energy difference between the target and clutter. On the one hand, clutter is suppressed through Moving Target Indicator (MTI), and on the other hand, Moving Target Detection (MTD) is used in conjunction with multi-pulse joint accumulation to accumulate target energy. Finally, a Constant False Alarm Rate (CFAR) method is employed to achieve reliable target detection using statistical information. However, due to the influence of strong ground and sea clutter, traditional methods suffer from residual clutter, false alarms, and missed alarms when detecting slow-moving small targets such as UAVs, severely limiting the radar's detection performance.
[0003] In recent years, the rapid development of deep learning technology has provided a new solution for detecting weak targets. These methods transform the traditional energy detection problem into an intelligent segmentation problem in the two-dimensional image domain. Common segmentation methods include Convolutional Neural Networks (CNNs) and Generative Adversarial Networks (GANs). Among them, pixel-level segmentation methods based on the U-Net structure have achieved significant results in medical and natural image segmentation. Most existing deep learning methods focus only on feature extraction using the amplitude information of the echo signal, neglecting the rich phase information contained in radar signals, namely the I (in-phase) and Q (orthogonal) components in the complex domain. Phase information is crucial for describing the weak features and details of targets in radar echoes, especially when dealing with small and low-contrast targets. Furthermore, for schemes using super-resolution or fine-grained segmentation networks, data annotation and model training costs are high, and in complex real-world environments, relying solely on single feature dimensions such as amplitude or phase for modeling makes it difficult to simultaneously meet the needs of target detection and segmentation. Summary of the Invention
[0004] The purpose of this invention is to provide a small target detection method with a complex dynamic attention mechanism to solve the problem of difficult small target detection in complex clutter backgrounds.
[0005] To achieve the above objectives, the present invention employs the following technical solution: A small object detection method based on a complex dynamic attention mechanism includes: Using the complex matrix obtained from the target reflection echo received by radar through pulse compression and moving target detection as input, a normalized tensor with I / Q channels is constructed as training samples. Background, clutter, and target three-classification annotation maps are established as labels, and effective masks are set. During the training phase, a small target detection and segmentation network based on U-Net is constructed, and a complex domain dynamic attention module is embedded after the complex residual block of the encoder. The complex domain dynamic attention module includes a complex domain channel attention module, a multi-scale spatial attention module, and a dynamic fusion gating module, which are used to perform channel enhancement, spatial enhancement, and dynamic fusion for complex features, respectively. A hybrid loss function is used during training. During the inference phase, the predicted category is output, and the detection result is obtained from the target category mask.
[0006] Furthermore, the small target detection and segmentation network uses U-Net as its backbone, including an encoder, a decoder, and an output head; the encoder is composed of several stacked complex residual blocks, with a complex domain dynamic attention module embedded within each complex residual block; it employs equivalent complex representation using I / Q dual channels; the input and output complex features of any layer in the network are represented as follows:
[0007] in, This indicates the complex features of the layer; and These represent the real part and the imaginary part, respectively. Indicates the number of feature channels; This indicates the spatial dimensions of the feature in this layer; express A real-valued tensor space of dimension 1.
[0008] Furthermore, the feature extraction process for complex residual blocks in the encoder includes: Let the complex convolution kernel be... For input complex features Performing a complex convolution, the equivalent real part output is: ; The real part features are the output of the convolution. The real / imaginary part features are inputs; These are the real / imaginary part parameters of the convolution kernel; Represents a two-dimensional convolution operation; The equivalent imaginary part output of complex convolution is .
[0009] Furthermore, the processing procedure of the complex domain channel attention module includes: First, analyze the real and imaginary features of the complex residual block output. Perform global average pooling in the spatial dimension and concatenate the results to obtain the channel description vector. ; then the channel description vector Channel weights are generated using two fully connected layers. ; channel weight Decomposed into real part channel weights With imaginary channel weights ;Will and Acting on real and imaginary features respectively The real and imaginary features after channel enhancement are obtained. .
[0010] Furthermore, the processing steps of the spatial attention module include: Firstly, we address the real and imaginary features after channel enhancement. Calculate the amplitude feature tensor Then, for the amplitude feature tensor Perform channel-dimensional average pooling and max pooling, then concatenate them to obtain the concatenated feature vector. Multi-scale convolutional branches are used to concatenate feature vectors. Spatial information is extracted and concatenated to obtain multi-scale convolutional features. Multi-scale convolutional features Spatial attention weight map is obtained after convolutional fusion and passing through an activation function. Spatial attention weight map Real and imaginary features after channel enhancement Above, we obtain the spatially augmented real and imaginary features. .
[0011] Furthermore, the processing steps of the dynamic fusion gating module include: Enhanced real and imaginary features of the channel Real and imaginary features after spatial enhancement Concatenation is performed along the channel dimension to construct input features. The dynamic fusion gating module targets input features. After performing convolution and activation function processing sequentially, softmax normalization is applied to both the channel attention branch and the spatial attention branch to obtain the channel attention branch weight map. Spatial attention branch weight graph ; use and Enhanced real and imaginary features of the channel Real and imaginary features after spatial enhancement Dynamic fusion is performed to obtain the real and imaginary features of the output of the complex domain dynamic attention module. .
[0012] Furthermore, the encoder's downsampling and residual connection process is as follows: In the main branch, the real and imaginary features output by the dynamically fused gating module are used. As input, convolution with a preset stride is used to perform downsampling, resulting in downsampled real and imaginary features. ; In the residual branch, the real and imaginary features of the complex residual block input are... Convolution pairs using a preset stride Processing is performed to align the residual branches, resulting in the real and imaginary features of the aligned residual branches. ; Real features after downsampling Real feature aligned with residual branch The features are added together and activated to obtain the real part of the encoder output. Imaginary part features after downsampling Imaginary feature aligned with residual branch The features are added together and activated to obtain the imaginary part of the encoder output. .
[0013] Furthermore, the decoder gradually restores the real and imaginary features extracted by the encoder to their original spatial dimensions through the transposed convolution resolution recovery operation; in this process, the real and imaginary features obtained by the encoder are combined with the upsampling results through skip connections to fuse multi-scale features and retain more detailed information. The decoder upsamples step by step and fuses the features with the encoder's skip connection features to obtain the decoded real and imaginary features at the same scale as the input. ; After concatenating the channel dimensions, the data is convolved and mapped to the three class channels to generate unnormalized scores for the three categories. Softmax logistic regression is performed on the unnormalized scores to obtain pixel values. Belongs to the Predicted probability of class .
[0014] Furthermore, complex matrices The element form in is ;in, Range unit of radar system With Doppler unit Complex echo value at; This is the real part, i.e., the amplitude of channel I; This is the imaginary part, i.e., the Q-channel amplitude; The imaginary unit; The amplitudes of the I and Q channels are Z-score normalized separately to obtain the normalized I channel amplitude. Q channel amplitude They are then spliced along the channel dimension to form a dual-channel input tensor. As training samples; construct a pixel-level three-class classification annotation map for each training sample. As labels, their true categories include background, clutter, and target; effective masks are constructed for invalid detection regions. The final training dataset is represented as follows: ; This represents the number of training samples.
[0015] Furthermore, the hybrid loss function combines Focal Loss and Tversky Loss; Focal Loss is defined as:
[0016] in Indicates the true class of the training samples; An effective mask for training samples; For pixels In the real category The predicted probability; Modulation factor; Tversky Loss balances the network's classification ability for different categories by controlling the penalty ratio for false positives and false negatives; it defines a binary truth graph for the target class. With prediction probability map , combined and Define the cumulative true positive value within the effective mask. False positive cumulative value Cumulative value of false negatives Tversky Loss is defined as:
[0017] in, For Tversky Loss; To balance the coefficients for false positives and false negatives; It is a positive constant; The mixed loss function is then:
[0018] in, These are the weighting coefficients.
[0019] Furthermore, a dual-channel input tensor is constructed corresponding to the two-dimensional complex matrix of the echo to be measured, and the predicted probabilities for different categories are obtained through the forward pass of the network. Thus, the predicted category is obtained. ; Construct target class mask The test results were obtained. ;in For indicator functions; Corresponding target class.
[0020] A terminal device includes a processor, a memory, and a computer program stored in the memory; when the processor executes the computer program, it implements the small target detection method of the complex dynamic attention mechanism.
[0021] A computer-readable storage medium storing a computer program; when executed by a processor, the computer program implements the small target detection method of the complex dynamic attention mechanism.
[0022] Compared with the prior art, the present invention has the following technical features: This invention constructs an end-to-end CDDA-U-Net model, utilizing complex residual blocks to extract local amplitude and phase features of radar echo signals in the range-Doppler image. Combined with a multi-scale spatial attention mechanism and channel-interactive weight allocation, it adaptively fuses real and imaginary features, effectively suppressing background noise and enhancing the response to weak targets. By balancing local details and global dependencies through a dynamic gating mechanism, it solves the problems of blurred small target features and high false alarm / missed alarm rates in low signal-to-noise ratio environments, significantly improving the accuracy and robustness of radar detection of small targets in complex electromagnetic scenarios. Attached Figure Description
[0023] Figure 1 This is a normalized data diagram of radar echo MTD in an embodiment of the present invention, where (a) is the real part after normalization and (b) is the imaginary part after normalization. Figure 2 This is a diagram of the overall architecture of the CDDA-U-Net network. Figure 3 This is a diagram of the complex domain dynamic attention module (CDDA) architecture. Figure 4 This is an architecture diagram of the Multi-Scale Spatial Attention module. Figure 5 This is an architecture diagram of the Complex-SE (Complex-Domain) channel attention module. Figure 6 Attention heatmap of CDDA-U-Net network; Figure 7 The image shown is a small target segmentation result image in an embodiment of the present invention, where (a) is the true category of the measured data and (b) is the result image after segmentation detection. Detailed Implementation
[0024] This invention provides a small target detection method with a complex dynamic attention mechanism, which transforms the traditional "energy detection" into a "pixel-level three-class classification segmentation" problem. It makes full use of the complex domain information of radar echoes and combines dynamic attention mechanism with multi-scale feature fusion to achieve high-precision detection and segmentation of small targets, while improving robustness and adaptability under low signal-to-noise ratio conditions.
[0025] A small target detection method based on a complex dynamic attention mechanism is proposed, primarily targeting the detection and pixel-level segmentation of weak moving targets in radar range-Doppler two-dimensional maps against complex clutter backgrounds. This method uses the complex matrix obtained by pulse compression and moving target detection processing of the radar-received target reflection echo. As input, I / Q dual-channel normalized tensors are constructed as training samples, and background, clutter, and target three-class label maps are established as labels and effective masks are set. During the training phase, a small target detection and segmentation network CDDA-U-Net based on U-Net is constructed, and a complex domain dynamic attention module CDDA is embedded after the complex residual block of the encoder. The CDDA module includes a complex domain channel attention module (Complex-SE), a multi-scale spatial attention module (Multi-Scale Spatial Attention), and a dynamic fusion gate module (Fusion Gate) to perform channel enhancement and spatial enhancement on complex features and then perform dynamic fusion, thereby adaptively enhancing the target response and suppressing clutter interference. During training, a hybrid loss combining Focal Loss and Tversky Loss is used to alleviate class imbalance and improve small target recall. During the inference phase, three-class segmentation results are output, and the target location is extracted from the target class mask to achieve detection.
[0026] The method of this invention makes full use of the amplitude and phase information in the complex domain, and has higher robustness and adaptability under low signal-to-noise ratio and strong clutter conditions; the specific implementation process of this invention will be described in detail below with reference to the accompanying drawings.
[0027] Step 1: Echo signal preprocessing and training dataset construction.
[0028] First, the radar system transmits and receives target-reflected echoes via high-frequency pulses. After pulse compression and moving target detection (MTD) processing, a range-Doppler two-dimensional complex matrix is obtained. The complex matrix The element form in the middle is as follows: (1) in, Range unit of radar system With Doppler unit Complex echo value at; This represents the amplitude of the real part (I channel). The amplitude of the imaginary part (Q channel) H Indicates the number of distance dimension units; Indicates the number of Doppler units. express Complex space of dimension 1 It is the imaginary unit.
[0029] Based on complex matrices The training dataset is constructed as follows: To improve training stability and convergence speed, the amplitudes of the I / Q channels are Z-score normalized separately: (2) (3) in, The mean / standard deviation of channel I. The mean / standard deviation of the Q channel; To minimize the amount, to prevent the denominator from being zero.
[0030] Subsequently, a complex tensor is constructed by concatenating the standardized amplitudes of the I / Q channels along the channel dimension to form a dual-channel input tensor: (4) Where 2 represents the number of channels, the resulting dual-channel input tensor These are the training samples. express A real-valued tensor space of dimension 1.
[0031] Then, a pixel-level three-class classification annotation map is constructed as a label for each training sample: (5) Among them, there are three true categories in the training samples. Indicates background noise; Indicates ground features / clutter; Represents the target class; This indicates that the values are 0, 1, and 2. A set of discrete label matrices.
[0032] If invalid detection regions exist (e.g., blank regions not used in training or system-occluded regions), construct an effective mask: (6) in, Indicates the location Pixels are involved in loss calculation; This indicates that the pixel at that location is not included in the loss calculation; It is a set of binary masks.
[0033] The final training dataset is represented as follows: (7) in, For the training dataset; For the first Each training sample and its corresponding label and effective mask triplet; This represents the set of all training samples. This represents the number of training samples.
[0034] Step 2: Construct CDDA-U-Net, a small object detection and segmentation network based on U-Net.
[0035] like Figure 2 As shown, this invention uses the small target detection and segmentation network CDDA-U-Net for pixel-level three-class classification segmentation. The network has U-Net as its backbone and includes an encoder, a decoder and an output head. The encoder is composed of several complex residual blocks stacked together. Complex domain dynamic attention modules (CDDA) are embedded in the complex residual blocks to achieve adaptive enhancement of complex features.
[0036] To process complex signals in a network, this scheme employs an equivalent complex representation using I / Q dual channels; the input and output complex characteristics of any layer in the network are represented as follows: (8) in, This indicates the complex features of the layer; and These represent the real part and the imaginary part, respectively. Indicates the number of feature channels; This indicates the spatial dimensions of the features in this layer (either consistent with the input or the downsampled dimensions); express A real-valued tensor space of dimension 1. The complex features of the network input are the training samples. .
[0037] Step 3: Feature extraction of complex residual blocks in the encoder.
[0038] Let the complex convolution kernel be... For input complex features Performing a complex convolution, the equivalent real part output is: (9) in, The real part features are the output of the convolution. The real / imaginary part features are inputs; These are the real / imaginary part parameters of the convolution kernel; This represents a two-dimensional convolution operation.
[0039] The equivalent imaginary part of a complex convolution is output as follows: (10) in, The imaginary part of the convolution output is represented by the feature.
[0040] In this plan, The basic features are further obtained through batch normalization and nonlinear activation to improve expressive power and training stability.
[0041] Step 4, Complex Domain Dynamic Attention Module (CDDA).
[0042] This scheme proposes a Complex Domain Dynamic Attention Module (CDDA) to further improve network performance. The CDDA module is placed after each complex residual block and includes a Complex-SE module, a Multi-Scale Spatial Attention module, and a Fusion Gate module. By readjusting important information in complex features through a dynamic fusion mechanism, a multi-scale spatial perception and dynamic gating fusion is designed to suppress clutter region response and enhance small target features.
[0043] (1) Channel attention module Complex-SE.
[0044] First, analyze the real and imaginary features of the complex residual block output. Perform global average pooling in the spatial dimension and concatenate the results to obtain the channel description vector: (11) in, The channel description vector; The spatial dimensions of the real and imaginary features; , Indicates the location The real and imaginary vectors formed by the real and imaginary features of all channels (“:” indicates that the channel dimension is taken for all channels); For channel dimension splicing operators; The average factor; Indicates length is The real-valued vector space, Indicates the number of feature channels.
[0045] Channel weights are then generated using two fully connected layers: (12) in, Channel weights; This is the weight matrix of the fully connected layer; Represents the ReLU activation function; This represents the Sigmoid activation function.
[0046] Channel weights Channel weights are split into real and imaginary parts; length Channel weights Before After Dimension split into and ; For the real part of the channel weight, The channel weights are applied to the real and imaginary features to obtain the channel-enhanced real and imaginary features. (13) in, These are the real and imaginary features after channel enhancement; symbols Element-wise multiplication means that each channel is multiplied by its corresponding weight coefficient.
[0047] (2) Spatial Attention Module (Multi-Scale Spatial Attention).
[0048] The spatial attention module uses convolutional kernels of different scales to extract spatial features and generates a spatial weight map to assign different importance to each pixel in the feature map.
[0049] Channel-enhanced real / imaginary features output by the channel attention module The signal is then processed in the spatial attention module; to utilize the amplitude information of the complex signal, the amplitude feature tensor is calculated: (14) in, For amplitude feature tensor; This indicates element-wise squaring; " indicates element-wise addition; This indicates taking the square root element by element.
[0050] For amplitude feature tensor Perform channel-dimensional average pooling and max pooling, then concatenate them to obtain the concatenated feature vector. : (15) in, This represents average pooling along the channel dimension, with an output size of... ; This represents max pooling along the channel dimension, with an output size of... ; This indicates concatenation along the channel dimension, therefore concatenating the feature vectors. It has 2 channels.
[0051] Multi-scale convolutional branches are used to concatenate feature vectors. Extracting and stitching spatial information: (16) in, The concatenated multi-scale convolutional features; Indicates the kernel size as Two-dimensional convolution; Indicates the kernel size as Two-dimensional convolution; Indicates void ratio of Hollow convolution.
[0052] Multi-scale convolutional features through Convolutional fusion and obtaining the spatial attention weight map via Sigmoid: (17) in, Spatial attention weight map; for Convolution is used for channel fusion; The Sigmoid function makes the weights fall into .
[0053] Spatial attention weight map Effects on channel enhancement features: (18) in, To show the real / imaginary features after channel enhancement, These are the real and imaginary features after spatial augmentation; " indicates element-wise multiplication, making Broadcast to each channel on the channel dimension.
[0054] Through multi-scale spatial convolution operations, the spatial attention module can effectively extract spatial features at different scales, playing a crucial role, especially in the detection of small targets. In target detection and segmentation tasks, the scale variation of small targets is very large; therefore, the fusion of multi-scale features is key to improving detection accuracy.
[0055] (3) Dynamic Fusion Gating Module (Fusion Gate).
[0056] To adaptively determine the contributions of channel attention and spatial attention, a gated input is constructed: (19) in, The input features of the dynamic fusion gating module.
[0057] The dynamic fusion gating module outputs two types of attention branch weight maps and performs Softmax normalization: (20) in, This represents the channel attention branch weight graph; Represents the spatial attention branch weight graph; Represents two-dimensional convolution; Represents the ReLU activation function; This represents Softmax normalization over the "two-branch dimension," which makes the result uniform for any pixel location. Channel attention branch weights at the location Spatial attention branch weights satisfy .
[0058] Based on the channel attention branch weight graph Spatial attention branch weight graph Enhanced real / imaginary features of the channel Real / imaginary features after spatial enhancement Dynamic fusion is performed to obtain the output features of the complex domain dynamic attention module CDDA: (twenty one) in, These are the real / imaginary part enhancement features output by the CDDA module, respectively. These are the spatial weight diagrams of the two branches; "Indicates element-wise multiplication;" " indicates element-wise addition.
[0059] The dynamic fusion mechanism enables the model to adaptively learn the weights of channel and spatial attention, avoiding the limitations of manually setting these ratios. This dynamic learning mechanism enhances the model's adaptability to different scenarios and improves the accuracy of object detection.
[0060] Step 5: Encoder downsampling and residual connection.
[0061] The output features of the complex domain dynamic attention module CDDA in step 4 As input, downsampling is achieved using a convolution with stride=2: (twenty two) in, These are the real and imaginary features after downsampling, respectively. Indicates that the convolution kernel is Step size is The convolution operator is used to scale down the spatial dimensions.
[0062] When the residual branch and the main branch have different dimensions, use And the convolutional aligned residual branch with a stride of 2: (twenty three) in, Features of the real / imaginary parts after residual branch alignment; The real / imaginary features are input for this complex residual block; for The convolution with a stride of 2 is used to adjust the channel and spatial dimensions to match the main branch.
[0063] The downsampled real / imaginary features are added to the residual branch-aligned real / imaginary features and activated to obtain the encoder output real / imaginary features: (twenty four) in, The real / imaginary part features of the encoder output; " indicates element-wise addition; This represents the ReLU activation function.
[0064] Step 6: The decoder and output head obtain the final segmentation result.
[0065] by Figure 3 The dynamic attention in the complex domain constitutes the downsampling part, i.e. the encoder part; by repeating this part, the number of channels is increased (enhancing feature representation ability) while compressing the spatial resolution (reducing the amount of computation).
[0066] The decoder part restores the resolution by performing a transposed convolution operation to extract the real / imaginary features from the encoder. Gradually restore the original spatial dimensions; in this process, this scheme uses skip connections to transfer the real / imaginary features obtained from the encoder. Combined with the upsampling results, multi-scale features are fused to retain more detailed information. Finally, a 3-channel feature map is output, corresponding to three categories (background, clutter, and target).
[0067] The decoder upsamples step by step and fuses the features with the encoder's skip connection features to obtain decoded features at the same scale as the input. The output head adopts Convolution generates logits for the three classifications: (25) in, The unnormalized scores (logits) for the three-class classification; These are the real / imaginary features after decoding; For channel splicing; for Convolution maps features to three class channels; Indicates 3 channels, spatial dimensions are The tensor.
[0068] Softmax is applied to the unnormalized scores to obtain pixel-level class probabilities: (26) in, Represents pixels Belongs to the The predicted probability of a class; express In category channel Location The logit value; It is an exponential function; This represents the summation over the three types of channels; These correspond to three categories: background, clutter, and target.
[0069] Step 7: Calculate the hybrid loss function and update network parameters.
[0070] During training, the goal is to minimize the network's loss function. This approach employs a hybrid loss function, combining Focal Loss and Tversky Loss, to address the class imbalance problem and improve the recall rate and boundary segmentation accuracy for small objects.
[0071] In radar data, the background typically constitutes the majority. Focal Loss addresses the class imbalance problem by adjusting the weights of easily classified samples to focus on difficult-to-classify samples, effectively mitigating the class imbalance issue caused by the background dominating the class. Let the true class (label) of the training samples be... Then, multi-class Focal Loss is defined as: (27) in, Focal Loss; An effective mask for training samples; This refers to the number of effective pixels. For pixels In the real category The predicted probability; Modulation factor; This represents the summation over all spatial locations; the true categories include background noise, ground features / clutter, and target.
[0072] Tversky Loss is suitable for cases with high class imbalance. It balances the model's classification ability for different classes by controlling the penalty ratio for false positives (FP) and false negatives (FN). To emphasize small target regions, the penalty ratio for the target class ( Define a binary truth map and a prediction probability map: (28) in, A binary graph of the truth value of the target class; Predict probability maps for the target class; This is an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise. Predict the probability for the target class. This indicates that the true category is the target category.
[0073] Define true positives, false positives, and false negatives within the effective mask: (29) in, This represents the cumulative value of true positives. This represents the cumulative value of false positives. This represents the cumulative value of false negatives; " indicates summation after element-wise multiplication (equivalent to summing all elements-wise multiplications); and These represent element-wise complements.
[0074] Tversky Loss is defined as: (30) in, For Tversky Loss; To balance the coefficients for false positives and false negatives; To prevent positive constants with a denominator of zero.
[0075] This invention employs mixed loss: (31) in, Total loss; These are the weighting coefficients for the two losses, used for adaptive fusion of the two losses; and The results are given by equations (30) and (31) respectively.
[0076] During training, based on Backpropagation is performed to calculate the gradient of the network parameters, and an optimizer (such as Adam) is used to update the network weights, thereby completing the network training.
[0077] Step 8: The inference stage outputs the segmentation results and generates the detection results.
[0078] Construct the corresponding dual-channel input tensor from the two-dimensional complex matrix of the echo to be measured. The probability is obtained through the forward pass of the network. Output pixel-level predicted categories: (32) in, For the predicted category; This indicates the category index corresponding to the maximum value; For the first The predicted probability of each category.
[0079] Obtain the target class mask: (33) in For indicator functions; Corresponding target class, The target class mask is the final detection result.
[0080] Example: In one embodiment of the present invention, the network training process is as follows: Read the radar echo data, which has a shape of [128, 60]; where 128 represents the range cell number and 60 represents the pulse or Doppler channel; separate the real and imaginary parts of the data, and perform Z-score normalization on each sample to obtain the following... Figure 1The input data shown has a shape of [2, 128, 60]. Load the corresponding pixel-level labels, with label values of background (0), clutter (1), target (2), and invalid pixels marked as -1.
[0081] The architecture is based on U-Net. The encoder consists of multiple complex residual blocks, and the decoder uses a combination of deconvolution and convolution to restore the resolution. The CHAMS module is embedded in the encoder to achieve dynamic fusion of complex domain channel attention and multi-scale spatial attention. The output layer uses 1×1 convolution to map the feature map into 3 channels (corresponding to 3 types of pixels) and uses Softmax to obtain the pixel classification probability.
[0082] In this embodiment, the model underwent 100 complete training cycles on the training set, with two sets of echo data used as training samples in each batch. The optimizer chosen was Adam, which adaptively optimized the learning rate and updated network parameters through backpropagation, dynamically adjusting the learning rate during training to accelerate convergence. A hybrid loss function, combining FocalLoss and Tversky Loss, was used to calculate the loss on effective pixels.
[0083] The initial learning rate is 0.001, the momentum is 0.9, and the weight decay is 1×10. 4. The StepLR scheduler is used, and the learning rate decays to 70% of its original value every 20 training epochs. The selection of these hyperparameters can effectively balance training speed and model performance, ensuring that the model can learn effectively and achieve good generalization ability on the test set.
[0084] After pulse compression and MTD preprocessing, the radar echo data is input into the network model. The trained model can accurately classify each pixel into background, clutter, and target categories. Figure 1 This is a set of measured radar echo data normalized by MTD, which is then detected by the network designed in this paper. Figure 7 The segmentation results shown demonstrate that all five real targets and the remaining clutter can be completely segmented. This verifies that our method achieves significantly higher pixel accuracy and target detection rate than traditional CFAR and amplitude-based deep learning methods in small target detection and segmentation. Figure 6 The attention heatmap shown demonstrates that the model can effectively capture the difference between the target region and clutter, proving the effectiveness of the complex domain dynamic attention mechanism.
[0085] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for small object detection using complex dynamic attention mechanism, characterized in that, include: Using the complex matrix obtained by pulse compression and moving target detection processing of the target reflected echo received by radar as input, a normalized tensor with I / Q channels is constructed as a training sample, and a three-class label map of background, clutter and target is established as a label and an effective mask is set. During the training phase, a small object detection and segmentation network based on U-Net is constructed, and a complex domain dynamic attention module is embedded after the complex residual block of the encoder. The complex domain dynamic attention module includes a complex domain channel attention module, a multi-scale spatial attention module, and a dynamic fusion gating module, which are used to perform channel enhancement and spatial enhancement on complex features, respectively, and then perform dynamic fusion. A hybrid loss function is used during training; during the inference phase, the predicted category is output, and the detection result is obtained from the target category mask.
2. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The small target detection and segmentation network is based on U-Net as its backbone and includes an encoder, a decoder, and an output head; The encoder consists of several stacked complex residual blocks, with a complex domain dynamic attention module embedded within each complex residual block; The equivalent complex number representation using I / Q dual channels is used; the complex number characteristics of the input and output of any layer in the network are represented as follows: wherein, represents the complex features of the layer; and represent the real and imaginary features, respectively; represents the number of feature channels; represents the spatial dimension of the features of the layer; represents a real-valued tensor space of dimension 3. The method of claim 1, wherein the complex dynamic attention mechanism is defined as: The feature extraction process of complex residual blocks in the encoder includes: Let the complex convolution kernel be , the input complex feature is convolved with the complex kernel, and the real part of the output is: ; is the real part of the output of the convolution; is the real / imaginary part of the input feature; is the real / imaginary part of the kernel; denotes the two-dimensional convolution operation; The equivalent imaginary output of the complex convolution is .
4. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The processing steps of the complex domain channel attention module include: First, analyze the real and imaginary features of the complex residual block output. Perform global average pooling in the spatial dimension and concatenate the results to obtain the channel description vector. ; then the channel description vector Channel weights are generated using two fully connected layers. ; channel weight Decomposed into real part channel weights With imaginary channel weights ;Will and Acting on real and imaginary features respectively The real and imaginary features after channel enhancement are obtained. .
5. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The spatial attention module's processing steps include: Firstly, we address the real and imaginary features after channel enhancement. Calculate the amplitude feature tensor Then, for the amplitude feature tensor Perform channel-dimensional average pooling and max pooling, then concatenate them to obtain the concatenated feature vector. Multi-scale convolutional branches are used to concatenate feature vectors. Spatial information is extracted and concatenated to obtain multi-scale convolutional features. Multi-scale convolutional features Spatial attention weight map is obtained after convolutional fusion and passing through an activation function. Spatial attention weight map Real and imaginary features after channel enhancement Above, we obtain the spatially augmented real and imaginary features. .
6. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The processing steps of the dynamic fusion gating module include: The real part feature and the imaginary part feature after channel enhancement The real part feature and the imaginary part feature after spatial enhancement Splicing is performed in the channel dimension to construct an input feature The dynamic fusion gating module is used for the input feature Convolution processing, activation function processing and convolution processing are sequentially performed, and then Softmax normalization is performed on the channel attention branch and the spatial attention branch respectively, so as to obtain a channel attention branch weight graph A spatial attention branch weight graph ; Utilizing and The real part feature and the imaginary part feature of the channel enhanced , the real part feature and the imaginary part feature of the spatial enhanced Perform dynamic fusion to obtain the real part feature and the imaginary part feature of the output of the complex domain dynamic attention module .
7. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The encoder's downsampling and residual connection process is as follows: In the main branch, the real part features and the imaginary part features output by the dynamic fusion gate module are fused As input, the convolution with a preset step size is performed respectively to downsample, to obtain the downsampled real part features and imaginary part features ; In the residual branch, the real and imaginary features of the complex residual block input are... Convolution pairs using a preset stride Processing is performed to align the residual branches, resulting in the real and imaginary features of the aligned residual branches. ; down-sampled real part features real part features aligned with the residual branch added and activated to obtain real part features of the encoder output down-sampled imaginary part features imaginary part features aligned with the residual branch added and activated to obtain imaginary part features of the encoder output .
8. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The decoder restores the real and imaginary features extracted by the encoder to their original spatial dimensions through transposed convolution resolution recovery operation. In this process, the real and imaginary features obtained by the encoder are combined with the upsampling results through skip connections to fuse multi-scale features and retain more detailed information. The decoder up-samples the features step by step and fuses the features with the skip connection features of the encoder to obtain the decoded real part features and imaginary part features of the same size as the input ; After the channel dimension is spliced, the features are mapped to three classification channels through convolution, so as to generate three classification non-normalized scores; Softmax logistic regression is performed on the unnormalized scores to obtain pixel belongs to the first class of predicted probabilities .
9. The method of claim 1, wherein the complex dynamic attention mechanism is a complex dynamic attention mechanism for small object detection. The hybrid loss function combines Focal Loss and Tversky Loss; Focal Loss is defined as: in Indicates the true class of the training samples; An effective mask for training samples; For pixels In the real category The predicted probability; Modulation factor; Tversky Loss balances the network's classification ability for different categories by controlling the penalty ratio for false positives and false negatives; it defines a binary truth graph for the target class. With prediction probability map , combined and Define the cumulative true positive value within the effective mask. False positive cumulative value Cumulative value of false negatives Tversky Loss is defined as: in, For Tversky Loss; To balance the coefficients for false positives and false negatives; It is a positive constant; The mixed loss function is then: in, These are the weighting coefficients.
10. A terminal device, comprising a processor, a memory, and a computer program stored in the memory; characterized in that, When the processor executes a computer program, it implements the small target detection method with complex dynamic attention mechanism as described in any one of claims 1-9.