Incremental unsupervised domain adaptation image recognition method based on progressive calibration
By employing a progressively calibrated incremental unsupervised domain adaptation method, and utilizing pseudo-labels and various constrained loss functions, the problems of catastrophic forgetting and negative transfer in incremental unsupervised domain adaptation are solved, achieving more efficient and accurate image recognition results.
Patent Information
- Application Number
- CN202310166627.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-02-24
AI Technical Summary
Existing unsupervised domain adaptation methods are prone to catastrophic forgetting and negative transfer when learning multiple target domain categories, leading to a decline in model performance. This is especially true in class-increment unsupervised domain adaptation settings, where existing methods ignore the domain differences between the source and target domains, affecting the discriminative representation of the target domain and learning efficiency.
We employ a class-based incremental unsupervised domain adaptive method based on progressive calibration. By generating pseudo-labels, dynamic instance-level calibration, domain-level contrast alignment, instance-level contrast alignment, and knowledge replay, we design a progressive calibration method that includes class-level calibration and dynamic instance-level calibration. This method filters source domain bias, reduces domain differences, and balances the relationship between catastrophic forgetting and negative transfer by utilizing the discriminative representation of the target domain.
It effectively avoids negative transfer in the adaptive process, improves the efficiency and accuracy of the algorithm, and achieves stable performance improvement in the learning process of multiple target domain categories.
Smart Images

Figure CN116468991B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image recognition technology, specifically relating to a method for incremental unsupervised adaptive image recognition based on progressive calibration. Background Technology
[0002] Image recognition refers to the technology of using computers to process, analyze, and understand images in order to identify targets and objects of various patterns. It is a practical application of deep learning algorithms. As a method of image recognition, unsupervised domain adaptation (UDA) is a process aimed at aligning a labeled source domain with an unlabeled target domain. The key to implementing UDA is transferring knowledge from the source domain to the target domain and mitigating domain discrepancies.
[0003] Most existing methods attempt to align the source and target domains by obtaining domain-invariant representations. In the UDA settings of these existing methods, the target domain is a predefined dataset, which is learned only once to achieve domain adaptation—a difficult feat to achieve in the real world. In practice, the target domain data in UDA is similar to the source domain data, and the UDA method needs to gradually learn multiple target domain categories while retaining knowledge learned in previous stages. When new unlabeled data appears, the model first passes relevant knowledge from the source domain to help learn the target class. When the target data arrives in the next training stage, the model fine-tunes its parameters to learn the new class. However, in practice, the model often forgets the knowledge learned in previous stages when predicting previous classes, leading to performance degradation—a condition known as catastrophic forgetting.
[0004] To address this issue, existing techniques have proposed the Class-Incremental Unsupervised Domain Adaptation (CI-UDA) algorithm. The class-incremental setting is a classic continuous learning setting that requires the model to learn multiple tasks without needing consecutively overlapping classes. Similar to the class-incremental setting, the class-incremental domain adaptive setting expects the model to incrementally learn new target classes without labeled supervision. For example, ProCA proposed the CI-UDA setting, in which labeled source data is always available, and classes do not overlap at different times as unlabeled target data continuously emerges. This technique constructs a prototype repository to store class-level discriminative representations and puts the prototype back in each mini-batch to retain knowledge from previous steps. The structure of the method can be derived from... Figure 1 This means that the labeled source data is always available, the unlabeled target data keeps appearing, and the classes at different times do not overlap.
[0005] However, the above methods ignore the domain differences between the source and target domains, introducing a lot of biased source information and affecting the utilization of discriminative representations of the target domain. Furthermore, although rich knowledge about the source domain and previous steps is transferred to the current step, effectively mitigating catastrophic forgetting, the learning of the current target class is still severely affected, i.e., negative transfer is prone to occur, thus impacting the algorithm's efficiency and accuracy. Summary of the Invention
[0006] To address the aforementioned problems in the existing technology, this invention provides a quasi-incremental unsupervised domain adaptive image recognition method based on progressive calibration. The technical problem to be solved by this invention is achieved through the following technical solution:
[0007] An incremental unsupervised domain adaptive image recognition method based on progressive calibration includes:
[0008] Step 1: Obtain the unlabeled target dataset and the labeled source dataset as training samples;
[0009] Step 2: Use the source domain pre-trained model to predict the target dataset to generate target classes, and generate pseudo-labels for each target sample in the target dataset. Store the generated target classes and pseudo-labels in the memory library.
[0010] Step 3: Based on the pseudo-labels, the target dataset is divided into samples with high confidence and samples with low confidence, and the target model is trained in conjunction with the source dataset; and multiple constraint losses are applied during the training process to supervise the training process, while target class-level calibration and target-level calibration are performed during the training process; wherein, the multiple constraint losses include dynamic instance-level calibration, domain-level contrast alignment, instance-level contrast alignment, and knowledge replay;
[0011] Step 4: Repeat the operation of Step 3, and after each iteration of training, add the new target category prototype to the memory bank for data update, until the loss function converges and the trained target model is obtained.
[0012] Step 5: Use the trained target model to process the image to be recognized to obtain the final recognition result.
[0013] The beneficial effects of this invention are:
[0014] The incremental unsupervised domain adaptive image recognition method based on progressive calibration provided by this invention designs a progressive calibration method including class-level calibration and dynamic instance-level calibration. This filters out biased knowledge from the source domain at the class and instance levels, avoiding negative transfer during the adaptation process. On the other hand, it constructs a contrastive alignment loss to obtain domain-invariant feature representations and utilizes discriminative representations of the target domain, reducing domain differences. This method makes reasonable use of knowledge from the source domain, balancing and mitigating the relationship between negative transfer and catastrophic forgetting, ultimately improving both algorithm efficiency and accuracy.
[0015] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the structure of an existing incremental unsupervised domain adaptive algorithm;
[0017] Figure 2 This is a flowchart illustrating the incremental unsupervised domain adaptive image recognition method based on progressive calibration provided in this embodiment of the invention.
[0018] Figure 3 This is a framework diagram of the PCCA algorithm provided in an embodiment of the present invention;
[0019] Figure 4 This is a schematic diagram of domain-level comparison and alignment provided in an embodiment of the present invention. Detailed Implementation
[0020] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.
[0021] Example 1
[0022] Please see Figure 2 , Figure 2 This is a flowchart illustrating the incremental unsupervised domain adaptive image recognition method based on progressive calibration provided in this embodiment of the invention, which includes:
[0023] Step 1: Obtain the unlabeled target dataset and the labeled source dataset as training samples.
[0024] In this embodiment, the definition is as follows: The dataset serves as the source domain, where n s C represents the number of images in the source domain. s The class representing the source domain, x si and y si Let represent the source domain image and label, respectively. Furthermore, the target domain dataset is represented as follows: No comment label, where n t Indicates the number of images in the target domain. Ct This represents the class in the target domain.
[0025] Unsupervised domain adaptation (UDA) requires a feature extractor G. s and classifier F s In the source domain D s Pre-training in the target domain D t Fine-tuning can be performed without marking.
[0026] The key to solving UDA lies in the source domain D. s and target domain D t Alignment features are used to represent the target domain. However, in the real world, it is impossible to collect the entire target domain simultaneously, and the number of classes in the target domain may continue to increase. To meet this need, ProCA proposes Incremental Class Unsupervised Domain Adaptation (CI-UDA). In the CI-UDA setting, the source domain dataset D... s and pre-trained model {G s F s Available at all learning stages, unlabeled target samples are only available in the current training step. (The last part, "D," appears to be an unrelated fragment and is left untranslated.) t Let C be the target domain dataset in the current training step. t It is C s A subset of the target domain dataset. Finally, the target classifier is evaluated on all target domain datasets.
[0027] To make more rational use of content from the source domain and to balance the relationship between mitigating negative transfer and catastrophic forgetting, this embodiment proposes a novel incremental unsupervised domain adaptation method called Progressive Calibration Continual Adaptation (PCCA). Please refer to [link to PCCA implementation details]. Figure 3 , Figure 3 This is a framework diagram of the PCCA algorithm provided in an embodiment of the present invention. The method uses contrast alignment at the class and instance levels to reduce domain variability and leverage discriminative target representations. Furthermore, it constructs progressive calibration to filter debiased information from the source domain, mitigating negative propagation.
[0028] Step 2: Use the source domain pre-trained model to predict the target dataset to generate target classes, and generate pseudo-labels for each target sample in the target dataset. Store the generated target classes and pseudo-labels in the memory library.
[0029] 21) Use the pre-trained model in the source domain to predict the target dataset, accumulate the predictions of all target samples, and normalize the accumulated probabilities.
[0030] Specifically, due to D tThe labels are unknown in the current training step, so detecting the target class set is an important start, which is the basis for subsequent training.
[0031] First, according to ProCA, this embodiment utilizes a pre-trained model {G} in the source domain. s ,F s This is used to predict the target dataset and accumulate the predictions for all target samples, taking into account the number and value of the target samples. The probability accumulation can be written as:
[0032]
[0033] Among them, C k This represents the output prediction for class k, n t It is defined as the number of target images in the current learning step.
[0034] Then, μ is expressed by the following formula. k Normalized to [0, 1];
[0035]
[0036] Where μ = [μ1, μ2, ... μ] k ] is the set of all K classes, representing the confidence level of different classes.
[0037] 22) Select a class based on the normalized probability accumulation with a preset threshold and store it in the memory library.
[0038] In this embodiment, a class can be selected by setting a threshold α. If μ k >ɑ, then class k is considered the target class in the current training step, μ k Stored in memory In this context, this refers to class k and μ. k The dictionary.
[0039] Specifically, if the threshold α is chosen to be a large value, many potential classes may be filtered out before training; if the threshold α is chosen to be a small value, many incorrect classes will be selected, resulting in a large number of mislabeled classes. Therefore, this embodiment calibrates the target curriculum progressively during training. This embodiment sets the threshold α to a small value to ensure that potential classes can be selected at the beginning; in all experiments, this value is set to 0.1. Then, this method uses the target model {Gt, Ft} to accumulate predictions of the target image and selects the target class using the same threshold, filtering out incorrect classes with the help of current target information.
[0040] 23) Calculate the class-level feature centroid of each class based on the selected target class, and its expression is:
[0041]
[0042] Among them, g j =G s (x j The features are extracted by the pre-trained model Gs. It is the predicted probability of class k.
[0043] 24) Based on the class-level feature centroids, the pseudo-labels for each target sample are obtained using the nearest centroid method, which can be expressed as:
[0044]
[0045] Where cos(·,·) represents the cosine similarity measure, y j This is the image x j Generated pseudo-tags.
[0046] Furthermore, based on class-level calibration, the generated pseudo-labels can be further calibrated. After the target model is warmed up, the class centroid of each calibrated target class k is calculated using the target model, and more accurate pseudo-labels are generated in each epoch using the nearest centroid method.
[0047] Step 3: Based on the pseudo-labels, divide the target dataset into samples with high confidence and samples with low confidence, and train the target model together with the source dataset; and apply multiple constraint losses during the training process to supervise the training process, while performing target class-level calibration and target-level calibration during the training process.
[0048] In this embodiment, the image is first divided into confidence samples with pseudo-labels using the probability of the image. Or unconstrained samples with a confidence threshold β Furthermore, the division of these samples is dynamic. Among them, confidence samples are also called high-confidence samples, and unconstrained samples are also called low-confidence samples.
[0049] Then, the target model is iteratively trained using the source dataset, while the database is continuously updated during the iterative training process.
[0050] During training, this embodiment employs four constraint losses to supervise the training process: dynamic instance-level calibration, domain-level contrast alignment, instance-level contrast alignment, and knowledge replay. These four losses are described in detail below.
[0051] 1. Dynamic instance-level calibration
[0052] Based on confident pseudo-labeled target samples and labeled source data, a dynamic instance-level calibration loss function is constructed to train the target model {G}. t ,F t}; whereby the loss function of the dynamic instance-level calibration is expressed as:
[0053]
[0054] Among them, L ce (x,y) represents the standard cross-entropy loss, and its expression is:
[0055]
[0056] Among them, L class In the middle, x s For the source domain image, y s For source domain tags, As a confidence sample, For the corresponding pseudo-tag, L ce middle, y e,c For the sign function, F t G t Let M be the target model, M be the number of categories, and N be the number of categories involved in the calculation.
[0057] 2. Domain-level contrast alignment
[0058] A domain-level contrastive alignment loss function is constructed based on dynamic class-level logit centroids to align the feature representations of the source and target domains. Please refer to [link / reference]. Figure 4 , Figure 4 This is a schematic diagram of domain-level comparison and alignment provided in an embodiment of the present invention.
[0059] First, calculate the class-level logit centroid of the source domain, which can be written as:
[0060]
[0061] Where B represents the batch size, if True otherwise,
[0062] Then, a repository is constructed to store the dynamic class-level logit centroids of the source domain, represented as follows: After learning each mini-batch, these dynamic class-level logit centroids are updated using an exponential moving average, represented as:
[0063]
[0064] Where δ is the momentum parameter, which can be set to 0.99 in this embodiment, and and It is the value of the dynamic class-level logit centroid of class k in the current mini-batch and the previous mini-batch.
[0065] Similar to the source domain, this embodiment also calculates the class-level logit centroid of confidence samples in each mini-batch. Then, a contrastive learning module is designed to maximize the similarity of class-level feature representations between the source and target domains, where and The centroids of the positive classes are considered positive, while the centroids of other classes are considered negative.
[0066] The domain-level contrastive alignment loss function is expressed as:
[0067]
[0068] in, This represents the cosine similarity index, where Γ is the temperature hyperparameter, set to 5. and These represent the class-level logit centroid of the source domain and the class-level logit centroid of the confidence samples in each mini-batch, respectively.
[0069] 3. Instance-level contrast alignment
[0070] Enhanced samples are generated based on the enhancement function, and an instance-level contrastive alignment loss function is constructed accordingly to transform more unconstrained target samples into confident target samples. Specifically:
[0071] First, a strong augmentation function is constructed to generate augmented samples.
[0072] Then, the sample and enhanced samples They need to be close to each other in the latent space, and other samples in the same mini-batch need to be pushed away. and The logical representation is as follows and Instance-level contrastive alignment ensures consistency of classes within the latent space and helps transform more unconstrained target samples into confident target samples. The instance-level contrastive alignment loss function can be written as:
[0073]
[0074] The formula for h(u, v) is the same as the expression in the domain-level contrast alignment loss function. and This represents the sample and the corresponding augmented sample after being augmented by a strong augmentation function. and They are respectively and The logical representation of .
[0075] 4. Knowledge Review
[0076] As the target model learns more steps, it faces a catastrophic forgetting problem, causing it to lose knowledge from previous steps. This embodiment constructs a knowledge replay loss function based on the nearest neighbor method to transform more unconstrained target samples into confident target samples.
[0077] First, based on the selected target class, a memory is maintained to record the discriminative features of each class, helping the model remember knowledge from the source domain and previous training steps. This embodiment generates the discriminative features of class k using the nearest neighbor method, which can be represented as:
[0078]
[0079] Where m is the iterative exponent range from 1 to m. Furthermore, when the cumulative probability μ... k During training, the model updates the discriminative features stored in the memory bank.
[0080] Then, based on the discriminative features of the stored target domain, knowledge distillation is used to preserve knowledge from previous steps, and the knowledge replay loss function is expressed as:
[0081]
[0082] Where N represents the number of stored discriminative features for each category.
[0083] Therefore, the objective function for model training in this embodiment can be expressed as:
[0084] L = L class +L IDC +L IC +L dis .
[0085] Furthermore, target-level calibration and target-level calibration are also required during the training process.
[0086] Among these, target class-level calibration during training includes:
[0087] Based on the probability accumulation detected in the current training step, class-level calibration is performed on the probability accumulation in the memory library to update the target class in the memory library, thereby achieving class-level calibration.
[0088] Due to the domain differences between the source and target domains, based on {G s ,F s Target label detection can introduce a great deal of information from the source domain, guiding model learning in a biased way. Therefore, this invention designs a progressive calibration to filter out white source knowledge, avoiding negative transfer during the adaptive process.
[0089] Specifically, since the correct target class set is unknown, a class may be detected in many training steps, potentially introducing incorrect source domain class-related knowledge and leading to negative transfer. To address this, if k classes are selected in two training steps, the classes detected in the current training step... With Dict Compare. If In the current training step, remove class k from the selected target class; otherwise, if We will learn class k again, and will Replace with μ k .
[0090] Target-level calibration during training includes:
[0091] The class centroid of each calibration target class is calculated using the target model, and more accurate pseudo-labels are generated in each epoch using the nearest centroid method to calibrate the pseudo-labels of the target dataset, thereby achieving target-level calibration.
[0092] Step 4: Repeat the operation in Step 3, and after each iteration of training, add the new target category prototype to the memory bank for data update, until the loss function converges and the trained target model is obtained.
[0093] Step 5: Use the trained target model to process the image to be recognized to obtain the final recognition result.
[0094] The incremental unsupervised domain adaptive image recognition method based on progressive calibration provided by this invention designs a progressive calibration method including class-level calibration and dynamic instance-level calibration. This filters out biased knowledge from the source domain at the class and instance levels, avoiding negative transfer during the adaptation process. On the other hand, it constructs a contrastive alignment loss to obtain domain-invariant feature representations and utilizes discriminative representations of the target domain, reducing domain differences. This method makes reasonable use of knowledge from the source domain, balancing and mitigating the relationship between negative transfer and catastrophic forgetting, ultimately improving both algorithm efficiency and accuracy.
[0095] Example 2
[0096] The present invention will be compared with existing algorithms through simulation experiments to verify the beneficial effects of the present invention.
[0097] Specifically, the PCCA algorithm of this invention was tested against several existing domain adaptation methods on the Office-Home-CI dataset and the Office-31-CI dataset, respectively, and the final accuracy metrics were compared. The results are shown in Table 1 and Table 2, respectively.
[0098] Table 1. Final accuracy (%) of the Office-Home-CI dataset
[0099]
[0100]
[0101] Table 2. Final accuracy (%) of the Office-31-CI dataset
[0102] Method DA CI A→D A→W D→A D→W W→A W→D Avg. ResNet-50 x x 74.1 74.4 58.5 96.9 61.2 99.6 77.5 DANN √ x 74.9 72.5 55.7 96.6 51.4 97.7 74.8 PADA √ x 56.9 61.5 12.5 82.4 46.7 84.3 57.4 ENT √ x 21.3 82.2 61.7 94.3 64.1 100.0 70.6 <![CDATA[BA 3 US]]> √ x 74.1 73.3 63.3 94.8 64.0 100.0 78.3 CIDA √ √ 70.4 64.5 48.1 95.1 52.7 98.8 71.6 ProCA √ √ 81.8 82.5 65.2 99.1 64.1 99.6 82.1 PCCA √ √ 90.1 86.2 72.4 98.4 73.9 99.0 86.7
[0103] Existing algorithms include ResNet-50, DANN, PADA, ENT, and BA. 3 US, CIDA, and ProCA. DA and CI represent domain adaptation and class incremental learning, respectively.
[0104] As shown in Tables 1 and 2, some existing domain adaptation methods, such as DANN, PADA, and ENT, achieve worse results than ResNet-50 pre-trained in the source domain, indicating that knowledge transfer from the source domain alone cannot effectively handle class-incremental unsupervised domain adaptation. Compared to these methods, the PCCA of this invention achieves best performance across different domain adaptations on the Office-Home-CI dataset. On the Office-31-CI dataset, PCCA achieves best performance in most transfer tasks, while its performance slightly decreases in the two domain adaptation tasks. This experiment also calculated the average final accuracy for both datasets; PCCA improved the accuracy by 5.8% and 4.6% for the Office-Home-CI and Office-31-CI datasets, respectively.
[0105] Furthermore, the experiments observed above showed that PCCA achieved more significant improvements in complex transfer tasks than in simple transfer tasks, demonstrating that the PCCA algorithm has a stronger ability to transfer knowledge between domains and mitigate catastrophic forgetting.
[0106] To further evaluate performance, this embodiment also uses step-level accuracy to evaluate these domain adaptation methods, and the results are shown in Table 3.
[0107] Table 3. Stage Accuracy (%) of Office-31-CI and Office-Home-CI
[0108]
[0109] In the first step (which can be seen as traditional partial domain adaptation), some traditional domain adaptation methods achieved better performance, such as ENT and BA. 3US. As the model learns more steps, these methods perform worse than before, demonstrating that existing methods with incremental learning capabilities suffer severely from catastrophic forgetting. PCCA achieves the best performance across all steps without a first step, proving that PCCA can simultaneously address both domain gaps and catastrophic forgetting in CI-UDA.
[0110] The method of this invention also reports the final S-1 accuracy S1 and the final stage accuracy S on Office-31-CI in Table 4. f The result of harmonic accuracy H.
[0111] Table 4. Final S-1 accuracy S1, final stage accuracy Sf, and harmonic accuracy H (%) on Office-31-CI
[0112]
[0113]
[0114] It can be seen that ProCA and BA 3 US achieved best performance on the S1 metric, demonstrating the impressive ability of these methods to mitigate catastrophic forgetting. However, their performance on the metric was unsatisfactory, indicating poor domain adaptation, which demonstrates the negative shift phenomenon in the CI-UDA process. PCCA in S f The best performance was achieved in the H metric, with improvements of 9.2% and 4.0%, respectively. The performance of the S1 metric decreased by 3.6%, demonstrating that PCCA effectively balances the ability to mitigate catastrophic forgetting and domain adaptation.
[0115] The method of this invention reports the detected classes and stage precisions D→A and W→A in Table 5, where the target class is difficult to detect correctly. In the table, bold text represents correctly detected classes, and underlined data represents incorrectly detected classes.
[0116] Table 5. Shared class indexes and stage precision of ProCA and PCCA on the Office-31-CI dataset.
[0117]
[0118]
[0119] As can be seen, PCCA detected almost all target classes in these steps with very few errors, while ProCA typically missed target classes and detected more incorrectly. This demonstrates that class-level calibration can filter out biased information from the source domain. Furthermore, thanks to the correct target classes, PCCA achieved better performance in all steps.
[0120] Table 6 shows the PCCA results for different modules on the Office-31-CI dataset.
[0121] Table 6. Final accuracy (%) of different modules on the Office-31-CI dataset. CC, IC, and CA represent class calibration, instance calibration, and contrast alignment, respectively.
[0122] CC CI CA A→D A→W D→A D→W W→A W→D Avg. x x x 76.5 73.2 65.5 95.4 67.7 98.1 79.4 √ x x 83.7 80.4 67.2 97.2 71.9 98.8 83.2 x √ x 79.8 75.5 65.6 96.0 67.9 98.1 80.5 x x √ 79.6 76.9 67.7 96.3 69.4 98.6 81.4 √ √ x 87.7 81.7 67.9 96.9 72.0 98.6 84.1 √ x √ 87.2 81.2 67.9 96.0 70.6 99.2 83.7 x √ √ 86.6 82.1 67.7 96.6 71.2 98.8 83.8 √ √ √ 90.1 86.2 72.4 98.4 73.9 99.0 86.7
[0123] As shown in Table 6, CC, IC, and CA can each improve performance based on the base model. Performance can be further improved when the modules are combined and applied to the base model. PCCA achieves the best performance when all three modules are applied to the base model. IC makes some improvements based on the base model and achieves significant improvements when combined with CC and CA, demonstrating that IC requires identification guidance to assist in calibration.
[0124] Table 7 shows the PCCA results for different losses on the Office31 CI dataset.
[0125] Table 7. Final accuracy (%) for different losses on the Office-31-CI dataset
[0126] <![CDATA[L IDC ]]> <![CDATA[L IC ]]> <![CDATA[L dis ]]> A→D A→W D→A D→W W→A W→D Avg. x x x 88.5 79.8 67.9 96.9 68.6 99.6 83.6 √ x x 88.7 82.1 65.0 97.8 69.7 99.6 83.8 x √ x 89.7 82.9 62.3 97.5 68.7 99.4 83.4 x x √ 87.7 81.7 67.9 96.9 72.0 98.6 84.1 √ √ x 87.0 82.7 69.3 97.3 68.2 98.6 84.0 √ x √ 89.9 83.6 72.4 96.0 72.9 99.2 85.7 x √ √ 89.3 82.9 71.7 97.3 73.3 99.1 85.6 √ √ √ 90.1 86.2 72.4 98.4 73.9 99.0 86.7
[0127] Clearly, it can be observed that both LIDC and Ldis contribute to better performance of this method, with the method using LIC showing almost no performance degradation. When LIC is combined with either LIDC or Ldis, the method further improves performance, demonstrating that class-level feature representations can guide instance contrastive alignment to reduce the discrepancy between unconstrained and confident target samples. PCCA achieves optimal performance when all three losses are combined.
[0128] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A method for incremental unsupervised adaptive image recognition based on progressive calibration, characterized in that, include: Step 1: Obtain the unlabeled target dataset and the labeled source dataset as training samples; Step 2: Use the source domain pre-trained model to predict the target dataset to generate target classes, and generate pseudo-labels for each target sample in the target dataset. Store the generated target classes and pseudo-labels in the memory library. Step 3: Based on the pseudo-labels, divide the target dataset into samples with high confidence and samples with low confidence, and train the target model using the source dataset; Furthermore, multiple constraint losses are applied during training to supervise the training process, and target class-level calibration and target-level calibration are performed during training. The target class-level calibration is based on the probability accumulation detected in the current training step, which is used to perform class-level calibration on the probability accumulation in the memory bank to update the target classes in the memory bank. The target-level calibration uses the target model to calculate the class centroid of each calibrated target class and uses the nearest centroid method to generate more accurate pseudo-labels in each epoch to calibrate the pseudo-labels of the target dataset. The various constraint losses include dynamic instance-level calibration, domain-level contrast alignment, instance-level contrast alignment, and knowledge replay. Specifically, it includes: constructing a dynamic instance-level calibration loss function to train the target model based on pseudo-labeled target samples with high confidence and labeled source datasets; constructing a domain-level contrast alignment loss function based on dynamic class-level logit centroids to align the feature representations of the source and target domains; generating enhanced samples based on the enhancement function and constructing an instance-level contrast alignment loss function accordingly to convert more unconstrained target samples into confident target samples; and constructing a knowledge replay loss function based on the nearest neighbor method to convert more unconstrained target samples into confident target samples. Step 4: Repeat the operation of Step 3, and after each iteration of training, add the new target category prototype to the memory bank for data update, until the loss function converges and the trained target model is obtained. Step 5: Use the trained target model to process the image to be recognized to obtain the final recognition result.
2. The incremental unsupervised adaptive image recognition method based on progressive calibration according to claim 1, characterized in that, Step 2 includes: 21) Predict the target dataset using a pre-trained model in the source domain, accumulate the predictions of all target samples, and normalize the accumulated probabilities. 22) Select a target class based on the normalized cumulative probability with a preset threshold, and store it in a memory library; 23) Calculate the centroid of the class-level features for each class based on the selected target class; 24) Based on the class-level feature centroid, obtain the pseudo-label of each target sample using the nearest centroid method.
3. The incremental unsupervised adaptive image recognition method based on progressive calibration according to claim 1, characterized in that, The loss function for the dynamic instance-level calibration is expressed as: in, The standard cross-entropy loss is expressed as follows: in, For the source domain image, For source domain tags, As a confidence sample, For the corresponding pseudo-tags, For symbolic functions, , For the target model, M For the number of categories, N The number of items involved in the calculation.
4. The incremental unsupervised adaptive image recognition method based on progressive calibration according to claim 1, characterized in that, The domain-level contrastive alignment loss function is expressed as follows: in, q Cosine similarity index h () represents a function. It's a temperature over-parameter. and These represent the class-level logit centroid of the source domain and the class-level logit centroid of the confidence samples in each mini-batch, respectively.
5. The incremental unsupervised adaptive image recognition method based on progressive calibration according to claim 4, characterized in that, The instance-level contrastive alignment loss function is expressed as follows: in, and This represents the sample and the corresponding augmented sample after being augmented by a strong augmentation function. h () represents a function. and They are respectively and The logical representation of .
6. The incremental unsupervised adaptive image recognition method based on progressive calibration according to claim 1, characterized in that, The knowledge replay loss function is expressed as follows: in, N This represents the number of discriminative features stored for each category. For predicted soft labels, For image prototype, , This represents the trained model.
Citation Information
Patent Citations
Online label updating method, system and device and storage medium
CN114692732A
Image classification method and system based on label noise domain self-adaption
CN114842267A