Heart image segmentation method and device, medium and equipment

Through the combination of variational autoencoders and recurrent generative adversarial networks, feature alignment between LGE CMR images and bSSFP CMR images is achieved, which solves the problem of performance degradation during model migration and improves the accuracy and stability of medical image segmentation. , reducing the dependence on annotated data.

CN118587233APending Publication Date: 2024-09-03NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 6 Cited by

Patent Information

Application Number
CN202410708981.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Since deep learning models require a large amount of annotation information in medical image processing, it is difficult to migrate from an image domain with rich annotation information to an image domain with no annotation information or with very little annotation information, resulting in a decline in model performance, especially in LGE CMR images and Severe performance degradation occurs in migration between bSSFP CMR images.

Method used

Using variational autoencoder (VAE) combined with cyclic generative adversarial network (CycleGAN), through explicit global feature, explicit local feature and implicit feature alignment, a segmentation network VAMCEI is constructed to achieve feature alignment of the source domain and target domain, and Train student models through knowledge distillation to avoid supervision semantic errors and inference semantic errors, and improve the stability and accuracy of the model.

Benefits of technology

With a very small amount of LGE annotation information, high-precision segmentation of ventricular and myocardial structures in LGE CMR images is achieved, reducing dependence on annotation data, improving the stability and generalization ability of the model, and significantly improving the segmentation algorithm. accuracy and training efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587233A
    Figure CN118587233A
Patent Text Reader

Abstract

The invention discloses a heart image segmentation method and device, a medium and equipment, and relates to the technical field of medical image processing. The method comprises the following steps: acquiring a labeled bSSFP CMR as a source domain image and an unlabeled LGE CMR image as a target domain image; constructing a VAMCEI model based on a variational encoder; bidirectional conversion of a source domain and a target domain is realized by using CycleGAN, and alignment of the source domain and the target domain in the image appearance is realized; respectively pairing true source domain and false source domain images and true target domain and false target domain images, and inputting the images into a VAMCEI model to realize segmentation supervised learning of alignment features and annotation images; and taking the target domain VAMCEI model and the source domain VAMCEI model as teacher models, learning prediction probabilities of the two models on a target domain image or a pseudo source domain image of the same individual by using knowledge distillation, and finally performing heart image segmentation by using a trained student model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical image processing, and in particular to a cardiac image segmentation method, device, medium and equipment. Background Art

[0002] Deep learning has achieved remarkable results in the field of medical image processing, especially in image segmentation, lesion identification, and disease diagnosis. However, the training process of deep learning models often requires a large amount of data with labeled information, which is particularly difficult for semantic segmentation.

[0003] To overcome this difficulty, researchers have tried to directly migrate models trained in image domains with rich annotated information (also known as source domains) to image domains with no or very little annotated information (also known as target domains). For example, LGE CMR (LGE: Late Gadolinium Enhancement; CMR: CementcardiacMagneticResonance) images enhance the infarcted myocardium, making it show a unique brightness compared with the surrounding healthy tissue. It is an important technology for non-invasive assessment of myocardial infarction and fibrosis, and can clearly depict the area of ​​surviving myocardial infarction. It plays a vital role in the diagnosis and treatment of MI, but its corresponding annotation information is often difficult to obtain. In contrast, bSSFP CMR (cardiac magnetic resonance imaging using balanced steady-state free precession pulse sequence) images can provide clearer myocardial structural boundaries and often have a large amount of available annotation information. Therefore, bSSFP CMR images can be used as the target domain to train the model, and the trained model can be migrated to LGE CMR images for segmentation.

[0004] However, due to the distribution differences between images of different modalities, directly migrating the model trained on bSSFP CMR images to LGE CMR images will lead to severe performance degradation and inaccurate results for LGE CMR image segmentation. Summary of the invention

[0005] Based on this, it is necessary to provide a cardiac image segmentation method, device, medium and equipment to address the above technical problems.

[0006] The present invention adopts the following technical solutions:

[0007] This specification provides a cardiac image segmentation method, comprising:

[0008] A cardiac magnetic resonance image bSSFP CMR image acquired using a balanced steady-state free precession pulse sequence is used as a source domain image, and a bright blood gadolinium delayed enhancement cardiac magnetic resonance image LGE CMR is acquired as a target domain image;

[0009] Constructing a segmentation network VAMCEI, wherein the segmentation network VAMCEI includes an encoder for mapping an input image into a latent variable, a segmenter for mapping the latent variable into a segmentation probability map, and a decoder for segmenting and reconstructing the input image according to the latent variable and the segmentation probability map;

[0010] Using part of the source domain images and part of the target domain images to train a recurrent generative adversarial network, a trained recurrent generative adversarial network capable of aligning the spatial distribution of images is obtained; another part of the source domain images is input into the trained recurrent generative adversarial network to generate fake target domain images, wherein the style of the fake target domain images is the same as that of the target domain images, and the spatial distribution is the same as that of the source domain images; another part of the target domain images is input into the trained recurrent generative adversarial network to generate fake source domain images, wherein the style of the fake source domain images is the same as that of the source domain images, and the spatial distribution is the same as that of the target domain images;

[0011] Pair the true source domain and false source domain images, and the true target domain and false target domain images, and then input them into the segmentation network VAMCEI for training. During the training process, the explicit global features are aligned by continuously reducing the bidirectional KL divergence between the latent variables of the source domain and the target domain, the explicit local features are aligned by continuously shortening the distance between the same categories across domains and enlarging the distance between different categories in the same domain, and the implicit feature alignment is achieved by continuously forcing the distribution of the segmentation probability maps of the two domains to be aligned; the target domain VAMCEI model and the source domain VAMCEI model for aligning the feature space distribution are obtained;

[0012] The target domain VAMCEI model and the source domain VAMCEI model are used as two teacher models, and the segmentation network VAMCEI is used as the student model. The student model is trained by minimizing the prediction probability of the student model and the two teacher models on the target domain images or false source domain images of the same individual to obtain the trained student model; the trained student model is used to segment the ventricular and myocardial structures of the LGE CMR images to be segmented.

[0013] Furthermore, the segmentation network VAMCEI uses a variational encoder as a feature extraction module shared by the source domain and the target domain. During the variational encoder VAE optimization process, three alignment items, namely, explicit global feature alignment, explicit local feature alignment, and implicit feature alignment, are used to align the latent variable distributions of the source domain and the target domain.

[0014] The explicit global feature alignment term is:

[0015]

[0016] The calculation of KL is:

[0017]

[0018] in, and They represent the distribution of intermediate features in the source domain and the target domain respectively, KL[] represents the KL divergence between the two distributions, M represents the mini-batch data size, are the standard deviations of the kth dimension of the posterior distribution of the i-th and j-th source domain samples, respectively. is the standard deviation of the kth dimension of the posterior distribution of the i-th target domain sample, are the means of the kth dimension of the posterior distribution of the i-th and j-th source domain samples, respectively. is the mean of the kth dimension of the posterior distribution of the i-th target domain sample;

[0019] The explicit local feature alignment term is:

[0020]

[0021] Where K represents the number of categories, τ represents the preset temperature, and Represent the prototypes of the i-th category in the source domain and the target domain respectively;

[0022] The implicit feature alignment item is:

[0023]

[0024] Among them, x s and x T denote the source domain and target domain images respectively, P T They represent the corresponding output probability maps respectively, and Dis represents the discriminator network.

[0025] Furthermore, the training process of the segmentation network VAMCEI includes:

[0026] The domain discriminator used to identify the segmentation probability map is fixed and all remaining models are trained. This process optimizes the autoencoder VAE while aligning the intermediate features of the two domains from multiple angles. The loss function of this process is:

[0027]

[0028] In the above formula, the first three terms are alignment terms, the middle three terms are source domain specific terms, and the last two terms are target domain specific terms, where α represents the loss balance weight;

[0029] The domain discriminator is trained and all remaining models are fixed. This process is used to improve the discriminative ability of the domain discriminator. The loss function of this process is an implicit feature alignment term.

[0030] Furthermore, the loss function used in the process of training the student model is:

[0031]

[0032] where p i represents the average segmentation probability map of the two teacher models, q i represents the output probability map of the student model, and T represents the distillation temperature.

[0033] Furthermore, the encoder uses a U-Net style network as a feature extractor to extract image features of three different scales, and simultaneously performs multi-level alignment blocks on the features of the three different scales to output latent variables;

[0034] The segmenter outputs prediction probabilities of three different scales through several convolutional layers and fuses them to output a segmentation probability map;

[0035] The decoder processes the concatenated aligned latent vectors and segmentation prediction maps using consecutive convolutional layers to reconstruct the input image.

[0036] This specification provides a cardiac image segmentation device, comprising:

[0037] A data acquisition module, used to use the acquired cardiac magnetic resonance image bSSFP CMR image performed using a balanced steady-state free precession pulse sequence as a source domain image, and the acquired bright blood gadolinium delayed enhancement cardiac magnetic resonance image LGE CMR as a target domain image;

[0038] A segmentation network VAMCEI construction module, used to construct a segmentation network VAMCEI, wherein the segmentation network VAMCEI includes an encoder for mapping an input image into a latent variable, a segmenter for mapping the latent variable into a segmentation probability map, and a decoder for segmenting and reconstructing the input image according to the latent variable and the segmentation probability map;

[0039] A feature alignment module is used to train a recurrent generative adversarial network using part of the source domain images and part of the target domain images to obtain a trained recurrent generative adversarial network capable of aligning the spatial distribution of images; and input another part of the source domain images into the trained recurrent generative adversarial network to generate a fake target domain image, wherein the style of the fake target domain image is the same as that of the target domain image, and the spatial distribution is the same as that of the source domain image; and input another part of the target domain images into the trained recurrent generative adversarial network to generate a fake source domain image, wherein the style of the fake source domain image is the same as that of the source domain image, and the spatial distribution is the same as that of the target domain image;

[0040] It is used to pair the true source domain and false source domain images, and the true target domain and false target domain images, and then input them into the segmentation network VAMCEI for training. During the training process, the explicit global features are aligned by continuously reducing the bidirectional KL divergence between the latent variables of the source domain and the target domain, the explicit local features are aligned by continuously shortening the distance between the same categories across domains and enlarging the distance between different categories in the same domain, and the implicit feature alignment is achieved by continuously forcing the distribution of the segmentation probability maps of the two domains to be aligned; the target domain VAMCEI model and the source domain VAMCEI model for aligning the feature space distribution are obtained;

[0041] The teacher-student model construction module is used to use the target domain VAMCEI model and the source domain VAMCEI model as two teacher models, and the segmentation network VAMCEI as the student model. The student model is trained by minimizing the prediction probability of the student model and the two teacher models on the target domain image or the false source domain image of the same individual to obtain a trained student model; the trained student model is used to segment the ventricular and myocardial structures of the LGE CMR image to be segmented.

[0042] This specification provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above cardiac image segmentation method is implemented.

[0043] This specification provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned cardiac image segmentation method when executing the program.

[0044] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0045] In the cardiac image segmentation method provided in this specification, first, the style alignment of bSSFP CMR images and LGE CMR images is achieved through a cyclic generative adversarial network, which can make them more similar in visual features, but still retain the structural information of the original image. Then, the false data and true data generated by the cyclic generative adversarial network are paired and input into the constructed segmentation network VAMCEI, and the feature alignment of bSSFP CMR images and LGE CMR images is achieved by aligning the hidden variables and segmentation probability maps of the source domain and the target domain during the training process; so that the network not only learns how to segment the image, but also learns how to align the two different styles of images at the feature level to ensure the stability of the model during the migration process. Finally, the student model is trained using knowledge distillation to avoid the supervised semantic errors and inference semantic errors introduced by the use of the cyclic generative adversarial network in the standard domain VAMCEI model and the source domain VAMCEI, further ensuring the stability and accuracy of the model during the migration process. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0047] Figure 1 A schematic diagram of a cardiac image segmentation method provided in this specification;

[0048] Figure 2 The structure diagram of the segmentation network VAMCEI provided in this manual;

[0049] Figure 3 End-to-end feature alignment module diagram provided for this specification;

[0050] Figure 4 The multi-stage UDA algorithm framework provided for this specification;

[0051] Figure 5 The complete flow chart of the UDA algorithm provided for this specification;

[0052] Figure 6 Visual comparison chart of the VAMCEI module ablation experiment on the MSCMRSeg 2019 dataset provided for this manual, where the first column is the original image, the second column is the segmentation result of the baseline model, the third column is the segmentation result with the explicit local feature alignment term Pro added, and the fourth column is the segmentation result with the implicit feature alignment term L added. dis The segmentation result, the fifth column is adding Pro and L at the same time dis The sixth column shows the segmentation results with explicit global feature alignment items D, Pro, and L added simultaneously. disThe seventh column is the real segmentation result;

[0053] Figure 7 Visual comparison chart of the VAMCEI module ablation experiment on the MyoPS 2020 dataset provided for this manual; the first column is the original image, the second column is the segmentation result of the baseline model, the third column is the segmentation result with the explicit local feature alignment term Pro added, and the fourth column is the segmentation result with the implicit feature alignment term L added. dis The segmentation result, the fifth column is adding Pro and L at the same time dis The sixth column shows the segmentation results with explicit global feature alignment items D, Pro, and L added simultaneously. dis The seventh column is the real segmentation result;

[0054] Figure 8 Schematic diagram of t-SNE visualization feature comparison of VarDA and VAMCEI modules provided in this manual;

[0055] Fig. 9 A visual comparison diagram of the multi-stage UDA framework ablation experiment on the MSCMRSeg 2019 dataset provided for this specification; wherein the first column is the original image, the second column is the segmentation result trained only on the source domain image, the third column is the segmentation result of correct supervision, the fourth column is the segmentation result of correct inference, the fifth column is the segmentation result of the third and fourth columns combined by distillation learning, the sixth column is the segmentation result of adding VAMCEI on the basis of correct supervision, the seventh column is the segmentation result of adding VAMCEI on the basis of correct inference, the eighth column is the segmentation result of the sixth and seventh columns combined by distillation learning, and the ninth column is the true segmentation result;

[0056] Fig.10 A visual comparison diagram of the multi-stage UDA framework ablation experiment on the MyoPS 2020 dataset provided for this manual; the first column is the original image, the second column is the segmentation result trained only on the source domain image, the third column is the segmentation result of correct supervision, the fourth column is the segmentation result of correct inference, the fifth column is the segmentation result of the third and fourth columns combined by distillation learning, the sixth column is the segmentation result of adding VAMCEI on the basis of correct supervision, the seventh column is the segmentation result of adding VAMCEI on the basis of correct inference, the eighth column is the segmentation result of the sixth and seventh columns combined by distillation learning, and the ninth column is the true segmentation result;

[0057] Fig.11 A schematic diagram of a computer device for implementing a cardiac image segmentation method provided in this specification. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0059] Deep learning has achieved remarkable results in the field of medical image processing, especially in image segmentation, lesion identification and disease diagnosis. However, the training process of deep learning models often requires a large amount of data with annotated information, which is particularly difficult for semantic segmentation. To overcome this difficulty, researchers have tried to directly migrate the model trained in the image domain with rich annotated information (also known as the source domain) to the image domain with no or very little annotated information (also known as the target domain). However, the distribution difference between the source domain and the target domain often leads to serious performance degradation of the model. To this end, unsupervised domain adaptation (UDA) was introduced to solve the above problem. Similarly, in the field of medical image processing, medical images of different modalities are usually used to meet different needs of disease diagnosis and treatment. For example, LGE CMR images enhance the infarcted myocardium to make it show a unique brightness compared with the surrounding healthy tissue, which plays a vital role in the diagnosis and treatment of MI, but its corresponding annotation information is often difficult to obtain. In contrast, balanced-Steady State Free Precession (bSSFP) CMR images can provide clearer myocardial structure boundaries and often have a large amount of available annotation information. Due to the distribution differences between different modality images (e.g., LGE and bSSFP), directly migrating the model trained on bSSFP CMR images to LGE CMR images will result in serious performance degradation. To solve the above problems, an embodiment of the present application proposes an end-to-end VAE based feature alignment module (VAE based featureAlignment Module Combining Explicit and Implicit features, VAMCEI) based on a variational autoencoder (VAE), and combines cycle-consistent adversarial networks (CycleGAN) and VAMCEI to further propose a more sophisticated multi-stage UDA segmentation framework.

[0060] The UDA algorithm aims to extract domain-invariant feature representations while ensuring the separability of predefined categories. UDA algorithms for medical images are generally divided into three categories: difference minimization-based, adversarial learning-based, and reconstruction-based. Difference minimization-based UDA algorithms directly measure and optimize distribution differences to extract domain-invariant feature representations. Based on correlation alignment, Sun et al. proposed Deep CORAL, which can align the correlation of layer activations in deep neural networks by learning nonlinear transformations. Wu et al. proposed CF distance and VarDA successively. The former minimizes the difference between probability density functions by minimizing the L2 norm of distribution feature functions. The latter introduces the L2 norm between feature distributions as a regularization term under the setting of VAE. Yue et al. minimize the difference between segmentation results and prior knowledge from the perspective of shape and space respectively. The adversarial learning-based method implicitly forces the model to generate domain-invariant feature representations by constructing generators and discriminators and enabling them to participate in competitive iterations. Combining adversarial loss, cycle consistency loss, and shape consistency loss, Zhang et al. proposed a general cross-modal synthesis method that can significantly reduce the geometric distortion of generated images. Chen et al. can effectively preserve image objects by restricting the information bottleneck to a cycle-consistency-based adversarial learning network while ensuring the consistency of decoupled content features. Vesal et al. proposed an end-to-end framework based on adversarial learning by combining entropy minimization, output space alignment, and point cloud shape adaptation. Pei et al. considered decoupling feature representation into domain-invariant and domain-specific features, while using cycle consistency constraints to ensure anatomical consistency. Chen et al. proposed an end-to-end UDA framework SIFA, which presents adaptive collaborative fusion from the perspective of images and features. Reconstruction-based methods use the reconstruction of target domain images as an auxiliary task. For example, Ghifary et al. simultaneously perform supervised learning on the source domain and unsupervised reconstruction on the target domain, making the features of the target domain more meaningful for the prediction task. Methods based on difference minimization are easy to train, but the difference distance is usually not calculated accurately or is difficult to calculate. Methods based on adversarial learning can usually achieve better results, but the training is complex and sensitive to hyperparameters.

[0061] In summary, for the task of fully automatic and accurate segmentation of ventricular and myocardial structures in LGE CMR images, the existing technologies have the following shortcomings: 1. The current deep learning-based methods rely on a large amount of data with annotated information, and the cost of obtaining the annotated information of LGE CMR images is high, which brings great difficulties to the training of related algorithms and the application in actual scenarios. 2. The current UDA method used to solve the above problems is not accurate enough and it is difficult to handle complex segmentation areas. 3. The current UDA method is difficult to train and has poor generalization ability, making it difficult to handle UDA tasks in various scenarios.

[0062] Based on this, the embodiment of the present application provides a new method for medical image processing of patients with myocardial infarction (MI), which can realize the fully automatic and accurate segmentation of the left and right ventricles and myocardial structures of Late Gadolinium Enhancement (LGE) cardiac magnetic resonance (CMR) images with only a very small amount of LGE annotation. The embodiment of the present application can be used to fully automatically and accurately divide the functional structure of LGECMR images of MI patients, helping doctors to efficiently lock the infarct area, and plays a vital role in the diagnosis and treatment of MI. At the same time, the embodiment of the present application greatly reduces the dependence of the segmentation algorithm on the labeled data, which greatly promotes the application of artificial intelligence algorithms in medical scenarios. The new method proposed in this application has the following advantages:

[0063] ① Based on variational autoencoder, a new end-to-end feature alignment module VAMCEI is proposed, which can reliably measure the KL divergence between the posterior distributions of the two domains. At the same time, it adds category-based feature alignment and adversarial learning in the output space, which can achieve high-precision segmentation of LGE CMR images with only a very small amount of LGE annotation information.

[0064] ② Combining CycleGAN and VAMCEI, a multi-stage UDA framework is further proposed to further enhance the model's ability to handle complex structures. CycleGAN is used to align the distribution of the image space, and VAMCEI is used to align the distribution of the feature space. However, CycleGAN does not use paired images to achieve bidirectional transformation of image style, and does not restrict image semantics, which makes the image after modal conversion uncontrollable semantic tampering. When supervised learning is performed on images with target domain style, the generated target domain style image does not match the source domain semantic annotation, which will introduce erroneous supervision information, which is also referred to as supervised semantic errors in the embodiments of this application. In contrast, when supervised learning is performed on images with source domain style, the generated source domain style image does not match the target domain semantic annotation, which will protect the correct supervision information, but introduce erroneous semantic correspondences in the verification and inference process, which is also referred to as inference semantic errors in the embodiments of this application. The embodiments of this application believe that these two types of errors are complementary, and propose a more sophisticated multi-stage UDA framework to avoid these two types of errors at the same time with the help of knowledge distillation.

[0065] ③ The VAMCEI model and UDA algorithm proposed in the embodiment of the present application are based on variational autoencoders, with low training cost and difficulty, efficient training process, extremely fast convergence speed, and easy integration into other algorithm frameworks.

[0066] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0067] Figure 1 This is a flow chart of a cardiac image segmentation method in an embodiment of the present application, which specifically includes the following steps:

[0068] Step 1: Using the cardiac magnetic resonance image bSSFPCMR image acquired using a balanced steady-state free precession pulse sequence as a source domain image, and using the bright blood gadolinium delayed enhancement cardiac magnetic resonance image LGE CMR acquired as a target domain image.

[0069] Before model training, you first need to set the source domain and target domain, and preprocess the image. In this embodiment of the application, the MSCMRSeg 2019 dataset is taken as an example, and the bSSFP modality is set as the source domain and the LGE is set as the target domain. The bSSFP modality has a large amount of annotation information that can be used for training, while LGE has only a very small amount of annotation and is only used for verification. The image preprocessing operations of the embodiment of the present application are as follows: (1) First, the training image is uniformly cropped to 192×192 around the area to be segmented; (2) Then use the normalization operation to make the image data obey the distribution with a mean of 0 and a standard deviation of 1; (3) Finally, during the training process, the image is enhanced online, including random flipping, random cropping, etc.

[0070] Step 2: construct a segmentation network VAMCEI, wherein the segmentation network VAMCEI includes an encoder for mapping an input image into latent variables, a segmenter for mapping the latent variables into a segmentation probability map, and a decoder for segmenting and reconstructing the input image according to the latent variables and the segmentation probability map.

[0071] The embodiment of the present application proposes an end-to-end feature alignment module VAMCEI based on variational autoencoders. First, a shared encoder is used to map the bSSFP and LGE modal images to the same dimension of latent variable space respectively. Then, the latent variables of the two domains are used as the input of the shared segmenter to output the segmentation probability map. Finally, the latent variables and the segmentation map are spliced ​​and input into the decoder to reconstruct the original image, ensuring the integrity of the semantic information in the extracted features. Based on the above network structure, the embodiment of the present application first proposes a new regularization term for directly measuring the KL divergence between the posterior distributions of the latent variables of the two domains. In the process of jointly optimizing the VAE loss and the above regularization term, the spatial distribution of the latent variables of the source domain and the target domain is continuously and explicitly aligned, which can also be called the intermediate feature distribution. Secondly, an explicit category alignment term based on a prototype is introduced to shorten the distance between the centers of the same category across domains while widening the distance between the centers of different categories in the domain. Finally, an implicit alignment term based on contrastive learning is introduced in the output space.

[0072] In the VAMCEI module, the specific structures of Encoder, Segmentor and Decoder are as follows: Figure 2 As shown. In the Encoder, a U-Net style network is used as a feature extractor to extract image features of three different scales. At the same time, inspired by deep supervision, the features of three different scales are aligned at multiple levels. In the Segmentor, the prediction probabilities of three different scales are output through several convolutional layers, and then fused to output the final segmentation prediction. In the Decoder, the aligned features and the segmentation prediction map are spliced ​​and used to reconstruct the original image after passing through continuous convolutional layers. The overview of the VAMCEI module proposed in the embodiment of the present application is as follows. Figure 3 As shown in the figure. First, the segmentation network is divided into a feature extraction module and a classification module. Then, VAE is used as a feature extraction module shared by the source domain and the target domain to directly align the feature distributions of the source domain and the target domain from the global and category levels. Then, a domain discriminator is connected to the output space to indirectly align the intermediate feature distributions and make the extracted features more conducive to segmentation.

[0073] In order to align the latent variable distributions of the source domain and the target domain, three alignment items are proposed: explicit global feature alignment, explicit local feature alignment, and implicit feature alignment. During the optimization process, VAE continuously normalizes the distribution of the latent variable space, which is very important for the UDA task. To this end, the embodiment of the present application uses a shared VAE to extract features from the source domain and the target domain. According to the derivation, under the setting of VAE, the lower bound of the joint log-likelihood is shown in Equation 1:

[0074]

[0075] Where x represents the input image, y represents the corresponding annotation information, and z represents the latent variable. The first term of Equation 1 represents the distance between the approximate posterior distribution of the latent variable and the prior distribution. The prior distribution p θ (z) is the multivariate standard normal distribution N(0,I), and q φ (z|x i ) follows the distribution N(μ i ,∑(x i )), where μ i =(μ i1 ,μ i2 ,…,μ in ),∑(x i )=diag(σ i1 2 ,σ i2 2 ,…,σ in 2 ). In the mini-batch data, the first term can be further expressed as shown in Equation 2.

[0076]

[0077] Where M represents the mini-batch data size and n represents the posterior distribution q φ ( z|x i ). The second term represents the reconstructed image conditioned on the true annotation and the latent variable. The logarithmic probability of the present application embodiment is to reconstruct the image by minimizing The binary cross entropy between the original image x and x optimizes this term, which is specifically expressed in the mini-batch as shown in Equation 3:

[0078]

[0079] The third term represents the prediction result conditioned on the latent variable The logarithmic probability of , its loss function in mini-batch is specifically expressed as shown in Equation 4:

[0080]

[0081] The embodiment of the present application uses VAE to extract feature representations of the source domain and the target domain respectively, and continuously normalizes the feature distribution. It is worth noting that in the target domain, the annotation information is not available. For this reason, in the second term of Equation 1, y is used instead of The third item is no longer considered.

[0082] Explicit global feature alignment: In order to directly measure the distribution distance between the intermediate features of the two domains, the embodiment of the present application sets up a VAE encoder shared by the two domains to perform feature extraction. During the VAE optimization process, the distribution of the intermediate features of the two domains is and The distance between the two posterior distributions N(0,I) is getting shorter and shorter. However, the two intermediate feature distributions are different, and the above optimization constraints alone cannot achieve satisfactory results. Therefore, we re-derive the bidirectional KL divergence between the two posterior distributions, as shown in Equation 5:

[0083]

[0084] in and Represent the distribution of the intermediate features of the source domain and the target domain respectively. Since the calculations of the two terms on the right side of Equation 5 are similar, only the first term is described in detail in this embodiment of the application. For ease of calculation, the average approximation of the posterior distribution is used in the mini-batch to replace the complete distribution of the intermediate features, which is specifically expressed as shown in Equation 6:

[0085]

[0086] Where M represents the size of the mini-batch. and Denote the posterior distribution of the two domain features respectively. Since it is challenging to directly solve the logarithm of the sum of multiple probability distributions in Equation 6, the embodiment of the present application approximates it as shown in Equation 7.

[0087]

[0088] In addition, since multivariate distribution calculations involve multiple consecutive multiplication calculations, significant errors will be generated during the gradient descent optimization process. Therefore, the present embodiment treats z as n independent univariate normal distributions. In the VAE optimization process, it is assumed that the posterior distribution of the latent variable satisfies the Gaussian distribution. In other words, the posterior distribution and The jth dimension follows the distribution and In summary, the embodiment of the present application approximates Equation 7 to Equation 8.

[0089]

[0090] in, and They represent the distribution of intermediate features in the source domain and the target domain respectively, KL[] represents the KL divergence between the two distributions, M represents the mini-batch data size, are the standard deviations of the kth dimension of the posterior distribution of the i-th and j-th source domain samples, respectively. is the standard deviation of the kth dimension of the posterior distribution of the i-th target domain sample, are the means of the kth dimension of the posterior distribution of the i-th and j-th source domain samples, respectively. is the mean of the kth dimension of the posterior distribution of the i-th target domain sample.

[0091] Explicit local feature alignment: The average value of features corresponding to the same category is called the prototype, then the prototype C of k categories k The calculation is shown in Equation 9.

[0092]

[0093] where z ij represents the j-th dimension feature of the i-th sample in the mini-batch, y ijIndicates its corresponding label, I represents the indicative function, M and n represent the mini-batch size and the dimension size of the intermediate feature, respectively. In order to further align features at the category level and enhance the robustness of the model, the present embodiment adds a contrast loss term to shorten the distance between prototypes of the same category across domains and increase the distance between prototypes of different categories within the domain. In the contrast loss term proposed in the present embodiment, for the prototypes of the target domain k category (k = 0, 1, 2, 3) The positive sample is The remaining prototypes are negative samples. The contrast loss is getting shorter and shorter. The distance between the positive sample and the negative sample is enlarged. Therefore, combined with the cosine similarity, the contrast loss term is specifically expressed as shown in Equation 10:

[0094]

[0095] Where K represents the number of categories, τ represents the preset temperature, and Represent the prototypes of the i-th category in the source domain and the target domain respectively.

[0096] Implicit feature alignment: We add a domain discriminator to the output space to force the output distributions of the two domains to be similar, indirectly aligning the intermediate feature distributions and forcing the encoder to extract features that are more conducive to segmentation. During the training of the domain discriminator, in order to enable it to identify the domain of the output prediction, the adversarial loss is set as shown in Equation 11:

[0097]

[0098] where x s and x T denote the source domain and target domain images respectively, P S and P T They represent the corresponding output probability maps, and Dis represents the discriminator network. During the encoder training process, in order to make the intermediate features generated by the encoder confuse the domain discriminator, the adversarial loss is set as shown in Equation 12:

[0099]

[0100] Among them, x s and x T denote the source domain and target domain images respectively, P T They represent the corresponding output probability maps respectively, and Dis represents the discriminator network.

[0101] Complete algorithm and loss function: In summary, the VAMCEI module training process is divided into two parts: (1) fix the domain discriminator and train all remaining models. This process optimizes VAE while aligning the intermediate features of the two domains from multiple perspectives. The complete loss function is shown in Equation 13, which is divided into three parts: alignment terms (1-3 terms), source domain specific terms (4-6 terms), and target domain specific terms (7-8 terms), where α represents the loss balance weight. (2) Train the domain discriminator and fix all remaining models; This process is used to improve the discriminative ability of the domain discriminator, and the loss function is shown in Equation 12.

[0102]

[0103] Step 3. Use source domain images and target domain images to train a recurrent generative adversarial network for aligning image spatial distribution, and use the recurrent generative adversarial network to generate fake source domain images and fake target domain images; pair the true source domain and fake source domain images, and the true target domain and fake target domain images and input them into the segmentation network VAMCEI for training. During the training process, the latent variables and segmentation probability maps of the source domain and target domain are aligned to obtain the target domain VAMCEI model and the source domain VAMCEI model for aligning feature spatial distribution.

[0104] Combining CycleGAN and VAMCEI, the present application embodiment further proposes a more sophisticated multi-stage algorithm framework, as follows: Figure 4 As shown. First, a CycleGAN is trained to achieve bidirectional conversion between LGE and bSSFP modalities, and then Target VAMCEI and Source VAMCEI are trained on the target domain style image and the source domain style image respectively. Finally, using knowledge distillation, a Student VAMCEI is trained to avoid the two types of errors introduced in TargetVAMCEI and Source VAMCEI, further improving the segmentation accuracy of the model. Combining CycleGAN and the efficient feature alignment module proposed in the embodiment of the present application, the embodiment of the present application further proposes a more sophisticated UDA framework based on image conversion, which avoids supervised semantic errors and inferred semantic errors. The complete algorithm framework is shown in the figure below. Figure 5As shown. This algorithm is divided into two stages. In the first stage, first, CycleGAN is used to realize the bidirectional conversion between the source domain and the target domain, and the source domain and the target domain are aligned in the image appearance. Then, the true source domain and the false source domain images, the true target domain and the false target domain images are paired, respectively, and input into the VAMCEI module to realize the supervised learning of the segmentation of further aligned features and annotated images. The cyclic generative adversarial network is trained using part of the source domain images and part of the target domain images to obtain a trained cyclic generative adversarial network that can align the spatial distribution of images; and another part of the source domain images is input into the trained cyclic generative adversarial network to generate a fake target domain image, the style of the fake target domain image is the same as that of the target domain image, and the spatial distribution is the same as that of the source domain image; another part of the target domain images is input into the trained cyclic generative adversarial network to generate a fake source domain image, the style of the fake source domain image is the same as that of the source domain image, and the spatial distribution is the same as that of the target domain image.

[0105] In the second stage, knowledge distillation is used to learn the prediction probabilities of the two models on the target domain image or pseudo source domain image of the same individual. Through the first stage of the algorithm, two models with complementary knowledge can be obtained, but they have supervised semantic errors and inferred semantic errors respectively. To this end, the embodiment of the present application designs a distillation loss function to integrate the knowledge learned by the two, using the target domain VAMCEI model and the source domain VAMCEI model as two teacher models, and the segmentation network VAMCEI as the student model. The student model is trained by minimizing the prediction probability of the student model and the two teacher models on the target domain image or pseudo source domain image of the same individual to obtain a trained student model; the trained student model is used to segment the ventricular and myocardial structures of the LGE CMR image to be segmented, and the loss function used in the training process of the student model is shown in Equation 14:

[0106]

[0107] where p i represents the average output probability map of the two teacher models, q i represents the output probability map of the student model, and T represents the distillation temperature.

[0108] based on Figure 1 The cardiac image segmentation method shown in the figure has the following advantages over the traditional LGECMR segmentation algorithm:

[0109] 1. Reduce the demand for annotated data in fully automatic segmentation algorithms; the segmentation accuracy of existing segmentation algorithms is highly dependent on training data and annotation quality, but annotation acquisition is extremely time-consuming and labor-intensive. To this end, the present application embodiment proposes an end-to-end VAMCEI and multi-stage UDA framework that can achieve high-precision segmentation of unknown image domains using only existing data.

[0110] 2. Improve the accuracy of the segmentation algorithm; the existing UDA algorithm is difficult to train, takes a long time to train, has low segmentation accuracy and poor generalization ability. The end-to-end VAMCEI and multi-stage UDA framework proposed in the embodiment of this application achieves segmentation accuracy that exceeds the SOTA method, while being efficient to train and easily expandable to the existing algorithm framework.

[0111] 3. Greatly enhance the possibility of intelligent algorithm application in actual scenes: When there is a significant difference between the image domain distribution of the actual scene and the training image distribution, the model will show a significant performance degradation, which brings great difficulties to the application of the algorithm. The end-to-end VAMCEI and multi-stage UDA framework proposed in the embodiment of the present application can quickly align the feature distribution, thereby eliminating the impact of the actual distribution difference on the model.

[0112] In the cardiac image segmentation method provided in the embodiment of the present application, first, the style alignment of the bSSFP CMR image and the LGE CMR image is achieved through a cyclic generative adversarial network, which can make them more similar in visual features, but still retain the structural information of the original image. Then, the false data and true data generated by the cyclic generative adversarial network are paired and input into the constructed segmentation network VAMCEI, and the feature alignment of the bSSFP CMR image and the LGE CMR image is achieved by aligning the hidden variables and segmentation probability maps of the source domain and the target domain during the training process; so that the network not only learns how to segment the image, but also learns how to align the two different styles of images at the feature level to ensure the stability of the model during the migration process. Finally, the student model is trained using knowledge distillation to avoid the supervised semantic errors and inferred semantic errors introduced by the use of the cyclic generative adversarial network in the standard domain VAMCEI model and the source domain VAMCEI, further ensuring the stability and accuracy of the model during the migration process.

[0113] When applying the cardiac image segmentation method provided in the embodiment of the present application, it is not necessary to Figure 1 The steps are executed in the order shown. The specific execution order of the steps can be determined as needed, and the embodiments of the present application do not limit this.

[0114] In order to verify the effectiveness of the algorithm proposed in the embodiment of the present application, extensive comparative experiments and ablation experiments were carried out on the two datasets, MSCMRSeg 2019 and MyoPS 2020. Among them, MSCMRSeg 2019 contains 45 groups of multimodal CMR images (bSSFP, LGE, T2), 35 groups of bSSFP and T2 modality image annotations, and 5 groups of LGE modality image annotations. This dataset is specifically used to encourage the research of domain adaptive algorithms, and to examine the effect of the algorithm on the segmentation of myocardial structures in LGE images when using a large number of other modality images and their annotations as well as a large number of LGE images. The embodiment of the present application selects bSSFP modality images as the source domain and LGE as the target domain, and examines the segmentation performance of the algorithm of the embodiment of the present application on 40 groups of unlabeled LGE images. MyoPS2020 includes (1) training set: 25 groups of registered and annotated multimodal CMR images (bSSFP, LGE, T2); (2) test set: 20 groups of registered and unannotated multimodal CMR images (bSSFP, LGE, T2). Since MyoPS2020 is mainly used to examine the segmentation performance of the model for myocardial pathological areas, the amount of test data is small and its annotations are not public, so the embodiment of this application must preprocess it. The preprocessing steps are: (1) The embodiment of this application selects the bSSFP modality images in the MSCMRSeg2019 dataset as the source domain; (2) The annotated LGE modality images in the MyoPS 2020 dataset are selected as the target domain; (3) The cardiomyopathy pathology area in the MyoPS 2020 dataset annotation is classified as the myocardial area.

[0115] All experiments in the embodiments of this application are conducted on a server equipped with an NVIDIA GeForce RTX 3090 GPU. During the training process of VAMCEI, the training rounds are set to 30 and the weight decay is 1e -5 The initial learning rate is 1e-4 and decays during the training process. α1, α2, α3, α4, α5, and α6 are set to 1e -3 , 1e -3 , 1e -2 , 1.0, 10.0 and 3e-3. During the knowledge distillation process, the distillation temperature is set to 20 and the learning rate is set to 1e -3 In both VAMCEI and knowledge distillation, data augmentation operations such as resizing, center cropping, random flipping, etc. are used.

[0116] Comparative test:

[0117] The method proposed in the embodiment of the present application is compared with the high ranking results and SOTA methods in the MSCMRSeg 2019 and MyoPS 2020 competitions, mainly examining the segmentation performance of the algorithm for the three main anatomical structures of the heart: left ventricle (LV), right ventricle (RV) and myocardium (Myo). At the same time, the volume Dice similarity coefficient and Hausdoff distance are selected as evaluation indicators. The comparison results of the two data sets are shown in Tables 1 and 2.

[0118] The data in Table 1 show that: (1) On the MSCMRSeg 2019 dataset, the end-to-end VAMCEI proposed in the embodiment of the present application achieved an average Dice similarity coefficient of 82.77% and an average Hausdoff distance of 22.28 mm, and the multi-stage UDA method achieved an average Dice similarity coefficient of 85.96% and an average Hausdoff distance of 16.31 mm; (2) The supervised method is always significantly better than the unsupervised method, even with very little supervised information; (3) The algorithm proposed in the embodiment of the present application is completely unsupervised and achieves very competitive results. The data in Table 2 show that: (1) On the MyoPS 2020 dataset, the end-to-end VAMCEI proposed in the embodiment of the present application achieved an average Dice similarity coefficient of 75.02% and an average Hausdoff distance of 12.27 mm, and the multi-stage UDA method achieved an average Dice similarity coefficient of 81.20% and an average Hausdoff distance of 12.32 mm; (2) The method proposed in the embodiment of the present application is significantly better than the SOTA method. Compared with SIFA based on adversarial learning, the VAMCEI and multi-stage UDA frameworks proposed in the embodiments of the present application achieved improvements of 20.43% and 26.61% respectively. Compared with VarDA based on difference minimization, the methods proposed in the embodiments of the present application achieved improvements of 3.96% and 10.14% respectively.

[0119] Table 1 Comparison of the performance of the algorithm framework proposed in the embodiment of this application on the MSCMRSeg 2019 dataset with the results of the competition team and the SOTA method; “US”

[0120] Denotes unsupervised learning, “S” denotes supervised learning, “C” denotes results presented in the MSCMRSeg 2019 challenge, and “N” denotes results presented outside the competition.

[0121]

[0122] Table 2 Comparison of the performance of the algorithm framework proposed in the embodiment of the present application on the MyoPS 2020 dataset with the results of the competition team and the SOTA method; "US" means unsupervised learning, "S" means supervised learning, "C" means the results presented in the MyoPS 2020 challenge, and "N" means the results presented outside the competition.

[0123]

[0124] Ablation experiment:

[0125] In order to observe the effectiveness of VAMCEI more intuitively, ablation experiments are performed on each component of VAMCEI. The ablation experiment results on the MSCMRSeg 2019 and MyoPS2020 datasets are shown in Tables 3 and 4, and the corresponding visualization results are shown in Tables 3 and 4. Figure 6 , 7 As shown, Figure 6 , Figure 7 LV, RV and Myo are represented in blue, green and yellow, respectively. The red box represents the area with significant improvement. The above ablation experiment results show that: (1) Compared with the Baseline, VAMCEI improves the Dice average similarity coefficient by 5.24% and 3.96% on the two datasets, respectively, and reduces the Hausdoff distance by 11.83mm and 4.43mm, respectively; (2) In the VAMCEI module, the embodiment of the present application combines explicit and implicit distribution alignment based on VAE, which significantly improves the quality of myocardial segmentation and optimizes the segmentation boundary. (3) The alignment items proposed in the embodiment of the present application complement and promote each other. For example, on MSCMRSeg 2019, the performance of adding category center alignment and implicit alignment at the same time is better than adding either one separately. (4) The number of target domain images significantly affects the effect of domain generalization. For example, the same source domain data is used in the experimental setting and the target domain data is replaced. Experimental results show that when the target domain is changed from MSCMRSeg 2019 with 686 LGE CMR 2D slices to the MyoPS2020 dataset with only 391 2D slice images, the performance of VAMCEI proposed in the embodiment of the present application drops by 7.75%.

[0126] To more clearly demonstrate the impact of VAMCEI on feature alignment, t-SNE is used to visualize the features in the source and target domains, as shown in Figure 8 As shown, Figure 8 The dark and light dots represent the dimensionality reduction features of the source and target domains, respectively. The image information indicates that the features extracted by VAMCEI are more difficult to separate than those of VarDA. At the same time, the features extracted by VAMCEI are more compact, and the differences between the source and target domain features are more negligible.

[0127] Table 3 VAMCEI ablation experiment results on MSCMRSeg 2019 dataset

[0128]

[0129] Table 4 VAMCEI ablation experiment results on the MyoPS 2020 dataset

[0130]

[0131] In order to clarify the effectiveness of the multi-stage UDA algorithm framework proposed in the embodiment of this application, ablation experiments were conducted on MSCMRSeg 2019 and MyoPS 2020. The experimental results are shown in Tables 5 and 6. Fig. 9 , 10 As shown, Fig. 9 , Fig.10 LV, RV and Myo are represented by blue, green and yellow respectively. The red box represents the area with obvious improvement. Comparative data show that: (1) The VAMCEI module proposed in the embodiment of the present application achieves significant performance improvement. In Table 5, the addition of the VAMCEI module increased the average Dice similarity coefficient by 7.03% in the correct supervision experiment, by 2.30% in the correct reasoning experiment, and by 3.89% in the experiment combining the two models. (2) The correctly inferred model is better than the correctly supervised model. For example, Table 5 compares the experimental results of Group 5 and Group 6 after adding the VAMCEI module. The average Dice similarity coefficient of the latter is 6.17% higher than that of the former. (3) The combination of correct supervision and correct recommendation models further significantly improves model performance. For example, the average Dice of Group 7 in Table 5 is 7.26% higher than that of Group 5 and 1.09% higher than that of Group 6.

[0132] Table 5 Ablation experiments of the multi-stage UDA algorithm on the MSCMRSeg 2019 dataset. “CorrectSupervision” means correct supervised learning on the source domain, but introduces inference semantic errors; “CorrectInference” means correct inference on the target domain, and introduces supervised semantic errors; “Both” means combining these two models with complementary knowledge; “VAMCEI” means adding the VAMCEI module to further align feature distributions.

[0133]

[0134] Table 6 Ablation experiments of the multi-stage UDA algorithm on the MyoPS 2020 dataset. “Correct Supervision” means correct supervised learning on the source domain, but introduces inference semantic errors; “Correct Inference” means correct inference on the target domain, and introduces supervised semantic errors; “Both” means combining these two models with complementary knowledge; “VAMCEI” means adding the VAMCEI module to further align feature distributions.

[0135]

[0136] From the experimental results, we can conclude that:

[0137] 1. The embodiment of the present application proposes a feature alignment module (VAMCEI) that combines explicit and implicit feature alignment based on end-to-end VAE. First, the bidirectional KL divergence between the latent variables of the two domains is re-derived for explicit global feature alignment; then, a contrast loss based on the category center is constructed to achieve explicit local feature alignment by shortening the distance between prototypes of the same category across domains and widening the distance between prototypes of different categories within the domain; finally, a domain discriminator is added to the output space to achieve implicit global distribution alignment with the help of adversarial learning.

[0138] 2. The embodiment of the present application combines CycleGAN and VAMCEI, and further proposes a multi-stage UDA framework, which uses knowledge distillation to avoid both supervised semantic errors and inferred semantic errors, thereby achieving higher-precision segmentation.

[0139] The VAMCEI proposed in the embodiment of the present application has fast convergence speed, low training difficulty and is very easy to integrate into the existing algorithm framework. The multi-stage UDA framework proposed in the embodiment of the present application achieves more accurate UDA segmentation at the cost of training time. At the same time, extensive experiments were conducted on multiple data sets, and the algorithm framework proposed in the embodiment of the present application achieved results that exceeded the SOTA method.

[0140] The above is a cardiac image segmentation method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding cardiac image segmentation device, including:

[0141] A data acquisition module, used to acquire labeled bSSFP CMR as source domain images and unlabeled LGE CMR images as target domain images;

[0142] A VAMCEI model building module is used to build a VAMCEI model, including: using a shared encoder to map the source domain image and the target domain image to corresponding latent variables respectively; inputting the corresponding latent variables into a shared segmenter to output corresponding segmentation probability maps; splicing the latent variables and the segmentation probability maps and inputting them into a decoder to reconstruct the segmented images corresponding to the source domain image and the target domain image;

[0143] The multi-stage UDA module is used to use CycleGAN to achieve bidirectional conversion between the source domain and the target domain, and to achieve alignment of the source domain and the target domain in image appearance; the true source domain and the fake source domain images, the true target domain and the fake target domain images are paired respectively, and input into the VAMCEI model to achieve supervised learning of segmentation of aligned features and annotated images; the target domain VAMCEI model and the source domain VAMCEI model are used as teacher models, and knowledge distillation is used to learn the prediction probabilities of the two models on the target domain images or pseudo source domain images of the same individual.

[0144] For the specific definition of the cardiac image segmentation device, please refer to the definition of the cardiac image segmentation method above, which will not be repeated here. Each module in the above cardiac image segmentation device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0145] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A cardiac image segmentation method is provided.

[0146] This manual also provides Fig.11 The structural diagram of the computer device shown in FIG. Fig.11 As shown in the figure, at the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 A cardiac image segmentation method is provided.

[0147] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0148] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the embodiments of this application.

Claims

1. A cardiac image segmentation method, characterized in that: include: A cardiac magnetic resonance image bSSFP CMR image acquired using a balanced steady-state free precession pulse sequence is used as a source domain image, and a bright blood gadolinium delayed enhancement cardiac magnetic resonance image LGE CMR is acquired as a target domain image; Constructing a segmentation network VAMCEI, wherein the segmentation network VAMCEI includes an encoder for mapping an input image into a latent variable, a segmenter for mapping the latent variable into a segmentation probability map, and a decoder for segmenting and reconstructing the input image according to the latent variable and the segmentation probability map; Using part of the source domain images and part of the target domain images to train a cyclic generative adversarial network, a trained cyclic generative adversarial network is obtained that can align the spatial distribution of images; and inputting another part of the source domain images into the trained recurrent generative adversarial network to generate fake target domain images, wherein the style of the fake target domain images is the same as that of the target domain images, and the spatial distribution is the same as that of the source domain images; and inputting another part of the target domain images into the trained recurrent generative adversarial network to generate fake source domain images, wherein the style of the fake source domain images is the same as that of the source domain images, and the spatial distribution is the same as that of the target domain images; The true source domain and fake source domain images, the true target domain and fake target domain images are paired and input into the segmentation network VAMCEI for training. During the training process, the explicit global features are aligned by continuously reducing the bidirectional KL divergence between the latent variables of the source domain and the target domain, the explicit local features are aligned by continuously shortening the distance between the same categories across domains and enlarging the distance between different categories in the same domain, and the implicit features are aligned by continuously forcing the distribution of the segmentation probability maps of the two domains to be aligned. Obtaining a target domain VAMCEI model and a source domain VAMCEI model for aligning feature space distribution; The target domain VAMCEI model and the source domain VAMCEI model are used as two teacher models, and the segmentation network VAMCEI is used as the student model. The student model is trained by minimizing the prediction probability of the student model and the two teacher models on the target domain images or false source domain images of the same individual to obtain the trained student model; the trained student model is used to segment the ventricular and myocardial structures of the LGE CMR images to be segmented.

2. The cardiac image segmentation method according to claim 1, characterized in that: The segmentation network VAMCEI uses a variational encoder as a feature extraction module shared by the source domain and the target domain. During the variational encoder VAE optimization process, three alignment items, namely, explicit global feature alignment, explicit local feature alignment, and implicit feature alignment, are used to align the latent variable distributions of the source domain and the target domain. The explicit global feature alignment term is: The calculation of KL is: in, and They represent the distribution of intermediate features in the source domain and the target domain respectively, KL[] represents the KL divergence between the two distributions, M represents the mini-batch data size, are the standard deviations of the kth dimension of the posterior distribution of the i-th and j-th source domain samples, respectively. is the standard deviation of the kth dimension of the posterior distribution of the i-th target domain sample, are the means of the kth dimension of the posterior distribution of the i-th and j-th source domain samples, respectively. is the mean of the kth dimension of the posterior distribution of the i-th target domain sample; The explicit local feature alignment term is: Where K represents the number of categories, τ represents the preset temperature, and Represent the prototypes of the i-th category in the source domain and the target domain respectively; The implicit feature alignment item is: Among them, x s and x T denote the source domain and target domain images respectively, P T They represent the corresponding output probability maps respectively, and Dis represents the discriminator network.

3. The cardiac image segmentation method according to claim 2, characterized in that: The training process of the segmentation network VAMCEI includes: The domain discriminator used to identify the segmentation probability map is fixed and all remaining models are trained. This process optimizes the autoencoder VAE while aligning the intermediate features of the two domains from multiple angles. The loss function of this process is: In the above formula, the first three terms are alignment terms, the middle three terms are source domain specific terms, and the last two terms are target domain specific terms, where a represents the loss balance weight; The domain discriminator is trained and all remaining models are fixed. This process is used to improve the discriminative ability of the domain discriminator. The loss function of this process is an implicit feature alignment term.

4. The cardiac image segmentation method according to claim 1, characterized in that: The loss function used in the training process of the student model is: where p i represents the average segmentation probability map of the two teacher models, q i represents the output probability map of the student model, and T represents the distillation temperature.

5. The cardiac image segmentation method according to claim 1, characterized in that: The encoder uses a U-Net style network as a feature extractor to extract image features of three different scales, and simultaneously performs multi-level alignment blocks on the features of the three different scales to output latent variables; The segmenter outputs prediction probabilities of three different scales through several convolutional layers and fuses them to output a segmentation probability map; The decoder processes the concatenated aligned latent vectors and segmentation prediction maps using consecutive convolutional layers to reconstruct the input image.

6. A cardiac image segmentation device, characterized in that: include: A data acquisition module, used to use the acquired cardiac magnetic resonance image bSSFPCMR image obtained by using a balanced steady-state free precession pulse sequence as a source domain image, and the acquired bright blood gadolinium delayed enhancement cardiac magnetic resonance image LGE CMR as a target domain image; A segmentation network VAMCEI construction module, used to construct a segmentation network VAMCEI, wherein the segmentation network VAMCEI includes an encoder for mapping an input image into a latent variable, a segmenter for mapping the latent variable into a segmentation probability map, and a decoder for segmenting and reconstructing the input image according to the latent variable and the segmentation probability map; A feature alignment module is used to train a recurrent generative adversarial network using part of the source domain images and part of the target domain images to obtain a trained recurrent generative adversarial network that can align the spatial distribution of images; and inputting another part of the source domain images into the trained recurrent generative adversarial network to generate fake target domain images, wherein the style of the fake target domain images is the same as that of the target domain images, and the spatial distribution is the same as that of the source domain images; and inputting another part of the target domain images into the trained recurrent generative adversarial network to generate fake source domain images, wherein the style of the fake source domain images is the same as that of the source domain images, and the spatial distribution is the same as that of the target domain images; It is used to pair the true source domain and false source domain images, and the true target domain and false target domain images, and then input them into the segmentation network VAMCEI for training. During the training process, the explicit global features are aligned by continuously reducing the bidirectional KL divergence between the latent variables of the source domain and the target domain, the explicit local features are aligned by continuously shortening the distance between the same categories across domains and enlarging the distance between different categories in the same domain, and the implicit feature alignment is achieved by continuously forcing the distribution of the segmentation probability maps of the two domains to be aligned; Obtaining a target domain VAMCEI model and a source domain VAMCEI model for aligning feature space distribution; The teacher-student model construction module is used to use the target domain VAMCEI model and the source domain VAMCEI model as two teacher models, and the segmentation network VAMCEI as the student model. The student model is trained by minimizing the prediction probability of the student model and the two teacher models on the target domain image or the false source domain image of the same individual to obtain a trained student model; the trained student model is used to segment the ventricular and myocardial structures of the LGE CMR image to be segmented.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Multi-modal medical image segmentation system

    CN118864864A

  • Unsupervised domain adaptive medical image segmentation method based on teacher fusion model

    CN118941797A

  • Unsupervised domain adaptation medical image segmentation method based on teacher fusion model

    CN118941797B

  • Myocardial infarction positioning method based on cross-modal knowledge fusion

    CN119477845A

  • Heart MRI (Magnetic Resonance Imaging) image segmentation method, system, equipment and medium

    CN120298430A