A heart MRI image segmentation model training method based on semi-supervised learning

By employing a semi-supervised learning-based training method for cardiac MRI image segmentation, and utilizing generative adversarial networks and pseudo-labeling techniques, the problem of insufficient segmentation accuracy and generalization ability in cardiac MRI image segmentation is solved. This method achieves efficient image segmentation and data augmentation, and improves the model's adaptability and accuracy.

CN118134951BActive Publication Date: 2026-06-23HEBEI UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEBEI UNIV OF TECH
Filing Date
2024-04-11
Publication Date
2026-06-23

Smart Images

  • Figure CN118134951B_ABST
    Figure CN118134951B_ABST
Patent Text Reader

Abstract

The application provides a kind of heart MRI image segmentation model training method based on semi-supervised learning, comprising the following steps: S1, acquisition heart MRI image, add label information for heart MRI image, generate label image;S2, through the data expansion of heart MRI image by generative adversarial network, generate unlabelled image;S3, using label image and unlabelled image with semi-supervised way carries out model training, generates heart MRI image segmentation model.The application has beneficial effects: by introducing smooth function reduces the difference between generated image and real image, optimizes the quality of generated image, combines adaptive loss function dynamically adjusts loss weight, effectively guides generator to produce high-quality image, while reducing the mode collapse problem in training process, by combining consistency regularization and pseudo label for semi-supervised training, reduces the demand pressure of deep learning model training on labeled data, improves the learning efficiency and segmentation precision of model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image segmentation technology, and in particular relates to a training method for cardiac MRI image segmentation models based on semi-supervised learning. Background Technology

[0002] Cardiac MRI images provide rich information on cardiac anatomy and function, and accurate image segmentation is crucial for assessing cardiac health, diagnosing heart disease, and developing treatment plans. However, current techniques have the following limitations:

[0003] 1. Existing technologies may have limitations in accurately segmenting complex cardiac structures and lesion areas, especially when image quality varies and cardiac structures differ greatly, the segmentation accuracy may not be sufficient to meet the high-precision clinical needs.

[0004] 2. Traditional cardiac MRI image segmentation methods may have insufficient generalization ability. That is, when faced with unseen image data from different devices or with different pathological features, the model's performance deteriorates significantly, limiting the model's application scope and stability.

[0005] 3. Due to the high cost of acquiring high-quality labeled data, existing technologies may not be able to effectively utilize the large amount of available unlabeled cardiac MRI image data, which limits the size and diversity of the training dataset and thus affects the model training effect. The acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect the model accuracy. Summary of the Invention

[0006] In view of this, the present invention aims to propose a method for training a cardiac MRI image segmentation model based on semi-supervised learning, in order to solve at least one of the above-mentioned technical problems.

[0007] To achieve the above objectives, the technical solution of the present invention is implemented as follows:

[0008] The first aspect of this invention provides a method for training a cardiac MRI image segmentation model based on semi-supervised learning, comprising the following steps:

[0009] S1. Acquire cardiac MRI images, add annotation information to the cardiac MRI images, and generate labeled images;

[0010] S2. Data augmentation of cardiac MRI images is performed using a generative adversarial network to generate unlabeled images;

[0011] S3. Use labeled and unlabeled images to train the model in a semi-supervised manner to generate a cardiac MRI image segmentation model.

[0012] Furthermore, S1 includes the following steps:

[0013] S11. Acquire cardiac MRI images from different perspectives and at different stages of the cardiac cycle using MRI scanning technology;

[0014] S12. The ventricles, atria, heart valves and cardiac lesion areas are marked on cardiac MRI images using manual annotation.

[0015] Cardiac MRI image data can be represented as:

[0016]

[0017] Among them, I ax This represents the x-th cardiac MRI image, where N is the total number of images, and I represents each image. ax All of them contain detailed information and annotations about the heart structure. ay L ay Image I ax The annotation information, annotation information L ay This includes the structure of the heart, the classification and location of lesions.

[0018] Furthermore, S2 includes the following steps:

[0019] S21. Initialize the generator and discriminator parameters of the generative adversarial network;

[0020] S22. Using a smooth approximation generative adversarial network framework and employing iterative enhancement, generator G generates a new cardiac MRI image bX. ′ The output of generator G is expressed as:

[0021] bX ′ =G(bZ);

[0022] Where bZ is the noise vector;

[0023] Image bX is processed using a smoothing function S. ′ Get bX ″ The formula is as follows:

[0024] bX ″ =S(bX) ′ );

[0025]

[0026] Among them, E(bX) ′ bX) is the evaluation of the generated image bX ′ The energy function representing the difference between the image bX and the real image, where γ is a parameter controlling the smoothness. This represents the gradient of the energy function with respect to the generated image;

[0027] The formula for calculating the energy function is as follows:

[0028]

[0029] Among them, ∥bX ′ -bX∥ 2 This represents the square of the Euclidean distance between the generated image and the real image;

[0030] The generated image bX ″ The data is then re-input into the generator G for iterative enhancement.

[0031] S23, Adaptive Loss Function L adapt The loss weights are dynamically adjusted based on the differences between the generated image and the real image; the loss function L... adapt The formula is as follows:

[0032] L adapt (bX ″ bX)=w(bX ″ ,bX)·L(bX ″ ,bX);

[0033] Where bX is a real cardiac MRI image, L() is the cross-entropy loss function, and w() is a weight function dynamically calculated based on image differences.

[0034] The weight function w is dynamically adjusted based on the similarity between the generated image and the real image, as shown in the following formula:

[0035]

[0036] Where D(bX″,bX) is a function that measures the difference between the generated image bX″ and the real image bX, and σ is a parameter that controls the sensitivity of weight adjustment;

[0037] The formula for calculating the difference function D(bX″, bX) is:

[0038]

[0039] Where W and H represent the width and height of the image, respectively, and bX″ ij and bX ij These represent the pixel values ​​of the generated image and the real image at position (i,j), respectively.

[0040] S24. An asynchronous update strategy is adopted to train the generator and discriminator separately, and the quality of the generated image is evaluated using the fitness function. The training strategy is then adjusted based on the evaluation results.

[0041] S25. Repeat steps S22 to S24 until the preset number of training iterations is reached, and use the generative adversarial network to generate unlabeled images.

[0042] Furthermore, the specific steps of S24 are as follows:

[0043] The update frequency and intensity of the generator G and discriminator D are adjusted according to the fitness function score.

[0044] The update rule for generator G is:

[0045]

[0046] The update rule for discriminator D is:

[0047]

[0048] Where α and β are the learning rates of the generator and discriminator, respectively, and L D It is the loss function of the discriminator;

[0049] The fitness function F is used to evaluate the quality of the generated image to guide the asynchronous update strategy. Its calculation method can be expressed as:

[0050]

[0051] Among them, L D The higher the fitness score F, the greater the loss function of the discriminator.

[0052] Furthermore, S3 includes the following steps:

[0053] S31. An unlabeled image is processed by a weak perturbation cell to obtain a weakly perturbated image. The weakly perturbated image is then processed by two strong perturbation cells to obtain two strong perturbation images.

[0054] S32. Use the model's prediction results for weakly perturbed images as pseudo-labels, and use the pseudo-labels to supervise the prediction results for two strongly perturbed images.

[0055] S33. By introducing differential feature perturbation into the features output by the encoder corresponding to the weakly perturbed image, the prediction results of the feature perturbation branch are supervised by pseudo-labels.

[0056] S34. Use an encoder to extract feature maps from the two strongly disturbed images respectively, and then fuse the two feature maps.

[0057] S35. Input the fused feature map into the decoder to generate the fused prediction result. The fused prediction result and the prediction result of the strongly perturbed image are regularized for consistency.

[0058] S36. The image segmentation model is trained using the deep learning PyTorch framework and the proposed semi-supervised training method. The weights of the segmentation model Unet are obtained and loaded into the segmentation model Unet to generate a cardiac MRI image segmentation model.

[0059] Furthermore, the loss function of the semi-supervised training method includes a supervised loss function and an unsupervised loss function.

[0060] The second aspect of this invention provides a cardiac MRI image segmentation method based on semi-supervised learning, characterized in that: the cardiac MRI image to be segmented is input into the segmentation model Unet of the cardiac MRI image segmentation model, and the segmented cardiac MRI image is output.

[0061] The cardiac MRI image segmentation model is trained using the method described in the first aspect.

[0062] A third aspect of the present invention provides an electronic device, including a processor and a memory communicatively connected to the processor and used to store processor-executable instructions, characterized in that: the processor is used to execute the method described in either the first or second aspect above.

[0063] A fourth aspect of the present invention provides a server, characterized in that it includes at least one processor and a memory communicatively connected to the processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the processor to cause the at least one processor to perform the method as described in the first or second aspect.

[0064] The fifth aspect of the present invention provides a computer-readable storage medium storing a computer program, characterized in that: when the computer program is executed by a processor, it implements the method described in the first aspect or the second aspect.

[0065] Compared with existing technologies, the cardiac MRI image segmentation model training method based on semi-supervised learning described in this invention has the following beneficial effects:

[0066] (1) The present invention provides a training method for cardiac MRI image segmentation model based on semi-supervised learning. The generative adversarial network algorithm based on smooth approximation reduces the difference between generated images and real images by introducing a smoothing function, thereby optimizing the quality of generated images. Combined with an adaptive loss function, the loss weight is dynamically adjusted, effectively guiding the generator to produce high-quality images. At the same time, it reduces the mode collapse problem during training. By combining consistency regularization and pseudo-labels for semi-supervised training, the pressure of deep learning model training on labeled data is reduced, thereby improving the learning efficiency and segmentation accuracy of the model.

[0067] (2) The cardiac MRI image segmentation model training method based on semi-supervised learning described in this invention reduces the pressure of deep learning model training on labeled data by combining consistency regularization and pseudo-labels for semi-supervised training, and improves the learning efficiency and segmentation accuracy of the model. In particular, differential perturbation is introduced at the image and feature levels, and a novel consistency regularization method is constructed using encoder output features, which enhances the model's adaptability and generalization ability to complex data distributions. Attached Figure Description

[0068] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0069] Figure 1 This is a schematic diagram of the training method flow described in an embodiment of the present invention;

[0070] Figure 2 This is a schematic diagram of the training framework structure of the cardiac MRI image segmentation model based on semi-supervised learning as described in an embodiment of the present invention. Detailed Implementation

[0071] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0072] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0073] Example 1:

[0074] like Figures 1 to 2 As shown, a method for training a cardiac MRI image segmentation model based on semi-supervised learning includes the following steps:

[0075] S1. Acquire cardiac MRI images, add annotation information to the cardiac MRI images, and generate labeled images;

[0076] S2. Data augmentation of cardiac MRI images is performed using a generative adversarial network to generate unlabeled images;

[0077] S3. Use labeled and unlabeled images to train the model in a semi-supervised manner to generate a cardiac MRI image segmentation model.

[0078] S1 includes the following steps:

[0079] Cardiac MRI image data can be obtained from medical institutions and acquired through MRI scanning technology. It includes images of the heart from different perspectives and at different stages of the cardiac cycle, used for comprehensive analysis of cardiac structure and function, as shown in the figure below. During the data acquisition phase, each patient's cardiac MRI images are acquired at different stages of the cardiac cycle to obtain comprehensive information about cardiac motion.

[0080] S11. Acquire cardiac MRI images from different perspectives and at different stages of the cardiac cycle using MRI scanning technology;

[0081] S12. The ventricles, atria, heart valves and cardiac lesion areas are marked on cardiac MRI images using manual annotation.

[0082] In some embodiments, the ventricles, atria, and heart valve regions are labeled; in other embodiments, the ventricles, atria, heart valves, and cardiac lesion regions are labeled, including myocardial infarction regions, myocardial hypertrophy regions, etc.

[0083] Cardiac MRI image data can be represented as:

[0084]

[0085] Among them, I ax This represents the x-th cardiac MRI image, where N is the total number of images, and I represents each image. ax All of them contain detailed information and annotations about the heart structure. ay L ay Image I ax The annotation information, annotation information L ay This includes the structure of the heart, the classification and location of lesions.

[0086] S2 includes the following steps:

[0087] S21. Initialize the generator and discriminator parameters of the generative adversarial network, including the weights and biases of the generator and discriminator.

[0088] S22. Using a smooth approximation generative adversarial network framework and employing iterative enhancement, high-quality cardiac MRI images are generated. Given a noise vector bZ, the generator G produces a new cardiac MRI image bX. ′ The output of generator G is expressed as:

[0089] bX ′ =G(bZ);

[0090] Where bZ is the noise vector;

[0091] To reduce the difference between the generated image and the real image, a smoothing function S is used to process image bX.′ Get bX ″ This makes the generated image more closely resemble the distribution of the real image, as shown in the following formula:

[0092] bX ″ =S(bX) ′ );

[0093]

[0094] Among them, E(bX) ′ bX) is the evaluation of the generated image bX ′ The energy function representing the difference between the image bX and the real image, where γ is a parameter controlling the smoothness. This represents the gradient of the energy function with respect to the generated image;

[0095] The formula for calculating the energy function is as follows:

[0096]

[0097] Among them, ∥bX ′ -bX∥ 2 This represents the square of the Euclidean distance between the generated image and the real image;

[0098] The generated image bX ″ The data is re-input into the generator G and enhanced through n iterations.

[0099] The formula for iterative enhancement is:

[0100] bX (n+1) =S(G(bX) (n) ));

[0101] Where n represents the number of iterations, and in the first iteration, the following condition is satisfied: bX (0) =bX ′ ;

[0102] S23. Calculate the difference between the generated image and the real image using an adaptive loss function, and dynamically adjust the loss weights to optimize the generator's performance;

[0103] Adaptive loss function L adapt The loss weights are dynamically adjusted based on the differences between the generated image and the real image; the loss function L... adapt The formula is as follows:

[0104] L adapt (bX ″ bX)=w(bX ″ ,bX)·L(bX ″ ,bX);

[0105] Where bX is a real cardiac MRI image, L() is the cross-entropy loss function, and w() is a weight function dynamically calculated based on image differences.

[0106] The weight function w is dynamically adjusted based on the similarity between the generated image and the real image to better guide the generator G, as shown in the following formula:

[0107]

[0108] Where D(bX″,bX) is a function that measures the difference between the generated image bX″ and the real image bX, and σ is a parameter that controls the sensitivity of weight adjustment;

[0109] In some embodiments, σ ​​is set to 0.1;

[0110] In some embodiments, the formula for calculating the difference function D(bX″,bX) is:

[0111]

[0112] Where W and H represent the width and height of the image, respectively, and bX″ ij and bX ij These represent the pixel values ​​of the generated image and the real image at position (i,j), respectively.

[0113] S24. An asynchronous update strategy is adopted to train the generator and discriminator separately, and the quality of the generated image is evaluated using the fitness function. The training strategy is then adjusted based on the evaluation results.

[0114] The specific steps for S24 are as follows:

[0115] The update frequency and intensity of the generator G and discriminator D are adjusted according to the fitness function score.

[0116] The update rule for generator G is:

[0117]

[0118] The update rule for discriminator D is:

[0119]

[0120] Where α and β are the learning rates of the generator and discriminator, respectively, and L D It is the loss function of the discriminator. In some embodiments, α and β are set to 0.01 and 0.05, respectively.

[0121] The fitness function F is used to evaluate the quality of the generated image to guide the asynchronous update strategy. Its calculation method can be expressed as:

[0122]

[0123] Among them, L D The higher the fitness score F, the greater the loss function of the discriminator.

[0124] Based on the fitness score, a decision is made as to whether to update the generator or the discriminator. In one embodiment, if the fitness score is greater than a preset threshold, the generator is updated; if the fitness score is less than the preset threshold, the discriminator is updated. The preset threshold is 0.8.

[0125] S25. Repeat steps S22 to S24 until the preset number of training iterations is reached. Use a generative adversarial network to generate unlabeled images for subsequent semi-supervised training.

[0126] Generative Adversarial Networks (GANs) based on smooth approximation, by incorporating a smoothing approximation technique and introducing a smoothing function at the generator output, reduce the difference between generated and real images, enabling the generation of more diverse cardiac MRI image data that closely approximates the real-world distribution. Furthermore, the adaptive loss function dynamically adjusts the loss weights based on the differences between generated and real images, more effectively guiding the generator to produce high-quality images while reducing mode collapse issues during training.

[0127] S3 includes the following steps:

[0128] This invention proposes a semi-supervised training framework for image segmentation models, based on consistency regularization and pseudo-labels, named X-Match. The framework utilizes augmented image data for training.

[0129] Among them, the consistency regularization method aims to enforce consistency between the prediction results of perturbed unlabeled images, where the perturbation can be applied at the image level, the feature level of the encoder output, and the network level.

[0130] The pseudo-label-based method first uses the model to predict unlabeled images, and then uses these predictions as pseudo-labels to fine-tune the network. The structure of the X-Match framework is as follows: Figure 2 As shown.

[0131] Specifically, the X-Match construction process is as follows:

[0132] The augmented data is divided into labeled images and unlabeled images. Labeled images include the image and its corresponding label, while unlabeled images only include the image data.

[0133] In some embodiments, the original dataset before sample augmentation is selected as labeled data, and the data after sample augmentation is selected as unlabeled data.

[0134] In this embodiment, the image of the marker is defined as... Unlabeled images

[0135] S31. Define the segmentation model as F. In this embodiment, Unet is used as the segmentation model, and its structure can be further divided into encoder g and decoder h.

[0136] In the X-Match framework, each unlabeled image x is first subjected to a pre-defined perturbation. u Perform two different degrees of transformation at the image level: strong and weak.

[0137] Unlabeled image x u Through weak disturbance pool A w After the action, a weakly perturbed image x is obtained. w Weakly perturbed image x w Then, they pass through two strongly disturbed pools A. s and A s After the action, two strongly perturbated images were obtained. and

[0138] Weak disturbance pool A w Including rotation and flipping, strong disturbance pool A s Including color jitter, blur, and CutMix, strong perturbation pool A s This approach includes gamma correction, random elastic deformation, and CutMix. By applying different color perturbations (color jitter and gamma correction) and edge and contour perturbations (blurring and elastic deformation) to two strong perturbation pools, and combining this with the CutMix method, it not only enhances the difference between the two strongly perturbated images but also explores a broader image perturbation space. It also improves the model's understanding of color, edge, and contour variations in the sample data within the two perturbation branches and enhances the model's sensitivity to these features, thereby improving the model's segmentation accuracy. The perturbation strategies generated by the strong and weak perturbation pools are randomized each time, and one or more perturbation strategies generated each time are controlled by a random number program.

[0139] S32. Use the model's prediction results for weakly perturbed images as pseudo-labels, and use the pseudo-labels to supervise the prediction results for two strongly perturbed images; specifically, use the model's prediction results for weakly perturbed images x w The prediction result p w Used as a pseudo-label and used to monitor two strongly perturbed images. and Prediction results and

[0140] Images generated by a weakly perturbated pool are more conducive to the model making accurate predictions, while images generated by a strongly perturbated pool are more conducive to the model learning image features, thereby enhancing the robustness and generalization ability of the model.

[0141] S33. In the X-match framework, differential feature perturbations are introduced into the features output by the encoder corresponding to the weakly perturbed image. Combined with the idea of ​​consistency regularization, the model's prediction results for the weakly perturbed image are used as pseudo-labels to supervise the prediction results of the feature perturbation branch. This further improves the model performance and enables it to learn more robust feature representations at the feature level.

[0142] The feature perturbations corresponding to weakly perturbed images can be divided into two aspects: feature perturbations in the channel dimension and feature perturbations in the spatial dimension.

[0143] The feature perturbation of the channel dimension is implemented by nn.Dropout2D in PyTorch.

[0144] The spatial dimension feature perturbation is performed using two methods: white noise and feature map masking.

[0145] Specifically, for white noise perturbation, a noise tensor Q is first generated by randomly sampling from a uniform distribution U(-0.3, 0.3), ensuring that it has the same size as the tensor K, where K represents the weakly perturbed image x. w The corresponding feature map g(x) output by the encoder w Next, the noise tensor Q is element-wise multiplied with tensor K to adjust the noise amplitude. Finally, the newly generated noise is added to the encoder output K to obtain... In this way, the injected noise will be proportional to each activation in the output tensor.

[0146] For feature map masking, a threshold δ is first randomly sampled from a uniform distribution U(0.1,0.3). Then, the feature maps K are summed and normalized along the channel dimension to obtain K′. Next, a conditional mask L={K′<δ}1 is generated and applied to K to obtain the perturbed version. In this way, 10% to 30% of the relatively inactive areas in the feature map are occluded.

[0147] Furthermore, to prevent multiple feature perturbations from being mixed in the same branch and affecting the model's learning of features, different types of feature perturbations are assigned to multiple independent branches, enabling the model to achieve target consistency more directly in each branch. For convenience, the perturbation operators D(), N(), and M() are used in the structure diagram to represent the proposed channel-dimensional feature perturbation, white noise perturbation, and feature map masking perturbation, respectively.

[0148] S34. In X-match, a consistency regularization method is also constructed using the features of the encoder output corresponding to the strongly perturbed image.

[0149] Specifically as follows:

[0150] First, use encoder g on the strongly disturbed image. and strongly perturbated images Feature extraction is performed to obtain the corresponding feature map. and feature map Then, a mixup operation is performed on these two feature maps, where the mixup can be represented as:

[0151] Mix λ (a,b)=λ·a+(1-λ)·b;

[0152] Here, a and b represent two target samples that need to be fused, and λ is a fusion ratio factor used to control the fusion weight of the two target objects. During each update, λ is randomly sampled from Beta(α, α), and α is set to 0.5.

[0153] S35. Input the fused feature map into the decoder to generate the fused prediction result, and perform consistency regularization between the fused prediction result and the prediction result of the strongly perturbed image.

[0154] The fused feature map The result is fed into decoder h to obtain the prediction result. Then p mix With model pair and Prediction results and Consistency regularization can be performed using the following formula:

[0155]

[0156] Where l represents the MSE loss.

[0157] The proposed consistency regularization method enables the model to better mine and utilize the information hidden at the feature level in strongly perturbed images, and improves the model's feature extraction capability for strongly perturbed images.

[0158] Specifically, the overall loss function of the X-Match framework Includes monitoring loss and unsupervised losses

[0159] The formula is:

[0160]

[0161] Among them, monitoring losses It is the cross-entropy between the model's predictions on labeled data and the labels, and the unsupervised loss. The aim is to help the model generalize better by utilizing unlabeled data. Specifically, the unsupervised loss can be expressed as:

[0162]

[0163] in Image x representing weak perturbation w As the relevant loss function corresponding to the model input, and Image representing strong perturbation and strongly perturbated images The relevant loss function is used as the model input. Furthermore, both η and μ are 0.5.

[0164] More specifically: It can be represented as:

[0165]

[0166] Among them, B u τ is the batch size of the unlabeled data, τ = 0.95, a predefined confidence threshold used to filter out noisy labels. H() represents the cross-entropy loss function, used to minimize the distribution between two probabilities, p w The segmentation model F is applied to the weakly perturbated image x. w The generated pseudo-tags These are the prediction results for the three feature perturbation branches, respectively. λ1=λ2=0.5.

[0167] More specifically: It can be represented as:

[0168]

[0169] in and The segmentation model F represents the strongly perturbed image. and The prediction result, w(t), is a ramp function used to add a consistency regularization term at each iteration.

[0170] The importance of.

[0171] S36. Use the deep learning PyTorch framework to train a semi-supervised image segmentation model and obtain the weights of the segmentation model Unet. Load the weights into the segmentation model Unet to generate a cardiac MRI image segmentation model.

[0172] The beneficial effects of this invention are:

[0173] 1. The generative adversarial network algorithm based on smooth approximation reduces the difference between generated and real images by introducing a smoothing function, thereby optimizing the quality of generated images. Combined with an adaptive loss function, it dynamically adjusts the loss weights, effectively guiding the generator to produce high-quality images. At the same time, it reduces the mode collapse problem during training. By combining consistency regularization and pseudo-labels for semi-supervised training, it reduces the pressure on deep learning model training to obtain labeled data, thereby improving the model's learning efficiency and segmentation accuracy.

[0174] 2. By introducing differential perturbations at the image and feature levels and constructing a novel consistency regularization method using encoder output features, the model's adaptability and generalization ability to complex data distributions are enhanced.

[0175] 3. The semi-supervised learning strategy combining image-level and feature-level perturbations effectively utilizes a large amount of unlabeled cardiac MRI image data by applying perturbations of different degrees and types to unlabeled data and performing consistency regularization on the perturbated data. This reduces the cost and time of data annotation. The generative adversarial network algorithm based on smooth approximation generates high-quality cardiac MRI image data, reducing the cost of obtaining high-quality labeled data, significantly expanding the scale of the training dataset, and further improving the training effect and application scope of the model.

[0176] 4. By using an adaptive loss function and an asynchronous update strategy, this invention effectively reduces the pattern collapse problem common in generative adversarial networks during training, ensuring the diversity and quality of generated images and providing more stable and efficient data support for model training.

[0177] Example 2:

[0178] A cardiac MRI image segmentation method based on semi-supervised learning, characterized in that: the cardiac MRI image to be segmented is input into the segmentation model Unet of the cardiac MRI image segmentation model, and the segmented cardiac MRI image is output.

[0179] The cardiac MRI image segmentation model was trained using the method described in Example 1.

[0180] Example 3:

[0181] An electronic device includes a processor and a memory communicatively connected to the processor and used to store processor-executable instructions, the processor being used to perform the method of either Embodiment 1 or Embodiment 2 of the preceding claims.

[0182] Example 4:

[0183] A server includes at least one processor and a memory communicatively connected to the processor. The memory stores instructions executable by the at least one processor, which are executed by the processor to cause the at least one processor to perform a method as described in Embodiment 1 or Embodiment 2.

[0184] Example 5:

[0185] A computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, it implements the method of Embodiment 1 or Embodiment 2.

[0186] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0187] In the several embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the division of units described above is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The aforementioned units may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs.

[0188] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the claims and specification of the present invention.

[0189] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for training a cardiac MRI image segmentation model based on semi-supervised learning, characterized in that, Includes the following steps: S1. Acquire cardiac MRI images, add annotation information to the cardiac MRI images, and generate labeled images; S2. Data augmentation of cardiac MRI images is performed using a generative adversarial network to generate unlabeled images; S3. Use labeled and unlabeled images to train the model in a semi-supervised manner to generate a cardiac MRI image segmentation model; S2 includes the following steps: S21. Initialize the generator and discriminator parameters of the generative adversarial network; S22. Using a smooth approximation generative adversarial network framework and employing iterative enhancement, the generator G produces a new cardiac MRI image. S23, Adaptive Loss Function The loss weights are dynamically adjusted based on the differences between the generated image and the real image. S24. An asynchronous update strategy is adopted to train the generator and discriminator separately, and the quality of the generated image is evaluated using the fitness function. The training strategy is then adjusted based on the evaluation results. S25. Repeat steps S22 to S24 until the preset number of training iterations is reached, and use the generative adversarial network to generate unlabeled images. S3 includes the following steps: S31. An unlabeled image is processed by a weak perturbation cell to obtain a weakly perturbated image. The weakly perturbated image is then processed by two strong perturbation cells to obtain two strong perturbation images. S32. Use the model's prediction results for weakly perturbed images as pseudo-labels, and use the pseudo-labels to supervise the prediction results for two strongly perturbed images. S33. By introducing differential feature perturbation into the features output by the encoder corresponding to the weakly perturbed image, the prediction results of the feature perturbation branch are supervised by pseudo-labels. S34. Use an encoder to extract feature maps from the two strongly disturbed images respectively, and then fuse the two feature maps. S35. Input the fused feature map into the decoder to generate the fused prediction result. The fused prediction result and the prediction result of the strongly perturbed image are regularized for consistency. S36. The image segmentation model is trained using the deep learning PyTorch framework and the proposed semi-supervised training method. The weights of the segmentation model Unet are obtained and loaded into the segmentation model Unet to generate a cardiac MRI image segmentation model.

2. The method for training a cardiac MRI image segmentation model based on semi-supervised learning according to claim 1, characterized in that, S1 includes the following steps: S11. Acquire cardiac MRI images from different perspectives and at different stages of the cardiac cycle using MRI scanning technology; S12. The ventricles, atria, heart valves and cardiac lesion areas are marked on cardiac MRI images using manual annotation. Cardiac MRI image data can be represented as: ; in, Indicates the first A cardiac MRI image, It is the total number of images, and each image They all contain detailed information and annotations about the heart's structure. ,in It is an image Annotation information, annotation information This includes the structure of the heart, the classification and location of lesions.

3. The method for training a cardiac MRI image segmentation model based on semi-supervised learning according to claim 1, characterized in that: Step S22 specifically includes: using a smooth approximation generative adversarial network framework and employing iterative enhancement to generate a new cardiac MRI image by generator G. The output of generator G is expressed as: ; in This is the noise vector; Using smooth functions Image processing get The formula is as follows: ; ; in, It is to evaluate the generated image With real images The energy function of the difference between them It is a parameter that controls the smoothness. This represents the gradient of the energy function with respect to the generated image; The formula for calculating the energy function is as follows: ; in, This represents the square of the Euclidean distance between the generated image and the real image; The generated image Re-enter into the generator In the process, iterative enhancements are carried out; Step S23 specifically includes: an adaptive loss function. The loss weights are dynamically adjusted based on the differences between the generated image and the real image; the loss function... The formula is as follows: ; in, These are real cardiac MRI images. It is the cross-entropy loss function. It is a weighting function dynamically calculated based on image differences; Weighting function The algorithm dynamically adjusts the value based on the similarity between the generated image and the real image, using the following formula: ; in, It measures the generated image With real images The function of the difference between them It is a parameter that controls the sensitivity of weight adjustment; Difference function The calculation formula is: ; in, and These represent the width and height of the image, respectively. and They represent the positions respectively. The pixel values ​​of the generated image and the real image.

4. The method for training a cardiac MRI image segmentation model based on semi-supervised learning according to claim 3, characterized in that, The specific steps of S24 are as follows: The score adjustment generator based on the fitness function and discriminator The update frequency and update intensity; Generator The update rules are as follows: ; Discriminator The update rules are as follows: ; in, and These are the learning rates for the generator and discriminator, respectively. It is the loss function of the discriminator; fitness function Used to evaluate the quality of the generated image to guide the asynchronous update strategy, the calculation method can be expressed as: ; in, Let the loss function of the discriminator be its fitness score. The higher.

5. The method for training a cardiac MRI image segmentation model based on semi-supervised learning according to claim 1, characterized in that: The loss function of the semi-supervised image segmentation model includes a supervised loss function and an unsupervised loss function.

6. A cardiac MRI image segmentation method based on semi-supervised learning, characterized in that: The cardiac MRI image to be segmented is input into the segmentation network Unet of the cardiac MRI image segmentation model, and the segmented cardiac MRI image is output. The cardiac MRI image segmentation model is trained by the method described in any one of claims 1-5.

7. An electronic device comprising a processor and a memory communicatively connected to the processor and used for storing processor-executable instructions, characterized in that: The processor is used to execute the method described in any one of claims 1-5 or 6.

8. A server, characterized in that: The method includes at least one processor and a memory communicatively connected to the processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the processor to cause the at least one processor to perform the method as described in any one of claims 1-5 or 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method described in any one of claims 1-5 or 6.