Target detection method and system adaptive to unsupervised domain

By employing class prototype contrastive learning and pseudo-label selection methods, the problems of difficult feature alignment for similar targets and insufficient pseudo-label quality in unsupervised adaptive target detection are solved, thereby improving the cross-domain adaptability and detection accuracy of the target detection model.

CN120852853APending Publication Date: 2025-10-28SHANDONG UNIV OF FINANCE & ECONOMICS
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510903928.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing unsupervised domain-adaptive target detection methods have difficulty aligning instance-level features of similar targets, and the quality of pseudo-labels is insufficient, resulting in low detection accuracy.

Method used

We employ class prototype contrastive learning, which preserves the common features of targets of the same category through class prototypes. We use contrastive learning to improve the representativeness and discriminativeness of class prototypes, and design a pseudo-label screening method to improve the quality of pseudo-labels.

Benefits of technology

It effectively mitigates feature differences between similar targets, improves the representativeness and distinguishability of different class prototypes, enhances the cross-domain adaptability of target detection models, and improves detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852853A_ABST
    Figure CN120852853A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of target detection, and provides an unsupervised domain adaptive target detection method and system, and the method comprises the steps: carrying out the training of a student model through a source domain image, and copying the parameters of the student model to a teacher model; the teacher model generates an initial pseudo label for a target domain image, determines a pseudo label through a pseudo label screening method, and extracts a local class prototype of a teacher target domain; the student model is trained by using a source domain image and a target domain image with a pseudo label, and a source domain local class prototype and a student target domain local class prototype are extracted at the same time to calculate a global class prototype; determining a total loss function according to supervision loss, unsupervised loss, antagonistic loss, intra-domain class prototype comparison loss and inter-domain class prototype comparison loss; updating the student model by using the total loss function, and updating the teacher model based on the updated parameters of the student model to obtain a trained teacher model; and inputting the target domain image into the trained teacher model for target detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of target detection technology, specifically relating to an unsupervised domain-adaptive target detection method and system. Background Art

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Unsupervised domain adaptive object detection is frequently applied in diverse scenarios such as autonomous driving, industrial inspection, and security monitoring. Its detection performance directly impacts user safety and experience. Therefore, researching effective domain adaptation methods to enable object detectors to exhibit superior performance in various complex real-world situations is crucial for ensuring user safety and improving experience. Currently, many domain adaptation methods have been proposed to bridge the domain gap. Adversarial methods utilize a domain discriminator for adversarial training, aiming to generate features from the feature extractor that confuse the discriminator, while the discriminator can effectively distinguish whether features originate from the source or target domain, thus allowing the model to extract domain-invariant features as much as possible. Image-to-image translation methods map source domain images to images with the style or features of the target domain image, reducing visual differences and enabling models trained on the source domain to better adapt to the target domain. The mean-teacher method, based on a student-teacher framework, uses pseudo-labels generated by the teacher model to guide the student model's learning. Recent studies have shown that combining the mean-teacher model with adversarial learning, image translation, and other domain adaptation methods can effectively improve the accuracy of unsupervised domain adaptive object detection. Although these methods have successfully improved detection accuracy, the quality of false labels predicted by teacher models in these methods is poor and they are not representative due to the still existing domain differences.

[0004] Feature alignment is a crucial step in improving detection accuracy. However, many existing methods primarily focus on aligning image-level features from the source and target domains, often neglecting the alignment of instance-level features between similar targets. Here, image-level features describe the features of the entire image, while instance-level features describe the features of a specific target object. As a dense detection task, object detection requires even greater attention to instance-level features. Through instance-level feature alignment, the detection model can better capture subtle changes in target instances, thereby accurately distinguishing and locating different target objects. Furthermore, the appearance, position, size, and other visual features of objects may differ across different domains. If there are significant differences between the same type of objects in the source and target domains, directly aligning the extracted instance-level features to accurately detect target objects in the target domain may be challenging. Simultaneously, there is significant similarity between some different categories of targets. Without constraints, the model is prone to misclassifying similar but different types of targets, leading to an increased proportion of false positives in the pseudo-labels. In summary, existing methods do not adequately consider the differences between the same category of targets in different domains, nor the similarities between different categories of targets. Summary of the Invention

[0005] To address the aforementioned issues, this invention proposes an unsupervised domain-adaptive target detection method and system. This invention utilizes class prototypes to preserve common features of targets within the same category, mitigating the potential for significant feature differences between similar targets. Leveraging the powerful feature learning capabilities of contrastive learning, it proposes intra-domain and inter-domain contrastive learning based on class prototypes to effectively bridge domain gaps. Using class prototypes for contrastive learning improves the discriminability between different categories and the global representation of instance-level features, thereby enhancing the representativeness and discriminability of class prototypes across different categories. This enables the target detection model to better distinguish features from different categories and simultaneously aligns features of the same category across domains, alleviating inter-domain differences in features of similar targets across different domains.

[0006] According to some embodiments, the first aspect of the present invention provides an unsupervised domain-adaptive target detection method, which adopts the following technical solution: An unsupervised, domain-adaptive target detection method includes: The student model is trained using source domain images, and the parameters of the trained student model are copied to the teacher model. The teacher model generates initial pseudo-labels for the target domain image, determines the pseudo-labels through a pseudo-label filtering method, and extracts the teacher's local class prototype in the target domain; the student model is trained using the source domain image and the target domain image with pseudo-labels, and extracts the source domain local class prototype and the student's target domain local class prototype and uses them to calculate the global class prototype. By utilizing the similarity function of local class prototypes in the source domain and the contrast loss of local class prototypes in the teacher's target domain and local class prototypes in the student's target domain, the intra-domain class prototype contrast loss is determined; by comparing and learning with the global class prototypes using local class prototypes in the source domain and local class prototypes in the student's target domain, the inter-domain class prototype contrast loss is determined. The total loss function is determined based on supervised loss, unsupervised loss, adversarial loss, intra-domain class prototype comparison loss, and inter-domain class prototype comparison loss. The student model is updated using the total loss function, and the teacher model is updated based on the parameters of the updated student model to obtain the trained teacher model. The target domain image is input into the trained teacher model for target detection.

[0007] Furthermore, the student model is trained using source domain images, and the parameters of the trained student model are copied to the teacher model, specifically as follows: The student model is trained using source domain images and its parameters are updated using backpropagation with supervised loss. After pre-training is complete, the parameters of the student model are copied to the teacher model.

[0008] Furthermore, the teacher model generates initial pseudo-labels for the target domain image, and determines the pseudo-labels through a pseudo-label filtering method, specifically as follows: The teacher model is used to generate teacher pseudo-labels for the target domain images, and the same set of target domain images is also input into the student model to generate student pseudo-labels. The pseudo-labels of teachers and students below the classification confidence threshold are traversed and filtered. The intersection-union ratio (IUR) between the two pseudo-labels is calculated. The pseudo-labels of teachers above the IUR threshold are retained and then merged with the pseudo-labels of teachers above the classification confidence threshold to obtain the final pseudo-labels.

[0009] Furthermore, the in-domain class prototype contrast loss is determined by utilizing the similarity function of the source domain local class prototypes and the contrast loss of the teacher's target domain local class prototypes and the student's target domain local class prototypes. Specifically: ; in, The weighting parameters represent the weights that balance the two losses. and These are the prototypes of the student's target domain local class and the teacher's target domain local class. It is the first There are a total of class targets. Targets in each category.

[0010] Furthermore, the step of comparing and learning the source domain local class prototype and the student target domain local class prototype with the global class prototype to determine the inter-domain class prototype comparison loss specifically involves: ; in, It is the first There are a total of class targets. Target categories, and Representing the first The source domain local class prototype and the first class of the target class The local class prototype of the student target domain of the class target; It is the first Global class prototype It is the first Global class prototype.

[0011] Furthermore, the total loss function is specifically as follows: ; in, Represents the total loss function. Indicates monitoring losses, This indicates unsupervised loss. This represents the adversarial loss generated by the domain discriminator in adversarial learning. This represents the in-domain class prototype comparison loss. This represents the inter-domain class prototype comparison loss. , , and represents the weights of the unsupervised loss, the adversarial loss of the domain discriminator, the intra-domain class prototype comparison loss, and the inter-domain class prototype comparison loss, respectively.

[0012] According to some embodiments, a second aspect of the present invention provides an unsupervised domain-adaptive target detection system, employing the following technical solution: An unsupervised, domain-adaptive target detection system includes: The pre-training module is configured to train the student model using source domain images and then copy the trained parameters of the student model to the teacher model. The mutual learning module is configured so that the teacher model generates initial pseudo-labels for the target domain image, determines the pseudo-labels through a pseudo-label filtering method, and extracts the teacher's local class prototype in the target domain; the student model is trained using the source domain image and the target domain image with pseudo-labels, and at the same time extracts the source domain local class prototype and the student's target domain local class prototype and uses them to calculate the global class prototype. By utilizing the similarity function of local class prototypes in the source domain and the contrast loss of local class prototypes in the teacher's target domain and local class prototypes in the student's target domain, the intra-domain class prototype contrast loss is determined; by comparing and learning with the global class prototypes using local class prototypes in the source domain and local class prototypes in the student's target domain, the inter-domain class prototype contrast loss is determined. The total loss function is determined based on supervised loss, unsupervised loss, adversarial loss, intra-domain class prototype comparison loss, and inter-domain class prototype comparison loss. The student model is updated using the total loss function, and the teacher model is updated based on the parameters of the updated student model to obtain the trained teacher model. The object detection module is configured to input the object domain image into the trained teacher model for object detection.

[0013] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.

[0014] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an unsupervised domain-adaptive target detection method as described in the first aspect above.

[0015] According to some embodiments, a fourth aspect of the present invention provides a computer device.

[0016] 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 program, implements the steps of an unsupervised domain-adaptive target detection method as described in the first aspect above.

[0017] According to some embodiments, a fifth aspect of the present invention provides a computer program product or computer program.

[0018] This invention provides a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of an unsupervised domain-adaptive target detection method as described in the first aspect above.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention proposes a mean teacher model based on class prototype comparison. It utilizes class prototypes to preserve common features of targets within the same category, mitigating the problem of significant feature differences between similar targets. By using class prototypes for contrastive learning, the representativeness and discriminative power of class prototypes across different categories are improved, enabling the target detection model to better distinguish features from different categories. Simultaneously, it aligns features of the same category across domains, alleviating inter-domain differences in features of similar targets across different domains. Furthermore, a pseudo-label selection method based on bounding box localization is designed to retain potentially effective pseudo-labels, providing higher-quality pseudo-labels for the student model. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0021] Figure 1 This is a flowchart of an unsupervised domain-adaptive target detection method according to an embodiment of the present invention.

[0022] Figure 2 This is a framework for an unsupervised domain-adaptive target detection method in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the effects of intra-domain class prototype comparison learning and inter-domain class prototype comparison learning in an embodiment of the present invention. Detailed Implementation

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

[0024] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0025] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0026] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0027] Example 1 like Figure 1As shown, this embodiment provides an unsupervised domain-adaptive target detection method. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps: Step S1: Pre-training phase The student model is trained using source domain images. After pre-training, the parameters of the student model are copied to the teacher model. Step S2: Mutual learning phase Step S2.1: The teacher model generates initial pseudo-labels for the target domain image, determines the pseudo-labels through a pseudo-label filtering method, and extracts the teacher's local class prototype in the target domain; the student model is trained using the source domain image and the target domain image with pseudo-labels, and at the same time extracts the source domain local class prototype and the student's target domain local class prototype and uses them to calculate the global class prototype. Step S2.2: Determine the intra-domain class prototype contrast loss by using the similarity function of the source domain local class prototypes and the contrast loss of the teacher's target domain local class prototypes and the student's target domain local class prototypes; determine the inter-domain class prototype contrast loss by comparing the source domain local class prototypes and the student's target domain local class prototypes with the global class prototypes respectively. Step S2.2: Determine the total loss function based on supervised loss, unsupervised loss, adversarial loss, intra-domain class prototype contrast loss, and inter-domain class prototype contrast loss; update the student model using the total loss function, and update the teacher model based on the updated student model parameters to obtain the trained teacher model; Step S3: Input the target domain image into the trained teacher model for target detection.

[0028] This embodiment uses labeled data from the source domain. and unlabeled data from the target domain. ,in express Zhang Yuanyu's image, express Zhang target domain image, and They represent Zhang Yuanyu's image contains bounding boxes and category information.

[0029] This embodiment proposes a Prototype-Based Mean Teacher (PCMT) model, the detailed structure of which is as follows: Figure 2 As shown, this includes a student model and a teacher model. The class prototype module constructs local and global class prototypes using instance-level features for intra-domain and inter-domain contrastive learning. The pseudo-label filtering module filters high-quality pseudo-labels using bounding box localization thresholds and classification confidence thresholds. The student model uses a domain discriminator and class prototypes for image-level and instance-level feature alignment, while also using class prototypes to distinguish target features from different categories.

[0030] The entire training process of the model is divided into two stages. First, in the pre-training stage, the student model is trained using source domain images with supervised loss. After pre-training, the parameters of the student model are copied to the teacher model. In the mutual learning stage, the teacher model generates initial pseudo-labels for the target domain images and determines the pseudo-labels using a pseudo-label selection method. The student model is trained using labeled source domain images and pseudo-labeled target domain images, performing image-level and instance-level feature alignment using a domain discriminator and class prototype, respectively. Updates are performed through backpropagation using supervised loss, unsupervised loss, adversarial loss, and contrastive loss. The teacher model, however, is only updated using the EMA (exponential moving average) of the student model's parameters.

[0031] In step S1, the student model is trained using source domain images. After pre-training, the parameters of the student model are copied and shared with the teacher model, specifically: The student model is trained using source domain images and its parameters are updated using backpropagation with supervised loss. The parameters of the teacher model are updated using an exponential moving average of the parameters of the student model.

[0032] This embodiment uses the mean-teacher framework, consisting of identical student and teacher models, both employing the Faster R-CNN object detection model. The student model's parameters are updated via backpropagation of the loss function. During the mean-teacher pre-training phase, only labeled source domain images are used for supervised training of the student model. The Faster R-CNN loss function is used, and the supervised loss for the student model is... for: (1); in, This represents the loss from the prediction of the region of interest. This represents the loss of the Region Proposal Network, both of which have classification losses. and bounding box regression loss For classification loss and Use binary cross-entropy loss. For bounding box regression loss... and ,use loss.

[0033] The parameters of the teacher model are not updated through backpropagation of the loss; instead, they are updated using the exponential moving average (EMA) of the parameters of the student model. (2); in, This represents the updated parameters of the teacher model. This represents the parameters of the teacher model before the update. The parameters representing the student model, This represents the weighting parameter of the EMA.

[0034] In step S2, for step S2.1, the teacher model generates pseudo-labels for the target domain image, and determines the pseudo-labels through a pseudo-label filtering method, specifically as follows: The teacher model is used to generate teacher pseudo-labels for the target domain images, and the same set of target domain images is also input into the student model to generate student pseudo-labels. The pseudo-labels of teachers and students below the classification confidence threshold are traversed and filtered. The intersection-union ratio (IUR) between the two pseudo-labels is calculated. The pseudo-labels of teachers above the IUR threshold are retained and then merged with the pseudo-labels of teachers above the classification confidence threshold to obtain the final pseudo-labels.

[0035] When replicating previous experiments, it was found that many pseudo-labels contained accurate target localization but low classification confidence, and this mostly occurred in categories with fewer instances in the training set. When only a confidence threshold was used... When directly filtering pseudo-labels predicted by the teacher model, labels with accurate bounding box predictions but low classification confidence are excluded. This results in insufficient retained pseudo-labels to cover all instances in the corresponding image, significantly reducing the representativeness of the pseudo-labels. Therefore, this embodiment designs a pseudo-label filtering strategy based on bounding box localization.

[0036] The weakly enhanced images input to the teacher model are also input to the student model, enabling both the teacher and student models to predict from the same set of images, generating two sets of pseudo-labels respectively. Then, a classification confidence threshold is applied first. The two sets of pseudo-labels are filtered. For pseudo-labels with a confidence level lower than the classification confidence level, the two sets of pseudo-labels are iterated through, and the intersection-union ratio (IOU) of a pair of bounding boxes (from the two sets of pseudo-labels respectively) is calculated. If the IOU is higher than the set IOU threshold, the pseudo-label is considered a match. If a pseudo-label is found to be above the IOU threshold but below the classification confidence threshold, it is retained. Finally, pseudo-labels that are above the classification confidence threshold are merged with pseudo-labels that are above the classification confidence threshold to form the final high-quality pseudo-labels.

[0037] The student model undergoes supervised training not only with strongly enhanced (e.g., simple flipping and cropping) labeled source domain images, but also unsupervised training with pseudo-labeled target domain images. These pseudo-labels are generated by the teacher model for the target domain images and are passed through a confidence threshold. Noisy pseudo-labels are filtered out. The supervised loss is still as shown in formula (1), and the unsupervised loss is: (3); in, The pseudo-label represents the target domain image. Here, following the settings in AT, bounding box regression loss is not applied because the confidence score in the pseudo-label only represents the target's class confidence, not the location of the generated target bounding box. During the model testing and inference phase, the teacher model is used for target detection.

[0038] In this embodiment, the intra-domain local class prototype stores information about target objects of different categories and different domains in each iteration, while the inter-domain global class prototype stores global information about target objects of different categories. Using the bounding box information in the labels, feature information of the corresponding target objects is extracted from the feature map. These instance-level features are mapped to a unified-dimensional feature space through a class prototype generation module consisting of a two-layer MLP. Based on the corresponding category information of these instance-level features, a local class prototype is generated for each category in the source and target domains in each iteration. These local class prototypes store information about their respective domains and categories.

[0039] Shared in source and target domains Categories and Representing the first The source domain local class prototype and the first class of the target class The student target domain local class prototype of the target class. Suppose that in one iteration, the first and second classes in the source and target domains are... The target classes are respectively and If there are , then in each iteration, the local class prototypes of the source domain and the target domain are respectively: (4); (5); in, The class prototype generation module is a two-layer fully connected neural network used to map instance-level features to a feature space of uniform dimension. Representative feature extractor, and These represent the source and target domain images in one iteration, respectively. Indicates according to the first Bounding box of class target and The model extracts instance-level features from the image features in both the source and target domains. It then utilizes local class prototypes to perform comparative learning in both the source and target domains to separate class prototypes of different categories, thereby improving the discriminability of different target objects.

[0040] In step S2.2, the intra-domain contrast loss is divided into two parts based on the source and target domains. First, for the source domain, since the source domain image only passes through the student model, only local class prototypes from the student model are obtained. Therefore, this set of local class prototypes from the source domain is used to distinguish different categories, minimizing the following similarity function: (6); in, This represents the cosine similarity function. It calculates the cosine similarity between each pair of source domain local class prototypes of different categories, minimizing the similarity between the local class prototypes of different categories to effectively separate target objects of different categories.

[0041] For the target domain, instance-level features are extracted from the student and teacher models respectively, and the local class prototypes of the target domain from the student and teacher models are calculated. and Then, calculate the local class prototype contrast loss of the target domain: (7); Among them, a pair of local class prototypes of the same category from the student model and the teacher model respectively is a positive pair, and a pair of local class prototypes of different categories is a negative pair. The average of the contrastive losses for each category is used as the local class prototype contrastive loss for the target domain. Therefore, the in-domain class prototype contrastive loss is: (8); in, The weight parameter representing the balance between the two losses is set to 10. By using intra-domain class prototype comparison loss, the features of different categories of target objects in the source and target domains become more discriminative, thereby improving the classification accuracy of the model and reducing the number of false positive targets in the pseudo-labels.

[0042] To align instance-level features in the source and target domains, an inter-domain class prototype contrastive loss is proposed. The aim is to effectively align instance features of the same category in the source and target domains through inter-domain class prototype contrastive learning. First, the global class prototype is calculated based on the local class prototypes of the source and target domains (from the student model). In each iteration, the global class prototype is updated using the following formula. : (9); in, This indicates the number of iterations prior to this iteration. The global class prototype of the target object. This indicates the first time the global class prototype was calculated before this update. The number of target objects of the class. In the first iteration, Initialize as a zero vector. Initialize to zero.

[0043] Then, two local class prototypes are compared with the global class prototype. It's important to note that inter-domain comparative learning is not performed between the two local class prototypes. This is because the images used in each model iteration may not include all object categories in the dataset, resulting in local class prototypes containing only a subset of categories. If the source and target domains have prototypes of different categories, the significance of directly comparing the two local class prototypes is greatly reduced. For example, if the source domain's local class prototypes only have two categories, "car" and "person," while the target domain's local class prototypes have four categories, "car," "person," "bus," and "train," then comparing these two local class prototypes will not align with the corresponding category prototypes in the source domain, since the prototypes for "bus" and "train" in the source domain's local class prototypes are empty.

[0044] The global class prototype, being a cross-domain global representation, is continuously updated throughout the training process and includes class prototypes for all categories. When comparing the two types of local class prototypes with the global class prototype, all types of prototypes in the local class prototypes are fully utilized. This approach also avoids the model focusing only on common target categories during comparative learning, thus helping to reduce category bias caused by the number of categories in the dataset.

[0045] Therefore, the model uses the global class prototype as a bridge, calculating the contrastive loss between the local class prototypes of the source and target domains and the global class prototype, respectively, to align instance-level features of the same category in the source and target domains. The inter-domain class prototype contrastive loss is as follows: (10); Total loss function for: (11); in, Indicates monitoring losses, This indicates unsupervised loss. This represents the adversarial loss generated by the domain discriminator in adversarial learning. This represents the in-domain class prototype comparison loss. This represents the inter-domain class prototype comparison loss. , , and represents the weights of the unsupervised loss, the adversarial loss of the domain discriminator, the intra-domain contrast loss, and the inter-domain contrast loss, respectively.

[0046] A class prototype refers to a representative feature vector for each category. As a generalization and representation of the features of a specific category of targets, it effectively summarizes the more representative essential features of the same category of targets. Furthermore, since class prototypes are extracted from a large amount of data, they possess a certain domain generalization ability, adapting to various scenarios or target domains with different styles. This embodiment proposes a novel teacher-student framework—the mean teacher model based on class prototype comparison. Class prototypes are used to store category information, with different class prototypes representing their respective categories. Instance-level alignment using the essential characteristics of class prototypes effectively alleviates the problem of excessive differences among similar targets.

[0047] High-quality instance-level features are extracted from the source and target domains. For each category of target objects, two types of class prototypes are calculated: 1) intradomain local class prototypes to store information about target objects in the same domain and the domain itself in each iteration; and 2) cross-domain global class prototypes, used to store global target object information across domains. Then, intradomain and interdomain comparative learning is performed using these two types of class prototypes. This enables the detection model to better distinguish features between different categories, improving discriminative power between different categories, especially those with similar features. Simultaneously, features of the same category are aligned across domains, achieving instance-level feature alignment between different domains.

[0048] Specifically, intra-domain contrastive learning is performed using local class prototypes from the source and target domains to reduce feature differences between similar targets and improve inter-class discriminability between different categories of targets. For inter-domain contrastive learning, two local class prototypes are used to compare with the global class prototype. The global class prototype acts as a bridge connecting the source and target domains, aligning local class prototypes of the same category in the source and target domains to reduce feature differences between similar targets from different domains.

[0049] Furthermore, due to the scarcity of instances for certain categories or the difficulty in detecting certain categories in the training data, the classification confidence of these objects in the pseudo-labels generated by the teacher model is low. Therefore, using a single confidence threshold to filter pseudo-labels will result in the rejection of some accurately located but low-confidence pseudo-labels, which significantly reduces the representativeness of the pseudo-labels. To address this, a pseudo-label filtering method based on bounding box localization is designed to mine potential false positive pseudo-labels, i.e., pseudo-labels with accurate target localization but confidence below the threshold. Combining this method with the confidence threshold filtering method greatly improves the representativeness of the pseudo-labels and provides higher-quality pseudo-labels for the student model.

[0050] In summary, this embodiment proposes a Prototype-Based Mean Teacher Model (PCMT). Local prototypes are used to store information about each target object class and its domain in each iteration, while global prototypes are used to store information about each target object class globally across domains. Through intra-domain prototype comparison learning, the model can refine the inter-class features of target objects in different domains, improving the discriminability between instance-level features of different categories. Through inter-domain prototype comparison learning, PCMT can perform instance-level feature alignment based on the same category, mitigating inter-domain differences in similar target features across different domains. A pseudo-label selection method based on bounding box localization is also designed to discover potential high-quality pseudo-labels and improve their representativeness. Extensive experimental results show that our method effectively reduces inter-domain differences and outperforms the current state-of-the-art (SOTA) in various domain adaptation scenarios. For example, in the Cityscapes→BDD100K domain adaptation task, this embodiment achieves the best mean accuracy (mAP) of 43.5%, a 5.0% improvement over the SOTA.

[0051] Example 2 This embodiment provides an unsupervised domain-adaptive target detection system, including: The pre-training module is configured to train the student model using source domain images and then copy the trained parameters of the student model to the teacher model. The mutual learning module is configured so that the teacher model generates initial pseudo-labels for the target domain image, determines the pseudo-labels through a pseudo-label filtering method, and extracts the teacher's local class prototype in the target domain; the student model is trained using the source domain image and the target domain image with pseudo-labels, and at the same time extracts the source domain local class prototype and the student's target domain local class prototype and uses them to calculate the global class prototype. By utilizing the similarity function of local class prototypes in the source domain and the contrast loss of local class prototypes in the teacher's target domain and local class prototypes in the student's target domain, the intra-domain class prototype contrast loss is determined; by comparing and learning with the global class prototypes using local class prototypes in the source domain and local class prototypes in the student's target domain, the inter-domain class prototype contrast loss is determined. The total loss function is determined based on supervised loss, unsupervised loss, adversarial loss, intra-domain class prototype comparison loss, and inter-domain class prototype comparison loss. The student model is updated using the total loss function, and the teacher model is updated based on the parameters of the updated student model to obtain the trained teacher model. The object detection module is configured to input the object domain image into the trained teacher model for object detection.

[0052] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.

[0053] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0054] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0055] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of an unsupervised domain-adaptive target detection method as described in Embodiment 1 above.

[0056] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the unsupervised domain adaptation target detection method described in Embodiment 1 above.

[0057] Example 5 This embodiment provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the unsupervised domain-adaptive target detection method described in Embodiment 1 above.

[0058] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0059] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0060] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0061] 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.

[0062] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0063] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. An unsupervised, domain-adaptive target detection method, characterized in that, include: The student model is trained using source domain images, and the parameters of the trained student model are copied to the teacher model. The teacher model generates initial pseudo-labels for the target domain image, determines the pseudo-labels through a pseudo-label filtering method, and extracts the teacher's local class prototype in the target domain; the student model is trained using the source domain image and the target domain image with pseudo-labels, and extracts the source domain local class prototype and the student's target domain local class prototype and uses them to calculate the global class prototype. By utilizing the similarity function of local class prototypes in the source domain and the contrast loss of local class prototypes in the teacher's target domain and local class prototypes in the student's target domain, the intra-domain class prototype contrast loss is determined; by comparing and learning with the global class prototypes using local class prototypes in the source domain and local class prototypes in the student's target domain, the inter-domain class prototype contrast loss is determined. The total loss function is determined based on supervised loss, unsupervised loss, adversarial loss, intra-domain class prototype comparison loss, and inter-domain class prototype comparison loss. The student model is updated using the total loss function, and the teacher model is updated based on the parameters of the updated student model to obtain the trained teacher model. The target domain image is input into the trained teacher model for target detection.

2. The unsupervised domain-adaptive target detection method as described in claim 1, characterized in that, The student model is trained using source domain images, and the parameters of the trained student model are copied to the teacher model, specifically as follows: The student model is trained using source domain images and its parameters are updated using backpropagation with supervised loss. After pre-training is complete, the parameters of the student model are copied to the teacher model.

3. The unsupervised domain-adaptive target detection method as described in claim 1, characterized in that, The teacher model generates initial pseudo-labels for the target domain image, and determines the pseudo-labels through a pseudo-label filtering method, specifically as follows: The teacher model is used to generate teacher pseudo-labels for the target domain images, and the same set of target domain images is also input into the student model to generate student pseudo-labels. The pseudo-labels of teachers and students below the classification confidence threshold are traversed and filtered. The intersection-union ratio (IUR) between the two pseudo-labels is calculated. The pseudo-labels of teachers above the IUR threshold are retained and then merged with the pseudo-labels of teachers above the classification confidence threshold to obtain the final pseudo-labels.

4. The unsupervised domain-adaptive target detection method as described in claim 1, characterized in that, The method utilizes the similarity function of local class prototypes in the source domain, along with the contrast loss of local class prototypes in the teacher's target domain and local class prototypes in the student's target domain, to determine the intra-domain class prototype contrast loss. Specifically: ; in, The weighting parameters represent the balance between the two losses. and These are the prototypes of the student's target domain local class and the teacher's target domain local class. It is the first There are a total of class targets. Targets in each category.

5. The unsupervised domain-adaptive target detection method as described in claim 1, characterized in that, The method of comparing and learning local class prototypes in the source domain and local class prototypes in the student's target domain with global class prototypes to determine the inter-domain class prototype comparison loss is as follows: ; in, It is the first There are a total of class targets. Target categories, and Representing the first The source domain local class prototype and the first class of the target class The target domain local class prototype of the target class; It is the first Global class prototype It is the first Global class prototype.

6. The unsupervised domain-adaptive target detection method as described in claim 1, characterized in that, The total loss function is specifically as follows: ; in, Represents the total loss function. Indicates monitoring losses, This indicates unsupervised loss. This represents the adversarial loss generated by the domain discriminator in adversarial learning. This represents the in-domain class prototype comparison loss. This represents the inter-domain class prototype comparison loss. , , and represents the weights of the unsupervised loss, the adversarial loss of the domain discriminator, the intra-domain class prototype comparison loss, and the inter-domain class prototype comparison loss, respectively.

7. An unsupervised domain-adaptive target detection system, characterized in that, include: The pre-training module is configured to train the student model using source domain images and then copy the trained parameters of the student model to the teacher model. The mutual learning module is configured so that the teacher model generates initial pseudo-labels for the target domain image, determines the pseudo-labels through a pseudo-label filtering method, and extracts the teacher's local class prototype in the target domain; the student model is trained using the source domain image and the target domain image with pseudo-labels, and at the same time extracts the source domain local class prototype and the student's target domain local class prototype and uses them to calculate the global class prototype. By utilizing the similarity function of local class prototypes in the source domain and the contrast loss of local class prototypes in the teacher's target domain and local class prototypes in the student's target domain, the intra-domain class prototype contrast loss is determined; by comparing and learning with the global class prototypes using local class prototypes in the source domain and local class prototypes in the student's target domain, the inter-domain class prototype contrast loss is determined. The total loss function is determined based on supervised loss, unsupervised loss, adversarial loss, intra-domain class prototype comparison loss, and inter-domain class prototype comparison loss. The student model is updated using the total loss function, and the teacher model is updated based on the parameters of the updated student model to obtain the trained teacher model. The object detection module is configured to input the object domain image into the trained teacher model for object detection.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the unsupervised domain-adaptive target detection method as described in any one of claims 1-6.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the unsupervised domain-adaptive target detection method as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of an unsupervised domain-adaptive target detection method as described in any one of claims 1-6.

Citation Information

Cited By

  • Intelligent control method and system for horizontal welding tool of steering axle

    CN121962781A

  • A steering bridge horizontal welding tool intelligent control method and system

    CN121962781B

  • Optical and SAR (Synthetic Aperture Radar) collaborative domain adaptive segmentation method for flood and ponding

    CN122115873A