Multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning

Through the methods of contrastive learning and autocorrelation incremental learning, the domain shift problem in multi-target domain adaptation is solved, and high-accuracy image classification is achieved in multiple target domains. It is suitable for unlabeled data scenarios and provides high adaptability and versatility.

CN116597211BActive Publication Date: 2025-10-24HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310559677.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2025-10-24
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

Existing self-supervised visual representation learning techniques suffer from domain shift problems in multi-target domain adaptation, making them difficult to apply effectively. Traditional methods also perform poorly on multiple target domains, resulting in knowledge forgetting and decreased classification performance.

Method used

The method of contrastive learning and autocorrelation incremental learning is adopted. The feature extractor and classifier are optimized through contrastive loss, cross entropy loss, distillation loss and autocorrelation loss. Domain-invariant features are learned and aligned on multiple target domains. The incremental learning module is combined to retain knowledge.

Benefits of technology

It achieves high-accuracy image classification in multiple target domains, avoids the difficulty of labeling data, is suitable for scenarios with large amounts of unlabeled data, provides high adaptability and versatility, and avoids the complexity of training multiple models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116597211B_ABST
    Figure CN116597211B_ABST
Patent Text Reader

Abstract

The application proposes a multi-target domain adaptive method based on contrast learning and self-correlation incremental learning, comprising: using a feature extractor to obtain contrast loss of source domain data and first target domain data respectively, and using a classifier to obtain cross-entropy loss of the source domain data; optimizing the contrast loss and the cross-entropy loss to align the source domain data and the first target domain data; based on the feature extractor after alignment, sharing weight parameters are performed to obtain the trained feature extractor and the classifier; a classification model for single-source target domain adaptive image classification is constructed to ensure the classification performance and classify the target domain. In each domain, the positive samples of the samples are obtained through data enhancement, and the other samples are negative samples, the source domain and the target domain are pulled closer by minimizing the contrast learning loss, the incremental learning module is added to ensure the domain-invariant knowledge learned to multiple target domains, and the self-correlation loss obtained from the source domain ensures the accuracy of the one-to-many process classification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image classification of transfer learning, and particularly relates to a multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning. BACKGROUND

[0002] In the past few years, deep learning (DL) has been successfully applied to many applications and fields due to the availability of large amounts of labeled data, such as computer vision and image processing, signal processing, autonomous driving, agricultural food technology, medical imaging, etc. Most applications of DL technology, such as those mentioned above, involve supervised learning, which requires a manually labeled dataset, a very time-consuming, cumbersome and expensive process, resulting in certain datasets (such as ImageNet) being widely used for model pre-training. Since unlabeled data is largely available and less likely to have labeling bias problems, they tend to provide visual information independent of the style of a particular domain. Today, self-supervised visual representation learning has largely closed the gap with supervised learning methods, and in some cases even exceeded them. Contrastive learning is a prominent self-supervised visual representation learning technique that is increasingly popular, and its purpose is to learn embedding spaces by contrasting positive and negative sample pairs in semantics.

[0003] However, whether these self-supervised visual representation learning techniques can be effectively applied to domain adaptation has not been satisfactorily explored. When applying a well-performing model learned from a source training set to a different but related target test set, it is usually assumed that both sets of data come from the same distribution. When this assumption is violated, due to the distribution difference between the source domain and the target domain (referred to as domain shift), a DL model trained on the source domain data will not generalize well on the target domain. Learning a discriminative model in the presence of domain shift between the source dataset and the target dataset is called domain adaptation.

[0004] The setting of traditional unsupervised domain adaptation in image classification is usually limited to a single source and a single target pair, and the learned model is only applicable to a single target domain, which cannot be easily extended to multiple target domains, i.e., multiple target domain adaptation (MTDA). Using this setting, a single model is expected to be learned that can fully utilize data from a single labeled source domain and multiple unlabeled target domains and perform well on multiple target domains at the same time. This setting has great value in practical applications. For example, in the field of autonomous driving, a general model is needed that can work well in different environments, such as environments with different lighting, weather, and urban landscapes. In reality, it is difficult to collect annotated data for such different environments, but it is easy to have a large amount of unlabeled data. Traditional multiple target domain adaptation simply combines multiple single target domain adaptation models, such as learning domain-invariant features of multiple one-to-one models through knowledge distillation, without considering the optimization of the gradient direction of multiple target domain alignment, which can cause serious knowledge forgetting, and the previously learned weight parameters are not effectively preserved and extended, thereby greatly reducing the classification effect of the model in different target domains (such as the environment of rain or fog weather faced by autonomous driving).

[0005] There are two main challenges for this task: (1) the lack of pixel-level supervision information in multiple target domains, which makes it difficult to mine inherent and transferable knowledge; (2) it is difficult to have a model that works well on multiple target domains. There are two intuitive ways to extend pair-wise DA to multiple target domains: (1) train multiple models for each target domain individually, and (2) train a single model based on combined data from multiple target domains. However, directly using multiple models does not take advantage of the model ensemble effect as in a single domain. Inaccurate model scheduling can increase the risk of danger in practical applications. Due to the differences between domains, a model developed directly from combined data can lead to performance degradation. SUMMARY

[0006] To solve the above technical problems, the present application extends contrastive learning and applies it to the unsupervised domain adaptation task. This method first trains a set of source and target domains (1st) by setting positive and negative sample pairs to learn domain-invariant features to the greatest extent, then saves the learned network parameters to the incremental network, and when the next set of input source and target domains (2nd) is input, not only the contrastive loss and cross-entropy loss are used to reduce the domain difference between the source domain and the current target domain, but also the distillation loss and self-correlation loss are added to make the current trained model learn the domain knowledge of the previous target domain while ensuring accuracy. This is followed by the same process to learn the final multi-domain classification model.

[0007] To achieve the above purpose, the present application proposes a multiple target domain adaptation method based on contrastive learning and self-correlation incremental learning, comprising:

[0008] obtaining a contrastive loss of the source domain data and the first target domain data respectively by using the feature extractor, and obtaining a cross-entropy loss of the source domain data by using the classifier C;

[0009] optimizing the contrastive loss and the cross-entropy loss to align the source domain data and the first target domain data;

[0010] sharing weight parameters based on the feature extractor after the alignment is completed, to obtain the trained feature extractor and the classifier C;

[0011] constructing a classification model of single-source target domain adaptive image classification and ensuring classification performance based on the trained feature extractor and the classifier C, and classifying the target domain based on the classification model.

[0012] Optionally, obtaining the contrastive loss of the source domain data and the first target domain data respectively comprises:

[0013] setting two feature extractors; wherein the initial weights of the two feature extractors are the same, the first feature extractor is the feature extractor G for current training, and the second feature extractor is the feature extractor M of the incremental learning module;

[0014] randomly augmenting the source domain data and the first target domain data, inputting the augmented data into the feature extractor G, and distributing the calculation of the contrastive loss of the source domain data and the first target domain data.

[0015] Optionally, the contrastive loss and the cross-entropy loss are:

[0016]

[0017] wherein, is the contrastive loss of the source domain data, is the contrastive loss of the first target domain data, L ce is the cross-entropy loss, L total is the total loss after optimization, including the contrastive loss of the two domains and the cross-entropy loss of the source domain, by optimizing L total , the feature alignment of the source domain and the current target domain can be completed.

[0018] Optionally, sharing the weight parameters comprises:

[0019] saving the weight parameters of the feature extractor G after the alignment of the source domain data and the first target domain data is completed to the feature extractor M.

[0020] Optionally, obtaining the trained feature extractor and the classifier C comprises:

[0021] (1) Random data augmentation is performed on the source domain data and the next target domain data, and the augmented data is input into the feature extractor G to obtain features G(S) and G(T k+1 ), and two contrast losses and are calculated for the next target domain data.

[0022] (2) The source domain data is input into the classifier C to obtain a cross-entropy loss L ce .

[0023] (3) The source domain data S is input into the feature extractor M to obtain a feature M(S), and the two features G(S) and M(S) from the same source domain are aligned through a distillation loss L D .

[0024] (4) The feature M(S) is input into the classifier C, and a self-correlation loss L self-cor is calculated through a self-correlation matrix.

[0025] (5) The above five losses are optimized to align the source domain, the target domain Tk, and the target domain Tk+1, and to ensure that the semantic information of the source domain is not lost during training.

[0026] (6) The weight parameters of the feature extractor G that completes the alignment of the source domain data and the next target domain data are saved to the feature extractor M.

[0027] (7) Repeat (1) to (6) until the knowledge of K target domains is learned, and obtain the trained feature extractor and classifier.

[0028] Optionally, the distillation loss is:

[0029] L D =||G(S)-M(S)|| 2

[0030] where G(S) is the feature extracted by the feature extractor G from the source domain data, and M(S) is the feature extracted by the feature extractor M from the source domain data.

[0031] Optionally, the contrast loss is:

[0032]

[0033] where Lcon represents the contrast loss, and represent positive sample pairs of the source domain, respectively. and represent positive sample pairs of the target domain, respectively.

[0034] Optionally, in the classification model, the convolutional layer of Resnet-101 is selected as the feature extractor G and the feature extractor M, the classifier C adopts a three-layer full connection layer, the output is the probability of each category corresponding to the target domain data, and the maximum probability item is selected as the predicted category.

[0035] Optionally, the horizontal axis of the autocorrelation matrix is the real label of the target domain data, and the vertical axis is the label predicted by the classifier C for the target domain data.

[0036] Compared with the prior art, the present application has the following advantages and technical effects:

[0037] The present application guarantees the accuracy of classification when completing the single-source multi-target domain adaptive task through the autocorrelation matrix. The present application obtains the positive samples of each domain by data augmentation on the samples, and the other samples are the negative samples thereof. The source domain and the target domain are pulled closer by minimizing the contrast learning loss. An incremental learning module is added to guarantee the domain-invariant knowledge learned to multiple target domains. Finally, the autocorrelation loss obtained from the source domain guarantees the accuracy of the one-to-many process classification. The present scheme overcomes the problem that labeled data is difficult to obtain or the data volume is insufficient in different target scenarios, is suitable for scenarios with a large number of unlabeled data domains, avoids the huge workload caused by manual labeling, overcomes the difficulty that labeled data cannot be obtained in many target fields, and the model obtained by training has high adaptability and generality. A single model (a single model is often used in actual scenarios) does not need to be trained separately to obtain multiple models, but a converged and unified model that integrates multiple field knowledge is obtained, and the converged model has good classification performance on multiple target domains. BRIEF DESCRIPTION OF DRAWINGS

[0038] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of this application and their description together with the drawings serve to explain the application. In the drawings:

[0039] Figure 1 The overall framework diagram of the multi-target domain adaptive method based on contrast learning and autocorrelation incremental learning of the embodiments of the present application. DETAILED DESCRIPTION

[0040] It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0041] It is noted that the steps shown in the flowcharts of the drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases the steps shown or described can be executed in an order different from that shown here.

[0042] The effectiveness of image classification deep networks is due to two basic assumptions: one is that the training samples and test samples come from a common data set or different data sets with similar distribution; the second is that the training stage has a large number of labeled samples. However, the above assumptions are difficult to meet in most actual cases. Due to the difference in the field, which is mainly caused by the existence of the background difference between the source domain and the target domain, when the image style of the target domain is quite different from that of the source domain and the data distribution difference is large, the classification model trained on the source domain will be difficult to generalize to the target domain. Secondly, since the supervised samples of the image classification task need to be labeled with object categories, it will consume a lot of manpower and even be impossible when the object categories are numerous, and since the artificial labeling lacks a unified standard, it will inevitably introduce human bias.

[0043] Traditional unsupervised domain adaptation, as a branch of transfer learning, is usually limited to a single source and a single target pair in the setting of image classification. The learned model is only applicable to a single target domain and cannot be easily extended to multiple target domains, i.e., multi-target domain adaptation (MTDA).

[0044] Using this setting, a single model is expected to learn to make full use of data from a single labeled source domain and multiple unlabeled target domains and perform well on multiple target domains. This setting has great value in practical applications. For example, in autonomous driving, it is expected to have a model working in different environments with different lighting, weather, and urban landscapes. It is difficult to collect annotated data for such different environments, but it is easy to have a large amount of unlabeled data. For another example, when performing automatic detection of dangerous behavior in industrial scenes, it is difficult to use a model to infer and predict dangerous operations in different scenes due to the large differences in industrial production environments. Therefore, multi-target domain adaptation has great application value in actual production and life.

[0045] In view of the problems in the prior art described above, the present application discloses a multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning. The present application will now be described in conjunction with Figure 1 The multi-target domain adaptation image classification model training method disclosed in the present embodiment will be described. The domain adaptation image classification model training method includes the following steps:

[0046] Step 1: Send the labeled source domain data S and the first target domain data T1 into the feature extractor, reduce the domain difference by optimizing the contrast loss within the two domains and the source domain cross-entropy loss, and complete the alignment of the source domain S and the target domain T1;

[0047] Step 1-1: Set up two feature extractors (neural network convolutional layers) with the same initial weights, one as the feature extractor G for current training and the other as the feature extractor M for the incremental learning module;

[0048] Step 1-2: Perform random data augmentation on the source domain samples and the target domain samples to obtain the corresponding positive samples and negative samples, which are fed into the feature extractor G and the contrast loss of the source domain and the target domain is calculated in a distributed manner, i.e. and

[0049] Step 1-3: Feed the source domain sample into the classifier C, calculate and obtain the cross entropy loss L ce ;

[0050] Steps 1-4: Optimization Complete the alignment of source domain S and target domain T1;

[0051] Step 2: Through the incremental learning module and the autocorrelation matrix, the learned knowledge of different target domains is retained to complete the alignment between multiple target domains;

[0052] Step 2-1: Save the weight parameters of the feature extractor G that aligns the source domain S and target domain Tk (set the counter k = 1, 2, ... when entering step 2-1 at the beginning) trained in the previous step to the incremental module M, that is, the two networks share the weight parameters.

[0053] Step 2-2: Perform random data augmentation on the source domain data S and the target domain data Tk+1 to obtain positive and negative sample pairs, and send them to the feature extractor G to obtain features G(S) and G(T k+1 ), and calculate two contrast losses and

[0054] Step 2-3: Send the source domain sample into the classifier C, calculate and obtain the cross entropy loss L ce ;

[0055] Step 2-4: The source domain data S is fed into the incremental module M to obtain the feature M(S). The two features G(S) and M(S) from the same source domain are distilled through the loss L. D Perform feature alignment:

[0056] L D =||G(S)-M(S)|| 2

[0057] Step 2-5: Send the feature M(S) into the classifier C and calculate the autocorrelation loss L through the autocorrelation matrix self-cor ;

[0058] Step 2-6: Optimize the above five losses Align the source domain, target domain Tk, and target domain Tk+1, and ensure that the semantic information of the source domain is not lost during training;

[0059] Step 3: Repeat 2-1 to 2-6 until the knowledge of K target domains is learned;

[0060] Step 4: Save the final trained feature extractor G and classifier C, i.e. obtain a model (G+C) for realizing single-source target domain adaptive image classification and ensuring classification performance. This model can achieve effective classification results on a single target domain (e.g. in the automatic driving field, it has good recognition ability for urban scenes in rainy weather, but other domains such as foggy and snowy weather cannot guarantee classification effect because they have not participated in training).

[0061] The classification model is to accurately classify the target domain, such as various vehicles, pedestrians, and traffic lights in the automatic driving field, in order to accurately classify. By adopting the multi-target domain self-adaptive method, the classification model can have a high classification accuracy on multiple unlabeled target domains (close to supervised training).

[0062] In this embodiment, the detailed implementation steps are as follows:

[0063] S1. Send the labeled source domain data S (such as urban scene data set in normal weather in the automatic driving field) and the first target domain data T1 (such as urban scene data set in rainy weather) into the feature extractor G, and optimize it using contrastive loss. The goal of contrastive learning is to maximize the similarity between positive pairs and minimize the similarity between negative pairs. Randomly extract a small batch of N images, and randomly apply data augmentation twice to each anchor image x (random data augmentation includes: random cropping, random flipping, rotating by a certain angle, color change, Gaussian blur, etc.), creating two views of the same sample x i and x j , thereby obtaining 2N images, and regarding the other 2(N-1) augmented image samples as negative pairs. The contrastive loss is defined as follows:

[0064]

[0065] where 1 [k≠i] is an indicator function, k=i, and the value is 0, represents the cosine similarity between hidden representations z i and z j , N is the batch size, and t is the temperature parameter. z i and z j are the representation vectors of a pair of positive samples (xi and x j by the feature extractor and projection to get z i and z j ).

[0066] S2. This embodiment applies contrastive learning on source domain and target domain respectively, which takes into account that small batches contain image samples from both domains, which can treat all other samples as negative samples of anchor images, even if they can belong to the same class, but do not distinguish domains, which can further expand the distance between them, thus unable to learn domain invariance. To overcome these problems, this embodiment independently performs contrastive learning by randomly sampling instances from the source domain and the target domain. The intra-domain contrastive learning loss is defined as follows:

[0067]

[0068] and respectively represent the positive sample pairs of the source domain, and respectively represent the positive sample pairs of the target domain. By optimizing the intra-domain contrastive loss and the source domain cross-entropy loss, the alignment of the source domain S and the target domain T1 is completed. At this time, the loss function to be optimized is:

[0069]

[0070] The weight parameters of the feature extractor G (such as resnet-101) that aligns the source domain S and the target domain Tk (set the counter k = 1, 2, … initial k = 1) trained in the previous step are saved to the incremental module M (incremental learning model M, which shares the network structure with the feature extractor G, and there is no difference between the two, except that it is used to save the weight parameters of the previous step), that is, the two networks share the weight parameters.

[0071] S3. We perform random data augmentation on the source domain data S and the target domain data Tk+1 (such as urban landscape data sets under foggy weather, snowy weather, etc.), obtain positive and negative sample pairs, and input them into the feature extractor G to obtain features G(S) and G(T k+1 ), and calculate two contrastive losses and

[0072] S4. The source domain samples are sent to the classifier C, and the cross-entropy loss L ce is calculated and obtained;

[0073] S5. The source domain data S is sent to the incremental module M again to obtain the feature M(S), and the two features G(S) and M(S) from the same source domain are aligned by the distillation loss L D ; the distillation loss LD This ensures that when training the source domain and the current target domain Tk+1, the knowledge of the previous target domain Tk can still be learned, thus avoiding knowledge forgetting. This embodiment uses L2 loss as the distillation loss, and the formula is as follows:

[0074] L D =||G(S)-M(S)|| 2 .

[0075] S6. Send the feature M(S) to the classifier C and calculate the autocorrelation loss L through the autocorrelation matrix self-cor , which is defined as follows:

[0076] The horizontal axis of the autocorrelation matrix is ​​the true label of the sample (true value label, such as the true category is bicycle), and the vertical axis is the label predicted by the classifier (probability label, such as the model predicts a high probability of bicycle, but there is also a small probability of other categories). Therefore, it depicts the correlation between the predicted values ​​and the true values ​​of all samples. The two samples here refer to the target domain data currently being trained, because the autocorrelation loss is only calculated on the target domain.

[0077] S7. For the source domain, which includes labels during training (such as pedestrian labels, vehicle labels, lane labels, traffic light labels, etc.), it benefits from self-supervised training, and the values ​​of the autocorrelation matrix are concentrated on the main diagonal, that is, the predicted labels are generally consistent with the true labels. In contrast, for the target domain, due to the lack of label supervision, the predictions generate larger values ​​on the non-main diagonal elements. Therefore, the intra-class and inter-class correlations represented in the autocorrelation matrix can construct adversarial representation results.

[0078] S8. In this embodiment, given the prediction matrix Z∈Rb×k predicted by C (classifier), which contains the predicted probabilities of k categories multiplied by b samples, the autocorrelation matrix R∈Rk×k can be obtained by R=Z T Z calculation, where the prediction matrix Z = C(x), x is a sample, which satisfies the following formula:

[0079]

[0080] S9. For the autocorrelation matrix R, the main diagonal elements represent the intra-class correlation, and the off-diagonal elements represent the inter-class correlation or confusion. For convenience, we define the overall intra-class correlation as I a (samples concentrated on the main diagonal), the overall inter-class correlation is defined as I e (Other samples concentrated on non-main diagonal lines):

[0081]

[0082] S10. For the source domain, prediction contributes to a larger Ia and smaller I e ; while for the target domain, due to lack of supervised training, the prediction usually produces a relatively small I a and larger I e . Therefore, I a - I e can be used to represent the domain difference. According to equation (1), I a and I e satisfy I a + I e = b. At the same time, I a is equal to the F-norm of the prediction matrix Z, that is, I a = ||Z|| F . Therefore, we have I a - I e = 2||Z|| F - b. Therefore, we use 2||Z|| F - b as the autocorrelation loss function L self-cor :

[0083] L self-cor = I a - I e = 2||Z|| F - b.

[0084] S11. Calculate the autocorrelation loss function L self-cor on the source domain dataset, maximize L self-cor so that the source domain samples are always distributed on the main diagonal of the autocorrelation matrix during multiple target domain incremental training, ensuring the accuracy of the feature extractor and classifier for the source domain prediction in the one-to-many domain adaptation case, ensuring that the source domain does not deviate from the label.

[0085] S12. As described above, when k>1, the total loss function optimized by the source domain S and the target domain Tk is as follows:

[0086]

[0087] The classification model in this embodiment selects the convolutional layer of Resnet-101 as the feature extractor C and the incremental module M, and the classifier C adopts three fully connected layers, the output is the probability of each class corresponding to the sample, and the maximum probability item is selected as the predicted class. Among them, the sample refers to the data of the target domain currently participating in training (the data of the first target domain participating in training at the beginning), because the source domain has labels, there is no need to predict the class.

[0088] The embodiment obtains positive samples of each domain by data augmentation on samples, other samples are negative samples, and the source domain and the target domain are pulled close by minimizing the contrast learning loss. Then, an incremental learning module is added to ensure that domain-invariant knowledge of multiple target domains is learned. Finally, the self-correlation loss obtained from the source domain ensures the accuracy of the one-to-many process classification.

[0089] The above merely describes the preferred embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning, characterized in that, The method comprises the following steps: obtaining a contrast loss of source domain data and first target domain data by using a feature extractor, and obtaining a cross-entropy loss of the source domain data by using a classifier C; obtaining a contrast loss of source domain data and first target domain data respectively comprises: setting two feature extractors; wherein the initial weights of the two feature extractors are the same, the first feature extractor is a feature extractor G for current training, and the second feature extractor is a feature extractor M for incremental learning module; randomly performing data enhancement on the source domain data and the first target domain data, inputting the enhanced data into the feature extractor G, and distributing the contrast loss of the source domain data and the first target domain data; optimizing the contrast loss and the cross-entropy loss to align the source domain data and the first target domain data; based on the feature extractor after the alignment is completed, sharing the weight parameters to obtain the trained feature extractor and the classifier C; obtaining the trained feature extractor and the classifier C comprises: (1) Random data augmentation is performed on the source domain data and the next target domain data, and the augmented data is input into the feature extractor G to obtain features and Two contrast losses and are calculated is the contrast loss of the next target domain data; (2) inputting the source domain data into the classifier C to obtain a cross-entropy loss ; (3) input the source domain data S into the feature extractor M to obtain the feature , and two features from two different source domains are aligned by the distillation loss : (4) the features into the classifier C, the autocorrelation loss is calculated by the autocorrelation matrix (5) Optimize the above five losses Align the source domain, target domain Tk, and target domain Tk+1, and ensure that the semantic information of the source domain is not lost during training; (6) saving the weight parameters of the feature extractor G after the source domain data and the next target domain data are aligned to the feature extractor M; (7) repeating (1) to (6) until the knowledge of K target domains is learned to obtain the trained feature extractor and the classifier; based on the trained feature extractor and the classifier C, constructing a classification model for single-source target domain adaptive image classification and ensuring classification performance, and classifying the target domain based on the classification model.

2. The multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning according to claim 1, characterized in that, The contrast loss and the cross-entropy loss are: wherein, is the contrastive loss of the source domain data, is the contrastive loss of the first target domain data, is the cross-entropy loss, is the total loss for optimization, including the contrastive loss of the two domains and the cross-entropy loss of the source domain, by optimizing , the feature alignment of the source domain and the current target domain is completed.

3. The multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning according to claim 1, characterized in that, sharing the weight parameters comprises: saving the weight parameters of the feature extractor G after the source domain data and the first target domain data are aligned to the feature extractor M.

4. The multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning according to claim 1, characterized in that, The distillation loss is: wherein, is a feature extracted by the feature extractor G for the source domain data, is a feature extracted by the feature extractor M for the source domain data.

5. The multi-objective domain adaptation method based on contrastive learning and autocorrelation incremental learning according to claim 1, characterized in that: The contrast loss is: wherein Lcon represents the contrast loss, and respectively represent the positive sample pairs of the source domain, and respectively represent the positive sample pairs of the target domain.

6. The multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning according to claim 1, characterized in that, In the classification model, the convolutional layer of Resnet-101 is selected as the feature extractor G and the feature extractor M, the classifier C adopts a three-layer fully connected layer, the output is the probability of each class corresponding to the first target domain data, and the maximum probability item is selected as the predicted class.

7. The multi-target domain adaptation method based on contrastive learning and self-correlation incremental learning according to claim 1, characterized in that, The horizontal axis of the autocorrelation matrix is the real label of the target domain data, and the vertical axis is the label predicted by the classifier C.

Citation Information

Patent Citations

  • Robust field adaptive image learning method based on self-training noise label correction

    CN114283287A

  • Enhancement method and system for aligning samples based on loose space structure

    CN116012592A