A CT image domain adaptive lung nodule classification method based on generative homo-hetero learning and prototype guidance, medium and equipment

CN122156825AActive Publication Date: 2026-06-05SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
Filing Date
2026-05-06
Publication Date
2026-06-05

Smart Images

  • Figure CN122156825A_ABST
    Figure CN122156825A_ABST
Patent Text Reader

Abstract

The application discloses a CT image domain adaptive lung nodule classification method based on generative same-different learning and prototype guidance, a medium and equipment, and belongs to the technical field of image processing. Paired samples of a source domain are acquired, and a lung nodule classification model is supervisedly trained. Then, samples of a target domain are acquired, and the lung nodule classification model is alternately subjected to generative same-different learning training and prototype label guided classification training until a feature extractor and a classification head converge, so that an optimal lung nodule classification model is obtained, thereby realizing effective target domain classification capability learning. Finally, a CT image to be processed is input into the optimal lung nodule classification model for lung nodule classification. The application generates enhanced views with semantic invariance by interpolation in the feature space of a generative model, and enables the classification model to learn the ability to distinguish between samples with the same semantics and samples with different semantics in a self-supervised manner, so that the feature representation capability that can be generalized to different domains is more effectively obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of image processing, specifically relating to a method, medium, and device for CT image domain adaptation for lung nodule classification based on generative similarity-difference learning and prototype guidance. Background Technology

[0002] Lung-RADS (Lung Imaging Reporting and Data System) is a classification standard for lung cancer screening using low-dose CT scans, published by the American College of Radiology (ACR). It aims to accurately classify, describe, and manage lung nodules, standardizing follow-up and treatment decisions. Lung-RADS classification uses nodule type, size, and growth status as criteria, dividing lung nodules into four grades according to malignancy, from low to high. Timely and accurate classification is crucial for clinical decision-making and follow-up management. Currently, when physicians make clinical diagnoses of lung nodules according to the Lung-RADS classification standard, radiologists need to visually review each chest CT scan. This process is typically high-intensity and highly repetitive; a complete screening often takes several hours, and diagnostic consistency is easily affected by physician experience, fatigue, and the viewing environment, leading to missed diagnoses and misdiagnoses.

[0003] In recent years, with the rapid development of AI technology, it has played an important role not only in the automatic detection of lung nodules but also in providing auxiliary reference for clinical diagnosis in the differentiation between benign and malignant lung nodules. However, its accuracy still cannot replace manual screening. Specifically, some researchers have proposed a deep learning-based automatic classification method for lung nodules. By extracting multi-scale features from candidate nodule regions, it can automatically distinguish between benign and malignant nodules, thus alleviating the workload of manual screening to some extent.

[0004] For example, Chinese patent CN110852350A discloses a method for classifying benign and malignant lung nodules based on multi-scale transfer learning, including the following steps: S1, multi-scale sampling of nodules in lung CT images to obtain multi-scale regions of interest; S2, preprocessing the obtained multi-scale regions of interest to synthesize a three-channel RGB image; S3, initially constructing a transfer learning network model; S4, training the initially constructed transfer learning network model using the synthesized RGB image to obtain a model capable of classifying benign and malignant lung nodules. This method for constructing a benign and malignant lung nodule classification model can fully utilize imaging features at different scales, such as the interior and exterior of lung nodules, to determine benignity or malignancy. It only requires providing the approximate location of the nodule and does not require using the nodule's contour information during classification, thus avoiding the segmentation step of the nodule region.

[0005] Currently, significant differences exist among different medical centers in terms of scanning equipment models, scanning parameters, and patient populations, leading to potential shifts in CT data distribution. This causes a significant decrease in accuracy for many existing methods when applied across different domains, representing a key bottleneck in the transition of deep learning-based automatic classification of lung nodules from research to large-scale clinical application. Recent studies have proposed using contrastive learning-based lung nodule classification methods to improve the model's ability to represent domain-invariant features. However, the strategy of manually constructing positive and negative sample pairs used in these methods makes it difficult for the model to stably extract task-relevant features; therefore, the cross-domain generalization ability of these methods remains limited. Secondly, these methods all use manually defined pixel-domain geometric transformations to generate different views of the same image to provide supervision signals for the model. However, due to the diverse shapes, small sizes, and blurred boundaries of lung nodules, manually defined pixel-domain geometric transformations often result in the loss of useful semantic information in the generated views. Summary of the Invention

[0006] The purpose of this invention is to provide a method, medium, and device for CT image domain adaptation for lung nodule classification based on generative similarity-difference learning and prototype guidance, which aims to accurately classify lung nodules in chest CT images of different domains.

[0007] This invention is mainly achieved through the following technical solutions: A CT image domain adaptation method for lung nodule classification based on generative similarity-difference learning and prototype-guided learning includes the following steps: Step S1: Obtain paired samples from the source domain and construct a training dataset D. Based on the chest CT image-lung nodule label sample pairs in the training dataset D, conduct supervised training of the lung nodule classification model. The lung nodule classification model outputs predicted lung nodule labels. Including feature extractor and classification head ; Step S2: Obtain samples from the target domain and apply them to the lung nodule classification model. Alternately perform generative similarity-dissimilarity learning training and prototype label-guided classification training until the feature extractor... and classification head Convergence is achieved to enable effective target domain classification learning. Step S21: Perform generative similarity and difference learning training; Step A1: Randomly sample unlabeled samples from the target domain I And input the feature extractor To obtain anchor point features ; unlabeled samples of the target domain I Perform α-fold generative augmentation to obtain α sets of similar samples that are semantically identical to the unlabeled samples in the target domain. and input the similarity and difference learning encoder In this process, a set of similar features is obtained. Input samples from the target domain that are different from sample I into the similarity-dissimilarity learning encoder. In the process, a feature queue of heterogeneous samples is obtained; the similarity-dissimilarity learning encoder With feature extractor The structures are the same, and the similarities and differences in the learning encoders are also the same. The initial parameters are those of the feature extractor in step S1. The parameters after convergence; in: This is the αth sample of the same type; For the i-th sample of the same type; For the i-th feature of the same type; Step A2: Based on anchor point features Similar characteristics Calculate the similarity-dissimilarity learning loss value based on the features of different types of samples. L c1 Learning loss values ​​through similarity and dissimilarity L c1 For feature extractors Perform backpropagation and gradient descent to update model parameters. θ 1; Step S22: Perform prototype label-guided classification training; Step B1: Input the samples from the source domain prototype sample set into the feature extractor. Then, the set of output prototype vectors is obtained. F i Then, calculate the anchor point features. Similarity with all prototype vectors is used to determine unlabeled samples in the target domain. I prototype tag ; Step B2: Calculate the loss value L p Based on loss value L p Classification Head Perform backpropagation and gradient descent to update model parameters. θ 2; ; in: Input the lung nodule labels obtained from the lung nodule classification model into the unlabeled samples of the target domain; Step S23: Repeat steps S21 and S22 until the classification head is reached. and feature extractor The optimal lung nodule classification model is obtained by converging to the optimum. Step S3: Input the CT image to be processed into the optimal lung nodule classification model to classify the lung nodules.

[0008] To better implement the present invention, step S1 further includes the following steps: Step S11: Collect chest CT images and lung nodule label sample pairs from the source domain and construct the training dataset D; Step S12: Transfer the training dataset D The chest CT images are input into the lung nodule classification model, and the model outputs the lung nodule labels predicted by the model. Step S13: Update the model parameters through backpropagation and gradient descent of the loss value L. θ ; Step S14: Repeat steps S12 and S13 until a lung nodule classification model is established. It has reached convergence.

[0009] To better implement the present invention, further, in step S2, lung CT image samples from different domains are acquired as samples for the target domain, and a dataset D is constructed. n Then, for dataset D n Perform T random samplings to obtain the dataset ; The dataset D n Remove sets The samples are used as unlabeled samples for the target domain; based on the dataset Pre-trained similarity-dissimilarity learning encoder .

[0010] To better implement the present invention, further, in step A1, in constructing the similarity-difference learning encoder... Subsequently, a pre-trained similarity-dissimilarity learning encoder was used. ; First, the dataset Additive Gaussian noise processing is performed to obtain the enhanced sample set. Then, the augmented samples are input into the similarity-dissimilarity learning encoder. In the process, a feature queue of outlier samples is obtained. ;in, ; in: For the i-th augmented sample; The feature of the i-th outlier sample; The feature of the Tth outlier sample; Updating model parameters θ After step 1, update the similarity / difference learning encoder. parameters ; ; Update the feature queue Q for outlier samples: ; Where: m is the weighting coefficient; This is the αth feature of the same type.

[0011] To better implement the present invention, further, in step A2, the similarity / dissimilarity learning loss value L c1 for: ; in: For the first j Features of outlier samples.

[0012] To better implement the present invention, further, in step A1, each generative enhancement includes the following steps: Step A11: Construct unlabeled samples for the target domain I Noisy samples at time step t I t : ; ; in: It is the cumulative product of the noise figure values ​​of the previous t time steps; α S This represents the noise figure value at the S-th time step. It is normally distributed noise; E It is the identity matrix; Step A12: Based on dataset D n Pre-train the diffusion model DM using the U-Net architecture; then, sample... ~N(0,E) is used as the reverse diffusion starting point of the diffusion model DM, and the following is calculated: x t : ; ; Among them: DM( x t ,t) represents the diffusion model DM prediction x t The noise contained therein; This represents the maximum number of sampling steps. α t Let be the noise figure at step t; α t-1 Let be the noise figure at step t-1; x t-1 This refers to the sampled sample at step t-1; For the first Step sampling samples; Step A13: x t and I t The data are input into the diffusion model DM, and the middle part of the diffusion model DM network is... The feature tensors output by the layer are respectively and Then the feature tensor of the newly enhanced sample is generated. for: ; ; in: ρ The mixing coefficient; ρ ∈[0,1]; The interpolation angle; Step A14: Convert the new feature tensor obtained in step A13 into a new feature tensor. The first input to the middle of the diffusion model DM network Layer, via the first After processing layer 1 and all subsequent layers, the output is the predicted noise. ; Step A15: Based on step A12, calculate as follows x t-1 Repeat steps A12 to A15 iteratively until generative augmented samples are obtained. x 0 ,by x 0 As a sample of the same kind.

[0013] To better implement the present invention, further, in step B1, the training dataset D is randomly sampled, and the sampled chest CT image-lung nodule label sample pairs are divided into 4 sets according to the label category. In the middle; then, the set In Input Feature Extractor and output the set of prototype vectors. ; Prototype label of unlabeled sample I in the target domain for: ; in: For set The Middle j One chest CT image; For set The Middle j One prototype vector; Labeling lung nodules; c The maximum number of sample pairs in the set; COS () represents the similarity function.

[0014] To better realize the present invention, the feature extractor further... It includes a shallow processing module arranged from front to back, and several basic processing modules. BM And an average pooling layer; the shallow processing module includes two-dimensional convolutional layers arranged sequentially from front to back. Conv 2 d 1. Batch normalization layer ReLU Activation function, max pooling layer, 2D convolutional layer Conv 2 d 2. Batch normalization layer, ReLU activation function, and max pooling layer; the basic processing module. BM This includes the main branches and sub-branches arranged in parallel from front to back, as well as... ReLU Activation function and max pooling layer.

[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for CT image domain adaptation for lung nodule classification based on generative similarity-difference learning and prototype guidance.

[0016] An electronic device includes a memory and a processor; the memory stores a computer program; the processor is configured to execute the computer program in the memory to implement the above-described method for CT image domain adaptation for lung nodule classification based on generative similarity-difference learning and prototype guidance.

[0017] The beneficial effects of this invention are as follows: (1) This invention first constructs a lung nodule classification model consisting of a feature extractor and a classification head. Then, through supervised training in the source domain, the model learns to predict the lung nodule category in source domain CT images. Finally, through generative similarity-dissimilarity learning and prototype-guided training, the classification ability of the lung nodule classification model can be generalized to chest CT images of any unseen target domain. This invention can be widely applied in the fields of lung nodule screening and diagnosis, and has good practicality.

[0018] (2) This invention generates semantically invariant similar samples (enhanced views) by interpolating in the feature space of a generative model, and teaches the lung nodule classification model to distinguish between semantically similar and semantically different samples in a self-supervised manner, thereby more effectively obtaining feature representation capabilities that can be generalized to different domains. Simultaneously, this invention obtains prototype labels by measuring the similarity between unlabeled samples in the target domain and various prototype sample sets in the source domain. Then, by alternately performing generative similarity-dissimilarity learning training and prototype label-guided classification training, effective target domain classification ability learning is achieved.

[0019] (3) Compared with existing methods, this invention does not require precise labeling of samples in the target domain, significantly reducing labeling costs. Unlike existing methods that can only distinguish between benign and malignant pulmonary nodules, this invention can accurately distinguish between different types of nodules, thus having stronger clinical value and better practicality. This invention can be applied to clinical pulmonary nodule screening, diagnosis, and follow-up assessment, as well as medical imaging data mining and phenotypic analysis. Attached Figure Description

[0020] Figure 1 This is a flowchart of the CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype guidance of the present invention. Figure 2 For feature extractor Network structure diagram; Figure 3 For classification head A schematic diagram of the network structure. Detailed Implementation

[0021] Example 1: A CT image domain adaptation method for lung nodule classification based on generative similarity-difference learning and prototype guidance, such as Figure 1 As shown, it includes the following steps: Step S1: Obtain paired samples from the source domain and construct a training dataset D. Based on the chest CT image-lung nodule label sample pairs in the training dataset D, conduct supervised training of the lung nodule classification model. This outputs the predicted lung nodule labels.

[0022] The lung nodule classification model Including feature extractor and classification head Specifically, such as Figure 2 As shown, the feature extractor It consists of one shallow processing module and three basic processing modules. It consists of one average pooling layer.

[0023] The shallow processing module consists of: a two-dimensional convolutional layer. Conv 2 d 1 → Batch Normalization Layer → ReLU Activation Function → Max Pooling Layer → 2D Convolutional Layer Conv 2 d 2 → Batch normalization layer → ReLU activation function → Max pooling layer.

[0024] In the shallow processing module, the first two-dimensional convolutional layer Conv 2 d The parameters for layer 1 are: kernel size 3×3, stride 1, padding 1, input channel 1, output channel 32. The second 2D convolutional layer... Conv 2 d The parameters for layer 2 are: kernel size 3×3, stride 1, padding 1, input channels 32, output channels 64. The parameters for both max pooling layers are: kernel size 2×2, stride 2, padding 0.

[0025] 3 basic processing modules Each branch consists of one main branch, one sub-branch, a ReLU activation function, and a max pooling layer, all set up in parallel. The main branch and the sub-branch each receive and process the same input tensor. The output tensors of the two branches are added together, processed by the ReLU activation function, and finally fed into the max pooling layer for further processing.

[0026] exist In the middle, the main branch consists of: a two-dimensional convolutional layer. Conv 2 d 3 → Batch Normalization Layer → ReLU Activation Function → Two-Dimensional Convolutional Layer Conv 2 d 4 → Batch Normalization Layer. Conv 2 d The parameters for 3 are: kernel size 3×3, stride 1, padding 1, input channels 64, and output channels 128. Conv 2 d The parameters for layer 4 are: kernel size 3×3, stride 1, padding 1, input channels 128, output channels 128. The sub-branch is an identity mapping where the input equals the output. The parameters for the max pooling layer are: kernel size 2×2, stride 2, padding 0.

[0027] exist In the middle, the main branch consists of: a two-dimensional convolutional layer. Conv 2 d 5 → Batch Normalization Layer → ReLU Activation Function → Two-Dimensional Convolutional Layer Conv 2 d 6 → Batch Normalization Layer. Conv 2 dThe parameters for 5 are: kernel size 3×3, stride 1, padding 1, input channels 128, and output channels 256. Conv 2 d The parameters for convolutional layer 6 are: kernel size 3×3, stride 1, padding 1, input channels 256, output channels 256. The sub-branch consists of a two-dimensional convolutional layer. Conv 2 d 7 → Batch Normalization Layer. Conv 2 d The parameters for 7 are: kernel size 1×1, stride 1, padding 0, input channels 128, output channels 256. The maximum pooling layer parameters are: kernel size 2×2, stride 2, padding 0.

[0028] exist In the middle, the main branch consists of: a two-dimensional convolutional layer. Conv 2 d 8 → Batch Normalization Layer → ReLU Activation Function → Two-Dimensional Convolutional Layer Conv 2 d 9 → Batch Normalization Layer. Conv 2 d The parameters for 8 are: kernel size 3×3, stride 1, padding 1, input channels 256, and output channels 512. Conv 2 d The parameters for convolutional layer 9 are: kernel size 3×3, stride 1, padding 1, input channels 512, output channels 512. The sub-branch consists of a two-dimensional convolutional layer. Conv 2 d 10 → Batch normalization layer. Conv 2 d 10 The parameters are: kernel size 1×1, stride 1, padding 0, input channels 256, output channels 512. The maximum pooling layer parameters are: kernel size 2×2, stride 2, padding 0.

[0029] Feature extractor The last average pooling layer receives The output tensor is then averaged over the 512 feature channels of the input tensor to obtain a one-dimensional feature tensor with dimension 512.

[0030] like Figure 3 As shown, classification head By fully connected layer FC 1. Three feature fusion modules and fully connected layer FC 2. Concatenated structure. The output vector of the classification head is processed by the softmax function to obtain the predicted lung nodule category.

[0031] Fully connected layer FC 1. Receiver Feature Extractor The output is a 512-dimensional feature vector, and a 2048-dimensional feature vector is also output. This 2048-dimensional feature vector is then reconstructed into a 256×4 two-dimensional feature matrix through a transformation operation.

[0032] The first feature fusion module FF The first module receives the aforementioned 256×4 two-dimensional feature matrix as input, and the second feature fusion module... FF 2 Receive FF The output of module 1 is used as input for the third feature fusion module. FF 3 Receive FF The output of 2 is used as the input.

[0033] 3 feature fusion modules The network structure is completely identical. The processing flow for the input feature matrix of size 256×4 is as follows: first, the feature matrix is ​​normalized by layer, and then 256 multilayer perceptrons are used. Process each row vector of the feature matrix separately. The input and output have the same size. The output 256 row vectors are recombined and transposed to form a new feature matrix of size 4×256. Layer normalization is applied to the new feature matrix, and then four multilayer perceptrons are used. Process each row vector of the feature matrix separately. The input and output have the same size. The four output row vectors are recombined and transposed into a new feature matrix of size 256×4, which is the final output of the feature fusion module.

[0034] Among them, multilayer perceptron It consists of one fully connected layer, one GELU layer, and one fully connected layer connected in series. The weight matrix of each fully connected layer has a dimension of 4×4. Multilayer Perceptron It consists of one fully connected layer, one GELU layer, and one fully connected layer connected in series. The weight matrix of each fully connected layer has a dimension of 256×256.

[0035] exist FF 3. After outputting a new feature matrix of size 256×4, the new feature matrix is ​​transformed to obtain a feature vector of size 2048, which is then input into the fully connected layer. FC 2, FC 2. Output a 4-dimensional feature vector. This 4-dimensional feature vector is processed by the softmax function to obtain the lung nodule category label predicted by the classification model.

[0036] (1) Collect 5000 chest CT images-lung nodule label sample pairs from the same CT device and form a training dataset D. Input the chest CT images x from the training dataset D into the lung nodule classification model. After processing through each layer of the model, the output is the lung nodule label predicted by the model. Where θ, θ1, and θ2 are the classification models. Feature extractor and classification head The set of trainable parameters that satisfies .

[0037] (2) Calculate the loss value based on the loss function L : ; in, , representing the lung nodule label assigned by the doctor to the aforementioned chest CT image x. The correspondence between the four unique hot codes in the set and the types of lung nodules is as follows: [1,0,0,0] corresponds to no lung nodules, [0,1,0,0] corresponds to solid nodules, [0,0,1,0] corresponds to partially solid nodules, and [0,0,0,1] corresponds to ground-glass opacity nodules.

[0038] (3) Update the model parameters θ through backpropagation of the loss value L and the Adam optimizer.

[0039] (4) Perform multiple rounds of random sampling on the training dataset D, and repeat steps (1) to (3) on the sampled chest CT images until the lung nodule classification model is established. It has reached convergence.

[0040] Step S2: Obtain samples from the target domain and apply them to the lung nodule classification model. Alternately perform generative similarity-dissimilarity learning training and prototype label-guided classification training until the feature extractor... and classification head Convergence is achieved to enable effective target domain classification learning.

[0041] Step S20: Obtain samples from the target domain; (1) A dataset is constructed from lung CT image samples from another CT device. D n Dataset D n It contains at least 2000 chest CT images. (Regarding the dataset...) D n Perform 128 non-repeating random samplings to obtain the set. .

[0042] (2) For sets Additive Gaussian noise is applied to all samples to obtain an enhanced sample set. ; ; Where: N represents a normal distribution; σ 2 =0.1 represents the predefined variance of the normal distribution; It is Gaussian noise.

[0043] (3) For the dataset Perform a random sampling to obtain CT image sample I.

[0044] Step S21: Perform generative similarity and difference learning training; (1) The diffusion model DM based on the U-Net architecture performs 8 generative enhancements on CT image sample I to obtain 8 similar samples with the same semantics as I, forming a set of similar samples. .

[0045] Among them, the dataset Pre-train the diffusion model DM of the U-Net architecture until it converges.

[0046] (2) Constructing a similarity-difference learning encoder Similarity and difference learning encoder Network structure and feature extractor Consistent and different learning encoders initial parameters For feature extractor The parameters after convergence.

[0047] Enhance the sample set The input similarity and difference learning encoder for each sample In the process, the memory feature queue is obtained. ,in: .

[0048] (3) Collect samples of the same type Each sample is input into the similarity-dissimilarity learning encoder. In this process, a set of similar features is obtained. .

[0049] (4) Input CT image sample I into the feature extractor To obtain anchor point features Then calculate the similarity / dissimilarity learning loss value. L c1 This allows the model to learn the ability to represent semantically invariant features, thereby improving classification performance; .

[0050] (5) Learning loss value through similarity and dissimilarity L c1 For feature extractors Perform backpropagation and update parameters using the Adam optimizer. .

[0051] (6) Similarity and difference learning encoder parameters Update using the following formula: ; Where M=0.96 represents the predefined weight coefficient.

[0052] (7) Update the feature queue Q of the outlier samples according to the following formula: .

[0053] Step S22: Perform prototype label-guided classification training; (1) Perform multiple random samplings on the training dataset D, and divide the sampled chest CT image-lung nodule label pairs into 4 sets according to the label category. When the number of sample pairs in the set reaches 256, no new sample pairs are added, and the final result is... . express The j-th chest CT image - lung nodule label sample pair. This refers to a chest CT image. The labels represent lung nodules, where y1=[1,0,0,0], y2=[0,1,0,0], y3=[0,0,1,0], and y4=[0,0,0,1].

[0054] (2) Set Chest CT image input isomorphic learning encoder In this process, the output feature vectors constitute the prototype vector set. .

[0055] (3) The obtained CT image sample I is directly input into the similarity-difference learning encoder. In the process, the output feature vector f is given, along with the set of prototype vectors. Calculate the cosine similarity of all vectors in the dataset: ; (4) Determine the label of CT image sample I according to the following formula. : ; (5) Input the feature vector f into the classification head The lung nodule labels predicted by the classification model are obtained. Calculate the loss value according to the following formula. L p : ; Based on loss value L p Classification Head Perform backpropagation, then update the parameters via the Adam optimizer. θ 2.

[0056] Step S23: Repeat steps S21 and S22 until the classification head is reached. and feature extractor The optimal lung nodule classification model is obtained by convergence to the optimum. .

[0057] Step S3: Input the CT image to be processed into the optimal lung nodule classification model to classify the lung nodules.

[0058] Preferably, in step S21, generative enhancement includes the following steps: (1.1) Constructing unlabeled samples of the target domain I Noisy samples at time step t I t : ; ; in: It is the cumulative product of the noise figure values ​​of the previous t time steps; α S This represents the noise figure value at the S-th time step. It is normally distributed noise; E It is an identity matrix.

[0059] (1.2) Sampling ~N(0,E) is used as the reverse diffusion starting point of the diffusion model DM, and is obtained by the following equation. x t : ; ; Among them: DM( x t ,t) represents the diffusion model DM prediction x t The noise contained therein; This represents the maximum number of sampling steps. αt Let be the noise figure at step t; α t-1 Let be the noise figure at step t-1; x t-1 This refers to the sampled sample at step t-1; For the first Step sampling samples; (1.3) will x t and I t The data are input into the diffusion model DM, and the middle part of the diffusion model DM network is... The feature tensors output by the layer are respectively and Then the feature tensor of the newly enhanced sample is generated. for: ; ; in: ρ The mixing coefficient; ρ ∈[0,1], for example, ρ =0.85; The angle is the interpolation angle.

[0060] (1.4) The resulting new feature tensor The first input to the middle of the diffusion model DM network Layer, via the first After processing layer 1 and all subsequent layers, the output is the predicted noise. .

[0061] (1.5) According to step (1.2), the following is calculated: x t-1 Iterative calculations are performed until generative augmented samples are obtained. x 0 .

[0062] Based on the CT equipment acquired in step S20, 1000 new chest CT images were collected to form a target domain test dataset. A professional radiologist then labeled each sample in the test dataset with lung nodule categories. The data obtained in step S23... The samples in the test dataset were classified, and the classification results are shown in Table 1. Control group 1 uses a U-Net classification network based on supervised training, control group 2 uses a U-Net classification network based on supervised training and momentum contrastive learning, and control group 3 uses a lung nodule classification model based solely on supervised training. .

[0063] As shown in Table 1, the comparison reveals that, compared to control group 1 (supervised U-Net) and control group 3 (supervised training only), The optimal lung nodule classification model in this embodiment The model significantly outperformed all other metrics, indicating that supervised learning alone is insufficient to fully extract discriminative features from lung nodule images. Compared to control group 2 (supervised learning + momentum contrastive learning U-Net), this embodiment demonstrates the optimal lung nodule classification model. The fact that it still maintains a significant advantage indicates that the improvements in self-supervised learning strategies and network structure design in this invention can further optimize feature representation and bring about a significant performance improvement.

[0064] Table 1. Optimal Lung Nodule Classification Model Obtained in This Invention Classification test results compared with the control group

[0065]

[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.

Claims

1. A CT image domain adaptation method for lung nodule classification based on generative similarity-difference learning and prototype-guided learning, characterized in that, Includes the following steps: Step S1: Obtain paired samples from the source domain and train the lung nodule classification model in a supervised manner. The lung nodule classification model Including feature extractor and classification head ; Step S2: Obtain samples from the target domain and apply them to the lung nodule classification model. Alternately perform generative similarity-dissimilarity learning training and prototype label-guided classification training until the feature extractor... and classification head convergence; Step S21: Perform generative similarity and difference learning training; Step A1: Randomly sample unlabeled samples from the target domain I And input the feature extractor To obtain anchor point features ; Unlabeled samples in the target domain I Perform alpha generative enhancement to obtain a set of similar samples. and input the similarity and difference learning encoder In this process, a set of similar features is obtained. ; will be different from the sample I Target domain sample input similarity learning encoder In this process, a feature queue of outlier samples is obtained; The sameness-difference learning encoder With feature extractor The structures are the same, and the similarities and differences in the learning encoders are also the same. The initial parameters are those of the feature extractor in step S1. The parameters after convergence; in: This is the αth sample of the same type; For the i-th sample of the same type; For the i-th feature of the same type; Step A2: Based on anchor point features Similar characteristics Calculate the similarity-dissimilarity learning loss value based on the features of different types of samples. L c1 Learning loss values ​​through similarity and dissimilarity L c1 For feature extractors Perform backpropagation and gradient descent to update model parameters. θ 1; Step S22: Perform prototype label-guided classification training; Step B1: Input the source domain prototype sample into the feature extractor Then, the prototype vector set is obtained. F i Then, calculate the anchor point features. Similarity with all prototype vectors is used to determine unlabeled samples in the target domain. I prototype tag ; Step B2: Calculate the loss value L p Based on loss value L p Classification Head Perform backpropagation and gradient descent to update model parameters. θ 2; ; in: Input the lung nodule labels obtained from the lung nodule classification model into the unlabeled samples of the target domain; Step S23: Repeat steps S21 and S22 until the classification head is reached. and feature extractor The optimal lung nodule classification model is obtained by converging to the optimum. Step S3: Input the CT image to be processed into the optimal lung nodule classification model to classify the lung nodules.

2. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning as described in claim 1, characterized in that, Step S1 includes the following steps: Step S11: Collect chest CT images and lung nodule label sample pairs from the source domain and construct the training dataset D; Step S12: Transfer the training dataset D The chest CT images are input into the lung nodule classification model, and the model outputs the lung nodule labels predicted by the model. Step S13: Update the model parameters through backpropagation and gradient descent of the loss value L. θ ; Step S14: Repeat steps S12 and S13 until a lung nodule classification model is established. It has reached convergence.

3. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning according to claim 1, characterized in that, In step S2, lung CT image samples from different domains are acquired as samples for the target domain, and dataset D is constructed. n Then, for dataset D n Perform T random samplings to obtain the dataset ; The dataset D n Remove sets The samples are used as unlabeled samples for the target domain; based on the dataset Pre-trained similarity-dissimilarity learning encoder .

4. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning according to claim 3, characterized in that, In step A1, the similarity-dissimilarity learning encoder is constructed. Subsequently, a pre-trained similarity-dissimilarity learning encoder was used. ; First, the dataset Additive Gaussian noise processing is performed to obtain the enhanced sample set. Then, the augmented samples are input into the similarity-dissimilarity learning encoder. In the process, a feature queue of outlier samples is obtained. ;in, ; in: For the i-th augmented sample; The feature of the i-th outlier sample; The feature of the Tth outlier sample; Updating model parameters θ After step 1, update the similarity / difference learning encoder. parameters ; ; Feature queue of heterogeneous samples renew: ; Where: m is the weighting coefficient; This is the αth feature of the same type.

5. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning according to claim 4, characterized in that, In step A2, the similarity / dissimilarity learning loss value L c1 for: ; in: For the first j Features of outlier samples.

6. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning according to claim 3, characterized in that, In step A1, each generative enhancement includes the following steps: Step A11: Construct unlabeled samples for the target domain I Noisy samples at time step t I t : ; ; in: It is the cumulative product of the noise figure values ​​of the previous t time steps; α S This represents the noise figure value at the S-th time step. It is normally distributed noise; E It is the identity matrix; Step A12: Based on dataset D n Pre-train the diffusion model DM using the U-Net architecture; then, sample... ~N(0,E) is used as the reverse diffusion starting point of the diffusion model DM, and the following is calculated: x t : ; ; Among them: DM( x t ,t) represents the diffusion model DM prediction x t The noise contained therein; This represents the maximum number of sampling steps. α t Let be the noise figure at step t; α t-1 Let be the noise figure at step t-1; x t-1 This refers to the sampled sample at step t-1; For the first Step sampling samples; Step A13: x t and I t The data are input into the diffusion model DM, and the middle part of the diffusion model DM network is... The feature tensors output by the layer are respectively and Then the feature tensor of the newly enhanced sample is generated. for: ; ; in: ρ The mixing coefficient; ρ ∈[0,1]; The interpolation angle; Step A14: Convert the new feature tensor obtained in step A13 into a new feature tensor. The first input to the middle of the diffusion model DM network Layer, via the first After processing layer 1 and all subsequent layers, the output is the predicted noise. ; Step A15: Based on step A12, calculate as follows x t-1 Repeat steps A12 to A15 iteratively until generative augmented samples are obtained. x 0 ,by x 0 As a sample of the same kind.

7. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning according to claim 1, characterized in that, In step B1, the training dataset D is randomly sampled, and the sampled chest CT image-lung nodule label sample pairs are divided into four sets according to the label category. In the middle; then, the set In Input Feature Extractor and output the set of prototype vectors. ; Unlabeled samples in the target domain I prototype tag for: ; in: For set The Middle j One chest CT image; For set The Middle j One prototype vector; Labeling lung nodules; c The maximum number of sample pairs in the set; COS () represents the similarity function.

8. The CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype-guided learning according to claim 1, characterized in that, The feature extractor It includes a shallow processing module arranged from front to back, and several basic processing modules. BM And an average pooling layer; the shallow processing module includes two-dimensional convolutional layers arranged sequentially from front to back. Conv 2 d 1. Batch normalization layer ReLU Activation function, max pooling layer, 2D convolutional layer Conv 2 d 2. Batch normalization layer, ReLU activation function, and max pooling layer; the basic processing module. BM This includes the main branches and sub-branches arranged in parallel from front to back, as well as... ReLU Activation function and max pooling layer.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype guidance as described in any one of claims 1-8.

10. An electronic device, characterized in that, It includes a memory and a processor; the memory stores a computer program; the processor is used to execute the computer program in the memory to implement the CT image domain adaptation lung nodule classification method based on generative similarity-difference learning and prototype guidance according to any one of claims 1-8.

Citation Information

Patent Citations

  • Pulmonary nodule benign and malignant classification method and system based on multi-scale transfer learning

    CN110852350A

  • Pulmonary nodule benign and malignant classification method based on combination of adversarial generative network and self-coding

    CN110516747A

  • Intelligent pulmonary nodule grading method and system based on multi-modality feature fusion

    WO2025020719A1