A remote sensing rotating target detection method based on dynamic direction perception attention
By employing a cross-scale densely fused feature pyramid network, a dynamic orientation-aware attention module, and a Gaussian-weighted chamfer distance loss, the problems of insufficient multi-scale feature fusion and inadequate orientation awareness in remote sensing rotating target detection are solved, achieving high-precision and robust detection of remote sensing rotating targets.
Patent Information
- Application Number
- CN202610253401.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional remote sensing rotating target detection methods suffer from missed detections and false detections in remote sensing scenarios, making it difficult to meet the requirements for accurate detection. Especially in the detection of remote sensing targets with multi-scale differences, arbitrary orientations, and dense arrangements, the feature extraction module struggles to take into account both high-level semantic information and low-level detailed information. The dynamic attention mechanism is not adaptable enough to changes in target orientation, and existing loss functions fail to fully consider the impact of angular periodicity and high aspect ratio characteristics.
A closed-loop solution is constructed by employing a cross-scale densely fused feature pyramid network, a dynamic orientation-aware attention module, and a Gaussian-weighted chamfered distance loss. Through cross-scale feature fusion, dynamic orientation awareness, and loss optimization, accurate detection of remotely sensed rotating targets is achieved.
It significantly improves the detection accuracy and robustness of remotely sensed rotating targets, solves the problems of insufficient multi-scale feature fusion and inadequate orientation perception, and enhances the stability and accuracy of detection.
Smart Images

Figure CN122176551A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing image target detection technology, specifically relating to a remote sensing rotating target detection method based on dynamic direction perception attention. Background Technology
[0002] With the continuous enhancement of sensor technology and Earth observation capabilities, remote sensing satellite aerial photography technology has been able to innovate continuously. However, it is usually acquired from an overhead perspective, with a complex background and the targets contained therein have significant characteristics such as varying scales, arbitrary orientations, and dense arrangement. These characteristics make it easy for traditional natural image target detection methods to miss or falsely detect in remote sensing scenarios, making it difficult to meet the needs of accurate detection.
[0003] To address the challenges posed by the arbitrariness of target orientation, remote sensing rotating target detection technology has emerged. This technology, by introducing a rotated bounding box instead of a traditional horizontal bounding box, can more accurately match the actual orientation of the remotely sensed target, thereby achieving precise positioning and identification of targets at any angle. It has become a core supporting technology for geospatial information extraction and national defense security monitoring. In recent years, the field of remote sensing rotating target detection has seen a surge of research results, forming two main technical paths: anchor-based and anchor-free. While anchor-based methods can improve the detection effect of specific targets, pre-setting the anchor box relies on prior target information, limiting generalization ability and incurring high computational costs. Anchor-free detection methods avoid the hyperparameter dependence and positive-negative sample imbalance problems caused by pre-setting the anchor box, providing a new path for solving related problems in remote sensing rotating target detection. However, many problems still need to be solved: at the feature extraction level, the multi-scale differences of remote sensing targets make it difficult for a single feature extraction module to take into account both high-level semantic information and low-level detailed information. Traditional feature pyramid networks and their improved structures still have room for improvement in the sufficiency of cross-scale feature fusion. At the orientation perception level, existing dynamic attention mechanisms or convolution methods are not adaptable enough to changes in target orientation and are difficult to accurately capture the feature representation of targets at arbitrary angles. At the loss function level, for the angular periodicity and high aspect ratio characteristics of rotating targets, existing IoU series loss functions have not fully considered the impact of angle deviation and target shape on detection accuracy.
[0004] To address the aforementioned issues, this invention proposes a remote sensing rotating target detection framework based on dynamic orientation awareness attention. By designing three core modules—a cross-scale dense fusion feature pyramid, dynamic orientation awareness attention, and Gaussian weighted chamfer distance loss—a closed-loop solution of "feature fusion-orientation awareness-loss optimization" is constructed. Summary of the Invention
[0005] The purpose of this invention is to propose a remote sensing rotating target detection method based on dynamic orientation perception and attention, comprising the following steps:
[0006] S1: Obtain the remote sensing image dataset and perform preprocessing;
[0007] S2: Construct a detection network framework, including a backbone network, a neck network, and a dynamic orientation-aware attention module; the backbone network is ResNet-50, and the neck network is a cross-scale densely fused feature pyramid network.
[0008] S3: The network is trained using the preprocessed remote sensing image as input and combined with Gaussian weighted chamfer distance loss;
[0009] S4: Input the remote sensing image to be detected into the trained network. After multi-stage feature extraction, cross-scale dense fusion, dynamic orientation perception enhancement and detection head prediction, the output includes the detection result containing the rotating target category, position coordinates and angle.
[0010] Furthermore, the construction of the detection network framework includes the following steps:
[0011] S1: Constructing the ResNet-50 backbone network: A four-stage hierarchical architecture is used to extract multi-scale features from the input image and output feature maps of different resolutions.
[0012] S2: Construct a cross-scale densely fused feature pyramid network: Receive the output features of different stages of the ResNet-50 backbone network, and achieve deep fusion of full-scale features through dense connections to generate a multi-scale fused feature map;
[0013] S3: Construct a dynamic orientation-aware attention module: Using target angle information as explicit guidance, dynamically generate rotating convolution kernels to enhance RoI features;
[0014] S4: Construct the target detection head: predict the target category, bounding box position and rotation angle based on the enhanced multi-scale features.
[0015] Furthermore, the construction of the cross-scale densely fused feature pyramid network includes the following steps:
[0016] S1: Channel unification: The number of channels in each layer of features is unified through 1×1 convolution;
[0017] S2: Dense Fusion: Features from each layer are upsampled and fused layer by layer. Features from lower layers are upsampled to the size of the i-th layer and then accumulated to achieve dense connections. The specific fusion process is as follows:
[0018] ;
[0019] in, L represents the dense fusion feature of the i-th layer; i Represents the original features of the i-th layer; This represents element-wise addition. This indicates an upsampling interpolation operation;
[0020] S3: Feature Distillation: Refining densely fused features by learning adaptive attention weights. The specific process is as follows:
[0021] ;
[0022] ;
[0023] ;
[0024] Among them, D i This represents the features after local feature extraction; Indicates attention weight; This represents the Sigmoid function, used to generate attention weights; Represents a 1×1 convolution; C 3x3 This represents a 3x3 convolution; Indicates the normalization layer; This represents the modified linear unit activation function; Indicates a refined characteristic; This represents element-wise multiplication.
[0025] S4: Secondary fusion and expansion: The refined features are upsampled layer by layer and added element by element. Max pooling is performed on the output features of the highest layer to adapt to the detection needs of larger scale targets.
[0026] Furthermore, the construction of the dynamic orientation-aware attention module includes the following steps:
[0027] S1: Angle Encoding: An angle encoder is used to model the spatial distribution of orientation information and generate adaptive angle features. The specific process is as follows:
[0028] ;
[0029] Among them, F angle Indicates angular features; This indicates a batch normalization operation; This represents the modified linear unit activation function; X represents the input feature;
[0030] S2: Convolutional Kernel Rotation: By combining the angle information with the basic convolutional kernel through a rotation matrix, the rotation operation on the basic convolutional kernel is completed. The specific process is as follows:
[0031] ;
[0032] ;
[0033] in, This represents the bilinear interpolation operation; Represents the rotated convolution kernel; K represents the basic convolution kernel; R Represents the rotation matrix; W represents the interpolated convolution kernel weights;
[0034] S3: Orientation-Aware Feature Extraction: Orientation-aware features are calculated using grouped convolution, implementing convolution operations with different rotation kernels for each spatial location. The specific process is as follows:
[0035] ;
[0036] in, This indicates a grouped convolution operation; Indicates a reshaping operation;
[0037] S4: Residual Fusion: The orientation-aware enhanced features are residually concatenated with the original features. The specific process is as follows:
[0038] ;
[0039] Where Y represents the final output feature; This represents the learnable scaling parameters.
[0040] Furthermore, the training of the network includes the following steps:
[0041] S1: Network Initialization: Initialize the network's weight parameters;
[0042] S2: Forward propagation: Input a batch of preprocessed training images into the network to obtain prediction results;
[0043] S3: Loss Calculation: Based on the prediction results and the true labels, calculate the classification loss, localization loss, and Gaussian weighted chamfer distance loss;
[0044] S4: Backpropagation and parameter update: Using optimization algorithms, calculate the gradient based on the loss and update the network parameters;
[0045] S5: Iterative optimization: Repeat steps S2 to S4 until the preset training rounds or performance indicators are reached.
[0046] Furthermore, the Gaussian-weighted chamfer distance loss includes the following calculation steps:
[0047] S1: Contour Point Set Generation: For the predicted and true rotated bounding boxes, a contour point set is generated using the ellipse parametric equation. The specific calculation process is as follows:
[0048] ;
[0049] ;
[0050] in, Represents the coordinates of the base point set; Represents the coordinates of the contour point set; The coordinates of the center of the rotating frame are represented; w and h represent the width and height of the rotating frame, respectively. This represents the angle of the i-th sampling point; This represents the rotation matrix; N represents the number of contour points;
[0051] S2: Chamfer Distance Calculation: Based on the contour point set representation, chamfer distance is used to measure the geometric similarity between the true and predicted rotated boxes.
[0052] ;
[0053] ;
[0054] ;
[0055] in, Represents Euclidean distance; Point To the prediction point set Distance to the nearest point in the middle; Point Distance to the nearest point in the real point set P;
[0056] S3: Angle-Aware Gaussian Weighted Scaling: Calculates the angle difference between the predicted bounding box and the ground truth bounding box, and uses the processed angle difference to calculate the Gaussian weights.
[0057] = ;
[0058] ;
[0059] ;
[0060] in, Indicates the original angle difference; This represents the angle difference after periodic normalization; Indicates Gaussian weights; and These represent the predicted angle and the actual angle, respectively. The standard deviation represents the Gaussian distribution; Represents the arctangent function in the four quadrants;
[0061] S4: Overall Loss Calculation: Combine the chamfer distance with Gaussian weights to calculate the overall Gaussian weighted chamfer distance loss:
[0062] ;
[0063] in, This represents the Gaussian-weighted chamfer distance loss; f This represents a nonlinear mapping function.
[0064] Furthermore, the preprocessing procedure includes the following steps:
[0065] S1: Load image and annotation files;
[0066] S2: Scale the image to a preset size while maintaining the original aspect ratio;
[0067] S3: Data augmentation through random horizontal flipping;
[0068] S4: Normalize the image using the mean and standard deviation of the ImageNet standard;
[0069] S5: Padded to an integer multiple of a preset number and converted to the tensor format required for model training.
[0070] Furthermore, the specific method for target detection includes the following steps:
[0071] S1: Multi-stage feature extraction: The input remote sensing image is fed into the ResNet-50 backbone network to obtain feature representations at different scales;
[0072] S2: Cross-scale dense fusion: Input multi-scale features into a cross-scale dense fusion feature pyramid network to generate high-quality multi-scale fusion feature maps;
[0073] S3: Dynamic Direction Awareness Enhancement: Input multi-scale fused features into the dynamic direction awareness attention module to make the features accurately match the target direction;
[0074] S4: Detector prediction: The enhanced features are fed into the detector network, and the output includes the detection results containing the rotating target category, position coordinates and angle.
[0075] The beneficial effects of this invention are:
[0076] This invention effectively solves the problems of insufficient multi-scale feature fusion, inadequate orientation awareness, and training instability caused by angle periodicity in remote sensing rotating target detection by synergistic optimization of three modules: cross-scale dense fusion, dynamic orientation awareness attention, and Gaussian weighted chamfer distance loss. It significantly improves the detection accuracy and robustness of remote sensing rotating targets.
[0077] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0078] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0079] Figure 1 This is a diagram of the overall architecture of the present invention.
[0080] Figure 2 This is a schematic diagram of the structure of a cross-scale densely fused feature pyramid network.
[0081] Figure 3 This is a schematic diagram of the dynamic orientation-aware attention module.
[0082] Figure 4 This is a schematic diagram illustrating the calculation of Gaussian weighted chamfer distance loss.
[0083] Figure 5 This is a schematic diagram of some detection results of the present invention on the DOTA dataset. Detailed Implementation
[0084] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0085] like Figure 1 As shown, this embodiment of the invention provides a remote sensing rotating target detection method based on dynamic direction-aware attention, including the following steps:
[0086] S1: Obtain the remote sensing image dataset and perform preprocessing;
[0087] In this embodiment, the dataset used is the DOTAv1.0 dataset and the HRSC2016 dataset.
[0088] DOTAv1.0 is a large dataset specifically designed for remote sensing target detection, encompassing 2806 images and 188,282 instances. It includes 15 categories: aircraft, baseball fields, bridges, athletic fields, small vehicles, large vehicles, ships, tennis courts, basketball courts, oil tanks, football fields, roundabouts, ports, swimming pools, and helicopters. The training, validation, and test sets contain 1411, 458, and 937 images, respectively, with image resolutions ranging from 800×800 to 4000×4000. The images in this dataset were acquired from different sensor platforms, exhibiting significant differences in resolution, a rich diversity of target categories, varying scales and angles, a large number of small targets, and dense arrangement of targets. These characteristics provide solid data support for remote sensing target detection, but also present significant challenges to accurate detection.
[0089] HRSC2016, a remote sensing dataset for ship inspection, contains 1061 aerial images ranging in size from 300×300 to 1500×900. The training, validation, and test sets contain 436, 181, and 444 images, respectively. This dataset covers diverse geographical environments and lighting conditions, with target backgrounds exhibiting variations in interference levels, random orientation, dense arrangement, and cloud obstruction, providing data support for inspection work in complex environments.
[0090] In this embodiment, the dataset preprocessing process is as follows:
[0091] S1.1: Load the image and annotation file to obtain the original remote sensing image and its corresponding rotated bounding box annotation information;
[0092] S1.2: Scale the image to a preset size while maintaining the original aspect ratio to prevent distortion;
[0093] For the DOTAv1.0 dataset, the original images are cropped into 1024×1024 pixel image blocks while maintaining the original aspect ratio to prevent distortion. For the HRSC2016 dataset, the long side of the image is scaled to 800 pixels, and the short side is adaptively scaled according to the original aspect ratio. During training, the images are uniformly padded to a fixed input size of 1024×1024 pixels, maintaining the original aspect ratio throughout.
[0094] S1.3: Data augmentation is performed through operations such as random horizontal flipping to increase the diversity of training samples;
[0095] S1.4: Normalize the image using the mean and standard deviation of the ImageNet standard;
[0096] S1.5: Pad the image to an integer multiple of a preset number and convert it to the tensor format required for model training.
[0097] S2: Construct the detection network framework, including a backbone network, a neck network, and a Dynamic Orientation Aware Attention (DOAA) module; among which, the backbone network is ResNet-50, and the neck network is a cross-scale dense fusion feature pyramid network (CD-FPN).
[0098] The specific steps for constructing the detection network framework in step S2 are as follows:
[0099] S2.1: Constructing the ResNet-50 backbone network: Extracting multi-scale features from the input image and outputting feature maps at different resolutions. In this process, the spatial resolution of the feature maps at each stage is halved sequentially, while the number of channels increases sequentially.
[0100] S2.2: Construct a cross-scale densely fused feature pyramid network (CD-FPN): Receive the output features of the ResNet-50 backbone network at different stages, achieve deep fusion of full-scale features through dense connections, and generate multi-scale fused feature maps {P2, P3, P4, P5, P6}.
[0101] like Figure 2 As shown, the specific construction steps of the cross-scale densely fused feature pyramid network (CD-FPN) are as follows:
[0102] S2.2.1: Channel unification: The original features extracted by the backbone network { By using 1×1 convolution to unify the number of channels in each layer of features, the foundation for direct fusion of cross-scale features is laid, reducing computational redundancy in subsequent fusion.
[0103] S2.2.2: Dense Fusion: Based on channel unification, features of each layer are upsampled and fused layer by layer. Lower-level features are upsampled to the size of the i-th layer and then accumulated to achieve dense connections. This allows each layer's feature Lᵢ to fuse with all lower-level features, thereby achieving deep fusion of detailed and semantic information. The specific fusion process is defined as follows:
[0104] ;
[0105] in, This represents the dense fusion feature of the i-th layer; This represents element-wise addition. This indicates an upsampling interpolation operation;
[0106] S2.2.3: Feature Distillation: By learning adaptive attention weights, the densely fused feature Fᵢ is refined to select feature components that are discriminative for rotating target detection. Specifically, firstly, local feature extraction is performed on the densely fused feature Fᵢ using a 3×3 convolution to enhance the local correlation of features. Then, a 1×1 convolution is used to adjust the number of feature channels to reduce computational complexity. Next, a Sigmoid function is used to generate attention weights with values ranging from 0 to 1. Finally, the attention weights are weighted pixel-by-pixel with the processed features to enhance effective features and suppress redundant information. The specific process is as follows:
[0107] ;
[0108] ;
[0109] ;
[0110] Among them, D i This represents the features after local feature extraction; Indicates attention weight; This represents the Sigmoid function, used to generate attention weights; Represents a 1×1 convolution; C 3x3 This represents a 3x3 convolution; Indicates the normalization layer; This represents the modified linear unit activation function; This indicates the refining characteristics of the i-th layer after distillation; This represents element-wise multiplication.
[0111] S2.2.4: Secondary Fusion and Expansion: The refined feature Pᵢ is upsampled layer by layer and added element by element to achieve secondary fusion of semantic and detail information, resulting in the final dense cross-scale fused feature map {P2, P3, P4, P5}. For large-scale remote sensing targets (such as stadiums, large bridges, etc.), a larger-scale feature layer is required, so this invention outputs features at the highest layer. Max pooling is performed to obtain a feature map with a smaller spatial size but a larger receptive field, making it suitable for detecting larger-scale targets. The specific process is defined as follows:
[0112] ;
[0113] in, This indicates the max pooling operation. CD-FPN generates multi-scale features with both high-level semantic information and low-level detailed information by combining dense cross-scale fusion with feature distillation and refinement. At the same time, it reduces redundant information and noise in the fusion process, thereby obtaining high-quality multi-scale fused features and improving detection accuracy.
[0114] S2.3: Constructing a Dynamic Direction-Aware Attention Module (DOAA): On the multi-scale feature map output by the neck network, rotating convolution kernels are dynamically generated with the target angle information as explicit guidance to enhance the RoI features and make the features accurately match the target direction.
[0115] like Figure 3 As shown, the specific construction steps of the Dynamic Direction Aware Attention Module (DOAA) are as follows:
[0116] S2.3.1: Angle Encoding: An angle encoder is used to model the spatial distribution of orientation information, generating adaptive angle features that can guide the data-driven dynamic convolution kernel. The angle encoder first extracts local orientation features using 3×3 convolution, then performs batch normalization and activation functions, and finally completes the mapping from feature dimensions to angle space through 1×1 convolution. The specific process is as follows:
[0117] ;
[0118] Among them, F angle Indicates angular features; This indicates a batch normalization operation; This represents the modified linear unit activation function; X represents the input feature;
[0119] S2.3.2: Convolution Kernel Rotation: A depthwise separable 3×3 convolution kernel is used as the base convolution kernel K, with each channel having an independent convolution kernel. A rotation matrix is then used to rotate the kernel. Angle information extracted by the angle encoder Combined with the basic convolutional kernel K, a rotation operation is performed on the basic convolutional kernel to obtain the rotated convolutional kernel. Simultaneously, bilinear interpolation is used to achieve smooth rotation, and the weights of each spatial location of the convolution kernel after rotation are calculated. The specific process is as follows:
[0120] ;
[0121] ;
[0122] in, This represents the bilinear interpolation operation; Represents the rotated convolution kernel; K represents the basic convolution kernel; R Represents the rotation matrix; W represents the interpolated convolution kernel weights;
[0123] S2.3.3: Direction-aware feature extraction: The original feature X is reshaped for batch processing, and grouped convolution is used to calculate the direction-aware features. To implement convolution operations using different rotation kernels at each spatial location, the specific process is as follows:
[0124] ;
[0125] in, This indicates a grouped convolution operation; Indicates a reshaping operation;
[0126] S2.3.4: Residual Fusion: For Direction-Aware Enhancement Features Then, perform a residual connection between it and the original feature X. The specific process is as follows:
[0127] ;
[0128] Where Y represents the final output feature; This represents a learnable scaling parameter that adaptively adjusts the injection intensity of directional information as training progresses. The value is automatically adjusted based on the total loss of the final training, eventually converging to the optimal value that minimizes the overall loss.
[0129] S2.4: Constructing the target detection head: The input end is connected to the output end of the dynamic direction-aware attention module, and is used to predict the target category, bounding box position and rotation angle based on the enhanced multi-scale features.
[0130] S3: The network is trained using the preprocessed remote sensing image as input and combined with Gaussian weighted chamfer distance loss;
[0131] The specific method for training the network is as follows:
[0132] S3.1: Network Initialization: Initialize the weight parameters of the network, using ImageNet pre-trained weights to initialize the backbone network;
[0133] S3.2: Forward Propagation: A batch of preprocessed training images are input into the network and processed sequentially through the ResNet-50 backbone network, the cross-scale dense fusion feature pyramid network, the dynamic orientation-aware attention module, and the target detection head to obtain the prediction results;
[0134] S3.3: Loss Calculation: Based on the prediction results and the true labels of the image annotations, calculate the classification loss, localization loss, and Gaussian weighted chamfer distance loss;
[0135] like Figure 4 As shown, the specific calculation steps for the Gaussian weighted chamfer distance loss (GWCD) are as follows:
[0136] S3.3.1: Contour point set generation: For the predicted rotated box and real rotating frame In the local coordinate system, the base point set is generated using the ellipse parametric equation. After rotation matrix After rotation and translation to the center, N contour points are obtained respectively. This constitutes the predicted contour point set P and the true contour point set Q. The specific calculation process is as follows:
[0137] ;
[0138] ;
[0139] in, Represents the coordinates of the base point set; Represents the coordinates of the contour point set; The coordinates of the center of the rotating frame are represented; w and h represent the width and height of the rotating frame, respectively. This represents the angle of the i-th sampling point; represents the rotation matrix; N represents the number of contour points.
[0140] S3.3.2: Chamfer Distance Calculation: Based on the contour point set representation, chamfer distance is used to measure the geometric similarity between the ground truth rotated box and the predicted rotated box. The chamfer distance between the ground truth point set P and the predicted point set Q is defined as follows:
[0141] ;
[0142] ;
[0143] ;
[0144] in, Represents Euclidean distance; Point To the prediction point set Distance to the nearest point in the middle; Point Distance to the nearest point in the real point set P.
[0145] S3.3.3: Angle-aware Gaussian weighting: First, calculate the angle difference between the predicted bounding box and the ground truth bounding box. Then, the angle difference is periodically normalized to obtain the normalized angle difference. The calculation process for the angle difference is as follows:
[0146] = ;
[0147] ;
[0148] in, Indicates the original angle difference; This represents the angle difference after periodic normalization; and These represent the predicted angle and the actual angle, respectively. This represents the arctangent function in the four quadrants, with periodic normalization applied to the angle difference;
[0149] The processed angle difference is used to calculate the Gaussian weight, providing a continuously differentiable penalty mechanism for the angle difference:
[0150] ;
[0151] in, Indicates Gaussian weights; The standard deviation representing the Gaussian distribution, controlling the rate of weight decay, is selected in this invention. =1.0 to balance the sensitivity and stability of the loss.
[0152] S3.3.4: Overall Loss Calculation: Combine the chamfer distances of the ground truth and predicted bounding boxes with Gaussian weights to calculate the overall Gaussian weighted chamfer distance loss:
[0153] ;
[0154] in, This represents the Gaussian-weighted chamfer distance loss; f This represents a nonlinear mapping function.
[0155] By combining chamfer distance and Gaussian weights, the GWCD loss avoids the subjectivity and discontinuity of traditional fixed IoU threshold settings, enabling the model to learn smooth and continuous angle regressions, while mitigating the problem of angle periodicity through geometric representation.
[0156] S3.4: Backpropagation and parameter update: Using the optimization algorithm, calculate the gradient based on the loss and update all trainable parameters of the network;
[0157] S3.5: Iterative optimization: Repeat steps S3.2 to S3.4 until the preset training rounds or performance indicators are reached.
[0158] S4: Input the remote sensing image to be detected into the trained network. After multi-stage feature extraction, cross-scale dense fusion, dynamic orientation perception enhancement and detection head prediction, the output includes the detection result containing the rotating target category, position coordinates and angle.
[0159] In this embodiment, the steps for constructing a remote sensing rotating target detection network based on dynamic orientation awareness and attention are as follows:
[0160] S4.1: Multi-stage feature extraction: The input remote sensing image is fed into the ResNet-50 backbone network, and the image features are extracted layer by layer through multi-stage convolution operations to obtain feature representations at different scales {C2, C3, C4, C5}.
[0161] S4.2: Cross-scale dense fusion: The multi-scale features output from the backbone network are input into the cross-scale dense fusion feature pyramid network. Through dense connections, the full-scale features are deeply fused, and an attention distillation mechanism is introduced to adaptively filter redundant information, generating high-quality multi-scale fusion feature maps {P2, P3, P4, P5, P6}.
[0162] S4.3: Dynamic orientation awareness enhancement: Multi-scale fused features are input into the dynamic orientation awareness attention module. With the target angle information as explicit guidance, rotating convolution kernels are dynamically generated to enhance the features, so that the features are accurately matched with the target orientation, thereby capturing the orientation structure information of the rotating target.
[0163] S4.4: Detection Head Prediction: The features enhanced by the dynamic orientation awareness attention module are fed into the detection head network to jointly predict the target category, position parameters, and rotation angle. Based on the response values of each spatial position in the feature map, the detection head regresses the corresponding target bounding box position and rotation angle, and outputs the target category and confidence score corresponding to each bounding box. Finally, the detection result containing the rotating target category information, spatial position, rotation angle, and detection confidence is obtained.
[0164] To verify the effectiveness of the design module, this invention further conducted ablation experiments:
[0165] As shown in Table 1, to verify the effectiveness of the three modules, the baseline model's mAP was 73.01% without any modules. When only the DOAA module was introduced, the mAP improved by 0.88%, demonstrating that the explicit angle guidance and dynamic rotational convolution kernel effectively enhanced the feature's directional sensitivity and alleviated the mismatch between the fixed receptive field and the target direction. Replacing the baseline model's FPN with the CD-FPN designed in this invention improved the mAP by 1.20%, verifying the effectiveness of the dense cross-scale fusion and feature distillation mechanism in strengthening semantic-detail information interaction and suppressing fusion noise, significantly improving the feature representation of multi-scale targets. The GWCD loss was used to replace the original smooth L... After applying the loss function, the mAP improved by 1.39%, indicating that the loss function, through geometric point set measurement and angle-aware Gaussian weighting, not only alleviated the angle periodicity problem but also enhanced the regression sensitivity to orientation deviation, thereby improving training stability and regression accuracy. When the modules were used in pairs, they also achieved certain gains compared to single modules. After the three modules were integrated, the model mAP reached 76.40%, which is 3.39% higher than the baseline and higher than the independent contribution of each module. This shows that CD-FPN, DOAA, and GWCD form effective complementarity and synergistic enhancement in feature extraction, orientation awareness, and loss optimization, and jointly construct a more robust rotating target detection framework.
[0166] ;
[0167] As shown in Table 2, in order to explore the weighting factors in the DOAA module To investigate the impact of initial values on experimental results, ablation experiments with different weight values were designed on the DOTA dataset. To ensure gradient stability during the initial training phase and allow the network to adaptively learn from a state of "unbiased" orientation information, this invention follows a robust initialization principle, selecting 0.1 as the baseline candidate value. Simultaneously, to systematically evaluate the impact of the initial fusion strength on model performance, comparative values were selected above and below the baseline candidate value, adjusting the injection strength of orientation information from weak to strong, comprehensively verifying the sensitivity of weight factors to the fusion strength of orientation features. When γ=0.10, the model achieves an mAP of 73.89% on the DOTA dataset, reaching the optimal detection performance. When γ=0.01, the mAP is only 69.31%, indicating a severe deficiency in directional information injection, which cannot compensate for the adaptive shortcomings of fixed convolutional kernels to changes in target orientation. When γ=0.05, the mAP increases to 72.63%, but is still lower than the optimal value, indicating that the directional feature fusion strength is still insufficient. When γ exceeds 0.10, the performance begins to decline, with the mAP dropping to 73.17% at γ=0.15 and further to 72.45% at γ=0.20. This demonstrates that overemphasizing directional features can cause the model to ignore key semantic and detailed information in the original features, leading to overfitting. This result verifies that the gradient value set in the experiment can accurately capture the optimal working range of the weight factors. γ=0.1 is the optimal initial value that balances the strength of directional information injection and the preservation of original features, avoiding both the problem of insufficient directional information and the drawback of excessive dominance of directional features.
[0168] ;
[0169] As shown in Table 3, in order to investigate the Gaussian standard deviation σ in GWCD loss angle To assess the impact on the results, a comparative experiment was designed on the DOTA dataset. When σ... angle When σ = 1.0, the model achieves an mAP of 74.40% on the DOTA dataset, yielding the best detection performance; when σ = 1.0, the model achieves the best detection performance. angle When σ = 0.8, the weight decay rate is too fast, and the penalty for angle deviation is too strict, causing mAP to drop to 70.77%; angle When σ = 0.9, mAP increases to 73.35%, gradually approaching the optimal value, indicating that the penalty for angle deviation is becoming reasonable; while when σ angle Performance drops significantly beyond version 1.0, σ angle When σ = 1.1, mAP drops to 70.73%, σ angleWhen σ = 1.2, the error rate drops sharply to 54.81%, highlighting that excessively slow weight decay leads to a severely insufficient sensitivity of the loss function to angle deviation, resulting in a significant decrease in the model's angle regression accuracy. Therefore, this gradient value can effectively select the optimal parameters that balance angle regression accuracy and training stability, and at σ... angle A value of 1.0 can better balance the sensitivity and stability of GWCD loss.
[0170] ;
[0171] As shown in Table 4, the proposed method achieves an mAP of 76.40%, a 3.39% improvement over the baseline model (73.01%), and outperforms mainstream algorithms such as ReDet (76.25%) and O-RepPoints (75.97%), validating the overall superiority of the proposed method. In the DOTA dataset, among the 15 target categories, the proposed method achieves state-of-the-art performance in 8 categories: aircraft, baseball field, track and field, small vehicles, roundabout, swimming pool, and helicopter. This result validates the superiority of the proposed method in multi-class, multi-scale remote sensing target detection, particularly demonstrating a significant improvement in detection accuracy for small-scale and low-sample targets.
[0172] ;
[0173] ;
[0174] Furthermore, to verify the generalization ability of the method, experiments were conducted on the HRSC2016 dataset to validate the model's performance. The results are shown in Table 5. As shown in Table 5, the method of this invention achieved a mAP of 90.60%, a 0.4% improvement compared to the baseline model (90.20%), and outperformed GWD and S... 2 The generalization ability of the proposed method was verified by mainstream algorithms such as ANet. Although some of the comparison algorithms used deeper backbone networks (ResNet-101), the proposed method still achieved the best results.
[0175] The present invention also includes a visualization experiment of the detection results. Figure 5 The results of the proposed method on the DOTAv1.0 test set are visualized, further demonstrating that the model can accurately detect targets at different scales and angles, and maintain a low false negative rate even in scenes with densely packed targets and complex backgrounds.
[0176] Although this invention addresses core issues in remote sensing rotating target detection, such as insufficient multi-scale feature fusion, inadequate orientation awareness, and training instability caused by angle periodicity, it effectively improves the detection accuracy and robustness of remote sensing rotating targets through the collaborative optimization of three core modules: CD-FPN, DOAA, and GWCD, achieving state-of-the-art performance on both the DOTA and HRSC2016 datasets. However, while the DOAA module can adaptively adjust the orientation of the prediction box, it cannot achieve true self-adaptation; moreover, experimental results show insufficient detection accuracy for categories with large aspect ratios, such as large vehicles and ports. Therefore, future work will explore fully adaptive adjustment of the detection box angle based on target orientation information; simultaneously, it will optimize the model's feature discrimination ability for targets with large aspect ratios and dense clusters.
[0177] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A remote sensing rotating target detection method based on dynamic direction-aware attention, characterized in that, Includes the following steps: S1: Obtain the remote sensing image dataset and perform preprocessing; S2: Construct a detection network framework, including a backbone network, a neck network, and a dynamic orientation-aware attention module; the backbone network is ResNet-50, and the neck network is a cross-scale densely fused feature pyramid network. S3: The network is trained using the preprocessed remote sensing image as input and combined with Gaussian weighted chamfer distance loss; S4: Input the remote sensing image to be detected into the trained network. After multi-stage feature extraction, cross-scale dense fusion, dynamic orientation perception enhancement and detection head prediction, the output includes the detection result containing the rotating target category, position coordinates and angle.
2. The remote sensing rotating target detection method based on dynamic direction-aware attention according to claim 1, characterized in that, The construction of the detection network framework in step S2 includes the following steps: S1: Constructing the ResNet-50 backbone network: A four-stage hierarchical architecture is used to extract multi-scale features from the input image and output feature maps of different resolutions. S2: Construct a cross-scale densely fused feature pyramid network: Receive the output features of different stages of the ResNet-50 backbone network, and achieve deep fusion of full-scale features through dense connections to generate a multi-scale fused feature map; S3: Construct a dynamic orientation-aware attention module: Using target angle information as explicit guidance, dynamically generate rotating convolution kernels to enhance RoI features; S4: Construct the target detection head: predict the target category, bounding box position and rotation angle based on the enhanced multi-scale features.
3. The remote sensing rotating target detection method based on dynamic direction-aware attention according to claim 2, characterized in that, The construction of the cross-scale dense fusion feature pyramid network in step S2 includes the following steps: S1: Channel unification: The number of channels in each layer of features is unified through 1×1 convolution; S2: Dense Fusion: Features from each layer are upsampled and fused layer by layer. Features from lower layers are upsampled to the size of the i-th layer and then accumulated to achieve dense connections. The specific fusion process is as follows: ; in, L represents the dense fusion feature of the i-th layer; i Represents the original features of the i-th layer; This represents element-wise addition. This indicates an upsampling interpolation operation; S3: Feature Distillation: Refining densely fused features by learning adaptive attention weights. The specific process is as follows: ; ; ; Among them, D i This represents the features after local feature extraction; Indicates attention weight; This represents the Sigmoid function, used to generate attention weights; Represents a 1×1 convolution; C 3x3 This represents a 3x3 convolution; Indicates the normalization layer; This represents the modified linear unit activation function; Indicates a refined characteristic; This represents element-wise multiplication. S4: Secondary fusion and expansion: The refined features are upsampled layer by layer and added element by element. Max pooling is performed on the output features of the highest layer to adapt to the detection needs of larger scale targets.
4. The remote sensing rotating target detection method based on dynamic direction-aware attention according to claim 2, characterized in that, The construction of the dynamic orientation-aware attention module in step S3 includes the following steps: S1: Angle Encoding: An angle encoder is used to model the spatial distribution of orientation information and generate adaptive angle features. The specific process is as follows: ; Among them, F angle Indicates angular features; This indicates a batch normalization operation; This represents the modified linear unit activation function; X represents the input feature; S2: Convolutional Kernel Rotation: By combining the angle information with the basic convolutional kernel through a rotation matrix, the rotation operation on the basic convolutional kernel is completed. The specific process is as follows: ; ; in, This represents the bilinear interpolation operation; Represents the rotated convolution kernel; K represents the basic convolution kernel; R Represents the rotation matrix; W represents the interpolated convolution kernel weights; S3: Orientation-Aware Feature Extraction: Orientation-aware features are calculated using grouped convolution, implementing convolution operations with different rotation kernels for each spatial location. The specific process is as follows: ; in, This indicates a grouped convolution operation; Indicates a reshaping operation; S4: Residual Fusion: The orientation-aware enhanced features are residually concatenated with the original features. The specific process is as follows: ; Where Y represents the final output feature; This represents the learnable scaling parameters.
5. The remote sensing rotating target detection method based on dynamic direction perception and attention according to claim 1, characterized in that, The training of the network in step S3 includes the following steps: S1: Network Initialization: Initialize the network's weight parameters; S2: Forward propagation: Input a batch of preprocessed training images into the network to obtain prediction results; S3: Loss Calculation: Based on the prediction results and the true labels, calculate the classification loss, localization loss, and Gaussian weighted chamfer distance loss; S4: Backpropagation and parameter update: Using optimization algorithms, calculate the gradient based on the loss and update the network parameters; S5: Iterative optimization: Repeat steps S2 to S4 until the preset training rounds or performance indicators are reached.
6. The remote sensing rotating target detection method based on dynamic direction-aware attention according to claim 5, characterized in that, The Gaussian-weighted chamfer distance loss in step S3 includes the following calculation steps: S1: Contour Point Set Generation: For the predicted and true rotated bounding boxes, a contour point set is generated using the ellipse parametric equation. The specific calculation process is as follows: ; ; in, Represents the coordinates of the base point set; Represents the coordinates of the contour point set; The coordinates of the center of the rotating frame are represented; w and h represent the width and height of the rotating frame, respectively. This represents the angle of the i-th sampling point; This represents the rotation matrix; N represents the number of contour points; S2: Chamfer Distance Calculation: Based on the contour point set representation, chamfer distance is used to measure the geometric similarity between the true and predicted rotated boxes. ; ; ; in, Represents Euclidean distance; Point To the prediction point set Distance to the nearest point in the middle; Point Distance to the nearest point in the real point set P; S3: Angle-Aware Gaussian Weighted Scaling: Calculates the angle difference between the predicted bounding box and the ground truth bounding box, and uses the processed angle difference to calculate the Gaussian weights. = ; ; ; in, Indicates the original angle difference; This represents the angle difference after periodic normalization; Indicates Gaussian weights; and These represent the predicted angle and the actual angle, respectively. The standard deviation represents the Gaussian distribution; Represents the arctangent function in the four quadrants; S4: Overall Loss Calculation: Combine the chamfer distance with Gaussian weights to calculate the overall Gaussian weighted chamfer distance loss: ; in, This represents the Gaussian-weighted chamfer distance loss; f This represents a nonlinear mapping function.
7. The remote sensing rotating target detection method based on dynamic direction-aware attention according to claim 1, characterized in that, The preprocessing procedure in step S1 includes the following steps: S1: Load image and annotation files; S2: Scale the image to a preset size while maintaining the original aspect ratio; S3: Data augmentation through random horizontal flipping; S4: Normalize the image using the mean and standard deviation of the ImageNet standard; S5: Padded to an integer multiple of a preset number and converted to the tensor format required for model training.
8. The remote sensing rotating target detection method based on dynamic direction-aware attention according to claim 1, characterized in that, The specific method for target detection in step S4 includes the following steps: S1: Multi-stage feature extraction: The input remote sensing image is fed into the ResNet-50 backbone network to obtain feature representations at different scales; S2: Cross-scale dense fusion: Input multi-scale features into a cross-scale dense fusion feature pyramid network to generate high-quality multi-scale fusion feature maps; S3: Dynamic Direction Awareness Enhancement: Input multi-scale fused features into the dynamic direction awareness attention module to make the features accurately match the target direction; S4: Detector prediction: The enhanced features are fed into the detector network, and the output includes the detection results containing the rotating target category, position coordinates and angle.