Remote sensing small sample target detection method based on double-attention guided transfer learning
By constructing a content-aware strip pyramid network and a deformable attention region proposal network, the problems of multi-scale feature robustness and insufficient candidate region quality in remote sensing target detection with small sample sizes are solved, and high-precision remote sensing target detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
In existing remote sensing small sample target detection methods, feature pyramid networks lack content awareness, resulting in insufficient robustness of multi-scale features. Region proposal networks are unable to adapt to the geometric deformation of remote sensing targets, and the generated candidate region features are easily affected by background noise, leading to a decrease in classification accuracy and localization accuracy.
We employ a dual-attention-guided transfer learning approach to construct a content-aware strip pyramid network and a deformable attention region proposal network. We enhance multi-scale feature representation through content-aware upsampling and bidirectional strip convolution, and improve the accuracy of complex target localization by utilizing deformable convolution and spatial attention mechanisms.
It achieves long-range context awareness and adaptive fusion of multi-scale features, improving the detection accuracy and robustness of remote sensing target detection, and significantly enhancing detection performance under small sample conditions.
Smart Images

Figure CN121811250A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and image processing technology, and particularly relates to a remote sensing small sample target detection method based on dual attention-guided transfer learning. Background Technology
[0002] Remote sensing image target detection is a core technology in intelligent remote sensing interpretation and is widely used in critical scenarios such as military reconnaissance, emergency disaster response, coastal surveillance, urban planning, and land resource monitoring. However, in actual engineering deployments, high-precision remote sensing target detection still faces significant challenges, especially under conditions of scarce labeled samples, where model performance struggles to meet requirements.
[0003] First, the annotation cost of remote sensing images is extremely high. High-resolution remote sensing images typically cover a wide area and contain a wide variety of land features. Accurate annotation relies on professional knowledge and a large amount of manpower, resulting in a very limited number of high-quality samples available for supervised training. Deep detection models are prone to overfitting under small sample conditions and struggle to learn discriminative features with sufficient generalization ability.
[0004] Secondly, the scale differences of targets in remote sensing scenarios are extremely significant. From large-scale ships and airport facilities to small-scale vehicles and boats, the range of target sizes is vast, and targets are often distributed in arbitrary directions and densely arranged. The multi-scale feature extraction capabilities of existing detection models are often insufficient when dealing with such complex scale distributions, leading to a decline in the ability to identify small-scale and fine-grained targets.
[0005] Third, remote sensing images have high background complexity. Because remote sensing images often contain various land features such as building complexes, road networks, vegetation, shadows, and water bodies, the contrast between the target and the background is low and the boundaries are blurred, which poses an additional challenge to high-quality feature learning. Background noise is easily over-encoded during the feature extraction stage, interfering with subsequent classification and localization.
[0006] To alleviate the problem of sample scarcity, transfer learning has become the mainstream technical approach. Existing methods typically leverage models pre-trained on large-scale natural image datasets and transfer them to remote sensing target detection tasks. However, the closest existing technology to this invention—the transfer learning detection framework based on Feature Pyramid Network (FPN)—has inherent limitations in handling the geometric structural characteristics and contextual complexity of remote sensing images, specifically in the following two aspects:
[0007] (1) Limited multi-scale feature representation capability. The upsampling operation in FPN generally adopts bilinear interpolation or nearest neighbor interpolation. These operations lack semantic awareness of image content, resulting in problems such as blurred boundaries and loss of spatial details in the fused high-level features. At the same time, the standard FPN performs simple linear fusion of features at different scales, failing to differentiate and enhance key semantic channels, and is difficult to effectively suppress background noise. Under small sample conditions, these structural defects will be further amplified, making it more difficult for the model to obtain robust and discriminative multi-scale feature representations.
[0008] (2) Insufficient quality of candidate region features. Traditional Region Proposal Networks (RPNs) rely on standard convolutional operations, with fixed receptive fields and sensitivity to geometric deformation. In remote sensing scenes with highly complex backgrounds, the candidate regions generated by RPNs often contain a large amount of background information, causing the extracted region features to be contaminated by background noise, making the classifier easily misled and reducing the accuracy of bounding box regression. At the same time, RPNs lack an adaptive attention mechanism for key foreground regions and cannot actively suppress background interference, which is the main reason for the insufficient quality of existing candidate region features.
[0009] Based on the above analysis, it is evident that existing transfer learning frameworks still have significant limitations in remote sensing target detection with small sample sizes. To further elucidate the technical objectives of this invention, it is necessary to summarize the aforementioned problems: In existing transfer learning-based remote sensing target detection methods with small sample sizes, the feature pyramid network lacks content-aware capabilities, resulting in insufficient robustness of multi-scale features; the region proposal network struggles to adapt to the geometric deformation of remote sensing targets, and the generated candidate region features are easily affected by background noise, becoming a major performance bottleneck for classification and localization accuracy; simultaneously, existing methods generally lack end-to-end optimization mechanisms for remote sensing scenarios with small sample sizes, making it difficult to fully leverage transfer learning efficiency. These shortcomings collectively limit the detection performance of existing technologies in practical applications. Summary of the Invention
[0010] To overcome the technical problems of existing feature pyramid networks, such as poor feature robustness, insufficient capture of contextual information, and low quality of candidate box features in region proposal networks, making it difficult to effectively distinguish between foreground and background, this invention discloses a remote sensing few-shot object detection method based on dual-attention-guided transfer learning (DA-FSDeT). This method achieves long-distance contextual awareness and adaptive fusion of multi-scale features, as well as adaptive awareness of geometric deformation of candidate box features and accurate focusing of foreground targets. The technical solution is as follows:
[0011] This invention is implemented as follows: a remote sensing few-sample target detection method based on dual-attention guided transfer learning. This method constructs a content-aware strip pyramid network, enhancing multi-scale feature representation through content-aware upsampling and bidirectional strip convolution; it designs a deformable attention region proposal network, improving the localization accuracy of complex targets through deformable convolution and spatial attention mechanisms; specifically, it includes the following steps:
[0012] S1, acquire the remote sensing image dataset and perform preprocessing;
[0013] S2, using the preprocessed remote sensing image training set as input, constructs a basic detection model using ResNet-101 backbone network, feature pyramid network, content-aware upsampling FPN_CARAFE, and region proposal network RPN, and obtains the basic model parameters;
[0014] S3, using the obtained basic model parameters as input, train the remote sensing few-shot target detection network DA-FSDeT based on dual attention guided transfer learning, based on the content-aware strip pyramid CASP and the deformable attention region proposal network DCN-Attention RPN.
[0015] S4 uses the remote sensing image to be detected as input and the trained DA-FSDeT network to obtain the category detection box and confidence score containing a small number of categories.
[0016] In step S2, multi-scale feature maps are extracted from the input remote sensing image using the ResNet-101 backbone network.
[0017] In step S3, the content-aware strip pyramid (CASP) is used to fuse and enhance the multi-scale feature maps, generating robust multi-level enhanced feature maps, including:
[0018] A strip convolutional module is integrated at each output scale of the FPN_CARAFE network, and the set of multi-scale feature maps output by the backbone network is denoted as . The input features are processed by the FPN_CARAFE base network. This process generates a preliminary set of multi-scale feature maps through top-down path fusion and content-aware upsampling. ;exist Based on this, it is generated through a convolutional layer with a stride of 2. and in Based on further downsampling, generate Then we have:
[0019]
[0020] In the formula, The input is fed into the strip convolution module and generated by FPN_CARAFE. Hierarchical original feature map, For the backbone network in the first Feature maps output at each stage It is a pyramid hierarchy. For the forward propagation function of the FPN_CARAFE network, the feature map of each layer... They are independently fed into a corresponding strip convolution module for enhancement;
[0021] The strip convolution module performs the following operations: employs a bidirectional decomposition convolution strategy to extract spatial features in both the horizontal and vertical directions in parallel; normalizes the output feature maps in the horizontal and vertical directions respectively; fuses the normalized horizontal and vertical feature maps through channel concatenation; and adds the fused feature map to the input feature map of the strip convolution module through residual connection to generate an enhanced feature map.
[0022] Furthermore, the bidirectional decomposition convolution strategy includes:
[0023] For the input feature map Convolution operations are performed using horizontal and vertical convolution kernels respectively to obtain horizontal and vertical feature maps.
[0024] Among them, the convolution outputs in both the horizontal and vertical directions and Calculated separately as follows:
[0025]
[0026]
[0027] In the formula, and These represent the kernel size as follows: and Convolution operation, and Representing the first Output feature maps of horizontal and vertical strip convolutional branches at each level.
[0028] Furthermore, the output feature maps in the horizontal and vertical directions are normalized, including:
[0029] Batch normalization and ReLU activation are performed on the horizontal and vertical feature maps respectively, as shown in the following expressions:
[0030]
[0031]
[0032]
[0033] In the formula, For horizontal features, It is a vertical feature. For feature maps, For batch normalization operation; To modify the activation function of the linear unit, a nonlinear transformation is introduced into the network to enhance its representation ability; For the concatenation operation along the channel dimension, the normalized and activated horizontal features are... and vertical features Merging them forms a feature map that incorporates bidirectional spatial context information. If the number of output channels for each branch is ,but The number of channels is ;
[0034] The channel stitching involves stitching together the batch-normalized and activated horizontal and vertical feature maps along the channel dimension; the fused features are then connected via residual connections. Input of the strip convolution module The features are added together to generate the final enhanced features for that level. The expression is:
[0035]
[0036] In the formula, The input is fed into the strip convolution module and generated by FPN_CARAFE. The original feature map at each level; this residual addition operation constructs a shortcut path, allowing the strip convolutional module to learn only the residual between the input and output without needing to learn the complete feature transformation. .
[0037] In step S3, using the enhanced feature map as input, high-quality candidate region features are generated through the Deformable Attention Region Proposal Network (DCN-Attention RPN), including:
[0038] Deformable convolution is used to perform geometric adaptive perception on the feature map, generating sampling points on the feature map that adapt to the deformation of the target, thereby generating geometrically enhanced features;
[0039] Geometric enhancement features are reweighted in spatial dimensions using a spatial attention mechanism to generate attention-weighted features;
[0040] The original features and attention-weighted features are fused through residual connections to generate candidate region features.
[0041] Furthermore, geometrically adaptive perception of feature maps using deformable convolution includes:
[0042] Given an input image, standard convolution at position The output at this location is:
[0043]
[0044] In the formula, Convolution at position The output feature value, Define the regular receptive field of the convolution kernel. The first in the convolution kernel The position of each sampling point is offset relative to the center. For the convolution kernel at the sampling position The weight of the position, This refers to the pixel value at the corresponding sampling location on the input feature map.
[0045] In deformable convolution, for each sampling point Introduce an adaptive offset and a modulation scalar The output then becomes:
[0046]
[0047] offset With modulation scalar Both are derived from input features through parallel convolutional layers. The learning process involves adjusting the standard convolution sampling positions using offset and modulation scalars to generate geometrically enhanced features.
[0048] Furthermore, spatial dimension reweighting is applied to geometrically enhanced features using a spatial attention mechanism, including:
[0049] Through a convolution kernel The convolutional layer generates a spatial weight map, expressed as:
[0050]
[0051] In the formula, The output features of deformable convolution; Use the Sigmoid activation function to ensure the weight values ; Use attention maps to recalibrate the spatial dimensions of features:
[0052]
[0053] In the formula, For element-wise multiplication, the attention map A is operated on along the channel dimension; attention-weighted features are obtained by performing element-wise multiplication between the spatial weight map and the geometric enhancement features. .
[0054] Furthermore, fusing the original features with attention-weighted features through residual connections includes:
[0055] The output features of deformable convolutions are fused with the spatial attention-weighted features, where the output features of deformable convolutions are passed through a shortcut path, and the fused features are... The calculation is as follows:
[0056]
[0057] In the formula, 1 is an all-1 matrix with the same dimension as A.
[0058] In step S3, the detection head outputs the classification score of each candidate region through the classification branch and predicts the bounding box parameters of each candidate region through the regression branch.
[0059] Another object of the present invention is to provide a remote sensing few-shot target detection system based on dual-attention guided transfer learning for implementing the aforementioned remote sensing few-shot target detection method based on dual-attention guided transfer learning, the system comprising:
[0060] The feature extraction and enhancement module receives the input remote sensing image and outputs an enhanced multi-level feature map. This module specifically includes:
[0061] The ResNet-101 backbone network is used to extract initial multi-scale features from the input image;
[0062] The feature pyramid network and content-aware upsampling module are connected to the ResNet-101 backbone network to fuse and upsample the initial multi-scale features, generating a preliminary multi-scale feature map.
[0063] The content-aware strip pyramid module is integrated into each output scale of the feature pyramid network. It enhances the initial multi-scale feature map through strip convolution and residual connection, generating enhanced multi-level feature maps.
[0064] The candidate region generation module, connected to the feature extraction and enhancement module, is used to receive enhanced multi-level feature maps and generate high-quality candidate region features. This module includes a deformable attention region proposal network, which processes the input features through deformable convolution and spatial attention mechanisms.
[0065] The detection head module, connected to the candidate region generation module, is used to output a category detection box containing a small sample category and its confidence score based on the candidate region features.
[0066] Furthermore, each strip convolutional unit in the content-aware strip pyramid module includes:
[0067] Bidirectional decomposition convolutional layers are used to perform horizontal and vertical strip convolutions on the input feature maps in parallel, generating horizontal and vertical feature maps respectively.
[0068] The normalization and activation layer, connected to the bidirectional decomposition convolutional layer, is used to perform batch normalization and ReLU activation on the horizontal and vertical feature maps, respectively.
[0069] The feature fusion layer, connected to the normalization and activation layer, is used to stitch together the processed horizontal and vertical feature maps along the channel dimension.
[0070] The residual connection adder is used to add the output of the feature fusion layer to the input feature map of the strip convolutional unit to generate the final output of the unit.
[0071] Furthermore, the deformable attention region proposal network includes:
[0072] Deformable convolutional units are used to dynamically adjust the convolution sampling position by learning offsets and modulation scalars from the input feature map, thereby generating geometrically adaptive feature maps.
[0073] Spatial attention units, connected to deformable convolutional units, are used to generate spatial weight maps and reweight geometrically adaptive feature maps to highlight foreground target regions.
[0074] The feature fusion unit fuses the geometrically adaptive feature map with the weighted output of the spatial attention unit through residual connections to generate high-quality candidate region features.
[0075] Furthermore, the spatial attention unit includes:
[0076] A 1×1 convolutional layer is used to reduce the dimensionality of the input features;
[0077] A sigmoid activation function layer, connected to a 1×1 convolutional layer, is used to generate weight values. Spatial weight map;
[0078] An element-wise multiplier is used to multiply the spatial weight map with the feature map input to the spatial attention unit.
[0079] Furthermore, the detection head module includes:
[0080] The classification branch, consisting of a fully connected layer or a convolutional layer, is used to output the classification score for each candidate region.
[0081] The regression branch, consisting of a fully connected layer or a convolutional layer, is used to predict the bounding box parameters of each candidate region.
[0082] Combining all the above technical solutions, the beneficial effects of this invention are as follows:
[0083] First, this invention proposes a remote sensing image target detection method and system based on deep learning. The method first extracts multi-scale feature maps from a preprocessed balanced set of remote sensing images using a ResNet-101 backbone network; then, it fuses and enhances these multi-scale features through a Content-Aware Strip Pyramid (CASP) module to generate semantically complete and detailed multi-level enhanced feature maps; next, it processes the enhanced feature maps using a Region Attention Network (DCN-Attention RPN) integrating deformable convolution and spatial attention mechanisms to generate high-quality candidate region features; finally, the detection head outputs classification results and bounding box regression parameters through a parallel branching structure.
[0084] By leveraging the synergistic effect of the CASP module and DCN-Attention RPN, this invention addresses key challenges in traditional transfer learning frameworks for small-sample remote sensing detection, such as insufficient multi-scale representation capabilities, poor candidate region quality, and difficulty in suppressing background interference. It achieves unified optimization of multi-scale enhancement, geometric adaptation, and foreground focusing, significantly improving detection accuracy and robustness under small-sample conditions.
[0085] Secondly, this invention significantly enhances multi-scale feature representation capabilities through a content-aware striped pyramid network. The content-aware upsampling mechanism dynamically adjusts the feature recovery method based on local semantic intensity, effectively overcoming the boundary blurring and detail loss problems caused by traditional upsampling methods. Bidirectional striped convolution further captures long-distance directional contextual information, enabling the model to maintain stable semantic expression capabilities when facing remote sensing targets with large scale spans and complex arrangement directions, thereby forming a robust multi-level feature map that combines semantic integrity and spatial detail.
[0086] Furthermore, the deformable attention region proposal network employed in this invention effectively overcomes the limitations of traditional RPNs in geometric modeling and foreground focusing. Deformable convolution dynamically samples based on the target's true geometry, enabling the receptive field to adaptively fit complex targets such as those undergoing rotation, elongation, or non-rigid deformation. The spatial attention mechanism further saliency-reweights candidate region features, automatically focusing on key foreground regions and suppressing background noise, fundamentally improving the purity and representativeness of candidate region features.
[0087] More importantly, this invention constructs a complete feature optimization pipeline from global semantic enhancement to local geometric adaptation by cascading and coordinating the content-aware strip pyramid and deformable attention RPN, achieving progressive collaborative modeling of global and local information. This architecture significantly improves the model's detection performance in typical remote sensing scenarios such as strong background interference, multi-scale mixing, and scarce samples, demonstrating superior stability, accuracy, and engineering practical value compared to existing technologies.
[0088] Third, the remote sensing target detection method proposed in this invention, based on content-aware striped pyramids and deformable attention region proposal networks, can significantly improve detection accuracy and positioning stability in typical remote sensing scenarios such as complex terrain environments, large target scale spans, and strong background noise interference. With the widespread application of high-resolution remote sensing imagery in fields such as land planning, emergency monitoring, urban management, agricultural and forestry supervision, and military reconnaissance, there is a high industry demand for automated, low-sample, and high-precision intelligent detection technologies. The technical solution of this invention can be directly integrated into existing remote sensing data processing platforms, intelligent inspection systems, and terrain feature identification management platforms, effectively reducing manual annotation and interpretation costs, improving remote sensing image processing efficiency, and bringing significant economic benefits and commercial value to data processing companies, system integrators, and industry end-users. Especially noteworthy is its stable detection performance even under low-sample conditions, giving this invention greater versatility and deployment flexibility. It can be widely applied to business scenarios with limited resources, frequent updates, and complex environments, possessing strong market competitiveness and promising prospects for technology promotion.
[0089] Remote sensing target detection has long lacked a unified technical framework that simultaneously possesses long-range context modeling, directional feature representation, and deformation adaptation capabilities. Existing feature pyramids cannot simultaneously address semantic integrity and directional information, and traditional RPNs struggle to handle the rotation and complex deformation of remote sensing targets. This invention, through the cascaded design of content-aware strip pyramids and deformable attention RPNs, achieves for the first time an integrated detection paradigm of "long-range context enhancement + dynamic geometric adaptation + foreground attention filtering." This effectively overcomes the structural limitations of existing technologies in multi-scale fusion and candidate region generation, filling the technical gap in robust feature modeling and high-quality candidate region generation in complex remote sensing scenes.
[0090] Remote sensing images, due to their large variations in viewpoint, significant differences in target scale, and complex backgrounds, have long struggled to simultaneously capture large-scale global semantics and small-scale local details. Furthermore, traditional Region Proposal Networks (RPNs) are ill-suited to adapting to arbitrary target rotation and deformation, thus limiting the quality of candidate regions. To address this, this invention enhances directional context and long-range dependency representation through a CASP structure and achieves adaptive focusing on foreground geometric deformations through dynamic sampling and spatial attention using a DCN-Attention RPN. This organic combination fundamentally improves the accuracy and robustness of candidate regions, successfully solving the long-standing technical challenge of simultaneously achieving both complex background interference and deformed target perception.
[0091] Existing technologies have long held that strip structures are difficult to integrate with high-level semantic features, and that strip convolution cannot simultaneously consider both global context and fine-grained directional information, thus hindering their effective utilization in remote sensing detection. Furthermore, the industry generally relies on fixed-convolutional RPNs, lacking adaptive modeling for geometric deformations and foreground regions. This invention breaks through these inherent limitations: it verifies that strip features can synergistically enhance directional contextual expression with deep semantics through a content-aware strip pyramid; and by introducing deformable convolution and attention mechanisms to construct an adaptive RPN, it demonstrates that the candidate region generation stage must possess dynamic sampling and foreground focusing capabilities to adapt to complex remote sensing scenarios. This system effectively overcomes the structural limitations of traditional FPN and RPN, driving the evolution of remote sensing detection from a fixed architecture to an adaptive architecture. Attached Figure Description
[0092] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure;
[0093] Figure 1 This is a flowchart of a remote sensing small-sample target detection method based on dual-attention guided transfer learning provided in an embodiment of the present invention;
[0094] Figure 2 This is a schematic diagram of the overall framework of the remote sensing small sample target detection method based on dual attention-guided transfer learning provided in the embodiments of the present invention;
[0095] Figure 3 This is a schematic diagram of content-aware (CARAFE) provided in an embodiment of the present invention;
[0096] Figure 4 This is a schematic diagram of the Deformable Attention Region Proposal Network (DCN-Attention RPN) provided in an embodiment of the present invention;
[0097] Figure 5 This is a visualization result of the DIOR dataset provided in an embodiment of the present invention.
[0098] Figure 6 This is a visualization result of the NWPU VHR-10 dataset provided in an embodiment of the present invention. Detailed Implementation
[0099] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0100] The innovation of this invention lies in the following: Firstly, it proposes a content-aware striped pyramid network to enhance the representational ability of multi-scale features. This network ensures the integrity of high-level semantic information during reconstruction through a content-aware upsampling mechanism and effectively captures long-distance contextual dependencies across regions using a bidirectional striped convolutional structure. This generates feature representations that possess both rich semantic expression and fine spatial structure, providing a stable and discriminative feature foundation for small-sample remote sensing target detection.
[0101] Secondly, this invention constructs a deformable attention region proposal network to improve the accurate localization capability of targets in complex scenes. This network integrates deformable convolution with spatial attention mechanisms, enabling the network's receptive field to adaptively adjust according to the actual geometry of the target, and to automatically focus on key foreground regions while suppressing background interference, thereby significantly improving the accuracy and reliability of candidate region generation.
[0102] Building upon the aforementioned modules, this invention further constructs a remote sensing target detection model based on dual-attention-guided transfer learning. This model was systematically validated on the DIOR and NWPU VHR-10 benchmark datasets. Experimental results demonstrate that this invention effectively improves detection performance under small sample conditions, possesses good engineering applicability and promotional value, and provides a reusable and scalable technical solution for research in remote sensing small sample detection.
[0103] Example 1, such as Figure 1 and Figure 2As shown, this embodiment provides a remote sensing small-sample target detection method based on dual-attention guided transfer learning. The following implementation details the technical solution. To facilitate understanding by those skilled in the art, this embodiment first provides an overview of the method from the perspectives of overall process, application scenarios, and technical effects, and then decomposes and explains each functional step. This embodiment is applicable to typical scenarios in high-resolution remote sensing images, such as scarce samples, complex backgrounds, drastic scale changes, and significant target deformation. By introducing a content-aware strip pyramid and a deformable attention region proposal mechanism, it achieves more robust feature representation and higher-precision candidate region generation, thereby effectively verifying the feasibility and technical superiority of the present invention.
[0104] The method flow of this embodiment is described in detail below:
[0105] S1, acquire the remote sensing image dataset and perform preprocessing;
[0106] Specifically, in the embodiments of the present invention, the datasets used are the DIOR dataset and the NWPU VHR-10 dataset.
[0107] The DIOR dataset is a large-scale benchmark dataset for target detection in optical remote sensing images, proposed by a research team from Zhengzhou University of Surveying and Mapping and Northwestern Polytechnical University. It contains 23,463 optical remote sensing images and 192,472 instances, with 5,862 images in the training set, 5,863 images in the validation set, and 11,738 images in the test set. All images are 800×800 pixels in size, with spatial resolution ranging from 0.5 meters to 30 meters. The dataset includes 20 categories, including aircraft, airports, baseball fields, basketball courts, bridges, chimneys, dams, highway service areas, highway toll stations, golf courses, athletic fields, ports, overpasses, ships, stadiums, oil tanks, tennis courts, train stations, vehicles, and windmills.
[0108] The NWPU VHR-10 dataset, released by Northwestern Polytechnical University, focuses on object detection research. Images typically range in resolution from 800×800 to 2000×2000 pixels. It is suitable for detecting and classifying multiple object categories in high-resolution remote sensing images. The dataset contains 10 different object categories: aircraft, ships, vehicles, bridges, buildings, roads, parking lots, airport runways, storage yards, and ports. The long side of these images ranges from approximately 500 to 1200 pixels and is divided into two groups. The positive image set contains 650 images, each containing at least one object to be detected; the negative image set contains 150 images that do not contain any objects of a given category.
[0109] In this embodiment, the DIOR dataset is first obtained from official channels and organized according to the following directory structure: The DIOR dataset directory structure includes an Annotations directory, an ImageSets / Main directory, and a JPEGImages directory; the Annotations directory stores XML format annotation files for all images, with each annotation file containing the bounding box coordinates and category label information for the corresponding image; the ImageSets / Main directory contains data partitioning files, defining the image sample partitioning for the training set, validation set, training-validation set, and test set through train.txt, val.txt, trainval.txt, and test.txt, respectively; the JPEGImages directory stores all JPEG format image files. This directory structure establishes the correspondence between image files and annotation files, providing a data foundation for subsequent model training. Using predefined category partitioning schemes (such as SPLIT1, SPLIT2, and SPLIT3), the 20 categories are divided into 15 base classes and 5 new classes. The generalization ability of the method is verified through different category combination schemes. In the base training phase, the detection model is fully pre-trained using training samples from all categories of the base classes in the DIOR dataset. Data augmentation techniques such as multi-scale scaling and random flipping are used to learn general feature representations of remote sensing images, while retaining difficult samples to improve model robustness. In the fine-tuning phase, a few-shot learning paradigm is adopted, following the Nway-Kshot principle, and different shot numbers are set to control the number of samples. Task-driven training enables the model to learn new category features from a limited set of samples. For the NWPU VHR-10 dataset, a fixed category partitioning strategy, different from that used in the DIOR dataset, is employed: "airplane," "baseball field," and "tennis court" are defined as new categories, while the remaining categories are treated as base classes.
[0110] S2, using the preprocessed remote sensing image training set as input, constructs a basic detection model using ResNet-101 backbone network, feature pyramid network, content-aware upsampling FPN_CARAFE, and region proposal network RPN, and obtains the basic model parameters;
[0111] Specifically, in the embodiments of the present invention, during the basic detection model construction and training phase, a remote sensing target detection framework based on a deep convolutional neural network is constructed using preprocessed DIOR dataset base class training samples as input. This framework employs ResNet-101 as the backbone feature extraction network; above the backbone network, a feature pyramid network based on the CARAFE upsampling mechanism is constructed, such as... Figure 3As shown, efficient fusion of multi-scale feature maps is achieved through content-aware feature recombination. The CARAFE operation predicts the upsampling kernel based on the feature content, which can better preserve detailed information compared with traditional interpolation methods. In the region generation part, a progressive region proposal network is adopted, which includes two cascaded optimization stages: the first stage generates coarse-grained candidate boxes based on dilated convolution, focusing on the initial localization of bounding boxes; the second stage combines deformable convolution and point generator to perform fine-grained bounding box regression and foreground / background classification. The quality of candidate boxes is improved through a coarse-to-fine optimization strategy.
[0112] During model training, a stochastic gradient descent optimization algorithm was employed, with an initial learning rate of 0.002. A linear warm-up strategy was used to smoothly transition the learning rate over 1500 iterations, while a gradient pruning mechanism with a maximum norm of 20 was used to ensure training stability. The network parameters obtained after training—including the multi-level feature extraction weights of the ResNet-101 backbone network, the multi-scale fusion parameters of the FPN_CARAFE feature pyramid, the candidate box generation parameters of the RPN, and the target classification and precise localization parameters of the region convolutional neural network—form a feature representation system optimized for the characteristics of remote sensing images. This parameter system, as important visual prior knowledge, will provide a strong initialization state for the few-shot learning task in the subsequent fine-tuning stage, ensuring that the base model, while maintaining its ability to recognize base class targets, can quickly adapt to new class features with a small number of samples, achieving collaborative detection of base and new classes.
[0113] S3, using the obtained basic model parameters as input, train the remote sensing few-shot target detection network DA-FSDeT based on dual attention guided transfer learning, based on the content-aware strip pyramid CASP and the deformable attention region proposal network DCN-Attention RPN.
[0114] To further improve the small-sample target detection capability, the fine-tuning stage uses the model parameters obtained from the aforementioned base training as the initialization basis to construct a DA-FSDeT network for small-sample adaptive training. In terms of network architecture, the feature pyramid network is enhanced by introducing a content-aware strip convolution module. By setting the strip convolution kernel to extract features in both horizontal and vertical directions, the network's ability to perceive the geometric features of strip-shaped targets (such as roads, bridges, and airport runways) in remote sensing images is strengthened. In the region proposal network, a progressive region proposal network enhanced by a deformable attention mechanism is adopted. Through the combination of deformable convolution and the attention module, the network can adaptively focus on key regions related to small-sample targets. The deformable convolution is configured with 4 deformation groups and 9 sampling points to enhance the modeling capability for irregularly shaped targets.
[0115] In terms of training strategy, a hierarchical learning rate optimization method was adopted: the first two stages of the backbone network were frozen to preserve the base class feature representation; a base learning rate of 0.6 was set for the feature pyramid network to stabilize multi-scale feature fusion; a learning rate of 2.0 was set for the strip convolutional module to accelerate the learning of directional features; and a learning rate of 3.0 was set for the detection head to promote rapid adaptation to new categories. An initial learning rate of 0.0012 was used during optimization, and training stability was achieved through 800 iterations of linear warm-up. Learning rate decay was implemented in the 95th cycle, with a total training cycle of 108 rounds.
[0116] Content-Aware Striped Pyramid (CASP) is used to fuse and enhance multi-scale feature maps, generating robust multi-level enhanced feature maps, including:
[0117] A strip convolutional module is integrated at each output scale of the FPN_CARAFE network, and the set of multi-scale feature maps output by the backbone network is denoted as . The input features are processed by the FPN_CARAFE base network. This process generates a preliminary set of multi-scale feature maps through top-down path fusion and content-aware upsampling. ;exist Based on this, it is generated through a convolutional layer with a stride of 2. and in Based on further downsampling, generate Then we have:
[0118]
[0119] In the formula, The input is fed into the strip convolution module and generated by FPN_CARAFE. Hierarchical original feature map, For the backbone network in the first Feature maps output at each stage It is a pyramid hierarchy. For the forward propagation function of the FPN_CARAFE network, the feature map of each layer... They are independently fed into a corresponding strip convolution module for enhancement;
[0120] The strip convolution module performs the following operations: employs a bidirectional decomposition convolution strategy to extract spatial features in both the horizontal and vertical directions in parallel; normalizes the output feature maps in the horizontal and vertical directions respectively; fuses the normalized horizontal and vertical feature maps through channel concatenation; and adds the fused feature map to the input feature map of the strip convolution module through residual connection to generate an enhanced feature map.
[0121] The bidirectional decomposition convolution strategy includes:
[0122] For the input feature map Convolution operations are performed using horizontal and vertical convolution kernels respectively to obtain horizontal and vertical feature maps.
[0123] Among them, the convolution outputs in both the horizontal and vertical directions and Calculated separately as follows:
[0124]
[0125]
[0126] In the formula, and These represent the kernel size as follows: and Convolution operation, and Representing the first Output feature maps of horizontal and vertical strip convolutional branches at each level.
[0127] Normalization of the output feature maps in the horizontal and vertical directions includes:
[0128] Batch normalization and ReLU activation are performed on the horizontal and vertical feature maps respectively, as shown in the following expressions:
[0129]
[0130]
[0131]
[0132] In the formula, For horizontal features, It is a vertical feature. For feature maps, For batch normalization operation; To modify the activation function of the linear unit, a nonlinear transformation is introduced into the network to enhance its representation ability; For the concatenation operation along the channel dimension, the normalized and activated horizontal features are... and vertical features Merging them forms a feature map that incorporates bidirectional spatial context information. If the number of output channels for each branch is ,but The number of channels is ;
[0133] The channel stitching involves stitching together the batch-normalized and activated horizontal and vertical feature maps along the channel dimension; the fused features are then connected via residual connections. Input of the strip convolution module The features are added together to generate the final enhanced features for that level. The expression is:
[0134]
[0135] In the formula, The input is fed into the strip convolution module and generated by FPN_CARAFE. The original feature map at each level; this residual addition operation constructs a shortcut path, allowing the strip convolutional module to learn only the residual between the input and output without needing to learn the complete feature transformation. .
[0136] Using the enhanced feature map as input, a deformable attention region proposal network (DCN-Attention RPN) generates high-quality candidate region features, including:
[0137] Deformable convolution is used to perform geometric adaptive perception on the feature map, generating sampling points on the feature map that adapt to the deformation of the target, thereby generating geometrically enhanced features;
[0138] Geometric enhancement features are reweighted in spatial dimensions using a spatial attention mechanism to generate attention-weighted features;
[0139] The original features and attention-weighted features are fused through residual connections to generate candidate region features.
[0140] Geometric adaptive sensing of feature maps using deformable convolution includes:
[0141] Given an input image, standard convolution at position The output at this location is:
[0142]
[0143] In the formula, Convolution at position The output feature value, Define the regular receptive field of the convolution kernel. The first in the convolution kernel The position of each sampling point is offset relative to the center. For the convolution kernel at the sampling position The weight of the position, This refers to the pixel value at the corresponding sampling location on the input feature map.
[0144] In deformable convolution, for each sampling point Introduce an adaptive offset and a modulation scalar The output then becomes:
[0145]
[0146] offset With modulation scalar Both are derived from input features through parallel convolutional layers. The learning process involves adjusting the standard convolution sampling positions using offset and modulation scalars to generate geometrically enhanced features.
[0147] The spatial dimensions of geometrically enhanced features are reweighted using a spatial attention mechanism, including:
[0148] Through a convolution kernel The convolutional layer generates a spatial weight map, expressed as:
[0149]
[0150] In the formula, The output features of deformable convolution; Use the Sigmoid activation function to ensure the weight values ; Use attention maps to recalibrate the spatial dimensions of features:
[0151]
[0152] In the formula, For element-wise multiplication, the attention map A is operated on along the channel dimension; attention-weighted features are obtained by performing element-wise multiplication between the spatial weight map and the geometric enhancement features. .
[0153] Fusing raw features with attention-weighted features via residual connections includes:
[0154] The output features of deformable convolutions are fused with the spatial attention-weighted features, where the output features of deformable convolutions are passed through a shortcut path, and the fused features are... The calculation is as follows:
[0155]
[0156] In the formula, 1 is an all-1 matrix with the same dimension as A.
[0157] Specifically, in the embodiments of the present invention, the specific implementation of the Content-Aware Striped Pyramid (CASP) is as follows: The first innovation of the present invention relates to an enhanced feature pyramid network for target detection in remote sensing images. This network constructs a novel architecture that can simultaneously optimize multi-scale feature resolution and directional feature extraction capabilities by organically integrating a content-aware upsampling module and a bidirectional striped convolution module, specifically optimized for multi-scale targets commonly found in remote sensing images.
[0158] The infrastructure is based on the CARAFE Feature Pyramid Network (FPN_CARAFE), a key technology for solving the multi-scale problem in object detection. It fuses deep, semantically strong but low-resolution features with shallow, high-resolution but semantically weak features through a top-down path and lateral connections. Traditional FPNs typically use nearest neighbor or bilinear interpolation for upsampling; these methods are content-agnostic and have fixed receptive fields, making it difficult to recover fine spatial details.
[0159] This invention uses FPN_CARAFE as its basic architecture. CARAFE (Content-Aware ReAssembly of Features) is a lightweight and efficient content-aware upsampling operator. Its core idea is to dynamically generate an upsampling kernel based on the content of the input features, rather than using a fixed interpolation kernel.
[0160] Let the input feature map to be upsampled be... Upsampling rate The operation of CARAFE consists of two steps:
[0161] (1) Upsampling kernel prediction: First, a lightweight convolutional module is used to predict the output feature map for each location based on the local context of the input features. Predict a unique nucleus ,in, This is the upsampling kernel size. This step can be formally represented as:
[0162]
[0163] in, It is the predicted kernel tensor.
[0164] (2) Content-aware reorganization: Then, for each target location on the output feature map, based on the predicted kernel... For the corresponding input The region is weighted and reorganized to generate the output value at that location. The reorganization process can be represented as follows:
[0165]
[0166] in, It outputs the spatial location. This corresponds to the input position. By introducing CARAFE, FPN_CARAFE can adaptively upsample according to the feature content, better preserving and restoring the edge and detail information of the target while amplifying the feature map, providing a high-quality multi-scale feature map for subsequent accurate detection.
[0167] Building upon FPN_CARAFE, a feature enhancement module, the Bidirectional Strip Convolution Module (BSCM), is proposed. Although FPN_CARAFE provides high-quality multi-scale features, traditional square convolution kernels struggle to efficiently capture the long-range, directional structural information of strip-shaped targets (such as roads, rivers, and airport runways) in remote sensing images due to their isotropic receptive fields.
[0168] To address this, the present invention employs a bidirectional striped convolution module (BSCM). This module adopts a bidirectional, separate parallel structure design, comprising two independent branches: horizontal striped convolution and vertical striped convolution. Let the input feature map be... .
[0169] (1) The horizontal strip convolution branch uses a size of One-dimensional convolution kernel (where The kernel size is 7, and its convolution weights are... This operation performs dense sampling and aggregation in the width dimension, specifically designed to extract continuously extending features of the target in the horizontal dimension, and its output feature map... The calculation formula is:
[0170]
[0171] This operation significantly expands the effective receptive field in the horizontal direction, effectively capturing lateral structures.
[0172] (2) The vertical strip convolution branch uses a size of A one-dimensional convolution kernel with convolution weights of . This operation performs dense sampling and aggregation in the height dimension, specifically designed to extract the spatial distribution features of the target in the vertical dimension, and its output feature map... The calculation formula is:
[0173]
[0174] in, .
[0175] To ensure training stability and gradient flow in deep networks, this module introduces an identity residual connection. Let the module's input be... The output after bidirectional striped convolution followed by batch normalization (BN) and ReLU activation is: Then the module's final output Defined by the following residual learning formula:
[0176]
[0177] This mechanism ensures that gradients can propagate directly through shortcut paths, mitigating the vanishing gradient problem and allowing modules to be easily inserted into any existing network.
[0178] Furthermore, this invention deeply fuses the two components mentioned above to construct a Content-Aware Striped Pyramid Network (CASPN). Its fusion strategy is cascaded: first, high-quality, content-aware multi-scale feature maps are generated using FPN_CARAFE, and then directional feature enhancement is immediately performed on these feature maps using BSCM.
[0179] Specifically, for the output of FPN_CARAFE, the first Feature maps at each scale The enhanced feature map is then input into the corresponding BSCM module. This process can be formally described as follows:
[0180]
[0181] in, Indicates the generation of the first Layer feature maps , This represents the strip convolution module at the corresponding scale.
[0182] This cascaded design of "optimizing resolution first, then enhancing geometric features" has clear physical significance. Basic Guarantee: FPN_CARAFE first ensures that the feature maps input to the BSCM have high resolution and rich spatial details, providing a high-quality data foundation for subsequent strip convolutions. Targeted Enhancement: The BSCM then selectively enhances the horizontal and vertical contextual information on these high-quality features, making its feature response to strip-shaped targets more significant. Finally, the network outputs a set of multi-scale feature pyramids that have undergone content-aware upsampling and directional feature enhancement. This feature pyramid possesses rich semantic information, fine spatial details, and high sensitivity to directional structures, thus significantly improving the detection and shape delineation accuracy of typical remote sensing targets such as roads, bridges, rivers, and airstrips. All modules support parameter configuration, ensuring flexibility and adaptability in different application scenarios.
[0183] Specifically, in the embodiments of the present invention, such as Figure 4 As shown, the specific implementation of the Deformable Attention Region Proposal Network (DCN-Attention RPN) is as follows: The second innovation of this invention relates to an enhanced architecture for a region proposal network for high-precision target detection, specifically addressing innovative solutions to problems such as target deformation and background interference in complex scenes. This network organically integrates the geometrically adaptive perception capability of deformable convolution with the feature selection capability of spatial attention mechanisms, and supplements it with residual feature fusion design to construct a candidate box generator capable of accurately handling target deformation and complex backgrounds. While maintaining computational efficiency, this architecture significantly improves the recall rate and localization accuracy of various targets in complex environments such as remote sensing images and natural scenes, providing a high-quality candidate region foundation for subsequent detection tasks.
[0184] 1. Deformable Convolution for Geometric Adaptation module;
[0185] The standard convolution operation in traditional convolutional neural networks has inherent limitations due to its fixed geometric structure, and it performs poorly when dealing with common real-world problems such as target deformation, scale changes, and arbitrary orientations. This rigid sampling mechanism severely restricts the model's ability to model complex geometric transformations. To address this fundamental problem, this module innovatively introduces the advanced concept of Deformable Convolutional Networks (DCN). By dynamically adjusting the sampling position of the convolution kernel, it endows the network with the ability to adaptively distribute the receptive field, thereby achieving accurate feature extraction from targets of arbitrary shapes.
[0186] Specifically, a dynamic offset learning mechanism is introduced. Let the input feature map be... ,in, Indicates the number of feature channels. and These represent the height and width of the feature map, respectively. In a standard... In the convolution operation, for each position of the output feature map Its sampling grid is constrained to a fixed set of rules. In total, it contains Each sampling point has a set of positional offsets. The core breakthrough of deformable convolution lies in the introduction of a parallel offset learning branch, which autonomously learns a set of positional offsets for each sampling point through a dedicated convolutional layer. This offset field The generation process can be precisely described as follows:
[0187]
[0188] in, It is a The linear transformation of the convolution kernel has a carefully designed number of output channels. (Regarding the standard) Regarding convolution kernels, Therefore, the number of output channels is 18, which ensures that a complete set of 9 two-dimensional offset vectors are generated for each spatial location in the feature map, fully covering the entire receptive field of the convolution kernel.
[0189] Furthermore, a geometrically adaptive feature extraction process is introduced. After obtaining the learned offset field, the execution method of deformable convolution undergoes a fundamental change. For the output feature map... In position The response value at a given location is no longer limited to a weighted sum of regular grid points, but is extended to a dynamic sampling location determined by the offset. This innovative feature extraction process can be formally described as:
[0190]
[0191] in, Represents the learnable main convolution weights. It is a predefined relative position within a standard grid. This is achieved by introducing learnable offsets. The convolutional kernel gains the ability to dynamically adjust its sampling position based on the input features, intelligently "stretching," "bending," or "rotating" its receptive field to more accurately cover the actual geometric contours of the target. This geometrically adaptive characteristic enables the network to achieve more accurate feature representation when facing complex targets of arbitrary orientation and shape.
[0192] 2. Spatial Attention for Feature Selection Module;
[0193] While deformable convolution modules significantly improve feature extraction for deformable targets through their geometric adaptation capabilities, their output feature maps inevitably contain a large amount of background noise information irrelevant to the detection task. To further improve the quality of feature representation, this innovation introduces a lightweight yet highly effective spatial attention mechanism after the deformable convolution operation. This mechanism acts as a sophisticated feature filter, autonomously emphasizing the foreground target region while suppressing irrelevant background interference.
[0194] Specifically, the first step is the generation of the spatial attention map. The core component of this spatial attention module is an independent... A convolutional layer designed with specific parameter configurations: its number of input channels and deformable convolutional output feature map. The number of channels remains constant, while the number of output channels is precisely set to 1. This design allows the convolutional layer to compress multi-channel feature information into a single-channel saliency map while maintaining spatial resolution. Subsequently, a sigmoid activation function is applied... Normalize the original response value of the convolution output to Within a continuous interval, the final spatial attention map is generated. This complete calculation process can be described as follows:
[0195]
[0196] in, This represents the learnable weight parameters of the attention convolutional layer. The generated attention map. It has a clear probabilistic interpretation: each of its scalar elements It represents the corresponding spatial location in the input feature map. The confidence score for a region belonging to the salient target area. When a certain location... The closer the value is to 1, the more important the feature at that location is to the current detection task, and it should be enhanced and preserved in subsequent processing.
[0197] Furthermore, feature modulation and selective enhancement mechanisms are introduced. This is done after obtaining the spatial attention map. Subsequently, this invention performs element-wise multiplication on the original deformable convolution output features. Fine-tuning is performed. This feature selection process can be precisely described as:
[0198]
[0199] in, This represents an element-wise multiplication operation. This operation implements a dynamic feature selection and enhancement mechanism: in regions with high response values in the spatial attention map (corresponding to potential foreground objects), the feature amplitude is preserved or further enhanced; while in low-response regions (corresponding to irrelevant background or noise), the feature amplitude is significantly suppressed. This adaptive feature modulation strategy enables the network to autonomously focus computational resources on the semantic regions in the image most relevant to the task, greatly improving the signal-to-noise ratio of feature representation, while enhancing the model's robustness to complex background interference and intra-class appearance changes.
[0200] 3. Residual Feature Fusion Design;
[0201] When introducing new functional modules into a deep learning architecture, their potential impact on the integrity of information flow and the stability of gradient propagation must be carefully considered. To maximize the preservation of the integrity of the original features and ensure the stability of the training process while introducing the aforementioned enhancement modules, this invention employs a carefully designed residual feature fusion strategy. This strategy enhances features while rigorously ensuring the reliability of information transmission.
[0202] Specifically, a dual-path feature fusion mechanism is first employed. After the spatial attention module completes feature modulation, this invention does not directly use the modulated features. Instead of using it as the final output, it creatively combines it with the original output of deformable convolution. By fusing elements through element-wise addition, an effective residual learning path is constructed. This carefully designed fusing process can be formally defined as:
[0203]
[0204] Identity path: As a direct and fast connection, it acts as a "highway" for information transmission, ensuring that the original feature information extracted by the geometric adaptation module can be transmitted completely and without loss to deeper layers of the network, effectively preventing information attenuation or loss that may occur due to the attention mechanism. Attention path: It provides spatially filtered and semantically enhanced target region features, rich in local salient information crucial for the detection task. Co-enhancement effect: Through a simple element-wise addition operation, the final fused features... Simultaneously, it contains rich global contextual information (mainly from the identity path) and focused local salient features (mainly from the attention path), achieving complementarity and synergistic enhancement of two different granularity feature information, thus producing " The characteristic representation effect of "".
[0205] Furthermore, it possesses training stability guarantees and gradient optimization. This residual structure strictly adheres to the fundamental principles of deep residual learning, allowing the entire complex "DCN-Attention" composite module to be reinterpreted as learning a residual mapping function about the original DCN features. This reconstructive perspective brings crucial training stability guarantees: even under the worst-case scenario (e.g., improper initialization of the attention module parameters or failure to converge in the early stages of training), the module's output can stably degenerate into an approximately identity mapping, i.e.:
[0206] (when hour)
[0207] This inherent "identity mapping" failure mode ensures that training this module will not produce worse performance than the original network, fundamentally eliminating the risk of gradient vanishing or exploding caused by adding complex modules. This allows the high-performance but training-sensitive attention mechanism to be safely and stably integrated into deep region proposal networks.
[0208] In summary, this invention achieves a powerful and robust feature learning unit through the precise collaboration and deep coupling of three sub-modules: a deformable convolutional geometric adaptive module, a spatial attention feature selection module, and a residual feature fusion design. This unit integrates three key capabilities: geometric deformation perception, semantic region focusing, and information integrity preservation, forming a progressive and mutually reinforcing feature learning paradigm. Ultimately, this enables the region proposal network to generate high-quality target candidate boxes in various complex visual scenes, laying a solid technical foundation for building a new generation of high-performance object detection systems.
[0209] S4. Using the remote sensing image to be detected as input, the DA-FSDeT network trained in step S3 is used to obtain the category detection box and confidence score containing small sample categories.
[0210] Example 2, the remote sensing small-sample target detection system based on dual-attention guided transfer learning provided in this embodiment of the invention includes:
[0211] The feature extraction and enhancement module receives the input remote sensing image and outputs an enhanced multi-level feature map. This module specifically includes:
[0212] The ResNet-101 backbone network is used to extract initial multi-scale features from the input image;
[0213] The feature pyramid network and content-aware upsampling module are connected to the ResNet-101 backbone network to fuse and upsample the initial multi-scale features, generating a preliminary multi-scale feature map.
[0214] The content-aware strip pyramid module is integrated into each output scale of the feature pyramid network. It enhances the initial multi-scale feature map through strip convolution and residual connection, generating enhanced multi-level feature maps.
[0215] The candidate region generation module, connected to the feature extraction and enhancement module, is used to receive enhanced multi-level feature maps and generate high-quality candidate region features. This module includes a deformable attention region proposal network, which processes the input features through deformable convolution and spatial attention mechanisms.
[0216] The detection head module, connected to the candidate region generation module, is used to output a category detection box containing a small sample category and its confidence score based on the candidate region features.
[0217] Preferably, each strip convolutional unit in the content-aware strip pyramid module includes:
[0218] Bidirectional decomposition convolutional layers are used to perform horizontal and vertical strip convolutions on the input feature maps in parallel, generating horizontal and vertical feature maps respectively.
[0219] The normalization and activation layer, connected to the bidirectional decomposition convolutional layer, is used to perform batch normalization and ReLU activation on the horizontal and vertical feature maps, respectively.
[0220] The feature fusion layer, connected to the normalization and activation layer, is used to stitch together the processed horizontal and vertical feature maps along the channel dimension.
[0221] The residual connection adder is used to add the output of the feature fusion layer to the input feature map of the strip convolutional unit to generate the final output of the unit.
[0222] Preferably, the deformable attention region proposal network includes:
[0223] Deformable convolutional units are used to dynamically adjust the convolution sampling position by learning offsets and modulation scalars from the input feature map, thereby generating geometrically adaptive feature maps.
[0224] Spatial attention units, connected to deformable convolutional units, are used to generate spatial weight maps and reweight geometrically adaptive feature maps to highlight foreground target regions.
[0225] The feature fusion unit fuses the geometrically adaptive feature map with the weighted output of the spatial attention unit through residual connections to generate high-quality candidate region features.
[0226] Preferably, the spatial attention unit includes:
[0227] A 1×1 convolutional layer is used to reduce the dimensionality of the input features;
[0228] A sigmoid activation function layer, connected to a 1×1 convolutional layer, is used to generate weight values. Spatial weight map;
[0229] An element-wise multiplier is used to multiply the spatial weight map with the feature map input to the spatial attention unit.
[0230] Preferably, the detection head module includes:
[0231] The classification branch, consisting of a fully connected layer or a convolutional layer, is used to output the classification score for each candidate region.
[0232] The regression branch, consisting of a fully connected layer or a convolutional layer, is used to predict the bounding box parameters of each candidate region.
[0233] To verify the effectiveness of the improved strategy, ablation experiments were further conducted, as shown in Table 1. The backbone network used was the lightweight ResNet-101 architecture, and the baseline model was SAE-FSDeT. CASP represents the proposed content-aware strip pyramid. DCN-Attention RPN is the proposed deformable attention region proposal network. The performance was verified using the evaluation metric NmAP.
[0234] Table 1 Ablation Experiment
[0235]
[0236] Table 2 compares the results of the method of this invention with those of other methods, including FSOD, FSCE, and ICPE. The table shows that the method of this invention exhibits better results in remote sensing target detection. Furthermore, it reports the accuracy values for different splits and shot numbers, demonstrating the good generalization ability of the method.
[0237] Table 2. Comparison of results of the method of the present invention with other methods on the DIOR dataset.
[0238]
[0239] This invention also conducted comparative experiments on the NWPU VHR-10 dataset, comparing the performance of the proposed DA-FSDeT method with various few-shot object detection methods, including Meta-RCNN and FsDetView. The experimental results for all comparison methods are shown in Table 3. It can be observed that the proposed DA-FSDeT method outperforms all comparison methods under all sample settings. With only 3 labeled instances, the mean average accuracy (mAP) of DA-FSDeT reaches 60.05%, and with 20 labeled instances, the mean average accuracy (mAP) reaches 85.56%, demonstrating that our proposed method improves accuracy even with very few shots. The experimental results on the NWPU VHR-10 dataset are shown in Table 3 below.
[0240] Table 3. Comparison of results of the method of the present invention with other methods on the NWPU VHR-10 dataset.
[0241]
[0242] In addition, the present invention also conducted a visualization experiment of the detection results. Figure 5 This invention demonstrates the visualization results based on the DIOR dataset. Figure 6 The visualization results of this invention based on the NWPU VHR-10 dataset are presented. The visualization results show that the method of this invention achieves significant improvement in target detection at different scales and orientations, verifying the effectiveness of Gaussian label assignment and regression strategies.
[0243] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention and within the spirit and principles of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A remote sensing small-sample target detection method based on dual-attention guided transfer learning, characterized in that, This method constructs a content-aware strip pyramid network and enhances multi-scale feature representation through content-aware upsampling and bidirectional strip convolution; Design a deformable attention region proposal network to improve the localization accuracy of complex targets through deformable convolution and spatial attention mechanisms; Specifically, the following steps are included: S1, acquire the remote sensing image dataset and perform preprocessing; S2, using the preprocessed remote sensing image training set as input, constructs a basic detection model using ResNet-101 backbone network, feature pyramid network, content-aware upsampling FPN_CARAFE, and region proposal network RPN, and obtains the basic model parameters; S3, using the obtained basic model parameters as input, train the remote sensing few-shot target detection network DA-FSDeT based on dual attention guided transfer learning, based on the content-aware strip pyramid CASP and the deformable attention region proposal network DCN-Attention RPN. S4 uses the remote sensing image to be detected as input and the trained DA-FSDeT network to obtain the category detection box and confidence score containing a small number of categories.
2. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 1, characterized in that, In step S2, multi-scale feature maps are extracted from the input remote sensing image using the ResNet-101 backbone network.
3. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 1, characterized in that, In step S3, the content-aware strip pyramid (CASP) is used to fuse and enhance the multi-scale feature maps, generating robust multi-level enhanced feature maps, including: A strip convolutional module is integrated at each output scale of the FPN_CARAFE network, and the set of multi-scale feature maps output by the backbone network is denoted as . The input features are processed by the FPN_CARAFE base network. This process generates a preliminary set of multi-scale feature maps through top-down path fusion and content-aware upsampling. ;exist Based on this, it is generated through a convolutional layer with a stride of 2. and in Based on further downsampling, generate Then we have: ; In the formula, The input is fed into the strip convolution module and generated by FPN_CARAFE. Hierarchical original feature map, For the backbone network in the first Feature maps output at each stage It is a pyramid hierarchy. For the forward propagation function of the FPN_CARAFE network, the feature map of each layer... They are independently fed into a corresponding strip convolution module for enhancement; The strip convolution module performs the following operations: employs a bidirectional decomposition convolution strategy to extract spatial features in both the horizontal and vertical directions in parallel; normalizes the output feature maps in the horizontal and vertical directions respectively; fuses the normalized horizontal and vertical feature maps through channel concatenation; and adds the fused feature map to the input feature map of the strip convolution module through residual connection to generate an enhanced feature map.
4. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 3, characterized in that, The bidirectional decomposition convolution strategy includes: For the input feature map Convolution operations are performed using horizontal and vertical convolution kernels respectively to obtain horizontal and vertical feature maps. Among them, the convolution outputs in both the horizontal and vertical directions and Calculated separately as follows: ; ; In the formula, and These represent the kernel size as follows: and Convolution operation, and Representing the first Output feature maps of horizontal and vertical strip convolutional branches at each level.
5. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 3, characterized in that, Normalization of the output feature maps in the horizontal and vertical directions includes: Batch normalization and ReLU activation are performed on the horizontal and vertical feature maps respectively, as shown in the following expressions: ; ; ; In the formula, For horizontal features, It is a vertical feature. For feature maps, For batch normalization operation; To modify the activation function of the linear unit, a nonlinear transformation is introduced into the network to enhance its representation ability; For the concatenation operation along the channel dimension, the normalized and activated horizontal features are... and vertical features Merging them forms a feature map that incorporates bidirectional spatial context information. If the number of output channels for each branch is ,but The number of channels is ; The channel stitching involves stitching together the batch-normalized and activated horizontal and vertical feature maps along the channel dimension; the fused features are then connected via residual connections. Input of the strip convolution module The features are added together to generate the final enhanced features for that level. The expression is: ; In the formula, The input is fed into the strip convolution module and generated by FPN_CARAFE. The original feature map at each level; this residual addition operation constructs a shortcut path, allowing the strip convolutional module to learn only the residual between the input and output without needing to learn the complete feature transformation. .
6. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 1, characterized in that, In step S3, using the enhanced feature map as input, high-quality candidate region features are generated through the Deformable Attention Region Proposal Network (DCN-Attention RPN), including: Deformable convolution is used to perform geometric adaptive perception on the feature map, generating sampling points on the feature map that adapt to the deformation of the target, thereby generating geometrically enhanced features; Geometric enhancement features are reweighted in spatial dimensions using a spatial attention mechanism to generate attention-weighted features; The original features and attention-weighted features are fused through residual connections to generate candidate region features.
7. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 6, characterized in that, Geometric adaptive sensing of feature maps using deformable convolution includes: Given an input image, standard convolution at position The output at this location is: ; In the formula, Convolution at position The output feature value, Define the regular receptive field of the convolution kernel. The first in the convolution kernel The position of each sampling point is offset relative to the center. For the convolution kernel at the sampling position The weight of the position, The input is the pixel value at the corresponding sampling location on the feature map; In deformable convolution, for each sampling point Introduce an adaptive offset and a modulation scalar The output then becomes: ; offset With modulation scalar Both are derived from input features through parallel convolutional layers. The learning process involves adjusting the standard convolution sampling positions using offset and modulation scalars to generate geometrically enhanced features.
8. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 6, characterized in that, The spatial dimensions of geometrically enhanced features are reweighted using a spatial attention mechanism, including: Through a convolution kernel The convolutional layer generates a spatial weight map, expressed as: ; In the formula, The output features of deformable convolution; Use the Sigmoid activation function to ensure the weight values ; Use attention maps to recalibrate the spatial dimensions of features: ; In the formula, For element-wise multiplication, the attention map A is operated on along the channel dimension; attention-weighted features are obtained by performing element-wise multiplication between the spatial weight map and the geometric enhancement features. .
9. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 6, characterized in that, Fusing raw features with attention-weighted features via residual connections includes: The output features of deformable convolutions are fused with the spatial attention-weighted features, where the output features of deformable convolutions are passed through a shortcut path, and the fused features are... The calculation is as follows: ; In the formula, 1 is an all-1 matrix with the same dimension as A.
10. The remote sensing small-sample target detection method based on dual-attention guided transfer learning according to claim 7, characterized in that, In step S3, the detection head outputs the classification score of each candidate region through the classification branch and predicts the bounding box parameters of each candidate region through the regression branch.
Citation Information
Cited By
Textile fiber component analysis system and method based on machine learning
CN121999904A
A machine learning based textile fiber composition analysis system and method
CN121999904B
Small sample detection method based on visual basic model
CN122116014A
A small sample detection method based on a visual base model
CN122116014B