Field adaptive remote sensing image target detection method and system
By constructing a teacher-student model based on the DETR architecture, and combining frequency domain feature fusion and dynamic threshold setting, the problems of inflexible pseudo-label thresholds and insufficient feature collaboration in target detection of remote sensing images are solved, thereby improving the accuracy and generalization ability of cross-domain detection.
Patent Information
- Application Number
- CN202511033845.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-04
AI Technical Summary
Existing remote sensing image target detection technologies suffer from inflexible pseudo-label threshold settings and insufficient feature coordination among network components, resulting in inadequate generalization ability of the models in cross-domain detection tasks.
We employ a teacher-student model based on the DETR architecture, and optimize the detection loss through source domain pre-training, target domain dual enhancement, frequency domain feature fusion, prototype alignment loss, and dynamic threshold setting. We also dynamically adjust the pseudo-label quality by combining feature fusion of CNN and Transformer.
It improves the accuracy and generalization ability of target detection in cross-domain remote sensing images, and significantly enhances the detection performance in cross-sensor scenarios. In particular, the ship detection accuracy is improved by 7.2% on the DOTA dataset, and the recall rate of the Plane category is significantly improved.
Smart Images

Figure CN120894692A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing image target detection technology, specifically relating to a domain-adaptive remote sensing image target detection method and system. Background Technology
[0002] Remote sensing image target detection technology has key application value in fields such as environmental monitoring, agricultural assessment, disaster early warning, military reconnaissance, and urban planning. With the widespread use of equipment such as satellites, drones, and hyperspectral sensors, the acquisition of massive amounts of remote sensing image data has become possible. Furthermore, with the emergence of various depth target detection frameworks, such as Faster R-CNN, YOLO, and DETR, remote sensing image target detection technology has been significantly improved and is gradually being applied in real-world scenarios.
[0003] However, due to factors such as sensor type, imaging conditions, observation angle, and geographical environment, significant domain shifts exist between different remote sensing data sources, meaning there are significant differences in data feature distribution. This leads to poor performance of models trained on one dataset on new data sources, severely limiting the practical application performance of detection models. To address this issue, adaptive target detection technology in the remote sensing image domain has been proposed. This technology aims to solve the problem of feature distribution differences between different remote sensing image domains, enabling models to maintain generalization ability in remote sensing image detection tasks across sensors, imaging conditions, and geographical environments, thus achieving better detection results.
[0004] While existing methods have demonstrated good performance, they still face two major problems: First, existing teacher-student models mostly use fixed threshold strategies to generate pseudo-labels, which cannot adapt to the dynamic changes in pseudo-label quality during model training; second, the backbone network, encoder-decoder and other components in the model are trained independently for adversarial purposes, lacking interaction between features. This not only makes it difficult for the components of the detection framework to coordinate optimization and adversarial alignment, but also significantly increases the computational cost. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a domain-adaptive remote sensing image target detection method and system to address the shortcomings of the prior art. This method solves the problems of inflexible pseudo-label threshold setting, insufficient feature coordination among components in the network framework, and generalization of target detection technology in practical applications, thereby improving the detection accuracy in cross-scene remote sensing image target detection tasks.
[0006] The present invention adopts the following technical solution: A domain-adaptive remote sensing image target detection method includes the following steps: S1. Obtain the source domain image. and target domain image and the target domain image Perform weak and strong enhancements; S2. Construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; S3. Extract source domain image and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. ; S4, Teacher Model Parameters From the student model using the exponential moving average method Updated in the middle; S5. Object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. ; S6. By guiding the dynamic threshold setting of the category through the sample confidence output and the current prototype similarity, the target domain is divided into a low confidence part and a high confidence part; S7. In the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence part of the target domain. After the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection result.
[0007] Preferably, in step S2, a target detection loss is applied to the prediction result of the source domain image, using the source domain image... Pre-trained teacher-student model, object detection loss as follows:
[0008] in, For the model prediction results, For real labels, For classifying losses, To regress the loss, To mitigate losses, To predict the probability distribution of categories, For real category labels, and To lose weight, To predict the bounding box, These are the coordinates of the actual bounding box.
[0009] Preferably, step S3 specifically includes: Using linear transformation matrix , , Transform the features to obtain the query required by the attention mechanism. Q ,key K Sum V ; By applying discrete cosine transform to the query Q s and keys K Transform to the frequency domain, apply low-frequency and high-frequency filters to adjust the frequency domain features, obtain the feature correlation coefficients through element-wise multiplication, then perform an inverse discrete cosine transform and apply the softmax function to obtain the attention weights. A ; Obtain attention weights A After that, the value V Adjustments were made to obtain preliminary features for adversarial learning. The initial features are processed again using a learnable filter, and then a deep mapping is performed on the initial features using an activation function and a linear transformation to obtain features for adversarial learning. , ; Features The input is fed into the domain discriminator for adversarial learning, and the domain discriminator is composed of...
[0010] Preferably, attention weights A for:
[0011] in, Represents the discrete cosine transform. This is the inverse cosine transform, where × represents element-wise multiplication. This indicates a learnable filter.
[0012] Preferably, the domain discriminator consists of three fully connected layers, and each layer except the last one is followed by a ReLU activation function.
[0013] Preferably, step S5 specifically includes: The decoder takes an object query of size N×d as input. O n The predicted category obtained after passing through the decoder and feedforward network is C n The centroid of a category is obtained by merging queries for objects belonging to the same category and dividing by the corresponding number of samples. The prototype loss is calculated using the L2 distance between category prototypes and the L2 distance between category prototypes and background prototypes. .
[0014] Preferably, prototype loss The calculation is as follows:
[0015] in, Let i be the prototype of the i-th class in the source domain. Let i be the prototype of the i-th class in the target domain. and These are the background prototypes of the source domain and the target domain, respectively.
[0016] Preferably, step S6 specifically involves: For each sample in this batch i Calculate the maximum probability and the corresponding category index ,in, Representing the i Each sample belongs to class c The probability for each class; c If there exists a sample whose maximum probability corresponds to the category is c These samples are called belonging to category c Maximum probability sample set ,calculate The average value of the elements in the set is used as the new threshold for this class; if it does not exist (i.e., the size of the maximum probability sample set is 0), then the previous threshold is used. c The threshold before the class is used to obtain the baseline threshold. ; Utilizing the prototypes of the source and target domains and Set category confidence level Based on this, the target domain samples are divided into low-confidence and high-confidence portions, with the category confidence greater than [a certain value]. The sample is a high-confidence sample, lower than The samples are low-confidence samples.
[0017] Preferably, category confidence for:
[0018] in, c For the current category, As the baseline threshold, For the number of categories, , The first and second parts of the source domain are respectively i The first class prototype and the target domain i Class prototype, and These are the weighting parameters for the two prototype modulation methods.
[0019] Secondly, embodiments of the present invention provide a domain-adaptive remote sensing image target detection system, comprising: Data module, acquires source domain image and target domain image and the target domain image Weak and strong augmentations are performed to construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; Extraction module extracts source domain image and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. ; Update module, teacher model parameters From the student model using the exponential moving average method Update in the middle; object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. ; The segmentation module guides the dynamic threshold setting of categories by using sample confidence output and current prototype similarity to divide the target domain into low-confidence and high-confidence parts; In the detection module, during the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence portion of the target domain. After the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection results.
[0020] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the aforementioned field-adaptive remote sensing image target detection method.
[0021] Fourthly, embodiments of the present invention provide a computer-readable storage medium including a computer program, which, when executed by a processor, implements the steps of the aforementioned field-adaptive remote sensing image target detection method.
[0022] Fifthly, a chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the aforementioned field-adaptive remote sensing image target detection method.
[0023] In a sixth aspect, embodiments of the present invention provide an electronic device including a computer program, which, when executed by the electronic device, implements the steps of the aforementioned adaptive remote sensing image target detection method.
[0024] Compared with the prior art, the present invention has at least the following beneficial effects: A domain-adaptive remote sensing image target detection method is proposed. This method constructs a DETR-based teacher-student model and employs source domain pre-training, target domain dual enhancement, frequency domain feature fusion, prototype alignment loss, and dynamic threshold segmentation to jointly optimize the detection loss. Weak enhancement preserves target structure, while strong enhancement simulates inter-domain differences, improving model generalization. Local features from CNNs and global associations from Transformers are fused in the frequency domain through filtering to enhance cross-domain feature robustness. The threshold is dynamically adjusted based on prototype similarity and inter-class discriminability to address pseudo-label noise caused by fixed thresholds, forming a closed-loop optimization. In cross-sensor scenarios, this method significantly outperforms traditional fixed-threshold methods.
[0025] Furthermore, the features are transformed to the frequency domain by DCT → a learnable filter separates high and low frequencies → inverse DCT reconstructs spatial attention → weighted fusion of features. DCT separates domain offset noise to high frequencies, and the learnable filter adaptively preserves low-frequency semantics. The spatial attention generated by the frequency domain correlation coefficient focuses on cross-domain consistency regions and suppresses background interference. In the DOTA dataset, frequency domain fusion improves the AP of ship detection by 7.2% because high-frequency filtering effectively suppresses wave interference.
[0026] Furthermore, by aggregating the feature vectors of similar objects as centroids, calculating the cross-domain distance between similar prototypes and the distance to the background prototype, DETR encodes the target location and category of the object query. The centroids naturally aggregate the commonalities within the class, forcing the foreground prototypes to move away from the background, thus improving the distinguishability of small targets.
[0027] Furthermore, the threshold is updated based on the current batch confidence average to adapt to changes in the model training phase. When the cross-domain prototype similarity is high, the threshold is relaxed to include more samples, and when the inter-class prototype similarity is high, the threshold is tightened to reduce mislabeling, improve the quality of pseudo-labels, and increase the recall rate in the Plane category.
[0028] Furthermore, the modular implementation of data preprocessing, feature adversarial processing, dynamic thresholding, and other processes allows for the use of learnable filters as independent hardware units. The frequency domain filtering module can be accelerated by FPGA to improve inference speed. The domain discriminator and feature extractor are separated, and multi-sensor expansion is supported. The system can process 1024×1024 images in real time on edge devices.
[0029] It is understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0030] In summary, this invention pioneers a prototype modulation dynamic thresholding mechanism, enhancing cross-domain robustness through frequency domain feature fusion and achieving precise domain adaptation by combining category prototype alignment. The dynamic thresholding adaptively optimizes pseudo-labels based on prototype similarity and inter-class confusion, addressing the core challenges of variable target scales and complex terrain features in remote sensing scenarios. Experiments show that the mAP reaches 61.1% in cross-domain remote sensing detection tasks, improving edge deployment efficiency.
[0031] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0032] Figure 1 This is a flowchart of the domain-adaptive remote sensing image target detection method based on prototype modulation dynamic threshold strategy in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the deep learning model in an embodiment of the present invention; Figure 3 This is a schematic diagram of a learnable filter module in an embodiment of the present invention; Figure 4 A schematic diagram of a computer device provided in an embodiment of the present invention; Figure 5 This is a block diagram of a chip provided according to an embodiment of the present invention.
[0033] Among them, 60. Computer equipment; 61. Processor; 62. Memory; 63. Computer program; 600. Electronic device; 610. Processing unit; 620. Storage unit; 6201. Random access memory unit; 6202. Cache memory unit; 6203. Read-only memory unit; 6204. Program / utility; 6205. Program module; 630. Bus; 640. Display unit; 650. Input / output interface; 660. Network adapter; 700. External device. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] In the description of this invention, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0036] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0037] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this invention generally indicates that the preceding and following objects have an "or" relationship.
[0038] It should be understood that although terms such as first, second, third, etc., may be used in the embodiments of the present invention to describe the preset range, these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from one another. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0039] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0040] The accompanying drawings illustrate various structural schematic diagrams according to embodiments disclosed in this invention. These drawings are not to scale, and some details have been enlarged for clarity, and some details may have been omitted. The shapes of the various regions and layers shown in the drawings, as well as their relative sizes and positional relationships, are merely exemplary and may deviate from reality due to manufacturing tolerances or technical limitations. Furthermore, those skilled in the art can design regions / layers with different shapes, sizes, and relative positions as needed.
[0041] This invention provides a domain-adaptive remote sensing image target detection method based on the Deformable DETR architecture. It introduces a teacher-student learning paradigm and constructs a frequency-domain-guided feature alignment mechanism. The method first uses source domain data for model pre-training and combines frequency-domain filters with CNN and Transformer encoder features to mitigate feature offset between different domains. Then, it constructs category prototypes for the source and target domains and applies prototype adversarial loss and inter-prototype contrast loss to achieve domain alignment at the category level. During pseudo-label generation, a prototype-guided dynamic threshold strategy is introduced, adaptively dividing high- and low-confidence samples in the target domain based on sample confidence and prototype similarity, and dynamically updating the category pseudo-label judgment criteria. Through a two-stage training mechanism, high-confidence pseudo-labels guide target domain detection learning during the teacher-student model mutual learning stage, improving the model's transfer performance in the target domain. This invention fully integrates frequency-domain modeling and prototype modulation mechanisms, effectively enhancing the robustness and generalization ability of cross-domain target detection, addressing issues such as complex ground features, large target scale differences, and weak inter-category separability in remote sensing images. Experimental results show that the method of the present invention significantly outperforms existing methods in adaptive tasks in multiple remote sensing image domains, and has good practical application value.
[0042] Example 1 Please see Figure 1 The present invention provides a domain-adaptive remote sensing image target detection method, comprising the following steps: S1. Obtain the source domain image and its annotation data, denoted as... and target domain image The target domain image has no manually labeled information; and two different levels of data augmentation are performed on the target domain image; among them, Represents source domain image samples, Indicates the label of the target bounding box in the source domain image. Represents the target classification label in the source domain image. Represents the target domain image sample; In this embodiment, the source domain image and the target domain image are input into the network model in parallel in batches. The weak data augmentation applied to the target domain is random horizontal image flipping and random scaling, while the strong data augmentation includes random adjustment of brightness, contrast, saturation and hue, random conversion to grayscale and random Gaussian blur.
[0043] S2. Building a deep learning model (see below) Figure 2 The model includes the feature extraction backbone network ResNet50 and the basic detection architecture Deformable DETR; In an embodiment of the present invention, the teacher-student model used in the warm-up phase applies target detection loss only to the prediction results of the source domain image. This loss is composed of classification loss. Regression loss and auxiliary losses Composition, defined as:
[0044]
[0045]
[0046]
[0047] in, For the model prediction results, For real labels, The optimal assignment function obtained from Hungarian matching. and To lose weight, To predict the probability distribution of categories, For real category labels, To predict the bounding box, These are the coordinates of the actual bounding box.
[0048] S3. Input the multi-scale CNN features obtained from the source and target domain samples through ResNet50 and the features obtained through the DeformableDETR encoder into the learnable filter module, then pass them through the domain discriminator to obtain the output, and apply adversarial loss to the output. ; In this embodiment, please refer to Figure 3 The input to the learnable filter is multi-scale CNN features and multi-layer Transformer encoder features. The CNN features are the feature maps of the 2nd, 3rd, and 4th layers of ResNet and the feature map obtained by downsampling the 4th layer by 2. The Transformer encoder features are the output features of the first four layers of the Deformable DETR encoder. After the two are subjected to discrete cosine transform to obtain frequency domain features, they are input to high and low frequency filters to obtain filtered features. Frequency domain attention is calculated based on these features, and finally, features are obtained for input to the domain discriminator for adversarial learning.
[0049] S301, Using linear transformation matrix , , To transform the features to obtain the query required in the attention mechanism Q ,key K Sum V ;
[0050] in, For multi-scale CNN features, Features of a multi-layer Transformer encoder Indicates the number of layers; S302. Calculate the attention weights in the frequency domain and apply the discrete cosine transform to the query... Q s and keys K The frequency domain is transformed, and low-frequency and high-frequency filters are applied to adjust the frequency domain features. Then, the feature correlation coefficients are obtained through element-wise multiplication. Finally, the attention weights are obtained by performing an inverse discrete cosine transform and applying the softmax function. A ;
[0051] in, Represents the discrete cosine transform. This is the inverse cosine transform, where × represents element-wise multiplication. This indicates a learnable filter.
[0052] S303, After obtaining the weights, adjust the values... V Adjustments were made to obtain preliminary features for adversarial learning. The initial features are further processed using the learnable filter in step S302 to enrich the features. At the same time, the features are deeply mapped using activation functions and linear transformations, finally obtaining the features used for adversarial learning. ;
[0053]
[0054]
[0055]
[0056] in, Presentation layer normalization operation.
[0057] S304, will The input is fed into the domain discriminator for adversarial learning. In this embodiment, the domain discriminator consists of three fully connected layers, and each layer except the last one has a ReLU activation function.
[0058] S4. In the teacher-student model structure, the teacher model parameters From the student model using the exponential moving average method Updated in the middle; The updated formula is:
[0059] in, and These are the parameters for the teacher network and the student network, respectively. i Indicates the training steps, α Indicates the parameter weights.
[0060] S5. Object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. ; The specific steps are as follows: S501, The input to the decoder is an object query of size N×d. O n The predicted category obtained after passing through the decoder and feedforward network is C n The centroid of a category is obtained by merging queries for objects belonging to the same category and dividing by the corresponding number of samples. ;
[0061] in, c Indicates category, while N This indicates the total number of categories.
[0062] S502, use the L2 distance between category prototypes and the L2 distance between category prototypes and background prototypes as prototype loss. .
[0063] Prototype loss The calculation is as follows:
[0064] in, Let i be the prototype of the i-th class in the source domain. Let i be the prototype of the i-th class in the target domain. and These are the background prototypes of the source domain and the target domain, respectively.
[0065] S6. By guiding the dynamic threshold setting of the category through the sample confidence output and the current prototype similarity, the target domain samples are divided into low confidence part and high confidence part; The specific steps will be as follows: S601, For each sample in this batch i Calculate the maximum probability and the corresponding category index ,in, Representing the i Each sample belongs to class c The probability of;
[0066] S602, For each class c If there exists a sample whose maximum probability corresponds to the category is c These samples are called belonging to category c Maximum probability sample set ,calculate The average value of the elements in the set is used as the new threshold for this class; if it does not exist (i.e., the size of the maximum probability sample set is 0), then the previous threshold is used. c The threshold before the class is used to obtain the baseline threshold. ;
[0067] in, Represented as the first c The threshold before the class, This is the size of the sample set.
[0068] S603, Utilizing the prototypes of the source and target domains and Set category confidence level Based on this, the target domain samples are divided into a low-confidence part and a high-confidence part, that is, the category confidence is greater than 1%. The sample is a high-confidence sample, lower than The samples are low-confidence samples.
[0069]
[0070] in, c For the current category, For the number of categories, , The first and second parts of the source domain are respectively i The first class prototype and the target domain i Class prototype, and These are the weighting parameters for the two prototype modulation methods.
[0071] S7, the teacher-student mutual learning phase, in addition to combating losses Source domain target detection loss In addition, a detection loss is applied to high-confidence samples in the target domain, and this loss is the same as that in step S2. Consistent; after model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR object detection architecture to obtain the object detection results.
[0072] Example 2 In another embodiment of the present invention, a domain-adaptive remote sensing image target detection system is provided. This system can be used to implement the above-mentioned domain-adaptive remote sensing image target detection method. Specifically, the domain-adaptive remote sensing image target detection system includes a data module, an extraction module, an update module, a partitioning module, and a detection module.
[0073] The data module acquires the source domain image. and target domain image and the target domain image Weak and strong augmentations are performed to construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; Extraction module extracts source domain image and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. ; Update module, teacher model parameters From the student model using the exponential moving average method Update in the middle; object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. ; The segmentation module guides the dynamic threshold setting of categories by using sample confidence output and current prototype similarity to divide the target domain into low-confidence and high-confidence parts; In the detection module, during the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence portion of the target domain. After the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection results.
[0074] Example 3 This invention provides a terminal device comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used for the operation of a domain-adaptive remote sensing image target detection method, including: Acquire source domain image and target domain image and the target domain image Perform weak and strong enhancements; construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; extraction of source domain images and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. Teacher model parameters From the student model using the exponential moving average method Update in the middle; object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. By guiding the dynamic threshold setting of categories through sample confidence output and current prototype similarity, the target domain is divided into low-confidence and high-confidence parts; during the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence part of the target domain; after the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection result.
[0075] Please see Figure 4 The terminal device is a computer device. In this embodiment, the computer device 60 includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When executed by the processor 61, the computer program 63 implements the method for estimating the concentration of radioactive iodine species in the containment vessel after an accident, as described in this embodiment. To avoid repetition, these details are not elaborated here. Alternatively, when executed by the processor 61, the computer program 63 implements the functions of each model / unit in the adaptive remote sensing image target detection system of this embodiment. To avoid repetition, these details are not elaborated here.
[0076] Computer device 60 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. Computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will understand that... Figure 4 This is merely an example of computer device 60 and does not constitute a limitation on computer device 60. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.
[0077] The processor 61 may be a Central Processing Unit (CPU), or other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0078] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or RAM of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device 60.
[0079] Furthermore, the memory 62 may include both internal storage units of the computer device 60 and external storage devices. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.
[0080] Please see Figure 5 The terminal device is an electronic device 600, which is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0081] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the method section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.
[0082] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.
[0083] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0084] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.
[0085] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem). This communication can be performed via input / output interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network, wide area network, and / or public network, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0086] Example 4 This invention also provides a storage medium, specifically a computer-readable storage medium, which is a memory device in a terminal device for storing programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the terminal device and extended storage media supported by the terminal device; it can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor, which can be one or more computer programs (including program code). More specific examples of the computer-readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical fiber, portable compact disk read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0087] Computer-readable storage media also include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium can also be any readable medium other than a readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency, etc., or any suitable combination thereof.
[0088] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0089] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the field-adaptive remote sensing image target detection method in the above embodiments; one or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps: Acquire source domain image and target domain image and the target domain image Perform weak and strong enhancements; construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; extraction of source domain images and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. Teacher model parameters From the student model using the exponential moving average method Update in the middle; object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. By guiding the dynamic threshold setting of categories through sample confidence output and current prototype similarity, the target domain is divided into low-confidence and high-confidence parts; during the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence part of the target domain; after the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection result.
[0090] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0091] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0092] To verify the effectiveness of the present invention, image data of three common target classes in the optical remote sensing target detection dataset xView and DOTA were selected to construct two different image domains for domain adaptation experiments. The three target classes are Plane, Ship and Storage-tank.
[0093] This experiment used xView data as the source domain data and DOTA as the target domain data. Table 1 shows the detection results in the target domain.
[0094] Table 1: Mean Accuracy of Target Detection in Experiments (%)
[0095] The results show that the present invention has a significant performance improvement over existing algorithms, exceeding the current state-of-the-art remote sensing teacher model RST by 2.4%, and exceeding the other two methods using Deformable DETR as detectors, SFA and AQT, by 7.4% and 2.8% respectively. It also exceeds Deformable DETR direct transfer, DAF, SWDA, and EMP by 10.1%, 18.4%, 22.4%, and 6.3% respectively.
[0096] In terms of categories, the method of the present invention achieves the best detection accuracy in two of the three categories, and the average accuracy is significantly higher than that of the comparison method. The above experiments can prove the effectiveness and advancement of the method of the present invention.
[0097] In summary, the present invention provides a domain-adaptive remote sensing image target detection method and system that can improve transfer efficiency and the accuracy of target detection in deep learning models, and has high promotional value. In the xView→DOTA transfer task, the mAP is improved to 61.1%, and the Storage-tank detection AP reaches 60.1%. Due to the effective suppression of complex background interference by dynamic threshold alignment with the prototype, the mAP is maintained at 58.2% in cross-sensor scenarios. The frequency domain filtering module eliminates the influence of sensor noise, and the hardware implementation of the learnable filter reduces the inference latency to 65ms, meeting the real-time processing requirements of satellites. In cloud-covered samples, threshold adjustment based on prototype similarity improves the recall rate by 23% and reduces the false detection rate by 18%.
[0098] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0099] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0100] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0101] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0103] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0104] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random-access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0105] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0106] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0107] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0108] The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solution based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. A domain-adaptive remote sensing image target detection method, characterized in that, Includes the following steps: S1. Obtain the source domain image. and target domain image and the target domain image Perform weak and strong enhancements; S2. Construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; S3. Extract source domain image and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. ; S4, Teacher Model Parameters From the student model using the exponential moving average method Updated in the middle; S5. Object query based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. ; S6. By guiding the dynamic threshold setting of the category through the sample confidence output and the current prototype similarity, the target domain is divided into a low confidence part and a high confidence part; S7. In the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence part of the target domain. After the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection result.
2. The domain-adaptive remote sensing image target detection method according to claim 1, characterized in that, In step S2, an object detection loss is applied to the prediction result of the source domain image, using the source domain image... Pre-trained teacher-student model, object detection loss as follows: in, For the model prediction results, For real labels, For classifying losses, To regress the loss, To mitigate losses, To predict the probability distribution of categories, For real category labels, and To lose weight, To predict the bounding box, These are the coordinates of the actual bounding box.
3. The domain-adaptive remote sensing image target detection method according to claim 1, characterized in that, Step S3 is as follows: Using linear transformation matrix , , Transform the features to obtain the query required by the attention mechanism. Q ,key K Sum V ; By applying discrete cosine transform to the query Q s and keys K Transform to the frequency domain, apply low-frequency and high-frequency filters to adjust the frequency domain features, obtain the feature correlation coefficients through element-wise multiplication, then perform an inverse discrete cosine transform and apply the softmax function to obtain the attention weights. A ; Obtain attention weights A After that, the value V Adjustments were made to obtain preliminary features for adversarial learning. The initial features are processed again using a learnable filter, and then a deep mapping is performed on the initial features using an activation function and a linear transformation to obtain features for adversarial learning. , ; Features The input is fed into the domain discriminator for adversarial learning, and the domain discriminator is composed of...
4. The domain-adaptive remote sensing image target detection method according to claim 3, characterized in that, Attention weight A for: in, Represents the discrete cosine transform. This is the inverse cosine transform, where × represents element-wise multiplication. This indicates a learnable filter.
5. The domain-adaptive remote sensing image target detection method according to claim 3, characterized in that, The domain discriminator consists of three fully connected layers, and each layer except the last one is followed by a ReLU activation function.
6. The domain-adaptive remote sensing image target detection method according to claim 1, characterized in that, Step S5 is as follows: The decoder takes an object query of size N×d as input. O n The predicted category obtained after passing through the decoder and feedforward network is C n The centroid of a category is obtained by merging queries for objects belonging to the same category and dividing by the corresponding number of samples. The prototype loss is calculated using the L2 distance between category prototypes and the L2 distance between category prototypes and background prototypes. .
7. The domain-adaptive remote sensing image target detection method according to claim 6, characterized in that, Prototype loss The calculation is as follows: in, Let i be the prototype of the i-th class in the source domain. Let i be the prototype of the i-th class in the target domain. and These are the background prototypes of the source domain and the target domain, respectively.
8. The domain-adaptive remote sensing image target detection method according to claim 1, characterized in that, Step S6 specifically involves: For each sample in this batch i Calculate the maximum probability and the corresponding category index ,in, Representing the i Each sample belongs to class c The probability for each class; c If there exists a sample whose maximum probability corresponds to the category is c These samples are called belonging to category c Maximum probability sample set ,calculate The average value of the elements in the set is used as the new threshold for this class; if it does not exist (i.e., the size of the maximum probability sample set is 0), then the previous threshold is used. c The threshold before the class is used to obtain the baseline threshold. ; Utilizing the prototypes of the source and target domains and Set category confidence level Based on this, the target domain samples are divided into low-confidence and high-confidence portions, with the category confidence greater than [a certain value]. The sample is a high-confidence sample, lower than The samples are low-confidence samples.
9. The domain-adaptive remote sensing image target detection method according to claim 8, characterized in that, Category confidence for: in, c For the current category, As the baseline threshold, For the number of categories, , The first and second parts of the source domain are respectively i The first class prototype and the target domain i Class prototype, and These are the weighting parameters for the two prototype modulation methods.
10. A domain-adaptive remote sensing image target detection system, characterized in that, include: Data module, acquires source domain image and target domain image and the target domain image Weak and strong augmentations are performed to construct a teacher-student model based on the DETR architecture, utilizing source domain images. Pre-trained teacher-student model; Extraction module extracts source domain image and target domain image Multi-scale CNN features and Transformer encoder features are input into a learnable filter module for frequency domain fusion, and adversarial loss is calculated through a domain discriminator. ; Update module, teacher model parameters From the student model using the exponential moving average method Updated in the middle; Object queries based on the DETR framework O n Constructing class prototypes Apply prototype loss to the source domain prototype and the target domain prototype. ; The segmentation module guides the dynamic threshold setting of categories by using sample confidence output and current prototype similarity to divide the target domain into low-confidence and high-confidence parts; In the detection module, during the teacher-student model mutual learning phase, a detection loss is applied to the high-confidence portion of the target domain. After the teacher-student model training is completed, the target domain image is input into the feature extraction backbone and the Deformable DETR target detection architecture to obtain the target detection results.
Citation Information
Cited By
STM image chiral molecule cross-domain detection method based on frequency domain prototype domain alignment
CN121438309A