Remote sensing image cross-domain target detection method based on prototype comparison

By constructing class prototype and frequency-aware prototype update mechanisms, combined with frozen teacher models and hybrid pseudo-label distillation, the problem of pseudo-label instability in cross-domain target detection of remote sensing images is solved, thereby improving the cross-domain detection accuracy and adaptability of the model.

CN121883992APending Publication Date: 2026-04-17HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN UNIV
Filing Date
2026-01-15
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing cross-domain target detection methods for remote sensing images, the quality of pseudo-labels is unstable, the coupling between teacher and student models is high, and it is difficult to effectively enhance inter-class separability and feature alignment under complex scenes and long-tailed category conditions.

Method used

By constructing a stable class prototype and frequency-aware prototype update mechanism, combining a frozen teacher model and a pre-trained mean teacher model, high-confidence features are selected to form class prototypes, and the quality of pseudo-labels is improved through hybrid pseudo-label distillation and prototype contrastive learning, thus achieving cross-domain feature alignment.

Benefits of technology

It improves the stability and detection performance of pseudo-labels, enhances the model's discriminative ability and adaptability in the target domain, and strengthens feature modeling capabilities and cross-domain detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121883992A_ABST
    Figure CN121883992A_ABST
Patent Text Reader

Abstract

The invention discloses a remote sensing image cross-domain target detection method based on prototype comparative learning guided by a frozen teacher, and the method comprises the steps: firstly generating a high-quality target domain category prototype through a pre-trained large model, dynamically updating a category feature center through a momentum mechanism, and then, carrying out the recognition of a target domain through the momentum mechanism; according to the method, a prototype comparison learning mode is adopted, student model candidate region features are aligned with category prototypes, so that feature discrimination and semantic consistency are improved, meanwhile, prediction of teachers is frozen to serve as hard tags to supervise mean teacher distillation, and uncertainty of pseudo tags is reduced. Compared with the prior art, the method can more effectively relieve domain offset and realize more robust cross-domain target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically to a method for cross-domain target detection in remote sensing images based on prototype comparison. Background Technology

[0002] Remote sensing image target detection is a crucial task in remote sensing image interpretation, aiming to identify and locate target objects within images. It has significant applications in traffic monitoring, natural disaster emergency response, building detection, and smart agriculture. However, significant inter-domain differences exist between different remote sensing images, primarily due to factors such as sensor type, imaging resolution, observation angle, lighting conditions, and background complexity. This leads to a significant performance degradation when models trained in the source domain are directly applied to the target domain. Furthermore, deep learning-based target detection methods typically rely on large amounts of labeled data for training, but obtaining high-quality annotations is costly and inefficient, limiting the widespread adoption of cross-domain applications.

[0003] To alleviate the aforementioned problems, unsupervised domain adaptation methods have been proposed to achieve feature alignment between different domains. These methods can generally be categorized into generative methods, adversarial methods, and self-training methods. Generative methods generate images of the target domain style through image style transfer for training; adversarial methods introduce a domain discriminator and learn domain-invariant features through adversarial training; self-training methods supervise learning of the target domain by generating pseudo-labels, gradually adjusting the model to adapt to the target domain distribution. Compared to the first two types of methods, self-training methods do not require additional image generation or adversarial networks, enabling direct end-to-end optimization of object detection tasks.

[0004] In self-training methods, the quality of pseudo-labels has a decisive impact on cross-domain adaptation performance. Existing methods typically guide student model training through a teacher model, using consistency constraints or confidence scores to select high-quality pseudo-labels. However, most methods rely solely on the teacher model's response-level knowledge, ignoring rich structured semantic information and limiting the model's ability to distinguish complex scenarios. Furthermore, teacher models are usually generated from student models using exponential moving averages, leading to high coupling and poor independence between teacher and student models, making it easy to propagate model bias and causing pseudo-label instability. Simultaneously, the form of pseudo-labels also affects performance: hard labels are susceptible to prediction errors and introduce noise, while soft labels, although providing class probability distribution information, rely on a single teacher model and lack structured feature guidance, making it difficult to effectively enhance inter-class separability and feature alignment in complex scenarios and under long-tailed class conditions. Summary of the Invention

[0005] To address the aforementioned problems, this invention proposes a cross-domain target detection method for remote sensing images based on prototype comparison. By constructing a stable class prototype and a frequency-aware prototype update mechanism, it achieves effective modeling and cross-domain alignment of target domain features, thereby improving pseudo-label quality and detection performance. The method includes: The frozen teacher model and student model are trained using source domain labeled samples to obtain the trained frozen teacher model and exponential moving average copy. Then, the student model and teacher model are initialized using the exponential moving average copy to obtain the pre-trained mean teacher model and pre-trained student model.

[0006] The source domain image and its label are input into the pre-trained student model. Through backbone network feature extraction, the source domain candidate region features extracted by the student model are obtained. The classification loss and regression loss are calculated to obtain the supervised loss. Then, the target domain image is input into the pre-trained student model. Through backbone network feature extraction, the target domain candidate region features extracted by the student model are obtained.

[0007] The target domain image is input into the trained frozen teacher model to obtain a set of candidate region features extracted by the frozen teacher model. The set of candidate region features includes candidate region feature vectors, predicted categories, and predicted category confidence. Candidate region feature vectors with predicted category confidence higher than a threshold are selected, aggregated by category to obtain category prototypes, and the category prototypes are iteratively updated using a frequency-aware momentum update mechanism. Then, the source domain candidate region features and target domain candidate region features extracted by the student model are compared with the category prototypes to obtain a contrastive learning loss.

[0008] The target domain image is input into a pre-trained mean teacher model to obtain soft pseudo-labels. Simultaneously, prediction results in the frozen teacher model with prediction class confidence scores higher than a preset threshold are determined as hard pseudo-labels. The hard pseudo-labels include the class label of the corresponding candidate region and the bounding box regression coordinates. Then, the soft pseudo-labels and the hard pseudo-labels are mixed pseudo-label distilled to further supervise the training of the student model and obtain the mixed pseudo-label loss.

[0009] The total loss function is calculated by weighting the supervised loss, contrastive learning loss, and hybrid pseudo-label loss. The student model is then optimized by backpropagation using the total loss function, while the mean teacher model parameters are updated using an exponential moving average strategy. After multiple iterations, a well-trained cross-domain target detector is obtained.

[0010] Furthermore, the process of selecting candidate region feature vectors with predicted category confidence scores higher than a threshold, aggregating them by category to obtain category prototypes, specifically involves: , in, As a category prototype, For category The number of effective candidate region feature vectors, The confidence threshold. The feature vector of the candidate region. For predicting categories, To predict confidence levels.

[0011] Furthermore, the iterative update of the category prototype using a frequency-aware momentum update mechanism specifically involves: First, calculate the category frequency percentage using the following formula: , in, Indicate category The sample size is C, where C is the total number of all categories. Then, the time adjustment factor based on the Sigmoid function is calculated using the following formula: , Where k is the rate of ascent. This indicates a turning point in the training phase. This is the current training round; Secondly, by combining the category frequency proportion with the time adjustment factor, the category is calculated. In training rounds momentum coefficient With confidence threshold The calculation formula is: , in, , The confidence level or momentum is the base value, and α is the adjustment factor. It is the minimum parameter value; Finally, the category prototype is iteratively updated using the following formula: , in, It is the prototype of category c in round t. It is the mean of the features of all high-confidence candidate regions belonging to class c in the current iteration round. This is the momentum coefficient.

[0012] Furthermore, the step of comparing the source domain candidate region features and target domain candidate region features extracted from the student model with the category prototype to obtain the contrastive learning loss is specifically as follows: First, positive samples are compared between the target domain candidate region features extracted by the student model and the target domain prototypes of the corresponding categories, and negative samples are constructed and compared with prototypes of different categories to obtain the intra-domain contrastive learning loss. Secondly, positive samples are constructed by comparing the source domain candidate region features extracted by the student model with the target domain category prototypes, and negative samples are constructed with the target domain different category prototypes to obtain cross-domain contrastive learning loss. Finally, by combining the intra-domain contrastive learning loss with the cross-domain contrastive learning loss, the contrastive learning loss is obtained as follows: , in, , For hyperparameters, For intra-domain contrastive learning loss, This is the cross-domain comparative learning loss.

[0013] Furthermore, the intra-domain contrastive learning loss is: , Where sim(⋅,⋅) represents the normalized cosine similarity, c is the class, and i is the index of the candidate region feature vector in the current sample set. Features of candidate target domains extracted for student models. For the target domain prototype of the corresponding category, For the target domain category prototype corresponding to category c, Indicates the first The category label of each sample, For category The corresponding temperature parameters are calculated using the following formula: , in, For category The current number of samples.

[0014] Furthermore, the cross-domain contrastive learning loss is: , Where sim(⋅,⋅) represents the normalized cosine similarity, c is the class, and i is the index of the candidate region feature vector in the current sample set. Features of the source domain candidate regions extracted for the student model. For the target domain prototype of the corresponding category, For the target domain category prototype corresponding to category c, Indicates the first The category label of each sample, For category The corresponding temperature parameters are calculated using the following formula: , in, For category The current number of samples.

[0015] Furthermore, the specific calculation of the hybrid pseudo-label loss is as follows: When the frozen teacher model and the mean teacher model predict the same result and the confidence level is greater than the threshold, the hybrid pseudo-label loss is calculated by weighting hard pseudo-labels and soft pseudo-labels: , When the predictions of the frozen teacher model and the mean teacher model are inconsistent or have low confidence, the hybrid pseudo-label loss is calculated using soft pseudo-labels: , in, For the loss of soft fake labels, This is a hard pseudo-label. To freeze the teacher model in the target domain samples The prediction confidence level; The input is a target domain image sample; The expression for a soft pseudo tag is: , in, and These are the classification probability distribution and bounding box regression offset generated by the mean teacher, respectively; , , , These represent the classification loss and regression loss in the region proposal network and the candidate region detection head, respectively; and The result is obtained by calculating the cross-entropy loss function. and It is calculated using the smoothed L1 loss function; The hard pseudo-label loss is calculated by freezing the teacher-generated category labels and bounding box positions, and the expression is: , in, and These represent the category labels and bounding box coordinates generated by the teacher, respectively.

[0016] Furthermore, the total loss function is specifically as follows: , in, Indicates monitoring losses, Indicates the contrast learning loss. Indicates the hybrid pseudo-label loss. and This is a hyperparameter responsible for controlling the weights of the prototype contrast loss and the hybrid pseudo-label loss when calculating the total loss.

[0017] Furthermore, the method of updating the mean teacher model parameters using the exponential moving average strategy specifically involves: The student model is updated using backpropagation with the total loss function, while the mean teacher model parameters are updated using an exponential moving average strategy. The exponential moving average strategy is as follows: , in, and They represent the first The parameters of the teacher and student models in the step. Indicates the first Step-by-step teacher model, Indicates the number of training steps. It is the momentum coefficient.

[0018] This invention provides a cross-domain target detection method for remote sensing images based on prototype contrast. Building upon a teacher-student model, it introduces a frozen teacher model pre-trained only in the source domain. This frozen teacher model extracts instance features from target domain samples and aggregates them based on category information to form class prototypes. Simultaneously, a frequency-aware prototype update module is designed to dynamically adjust the confidence threshold and exponential moving average strategy update weights, enabling low-frequency categories to achieve more stable and high-quality prototype updates. Guided by the prototypes, the student model achieves intra-class aggregation and inter-class separation through prototype contrast loss, and combines a hybrid pseudo-label loss strategy to supervise target domain samples, thereby improving the model's discriminative ability and adaptive performance in the target domain. This method, combining prototype contrast learning and frequency-aware prototype update mechanisms, can extract more stable and semantically expressive features from the target domain, and achieves compact intra-class and separated inter-class cross-domain alignment under the guidance of class centers, effectively improving feature modeling capabilities and cross-domain detection accuracy. Furthermore, the proposed hybrid pseudo-label loss strategy adaptively fuses soft and hard pseudo-labels, balancing robustness and discriminativity, and significantly improving the stability and reliability of pseudo-labels. Through the above design, the present invention can achieve end-to-end optimization within a teacher-student framework, improving the model's generalization ability, stability, and training efficiency, and providing an efficient and reliable solution for cross-domain target detection in remote sensing images. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the basic process of the method in an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the network structure used in an embodiment of the present invention. Detailed Implementation

[0021] 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 embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0022] As one implementation scheme, Figure 1 This is a schematic diagram illustrating the basic process of a cross-domain target detection method for remote sensing images based on prototype comparison, as described in an embodiment of this application. Figure 2 This is a schematic diagram of the network structure of a cross-domain target detection method for remote sensing images based on prototype comparison, according to an embodiment of this application. The steps of this method include: The first step is to train and initialize the student and teacher models in the source domain.

[0023] In this step, the frozen teacher model and student model are trained using source domain labeled samples to obtain the trained frozen teacher model and exponential moving average copy. Then, the student model and teacher model are initialized using the exponential moving average copy to obtain the pre-trained mean teacher model and pre-trained student model.

[0024] The second step is to perform supervised computation learning in the source domain to calculate the classification and regression loss, thus obtaining the supervised loss.

[0025] In this step, the source domain image and its label are input into the pre-trained student model. Through backbone network feature extraction, the source domain candidate region features extracted by the student model are obtained. The classification loss and regression loss are calculated to obtain the supervision loss. Then, the target domain image is input into the pre-trained student model. Through backbone network feature extraction, the target domain candidate region features extracted by the student model are obtained. The third step involves using a frozen teacher model to extract candidate region features from the target domain, selecting high-confidence features to construct category prototypes, using a frequency-aware mechanism to iteratively update the prototypes, and using the prototypes to guide contrastive learning to achieve feature alignment, thus obtaining the contrastive learning loss.

[0026] First, the target domain image is input into the trained frozen teacher model to obtain a set of candidate region features extracted by the frozen teacher model. The set of candidate region features includes candidate region feature vectors, prediction categories, and prediction confidence.

[0027] The target domain feature extraction method for the frozen teacher model is as follows: , in, Represents the target domain image. This represents the feature extraction function for freezing teachers. This represents the extracted target domain candidate region features.

[0028] Secondly, candidate region feature vectors with predicted category confidence scores higher than a threshold are selected, aggregated by category to obtain category prototypes, and the category prototypes are iteratively updated using a frequency-aware momentum update mechanism.

[0029] The candidate region feature set is , The feature vector of the candidate region. For predicting categories, To predict confidence levels, samples that meet the criteria are selected. The characteristics are identified, and after aggregation by category, a category prototype is obtained. The formula expression for the category prototype is: , in, As a category prototype, For category The number of effective candidate region feature vectors, This is the confidence threshold.

[0030] The frequency-aware momentum update mechanism is used to iteratively update the category prototype, specifically as follows: (1) Calculate the category frequency percentage using the following formula: , in, Indicate category The sample size is C, where C is the total number of all categories.

[0031] (2) Calculate the time adjustment factor based on the Sigmoid function. The calculation formula is as follows: , Where k is the rate of ascent. This indicates a turning point in the training phase. This is the current training round.

[0032] (3) Calculate the category by combining the category frequency ratio and the time adjustment factor. In training rounds momentum coefficient With confidence threshold The calculation formula is: , in, , The confidence level or momentum is the base value, and α is the adjustment factor. It is the minimum parameter value.

[0033] (4) Iteratively update the category prototype using the following formula: , in, It is the prototype of category c in round t. It is the mean of the features of all high-confidence candidate regions belonging to class c in the current iteration round. This is the momentum coefficient.

[0034] Finally, the source domain candidate region features and target domain candidate region features extracted from the student model are compared with the category prototype to obtain the contrastive learning loss.

[0035] The contrastive learning includes intra-domain contrastive optimization and cross-domain contrastive optimization, specifically: The intra-domain contrast optimization optimizes the candidate region features extracted by the student model within the target domain. Target domain prototype of the corresponding category Positive samples are compared, and negative samples are constructed for comparison with prototypes of different categories. Using the standard infoNCE loss function, the intra-domain contrastive learning loss is obtained as follows: , Where sim(⋅,⋅) represents the normalized cosine similarity, c is the class, and i is the index of the candidate region feature vector in the current sample set. Features of candidate target domains extracted for student models. For the target domain prototype of the corresponding category, For the target domain category prototype corresponding to category c, Indicates the first The category label of each sample, For category The corresponding temperature parameter is used to adjust the sensitivity of the contrast loss. The temperature coefficient adopts a dynamic adjustment strategy, and the calculation formula is as follows: , in, For category The current number of samples is used to prevent high-frequency categories from dominating the learning process.

[0036] The cross-domain comparison optimization utilizes the source domain candidate region features extracted by the student model. With the target domain category prototype Construct positive samples for comparison, and construct negative samples for comparison with prototypes of different categories in the target domain to achieve cross-domain feature alignment, thereby obtaining the cross-domain comparison learning loss, which is: , in, Features of the source domain candidate regions extracted for the student model.

[0037] Combining the intra-domain contrastive learning loss with the cross-domain contrastive learning loss yields the following contrastive learning loss: , Among them, hyperparameters This is used to balance the effects of the two alignment methods. For intra-domain contrastive learning loss, This is the cross-domain comparative learning loss.

[0038] The fourth step is to fuse soft and hard pseudo-labels for rectified training and calculate the hybrid pseudo-label loss.

[0039] In this step, the target domain image is input into the pre-trained mean teacher model to obtain soft pseudo-labels; simultaneously, the prediction results in the frozen teacher model from the third step above, where the predicted class confidence is higher than a preset threshold, are determined as hard pseudo-labels. The hard pseudo-labels include the class label of the corresponding candidate region and the bounding box regression coordinates; then, the soft pseudo-labels and the hard pseudo-labels are mixed pseudo-label distilled to further supervise the training of the student model, resulting in a mixed pseudo-label loss. The specific calculation of the mixed pseudo-label loss is as follows: When the frozen teacher model and the mean teacher model predict the same result and the confidence level is greater than the threshold, the hybrid pseudo-label loss is calculated by weighting hard pseudo-labels and soft pseudo-labels: , When the predictions of the frozen teacher model and the mean teacher model are inconsistent or have low confidence, the hybrid pseudo-label loss is calculated using soft pseudo-labels: , in, For the loss of soft fake labels, This is a hard pseudo-label. To freeze the teacher model in the target domain samples The prediction confidence level; The input is a target domain image sample; The expression for a soft pseudo tag is: , in, and These are the classification probability distribution and bounding box regression offset generated by the mean teacher, respectively; , , , These represent the classification loss and regression loss in the region proposal network and the candidate region detection head, respectively; and The result is obtained by calculating the cross-entropy loss function. and It is calculated using the smoothed L1 loss function; The hard pseudo-label loss is calculated by freezing the teacher-generated category labels and bounding box positions, and the expression is: , in, and These represent the category labels and bounding box coordinates generated by the teacher, respectively.

[0040] The fifth step is to integrate the total loss and optimize the student model detector.

[0041] In this step, the total loss function is calculated by weighting the supervised loss, contrastive learning loss, and hybrid pseudo-label loss. Then, the student model is optimized by backpropagation through the total loss function, while the mean teacher model parameters are updated using an exponential moving average strategy. After multiple iterations, a trained cross-domain remote sensing image target detector is obtained.

[0042] The formula for calculating the total loss function is as follows: , in, Indicates monitoring losses, Indicates the contrast learning loss. Indicates the hybrid pseudo-label loss. and This is a hyperparameter responsible for controlling the weights of the prototype contrast loss and the hybrid pseudo-label loss when calculating the total loss.

[0043] The student model is updated using backpropagation with the total loss function, while the mean teacher model parameters are updated using an exponential moving average strategy. The exponential moving average strategy is as follows: , in, and They represent the first The parameters of the teacher and student models in the step. Indicates the first Step-by-step teacher model, Indicates the number of training steps. It is a momentum coefficient close to 1, used to control the smooth update of parameters.

[0044] In this embodiment, a comparative experiment is conducted between the method of the present invention and existing methods to verify the robustness of the method of the present invention by comparing the running results of the models. The experiment uses four publicly available datasets—NWPU VHR-10, DIOR, VisDrone, and DroneVehicle—to evaluate the performance of our proposed method and compare it with state-of-the-art methods. The experimental results are shown in Tables 1 and 2. Table 1 shows the experimental results in the high-altitude remote sensing image dataset, using NWPU VHR-10 as the source domain data and DIOR as the target domain data; Table 2 shows the experimental results in the low-altitude remote sensing image dataset, using VisDrone as the source domain data and DroneVehicle as the target domain data. Table 1 is as follows:

[0045] Table 2 is as follows:

[0046] Wherein, "Source Only" represents the results of the model trained using only source domain data on the test set. As shown in Table 1, the method of this invention achieved a maximum mAP of 55.8%, which is 4.6% higher than the state-of-the-art method. As shown in Table 2, the method of this invention achieved an mAP of 44.1%, which is 4.3% higher than the state-of-the-art method. The above experimental results demonstrate that the method proposed in this invention can exhibit superior performance in various domain adaptation scenarios.

[0047] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. 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, produce implementations of the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1The 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 functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus 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.

[0048] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A remote sensing image cross-domain object detection method based on prototype contrast, characterized in that, The method includes: The frozen teacher model and student model are trained using source domain labeled samples to obtain the trained frozen teacher model and exponential moving average copy. Then, the student model and teacher model are initialized using the exponential moving average copy to obtain the pre-trained mean teacher model and pre-trained student model. The source domain image and its label are input into the pre-trained student model. Through backbone network feature extraction, the source domain candidate region features extracted by the student model are obtained. The classification loss and regression loss are calculated to obtain the supervision loss. Then, the target domain image is input into the pre-trained student model. Through backbone network feature extraction, the target domain candidate region features extracted by the student model are obtained. The target domain image is input into the trained frozen teacher model to obtain a set of candidate region features extracted by the frozen teacher model. The set of candidate region features includes candidate region feature vectors, predicted categories, and predicted category confidence. Candidate region feature vectors with predicted category confidence higher than a threshold are selected, aggregated by category to obtain category prototypes, and the category prototypes are iteratively updated using a frequency-aware momentum update mechanism. Then, the source domain candidate region features and target domain candidate region features extracted by the student model are compared with the category prototypes to obtain a contrastive learning loss. The target domain image is input into a pre-trained mean teacher model to obtain soft pseudo-labels; at the same time, the prediction results in the frozen teacher model whose predicted class confidence is higher than a preset threshold are determined as hard pseudo-labels, and the hard pseudo-labels include the class label of the corresponding candidate region and the bounding box regression coordinates; then the soft pseudo-labels and the hard pseudo-labels are mixed pseudo-label distilled to further supervise the training of the student model and obtain the mixed pseudo-label loss. The total loss function is calculated by weighting the supervised loss, contrastive learning loss, and hybrid pseudo-label loss. The student model is then optimized by backpropagation using the total loss function, while the mean teacher model parameters are updated using an exponential moving average strategy. After multiple iterations, a well-trained cross-domain target detector is obtained.

2. The method according to claim 1, characterized in that, The process involves selecting candidate region feature vectors with predicted category confidence scores higher than a threshold, aggregating them by category to obtain category prototypes, specifically as follows: , in, As a category prototype, For category The number of effective candidate region feature vectors, The confidence threshold. The feature vector of the candidate region. For predicting categories, To predict confidence levels.

3. The method according to claim 1, characterized in that, The frequency-aware momentum update mechanism is used to iteratively update the category prototype, specifically as follows: First, calculate the category frequency percentage using the following formula: , in, Indicate category The sample size is C, where C is the total number of all categories. Then, the time adjustment factor based on the Sigmoid function is calculated using the following formula: , Where k is the rate of ascent. This indicates a turning point in the training phase. This is the current training round; Secondly, by combining the category frequency proportion with the time adjustment factor, the category is calculated. In training rounds momentum coefficient With confidence threshold The calculation formula is: , in, , The confidence level or momentum is the base value, and α is the adjustment factor. It is the minimum parameter value; Finally, the category prototype is iteratively updated using the following formula: , in, It is the prototype of category c in round t. It is the mean of the features of all high-confidence candidate regions belonging to class c in the current iteration round. This is the momentum coefficient.

4. The method according to claim 1, characterized in that, The step of comparing and learning the source domain candidate region features and target domain candidate region features extracted by the student model with the category prototype to obtain the contrastive learning loss is as follows: First, positive samples are compared between the target domain candidate region features extracted by the student model and the target domain prototypes of the corresponding categories, and negative samples are constructed and compared with prototypes of different categories to obtain the intra-domain contrastive learning loss. Secondly, positive samples are constructed by comparing the source domain candidate region features extracted by the student model with the target domain category prototypes, and negative samples are constructed with the target domain different category prototypes to obtain cross-domain contrastive learning loss. Finally, by combining the intra-domain contrastive learning loss with the cross-domain contrastive learning loss, the contrastive learning loss is obtained as follows: , in, , For hyperparameters, For intra-domain contrastive learning loss, This is the cross-domain comparative learning loss.

5. The method according to claim 4, characterized in that, The intra-domain contrastive learning loss is: , Where sim(⋅,⋅) represents the normalized cosine similarity, c is the class, and i is the index of the candidate region feature vector in the current sample set. Features of candidate target domains extracted for student models. For the target domain prototype of the corresponding category, For the target domain category prototype corresponding to category c, Indicates the first The category label of each sample, For category The corresponding temperature parameters are calculated using the following formula: , in, For category The current number of samples.

6. The method according to claim 4, characterized in that, The cross-domain contrastive learning loss is: , Where sim(⋅,⋅) represents the normalized cosine similarity, c is the class, and i is the index of the candidate region feature vector in the current sample set. Features of the source domain candidate regions extracted for the student model. For the target domain prototype of the corresponding category, For the target domain category prototype corresponding to category c, Indicates the first The category label of each sample, For category The corresponding temperature parameters are calculated using the following formula: , in, For category The current number of samples.

7. The method according to claim 1, characterized in that, The specific calculation of the hybrid pseudo-label loss is as follows: When the frozen teacher model and the mean teacher model predict the same result and the confidence level is greater than the threshold, the hybrid pseudo-label loss is calculated by weighting hard pseudo-labels and soft pseudo-labels: , When the predictions of the frozen teacher model and the mean teacher model are inconsistent or have low confidence, the hybrid pseudo-label loss is calculated using soft pseudo-labels: , in, For the loss of soft fake labels, This is a hard pseudo-label. To freeze the teacher model in the target domain samples The prediction confidence level; The input is a target domain image sample; The expression for a soft pseudo tag is: , in, and These are the classification probability distribution and bounding box regression offset generated by the mean teacher, respectively; , , , These represent the classification loss and regression loss in the region proposal network and the candidate region detection head, respectively; and The result is obtained by calculating the cross-entropy loss function. and Calculated using the smoothed L1 loss function; The hard pseudo-label loss is calculated by freezing the teacher-generated category labels and bounding box positions, and the expression is: , in, and These represent the category labels and bounding box coordinates generated by the teacher, respectively.

8. The method according to claim 1, characterized in that, The total loss function is specifically as follows: , in, Indicates monitoring losses, Indicates the contrast learning loss. Indicates the hybrid pseudo-label loss. and This is a hyperparameter responsible for controlling the weights of the prototype contrast loss and the hybrid pseudo-label loss when calculating the total loss.

9. The method according to claim 1, characterized in that, The method of updating the mean teacher model parameters using the exponential moving average strategy is as follows: The student model is updated using backpropagation with the total loss function, while the mean teacher model parameters are updated using an exponential moving average strategy. The exponential moving average strategy is as follows: , in, and They represent the first The parameters of the teacher and student models in the step. Indicates the first Step-by-step teacher model, Indicates the number of training steps. It is the momentum coefficient.