Transform-based rotating frame remote sensing image target detection method
By constructing the Transformer-based STD-t framework, parameter prediction and cascaded activation mask guidance are decoupled, solving the problems of parameter coupling interference and background feature redundancy in remote sensing image target detection. This achieves high-precision, low-false-detection rotating target detection, improving the model's adaptability and generalization ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing remote sensing image target detection methods suffer from problems such as parameter coupling interference, background feature redundancy, and insufficient global correlation capture when dealing with rotating targets, resulting in high false negative rates, high false positive rates, and poor generalization.
We employ the Transformer-based two-stage rotating bounding box detection framework STD-t, which separates the prediction of position, size, and angle parameters of the rotating bounding box by decoupling parameter prediction and cascaded activation mask guidance, combined with the ViT backbone network and Transformer block TBAM, to enhance foreground feature extraction. Furthermore, we improve the model's adaptability through multi-dataset training and data augmentation.
It improves the detection accuracy and generalization ability of rotating targets in remote sensing images, reduces the false negative rate, and enhances the detection performance of the model in complex backgrounds and multi-target overlapping scenarios.
Smart Images

Figure CN121661387A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing image processing and computer vision technology, and in particular relates to a target detection method for remote sensing images based on a Transformer-based rotating frame. Background Technology
[0002] Target detection in remote sensing images is a core technology in fields such as land monitoring, traffic control, and maritime supervision. Its key lies in accurately locating targets within images and identifying their categories. Unlike natural scene images, remote sensing images present three significant challenges: First, target orientation is highly random, with targets such as aircraft and ships often distributed at arbitrary angles; second, the background environment is complex, containing interference information such as clouds, terrain, and buildings; and third, targets are densely packed with significant differences in aspect ratio, making it easy for traditional horizontal bounding boxes to cover redundant backgrounds, leading to increased false detection rates when multiple targets overlap and insufficient accuracy in locating high aspect ratio targets.
[0003] While existing methods for detecting rotating targets (such as RetinaNet) have improved upon this by introducing rotating bounding boxes, they still have several drawbacks: First, most methods employ a "parameter-coupled prediction" model, simultaneously estimating the position, size, and angle of the rotating box using a single prediction head. Interference between parameters can easily lead to discontinuous prediction results when the angle crosses periodic intervals, resulting in high rates of missed and false detections. Second, traditional methods often rely on Convolutional Neural Networks (CNNs) to construct the backbone network. The local receptive field characteristics of CNNs make it difficult to capture the global spatial relationships of remotely sensed targets, and their feature extraction capabilities are insufficient when facing complex backgrounds. Third, some methods fail to optimize training strategies for the diversity of remotely sensed images. Training on a single dataset results in poor model generalization, making it difficult to adapt to remotely sensed images of different resolutions and scenes. Summary of the Invention
[0004] The purpose of this invention is to provide a target detection method for remote sensing images with rotating frames based on Transformer. By constructing a technical framework of "parameter decoupling prediction + cascaded activation mask guidance + two-stage training", it solves the problems of parameter coupling interference, background feature redundancy and insufficient global correlation capture in traditional methods, and achieves high-precision, low false detection and strong generalization detection of rotating targets in remote sensing images.
[0005] This application provides a Transformer-based method for target detection in remote sensing images with a rotated bounding box, comprising the following steps:
[0006] S1, preprocess the multi-remote sensing image dataset to obtain the preprocessed image;
[0007] S2, construct a two-stage rotating box detection framework STD-t based on Transformer. The framework includes a backbone network, a region proposal network, a feature enhancement module, and a decoupling parameter prediction module from the input end to the output end.
[0008] The backbone network is the ViT visual converter series model. The decoupled parameter prediction module is used to separate the prediction tasks of position, size and angle parameters of the rotating bounding box. The feature enhancement Transformer block TBAM with activation mask is used to integrate the activation mask into the Transformer self-attention mechanism to enhance foreground feature extraction.
[0009] S3, First stage training: The region proposal network is trained using a class-agnostic method, the learning rate of the classification head is frozen, and the object classification loss and bounding box regression loss are used as optimization objectives to generate candidate regions covering potential targets; wherein, the object classification loss is calculated using the cross-entropy loss function, and the bounding box regression loss is calculated using the Smooth L1 loss function.
[0010] S4, Second stage training: Load the network weights obtained from the first stage training, fine-tune the entire network of STD-t, unfreeze the classification head, complete the refined classification of the target and the rotation bounding box regression based on the candidate regions, and determine the target category and precise rotation bounding box parameters for each candidate region.
[0011] S5 takes the remote sensing image to be detected as input to the trained STD-t and outputs the detection results, which include the target category, the coordinates of the rotated bounding box, and the confidence level.
[0012] Preferably, the preprocessing in step S1 includes:
[0013] Dataset Selection: Several typical remote sensing target detection datasets were selected, including DOTA-v1.0, HRSC2016, FAIR1M, and SODA-A, covering different scenes, target types, and resolutions. Among them, DOTA-v1.0 contains 2806 images, 15 target classes (aircraft, ships, etc.), and 188282 instances; HRSC2016 focuses on ship detection, containing 1680 images and 2976 ship instances; FAIR1M provides fine-grained annotations; SODA-A covers remote sensing images from multiple scenes. Together, these four datasets cover different resolutions, target types, and scene environments.
[0014] Image cropping: The remote sensing image is cropped into 1024×1024 pixel image blocks with an overlap of 200 pixels between adjacent image blocks; to avoid cropping that could break the target.
[0015] Scale adjustment: The cropped image patch is scaled up or down by factors including 0.5x, 1.0x, and 1.5x; to cover scale differences of targets in the remote sensing image;
[0016] Data augmentation: Perform random rotation, horizontal flipping, or vertical flipping operations on scaled image patches to expand the diversity of training samples and suppress model overfitting.
[0017] Preferably, the input terminal receives preprocessed remote sensing image data, including 1024×1024 pixel image blocks (after cropping from a large dataset) and images normalized to a maximum side length of 800 pixels (small dataset). The image format is RGB three-channel, and the pixel values have been normalized to the [0,1] range.
[0018] The backbone network adopts the Vision Transformer (ViT) series model to replace the traditional Convolutional Neural Network (CNN) backbone network. It utilizes the global self-attention mechanism of the ViT series model to capture the global spatial correlation of the target. ViT-small is preferred as the basic backbone, and the pre-trained weights adopt the self-supervised pre-trained weights of the Masked Autoencoder (MAE).
[0019] The classification head is the core component in the model responsible for determining the target category. It adopts a multilayer perceptron (MLP) structure, including an input layer, a hidden layer with ReLU activation function, and an output layer with Softmax activation function. The classification head is used throughout the two-stage training process. In the first stage of training, its learning rate is frozen and it is only used for object recognition (distinguishing whether a region contains an object). In the second stage of training, the learning rate is unfrozen and it is used to accurately determine the specific category of the target (such as airplane, ship, etc.).
[0020] Region Proposal Network: Used to generate candidate regions in the first stage. It adopts a class-agnostic strategy, only judging whether the region contains an object, without involving category recognition, thus simplifying the training objective.
[0021] Decoupled parameter prediction module: The parameter prediction task of the rotated bounding box is separated into three independent branches to avoid parameter coupling interference.
[0022] Preferably, the decoupling parameter prediction module in step S2 includes three independent branches:
[0023] Location prediction branch: Outputs the center coordinates of the rotated bounding box using a multilayer perceptron (MLP) and the ReLU activation function. ;
[0024] Size prediction branch: Outputs the width of the rotated bounding box using a multilayer perceptron (MLP) and the ReLU activation function. and height ;
[0025] Angle prediction branch: Outputs the rotation angle of the rotated bounding box using a multilayer perceptron (MLP) and a sigmoid activation function. The angle The range of values is ;
[0026] The parameters of the three branches are optimized independently, and the parameter prediction order is position, angle, and size; ensuring that the target center is located first, then the direction is matched, and finally the size is optimized.
[0027] Preferably, the cascaded activation mask module generates a binary mask with foreground regions set to 1 and background regions set to 0, achieving separation of foreground features from the background. The generation steps include:
[0028] S21, Define basic parameters: Define the center coordinates of the suggestion box. ,width and height And the bounding box parameters predicted by STD-t, including center point offset. Scaling factors for width and height and rotation angle ;
[0029] S22, the formula for calculating the parameters of the target rotated bounding box is:
[0030] ;
[0031] ;
[0032] in, The coordinates of the center of the target bounding box For the target bounding box size, Rotate the target bounding box by an angle;
[0033] S23, apply an affine transformation to the proposal box. The affine transformation process includes four steps: translating the proposal box to the origin, scaling to match the target box size, rotating to align the target box angle, and translating to the center of the target box. This ultimately generates a binary activation mask, with foreground regions set to 1 and background regions set to 0. The transformation matrix is represented as:
[0034] ;
[0035] in, , The coordinates are after transformation. , The coordinates are before the transformation.
[0036] Preferably, the Transformer Block TBAM with Activation Mask: integrates the activation mask generated by the Cascaded Activation Mask Modules (CAMs) into the Transformer self-attention mechanism to enhance foreground feature extraction. Its feature mapping function is: Where Q is the query vector, K is the key vector, V is the value vector, AM is the activation mask generated by the cascaded activation mask module CAMs, and V' is the element-wise product of V and AM (V'=V⊙AM).
[0037] The output end receives the output of the decoupled parameter prediction module, filters the overlapping candidate regions through the non-maximum suppression algorithm (IOU threshold is set to 0.5), and finally outputs the detection results containing "target category, rotated bounding box coordinates, and confidence score", where the confidence score represents the model's degree of confidence in the detection results (value range [0,1]).
[0038] Preferably, the remote sensing image dataset in step S3 is a combination of multiple datasets; during training, batch random sampling is used, and samples are drawn from different datasets in each iteration to ensure a balanced sample distribution.
[0039] Preferably, the first phase of training includes:
[0040] Dataset configuration: Training is conducted using a combination of multiple datasets, with samples randomly sampled from different datasets in each iteration to ensure a balanced sample distribution;
[0041] Training strategy: Freeze the learning rate of the classification head and optimize only the feature extraction and bounding box regression parameters of the Region Proposal Network (RPN) to make the model focus on "object recognition".
[0042] Loss function: The optimization objective is "object classification loss + bounding box regression loss".
[0043] Object classification loss: The cross-entropy loss function is used, and the calculation formula is as follows:
[0044] Where C is the number of target categories. This is a binary indicator; the correct category is 1, and the rest are 0. To predict the probability of category c;
[0045] The formula for calculating the bounding box regression loss is expressed as follows:
[0046] Where M is the number of candidate boxes, ( ) represents the predicted offset of the i-th candidate box; Defined as: .
[0047] Output: Generates candidate regions covering potential targets in each image, providing a foundation for the second stage of refined classification and regression.
[0048] Preferably, the second phase of training includes:
[0049] Weight loading: Load the weights of the Region Proposal Network (RPN) trained in the first stage to ensure that the model has a preliminary target localization capability;
[0050] Fine-tuning strategy: Unfreeze the learning rate of the classification head and fine-tune the entire STD-t network; the backbone network and the Transformer block TBAM module with activation mask are fine-tuned with a small learning rate to preserve pre-trained features;
[0051] Optimization objective: To complete "target refinement classification + precise regression with rotated bounding boxes", and determine the target category and precise rotated bounding box parameters for each candidate region.
[0052] Preferably, the remote sensing image target detection includes:
[0053] The remote sensing image to be detected is preprocessed and input into the trained STD-t framework. The model generates candidate regions through the Region Proposal Network (RPN). After feature enhancement and decoupling parameter prediction guided by the Transformer block TBAM mask with activation mask, non-maximum suppression is used to filter overlapping candidate regions. Finally, the detection result includes "target category, rotated bounding box coordinates, and confidence score".
[0054] The significant advancement of this invention compared to existing technologies lies in:
[0055] By decoupling the parameter prediction module to avoid parameter coupling interference, and combining it with Transformer Block TBAM with activation mask to enhance foreground feature extraction, the detection accuracy is improved.
[0056] By employing training with multiple datasets and multi-scale data augmentation, the model can adapt to complex backgrounds, overlapping multiple targets, and high aspect ratio target scenes in remote sensing images, thereby reducing the false negative rate.
[0057] The STD-t framework can be built to be compatible with various ViT series backbone networks and can be migrated to different remote sensing target detection tasks without major modifications to the network structure, thus improving generalization ability.
[0058] To more clearly illustrate the functional characteristics and structural parameters of the present invention, further explanation is provided below in conjunction with the accompanying drawings and specific embodiments. Attached Figure Description
[0059] Figure 1 This is a flowchart provided by the present invention;
[0060] Figure 2 This is a visualization of the method results of the present invention. Detailed Implementation
[0061] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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.
[0062] Please see Figure 1 This invention provides a Transformer-based method for target detection in remote sensing images using a rotated bounding box. The core of this method is the construction of a two-stage rotated bounding box detection framework, STD-t. The method includes: preprocessing the remote sensing image dataset, constructing the detection framework, first-stage training, second-stage training, and target detection in the remote sensing image. This invention constructs an STD-t model consisting of a "two-stage detection framework + decoupling parameter prediction + cascaded activation mask".
[0063] The preprocessing of the remote sensing image datasets included selecting four datasets: DOTA-v1.0, HRSC2016, FAIR1M, and SODA-A. For large images, a sliding window method was used to crop them into 1024×1024 pixel image patches, with an overlap of 200 pixels between adjacent patches. Small images did not require cropping; they were simply normalized to a maximum side length of 800 pixels, preserving the original aspect ratio. Multi-scale scaling was performed on the cropped image patches, with fixed scaling factors of 0.5x, 1.0x, and 1.5x, and each scale representing 1 / 3 of the samples. Random operations were then performed on the scaled image patches: random rotation; horizontal flipping; and vertical flipping. After enhancement, three times the original number of training samples were generated to suppress model overfitting.
[0064] The detection framework is constructed as follows: the backbone network adopts the ViT series model, which uses the global self-attention mechanism of ViT to capture the global spatial correlation of the target; ViT-small is preferred as the basic backbone, and the pre-trained weights adopt MAE self-supervised pre-trained weights; the region proposal network is used to generate candidate regions in the first stage. It adopts a class-agnostic strategy, which only judges whether the region contains an object and does not involve category recognition, thus simplifying the training objective.
[0065] Decoupling the parameter prediction module: The parameter prediction task of the rotated bounding box is separated into three independent branches to avoid parameter coupling interference, as follows: Position prediction branch: The center coordinates of the rotated bounding box are output through a multilayer perceptron (MLP) activation function with ReLU. Size prediction branch: Outputs the width of the rotating box using a multilayer perceptron (MLP) and ReLU activation function. and height The exponential function ensures the size is positive; the angle prediction branch uses a multilayer perceptron (MLP) with a sigmoid activation function to output the rotation box angle. The range of values is mapped to The three branch parameters are optimized independently, and the prediction order is fixed as "position → angle → size" to ensure that the target center is located first, then the direction is matched, and finally the size is optimized.
[0066] Cascaded activation mask module: Generates a binary mask, with foreground regions set to 1 and background regions set to 0, achieving separation of foreground features from the background. The generation steps include: defining basic parameters: the center coordinates of the proposal box. ,width and height And the bounding box parameters predicted by STD-t, including center point offset. Scaling factors for width and height and rotation angle Calculate the target rotated frame parameters: ; ;in, The coordinates of the center of the target bounding box For the target bounding box size, Rotate the target bounding box by an angle; generate a mask using affine transformation: perform a four-step affine transformation on the proposal box: "translate to origin → scale to match target box size → rotate to align target box angle → translate to target box center", with the transformation matrix as follows: ,in, , The coordinates are after transformation. , The coordinates are before the transformation.
[0067] Transformer Block with Activation Mask (TBAM): Integrates the activation mask generated by the cascaded activation mask modules (CAMs) into the Transformer self-attention mechanism to enhance foreground feature extraction. Its feature mapping function is: Where Q is the query vector, K is the key vector, V is the value vector, AM is the activation mask generated by the cascaded activation mask module CAMs, and V' is the element-wise product of V and AM (V'=V⊙AM).
[0068] The first phase of training includes: Dataset configuration: training with a combination of multiple datasets, randomly sampling samples from different datasets in each iteration to ensure a balanced sample distribution; Training strategy: freezing the learning rate of the classification head, optimizing only the feature extraction and bounding box regression parameters of the Region Proposal Network (RPN), allowing the model to focus on "object classification"; Loss function: optimizing "object classification loss + bounding box regression loss": Object classification loss: using the cross-entropy loss function, calculated as follows: Where C is the number of target categories, It is a binary indicator (1 for the correct category, 0 for the rest). To predict the probability of category c; bounding box regression loss: using the Smooth L1 loss function, the calculation formula is as follows: Where M is the number of candidate boxes, ( Let be the predicted offset of the i-th candidate box. Defined as: Output: After training, the Region Proposal Network (RPN) weight file is saved, providing a foundation for the second stage of refined classification and regression.
[0069] The second stage of training includes: Weight loading: Loading the Region Proposal Network (RPN) weights trained in the first stage, replacing the RPN module parameters in the STD-t framework; Fine-tuning strategy: Unfreezing the learning rate of the classification head and fine-tuning the entire STD-t network; The backbone network and the Transformer block TBAM module with activation masks are fine-tuned with a small learning rate to preserve pre-trained features; Optimization objective: Completing "target refinement classification + precise regression with rotated bounding boxes" to determine the target category and precise rotated bounding box parameters for each candidate region. Output results: Saving the full network weight file with the highest mAP on the validation set as the final detection model.
[0070] Remote sensing image target detection includes: preprocessing the remote sensing image to be detected and inputting it into a trained STD-t model; the model generates candidate regions through a Region Proposal Network (RPN), followed by feature enhancement and decoupling parameter prediction guided by a Transformer block with an activation mask (TBAM); overlapping candidate regions are filtered using non-maximum suppression (NMS), with an IOU threshold set to 0.5; the final output includes detection results containing "target category, rotated bounding box coordinates, and confidence score," which can be found in [reference needed]. Figure 2 The visualization results are shown below.
[0071] In practical use, the first step is to prepare and preprocess the remote sensing image data. First, the original remote sensing image is divided into image patches of 1024×1024 pixels, and the overlap between adjacent image patches is strictly controlled to 200 pixels. Then, multi-scale adjustment is performed on the cropped image patches, with the scaling factor fixed at 0.5x, 1.0x, and 1.5x. Finally, data augmentation is performed, and the scaled image patches are randomly rotated from 0° to 360°, horizontally flipped, or vertically flipped to expand the diversity of training samples and ensure that the subsequent model can adapt to any orientation and scale difference of the target in the remote sensing image. Then, the constructed training set is input into the STD-t framework's Region Proposal Network (RPN) and trained using a class-agnostic method. During training, the learning rate of the classification head is frozen, and only the feature extraction and bounding box regression parameters of the RPN are optimized. The optimization objective is "object classification loss + bounding box regression loss", where the object classification loss uses the cross-entropy loss function and the bounding box regression loss uses the Smooth L1 loss function. In each iteration, samples are randomly sampled from different datasets to ensure balanced distribution. After training, the candidate regions covering potential targets are output, and the RPN weight file is saved. Secondly, the weights of the Region Proposal Network (RPN) from the first stage of training are loaded, the learning rate of the classification head is unfrozen, and the STD-t full network is fine-tuned. During fine-tuning, based on the candidate regions generated in the first stage, the model completes target refinement classification and accurate regression of rotated bounding boxes. During training, the Cascaded Activation Mask Modules (CAMs) generate binary activation masks through affine transformations, and the TBAM integrates the masks into the Transformer self-attention mechanism to enhance foreground feature extraction. After training, the STD-t full network weight file with the highest average accuracy on the validation set is saved. Next, the remote sensing images to be detected undergo preprocessing and format adaptation: the first step of preprocessing is repeated on the remote sensing images to be detected to ensure consistency with the training data format and avoid affecting detection accuracy due to format differences. Then, the preprocessed image to be detected is input into the trained STD-t model. The model first generates candidate regions through the Region Proposal Network (RPN); then, it uses the Transformer Block with Activation Mask (TBAM) to enhance the attention of the candidate region features through mask guidance; subsequently, the three independent branches of the decoupled parameter prediction module output the target category and the rotation box parameters respectively; finally, a non-maximum suppression algorithm (IOU threshold 0.5) is used to filter overlapping candidate regions, retaining detection results with high confidence and ensuring that the output results are not redundant. Finally, the detection results are processed and evaluated. The detection results of the cropped image patches are stitched together according to the cropping position to restore the original image size; a standardized detection report is generated, including basic image information, detection target statistics, and accuracy indicators; the detection results are compared with the labeled results of the public dataset to calculate the average accuracy.
[0072] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A target detection method for remote sensing images with a rotated bounding box based on Transformer, characterized in that: Includes the following steps: Step S1: Preprocess the multi-remote sensing image dataset to obtain preprocessed images; Step S2: Construct a two-stage rotating bounding box detection framework STD-t based on Transformer. The framework includes a backbone network, a classification head, a region proposal network, a feature enhancement module, and a decoupling parameter prediction module from the input end to the output end. The backbone network is the ViT visual converter series model. The decoupled parameter prediction module is used to separate the prediction tasks of position, size and angle parameters of the rotating bounding box. The feature enhancement Transformer block TBAM with activation mask is used to integrate the activation mask into the Transformer self-attention mechanism to enhance foreground feature extraction. Step S3, first stage training: The region proposal network is trained using a class-agnostic method, the learning rate of the classification head is frozen, and the object classification loss and bounding box regression loss are used as optimization objectives to generate candidate regions covering potential targets; wherein, the object classification loss is calculated using the cross-entropy loss function, and the bounding box regression loss is calculated using the Smooth L1 loss function. Step S4, Second Stage Training: Load the network weights obtained from the first stage training, fine-tune the entire network of STD-t, unfreeze the classification head, complete the refined classification of the target and the rotation bounding box regression based on the candidate regions, and determine the target category and precise rotation bounding box parameters for each candidate region. Step S5: Input the remote sensing image to be detected into the trained STD-t, and output the detection results including the target category, the coordinates of the rotated bounding box, and the confidence level.
2. The method according to claim 1, characterized in that, The preprocessing described in step S1 includes: Dataset selection: Multiple typical remote sensing target detection datasets were selected, including DOTA-v1.0, HRSC2016, FAIR1M and SODA-A, covering different scenes, target types and resolutions; Image cropping: The remote sensing image is cropped into 1024×1024 pixel image blocks, with an overlap of 200 pixels between adjacent image blocks; Scale adjustment: The cropped image patch is scaled, with scaling factors including 0.5x, 1.0x, and 1.5x; Data augmentation: Perform random rotation, horizontal flip, or vertical flip operations on scaled image patches; The input end receives preprocessed remote sensing image data, including 1024×1024 pixel image patches (i.e., the size after cropping of the large dataset) and images normalized to a maximum side length of 800 pixels (i.e., the small dataset). The image format is RGB three-channel, and the pixel values have been normalized to the [0,1] interval.
3. The method according to claim 2, characterized in that, The decoupling parameter prediction module in step S2 includes three independent branches: Location prediction branch: Outputs the center coordinates of the rotated bounding box using a multilayer perceptron (MLP) and the ReLU activation function. ; Size prediction branch: Outputs the width of the rotated bounding box using a multilayer perceptron (MLP) and the ReLU activation function. and height ; Angle prediction branch: Outputs the rotation angle of the rotated bounding box through a multilayer perceptron (MLP). The angle The range of values is ; The parameters of the three branches are optimized independently, and the parameter prediction order is position, angle, and size.
4. The method according to claim 3, characterized in that, The generation process of the cascaded activation mask modules (CAMs) in step S2 includes: S21, Define the center coordinates of the proposal box ,width and height And the bounding box parameters predicted by STD-t, including center point offset. Scaling factors for width and height and rotation angle ; S22, the formula for calculating the parameters of the target rotated bounding box is: ; ; in, The coordinates of the center of the target box For the target bounding box size, Rotate the target bounding box by an angle; S23, apply an affine transformation to the proposal box. The affine transformation process includes four steps: translating the proposal box to the origin, scaling to match the target box size, rotating to align the target box angle, and translating to the center of the target box. This ultimately generates a binary activation mask, with foreground regions set to 1 and background regions set to 0. The transformation matrix is represented as: ; in, , The coordinates are after transformation. , The coordinates are before the transformation.
5. The method according to claim 4, characterized in that, The method for the feature mapping function of the Transformer block with activation mask mentioned in step S2 is as follows: Where Q is the query vector, K is the key vector, V is the value vector, AM is the activation mask generated by the cascaded activation mask module CAMs, and V' is the element-wise product of V and AM (V'=V⊙AM).
6. The method according to claim 5, characterized in that, The remote sensing image dataset mentioned in step S3 is a combination of multiple datasets; during training, batch random sampling is used, and samples are drawn from different datasets in each iteration to ensure a balanced sample distribution.
7. The method according to claim 6, characterized in that, The formula for calculating the object classification loss in step S3 is as follows: Where C is the number of target categories. This is a binary indicator; the correct category is 1, and the rest are 0. To predict the probability of category c; The formula for calculating the bounding box regression loss is as follows: Where M is the number of candidate boxes, ( ) represents the predicted offset of the i-th candidate box; Defined as: .