A method and device for few-shot object detection of remote sensing images

By strengthening the features of small targets through deep convolution and group attention strategies, and combining a semantic regression refinement module with geometric prior constraints, the problem of insufficient accuracy and robustness of target detection in remote sensing images is solved, and efficient target detection with few samples is achieved.

CN122176535BActive Publication Date: 2026-08-04AEROSPACE INFORMATION RES INST CAS
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AEROSPACE INFORMATION RES INST CAS
Filing Date
2026-05-12
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing deep learning methods are difficult to train effectively on remote sensing images, resulting in decreased target detection accuracy and insufficient robustness, especially in the case of small targets and complex backgrounds. Furthermore, existing few-shot detection frameworks suffer from poor anchor box matching and insufficient feature fusion in remote sensing image applications.

Method used

A deep convolutional and grouped attention strategy is adopted to enhance the features of small targets. Combined with a semantic regression refinement module with geometric prior constraints, a two-stage training is performed through the DINOv3 backbone network, the small target enhancement module and the DEIMv2 detector to improve the target detection performance of remote sensing images.

Benefits of technology

It significantly improves the accuracy and robustness of small target detection in remote sensing imagery, reduces missed detections and redundant candidate boxes, enhances the accuracy and stability of target localization in complex backgrounds, and adapts to the variable target characteristics of remote sensing imagery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176535B_ABST
    Figure CN122176535B_ABST
Patent Text Reader

Abstract

The application discloses a kind of for remote sensing image few-sample target detection method and device, belong to computer vision and remote sensing image processing technical field.The method uses DEIMv2 end-to-end detection architecture based on Transformer, discards preset anchor frame, directly predicts boundary frame by target query.First, use DINOv3 pre-trained on remote sensing dataset as backbone network to extract multi-scale features.Then, design lightweight small target enhancement module, strengthen small target details in high-resolution feature map through depth convolution and grouping attention.Finally, propose semantic regression refining module, encode the geometric properties of boundary frame into semantic vector, and jointly optimize with visual features to achieve fine coordinate correction.The application realizes high-precision detection of multi-scale, small-size targets in remote sensing images under a small number of labeled samples, significantly improves the detection performance and generalization ability under few-sample conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and remote sensing image processing technology, specifically relating to a method and apparatus for few-sample target detection in remote sensing images, applicable to few-sample target detection tasks in scenarios such as satellite imagery and aerial photography. Background Technology

[0002] With the rapid development of aerospace technology, the amount of remote sensing image data has increased dramatically. Deep learning-based target detection technology has become a key means to achieve automated image interpretation. However, existing deep learning methods heavily rely on large-scale manually labeled data for training. In practical applications such as natural disaster emergency response and military reconnaissance, obtaining sufficient and high-quality labeled data is often costly and time-consuming, making it difficult to train models effectively and easily leading to serious overfitting and decreased detection accuracy.

[0003] To address the aforementioned data bottlenecks, few-shot object detection methods have emerged. Their core idea is to fully leverage prior knowledge from limited samples by optimizing network structure and training strategies, thereby achieving effective learning and rapid generalization with limited labeled data. For example, existing research (such as Chinese Patent Publication No. CN119888196A) proposed a strategy within the Faster R-CNN framework, employing a dual-branch evolutionary module and a category-separating ROI detector, aiming to improve new category detection capabilities while mitigating catastrophic forgetting of learned basic categories.

[0004] However, directly transferring a few-shot detection framework designed for natural scenes to the field of remote sensing imagery still faces many inherent challenges, resulting in limited detection performance. First, existing methods generally generate candidate regions based on anchor frames with preset aspect ratios. However, ground objects in remote sensing images (such as vehicles, ships, buildings, and farmland) vary greatly in scale and shape, making it difficult for fixed anchor frames to match them well. This leads to numerous missed detections or the introduction of redundant background interference, becoming a core bottleneck restricting accuracy. Second, while general feature pyramid networks can fuse multi-scale information, their indiscriminate fusion strategy fails to specifically enhance the details and edge features of small objects, causing key discriminative information to be diluted or obscured during feature transfer, given the abundance and weak features of small targets in remote sensing images. Third, the bounding box regression mechanism of mainstream models relies solely on local visual features, lacking explicit modeling of the target's geometric structure and spatial distribution. Under target deformation, occlusion, or background clutter interference, the localization robustness is significantly insufficient, a problem particularly prominent under few-shot conditions.

[0005] Therefore, there is an urgent need for a new technical solution that can fundamentally adapt to the characteristics of remote sensing images and achieve high-precision and high-robust target detection under conditions of few samples. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention provides a method and apparatus for few-sample target detection in remote sensing images. By employing deep convolution and group attention strategies, the salience of small targets in multi-scale feature maps is enhanced without significantly increasing computational burden. By introducing geometric prior constraints, the over-reliance on purely visual features is reduced, improving the model's robustness to occluded and deformed targets. While maintaining a lightweight model, a fine-tuning method is used to achieve rapid convergence and high-precision detection with a small number of labeled samples, significantly improving the generalization ability for small and sparse targets in remote sensing visible light images.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] A method for few-sample target detection in remote sensing imagery, the method comprising:

[0009] Step 1: Input the remote sensing image into the target detection model, which includes the following cascaded components: a pre-trained DINOv3 backbone network, a small target enhancement module, a DEIMv2 detector, and a semantic regression refinement module. The DINOv3 backbone network extracts multi-level features from the remote sensing image and constructs a multi-scale feature pyramid. The small target enhancement module enhances the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid. The DEIMv2 detector processes the enhanced multi-scale feature map and outputs the initial bounding box coordinates and category of the target. The semantic regression refinement module refines the initial bounding box coordinates based on geometric semantics and outputs the final detection result.

[0010] Step 2: Perform two-stage training on the object detection model, including basic training of the entire object detection model based on a richly labeled base class dataset, and fine-tuning training of some network parameters of the object detection model based on a small number of labeled samples of new categories.

[0011] Step 3: Input the image to be recognized into the target detection model after the two-stage training, and output the detection results.

[0012] Furthermore, in step 1, the small target enhancement module is used to enhance the features of the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid, including: performing a depthwise separable convolution operation on the input feature map; uniformly dividing the convolutional feature map into several groups along the channel dimension, performing one-dimensional convolution on each group of features, and then concatenating them; performing global average pooling on the concatenated feature map, and generating a channel attention weight vector through a gating unit containing a fully connected layer and a Sigmoid activation function; multiplying the channel attention weight vector with the concatenated feature map channel by channel, and performing residual concatenation with the original input feature map to output the enhanced feature map.

[0013] Furthermore, in step 1, the DEIMv2 detector is an end-to-end detector based on the Transformer architecture. It does not use a preset anchor box mechanism. Instead, it interacts with a set of learnable target queries and multi-scale features output by the encoder to directly decode the target's category and bounding box coordinates.

[0014] Furthermore, in step 1, the semantic regression refinement module is used to refine the initial bounding box coordinates based on geometric semantics, and the output of the final detection result includes: deconstructing the initial bounding box coordinates into a multi-dimensional geometric feature vector containing center point coordinates, width and height, area, aspect ratio, diagonal length, distance from the center point to the image center, distance to the four boundaries of the image, and the minimum value of these features; mapping the geometric feature vectors to high-dimensional semantic coding features through at least one encoding sub-network containing linear transformation, nonlinear activation, and random deactivation; adding positional encoding to the high-dimensional semantic coding features, and performing self-attention modeling and feature fusion through at least one Transformer encoder layer; reducing the dimensionality of the fused features through a linear layer, and selecting the maximum probability index of the last dimension of each row of features for embedding encoding, and performing residual concatenation with the dimensionality-reduced features; inputting the residual-concatenated features into a sequence generator, decoding and outputting the coordinate offset corresponding to each initial bounding box; adding the coordinate offset to the initial bounding box coordinates to obtain the final refined bounding box coordinates.

[0015] Furthermore, in step 2, the basic training phase specifically includes:

[0016] The object detection model is trained globally using a base class dataset with rich annotations;

[0017] During training, the parameters of the DINOv3 backbone network are updated using a learning rate lower than that of other modules in the model, while the parameters of the small target enhancement module, the DEIMv2 detector, and the semantic regression refinement module are updated using a normal learning rate.

[0018] Furthermore, in step 2, the fine-tuning training phase employs a selective unfreezing strategy, specifically including:

[0019] Freeze most of the parameters of the DINOv3 backbone network;

[0020] Unfreeze and update the parameters of the following parts: all parameters of the small target enhancement module, core layer parameters of the feature pyramid network in the DEIMv2 detector, parameters of the classification and regression prediction head and the last decoding layer of the DEIMv2 detector decoder, and all trainable parameters of the semantic regression refinement module.

[0021] Furthermore, the method employs a composite loss function during training, specifically a weighted sum of the following four losses:

[0022] The loss output of the DEIMv2 detector encoder includes the L1 loss and generalized intersection-union ratio loss for predicted bounding boxes, as well as the binary cross-entropy loss for class prediction.

[0023] The auxiliary loss output of each layer of the DEIMv2 detector decoder is calculated in the same way as the encoder loss.

[0024] The prediction loss of the final output of the DEIMv2 detector is calculated in the same way as the encoder loss.

[0025] The refinement loss output by the semantic regression refinement module includes the L1 loss for predicted coordinate offsets and the generalized intersection-union loss.

[0026] On the other hand, the present invention provides a few-sample target detection device for remote sensing images, comprising:

[0027] The model input module is used to input remote sensing images into the target detection model, which includes, in sequence: a pre-trained DINOv3 backbone network, a small target enhancement module, a DEIMv2 detector, and a semantic regression refinement module. The DINOv3 backbone network is used to extract multi-level features from the remote sensing image and construct a multi-scale feature pyramid. The small target enhancement module is used to enhance the features of the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid. The DEIMv2 detector is used to process the enhanced multi-scale feature map and output the preliminary bounding box coordinates and category of the target. The semantic regression refinement module is used to refine the preliminary bounding box coordinates based on geometric semantics and output the final detection result.

[0028] The training module is used to perform two-stage training on the object detection model, including basic training of the entire object detection model based on a richly labeled base class dataset, and fine-tuning training of some network parameters of the object detection model based on a small number of labeled samples of new categories.

[0029] The output module is used to input the image to be recognized into the target detection model after two-stage training and output the detection results.

[0030] Thirdly, the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method for few-sample target detection of remote sensing images.

[0031] Fourthly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned method for few-sample target detection of remote sensing images.

[0032] The beneficial effects of this invention are as follows:

[0033] This approach overcomes the scale limitations of fixed anchor boxes, significantly improving adaptability and detection recall for remotely sensed targets with varying aspect ratios. By employing the Transformer-based end-to-end architecture of DEIMv2, it abandons the traditional preset anchor box mechanism, fundamentally solving the mismatch between the fixed aspect ratio of anchor boxes and the scale and shape of remotely sensed targets in existing Faster R-CNN-like methods. This allows the model to directly learn the global context of the target, making it more robust to detecting novel and extreme-scale targets under limited sample conditions, effectively reducing missed detections and redundant candidate boxes.

[0034] This method achieves targeted enhancement of small target features, effectively improving the ability to distinguish small targets in complex backgrounds. The innovatively designed small target enhancement module addresses the challenge of easily lost small target features in remote sensing images. Through a lightweight combination of deep convolution, grouped attention, and gated residual connections, it specifically enhances small target details and suppresses background interference in high-resolution feature maps. Compared to the "unbiased" fusion of existing feature pyramid networks, this method significantly enhances the representation of small targets in the feature space, improving the model's accuracy in identifying weak targets with limited samples.

[0035] A bounding box optimization mechanism incorporating geometric semantic constraints significantly improves localization accuracy and robustness in complex scenes. The proposed semantic regression refinement module creatively encodes the geometric attributes of the bounding box (such as center, aspect ratio, and edge distance) into transferable semantic vectors, which, together with visual features, drive coordinate correction. This overcomes the limitation of existing methods that rely solely on visual features for regression, introducing stronger structured prior knowledge for target localization. Consequently, it exhibits superior localization stability and accuracy when facing target occlusion, deformation, and background interference, with a particularly significant advantage in scenarios with scarce labeled data and few samples. Attached Figure Description

[0036] Figure 1 This is a flowchart of a method for detecting targets in remote sensing images according to the present invention.

[0037] Figure 2 This is a schematic diagram of the overall architecture of the target detection model proposed in this invention;

[0038] Figure 3 This is a structural diagram of the small target enhancement module of the present invention;

[0039] Figure 4 This is a structural diagram of the semantic regression refinement module of the present invention. Detailed Implementation

[0040] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0041] like Figure 1 As shown, this invention provides a few-sample target detection method for remote sensing imagery. The method first fully trains a target detection model using a base class dataset containing abundant labeled data, enabling the model to learn general target feature representations and localization rules. Then, based on the target detection model trained on the base class, it fine-tunes some key layers of the target detection model using only a small number of labeled samples from the new category, allowing it to quickly adapt to the new category of target detection task. The method includes:

[0042] Step 1: Input the remote sensing image into the target detection model, wherein the target detection model includes the following components in cascade: a pre-trained DINOv3 backbone network, a small target enhancement module, a DEIMv2 detector, and a semantic regression refinement module.

[0043] The DINOv3 backbone network is used to extract multi-level features from the remote sensing images and construct a multi-scale feature pyramid.

[0044] The small target enhancement module is used to perform targeted enhancement on the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid, so as to strengthen the detailed features of small targets.

[0045] The DEIMv2 detector is an end-to-end detector based on Transformer, used to process the enhanced multi-scale feature map and output the preliminary bounding box coordinates and category of the target.

[0046] The semantic regression refinement module is used to refine the initial bounding box coordinates based on geometric semantics and output the final detection result.

[0047] Step 2: Perform two-stage training on the target detection model, including:

[0048] The first stage of basic training involves training the entire object detection model using a base class dataset with rich annotations.

[0049] The second stage, few-sample fine-tuning, involves fine-tuning using a small number of labeled samples of the new category after the basic training. In this stage, the parameters of the early layers of the backbone network are frozen to maintain the stability of the basic feature extraction capability, while the parameters of the later layers of the backbone network, the small target enhancement module, the key layers of the DEIMv2 detector, and the semantic regression refinement module are unfrozen and updated to enable the model to quickly adapt to the detection task of the new category.

[0050] Step 3: Input the image to be recognized into the target detection model after the two-stage training, and output the detection results.

[0051] In step 1, such as Figure 2 The diagram illustrates the overall architecture of the object detection model proposed in this invention. The model's workflow is as follows: the input remote sensing image first undergoes feature extraction via a backbone network to generate a feature pyramid; subsequently, the 1 / 8 stride feature map is fed into a small object enhancement module for enhancement processing; the enhanced feature pyramid enters the DEIMv2 (Real-Time Object Detection Meets DINOv2) detector to generate preliminary bounding box coordinate predictions; finally, these preliminary predictions are fed into a semantic regression refinement module, outputting the final accurate bounding box coordinates and class labels.

[0052] Regarding the feature extraction backbone network, the input remote sensing image I∈R H×W×3 (Height is H, width is W, 3 is the number of channels). Features of the input remote sensing image are extracted using DINOv3 (ViT-L / 16), pre-trained on the large-scale remote sensing dataset sat493m. The output features of layers 8, 14, and 20 of DINOv3 are extracted (counting from layer 0), denoted as {F8, F...}. 14 ,F 20The output dimensions are all (H / 16, W / 16, D1), where D1 is the feature dimension (1024 for ViT-L / 16); for the output features {F8, F... 14 ,F 20 Perform interpolation (such as bilinear interpolation) to generate feature map pyramids {P} with step sizes of 1 / 8, 1 / 16, and 1 / 32. 1 / 8 ,P 1 / 16 ,P 1 / 32 The size of the interpolated feature map ( ). , The calculation is as follows:

[0053] ,

[0054] ,

[0055] Wherein, step size s t =8,16,32.

[0056] Regarding the small target enhancement module, the structure is as follows: Figure 3 As shown, it is specifically designed to enhance 1 / 8 step size feature maps (P 1 / 8 The small target features in the input channel are C. in The input feature map has a shape of [H]. W C in Specifically, it includes three core steps:

[0057] Depthwise convolution: The P-th largest spatial resolution input. 1 / 8 Each channel of the feature map undergoes an independent 3×3 convolution operation with a stride of 1 and padding of 1. The number of input and output channels remains unchanged, i.e., the output shape is [H]. W C in ]:

[0058] ,

[0059] in, It uses a deep convolutional kernel (without inter-channel interaction). This represents the feature map output by deep convolution.

[0060] Group attention: the feature maps output by deep convolutions The feature map is uniformly divided into K groups along the channel dimension. For each group's feature map... Apply a 1×1 convolution with C input and output channels. in / K, after convolution, the feature map is obtained. Then, the feature maps output by grouped convolution are... Perform connection operations at the channel dimension ( ), to obtain the group attention output feature map :

[0061] ,

[0062] ,

[0063] ,

[0064] Gated residual connection: First, the feature map of the group attention output is processed. Perform global average pooling on the spatial scale (H, W) to obtain a channel description vector. Next, the channel description vector passes through a fully connected layer (in... Figure 3 The vector is obtained by channel mapping (represented as a 1×1 convolution). Finally, the Sigmoid activation function generates a gated weight vector between 0 and 1. ,in, . This weight vector Feature maps of group attention output Weighted features are obtained by multiplying each channel. ( (This involves element-wise multiplication), then multiplied by the original input P. 1 / 8 The feature maps are summed to obtain the gated residual connection output feature. .

[0065] The DEIMv2 detector is responsible for multi-scale feature fusion and target query decoding. Its input consists of gated residual connection output features and other resolution feature maps. ,P 1 / 16 ,P 1 / 32 The output is a normalized four-dimensional representation of the detection box. , respectively, represent the normalized coordinates of the center point. and detection frame width ,high DEIMv2 is an end-to-end object detection model based on the Transformer architecture. Its design originates from the DETR (DetectionTransformer) series and has been optimized for real-time performance and detection accuracy. Unlike traditional two-stage detectors (such as Faster R-CNN) that rely on pre-defined anchor boxes and Region Proposal Networks (RPNs), DEIMv2 abandons manually designed candidate box generation mechanisms and instead uses a set of learnable object queries as detection proxies. Its workflow mainly consists of two stages: First, the Transformer encoder performs global context modeling and enhancement on the multi-scale features extracted by the backbone network; then, in the decoder, the object queries and the features output by the encoder interact through a cross-attention mechanism to gradually decode the object's category and bounding box coordinates. This "query-interaction-prediction" paradigm achieves true end-to-end detection, avoiding missed or false detections caused by mismatches between anchor boxes and object shapes, and is particularly suitable for the characteristics of remote sensing images with varying target scales and large aspect ratios. In this invention, DEIMv2 is responsible for receiving and fusing the multi-scale features processed by the small target enhancement module, and outputting preliminary target detection results to provide high-quality initial predictions for subsequent semantic regression refinement. Since it belongs to a conventional model in the prior art, its structure will not be described in detail here.

[0066] For the semantic regression refinement module, the structure is as follows: Figure 4 As shown. Its input is four-dimensional predicted coordinates. (Normalized values, ranging from [0,1], where N1 is the number of bounding box predictions output by DEIMv2 for each input image). For each bounding box, unbind the coordinates and calculate the derived geometric features, as shown in the following formula:

[0067] ,

[0068] ,

[0069] ,

[0070] ,

[0071] ,

[0072] ,

[0073] ,

[0074] ,

[0075] ,

[0076] ,

[0077] ,

[0078] In the formula, , These are the normalized x and y coordinates of the top-left corner of the bounding box; , These are the normalized x and y coordinates of the bottom right corner of the bounding box; , These are the normalized x and y coordinates of the center point of the bounding box, with values ​​ranging from [0,1], representing the relative position of the center point in the image; , These are the normalized width and height of the bounding box, respectively. The aspect ratio of the bounding box. The normalized area of ​​the bounding box. The length of the bounding box diagonal. The center point of the bounding box ( The Euclidean distance from (0.5, 0.5) to the geometric center of the image. , , , These are the distances from the left, right, top, and bottom edges of the bounding box to the corresponding boundaries of the image, respectively. This represents the distance from the bounding box to the four sides of the image. This represents the minimum distance from the bounding box to the four sides of the image; This is a minimum value operation used to extract the minimum distance from multiple distance values ​​from the bounding box to the four sides of the image.

[0079] The calculated geometric features are combined into multidimensional coordinate features. (Each row corresponds to a target's 12-dimensional features):

[0080] ,

[0081] Multidimensional coordinate features High-dimensional encoded features are obtained through high-dimensional encoding using multi-layer nonlinear mapping (Linear + GELU + Dropout). D2 is the feature dimension:

[0082] ,

[0083] and These represent two fully connected layers. First, the multidimensional coordinate features are processed through the fully connected layers. A linear transformation is performed, mapping the 12-dimensional input features to a higher dimension based on the internally learnable weight matrix and bias vector; then a non-linear relationship is introduced through the GELU activation function; and finally, regularization is performed using the Dropout technique.

[0084] Add learnable location-encoded features to each target feature , These are learnable parameters, along with the high-dimensional encoded features of the input. Add:

[0085] ,

[0086] Transformer encoder Location features are encoded using multiple EncoderLayers (e.g., 2-4 layers). Perform self-attention calculation and feedforward network processing:

[0087] ,

[0088] Processed features High-dimensional coding features Add them together, retain the original information, and output the fused semantic features. :

[0089] ,

[0090] D2-dimensional semantic features are fused through a linear mapping layer. Dimensionality reduced to M dimensions, outputting low-dimensional semantic features. :

[0091] ,

[0092] For each set of low-dimensional semantic features, select the index corresponding to the maximum value of the last dimension:

[0093] ,

[0094] Map the maximum probability semantic index to a high-dimensional embedding vector. :

[0095] ,

[0096] embed vector Compared with the original low-dimensional semantic features Added output: Enhanced semantic features :

[0097] ,

[0098] Will The input sequence generator LSTM / GRU / Transformer Decoder transforms the sequence features into a four-dimensional offset through multi-layer nonlinear mapping (Linear + LayerNorm + GELU). :

[0099] ,

[0100] The final output is a four-dimensional offset. This represents the correction amount for the normalized bounding box. The output correction amount... With DEIMv2 output Add them together to get the final detection box:

[0101] .

[0102] In step 2, the total loss function of the object detection model It is the weighted sum of the losses from each part, expressed as:

[0103] ,

[0104] The total loss of the model is represented by the sum of four parts: where The corresponding encoder loss is used to constrain the position embedding and content embedding of the initial query in the encoder output; It is a decoder auxiliary loss, whose function is to constrain the intermediate outputs of each layer of the decoder and improve the stability of iterative optimization; The prediction loss output by the decoder is specifically constrained for the final prediction result of the last layer of the decoder; It is the bounding box refinement loss, used to further optimize the positional accuracy of the predicted box.

[0105] Training for the base class: using the full base class data. The optimizer is AdamW, with differentiated learning rates set for different parts of the parameters, and the global learning rate is set to 0.0005; the backbone network DINOv3 parameters use an extremely low learning rate of 0.0000125.

[0106] Few-sample fine-tuning: using only new class data.

[0107] Strategically, some key layers are unfrozen, including the small target enhancement module, the encoder's FPN / PAN core layer, the decoder's classification, regression prediction head and the last decoding layer, as well as the sequence generation, semantic dimension mapping, maximum probability semantic selection and embedding, coordinate sequence generation, and output of the regression refinement module. All other parameters remain frozen. The learning rate of the unfrozen layers is adjusted to 0.0002.

[0108] Step 1: Basic category training.

[0109] Prepare training data: Collect complete training data for all basic categories, including images and their corresponding category labels and location information.

[0110] Data input and model processing: The prepared basic category data is input into the deep learning model. The model extracts image features through the backbone network (DINOv3), and then the subsequent modules process the data to generate prediction results (category, location, etc.).

[0111] Calculate the prediction difference: Compare the prediction results generated by the model with the actual category labels and location information in the data, and calculate the difference (loss) between the two.

[0112] Adjusting model parameters: Based on the calculated differences, adjust the parameters of each part of the model in reverse. Among them, the parameters of the backbone network (DINOv3) of the model are adjusted by a smaller margin, while the parameters of other parts are adjusted by normal margins. Repeat this process until the model's prediction performance for the basic category stabilizes (i.e., the differences no longer decrease significantly).

[0113] Step 2: Fine-tuning with a small number of samples.

[0114] Prepare new category data: Collect only a small amount of training data (including images and corresponding labels) for the new category.

[0115] Fix most of the model parameters: Keep most of the parameters in the model unchanged, and only allow the following specific parameters to be adjusted during training:

[0116] Small target enhancement module: the encoder's FPN / PAN core layer, the decoder's classification, regression prediction head and the last decoding layer;

[0117] The regression refinement module includes sequence generation, semantic dimension mapping, maximum probability semantic selection and embedding, coordinate sequence generation, and output.

[0118] Input new category data: Input a small amount of data for the new category into the model, and the model generates prediction results using fixed parameters and adjustable parameters.

[0119] Adjust the parameters that are allowed to change: Based on the difference between the predicted results of the new category data and the true label, only adjust the parameters of the above-mentioned allowed-change part in reverse, with a moderate adjustment range, and repeat this process until the model can accurately identify the new category.

[0120] Among them, the base category refers to the main category that the model initially learns, which has sufficient training data.

[0121] New category: refers to the category that the model needs to identify later, with only a small amount of training data provided.

[0122] Parameter adjustment magnitude: The magnitude of model parameter updates during training. A small magnitude indicates slow parameter changes, while a moderate magnitude indicates a reasonable rate of change.

[0123] Fixed parameters: The parts of the model that remain unchanged during training, ensuring that the model retains the basic category knowledge it has learned.

[0124] Adjustable parameters: The updatable part of the model during training, used to learn features for new categories, enabling rapid adaptation to new tasks.

[0125] Example:

[0126] The implementation effect of this invention was verified using the publicly available remote sensing target detection dataset DIOR (Data set for Object detection in Optical Remote sensing images). This dataset contains 20 target categories, covering typical remote sensing targets such as airports, dams, and bridges, with a total of 19,160 remote sensing images. The image resolution ranges from 800×800 to 2000×2000 pixels, and all images are accompanied by pixel-level annotations of category labels and bounding box location information.

[0127] Base categories: Fifteen categories from the DIOR dataset were selected as base categories (specifically: airport, dam, Expressway-Service-area, Expressway-toll-station, golffield, groundtrackfield, harbor, override, stadium, storagetank, vehicle, airplane, tennisscourt, trainstation, and windmill). Images of these base categories from the training set were used as training data, totaling 9869 training images. Images of these base categories from the test set were used as test data, totaling 10214 test images.

[0128] New categories: Five remaining categories in the DIOR dataset were selected as new categories (specifically: baseballfield, basketballcourt, bridge, chimney, and ship). Only 5 to 10 images were selected for each new category as few-shot training data (i.e., the support set for few-shot scenarios). Images of the new categories in the test set were selected as test data, for a total of 4681 new category test images.

[0129] Data usage: In the basic category training phase, the basic category training data is input into the model in batch size 4 for iterative training; in the few-sample fine-tuning phase, only the few-sample training data of the new category is input into the model in batch size 1, most parameters of the backbone network (DINOv3) are fixed, and only the parameters of the specified modules are adjusted.

[0130] Based on this, when a user inputs an image containing the basic category "airplane," the image contains multiple aircraft targets of varying sizes and orientations, some slightly disturbed by clouds or background features. The target detection model proposed in this invention has completed sufficient learning during the basic training phase, accurately outputting the bounding box position and category confidence score for each aircraft. Detection results show that all real aircraft targets are detected without any missed detections; the detection boxes closely match the target contours, without introducing redundant false alarms; and consistent positioning accuracy is maintained across targets of different scales. This example demonstrates that the method of this invention can accurately locate and identify aircraft targets within the basic category, exhibiting excellent basic class detection performance.

[0131] When a user inputs an image containing the new category "ship," the model uses only five labeled ship images as support during the few-shot fine-tuning phase. Despite this, the model successfully detects multiple ship targets in the test image that are densely moored, exhibit drastic scale changes, and have low contrast with the water background. The detection boxes not only cover the entire ship hull but also maintain independent distinction even when adjacent ships are closely spaced, without merging or missed detections. The detection results demonstrate that after fine-tuning with only a small number of new category samples, the model can effectively generalize to the new category and accurately detect ship targets, validating the effectiveness and generalization ability of the proposed method in few-shot scenarios.

[0132] On the other hand, the present invention provides a few-sample target detection device for remote sensing images, which includes modules capable of implementing the steps of the aforementioned method, specifically including:

[0133] The model input module is used to input remote sensing images into the target detection model, which includes, in sequence: a pre-trained DINOv3 backbone network, a small target enhancement module, a DEIMv2 detector, and a semantic regression refinement module. The DINOv3 backbone network is used to extract multi-level features from the remote sensing image and construct a multi-scale feature pyramid. The small target enhancement module is used to enhance the features of the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid. The DEIMv2 detector is used to process the enhanced multi-scale feature map and output the preliminary bounding box coordinates and category of the target. The semantic regression refinement module is used to refine the preliminary bounding box coordinates based on geometric semantics and output the final detection result.

[0134] The training module is used to perform two-stage training on the object detection model, including basic training of the entire object detection model based on a richly labeled base class dataset, and fine-tuning training of some network parameters of the object detection model based on a small number of labeled samples of new categories.

[0135] The output module is used to input the image to be recognized into the target detection model after two-stage training and output the detection results.

[0136] Thirdly, the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method for few-sample target detection of remote sensing images.

[0137] Fourthly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned method for few-sample target detection of remote sensing images.

[0138] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting targets in a small number of samples in remote sensing images, characterized in that, The method includes: Step 1: Input the remote sensing image into the target detection model, which includes the following components in cascade: a pre-trained DINOv3 backbone network, a small target enhancement module, a DEIMv2 detector, and a semantic regression refinement module; wherein, the DINOv3 backbone network is used to extract multi-level features of the remote sensing image and construct a multi-scale feature pyramid. The small target enhancement module is used to enhance the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid; it includes: performing depthwise separable convolution on the input feature map; uniformly dividing the convolutional feature map into several groups along the channel dimension, performing one-dimensional convolution on each group of features, and then concatenating them; performing global average pooling on the concatenated feature map, and generating channel attention weight vectors through a gating unit containing a fully connected layer and a sigmoid activation function; multiplying the channel attention weight vectors with the concatenated feature map channel by channel, and performing residual concatenation with the original input feature map to output the enhanced feature map; The DEIMv2 detector is used to process the enhanced multi-scale feature map and output the preliminary bounding box coordinates and category of the target; the semantic regression refinement module is used to refine the preliminary bounding box coordinates based on geometric semantics and output the final detection result. Step 2: Perform two-stage training on the object detection model, including basic training of the entire object detection model based on a richly labeled base class dataset, and fine-tuning training of some network parameters of the object detection model based on a small number of labeled samples of new categories. Step 3: Input the image to be recognized into the target detection model after the two-stage training, and output the detection results.

2. The method for detecting targets in a small number of samples in remote sensing images according to claim 1, characterized in that, In step 1, the DEIMv2 detector is an end-to-end detector based on the Transformer architecture. It does not use a preset anchor box mechanism. Instead, it interacts with a set of learnable target queries and multi-scale features output by the encoder to directly decode the target's category and bounding box coordinates.

3. The method for detecting targets in a small number of samples in remote sensing images according to claim 1, characterized in that, In step 1, the semantic regression refinement module is used to refine the initial bounding box coordinates based on geometric semantics, and the output of the final detection result includes: deconstructing the initial bounding box coordinates into a multi-dimensional geometric feature vector containing center point coordinates, width and height, area, aspect ratio, diagonal length, distance from the center point to the image center, distance to the four boundaries of the image, and the minimum value of the geometric feature vector; mapping the geometric feature vector to high-dimensional semantic coding features through at least one encoding sub-network containing linear transformation, nonlinear activation, and random deactivation; adding positional encoding to the high-dimensional semantic coding features, and performing self-attention modeling and feature fusion through at least one Transformer encoder layer; reducing the dimensionality of the fused features through a linear layer, and selecting the maximum probability index of the last dimension of each row of features for embedding encoding, and performing residual concatenation with the dimensionality-reduced features; inputting the residual concatenated features into a sequence generator, decoding and outputting the coordinate offset corresponding to each initial bounding box; adding the coordinate offset to the initial bounding box coordinates to obtain the final refined bounding box coordinates.

4. The method for detecting targets in a small number of samples in remote sensing images according to claim 1, characterized in that, Step 2, the basic training phase, specifically includes: The object detection model is trained globally using a base class dataset with rich annotations; During training, the parameters of the DINOv3 backbone network are updated using a learning rate lower than that of other modules in the model, while the parameters of the small target enhancement module, the DEIMv2 detector, and the semantic regression refinement module are updated using a normal learning rate.

5. A method for detecting targets in a small number of samples in remote sensing images according to claim 1, characterized in that, In step 2, the fine-tuning training phase employs a selective unfreezing strategy, specifically including: Freeze most of the parameters of the DINOv3 backbone network; Unfreeze and update the parameters of the following parts: all parameters of the small target enhancement module, core layer parameters of the feature pyramid network in the DEIMv2 detector, parameters of the classification and regression prediction head and the last decoding layer of the DEIMv2 detector decoder, and all trainable parameters of the semantic regression refinement module.

6. The method for detecting targets in a small number of samples in remote sensing images according to claim 1, characterized in that, The method employs a composite loss function during training, specifically a weighted sum of the following four losses: The loss output of the DEIMv2 detector encoder includes the L1 loss and generalized intersection-union ratio loss for predicted bounding boxes, as well as the binary cross-entropy loss for class prediction. The auxiliary loss output of each layer of the DEIMv2 detector decoder is calculated in the same way as the encoder loss. The prediction loss of the final output of the DEIMv2 detector is calculated in the same way as the encoder loss. The refinement loss output by the semantic regression refinement module includes the L1 loss for predicted coordinate offsets and the generalized intersection-union loss.

7. A device for detecting targets in a small number of samples in remote sensing images, characterized in that, include: The model input module is used to input remote sensing images into the target detection model, which includes the following components in cascade: a pre-trained DINOv3 backbone network, a small target enhancement module, a DEIMv2 detector, and a semantic regression refinement module; wherein, the DINOv3 backbone network is used to extract multi-level features of the remote sensing images and construct a multi-scale feature pyramid. The small target enhancement module is used to enhance the multi-scale feature map with the highest spatial resolution in the multi-scale feature pyramid; it includes: performing depthwise separable convolution on the input feature map; uniformly dividing the convolutional feature map into several groups along the channel dimension, performing one-dimensional convolution on each group of features, and then concatenating them; performing global average pooling on the concatenated feature map, and generating channel attention weight vectors through a gating unit containing a fully connected layer and a sigmoid activation function; multiplying the channel attention weight vectors with the concatenated feature map channel by channel, and performing residual concatenation with the original input feature map to output the enhanced feature map; The DEIMv2 detector is used to process the enhanced multi-scale feature map and output the preliminary bounding box coordinates and category of the target; the semantic regression refinement module is used to refine the preliminary bounding box coordinates based on geometric semantics and output the final detection result. The training module is used to perform two-stage training on the object detection model, including basic training of the entire object detection model based on a richly labeled base class dataset, and fine-tuning training of some network parameters of the object detection model based on a small number of labeled samples of new categories. The output module is used to input the image to be recognized into the target detection model after two-stage training and output the detection results.

8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement a few-sample target detection method for remote sensing images as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, enable the processor to implement a few-sample target detection method for remote sensing images as described in any one of claims 1-6.