Passive domain adaptive method and system for medical image classification, and electronic equipment
By filtering pseudo labels through passive domain adaptive strategies and Gaussian mixture models, combined with contrastive learning and multi-loss function optimization, the problem of data privacy and transmission limitations in medical image classification is solved, and the adaptability and prediction accuracy of the model are improved.
Patent Information
- Application Number
- CN202410897738.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-05
AI Technical Summary
Existing passive domain adaptation methods suffer from data privacy and transmission limitation issues in medical image classification, and the quality of pseudo-label generation strategies is low, resulting in insufficient model generalization performance.
Adopting a passive domain adaptive strategy, the Gaussian mixture model is used to screen high-confidence samples to generate pseudo labels, and through contrastive learning and multiple loss function optimization, only high-confidence samples are used for supervised training to avoid the influence of noise and improve the adaptability of the model. performance.
It effectively avoids data privacy and security issues, improves the confidence of pseudo-labels and the adaptive performance of the model, and enhances the prediction accuracy and robustness in the target domain.
Smart Images

Figure CN118628836A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical image classification, and in particular to a passive domain adaptation method and system, and electronic equipment for medical image classification. Background Art
[0002] Medical image classification is crucial in computer-aided clinical diagnosis applications, including disease diagnosis, preoperative evaluation, and prognosis prediction. In recent years, deep learning has shown excellent performance in medical image classification tasks. However, most traditional deep learning models are based on the assumption of independent and identical distribution, that is, the training samples and test samples have the same or similar data distribution. In practical applications, many factors, such as equipment vendors, imaging protocols, and imaging modalities, can lead to distribution shifts (domain shifts) between training samples and test samples. In order to achieve clinically usable levels, improving the adaptability and generalization capabilities of deep learning models is an urgent problem to be solved.
[0003] Currently, Domain Adaptation (DA) is a mainstream technology that uses labeled source domain data and some unlabeled target domain data for data enhancement or feature alignment to improve the generalization performance of the model. However, in practical applications, it is difficult to directly obtain multi-center source domain data simultaneously due to the privacy protection and transmission restrictions of medical data. Source-Free Domain Adaptation (SFDA) aims to improve generalization performance through model migration while avoiding data privacy issues and transmission restrictions.
[0004] In general, existing SFDA methods can be mainly divided into: data-based methods and model-based methods.
[0005] The former uses the source domain information in the embedded model to simulate the source domain data, or explores the inherent data structure or clustering information hidden in the unlabeled target domain data; while the data-based method uses the source domain information in the embedded model to simulate the source domain data or explore the inherent data structure or clustering information hidden in the unlabeled target domain data. However, the clustering results may be affected by the data distribution, resulting in unstable results. Especially in high-dimensional data space, the performance of the clustering algorithm may be affected, making it difficult to accurately capture the intrinsic structure of the data.
[0006] The latter divides the model into multiple sub-modules, and uses self-learning, contrastive learning and other strategies to adjust the parameters of some modules to adapt to the target domain. Model-based methods mainly use semi-supervised learning methods to align the source domain and the target domain for better domain adaptation. Such as pseudo-labeling method and contrastive learning. Among them, the pseudo-labeling method is the most widely used, but it has the following problems: a. The current main methods focus on the pseudo-label generation strategy, and basically use simple threshold screening for label confidence screening, resulting in low quality of pseudo-generated labels. b. Most current methods directly use all data for pseudo-label supervision, which introduces more noise and affects the prediction performance of the model. Summary of the invention
[0007] The purpose of the embodiments of the present application is to provide a passive domain adaptation method and system, and an electronic device for medical image classification, which adopts a passive domain adaptation strategy to avoid cross-center data privacy and data security issues.
[0008] According to a first aspect of an embodiment of the present application, a passive domain adaptation method for medical image classification is provided, comprising:
[0009] Performing supervised training using a medical image classification model on source domain medical image data, thereby initializing a medical image classification model on a target domain, wherein the medical image classification model consists of an encoder and a classifier;
[0010] Inputting unlabeled target domain medical image data into the encoder for feature extraction, and then inputting the extracted features into the classifier to obtain classification probability;
[0011] The classification probability is used as an input of a Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and the target domain medical image data is divided into a source domain class and a target domain specific class using a value of a first distribution of the target domain medical image data in the optimized fitting Gaussian mixture model;
[0012] Generate a class center of each class according to the characteristics of the class source domain class;
[0013] The target domain medical image is enhanced to obtain an enhanced image, and then the original image and the enhanced image are input into an encoder for feature extraction to obtain features of the original image and features of the enhanced image;
[0014] Inputting the original image features and the enhanced image features into a classifier to obtain predicted classification probabilities, and calculating various losses using the predicted classification probabilities and intermediate features of the medical image data to obtain a total loss;
[0015] Fine-tune the medical image classification model by minimizing the total loss until the total loss reaches the preset convergence condition and stop training;
[0016] The medical image classification model after fine-tuning training is used to predict the target domain medical image data to obtain the final classification result.
[0017] According to a second aspect of an embodiment of the present application, a passive domain adaptation system for medical image classification is provided, including:
[0018] An initialization module, used to perform supervised training using a medical image classification model on source domain medical image data, thereby initializing a medical image classification model on a target domain, wherein the medical image classification model is composed of an encoder and a classifier;
[0019] A feature extraction and probability prediction module, used for inputting the unlabeled target domain medical image data into the encoder for feature extraction, and then inputting the extracted features into the classifier to obtain the classification probability;
[0020] A data domain partitioning module, used to use the classification probability as an input of a Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and to use the value of the first distribution of the target domain medical image data in the Gaussian mixture model after the optimized fitting to partition the target domain medical image data into a source domain class and a target domain specific class;
[0021] A class center generation module, used to generate a class center of each class according to the characteristics of the class source domain class;
[0022] An image enhancement and extraction module is used to enhance the target domain medical image to obtain an enhanced image, and then input the original image and the enhanced image into an encoder for feature extraction to obtain features of the original image and features of the enhanced image;
[0023] A loss calculation module, used for inputting the original image features and the enhanced image features into a classifier to obtain a predicted classification probability, and calculating each loss using the predicted classification probability and intermediate features of the medical image data to obtain a total loss;
[0024] A fine-tuning training module is used to fine-tune the medical image classification model by minimizing the total loss until the total loss reaches a preset convergence condition and the training is stopped;
[0025] The prediction module is used to use the fine-tuned trained medical image classification model to predict the target domain medical image data to obtain the final classification result.
[0026] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including:
[0027] one or more processors;
[0028] A memory for storing one or more programs;
[0029] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in the first aspect.
[0030] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0031] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0032] It can be seen from the above embodiments that the present application adopts a passive domain adaptation strategy to avoid cross-center data privacy and data security issues, while also avoiding the high cost of medical image data annotation; the present invention introduces a Gaussian Mixture Model (GMM) method to screen high-confidence samples, thereby improving the confidence of the generated pseudo-labels, and thereby better improving the adaptive performance of the model; in addition, in the pseudo-label supervision process, the present invention only uses high-confidence samples for supervised training, and uses all samples for regularization optimization, which promotes the model to continuously optimize toward the target domain during the training process without causing excessive deviation, and uses a contrastive learning method to bring the high-confidence class source domain class data domain and the target domain specific class data domain closer in the feature space, and combines multiple loss function optimizations to further improve model performance.
[0033] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0035] Figure 1 The present invention is a flowchart of a passive domain adaptation method for medical image classification according to an exemplary embodiment.
[0036] Figure 2 It is a structural block diagram of a passive domain adaptation method for medical image classification according to an exemplary embodiment.
[0037] Figure 3 It is a block diagram of a passive domain adaptation system for medical image classification according to an exemplary embodiment. DETAILED DESCRIPTION
[0038] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0039] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0040] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0041] Figure 1 is a flowchart of a passive domain adaptation method for medical image classification according to an exemplary embodiment. Figure 2 is a structural block diagram of a passive domain adaptation method for medical image classification according to an exemplary embodiment. Figure 1 and Figure 2 As shown, the method may include the following steps:
[0042] S1: Perform supervised training using a medical image classification model on the source domain medical image data to initialize the medical image classification model on the target domain, wherein the medical image classification model consists of an encoder and a classifier; this step includes the following sub-steps:
[0043] S11: Unify the size and normalize the labeled source domain medical image data;
[0044] Specifically, all source domain medical images are scaled to the same size using bilinear interpolation to meet the input specifications of the medical image classification model.
[0045] S13: inputting the processed source domain medical image data into the medical image classification model, and outputting the predicted classification probability;
[0046] Specifically, the medical image classification model consists of an encoder and a classifier. The encoder can use various types of network feature extractors, such as ResNet, ViT, etc., and the classifier can use the common MLP superimposed softmax function.
[0047] The encoder extracts intermediate features from the processed source domain medical image, and then the classifier uses the intermediate features as input to obtain the unnormalized predicted classification probability l i , and then use the Softmax activation function to get the normalized predicted classification probability p i .
[0048] S14: Calculate the classification loss according to the one-hot encoding of the predicted classification probability and the true label;
[0049] Specifically, according to the one-hot encoding of the predicted classification probability and the true label, the classification loss l of the medical image classification model is calculated using the cross entropy loss. ce , which is used to evaluate the difference between the predicted value and the true value of the medical image classification model.
[0050] S15: performing reverse gradient propagation according to the classification loss to update the parameters of the medical image classification model,
[0051] Specifically, the network of the medical image classification model automatically calculates the gradient of the classification loss, and uses the stochastic gradient descent (SGD) method to update the parameters of the medical image classification model, thereby improving the classification accuracy of the auxiliary medical image classification model.
[0052] S16: After the training of the medical image classification model is completed, the medical image classification model trained on the source domain medical image data is used to complete the initialization of the medical image classification model on the target domain.
[0053] Specifically, the medical image classification model on the target domain uses the parameters trained on the medical image data in the source domain as initial parameters.
[0054] S2: Input the unlabeled target domain medical image data into the encoder to extract features to obtain intermediate features, and then input the extracted features into the classifier to obtain classification probability. This step includes the following sub-steps:
[0055] S21: performing the same unified scale and normalization processing operation on the unlabeled target domain medical image data as the source domain medical image data to obtain a processed target domain medical image;
[0056] Specifically, all source domain medical images are scaled to the same size using bilinear interpolation to meet the input specifications of the medical image classification model.
[0057] S22: input the processed target domain medical image into the encoder for feature extraction, and output the intermediate features of the image;
[0058] Specifically, the processed target domain medical image is input into the encoder to obtain the intermediate feature f of the image. i
[0059] S23: Input the extracted features into the classifier to obtain the classification probability of the image;
[0060] Specifically, the image intermediate feature f i Input the classifier to get the unnormalized predicted classification probability l of the image i , and then use the Softmax activation function to get the normalized predicted classification probability pi.
[0061] S3: taking the classification probability as the input of the Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and using the value of the first distribution of the target domain medical image data in the Gaussian mixture model after the optimized fitting to divide the target domain medical image data into a source domain class and a target domain specific class, this step includes the following sub-steps:
[0062] S31: Fitting and optimizing the Gaussian mixture model according to the classification probability of the target domain medical image;
[0063] Specifically, a binary Gaussian mixture model GMM is initialized, and parameters such as the EM iteration stop threshold and the maximum number of iterations are set; then the classification probability is input into the binary Gaussian mixture model for optimization fitting to obtain the Gaussian mixture model after optimization fitting.
[0064] The specific concepts of the Gaussian mixture model are as follows:
[0065] Gaussian Mixed Model (GMM) is a linear combination of multiple Gaussian distribution functions. In theory, GMM can fit any type of distribution. Gaussian Mixed Model is usually used to solve the problem that the data in the same set contains multiple different distributions.
[0066] S32: Obtain the probability value of the first distribution of all target domain medical image samples in the Gaussian mixture model;
[0067] Specifically, the classification probability of the target domain medical image sample is input into the fitted GMM model again to obtain the probability p of the first distribution of the sample in the GMM model. m .
[0068] S33: Setting a data partition threshold;
[0069] Specifically, the threshold τ is manually set according to task requirements.
[0070] S34: dividing the target domain data into source domain-like classes and target domain-specific classes according to the probability value and the data division threshold;
[0071] Specifically, according to the probability p of the first distribution of the sample in the fitted GMM network m , p m Samples above a given threshold τ are classified as source domain classes, and other samples are classified as target domain specific classes. This is shown in the following formula:
[0072]
[0073] S4: Generate a class center of each class according to the characteristics of the class source domain class; this step includes the following sub-steps:
[0074] S41: Classifying the source domain class data into K classes according to the classification probability of the target domain medical image samples, where K is the number of classes;
[0075] Specifically, the class with the highest classification probability of the target domain medical image sample is taken as the category of the sample.
[0076] S42: averaging the features of the source domain class medical image samples of the same class to obtain the class center of each class;
[0077] Specifically, the source domain class data is used to generate the class center c of each category k , the specific formula is as follows:
[0078]
[0079] where y i represents the initial label of sample i, represents the sum of source domain data samples, If sample i is of class k, the value is 1, otherwise it is 0. i represents the characteristics of sample i.
[0080] S5: Enhance the target domain medical image to obtain an enhanced image, and then input the original image and the enhanced image into the encoder for feature extraction to obtain original image features and enhanced image features. This step includes the following sub-steps:
[0081] S51: performing image enhancement on the unlabeled target domain medical image data;
[0082] Specifically, all input images x are scaled to a fixed size using a bilinear interpolation algorithm, and then the uniformly sized images x are enhanced using photometric transformations such as illumination, color, and Gaussian noise to obtain enhanced data x' to simulate the domain shift of medical images.
[0083] S52: extracting features from the original image and the enhanced image using the encoder, and performing instance normalization on the features;
[0084] Specifically, two encoders with shared parameters are used to extract features of the original image x and the enhanced image x' respectively to obtain the original image feature f and the enhanced image feature f', and the two features are instance normalized to maintain the independence of each image instance, thereby accelerating the convergence of the model.
[0085] S6: Inputting the original image features and the enhanced image features into a classifier to obtain predicted classification probabilities, and calculating various losses using the predicted classification probabilities and intermediate features of the medical image data to obtain a total loss; this step includes the following sub-steps:
[0086] S61: Input the features extracted from the original image into the classifier to obtain the predicted classification probability of each instance image;
[0087] Specifically, the feature f' extracted from the original image is input into the classifier Classifier to obtain the unnormalized predicted classification probability l of the original image. i , and then use the Softmax activation function to get the normalized predicted classification probability p i .
[0088] S62: Calculate the cosine similarity between the features extracted from the original image and the class center to obtain a pseudo label of the image;
[0089] Specifically, by calculating the feature f i and each class center c k The cosine similarity between them is used to obtain pseudo labels with high confidence. The specific formula is as follows:
[0090]
[0091] Where cos is the cosine similarity calculation function, D s Represents a collection of source domain class data.
[0092] S63: Calculate the pseudo-label supervision loss using the predicted classification probability and pseudo-label of the source domain class data
[0093] Specifically, the pseudo-label supervision loss The pseudo label obtained by S62 As a supervisory signal, the output probability p of the classifier i The cross entropy loss is calculated to measure the difference between the source domain sample output and the high-confidence pseudo label, and the cross entropy loss is used as the loss function, as shown in the following formula:
[0094]
[0095] Among them l ce represents the cross entropy loss function, p i and represents the predicted probability distribution of the image and the pseudo label generated in S62, i represents the index of the image, N s Representative class source domain data domain D s By minimizing the pseudo-label supervision loss It can optimize model performance and improve the classification accuracy of the model.
[0096] S64: Calculate the consistency loss using the original image input features and enhanced image input features of all target domain medical image data
[0097] Specifically, the consistency loss The consistency between the original image feature f and the enhanced image feature f' is constrained by square L2norm to encourage the feature extractor Encoder to learn invariant representations, as shown in the following formula:
[0098]
[0099] in Represents the square of the L2norm norm. By minimizing the consistency loss It enables the model to focus on domain-shared semantic features while ignoring domain-specific style features, thereby learning domain-invariant representations and improving the network's out-of-domain generalization performance.
[0100] S65: Calculating entropy minimization loss using the predicted classification probability of the target domain medical image data
[0101] Specifically, the entropy minimization loss Minimize the predicted probability entropy of all target domain samples to enhance prediction confidence, clarify classification boundaries, and thus improve the robustness and anti-interference ability of the model. The specific formula is as follows:
[0102]
[0103] Where E stands for expectation and D represents the target domain dataset.
[0104] S66: Calculate domain alignment loss using original image features and class centers of the target domain medical image data;
[0105] Specifically, the domain alignment loss L EMMD Contrastive learning is used to align the source domain class data features and the target domain specific class data features to bring the target domain closer to the source domain in the feature space, thereby improving the accuracy of the target domain specific data. Specifically, if x i is a sample of the source domain class, then its positive sample is the class center c of its category k , the negative sample is the average of the characteristics of the category in the target domain specific class data domain; if x i For specific target domain data, the opposite is true. The specific formula is as follows:
[0106]
[0107] Where E represents the expectation, τ is the temperature coefficient, which is a common parameter in contrastive learning and is mainly used to control the model’s discrimination of negative samples. i Represents sample x i The characteristics of q + represents a positive sample, q - Represents negative samples.
[0108] S67: Combine all losses as the final total loss
[0109] Specifically, the total loss is the pseudo-label supervision loss Consistency loss Domain Alignment Loss and entropy minimization loss The overall loss is shown in the following formula.
[0110]
[0111] Among them, λ1 and λ2 are hyperparameters used to balance the impact of the two losses on the total loss.
[0112] S7: Fine-tune the medical image classification model by minimizing the total loss until the total loss reaches the preset convergence condition and stop training;
[0113] Specifically, after calculating the total loss, the back-propagation algorithm is used to update the parameters of the model until the total loss function reaches the preset convergence condition and the training is stopped.
[0114] S8: using the fine-tuned trained medical image classification model to predict the target domain medical image data to obtain a final classification result;
[0115] Specifically, all target domain medical images are scaled to the same size using bilinear interpolation, and then the processed images are input into the trained model to obtain unnormalized predicted classification probabilities. The normalized predicted classification probabilities are obtained through Softmax function processing, and the category corresponding to the maximum probability is taken as the category of the target domain medical image.
[0116] As can be seen from the above embodiments, the present application introduces a mixed Gaussian model (GMM) method to screen high-confidence samples, thereby improving the confidence of the generated pseudo-labels, and thus better improving the adaptive performance of the model; in addition, in the pseudo-label supervision process, the present application only uses high-confidence samples for supervised training, and uses all samples for regularization optimization, which promotes the model to continuously optimize toward the target domain during the training process without causing excessive deviation, and uses a contrastive learning method to bring the high-confidence class source domain class data domain and the target domain specific class data domain closer in the feature space, and combines multiple loss function optimizations to further improve the model performance. The present application has strong universality and can be applied to various passive domain adaptive classification tasks.
[0117] Corresponding to the aforementioned embodiment of the passive domain adaptation method for medical image classification, the present application also provides an embodiment of a passive domain adaptation device for medical image classification.
[0118] Figure 3 is a block diagram of a passive domain adaptation system for medical image classification according to an exemplary embodiment. Figure 3 The system comprises:
[0119] Initialization module 1, used to perform supervised training on the source domain medical image data using a medical image classification model, thereby initializing the medical image classification model on the target domain, wherein the medical image classification model consists of an encoder and a classifier;
[0120] A feature extraction and probability prediction module 2 is used to input the unlabeled target domain medical image data into the encoder for feature extraction, and then input the extracted features into the classifier to obtain the classification probability;
[0121] A data domain division module 3 is used to use the classification probability as an input of a Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and to use the value of the first distribution of the target domain medical image data in the Gaussian mixture model after the optimized fitting to divide the target domain medical image data into a source domain class and a target domain specific class;
[0122] A class center generation module 4 is used to generate a class center of each class according to the characteristics of the class source domain class;
[0123] The image enhancement and extraction module 5 is used to enhance the target domain medical image to obtain an enhanced image, and then input the original image and the enhanced image into the encoder for feature extraction to obtain the original image features and the enhanced image features;
[0124] A loss calculation module 6, used for inputting the original image features and the enhanced image features into a classifier to obtain a predicted classification probability, and calculating each loss using the predicted classification probability and intermediate features of the medical image data to obtain a total loss;
[0125] A fine-tuning training module 7 is used to perform fine-tuning training on the medical image classification model by minimizing the total loss until the total loss reaches a preset convergence condition and the training is stopped;
[0126] The prediction module 8 is used to predict the target domain medical image data using the fine-tuned trained medical image classification model to obtain a final classification result.
[0127] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0128] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0129] Accordingly, the present application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the passive domain adaptation method for medical image classification as described above.
[0130] Accordingly, the present application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the passive domain adaptation method for medical image classification as described above.
[0131] Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0132] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A passive domain adaptation method for medical image classification, characterized in that: include: Performing supervised training using a medical image classification model on source domain medical image data, thereby initializing a medical image classification model on a target domain, wherein the medical image classification model consists of an encoder and a classifier; Inputting unlabeled target domain medical image data into the encoder for feature extraction, and then inputting the extracted features into the classifier to obtain classification probability; The classification probability is used as an input of a Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and the target domain medical image data is divided into a source domain class and a target domain specific class using a value of a first distribution of the target domain medical image data in the optimized fitting Gaussian mixture model; Generate a class center of each class according to the characteristics of the class source domain class; The target domain medical image is enhanced to obtain an enhanced image, and then the original image and the enhanced image are input into an encoder for feature extraction to obtain features of the original image and features of the enhanced image; Inputting the original image features and the enhanced image features into a classifier to obtain predicted classification probabilities, and calculating various losses using the predicted classification probabilities and intermediate features of the medical image data to obtain a total loss; Fine-tune the medical image classification model by minimizing the total loss until the total loss reaches the preset convergence condition and stop training; The medical image classification model after fine-tuning training is used to predict the target domain medical image data to obtain the final classification result.
2. The method according to claim 1, characterized in that The medical image classification model is used for supervised training on the source domain medical image data to initialize the medical image classification model on the target domain, including the following sub-steps: Unify the size and normalize the labeled source domain medical image data; Construct a medical image classification model consisting of an encoder and a classifier; Inputting the processed source domain medical image data into the medical image classification model and outputting the predicted classification probability; Calculate the classification loss based on the predicted classification probability and the one-hot encoding of the true label; Performing reverse gradient propagation according to the classification loss to update the parameters of the medical image classification model; After the training of the medical image classification model is completed, the medical image classification model trained on the source domain medical image data is used to complete the initialization of the medical image classification model on the target domain.
3. The method according to claim 1, characterized in that The unlabeled target domain medical image data is input into the encoder for feature extraction to obtain intermediate features, and then the extracted features are input into the classifier to obtain classification probability, including the following sub-steps: The unlabeled target domain medical image data is subjected to the same unified scale and normalization processing operation as the source domain medical image data to obtain a processed target domain medical image; The processed target domain medical image is input into the encoder for feature extraction, and the intermediate features of the image are output. The intermediate features are input into the classifier Classifer to obtain the classification probability of the image.
4. The method according to claim 1, characterized in that: The classification probability is used as an input of a Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and the target domain medical image data is divided into a source domain class and a target domain specific class by using the value of the first distribution of the target domain medical image data in the Gaussian mixture model after the optimization fitting, including the following sub-steps: Fitting and optimizing the Gaussian mixture model according to the classification probability of the target domain medical image; Obtain the probability values of the first distribution of all target domain medical image samples in the Gaussian mixture model; Set data partition threshold; According to the probability value and the data partitioning threshold, the target domain data is divided into source domain-like classes and target domain-specific classes.
5. The method according to claim 1, characterized in that According to the characteristics of the source domain class, the class center of each class is generated, including the following sub-steps: According to the classification probability of the target domain medical image samples, the source domain class data is divided into K classes, where K is the number of classes; The features of the target domain medical image samples of the same category are averaged to obtain the class center of each class.
6. The method according to claim 1, characterized in that Inputting the original image features and the enhanced image features into a classifier to obtain predicted classification probabilities, and using the predicted classification probabilities and intermediate features of the medical image data to calculate various losses to obtain a total loss, comprising the following steps: Inputting the features extracted from the original image into the classifier to obtain the predicted classification probability of each instance image; Calculating the cosine similarity between the features extracted from the original image and the class center to obtain a pseudo label of the image; Calculating pseudo-label supervision loss using the predicted classification probability and pseudo-label of the class data in the class source domain; The consistency loss is calculated using the original image input features and enhanced image input features of all target domain medical image data; Calculating entropy minimization loss using predicted classification probabilities of the target domain medical image data; Calculating domain alignment loss using original image features and class centers of the target domain medical image data; Combine all losses as the total loss.
7. The method according to claim 1, characterized in that The trained model is used to predict the target domain data medical image to obtain the final classification result of the sample, which includes the following sub-steps: Get all target domain images Input the target domain medical image data into the trained model to obtain the predicted output probability; The category corresponding to the maximum probability value is set as the category of the target domain medical image.
8. A passive domain adaptation system for medical image classification, characterized in that: include: An initialization module, used to perform supervised training using a medical image classification model on source domain medical image data, thereby initializing a medical image classification model on a target domain, wherein the medical image classification model is composed of an encoder and a classifier; A feature extraction and probability prediction module, used for inputting the unlabeled target domain medical image data into the encoder for feature extraction, and then inputting the extracted features into the classifier to obtain the classification probability; A data domain partitioning module, used to use the classification probability as an input of a Gaussian mixture model to optimize the fitting of the Gaussian mixture model, and to use the value of the first distribution of the target domain medical image data in the Gaussian mixture model after the optimized fitting to partition the target domain medical image data into a source domain class and a target domain specific class; A class center generation module, used to generate a class center of each class according to the characteristics of the class source domain class; An image enhancement and extraction module is used to enhance the target domain medical image to obtain an enhanced image, and then input the original image and the enhanced image into an encoder for feature extraction to obtain features of the original image and features of the enhanced image; A loss calculation module, used for inputting the original image features and the enhanced image features into a classifier to obtain a predicted classification probability, and calculating each loss using the predicted classification probability and intermediate features of the medical image data to obtain a total loss; A fine-tuning training module is used to fine-tune the medical image classification model by minimizing the total loss until the total loss reaches a preset convergence condition and the training is stopped; The prediction module is used to use the fine-tuned trained medical image classification model to predict the target domain medical image data to obtain the final classification result.
9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Semi-supervised model generalization method fusing label denoising
CN115965815A
Cross-domain deep forgery detection model training method, deep forgery detection method and system
CN116385817A
Construction method of domain adaptation model based on information selection
CN116451137A
Passive domain and unsupervised domain adaptive image classification method, system and device and medium
CN116543237A
Passive domain adaptive image classification method based on class guide meta-learning
CN117523295A
Cited By
Semantic alignment and deformation enhancement multi-parameter MRI (Magnetic Resonance Imaging) image model construction method and system
CN120563660A
Semantic alignment and morphological enhancement multi-parameter MRI image model construction method and system
CN120563660B
