Domain adaptive object detection method based on cross-head collaborative distillation network
By using a cross-head collaborative distillation network and an adaptive EMA decay module, the collaborative relationship between the teacher model and the student model is enhanced, which solves the problem of insufficient knowledge distillation effect in existing methods and improves the performance of domain adaptive object detection.
Patent Information
- Application Number
- CN202511462914.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing domain-adaptive object detection methods neglect the deep collaborative relationship between the teacher model and the student model detection heads, resulting in insufficient knowledge distillation effect. Furthermore, the fixed decay factor of the traditional EMA strategy affects the quality of pseudo-label generation.
A cross-head collaborative distillation network is adopted to enhance the interaction between the student model and the teacher model through the cross-head collaborative module, and to dynamically adjust the update speed of the teacher model by using the adaptive EMA decay module, thereby optimizing the loss calculation process of the student model.
It significantly improves the performance of domain-adaptive object detection, reduces the distribution difference between the source and target domains, and improves the generation quality and detection performance of pseudo-labels.
Smart Images

Figure CN120932027A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer vision, pattern recognition, digital image processing, artificial intelligence, and domain adaptive object detection, and specifically relates to a domain adaptive object detection method based on a cross-head cooperative distillation network. Background Technology
[0002] In recent years, deep learning-based domain-adaptive object detection methods have made significant progress. Tarvainen et al. generated pseudo-labels using a teacher model and introduced consistency constraints to adjust the unsupervised learning process. Deng et al. used source domain similar images to assist in pseudo-label generation and combined feature matching strategies to process target domain data. Kennerley et al. used an inter-class relationship modeling framework, leveraging relationship networks to support the training process for minority class detection, thereby enhancing the model's adaptability to small samples. Do et al. used a dual-domain teacher model architecture to learn source and target domain data, effectively improving domain-adaptive detection performance. However, most methods neglect the deep collaborative relationship between the teacher and student model detection heads and employ the traditional EMA strategy to update teacher model parameters.
[0003] The aforementioned methods improve the performance of domain-adaptive object detection to some extent, but still have significant limitations. Existing domain-adaptive object detection methods neglect the deep collaborative relationship between the teacher and student model detection heads, leading to insufficient knowledge distillation when there are large differences between the domains. Meanwhile, traditional EMA strategies typically use a fixed decay factor to update the teacher model's parameters, causing the teacher model to be misled by fluctuations in the student model's performance, thus affecting the quality of pseudo-label generation. Therefore, a domain-adaptive object detection method is needed that can effectively reduce the distributional differences between the source and target domains while dynamically adjusting the teacher model's update speed based on the student model's current learning performance. Summary of the Invention
[0004] The purpose of this invention is to enhance the interaction between the student model detection head and the teacher model detection head, and to dynamically adjust the teacher model update speed based on the current performance of the student model, thereby improving the domain-adaptive object detection performance. To this end, this invention provides a domain-adaptive object detection method based on a cross-head collaborative distillation network.
[0005] To achieve the aforementioned objective, the present invention proposes a domain-adaptive object detection method based on a cross-head cooperative distillation network, comprising the following steps:
[0006] Step S1: Construct a student model using a pre-trained deep learning network, input the training source domain labeled image into the student model, and backpropagate to optimize the student model to obtain a student model trained based on the source domain labeled image.
[0007] Step S2: Construct a source domain teacher model and a target domain teacher model. Initialize the source domain teacher model and the target domain teacher model using the student model trained based on the source domain labeled image to obtain the initialized source domain teacher model and the target domain teacher model. Input the input image into the initialized source domain teacher model and the target domain teacher model to obtain source domain pseudo-label features and target domain pseudo-label features based on the input image. The input image is an unlabeled training source domain image or a training target domain image.
[0008] Step S3: Construct a cross-head collaboration module. In the cross-head collaboration module, the input image is input into the backbone network of the student model trained based on the source domain labeled image to obtain intermediate features based on the input image. The intermediate features based on the input image are input into the detection head of the student model trained based on the source domain labeled image to obtain prediction features based on the input image. The intermediate features based on the input image are input into the detection heads of the initialized source domain teacher model and target domain teacher model respectively to obtain cross-prediction features based on the source domain teacher model and cross-prediction features based on the target domain teacher model.
[0009] Step S4: Construct a loss calculation module. In the loss calculation module, the final loss value is calculated using the prediction features based on the input image, the source domain pseudo-label features based on the input image, the target domain pseudo-label features based on the input image, the cross-prediction features based on the source domain teacher model, and the cross-prediction features based on the target domain teacher model. Based on the final loss value, backpropagation optimization is performed on the student model trained based on the source domain labeled image. After multiple optimization iterations, the optimal domain adaptive object detection model is obtained.
[0010] Step S5: In the testing phase, the optimal domain adaptive object detection model is used to detect the test target domain image to obtain the domain adaptive object detection result.
[0011] Optionally, step S1 includes the following steps:
[0012] Step S11: Determine the pre-trained deep learning network, initialize its parameters, and use it as the backbone network to obtain the student model;
[0013] Step S12: Perform enhancement preprocessing on the training source domain labeled image to obtain the enhanced training source domain labeled image;
[0014] Step S13: Based on the enhanced training source domain labeled image, the student model is subjected to supervised training and backpropagation optimization to obtain a student model trained based on the source domain labeled image.
[0015] Optionally, step S2 includes the following steps:
[0016] Step S21: Construct a source domain teacher model and a target domain teacher model. Use the parameters of the student model trained based on the source domain labeled images as initial parameters to initialize the source domain teacher model and the target domain teacher model, and obtain the initialized source domain teacher model and target domain teacher model.
[0017] Step S22: Perform weak enhancement on the input image;
[0018] Step S23: Use the initialized source domain teacher model and target domain teacher model to extract features from the weakly enhanced input image to obtain source domain pseudo-label features and target domain pseudo-label features based on the input image.
[0019] Optionally, step S3 includes the following steps:
[0020] Step S31: Perform strong enhancement on the input image to obtain a strongly enhanced input image;
[0021] Step S32: Use the backbone network of the student model trained based on the source domain labeled image to extract features from the strongly enhanced input image to obtain intermediate features based on the input image;
[0022] Step S33: Input the intermediate features based on the input image into the detection head of the student model trained based on the source domain labeled image to obtain the predicted features based on the input image;
[0023] Step S34: Input the intermediate features based on the input image into the detection heads of the initialized source domain teacher model and target domain teacher model respectively to obtain cross-prediction features based on the source domain teacher model and cross-prediction features based on the target domain teacher model.
[0024] Optionally, step S4 includes the following steps:
[0025] Step S41, construct the loss calculation module;
[0026] Step S42: In the loss calculation module, the cross-head collaborative knowledge distillation loss function is used to calculate the final loss value based on the prediction features of the input image, the source domain pseudo-label features of the input image, the target domain pseudo-label features of the input image, the cross-prediction features based on the source domain teacher model, and the cross-prediction features based on the target domain teacher model.
[0027] Step S43: Use the final loss value to perform backpropagation optimization on the student model trained based on the source domain labeled image. After multiple optimization iterations, the optimal domain adaptive object detection model is obtained.
[0028] Optionally, in step S4, each optimization iteration includes the calculation of pseudo-label features, intermediate features, predicted features, and cross-prediction features; the calculation of the final loss value; backpropagation optimization of the student model; and updating the parameters of the teacher model.
[0029] Optionally, updating the teacher model parameters specifically includes the following steps:
[0030] Step S431: Test and evaluate the student model trained based on source domain labeled images to obtain the real-time performance gap value perf_gap of the student model trained based on source domain labeled images;
[0031] Step S432: Construct an adaptive EMA attenuation module. In the adaptive EMA attenuation module, the adaptive EMA attenuation factor is calculated based on the real-time performance gap value of the student model trained on the source domain labeled image. Using the adaptive EMA attenuation factor The parameters of the initialized source domain teacher model or target domain teacher model are updated.
[0032] Optionally, in step S432, the adaptive EMA decay factor is calculated based on the real-time performance gap value of the student model trained on the source domain labeled image using the following formula. :
[0033] =
[0034] in, and Used for control The amplitude and smoothness of the function.
[0035] Optionally, in step S432, the adaptive EMA attenuation factor is utilized. The parameters of the initialized source domain teacher model or target domain teacher model are updated as follows:
[0036] Using the adaptive EMA attenuation factor The parameters of the student model trained based on the source domain labeled images are then updated for the parameters of the initialized source domain teacher model or target domain teacher model:
[0037]
[0038] in, These represent the parameters of the initialized source domain teacher model or target domain teacher model. The parameters represent the student model trained based on source domain labeled images.
[0039] Optionally, step S5 includes the following steps:
[0040] Step S51: In the testing phase, the test target domain image is input into the backbone network of the optimal domain adaptive object detection model for feature extraction to obtain features based on the test target domain image.
[0041] Step S52: Input the features based on the test target domain image into the detection head of the optimal domain adaptive object detection model to obtain the domain adaptive object detection result.
[0042] This invention utilizes source domain teacher models and target domain teacher models to obtain pseudo-label features based on the input image. A cross-head collaboration module is then used to obtain prediction features based on the input image, cross-prediction features based on the source domain teacher model, and cross-prediction features based on the target domain teacher model. The loss value from these three features is used to obtain the final loss value and optimize the student model, resulting in an optimal domain-adaptive object detection model. This invention effectively reduces the distribution difference between the source and target domains through the cross-head collaboration module and the adaptive EMA attenuation module, significantly improving the domain-adaptive object detection performance. Attached Figure Description
[0043] Figure 1 This is a flowchart of a domain adaptive object detection method based on a cross-head cooperative distillation network according to an embodiment of the present invention.
[0044] Figures 2A-2C This is a visualization result of domain-adaptive object detection on the FLIR dataset obtained according to an embodiment of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0046] Figure 1 This is a flowchart of a domain adaptive object detection method based on a cross-head cooperative distillation network according to an embodiment of the present invention. The following uses... Figure 1 To illustrate some specific implementation processes of the present invention, we will use examples, such as... Figure 1 As shown, the domain-adaptive object detection method based on cross-head cooperative distillation network includes the following steps:
[0047] Step S1: Construct a student model using a pre-trained deep learning network, input the training source domain labeled image into the student model, and backpropagate to optimize the student model to obtain a student model trained based on the source domain labeled image.
[0048] Further, step S1 includes the following steps:
[0049] Step S11: Determine the pre-trained deep learning network, initialize its parameters, and use it as the backbone network to obtain the student model;
[0050] In addition to the backbone network, the student model also includes a detection head for detection based on features obtained from the backbone network.
[0051] In one embodiment of the present invention, the pre-trained deep learning network may be ResNet-50.
[0052] Step S12: Perform enhancement preprocessing on the training source domain labeled image to obtain the enhanced training source domain labeled image;
[0053] The training source domain labeled image refers to a labeled source domain image used for training.
[0054] The enhancement preprocessing refers to performing strong and weak enhancement processing on the labeled training source domain image.
[0055] In one embodiment of the present invention, strong enhancement refers to performing operations such as color perturbation, blurring, and cropping on the training source domain labeled image; weak enhancement refers to performing operations such as size adjustment and random horizontal flipping on the training source domain labeled image.
[0056] Step S13: Based on the enhanced training source domain labeled image, the student model is subjected to supervised training and backpropagation optimization to obtain a student model trained based on the source domain labeled image.
[0057] The training loss used in the supervised training can be calculated using the following formula:
[0058] =
[0059] in, This indicates that there is supervised training. Indicates based on source domain image, This refers to the prediction results of the student model on the trained source domain labeled image after inputting the trained source domain labeled image into the student model. Representing the student model, To train the true labels of the source domain labeled images.
[0060] In one embodiment of the present invention, The supervised loss function consists of three parts: classification loss, regression loss, and quality loss. The classification loss uses Quality Focal Loss, the regression loss uses GIoU Loss, and the quality loss uses binary cross-entropy.
[0061] Step S2: Construct a source domain teacher model and a target domain teacher model. Initialize the source domain teacher model and the target domain teacher model using the student model trained based on the source domain labeled image to obtain the initialized source domain teacher model and the target domain teacher model. Input the input image into the initialized source domain teacher model and the target domain teacher model to obtain source domain pseudo-label features and target domain pseudo-label features based on the input image. The input image is an unlabeled training source domain image or a training target domain image.
[0062] Further, step S2 includes the following steps:
[0063] Step S21: Construct a source domain teacher model and a target domain teacher model. Use the parameters of the student model trained based on the source domain labeled images as initial parameters to initialize the source domain teacher model and the target domain teacher model, and obtain the initialized source domain teacher model and target domain teacher model.
[0064] In one embodiment of the present invention, the intermediate training parameters of the student model trained based on the source domain labeled image are taken instead of the final training parameters and used as the initial parameters of the source domain teacher model and the target domain teacher model.
[0065] Step S22: Perform weak enhancement on the input image;
[0066] In one embodiment of the present invention, the weak enhancement refers to operations such as resizing or randomly horizontally flipping the input image.
[0067] Step S23: Use the initialized source domain teacher model and target domain teacher model to extract features from the weakly enhanced input image to obtain source domain pseudo-label features and target domain pseudo-label features based on the input image.
[0068] For example, if the input image is a training target domain image, then the extracted source domain pseudo-label features based on the training target domain image can be represented as follows: The extracted target domain pseudo-label features based on the training target domain image can be represented as: ,in, This indicates that the input image is the target domain image. and These represent the source domain teacher model and the target domain teacher model, respectively.
[0069] Step S3: Construct a cross-head collaboration module. In the cross-head collaboration module, the input image is input into the backbone network of the student model trained based on the source domain labeled image to obtain intermediate features based on the input image. The intermediate features based on the input image are input into the detection head of the student model trained based on the source domain labeled image to obtain prediction features based on the input image. The intermediate features based on the input image are input into the detection heads of the initialized source domain teacher model and target domain teacher model respectively to obtain cross-prediction features based on the source domain teacher model and cross-prediction features based on the target domain teacher model.
[0070] The input image used by the cross-head coordination module is the same as the input image used in step S2.
[0071] Further, step S3 includes the following steps:
[0072] Step S31: Perform strong enhancement on the input image to obtain a strongly enhanced input image;
[0073] In one embodiment of the present invention, the strong enhancement refers to performing operations such as color perturbation, blurring, and cropping on the input image.
[0074] Step S32: Use the backbone network of the student model trained based on the source domain labeled image to extract features from the strongly enhanced input image to obtain intermediate features based on the input image;
[0075] For example, if the input image is a training target domain image, the extracted intermediate features based on the training target domain image can be represented as follows: ;
[0076] Step S33: Input the intermediate features based on the input image into the detection head of the student model trained based on the source domain labeled image to obtain the predicted features based on the input image;
[0077] Taking the input image as the training target domain image as an example, the extracted prediction features based on the training target domain image can be represented as follows: ;
[0078] Step S34: Input the intermediate features based on the input image into the detection heads of the initialized source domain teacher model and target domain teacher model respectively to obtain cross-prediction features based on the source domain teacher model and cross-prediction features based on the target domain teacher model.
[0079] Taking the input image as the training target domain image as an example, the obtained cross-prediction features based on the source domain teacher model can be represented as follows: The cross-prediction features based on the target domain teacher model can be expressed as: .
[0080] Step S4: Construct a loss calculation module. In the loss calculation module, the final loss value is calculated using the prediction features based on the input image, the source domain pseudo-label features based on the input image, the target domain pseudo-label features based on the input image, the cross-prediction features based on the source domain teacher model, and the cross-prediction features based on the target domain teacher model. Based on the final loss value, backpropagation optimization is performed on the student model trained based on the source domain labeled image. After multiple optimization iterations, the optimal domain adaptive object detection model is obtained.
[0081] Further, step S4 includes the following steps:
[0082] Step S41, construct the loss calculation module;
[0083] Step S42: In the loss calculation module, the cross-head collaborative knowledge distillation loss function is used to calculate the final loss value based on the prediction features of the input image, the source domain pseudo-label features of the input image, the target domain pseudo-label features of the input image, the cross-prediction features based on the source domain teacher model, and the cross-prediction features based on the target domain teacher model.
[0084] For example, if the input image is a training target domain image, the cross-head collaborative knowledge distillation loss function is used to predict the features based on the input image. Source domain pseudo-label features based on input image Target domain pseudo-label features based on input image Cross-prediction features based on source domain teacher model Cross-prediction features based on target domain teacher model The calculated final loss value can be expressed as:
[0085] =
[0086] in, The loss function for cross-head collaborative knowledge distillation. The loss value for the source domain teacher model. The loss value for the teacher model in the target domain;
[0087] The source domain teacher model loss value can be expressed as:
[0088] ;
[0089] in, The cross-head collaboration loss value of the source domain teacher model. The source domain teacher model distillation loss value. and These represent the weights of the cross-head collaborative loss value and the distillation loss value of the source domain teacher model, respectively. In one embodiment of the present invention, Can be set to , Can be set to .
[0090] The target domain teacher model loss value can be expressed as:
[0091] ;
[0092] in, The cross-head collaboration loss value of the teacher model in the target domain. The target domain teacher model distillation loss value, and These represent the weights of the cross-head collaborative loss value and the distillation loss value of the target domain teacher model, respectively.
[0093] For example, if the input image is a training source domain image, the loss function is distilled using cross-head collaborative knowledge, and the predicted features are based on the input image. Source domain pseudo-label features based on input image Target domain pseudo-label features based on input image Cross-prediction features based on source domain teacher model Cross-prediction features based on target domain teacher model The calculated final loss value can be expressed as:
[0094] =
[0095] in, The loss function for cross-head collaborative knowledge distillation. The loss value for the source domain teacher model. This represents the target domain teacher model loss value. Furthermore, the calculation methods for the source domain teacher model loss value and the target domain teacher model loss value when the input image is a training source domain image are similar to those when the input image is a training target domain image, and will not be repeated here.
[0096] Step S43: Use the final loss value to perform backpropagation optimization on the student model trained based on the source domain labeled image. After multiple iterations of optimization, the optimal domain adaptive object detection model is obtained.
[0097] Each optimization iteration includes calculating pseudo-label features, intermediate features, predicted features, and cross-prediction features; calculating the final loss value; optimizing the student model through backpropagation; and updating the parameters of the teacher model. The optimal domain adaptive object detection model is obtained when the optimization iteration termination condition is met.
[0098] The specific steps for updating the teacher model parameters are as follows:
[0099] Step S431: Test and evaluate the student model trained based on source domain labeled images to obtain the real-time performance gap value of the student model trained based on source domain labeled images. ;
[0100] Among them, the real-time performance gap value of the student model trained based on source domain labeled images. It can be calculated using the following formula:
[0101]
[0102] in, This represents the historical best performance index value calculated based on mean accuracy (mAP). This represents the performance metric value of the current student model calculated based on mean accuracy (mAP).
[0103] Step S432: Construct an adaptive EMA attenuation module. In the adaptive EMA attenuation module, the adaptive EMA attenuation factor is calculated based on the real-time performance gap value of the student model trained on the source domain labeled image. Using the adaptive EMA attenuation factor The parameters of the initialized source domain teacher model or target domain teacher model are updated;
[0104] Further, step S432 includes the following steps:
[0105] Step S4321: Construct the adaptive EMA attenuation module;
[0106] Step S4322, in the adaptive EMA decay module, the following formula is used to calculate the real-time performance gap value of the student model trained based on the source domain labeled image. The adaptive EMA attenuation factor was calculated. :
[0107] =
[0108] in, and Used for control The amplitude and smoothness of the function;
[0109] In one embodiment of the present invention, , .
[0110] Step S4323, utilizing the adaptive EMA attenuation factor The parameters of the initialized source domain teacher model or target domain teacher model are updated using the parameters of the student model trained based on the source domain labeled images.
[0111]
[0112] in, These represent the parameters of the initialized source domain teacher model or target domain teacher model. The parameters represent the student model trained based on source domain labeled images. This is the adaptive EMA decay factor.
[0113] In one embodiment of the present invention, Initialized to 0.9996.
[0114] Among them, the adaptive EMA attenuation factor is utilized When updating the parameters of the initialized source domain teacher model or target domain teacher model, only the parameters of the teacher model in the same domain as the input image are updated. For example, when the input image is a training source domain image, only the parameters of the initialized source domain teacher model are updated, and when the input image is a training target domain image, only the parameters of the initialized target domain teacher model are updated.
[0115] Step S5: In the testing phase, the optimal domain adaptive object detection model is used to detect the test target domain image to obtain the domain adaptive object detection result.
[0116] Further, step S5 includes the following steps:
[0117] In step S51, during the testing phase, the test target domain image is input into the backbone network of the optimal domain adaptive object detection model for feature extraction, thereby obtaining features based on the test target domain image.
[0118] Step S52: Input the features based on the test target domain image into the detection head of the optimal domain adaptive object detection model to obtain the domain adaptive object detection result.
[0119] Experimental results show that the domain-adaptive object detection method based on cross-head collaborative distillation network of this invention achieves an AP50 of 73.08% on the FLIR dataset, indicating that the method of this invention performs better in cross-domain feature alignment, pseudo-label quality and adaptability to complex scenes, and significantly improves the performance of domain-adaptive object detection.
[0120] Figures 2A-2C This is a visualization result of domain-adaptive object detection on the FLIR dataset obtained according to an embodiment of the present invention.
[0121] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A domain-adaptive object detection method based on a cross-head cooperative distillation network, characterized in that, The method includes the following steps: Step S1: Construct a student model using a pre-trained deep learning network, input the training source domain labeled image into the student model, and backpropagate to optimize the student model to obtain a student model trained based on the source domain labeled image. Step S2: Construct a source domain teacher model and a target domain teacher model. Initialize the source domain teacher model and the target domain teacher model using the student model trained based on the source domain labeled image to obtain the initialized source domain teacher model and the target domain teacher model. Input the input image into the initialized source domain teacher model and the target domain teacher model to obtain source domain pseudo-label features and target domain pseudo-label features based on the input image. The input image is an unlabeled training source domain image or a training target domain image. Step S3: Construct a cross-head collaboration module. In the cross-head collaboration module, the input image is input into the backbone network of the student model trained based on the source domain labeled image to obtain intermediate features based on the input image. The intermediate features based on the input image are input into the detection head of the student model trained based on the source domain labeled image to obtain prediction features based on the input image. The intermediate features based on the input image are input into the detection heads of the initialized source domain teacher model and target domain teacher model respectively to obtain cross-prediction features based on the source domain teacher model and cross-prediction features based on the target domain teacher model. Step S4: Construct a loss calculation module. In the loss calculation module, the final loss value is calculated using the prediction features based on the input image, the source domain pseudo-label features based on the input image, the target domain pseudo-label features based on the input image, the cross-prediction features based on the source domain teacher model, and the cross-prediction features based on the target domain teacher model. Based on the final loss value, backpropagation optimization is performed on the student model trained based on the source domain labeled image. After multiple optimization iterations, the optimal domain adaptive object detection model is obtained. Step S5: In the testing phase, the optimal domain adaptive object detection model is used to detect the test target domain image to obtain the domain adaptive object detection result.
2. The method according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Determine the pre-trained deep learning network, initialize its parameters, and use it as the backbone network to obtain the student model; Step S12: Perform enhancement preprocessing on the training source domain labeled image to obtain the enhanced training source domain labeled image; Step S13: Based on the enhanced training source domain labeled image, the student model is subjected to supervised training and backpropagation optimization to obtain a student model trained based on the source domain labeled image.
3. The method according to claim 1, characterized in that, Step S2 includes the following steps: Step S21: Construct a source domain teacher model and a target domain teacher model. Use the parameters of the student model trained based on the source domain labeled images as initial parameters to initialize the source domain teacher model and the target domain teacher model, and obtain the initialized source domain teacher model and target domain teacher model. Step S22: Perform weak enhancement on the input image; Step S23: Use the initialized source domain teacher model and target domain teacher model to extract features from the weakly enhanced input image to obtain source domain pseudo-label features and target domain pseudo-label features based on the input image.
4. The method according to claim 1, characterized in that, Step S3 includes the following steps: Step S31: Perform strong enhancement on the input image to obtain a strongly enhanced input image; Step S32: Use the backbone network of the student model trained based on the source domain labeled image to extract features from the strongly enhanced input image to obtain intermediate features based on the input image; Step S33: Input the intermediate features based on the input image into the detection head of the student model trained based on the source domain labeled image to obtain the predicted features based on the input image; Step S34: Input the intermediate features based on the input image into the detection heads of the initialized source domain teacher model and target domain teacher model respectively to obtain cross-prediction features based on the source domain teacher model and cross-prediction features based on the target domain teacher model.
5. The method according to claim 1, characterized in that, Step S4 includes the following steps: Step S41, construct the loss calculation module; Step S42: In the loss calculation module, the cross-head collaborative knowledge distillation loss function is used to calculate the final loss value based on the prediction features of the input image, the source domain pseudo-label features of the input image, the target domain pseudo-label features of the input image, the cross-prediction features based on the source domain teacher model, and the cross-prediction features based on the target domain teacher model. Step S43: Use the final loss value to perform backpropagation optimization on the student model trained based on the source domain labeled image. After multiple optimization iterations, the optimal domain adaptive object detection model is obtained.
6. The method according to claim 1, characterized in that, In step S4, each optimization iteration includes the calculation of pseudo-label features, intermediate features, predicted features, and cross-prediction features; the calculation of the final loss value; backpropagation optimization of the student model; and updating the parameters of the teacher model.
7. The method according to claim 6, characterized in that, Updating the teacher model parameters specifically includes the following steps: Step S431: Test and evaluate the student model trained based on source domain labeled images to obtain the real-time performance gap value of the student model trained based on source domain labeled images. ; Step S432: Construct an adaptive EMA attenuation module. In the adaptive EMA attenuation module, the adaptive EMA attenuation factor is calculated based on the real-time performance gap value of the student model trained on the source domain labeled image. Using the adaptive EMA attenuation factor The parameters of the initialized source domain teacher model or target domain teacher model are updated.
8. The method according to claim 7, characterized in that, In step S432, the adaptive EMA decay factor is calculated based on the real-time performance gap value of the student model trained on the source domain labeled image using the following formula. : = ; in, and Used for control The amplitude and smoothness of the function.
9. The method according to claim 7, characterized in that, In step S432, the adaptive EMA attenuation factor is used. The parameters of the initialized source domain teacher model or target domain teacher model are updated as follows: Using the adaptive EMA attenuation factor The parameters of the student model trained based on the source domain labeled images are then updated for the parameters of the initialized source domain teacher model or target domain teacher model: ; in, These represent the parameters of the initialized source domain teacher model or target domain teacher model. The parameters represent the student model trained based on source domain labeled images.
10. The method according to claim 1, characterized in that, Step S5 includes the following steps: Step S51: In the testing phase, the test target domain image is input into the backbone network of the optimal domain adaptive object detection model for feature extraction to obtain features based on the test target domain image. Step S52: Input the features based on the test target domain image into the detection head of the optimal domain adaptive object detection model to obtain the domain adaptive object detection result.
Citation Information
Patent Citations
Pseudo-label-based passive unsupervised domain adaptive medical image segmentation method and device
CN119649039A
Remote sensing knowledge distillation method and system based on dual-mode characteristic spectrum decoupling
CN120656063A
Source-free cross domain detection method with strong data augmentation and self-trained mean teacher modeling
US20230154167A1