Remote sensing image small sample target detection method based on prototype guide generation

By performing sample balancing and enhancement on remote sensing image target detection methods, constructing a dynamic prototype queue, and conducting label credibility evaluation, the problem of insufficient sample labeling in remote sensing image target detection is solved, thereby improving detection accuracy and the ability to detect new target categories.

CN121937892APending Publication Date: 2026-04-28NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHWESTERN POLYTECHNICAL UNIV
Filing Date
2025-12-25
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing remote sensing image target detection methods suffer from low detection accuracy and are prone to problems such as classification bias, false negative samples, and insufficient feature coverage when sample annotation is insufficient.

Method used

By performing sample balancing and enhancement on the training dataset during the fine-tuning phase, features are extracted using a backbone network and a multi-scale feature fusion module. A dynamic prototype queue is constructed, and label credibility is evaluated and corrected. A generative adversarial network is combined to expand the feature space of new categories, and a cross-attention mechanism is applied to generate new region of interest features.

Benefits of technology

It improves the accuracy of target detection in small samples of remote sensing images, solves the detection limitations caused by insufficient sample annotation, improves the detection capability and feature space coverage of new target categories, and reduces the noise impact caused by incomplete annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121937892A_ABST
    Figure CN121937892A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, in particular to a remote sensing image small sample target detection method based on prototype guide generation, and the method comprises the steps: carrying out the sample balance and enhancement processing of a training data set in a fine tuning stage; extracting multi-scale features of the input image by using a backbone network and a multi-scale feature fusion module, and generating a region-of-interest proposal and corresponding region-of-interest features; based on the region-of-interest proposals and the corresponding region-of-interest features, constructing a dynamic prototype queue; based on the dynamic prototype queue and the teacher-student network architecture, performing label credibility evaluation and correction on the proposals marked as negative samples in the training process; based on a generative adversarial network guided by a prototype condition, new region-of-interest features are synthesized through a trans-attention mechanism, and the new region-of-interest features are added into a training batch to expand a feature space of a new target category. The method aims to solve the target detection limitation of insufficient sample labeling so as to improve the detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this application relate to the field of computer vision technology, and in particular to a method for small sample target detection in remote sensing images based on prototype-guided generation. Background Technology

[0002] Object detection in remote sensing images has significant applications in environmental monitoring, urban planning, and other fields. The rapid development of deep learning has driven significant progress in object detection frameworks, from early region-based methods to efficient single-stage and two-stage detectors, and more recently, Transformer-based architectures. However, the effectiveness of these advanced detectors heavily relies on large-scale, finely labeled training datasets. For remote sensing images, obtaining such labeled data is costly and often impractical. Therefore, few-shot object detection has become an important research direction for addressing the challenge of poor detection performance under extreme data scarcity conditions.

[0003] To address the problem of data scarcity, few-shot object detection has become an important research direction. Related technologies mainly fall into two categories: The first is meta-learning methods, which construct task-based training paradigms to simulate few-shot scenarios, thereby acquiring task-level knowledge from basic categories and achieving rapid adaptation to new categories. The second is transfer learning-based methods: these methods transfer knowledge from basic categories to new categories through two-stage fine-tuning.

[0004] Although related technologies have improved the accuracy of small sample target detection to some extent, the limited ability to detect new categories of targets has not been fundamentally solved. Furthermore, in complex scenarios such as extremely scarce annotations, class imbalance, and incomplete annotations, the model is prone to problems such as classification bias, false negative sample misleading, and insufficient feature coverage.

[0005] Therefore, how to address the limitations of target detection due to insufficient sample labeling in order to improve detection accuracy is a pressing technical problem that needs to be solved. Summary of the Invention

[0006] To address the aforementioned technical issues, embodiments of this application propose a method for detecting small-sample targets in remote sensing images based on prototype-guided generation, aiming to overcome the limitations of target detection due to insufficient sample annotation and improve detection accuracy.

[0007] To achieve the above objectives, embodiments of this application propose a method for small-sample target detection in remote sensing images based on prototype-guided generation. The method includes the following steps: The training dataset in the fine-tuning stage is subjected to sample balancing and augmentation to ensure that the number of base class samples and new class samples are balanced; the training dataset contains base class targets with a large number of annotations and new class targets with only a small number of annotations. Multi-scale features of the input image are extracted using a backbone network and a multi-scale feature fusion module, and region of interest proposals and their corresponding region of interest features are generated. Based on region of interest (ROI) proposals and their corresponding ROI features, a dynamic prototype queue is constructed. The dynamic prototype queue is used to store and manage prototype vectors for all categories. The prototype vectors are obtained by aggregating the ROI features for each category and provide semantic guidance for feature learning. Based on a dynamic prototype queue and a teacher-student network architecture, the credibility of the labels of proposals marked as negative samples during training is evaluated and corrected to reduce the noise impact caused by incomplete labeling. The prototype-guided generative adversarial network takes a random noise vector, a prototype vector of the new target category, and features of the real region of interest (ROI) of the same category as input. It synthesizes new ROI features through a cross-attention mechanism and adds the new ROI features to the training batch to expand the feature space of the new target category. The new target category is a new category with scarce samples.

[0008] To achieve the above objectives, embodiments of this application also propose a small-sample target detection device for remote sensing images based on prototype-guided generation, the device comprising: The sample balancing and augmentation module is used to balance and augment the training dataset during the fine-tuning stage to ensure that the number of base class samples and new class samples are balanced. The training dataset contains base class targets with a large number of annotations and new class targets with only a small number of annotations. The extraction module is used to extract multi-scale features of the input image using the backbone network and the multi-scale feature fusion module, and generate region of interest proposals and their corresponding region of interest features; The building module is used to construct a dynamic prototype queue based on region of interest proposals and their corresponding region of interest features. The dynamic prototype queue is used to store and manage prototype vectors of all categories. The prototype vectors are obtained by aggregating the region of interest features of each category and provide semantic guidance for feature learning. The evaluation and correction module is used to evaluate and correct the label credibility of proposals marked as negative samples during training, based on a dynamic prototype queue and teacher-student network architecture, so as to reduce the noise impact caused by incomplete labeling. The feature generation module is used for prototype-condition-guided generative adversarial networks. It takes random noise vectors, prototype vectors of the target new category, and features of real regions of interest in the same category as inputs. It synthesizes new regions of interest features through cross-attention mechanism and adds the new regions of interest features to the training batch to expand the feature space of the target new category. The target new category is a new category with scarce samples.

[0009] To achieve the above objectives, embodiments of this application also propose an electronic device, including a processor and a memory, wherein the memory stores instructions executable by the processor, and the processor is configured to execute the instructions such that the electronic device can implement the prototype-guided remote sensing image small sample target detection method as described above.

[0010] To achieve the above objectives, embodiments of this application also propose a computer-readable storage medium storing a computer program that, when executed by a processor, enables a method for detecting small samples of remote sensing images based on prototype-guided generation, as described above.

[0011] This application proposes a prototype-guided remote sensing image small-sample target detection method. The method performs sample balancing and enhancement processing on the training dataset during the fine-tuning stage to ensure a balance between the number of base class samples and new class samples. It utilizes a backbone network and a multi-scale feature fusion module to extract multi-scale features from the input image and generate region-of-interest (ROI) proposals and their corresponding RIO features. Based on the RIO proposals and their corresponding RIO features, a dynamic prototype queue is constructed. Based on the dynamic prototype queue and the teacher-student network architecture, the label credibility of proposals marked as negative samples during training is evaluated and corrected to reduce the noise impact caused by incomplete labeling. Based on a prototype-condition-guided generative adversarial network, new RIO features are synthesized through a cross-attention mechanism using random noise vectors, prototype vectors of the new target class, and real RIO features of the same class as input. These new RIO features are then added to the training batch to expand the feature space of the new target class. Since the training dataset contains a large number of labeled base class targets and a small number of labeled new class targets, the method optimizes the training dataset during the fine-tuning stage. Oversampling is performed to balance the number of base and new class targets in the dataset. Then, for the repeatedly sampled new class samples, three independent data augmentation channels are designed to ensure a balanced and diverse number of base and new class samples, thus solving the overfitting problem. A dynamic prototype queue stores and manages prototype vectors for all categories. These prototype vectors are obtained by aggregating features from regions of interest (ROIs) for each category and provide semantic guidance for feature learning. This addresses the issues of feature sparsity and inter-class confusion in few-shot learning. Continuous updating and optimization of category prototype vectors provides stable and reliable semantic guidance for subsequent feature generation and classification. Furthermore, through the dynamic prototype queue and teacher-student network architecture, the credibility of proposals labeled as negative samples during training is evaluated and corrected, effectively mitigating the negative impact of incomplete labeling on model training. In addition, new ROI features are synthesized through a cross-attention mechanism and added to the training batch to expand the feature space of the new target category. This significantly expands the coverage of the feature space and improves the model's ability to detect targets in scarce categories. Based on this, this scheme can overcome the limitations of target detection due to insufficient sample labeling and improve detection accuracy.

[0012] Optionally, the training dataset in the fine-tuning stage is subjected to sample balancing and augmentation processing to achieve a balance between the number of base class samples and the number of new class samples. This includes: performing oversampling operations on the images of new class samples in the target training dataset to achieve a balance between the number of new class samples and the number of base class samples; establishing at least three independent data augmentation channels for the images of repeatedly sampled new class samples, and dynamically selecting the augmentation method based on the image attribute identifier to perform data augmentation in order to increase data diversity; wherein, the augmentation methods of different data augmentation channels are different.

[0013] Optionally, the enhancement method is dynamically selected based on the image attribute identifier to perform data enhancement, thereby increasing data diversity. This includes: assigning a repetition index identifier and a small target index identifier to each image; detecting whether each image is a resampled sample based on the repetition index identifier; for images that are resampled samples, determining the target channel from multiple data enhancement channels based on the small target index identifier of the image to perform data enhancement, thereby increasing data diversity; and for images that are not resampled samples, using the basic data enhancement channel to perform data enhancement.

[0014] Optionally, at least three data augmentation channels include: a color jitter enhancement channel, a grid occlusion enhancement channel, and a small target replication enhancement channel; [Image description] The duplicate index is identified as and the small target index is identified as ; The step of detecting whether each image is a duplicate sample based on the duplicate index identifier includes: Detect duplicate index identifiers Is it 1? If duplicate index identifier If so, the image is a duplicate sample; If duplicate index identifier If so, then the image is a non-repeating sample; The small target index identifier based on the image determines the target channel from at least three independent data augmentation channels, including: If the small target index identifier Then the small target replication enhancement channel will be determined as the target channel; If the small target index identifier Based on As a result, the target channel is selected cyclically from the color jitter enhancement channel, the mesh occlusion enhancement channel, and the small target replication enhancement channel.

[0015] Optionally, a dynamic prototype queue is constructed based on region of interest proposals and their corresponding region of interest features, including: Maintain a fixed-length region of interest feature for each category and update it using a first-in, first-out (FIFO) principle; The queue calculates the prototype vector for each category using momentum updates. The prototype vector for each category is updated using a momentum coefficient-weighted historical prototype and the average of all region-of-interest features in the current queue, as expressed by the following formula: ; in, Indicates the momentum coefficient. Represents the original historical vector. Indicate category Feature queue, This represents the region of interest features in the feature queue. Indicate category Features of all regions of interest in the feature queue Sum.

[0016] Optionally, in determining the prototype vector for each category Previously, the method also included: The adapter network projects the original high-dimensional region of interest features into a low-dimensional subspace; the adapter network compresses the feature dimension through fully connected layers while retaining key discriminative information. Apply dynamic prototype contrast loss to the low-dimensional features output by the adapter network. This is to maximize the similarity between the features of each sample and the prototype vector corresponding to its true class, while minimizing its similarity to prototype vectors of other classes. Specific implementation methods include: ; in, Indicates the total number of samples in the batch; Indicates the first Each sample represents the true category. Represents a set of all categories; Indicates the indicator function, when the category Belongs to all category sets The value is 1 if it is true, and 0 otherwise. Indicates the features of the region of interest With prototype vector Cosine similarity between them; This represents the similarity index between the current sample features and the true category prototype, and represents the score of the positive sample pair; This represents the summation of similarity index terms over all categories of prototype similarity, with positive and negative samples forming a normalized denominator.

[0017] Optionally, based on a dynamic prototype queue and a teacher-student network architecture, the label credibility of negative sample proposals generated during training is evaluated and corrected to reduce the noise impact caused by incomplete labeling, including: A dual-detector head structure is constructed; in this structure, the teacher detector head updates parameters from the student detector head using an exponential moving average. During training, based on a dynamic prototype queue, the teacher's detection head is used to perform forward computation on proposals initially classified as negative samples to obtain their classification confidence scores. The specific implementation methods include: ; in, This represents the classifier for the teacher's detection head. Indicates the teacher's head is being tested. This represents the softmax function. Features of all regions of interest in each batch during training; Based on classification confidence scores and preset thresholds, negative sample proposals are divided into three categories: proposals that need to be corrected to positive samples, proposals that are confirmed as negative samples, and gray area proposals that need further analysis. For gray area proposals, calculate the cosine similarity between the features of their region of interest and the prototype vectors in the dynamic prototype queue. And based on this similarity Assign weight factors To adjust its contribution to the classification loss calculation, specific implementation methods include: ; ; ; in, and Indicates hyperparameters, Indicates similarity , Indicates an intermediate variable. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies of this application will be briefly introduced below. Obviously, the following drawings are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings described herein are only used to explain this application and are not intended to limit this application.

[0019] Figure 1 This is a flowchart of a method for detecting small samples of remote sensing images based on prototype-guided generation, provided in one embodiment of this application; Figure 2 This is a flowchart of another method for detecting small samples of remote sensing images based on prototype-guided generation, provided in one embodiment of this application; Figure 3 This is a schematic diagram of a small sample target detection device for remote sensing images based on prototype-guided generation, provided in another embodiment of this application; Figure 4This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. Those skilled in the art will understand that many technical details have been presented in the embodiments of this application to facilitate better understanding. However, the technical solutions claimed in this application can be implemented even without these technical details and various variations and modifications based on the following embodiments. The division of the following embodiments is for ease of description and should not constitute any limitation on the specific implementation of this application. The following embodiments can be combined with and referenced by each other without contradiction.

[0021] Object detection in remote sensing images has significant applications in environmental monitoring, urban planning, and other fields. The rapid development of deep learning has driven significant progress in object detection frameworks, from early region-based methods to efficient single-stage and two-stage detectors, and more recently, Transformer-based architectures. However, the effectiveness of these advanced detectors heavily relies on large-scale, finely labeled training datasets. For remote sensing images, obtaining such labeled data is costly and often impractical. Therefore, few-shot object detection has become an important research direction for addressing the challenge of poor detection performance under extreme data scarcity conditions.

[0022] To address the problem of data scarcity, few-sample target detection has become an important research direction, and related technologies can be mainly divided into two categories: The first method is the meta-learning method. The meta-learning method constructs a task-based training paradigm to simulate small sample scenarios, thereby acquiring task-level knowledge from basic categories and achieving rapid adaptation to new categories.

[0023] Typical meta-learning methods include: Yan et al., “X. Yan, Z. Chen, A. Xu, X. Wang, X. Liang, and L. Lin. Meta r-cnn: Towards general solver for instance-level low-shot learning, in Proceedings of the IEEE / CVF international conference on computer vision, 2019, pp. 9577–9586.” These methods generate class-specific attention vectors from support samples to reweight features in regions of interest, enabling the model to intrinsically highlight discriminative features in object detection. This mechanism allows the reweighted coefficients for new classes to be learned with only a small number of support samples. Han et al., in their paper "J. Han, Y. Ren, J. Ding, K. Yan, and G.-S. Xia. Few-shot object detection via variational feature aggregation, in Proceedings of the AAAI conference on artificial intelligence, vol. 37, no. 1, 2023, pp. 755–763," employed a variational autoencoder to model the feature distribution, constructing robust class prototypes even with scarce data. By learning probabilistic feature embeddings, they effectively mitigated overfitting in low-data scenarios. Karlinsky et al., “L. Karlinsky, J. Shtok, S. Harary, E. Schwartz, A. Aides, R. Feris, R. Giryes, and AM Bronstein. Repmet: Representative-based metric learning for classification and few-shot object detection, in Proceedings of the IEEE / CVF conference on computer vision and pattern recognition, 2019, pp. 5197–5206,” optimized a joint loss function that simultaneously learns feature representations and distance metrics, improving the model's generalization ability and adaptability to new categories.

[0024] Another approach is based on transfer learning, which offers a simpler and more effective solution: Wang et al., “X.Wang, T. Huang, T. Darrell, J. Gonzalez, and F. Yu, “Frustratingly simple few-shot object detection. arXiv 2020,” arXiv preprint arXiv:2003.06957,2020.” proposed a simplified two-stage fine-tuning paradigm that transfers prior knowledge from a richly labeled base dataset to a new category with only a small number of samples. This method outperforms traditional meta-learning methods while maintaining efficient training. Sun et al., in their paper "B. Sun, B. Li, S. Cai, Y. Yuan, and C. Zhang, Fsce: Few-shot object detection via contrastive proposal encoding, in Proceedings of the IEEE / CVFconference on computer vision and pattern recognition, 2021, pp. 7352–7362," introduced contrastive proposal encoding to enhance object representation. Their proposed "contrastive proposal encoding loss" maximizes intra-class similarity and enhances inter-class differences, significantly reducing the misclassification of new class instances into easily confused categories. Wang et al., in their paper "B. Wang and D. Yu, Orthogonal progressive network for few-shot object detection, Expert Systems with Applications, vol. 264, p. 125905, 2025," proposed an orthogonal progressive model. This model decouples regression and classification tasks through dual orthogonal constraints, achieving clear task separation and class distinction. Furthermore, the method employs a progressive fine-tuning strategy, gradually optimizing the model by fusing historical features, effectively mitigating overfitting.

[0025] Although related technologies have improved the accuracy of small sample target detection to some extent, the limited ability to detect new categories of targets has not been fundamentally solved. Furthermore, in complex scenarios such as extremely scarce annotations, class imbalance, and incomplete annotations, the model is prone to problems such as classification bias, false negative sample misleading, and insufficient feature coverage.

[0026] Therefore, how to address the limitations of target detection due to insufficient sample labeling in order to improve detection accuracy is a pressing technical problem that needs to be solved.

[0027] In view of this, this application provides a method for target detection in remote sensing images with few samples based on prototype-guided generation. The technical solution comprises four parts: a dynamic enhancement balanced sampling strategy, a dynamic prototype queue, a dynamic prototype-aware label corrector, and a prototype conditional attention feature generator. It aims to address the limitations of target detection due to insufficient sample labeling and improve detection accuracy. Specifically, this application aims to improve the following aspects of target detection in remote sensing images with few sample labels: 1. Imbalanced Annotated Samples Between Different Target Classes. The current model employs a transfer learning-based training paradigm. It is first trained on a dataset with a large number of labeled base class targets, and then fine-tuned using a dataset with a small number of labeled new class targets. During fine-tuning, the backbone network and multi-scale fusion network are frozen, and the parameters of the classification and regression heads are adjusted. Due to the severe imbalance between the number of training samples for base class targets and new class targets, the model's classification tends to favor base class targets, thus classifying new class targets as similar base class categories or background, resulting in serious misclassification.

[0028] 2. Incomplete annotation information in a small number of labeled samples leads to noisy labeling issues. Under the sample allocation strategy based on Intersection over Union (IoU), a single image in the fine-tuning dataset may contain multiple new class targets, but the annotations may be incomplete. Unlabeled foreground objects are incorrectly treated as background, producing false negative samples. These mislabeled regions propagate noisy gradients, ultimately causing class confusion in the classifier.

[0029] 3. Insufficient training samples for novel target classes lead to poor model generalization. This problem manifests primarily in two ways: insufficient feature space coverage and severely limited intra-class diversity. In scenarios with few samples, extreme data scarcity prevents the model from fully learning the changes in feature distribution within a category, resulting in overly sparse and discriminative feature labels. Due to the limited number of training samples, the model is prone to overfitting to a few samples during fine-tuning, failing to capture the multi-dimensional variations in shape, scale, angle, and other characteristics of the target class in real-world scenarios.

[0030] One embodiment of this application proposes a small-sample target detection method for remote sensing images based on prototype-guided generation, applied to an electronic device, wherein the electronic device can be a terminal or a server. This embodiment and the following embodiments will use a server as an example for description. The implementation details of the small-sample target detection method for remote sensing images based on prototype-guided generation proposed in this embodiment will be described in detail below. The following implementation details are provided for ease of understanding and are not necessary for implementing this solution.

[0031] The specific process of the prototype-guided remote sensing image small sample target detection method proposed in this embodiment can be described as follows: Figure 1 As shown, it includes: Step 101: Perform sample balancing and augmentation on the training dataset during the fine-tuning phase to balance the number of base class samples and the number of new class samples.

[0032] The training dataset contains base class targets with a large number of annotations and new class targets with only a small number of annotations.

[0033] For example, a base class target refers to a category with a large amount of labeled data used in the model pre-training stage; a base class target has a rich set of labeled samples, which are usually easy to obtain or already have large-scale labeled datasets.

[0034] For example, the model is first trained extensively on a large-scale dataset containing these base class targets, learning common target features (such as edges, shapes, and textures) and detection capabilities (such as localization and classification). This process gives the model a powerful "fundamental visual capability." In the DIOR dataset, suppose 10 categories are selected, such as "airplane," "bridge," and "ship," each with tens of thousands of labeled samples as base class targets.

[0035] For example, a new target class refers to the category that we are really interested in during the fine-tuning phase, but which has very little labeled data; and the labeled samples of the new target class are extremely scarce (e.g., only 3, 5, or 10 labeled images for each category).

[0036] For example, the new class targets a new task that the model needs to adapt to and learn quickly. In the DIOR dataset, suppose we choose 10 additional categories such as "windmill", "stadium", and "tollbooth" as new classes, but provide only a small number of samples (e.g., 5, i.e., 5-shot) for each category for model fine-tuning.

[0037] For example, firstly, oversampling is performed on the new class samples in the training set input to the network to ensure a balance between the number of base class samples and the number of new class samples. Image labeling is then applied to duplicate samples and images containing small objects. A multi-mode data augmentation channel is established, iterating through each image in the training set. Based on the image's duplicate labeling and small object labeling, a basic data augmentation channel and a dynamic data augmentation channel are selected, thereby expanding the training set and overcoming the overfitting problem caused by oversampling.

[0038] In one possible embodiment, step 101 includes: performing oversampling on the images of new class samples in the target training dataset to achieve a balance between the number of new class samples and the number of base class samples; establishing at least three independent data augmentation channels for the images of repeatedly sampled new class samples, and dynamically selecting an augmentation method based on the image attribute identifier to perform data augmentation in order to increase data diversity; wherein, the augmentation methods of different data augmentation channels are different.

[0039] The enhancement methods differ among the different data enhancement channels.

[0040] It is understood that the embodiments of this application design a dynamic augmentation balanced sampling strategy, which balances the number of base class and new class targets in the dataset by oversampling the new class target images in the fine-tuning dataset. For the repeatedly sampled new class samples, three independent data augmentation channels are designed to ensure that the number of base class and new class samples is balanced and diverse, thereby solving the model overfitting problem.

[0041] In one possible embodiment, data augmentation is performed by dynamically selecting an enhancement method based on the image's attribute identifier to increase data diversity. This includes: assigning a duplicate index identifier and a small target index identifier to each image; detecting whether each image is a duplicate sample based on the duplicate index identifier; for images that are duplicate samples, determining a target channel from multiple data augmentation channels based on the small target index identifier of the image to perform data augmentation to increase data diversity; and for images that are not duplicate samples, using a basic data augmentation channel to perform data augmentation.

[0042] In one possible embodiment, at least three data augmentation channels include: a color jitter enhancement channel, a grid occlusion enhancement channel, and a small target replication enhancement channel; [Image description missing] The duplicate index is identified as and the small target index is identified as ; For example, before training begins, each new class sample image in the fine-tuning dataset is preprocessed by attaching two key attribute identifiers: a repeatability index identifier and a small object index identifier.

[0043] Specifically, duplicate index identifier and small target index identifier It is a binary identifier.

[0044] The step of detecting whether each image is a duplicate sample based on the duplicate index identifier includes: Detect duplicate index identifiers Is it 1? If duplicate index identifier If so, the image is a duplicate sample; If duplicate index identifier If the image is a non-repeating sample, then the image is a non-repeating sample.

[0045] For example, if duplicate index identifiers If this is true, it indicates that the image is a sample that was reused due to oversampling. If the duplicate index is... If the result is positive, it means that the image is a sample from the original dataset and not a duplicate sample generated by oversampling.

[0046] The small target index identifier based on the image determines the target channel from at least three independent data augmentation channels, including: If the small target index identifier Then the small target replication enhancement channel will be determined as the target channel; If the small target index identifier Based on As a result, the target channel is selected cyclically from the color jitter enhancement channel, the mesh occlusion enhancement channel, and the small target replication enhancement channel.

[0047] It is understandable that the random augmentation strategy for repeated samples, implemented through the modulo operation, can overcome the overfitting problem caused by repeated samples.

[0048] For example, small target index identifier It is based on the size of the labeled target in the image. For example, if the area of ​​the target's bounding box is less than a certain percentage of the total image area, such as 0.5%, then the target is indexed. This indicates that the image contains one or more small objects. If the small object index identifies... If so, it means that the image does not contain small targets, or the target size is normal.

[0049] For example, in each training iteration, when a batch of data is read from the data loader, a data augmentation channel is dynamically selected for each image based on the aforementioned identifier. Therefore, at least three independent data augmentation channels can be established: a color jitter enhancement channel, a grid occlusion enhancement channel, and a small target copy enhancement channel. The basic data augmentation channel applies standard, relatively mild enhancement combinations, such as random horizontal flipping, random rotation (small angles, e.g., ±15°), and slight brightness / contrast adjustments. The color jitter enhancement channel is a pixel-level data augmentation technique that generates new image samples by randomly changing the color attributes (such as brightness, contrast, saturation, and hue) of an image without altering the geometry and position of targets within the image. The grid occlusion enhancement channel is used to randomly place one or more rectangular occlusion blocks on the image to simulate a real-world scenario where targets are partially occluded. The small target copy enhancement channel is specifically designed for images containing small targets. A small target instance is randomly selected from the image, copied, and pasted into another empty space within the image (ensuring the pasting location is reasonable and avoids severe overlap with existing targets).

[0050] For example, if the image is a non-repeating sample, the basic data augmentation channel is directly applied. For the original unique sample, the primary task is to maintain the authenticity and integrity of its information, while introducing necessary diversity through basic augmentation. Overly aggressive augmentation should be avoided to prevent the introduction of noise. If the image is a repeating sample, the small target index of the image is detected; if the small target index is 1, it indicates that the image contains a small target, and the small target replication augmentation channel is directly applied; if the small target index is 0, it indicates that the image does not contain a small target, and a random rotation mechanism is used to select the augmentation channel. Specifically, the small target index modulo 3 of the image is calculated: if the modulo result is 0, the color dithering augmentation channel is selected; if the modulo result is 1, the grid occlusion augmentation channel is selected; if the modulo result is 2, the small target replication augmentation channel is selected. It can be understood that for ordinary repeating samples, the goal is to maximize their diversity and avoid the model simply remembering identical copies. This pseudo-random allocation method ensures that the same image undergoes different types and intensities of enhancement when it is repeated in different ways, thereby greatly enriching the representation of the training data and effectively overcoming the problem of overfitting.

[0051] Step 102: Extract multi-scale features from the input image using the backbone network and multi-scale feature fusion module, and generate region of interest proposals and their corresponding region of interest features.

[0052] For example, a Region of Interest (RoI) proposal refers to a candidate image region that may contain the target to be detected, initially selected from the input image. For example, a bounding box on the image, i.e., the coordinate position and range represented by a rectangle.

[0053] For example, the basic features of the image are first extracted using a backbone network. Then, a multi-scale feature fusion module fuses these features from different levels to simultaneously capture the semantic information of both small and large targets. Finally, the fused multi-scale feature map is input into a region proposal network.

[0054] For example, a Region of Interest (RoI) feature is a fixed-length, high-information-density numerical vector extracted from an image that corresponds to a potential target region.

[0055] For example, after obtaining a Region of Interest (ROI) proposal, the system returns to the semantically rich feature map generated by the backbone network and FPN. For each ROI proposal, the corresponding feature region is cropped from the feature map at the appropriate level based on its coordinates. Then, the irregularly sized feature region is precisely pooled into a fixed-size feature block (e.g., 7x7) using the RoI Align operation. Finally, this feature block is flattened to form a one-dimensional feature vector. This feature vector is the ROI feature corresponding to the proposal, encoding the visual information of the image within the bounding box.

[0056] For example, ResNet101 and FPN networks are first used to extract features at multiple scales, resulting in feature maps at five scales. These maps are then input into the RPN network to extract features from the region of interest (ROI), yielding ROI proposals. Based on the IoU-based label assignment principle, the proposals are divided into positive and negative samples. RoI Align then unifies the scale of these proposals, resulting in scale-uniformed RoI features.

[0057] Step 103: Construct a dynamic prototype queue based on the region of interest proposal and its corresponding region of interest features.

[0058] The dynamic prototype queue is used to store and manage prototype vectors for all categories. The prototype vectors are obtained by aggregating features of regions of interest for each category and providing semantic guidance for feature learning.

[0059] For example, an adapter can be constructed to reduce the dimensionality of RoI features, mapping them to a low-dimensional prototype space. All positive RoI features are added to a queue corresponding to their respective categories. Then, the prototype vectors for all categories are calculated by averaging the RoI features in the queues. Simultaneously, a prototype contrastive loss is applied to the prototype vectors of all categories to achieve separation of inter-class features and clustering of intra-class features.

[0060] It is understood that embodiments of this application provide a dynamic prototype queue, the main function of which is to build and maintain a structured feature memory for storing and managing RoI feature representations for all categories. This module aims to address the problems of feature sparsity and inter-class confusion in few-shot learning by continuously updating and optimizing category prototype vectors, providing stable and reliable semantic guidance for subsequent feature generation and classification.

[0061] In one possible embodiment, step 102 includes: maintaining a fixed-length region of interest feature for each category and updating it using a first-in-first-out principle to ensure that the stored features always reflect the latest distribution features of each category; when a new RoI feature is generated, the oldest feature will be replaced, thereby ensuring the timeliness of the queue content.

[0062] The queue calculates the prototype vector for each category using momentum updates. The prototype vector for each category is updated using a momentum coefficient-weighted historical prototype and the average of all region-of-interest features in the current queue, as expressed by the following formula: ; in, Indicates the momentum coefficient. Represents the original historical vector. Indicate category Feature queue, This represents the region of interest features in the feature queue. Indicate category Features of all regions of interest in the feature queue Sum.

[0063] Understandably, to avoid computational redundancy caused by high-dimensional features, embodiments of this application provide an adapter network that projects the original features into a low-dimensional subspace. This network achieves feature dimensionality compression through fully connected layers while retaining key discriminative information. The compressed features not only reduce storage overhead but also improve the efficiency of subsequent computations. To enhance the discriminative power of the features, please refer to the following embodiments: In one possible implementation, the prototype vector for each category is determined. Previously, the method provided in the embodiments of this application further included: The adapter network projects the original high-dimensional region of interest features into a low-dimensional subspace; the adapter network compresses the feature dimension through fully connected layers while retaining key discriminative information. Apply dynamic prototype contrast loss to the low-dimensional features output by the adapter network. This is to maximize the similarity between the features of each sample and the prototype vector corresponding to its true class, while minimizing its similarity to prototype vectors of other classes. Specific implementation methods include: ; in, Indicates the total number of samples in the batch; Indicates the first Each sample represents the true category. Represents a set of all categories; Indicates the indicator function, when the category Belongs to all category sets The value is 1 if it is true, and 0 otherwise. Indicates the features of the region of interest With prototype vector Cosine similarity between them; This represents the similarity index between the current sample features and the true category prototype, and represents the score of the positive sample pair; This represents the summation of similarity index terms over all categories of prototype similarity, with positive and negative samples forming a normalized denominator.

[0064] Understandably, this loss function encourages similar features to converge toward their prototypes, while dissimilar features move away from each other, thus forming a clearer decision boundary in the feature space.

[0065] Step 104: Based on the dynamic prototype queue and teacher-student network architecture, the label credibility of proposals marked as negative samples during training is evaluated and corrected to reduce the noise impact caused by incomplete labeling.

[0066] It is understood that the embodiments of this application provide a dynamic prototype-aware label corrector specifically designed to address the false negative problem caused by incomplete labeling in target detection with few samples in remote sensing images. This module is based on a teacher-student network architecture, i.e., a teacher-student framework, and dynamically adjusts the label assignment and loss weights of ambiguous samples through prototype similarity measurement, effectively mitigating the negative impact of incomplete labeling on model training.

[0067] For example, a dual-head detection system is constructed using a teacher-student architecture. The teacher detection head updates its parameters using an exponential moving average. For negative sample proposal features, the teacher network first performs label correction. When the classification confidence of a certain class in the teacher detection head exceeds a predetermined threshold, the background label of the negative sample is corrected to the corresponding class. For negative sample proposals in the "grey area" where the classification confidence is higher than the background threshold but lower than the target threshold, their similarity to the prototype vector is calculated. The highest similarity is selected and its weight is calculated using a monotonic function. The corrected labels and weights are then used to calculate the classification loss using the supervision information of the student detection head.

[0068] In one possible embodiment, step 104 includes: constructing a dual-detector structure; wherein, in the dual-detector structure, the teacher detector updates parameters from the student detector through an exponential moving average; During training, based on a dynamic prototype queue, the teacher's detection head is used to perform forward computation on proposals initially classified as negative samples to obtain their classification confidence scores. The specific implementation methods include: ; in, This represents the classifier for the teacher's detection head. Indicates the teacher's head is being tested. This represents the softmax function. Features of all regions of interest in each batch during training; Based on classification confidence scores and preset thresholds, negative sample proposals are divided into three categories: proposals that need to be corrected to positive samples, proposals that are confirmed as negative samples, and gray area proposals that need further analysis. For gray area proposals, calculate the cosine similarity between the features of their region of interest and the prototype vectors in the dynamic prototype queue. And based on this similarity Assign weight factors To adjust its contribution to the classification loss calculation, specific implementation methods include: ; ; ; in, and Indicates hyperparameters, Indicates similarity , Indicates an intermediate variable.

[0069] Step 105: Based on the prototype-guided generative adversarial network, a new region of interest feature is synthesized through a cross-attention mechanism using a random noise vector, the prototype vector of the new target category, and the real region of interest features of the same category as input. The new region of interest feature is then added to the training batch to expand the feature space of the new target category.

[0070] Among them, the target new category is a new category with scarce samples.

[0071] It is understood that embodiments of this application provide a prototype conditional attention feature generator, designed to address the issues of feature sparsity and inter-class bias caused by insufficient training samples for new categories in few-shot object detection. This module synthesizes high-quality new category RoI features through adversarial generation, significantly expanding the coverage of the feature space and improving the model's ability to detect rare category objects. The module structure mainly includes: a prototype-guided generator, a multi-scale discriminator, a feature semantic alignment mechanism, and an adversarial training optimization strategy.

[0072] First, a prototype conditional generative adversarial network (GAN) is trained during base training. Then, this network is fine-tuned during the fine-tuning phase. The prototype conditional GAN ​​takes three inputs: a noise vector, a prototype vector, and true RoI features. It then uses a cross-attention mechanism to generate corresponding new RoI feature samples, which are added to the training batch for subsequent classification loss calculation. Simultaneously, a multi-scale discriminator is used for adversarial training of the conditional GAN, thereby optimizing the parameters of the generator and discriminator.

[0073] For example, the random noise vector refers to a random vector sampled from a standard normal distribution. The prototype vector of the new target category refers to a feature vector representing the central semantics of the new target category from a dynamic prototype queue. This prototype vector is obtained by calculating the momentum average of all stored real RoI features of the category, thus encapsulating the core feature information of the category. The real region of interest features of the same category refer to the real RoI features belonging to the new target category extracted from the training batch.

[0074] For example, the prototype-conditionally guided generator employs a cross-attention mechanism, with input including three key components: a random noise vector. Prototype vector of the new target category True ROI characteristics of the same category The attention calculation process for the generator is as follows: ; in, , , , This indicates a vector concatenation operation. and This is a learnable weight matrix used in the attention mechanism to project input features onto the query, key, and value space; This represents the dimension of the key vector K; This represents the transpose of the key vector K.

[0075] For example, the multi-scale discriminator employs a three-head multi-scale architecture, evaluating the authenticity of generated features at different feature levels, and the multi-scale discriminant loss... Defined as: ; in, This represents fake samples generated by the generator. Indicates the first The probability estimate of the output of each discriminator.

[0076] For example, to ensure semantic consistency between the generated features and the target category, the prototype conditional attention feature generator introduces a classifier-guided loss. Specifically, it is expressed by the following formula: ; in, For a pre-trained classifier, this loss guides the generator to generate features oriented towards the target class. near.

[0077] For example, the prototype conditional attention feature generator uses Wasserstein distance as the training objective, exhibiting better training stability and convergence compared to traditional GANs. Its discriminator loss function... Defined as: ; in, The weights of the gradient penalty term are... As a gradient penalty term, it can effectively prevent the discriminator gradient from exploding or vanishing, ensuring smooth convergence during training.

[0078] like Figure 2 As shown, Figure 2 This is a flowchart of another method for small-sample target detection in remote sensing images based on prototype-guided generation, as proposed in one embodiment of this application.

[0079] First, the input "training set" data undergoes "oversampling" to initially alleviate the class imbalance problem. Then, two parallel data paths are used: a dynamic data augmentation channel further enhances the spatial level of the oversampled data to enrich the diversity of the input images; additionally, in another data path, the data is fed into a feature extraction network module, which builds a network to extract deep features from the images. Subsequently, these features enter a region of interest (ROI) proposal extraction module to generate candidate regions that may contain targets and their features. These features are finally input into the detection head network to accurately classify and locate targets within the candidate regions, outputting the final classification and localization results. Simultaneously, a dynamic prototype library module extends from the feature extraction network module. Its function is to compute and maintain an online memory that stores the central feature vectors of each category (especially rare new categories). This prototype library directly serves the prototype-guided feature-level sample generation module. This module utilizes the stored category prototype vectors to synthesize diverse new features of rare categories in the feature space for feature-level data augmentation. In the loss calculation and feedback optimization loop, the prediction results output by the detector head network serve as both the final output and are fed into the negative sample weight correction module. This module evaluates and adjusts the weights of difficult samples in the loss calculation to optimize the model's learning focus. The outputs of the negative sample weight correction module and the prototype-guided feature-level sample generation module are combined and fed into the overall loss calculation module. Here, classification loss, regression loss, generative adversarial loss, and weight correction terms are integrated to form the final optimization objective that guides the update of the entire network parameters.

[0080] This application proposes a prototype-guided remote sensing image small-sample target detection method. The method performs sample balancing and enhancement processing on the training dataset during the fine-tuning stage to ensure a balance between the number of base class samples and new class samples. It utilizes a backbone network and a multi-scale feature fusion module to extract multi-scale features from the input image and generate region-of-interest (ROI) proposals and their corresponding RIO features. Based on the RIO proposals and their corresponding RIO features, a dynamic prototype queue is constructed. Based on the dynamic prototype queue and the teacher-student network architecture, the label credibility of proposals marked as negative samples during training is evaluated and corrected to reduce the noise impact caused by incomplete labeling. Based on a prototype-condition-guided generative adversarial network, new RIO features are synthesized through a cross-attention mechanism using random noise vectors, prototype vectors of the new target class, and real RIO features of the same class as input. These new RIO features are then added to the training batch to expand the feature space of the new target class. Since the training dataset contains a large number of labeled base class targets and a small number of labeled new class targets, the method optimizes the training dataset during the fine-tuning stage. Oversampling is performed to balance the number of base and new class targets in the dataset. Then, for the repeatedly sampled new class samples, three independent data augmentation channels are designed to ensure a balanced and diverse number of base and new class samples, thus solving the overfitting problem. A dynamic prototype queue stores and manages prototype vectors for all categories. These prototype vectors are obtained by aggregating features from regions of interest (ROIs) for each category and provide semantic guidance for feature learning. This addresses the issues of feature sparsity and inter-class confusion in few-shot learning. Continuous updating and optimization of category prototype vectors provides stable and reliable semantic guidance for subsequent feature generation and classification. Furthermore, through the dynamic prototype queue and teacher-student network architecture, the credibility of proposals labeled as negative samples during training is evaluated and corrected, effectively mitigating the negative impact of incomplete labeling on model training. In addition, new ROI features are synthesized through a cross-attention mechanism and added to the training batch to expand the feature space of the new target category. This significantly expands the coverage of the feature space and improves the model's ability to detect targets in scarce categories. Based on this, this scheme can overcome the limitations of target detection due to insufficient sample labeling and improve detection accuracy.

[0081] The embodiment of this application provides a method for small-sample target detection in remote sensing images based on prototype-guided generation. This method can be simulated using PyTorch on a CPU with an Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz, 128GB of memory, and a Linux operating system. The data used in the simulation is a publicly available dataset. For example, the simulation data includes the widely used remote sensing image datasets DIOR and NWPU VHR-10.v2.

[0082] The DIOR dataset is a large-scale benchmark dataset for object detection in optical remote sensing images. It contains 23,463 images and 190,288 labeled instances across 20 common categories, including aircraft, airports, baseball fields, basketball courts, bridges, chimneys, dams, highway service areas, highway toll booths, ports, golf courses, athletic fields, overpasses, ships, stadiums, oil tanks, tennis courts, train stations, vehicles, and windmills. All images have a uniform width of 800 pixels, with spatial resolutions ranging from 0.5 meters to 30 meters. The dataset is rigorously divided into training, validation, and test sets, with sizes of 5682, 5863, and 11738 pixels, respectively.

[0083] NWPU VHR-10.v2 is a benchmark dataset for target detection in ultra-high resolution remote sensing imagery. This dataset contains 1172 images collected from Google Earth and Vaihingen data, all cropped and resized to 400×400 pixels to reflect real-world application scenarios. NWPU VHR-10.v2 remains a challenging dataset, including target categories such as aircraft, ships, oil tanks, baseball fields, tennis and basketball courts, athletic fields, ports, bridges, and vehicles.

[0084] To demonstrate the effectiveness of the method, the method provided in this application was compared with other advanced small-sample target detection methods. The evaluation metric was mAP (%).

[0085] Table 1. Performance of this application on the DIOR dataset.

[0086] The test results of the method provided in this application embodiment on the DIOR dataset are shown in Table 1. As can be seen from the table, the average detection accuracy of the method provided in this application embodiment on the DIOR test set is higher than that of other methods for new target classes.

[0087] Table 2. Performance of this application on the NWPU VHR-10.v2 dataset.

[0088] Table 2 shows the test results of the method provided in this application embodiment on the NWPU VHR-10.v2 dataset. As can be seen from the table, the average detection accuracy of the method provided in this application embodiment on the NWPU VHR-10.v2 test set is higher than that of other methods for novel target classes.

[0089] The steps described above are for clarity only. In implementation, they can be combined into one step, or some steps can be broken down into multiple steps, as long as they involve the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0090] Another embodiment of this application proposes a small-sample target detection device for remote sensing images based on prototype-guided generation. The details of this prototype-guided remote sensing image small-sample target detection device are described below. The following implementation details are provided for ease of understanding and are not essential for implementing this example. Figure 3 This is a schematic diagram of a remote sensing image small sample target detection device based on prototype-guided generation proposed in this embodiment, including: The sample balancing and augmentation module 310 is used to perform sample balancing and augmentation on the training dataset during the fine-tuning stage so that the number of base class samples and the number of new class samples are balanced; wherein, the training dataset contains base class targets with a large number of annotations and new class targets with only a small number of annotations; The extraction module 320 is used to extract multi-scale features of the input image using the backbone network and the multi-scale feature fusion module, and generate region of interest proposals and their corresponding region of interest features; Module 330 is used to construct a dynamic prototype queue based on region of interest proposals and their corresponding region of interest features. The dynamic prototype queue is used to store and manage prototype vectors of all categories. The prototype vectors are obtained by aggregating the region of interest features of each category and provide semantic guidance for feature learning. The evaluation and correction module 340 is used to evaluate and correct the label credibility of proposals marked as negative samples during training based on a dynamic prototype queue and teacher-student network architecture, so as to reduce the noise impact caused by incomplete labeling. The feature generation module 350 is used for a prototype-condition-guided generative adversarial network. It takes a random noise vector, a prototype vector of the target new category, and features of the real region of interest of the same category as inputs. It synthesizes new region of interest features through a cross-attention mechanism and adds the new region of interest features to the training batch to expand the feature space of the target new category. The target new category is a new category with scarce samples.

[0091] It is not difficult to see that this embodiment is a system embodiment corresponding to the above method embodiments, and this embodiment can be implemented in conjunction with the above method embodiments. The relevant technical details and technical effects mentioned in the above method embodiments are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiments.

[0092] It is worth mentioning that all modules and units involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units do not exist in this embodiment.

[0093] Another embodiment of this application provides an electronic device, such as Figure 4 As shown, it includes a processor 41 and a memory 42. The memory 42 stores instructions that the processor 41 can execute. When the processor 41 is configured to execute the instructions, the electronic device can implement a prototype-guided remote sensing image small sample target detection method as described in the above method embodiment.

[0094] The memory and processor are connected via a bus, which includes any number of interconnecting buses and bridges, connecting various circuits of one or more processors and the memory. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0095] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0096] Another embodiment of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, can implement a method for detecting small samples of remote sensing images based on prototype-guided generation, as described in the above method embodiments.

[0097] That is, those skilled in the art will understand that all or part of the steps in the above method embodiments can be implemented by a program instructing related hardware. The program is stored in a storage medium and includes several instructions to cause a device (such as a microcontroller, chip, etc.) or processor to execute all or part of the steps of the method described in the method embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.

[0098] Those skilled in the art will understand that the above embodiments are specific implementations of this application, and in practical applications, various changes can be made in form and detail without departing from the spirit and scope of this application. For those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A method for small-sample target detection in remote sensing images based on prototype-guided generation, characterized in that, The method includes: The training dataset in the fine-tuning stage is subjected to sample balancing and augmentation to ensure that the number of base class samples and new class samples are balanced; the training dataset contains base class targets with a large number of annotations and new class targets with only a small number of annotations. Multi-scale features of the input image are extracted using a backbone network and a multi-scale feature fusion module, and region of interest proposals and their corresponding region of interest features are generated. Based on region of interest proposals and their corresponding region of interest features, a dynamic prototype queue is constructed. The dynamic prototype queue is used to store and manage prototype vectors for all categories. The prototype vectors are obtained by aggregating the region of interest features for each category and provide semantic guidance for feature learning. Based on a dynamic prototype queue and a teacher-student network architecture, the credibility of the labels of proposals marked as negative samples during training is evaluated and corrected to reduce the noise impact caused by incomplete labeling. The prototype-guided generative adversarial network takes random noise vectors, prototype vectors of the new target category, and features of real regions of interest (ROIs) of the same category as inputs. It synthesizes new ROI features through a cross-attention mechanism and adds the new ROI features to the training batch to expand the feature space of the new target category. The new target category is a new category with scarce samples.

2. The method according to claim 1, characterized in that, The process of balancing and augmenting the training dataset during the fine-tuning phase to achieve a balance between the number of base class samples and the number of new class samples includes: Oversampling is performed on images of new class samples in the target training dataset to achieve a balance between the number of new class samples and the number of base class samples; For images of newly sampled samples with repeated sampling, at least three independent data augmentation channels are established, and the augmentation method is dynamically selected based on the image attribute identifier to increase data diversity; the augmentation methods of different data augmentation channels are different.

3. The method according to claim 2, characterized in that, The image-based attribute identification-based dynamic selection enhancement method is used to enhance data and increase data diversity, including: Assign duplicate index identifiers and small target index identifiers to each image; Based on the duplicate index identifier, detect whether each image is a duplicate sample; For images of repeatedly sampled samples, target channels are determined from at least three data augmentation channels based on the small target index identifier of the image to perform data augmentation, thereby increasing data diversity; For images with non-resampled samples, data augmentation is performed using the basic data augmentation channel.

4. The method according to claim 3, characterized in that, At least three data augmentation channels are included: a color jitter enhancement channel, a grid occlusion enhancement channel, and a small target replication enhancement channel; [Image description: ...] The duplicate index is identified as The small target index is identified as ; The step of detecting whether each image is a duplicate sample based on the duplicate index identifier includes: Detect duplicate index identifiers Is it 1? If duplicate index identifier If so, the image is a duplicate sample; If duplicate index identifier If so, then the image is a non-repeating sample; The small target index identifier based on the image determines the target channel from at least three independent data augmentation channels, including: If the small target index identifier Then the small target replication enhancement channel will be determined as the target channel; If the small target index identifier Based on As a result, the target channel is selected cyclically from the color jitter enhancement channel, the mesh occlusion enhancement channel, and the small target replication enhancement channel.

5. The method according to claim 1, characterized in that, The construction of a dynamic prototype queue based on region-of-interest proposals and their corresponding region-of-interest features includes: Maintain a fixed-length region of interest feature for each category and update it using a first-in, first-out (FIFO) principle; The queue calculates the prototype vector for each category using momentum updates. The prototype vector for each category is updated using the average of the momentum coefficient-weighted historical prototypes and the features of all regions of interest in the current queue, as expressed by the following formula: ; in, Indicates the momentum coefficient. Represents the original historical vector. Indicate category Feature queue, This represents the region of interest features in the feature queue. Indicate category Features of all regions of interest in the feature queue Sum.

6. The method according to claim 5, characterized in that, In determining the prototype vector for each category Previously, the method also included: The adapter network projects the original high-dimensional region of interest features into a low-dimensional subspace; the adapter network compresses the feature dimension through fully connected layers while retaining key discriminative information. Apply dynamic prototype contrast loss to the low-dimensional features output by the adapter network. This is to maximize the similarity between the features of each sample and the prototype vector corresponding to its true class, while minimizing its similarity to prototype vectors of other classes. Specific implementation methods include: ; in, Indicates the total number of samples in the batch; Indicates the first Each sample represents the true category. Represents a set of all categories; Indicates the indicator function, when the category Belongs to all category sets The value is 1 if it is true, and 0 otherwise. Indicates the features of the region of interest With prototype vector Cosine similarity between them; This represents the similarity index between the current sample features and the true category prototype, and represents the score of the positive sample pair; This represents the summation of similarity index terms over all categories of prototype similarity, with positive and negative samples forming a normalized denominator.

7. The method according to claim 6, characterized in that, The method, based on a dynamic prototype queue and teacher-student network architecture, evaluates and corrects the label credibility of negative sample proposals generated during training to reduce the noise impact caused by incomplete labeling, including: A dual-detector head structure is constructed; in this structure, the teacher detector head updates parameters from the student detector head using an exponential moving average. During training, based on a dynamic prototype queue, the teacher's detection head is used to perform forward computation on proposals initially classified as negative samples to obtain their classification confidence scores. The specific implementation methods include: ; in, This represents the classifier for the teacher's detection head. Indicates the teacher's head is being tested. This represents the softmax function. Features of all regions of interest in each batch during training; Based on classification confidence scores and preset thresholds, negative sample proposals are divided into three categories: proposals that need to be corrected to positive samples, proposals that are confirmed as negative samples, and gray area proposals that need further analysis. For gray area proposals, calculate the cosine similarity between the features of their region of interest and the prototype vectors in the dynamic prototype queue. And based on this similarity Assign weight factors To adjust its contribution to the classification loss calculation, specific implementation methods include: ; ; ; in, and Indicates hyperparameters, Indicates similarity , Indicates an intermediate variable.

8. A target detection device for small samples of remote sensing images based on prototype-guided generation, characterized in that, The device includes: The sample balancing and augmentation module is used to balance and augment the training dataset during the fine-tuning stage, so that the number of base class samples and the number of new class samples are balanced. The training dataset contains base class targets with a large number of annotations and new class targets with only a small number of annotations. The extraction module is used to extract multi-scale features of the input image using the backbone network and the multi-scale feature fusion module, and generate region of interest proposals and their corresponding region of interest features; The building module is used to construct a dynamic prototype queue based on region of interest proposals and their corresponding region of interest features. The dynamic prototype queue is used to store and manage prototype vectors of all categories. The prototype vectors are obtained by aggregating the region of interest features of each category and provide semantic guidance for feature learning. The evaluation and correction module is used to evaluate and correct the label credibility of proposals marked as negative samples during training, based on a dynamic prototype queue and teacher-student network architecture, so as to reduce the noise impact caused by incomplete labeling. The feature generation module is used for prototype-condition-guided generative adversarial networks. It takes random noise vectors, prototype vectors of the target new category, and features of real regions of interest in the same category as inputs. It synthesizes new regions of interest features through cross-attention mechanism and adds the new regions of interest features to the training batch to expand the feature space of the target new category. The target new category is a new category with scarce samples.

9. An electronic device, characterized in that, include: The processor and memory, wherein the memory stores instructions executable by the processor, and the processor is configured to, when executing the instructions, enable the electronic device to implement a method for detecting small samples of remote sensing images based on prototype-guided generation as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it can implement a method for detecting small samples of remote sensing images based on prototype-guided generation as described in any one of claims 1 to 7.