Sample screening fine-grained domain adaptation method and system based on minimum migration distance

CN118447343BActive Publication Date: 2026-10-09NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410477283.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2026-10-09
Estimated Expiration
2044-04-19

AI Technical Summary

Technical Problem

早期的域适应研究直接进行源域和目标域的全局对齐,容易造成不相关子域之间的分布混淆

Benefits of technology

[0020] Compared with existing technologies, the present invention has the following main advantages: The present invention includes source domain sample screening based on the minimum migration distance between the source domain samples and the target domain distribution; calculating the credibility of the pseudo-label corresponding to each target domain sample based on the screened source domain samples; obtaining a target domain sample set with reliable pseudo-labels by screening the target domain samples; calculating the local domain alignment loss based on the screened source domain and target domain; forming the final loss function with the cross-entropy classification loss of all source domain samples; updating the model weights using the gradient descent method; avoiding negative migration problems in the domain adaptation process by screening source domain samples; obtaining a target domain sample set with reliable pseudo-labels by screening target domain samples; thereby achieving efficient and accurate fine-grained alignment between the source domain and the target domain, effectively avoiding negative migration, ensuring efficient and accurate domain adaptation process, and thus improving the classification performance of the classification model in the target domain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447343B_ABST
    Figure CN118447343B_ABST
Patent Text Reader

Abstract

The application discloses a sample screening fine-grained domain adaptation method and system based on minimum migration distance, the method comprises the following steps: screening source domain samples based on minimum migration distance; calculating the credibility of the pseudo label corresponding to each sample in the target domain based on the screened source domain, and obtaining a target sample set with reliable pseudo labels; calculating a local domain alignment loss by using the screened source domain and the target domain, and combining the cross-entropy classification loss of all source domain samples to form a final loss function; and updating the model weight by using the gradient descent method until a preset iteration number is reached. The application can effectively avoid the negative migration problem in the domain adaptation process, and screen a target sample set with reliable pseudo labels, so that the fine-grained alignment between the source domain and the target domain is realized, and then a classification model with good generalization ability on the target domain is obtained, and the classification precision on the target domain is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image classification and recognition technology, specifically to a fine-grained domain adaptation method and system for sample screening based on minimum migration distance. Background Technology

[0002] With the development of computer science and hardware technology, deep learning has demonstrated its vigorous vitality in various fields. Deep neural networks, as the foundational model of deep learning, possess powerful autonomous feature learning capabilities and can be used to complete complex machine learning problems such as classification and regression, showing broad application prospects in fields such as machine vision and natural language processing. For example, deep neural networks can combine low-dimensional features to form abstract high-dimensional features based on neuroimaging data to achieve object classification. As a data-driven method, the performance of deep neural networks depends on large-scale training samples. Due to the high time and financial costs, it is usually difficult to obtain large amounts of labeled training data from a single site. The distribution differences between data from different sites make it difficult to directly utilize multi-site data for model training. Taking brain imaging data as an example, the acquisition of brain imaging data requires high costs, and its labeling requires the participation of professionals, resulting in a limited sample size at a single site. Furthermore, due to differences in acquisition instruments and related parameters, there are inherent differences between brain imaging data from different sites, making direct utilization difficult.

[0003] Domain adaptation techniques can address the aforementioned problems. Domain adaptation achieves knowledge transfer from the source domain to the target domain by eliminating the feature distribution differences between the training set (source domain) and the test set (target domain). Domain adaptation relies on the similarity between the source and target domains. Using source domain samples with low similarity to the target domain for knowledge transfer can negatively impact task performance in the target domain, i.e., negative transfer. Therefore, sample selection or reweighting is necessary. Early domain adaptation research directly performed global alignment between the source and target domains, which easily led to distribution confusion between irrelevant subdomains. Recent research focuses on fine-grained alignment between subdomains of the same category, which requires the target domain to have reliable pseudo-labels. Incorrect pseudo-labels can mislead the domain adaptation process. Therefore, there is an urgent need for a fine-grained domain adaptation algorithm that can remove irrelevant samples from the source domain and construct a target domain sample set with reliable pseudo-labels to improve the classification performance of classification models in the target domain. Summary of the Invention

[0004] The technical problem to be solved by this invention is to provide a fine-grained domain adaptation method and system based on minimum migration distance sample screening, which addresses the above-mentioned problems in the prior art. This invention aims to avoid the negative migration problem in the domain adaptation process by screening source domain samples and to obtain a target domain sample set with reliable pseudo-labels by screening target domain samples, thereby achieving efficient and accurate fine-grained alignment between the source domain and the target domain, so as to improve the classification performance of image classification models in the target domain.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A fine-grained domain adaptation method for sample screening based on minimum migration distance includes the following steps: S101, Establish an image classification model with shared network parameters for the source domain and the target domain. The image classification model includes a feature extractor and a classifier. The feature extractor is used to extract features from the input image, and the classifier is used to complete the target classification task. S102, source domain samples are filtered based on the minimum migration distance between the source domain samples and the target domain distribution. The credibility of the pseudo-label corresponding to each target domain sample is calculated based on the filtered source domain samples, and the target domain samples are filtered to obtain a target sample set with reliable pseudo-labels. S103: Calculate the local domain alignment loss of the source and target domains based on the filtered source and target domains, calculate the cross-entropy classification loss using all source domain samples, construct the final loss function based on the domain alignment loss and classification loss, and update the network parameters of the feature extractor and classifier in the image classification model using the gradient descent method. S104, determine whether training needs to continue. If training needs to continue, jump to step S102; otherwise, obtain an image classification model suitable for the target domain.

[0006] Optionally, step S102, which involves filtering source domain samples based on the minimum migration distance between the source domain samples and the target domain distribution, includes: calculating the minimum migration distance from each source domain sample to the target domain distribution, removing a preset proportion of source domain samples with larger minimum migration distances, and obtaining the filtered source domain samples. The function expression for calculating the minimum migration distance from each source domain sample to the target domain distribution is as follows: , In the above formula, For source domain samples The minimum migration distance to the target domain distribution. The characteristic matrix of the target domain distribution. The optimal combination coefficients are: , In the above formula, For linear combination coefficients, The number of samples in the target domain. The dimension is .

[0007] Optionally, step S102, which calculates the credibility of the pseudo-label corresponding to each target domain sample based on the filtered source domain samples, includes: S201, Calculate the sample category prototype in the filtered source domain based on the filtered source domain samples:

[0008] In the above formula, For the filtered source domain, the category is The prototype of the sample category, For the filtered source domain samples, the category is The number of samples, The feature extractor is based on network parameters. right Extracted features For the filtered source domain samples, the category is The sample set, For the i-th sample in the source domain, Let be the label of the i-th sample in the source domain; S202, based on the following formula, uses a classifier to classify samples from each target domain. Generate pseudo tags : , In the above formula, For the network parameters of the classifier, The feature extractor is based on network parameters. For target domain samples Extracted features The classifier is based on network parameters. Features The classification results were obtained; and the distance between each target domain sample and its pseudo-label corresponding source domain category prototype was calculated. To measure the credibility of pseudo-labels for samples in this target domain:

[0009] In the above formula, Let be the cosine distance between two vectors. For the categories in the filtered source domain The corresponding sample category prototype.

[0010] Optionally, in step S102, selecting target domain samples to obtain a target sample set with reliable pseudo-labels means using a preset proportion of target domain samples with higher credibility of pseudo-labels as the selected target domain sample set with reliable pseudo-labels. .

[0011] Optionally, the calculation function expression for the local domain alignment loss of the source and target domains in step S103 is:

[0012] In the above formula, The local domain alignment loss between the source and target domains is denoted as . The Local Maximum Mean Difference (LMMD) between two distinct distributions. and These represent the feature distributions extracted from the source domain samples and target domain samples by the feature extractor, respectively.

[0013] Optionally, the calculation function expression for the cross-entropy classification loss of all source domain samples in step S103 is:

[0014] In the above formula, The cross-entropy classification loss is the sum of the cross-entropy values ​​for all source domain samples. Let cross-entropy be the loss function. The feature extractor is based on network parameters. For source domain samples Extracted features The classifier is based on network parameters. Features The classification results obtained; A temperature factor with a value greater than 1, used to slow down the convergence speed of the classification loss. This represents the softmax activation function. and These are the features and labels of all source domain samples, respectively.

[0015] Optionally, the final loss function constructed in step S103 based on local domain alignment loss and cross-entropy classification loss has the following functional expression:

[0016] In the above formula, For the final loss function, For weight parameters, The cross-entropy classification loss is the sum of the cross-entropy values ​​for all source domain samples. This represents the local domain alignment loss between the source and target domains.

[0017] Furthermore, the present invention also provides a fine-grained domain adaptation system for sample screening based on minimum migration distance, comprising a microprocessor and a memory interconnected thereto, wherein the microprocessor is programmed or configured to execute the fine-grained domain adaptation method for sample screening based on minimum migration distance.

[0018] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program that is programmed or configured by a microprocessor to perform the sample screening fine-grained domain adaptation method based on minimum migration distance.

[0019] Furthermore, the present invention also provides a computer program product, including a computer program / instructions programmed or configured to execute the sample screening fine-grained domain adaptation method based on minimum migration distance via a processor.

[0020] Compared with existing technologies, the present invention has the following main advantages: The present invention includes source domain sample screening based on the minimum migration distance between the source domain samples and the target domain distribution; calculating the credibility of the pseudo-label corresponding to each target domain sample based on the screened source domain samples; obtaining a target domain sample set with reliable pseudo-labels by screening the target domain samples; calculating the local domain alignment loss based on the screened source domain and target domain; forming the final loss function with the cross-entropy classification loss of all source domain samples; updating the model weights using the gradient descent method; avoiding negative migration problems in the domain adaptation process by screening source domain samples; obtaining a target domain sample set with reliable pseudo-labels by screening target domain samples; thereby achieving efficient and accurate fine-grained alignment between the source domain and the target domain, effectively avoiding negative migration, ensuring efficient and accurate domain adaptation process, and thus improving the classification performance of the classification model in the target domain. Attached Figure Description

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

[0022] Figure 2 This is a schematic diagram illustrating the principle of the method in an embodiment of the present invention.

[0023] Figure 3 This is a schematic diagram illustrating the principle of the feature extraction process in an embodiment of the present invention.

[0024] Figure 4 These are the experimental results of an embodiment of the present invention. Detailed Implementation

[0025] The following section will use image classification of functional magnetic resonance imaging as an example to further explain the fine-grained domain adaptation method for sample screening based on minimum migration distance of the present invention.

[0026] like Figure 1 and Figure 2 As shown, the fine-grained domain adaptation method for sample screening based on minimum migration distance in this embodiment includes the following steps: S101, Establish an image classification model with shared network parameters for the source domain and the target domain. The image classification model includes a feature extractor and a classifier. The feature extractor is used to extract features from the input image, and the classifier is used to complete the target classification task. S102, source domain samples are filtered based on the minimum migration distance between the source domain samples and the target domain distribution. The credibility of the pseudo-label corresponding to each target domain sample is calculated based on the filtered source domain samples, and the target domain samples are filtered to obtain a target sample set with reliable pseudo-labels. S103: Calculate the local domain alignment loss of the source and target domains based on the filtered source and target domains, calculate the cross-entropy classification loss using all source domain samples, construct the final loss function based on the domain alignment loss and classification loss, and update the network parameters of the feature extractor and classifier in the image classification model using the gradient descent method. S104, determine whether training needs to continue. If training needs to continue, jump to step S102; otherwise, obtain an image classification model suitable for the target domain.

[0027] In this embodiment, the source domain refers to the training dataset, and the target domain refers to the test dataset. Specifically, in this embodiment, four-dimensional functional magnetic resonance imaging (fMRI) images and their labels of the subjects are obtained from the medical institutions corresponding to the source domain, and four-dimensional fMRI images of the subjects are obtained from the medical institutions corresponding to the target domain. Data for the corresponding sites can be obtained through preprocessing. Both the source and target domains are medical institutions with the appropriate qualifications, permissions, and ethical standards, and all subjects in the source domain are labeled by experienced psychiatrists. FMRI data of the subjects' brains are obtained from the source or target domains, either through on-site instrument acquisition or by inputting pre-acquired fMRI data as needed. When acquiring the subjects' fMRI data, an MRI scanner is used, and the scanning parameters are set according to the reasonable needs of each site. See [link to documentation]. Figure 2 As shown, in step S101, when establishing a shared image classification model consisting of a feature extractor and a classifier for the source and target domains, the feature extractor is denoted as F, and the classifier is denoted as C, as follows: Figure 2 As shown in the diagram, S1 represents the source domain sample selection process, S2 represents the target domain sample selection process, S3 represents the fine-grained domain alignment process, a represents samples of category 1, b represents samples of category 2, c represents source domain samples that are far from the target domain distribution, and d represents target domain samples with low pseudo-label credibility.

[0028] It should be noted that different image classifications can have different inputs and feature extraction methods for feature extractors. For example, for the image classification of functional magnetic resonance imaging (fMRI) images in this embodiment, the input of the feature extractor is a one-dimensional functional connectivity vector obtained from the subject's fMRI. When using the CC200 brain atlas for brain region segmentation, the size of the resulting functional connectivity vector is 1×19900. This embodiment also includes a preprocessing process for the fMRI data before calculating the functional connectivity vector. Preprocessing is performed using SPM8 software. In this embodiment, for each subject, the first five time frames of the scan data are discarded, followed by time correction, head movement correction, spatial standardization, spatial smoothing, temporal filtering, and regression of irrelevant variables to obtain four-dimensional brain activity data for each subject. Then, the CC200 brain atlas is used for brain region segmentation. The average time series of all voxels within each brain region is taken as the time series of that brain region. The Pearson correlation coefficient between the time series of every two brain regions is calculated as the functional connectivity strength between the brain regions. Figure 3 As shown, the functional connectivity matrix of each subject is obtained, and then the functional connectivity vector is obtained by vectorization.

[0029] In this embodiment, step S102, which involves filtering source domain samples based on the minimum migration distance between the source domain samples and the target domain distribution, includes: calculating the minimum migration distance from each source domain sample to the target domain distribution, and removing a preset proportion of source domain samples with large minimum migration distances (the value can be adjusted according to actual needs, for example, in this embodiment, removing 20% ​​of source domain samples with large minimum migration distances), to obtain the filtered source domain samples. The function expression for calculating the minimum migration distance from each source domain sample to the target domain distribution is as follows: , In the above formula, For source domain samples The minimum migration distance to the target domain distribution. The characteristic matrix of the target domain distribution. The optimal combination coefficients are: , In the above formula, For linear combination coefficients, The number of samples in the target domain. The dimension is During the training phase, we calculate the MTD (Mean Transmission Measure) from each source domain sample to the target domain distribution, remove source domain samples that are significantly different from the target domain distribution, and obtain the filtered source domain samples. .

[0030] In step S102 of this embodiment, when filtering target domain samples, the sample category prototype is first calculated based on the filtered source domain. The calculation formula is as follows:

[0031] In the above formula, It is a feature extractor network, and its parameters are: , For the filtered source domain, the category is The sample set, The number of samples in this set. This represents the prototype of the sample categories in the filtered source domain. We use a classifier to classify the target domain samples. Generate pseudo tags The distance between the target domain sample and the source domain category prototype corresponding to its pseudo-label This can be used to measure the credibility of the pseudo-labels of the sample, and then to filter out a set of target domain samples with reliable pseudo-labels. pseudo-tags and distance The specific calculation formula is as follows:

[0032]

[0033] In the above formula, It is a classifier network, and its parameters are: , Let be the cosine distance between the two vectors.

[0034] In step S103 of this embodiment, the functional expression for calculating the local domain alignment loss using the filtered source and target domains is as follows:

[0035] In the above formula, This represents the local maximum mean discrepancy (LMMD) between two different distributions. and These represent the feature distributions extracted from the source domain samples and target domain samples by the feature extractor, respectively.

[0036] In step S103 of this embodiment, the functional expression for calculating the cross-entropy classification loss of all source domain samples is as follows:

[0037] In the above formula, Let cross-entropy be the loss function. This is a temperature factor used to slow down the convergence speed of the classification loss. and These are the features and labels of all source domain samples, respectively.

[0038] The expression for the loss function in step S103 of this embodiment is as follows:

[0039] In the above formula, For the final loss function, For weight parameters, The cross-entropy classification loss is the sum of the cross-entropy values ​​for all source domain samples. This represents the local domain alignment loss between the source and target domains.

[0040] In this embodiment, both the deep neural network model and the domain adaptation technique are implemented using PyTorch. The specific parameters for model training in this embodiment are set as follows: the batch size for both the source and target domain samples is set to 32, the learning rate is set to 5e-5, and the number of iterations is set to 300. The gradient descent method used to update model parameters in step S103 of this embodiment is implemented using the PyTorch framework. This embodiment uses labeled source domain data and unlabeled target domain data to train the deep network model and update its parameters. Repeated iterations are required; the training process will stop when the maximum number of iterations is reached, resulting in a classification model suitable for the target domain.

[0041] To evaluate the application functionality of the method in this embodiment, the following method was used for verification: I. In this embodiment, source domain samples are first screened. Based on the screened source domains, the credibility of the pseudo-labels corresponding to each target domain sample is calculated, thereby obtaining a target domain sample set with reliable pseudo-labels. Based on the screened source and target domains, the local domain alignment loss is calculated, and together with the cross-entropy classification loss of all source domain samples, the final loss function is constructed, thereby updating the model parameters and finally obtaining a classification model suitable for the target domain. This embodiment is based on six different well-known datasets: AMU, COBRE, FMMU#I, FMMU#II, PUTH, and UCLA. Subjects are classified according to the internationally recognized scale method, and the obtained categories are used as data labels. Functional connectivity vectors extracted from the subjects' functional magnetic resonance imaging are used as input features. When using the CC200 brain atlas for brain region division, the size of each feature vector is 1×19900. II. To verify the effectiveness of the proposed domain adaptation method, cross-dataset cross-validation experiments were conducted on the six datasets. Specifically, one dataset is used as the target domain for testing, and the remaining five datasets are used together as the source domains. The above process is executed six times, so that each dataset is used as the target domain in turn, fully verifying the effectiveness and stability of the model in cross-domain classification tasks. For each test dataset, three randomized repeated experiments are conducted, and the average accuracy of the three experiments is used to evaluate the model performance. III. In this embodiment, the feature extractor is implemented as a multilayer perceptron network, and the classifier is implemented as a single fully connected layer. The classification accuracy of the model on the target dataset refers to the average accuracy of the three randomized repeated experiments.

[0042] The classification accuracy and average accuracy of the method proposed in this embodiment compared with the state-of-the-art (SOTA) method on six target datasets: AMU, COBRE, FMMU#I, FMMU#II, PUTH, and UCLA are as follows: Figure 4 As shown, the SOTA (state-of-the-art research method) methods include: DAN, see reference: M. Long, Y. Cao, J. Wang, and M. Jordan, “Learning transferable features with deep adaptation networks,” in International Conference on Machine Learning (ICML), vol. 37, 2015, pp. 97–105; DSAN, see literature: Y. Zhu, F. Zhuang, J. Wang, G. Ke, J. Chen, J. Bian, H. Xiong, and Q. He, "Deep subdomain adaptation network for image classification," IEEE Transactions on Neural Networks and Learning Systems, vol. 32, no. 4, pp. 1713–1722, 2021; DANN, see reference: Y. Ganin and V. Lempitsky, “Unsupervised domain adaptation by backpropagation,” arXiv preprint arXiv:1409.7495, 2015; DAAN can be found in the literature: C. Yu, J. Wang, Y. Chen, and M. Huang, “Transferlearning with dynamic adversarial adaptation network,” in IEEE International Conference on Data Mining (ICDM), 2019, pp. 778–786.

[0043] (ours) represents the method proposed in this embodiment. AMU, COBRE, FMMU#I, FMMU#II, PUTH, and UCLA are six different datasets, and Average is the average accuracy across the six datasets. See also Figure 4 It can be seen that the method proposed in this embodiment ( It achieves higher classification accuracy than other methods on five target datasets: AMU, COBRE, FMMU#I, FMMU#II, and PUTH, and has the highest average accuracy on six target datasets.

[0044] Furthermore, an ablation experiment was designed for the method proposed in the embodiments, and the results are shown in Table 1, where the domain alignment loss is... The sample selection process refers to the source domain sample selection process and the target domain sample selection process proposed in this method. AMU, COBRE, FMMU#I, FMMU#II, PUTH and UCLA are six different datasets, and Average is the average accuracy on the six datasets.

[0045] Table 1 Ablation Experiment Results

[0046] As shown in Table 1, the fine-grained domain alignment module used in this embodiment can improve the classification performance of the classification model in the target domain, and the sample screening process proposed in this embodiment can further improve the classification accuracy of the classification model, proving the effectiveness of the fine-grained domain alignment module and sample screening process proposed in this embodiment.

[0047] In summary, this embodiment's fine-grained domain adaptation method based on minimum migration distance (MTD) sample selection includes source domain sample selection and target domain sample selection, as well as a fine-grained domain alignment process based on the selected source and target domains. First, a shared feature extractor and classifier are established for the source and target domains. Source domain sample selection is performed using the minimum migration distance (MTD) between the source and target domain sample distributions. Based on the selected source domains, the credibility of the pseudo-labels corresponding to each target domain sample is calculated, resulting in a target sample set with reliable pseudo-labels. Local domain alignment loss is calculated based on the selected source and target domains. Cross-entropy classification loss is calculated using all source domain samples, constructing the final loss function. Gradient descent is used to update the model weights, resulting in a classification model suitable for the target domain. This embodiment effectively avoids negative migration, ensuring efficient and accurate domain adaptation, thereby improving the classification performance of the model in the target domain. Compared with existing methods, this embodiment's fine-grained domain adaptation method based on minimum migration distance can effectively improve the classification accuracy of image classification models in the target domain.

[0048] Furthermore, this embodiment also provides a fine-grained domain adaptation system for sample screening based on minimum migration distance, including a microprocessor and a memory interconnected thereto. The microprocessor is programmed or configured to execute the fine-grained domain adaptation method for sample screening based on minimum migration distance. Additionally, this embodiment also provides a computer-readable storage medium storing a computer program for being programmed or configured by the microprocessor to execute the fine-grained domain adaptation method for sample screening based on minimum migration distance.

[0049] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

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

Claims

1. A fine-grained domain adaptation method for sample screening based on minimum migration distance, characterized in that, Includes the following steps: S101, Establish an image classification model with shared network parameters for the source domain and the target domain. The image classification model includes a feature extractor and a classifier. The feature extractor is used to extract features from the input image, and the classifier is used to complete the target classification task. S102, source domain samples are filtered based on the minimum migration distance between the source domain samples and the target domain distribution. The credibility of the pseudo-label corresponding to each target domain sample is calculated based on the filtered source domain samples, and the target domain samples are filtered to obtain a target sample set with reliable pseudo-labels. S103: Calculate the local domain alignment loss of the source and target domains based on the filtered source and target domains, calculate the cross-entropy classification loss using all source domain samples, construct the final loss function based on the domain alignment loss and classification loss, and update the network parameters of the feature extractor and classifier in the image classification model using the gradient descent method. S104, determine whether training needs to continue. If training needs to continue, jump to step S102; otherwise, obtain the image classification model suitable for the target domain. Step S102, which involves filtering source domain samples based on the minimum migration distance between the source domain samples and the target domain distribution, includes: calculating the minimum migration distance from each source domain sample to the target domain distribution, removing a predetermined proportion of source domain samples with larger minimum migration distances, and obtaining the filtered source domain samples. The function expression for calculating the minimum migration distance from each source domain sample to the target domain distribution is as follows: , In the above formula, For source domain samples The minimum migration distance to the target domain distribution. The characteristic matrix of the target domain distribution. The optimal combination coefficients are: , In the above formula, For linear combination coefficients, The number of samples in the target domain. The dimension is .

2. The fine-grained domain adaptation method for sample screening based on minimum migration distance according to claim 1, characterized in that, Step S102, which calculates the credibility of the pseudo-label corresponding to each target domain sample based on the filtered source domain samples, includes: S201, Calculate the sample category prototype in the filtered source domain based on the filtered source domain samples: In the above formula, For the filtered source domain, the category is The prototype of the sample category, For the filtered source domain samples, the category is The number of samples, The feature extractor is based on network parameters. right Extracted features For the filtered source domain samples, the category is The sample set, For the i-th sample in the source domain, Let be the label of the i-th sample in the source domain; S202, based on the following formula, uses a classifier to classify samples from each target domain. Generate pseudo tags : , In the above formula, For the network parameters of the classifier, The feature extractor is based on network parameters. For target domain samples Extracted features The classifier is based on network parameters. Features The classification results were obtained; and the distance between each target domain sample and its pseudo-label corresponding source domain category prototype was calculated. To measure the credibility of pseudo-labels for samples in this target domain: In the above formula, Let be the cosine distance between two vectors. For the categories in the filtered source domain The corresponding sample category prototype.

3. The fine-grained domain adaptation method for sample screening based on minimum migration distance according to claim 2, characterized in that, In step S102, selecting target domain samples to obtain a target sample set with reliable pseudo-labels means using a predetermined proportion of target domain samples with high pseudo-label credibility as the selected target domain sample set with reliable pseudo-labels. .

4. The fine-grained domain adaptation method for sample screening based on minimum migration distance according to claim 1, characterized in that, The expression for the calculation function of the local domain alignment loss of the source and target domains in step S103 is as follows: In the above formula, The local domain alignment loss between the source and target domains is denoted as . The Local Maximum Mean Difference (LMMD) between two distinct distributions. and These represent the feature distributions extracted from the source domain samples and target domain samples by the feature extractor, respectively.

5. The fine-grained domain adaptation method for sample screening based on minimum migration distance according to claim 1, characterized in that, The function expression for calculating the cross-entropy classification loss of all source domain samples in step S103 is as follows: In the above formula, The cross-entropy classification loss is the sum of the cross-entropy values ​​for all source domain samples. Let cross-entropy be the loss function. The feature extractor is based on network parameters. For source domain samples Extracted features The classifier is based on network parameters. Features The classification results obtained; A temperature factor with a value greater than 1, used to slow down the convergence speed of the classification loss. This represents the softmax activation function. and These are the features and labels of all source domain samples, respectively.

6. The fine-grained domain adaptation method for sample screening based on minimum migration distance according to claim 1, characterized in that, The final loss function constructed in step S103 based on local alignment loss and cross-entropy classification loss has the following expression: In the above formula, For the final loss function, For weight parameters, The cross-entropy classification loss is the sum of the cross-entropy values ​​for all source domain samples. This represents the local domain alignment loss between the source and target domains.

7. A fine-grained domain adaptation system for sample screening based on minimum migration distance, comprising a microprocessor and a memory interconnected, characterized in that, The microprocessor is programmed or configured to perform the fine-grained domain adaptation method for sample screening based on minimum migration distance as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, characterized in that, The computer program is used to be programmed or configured by a microprocessor to perform the fine-grained domain adaptation method for sample screening based on minimum migration distance as described in any one of claims 1 to 6.

9. A computer program product comprising a computer program / instructions, characterized in that, The computer program / instructions are programmed or configured to execute, via a processor, the fine-grained domain adaptation method for sample screening based on minimum migration distance as described in any one of claims 1 to 6.