A Semi-Supervised Segmentation Method and Device for Magnetic Resonance Images Based on Deep Learning
By constructing a semi-supervised segmentation method for magnetic resonance images based on deep learning, and by utilizing deformed images and a spatiotemporal attention perception module at the feature level to optimize the registration network, the problem of insufficient utilization of label data and degraded cross-individual registration performance in cardiac magnetic resonance image segmentation is solved, achieving more efficient segmentation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2026-04-03
AI Technical Summary
Existing semi-supervised learning methods struggle to effectively utilize limited labeled and unlabeled data in cardiac magnetic resonance image segmentation, and cross-individual registration methods suffer performance degradation under the influence of cardiac motion.
A semi-supervised segmentation method for magnetic resonance images based on deep learning is constructed, including the construction of a registration network and a dual segmentation network. The registration network is optimized by a spatiotemporal attention perception module at the deformation image and feature level to generate reliable deformation images and pseudo-labels, and fully supervised and weakly supervised learning is combined.
It improves the accuracy and generalization ability of cardiac magnetic resonance image segmentation, optimizes the performance of the registration network, provides more reliable deformed images and deformed labels, and enhances the segmentation effect of the segmentation network.
Smart Images

Figure CN120411123B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of segmentation in medical image processing and analysis, specifically relating to a semi-supervised segmentation method and device for magnetic resonance images based on deep learning. Background Technology
[0002] Cardiac magnetic resonance imaging (MRI) boasts high temporal and spatial resolution and is free of ionizing radiation, making it the gold standard for assessing cardiac function. To automatically quantify cardiac physiological parameters (including left ventricular myocardial mass, cardiac volume, and ejection fraction) using cardiac MRI, accurate segmentation of anatomical structures in cardiac MRI images is necessary. Deep learning algorithms have demonstrated good performance in automating the assessment of cardiac physiological and functional parameters when trained on large labeled datasets. However, in real-world clinical settings, collecting large-scale, well-labeled, manually labeled data is time-consuming and labor-intensive due to various limitations. Furthermore, obtaining sufficiently large unlabeled datasets for semi-supervised learning may also present challenges due to healthcare privacy policies.
[0003] In recent years, semi-supervised learning methods have demonstrated good performance in addressing the aforementioned problems. Semi-supervised learning methods can effectively utilize large amounts of unlabeled data with limited labeled data, thereby improving the model's generalization ability. These methods can generally be divided into two categories: pseudo-label-based methods and consistency regularization-based methods. In pseudo-label-based models, the predictions of labeled and unlabeled images are used as pseudo-labels, combined with the true labels to retrain the model. Consistency regularization-based methods, on the other hand, encourage the model to output invariant predictions when different perturbations are applied to the input data. Furthermore, atlas-based segmentation is another effective method to reduce the need for manual annotation. Typically, these methods include a registration unit and a segmentation unit. The registration part is trained by aligning a small-scale labeled dataset with a large-scale unlabeled dataset. After training, the registration part is usually used as the base unit for generating pseudo-labels to train the segmentation network. Subsequently, the trained segmentation network obtains pseudo-labels by segmenting unlabeled images, providing supervision information to the registration network to further optimize it.
[0004] While the methods described above have achieved good results, several issues remain to be addressed: 1) Most semi-supervised segmentation methods essentially utilize useful information from large amounts of unlabeled data; however, due to practical limitations, obtaining large amounts of unlabeled data can be difficult. 2) Most atlas-based segmentation methods are suitable for few-sample segmentation and employ cross-individual registration to generate a large amount of pseudo-labeled data. This is effective in most medical image segmentation; however, due to the influence of cardiac motion on cardiac cine MRI images, there are temporal and spatial constraints, leading to a performance degradation of cross-individual registration methods. Summary of the Invention
[0005] The purpose of this invention is to address the aforementioned problems in the existing technology by providing a semi-supervised segmentation method and device for magnetic resonance images based on deep learning.
[0006] The above-mentioned objectives of the present invention are achieved through the following technical means:
[0007] A semi-supervised segmentation method for magnetic resonance images based on deep learning includes the following steps:
[0008] Step S1: Obtain case data. Each case data set includes labeled and unlabeled images. Each case data set is used as a sample. Based on the samples, a training set and a test set are constructed.
[0009] Step S2: Construct the registration network;
[0010] Step S3: Input labeled and unlabeled images into the registration network, generate deformed images and deformed labels, and calculate the registration loss function;
[0011] Step S4: Construct a dual segmentation network, which includes a weakly supervised segmentation network and a fully supervised segmentation network;
[0012] Step S5: Train the fully supervised segmentation network using deformed images, and perform one backpropagation to update the weight parameters of the fully supervised segmentation network; train the weakly supervised segmentation network using unlabeled images, and perform one backpropagation to update the weight parameters of the weakly supervised segmentation network; use the weakly supervised segmentation network to segment the unlabeled images and generate corresponding pseudo-labels, and calculate the weakly supervised similarity loss function.
[0013] Step S6: Construct a feature-level spatiotemporal attention perception module. Input the unlabeled image and the labeled image from the same sample as two input images into the spatiotemporal attention perception module to obtain feature map F. u The deformed image and the labeled image from the same sample are input into the spatiotemporal attention perception module to obtain the feature map F. w Calculate the similarity loss function of the perception module;
[0014] Step S7: Calculate the total loss function and update the weight parameters of the registration network based on minimizing the total loss function;
[0015] Step S8: After completing the training by looping through steps S1-S7, input the unlabeled image to be segmented into the trained fully supervised segmentation network Seg. f , thus obtaining the segmentation probability map.
[0016] As described in step S2 above, the labeled and unlabeled images are preprocessed before being input into the registration network. The preprocessing includes cropping to the same size, and also includes scaling, translating, rotating and flipping the cropped labeled and unlabeled images in the same way.
[0017] As mentioned above, the registration loss function is based on the following formula:
[0018] Loss1=L Reg_sim (I′ m ,I u )+λ1L Reg_smooth (Φ)
[0019] Where Loss1 is the registration loss function, L Reg_sim (I' m ,I u ) is the registration similarity loss function, L Reg_smooth (Φ) is the registration smoothing loss function, λ1 is the weight parameter, and I' m It is a distorted image, I u The image is unlabeled, and Φ represents the deformation field.
[0020] The registration similarity loss function L Reg_sim (I' m ,I u Based on the following formula:
[0021]
[0022] Where Ω represents the image space of the unlabeled image, |Ω| represents the operation performed on the unlabeled image space to calculate the total number of voxels, p is the number of voxels, and I' m (p) represents the value of voxel p in the deformed image, I u (p) represents the value of voxel p in the unlabeled image.
[0023] The registration smoothing loss function is shown in the following formula:
[0024]
[0025] Where q is an element in the deformation field Φ, and Φ(q) is an element q in the deformation field Φ. Let q be the gradient of element q in the deformation field Φ.
[0026] As described above, step S5 involves training the fully supervised segmentation network using the deformed image and performing a backpropagation to update the weight parameters of the fully supervised segmentation network, including the following steps:
[0027] Freeze the weight parameters of the registration network and freeze the Seg segmentation network under weak supervision. w The weight parameters are used to activate the fully supervised segmentation network Seg. f The weight parameters will affect the deformed image I' m Input into the fully supervised segmentation network Seg f Perform segmentation to obtain the fully supervised segmentation probability map S' w ,
[0028] S′ w =Seg f (I′ m ;θ a )
[0029] Among them, S' w For a fully supervised segmentation probability graph, I' m For the deformed image, θ a Seg, a fully supervised segmentation network f The weight parameters are used, and deformation labels are used as the weight parameters for the fully supervised segmentation network Seg. f Using the supervised information, calculate the fully supervised loss function. And perform a backpropagation to update the fully supervised segmentation network Seg. f The weight parameters,
[0030] Fully supervised loss function Based on the following formula:
[0031]
[0032] Among them, L ce Let S' be the cross-entropy loss function. m For deformation tags.
[0033] As described above, step S5 involves training the weakly supervised segmentation network using unlabeled images and performing a backpropagation to update the weight parameters of the weakly supervised segmentation network, which includes the following steps:
[0034] Freeze the weight parameters of the registration network and activate the weakly supervised segmentation network Seg. w The weight parameters are frozen in the fully supervised segmentation network Seg. f The weight parameters are used to input the unlabeled image into the weakly supervised segmentation network Seg. w Perform segmentation to obtain the weakly supervised segmentation probability map S.u ,
[0035] S u =Seg w (I u ;θ b )
[0036] Among them, S u For the weakly supervised segmentation probability graph, I u Unlabeled image, θ b Seg, a weakly supervised segmentation network w The weight parameters are used to calculate the weakly supervised loss function. Then perform a backpropagation to update the weakly supervised segmentation network Seg. w The weight parameters,
[0037] Weakly supervised loss function Based on the following formula:
[0038]
[0039] Among them, L ce Let S' be the cross-entropy loss function. m For deformation tags.
[0040] As mentioned above, the weakly supervised similarity loss function in step S5 is based on the following formula:
[0041]
[0042] in, S' is a weakly supervised similarity loss function, where |Ω| represents the total number of voxels obtained by calculating the total number of voxels in the unlabeled image space Ω, p is the number of voxels, and S' is the number of voxels. m (p) represents the value of voxel p of the deformation label, P u (p) represents the value of voxel p in the unlabeled image.
[0043] As mentioned above, the similarity loss function of the perception module in step S6 is based on the following formula:
[0044]
[0045] Among them, L Reg_TAP (F u ,F w F is the similarity loss function for the perception module, |Ω| represents the total number of voxels obtained by calculating the total number of voxels in the unlabeled image space Ω, p is the number of voxels, and F u (p) is the feature map F u The value of voxel p, F w (p) is the feature map F w The value of voxel p.
[0046] As mentioned above, the total loss function in step S7 is based on the following formula:
[0047]
[0048] Among them, Loss Reg Let $\frac{1}{\frac ... Let L be the weakly supervised similarity loss function, where λ² is the weight coefficient and L is the weight coefficient. Reg_TAP (F u ,F w ) is the similarity loss function for the perception module.
[0049] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described segmentation method.
[0050] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described segmentation method.
[0051] Compared with the prior art, the present invention has the following advantages:
[0052] This invention constructs a semi-supervised segmentation method and device for magnetic resonance images based on deep learning. Simultaneously, based on the continuity at the temporal and spatial levels, a spatiotemporal attention perception module based on feature alignment is designed to optimize the registration network, thereby providing the segmentation network with more reliable and realistic deformation images and deformation labels. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of the process of the present invention.
[0054] Figure 2 This is a schematic diagram of the spatiotemporal attention perception module proposed in this invention.
[0055] Figure 3(a) is a visualization of the segmentation probability graphs of the present invention and other segmentation methods on the public dataset ACDC.
[0056] Figure 3(b) is a visualization of the prediction results of the present invention and other segmentation methods on the public dataset M&Ms. Detailed Implementation
[0057] To facilitate understanding and use of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to embodiments. It should be understood that the embodiments described herein are only for illustration and explanation of the present invention and are not intended to limit the present invention.
[0058] This invention proposes a semi-supervised segmentation method for magnetic resonance images based on deep learning. Simultaneously, based on the continuity at the temporal and spatial levels, a spatiotemporal attention perception module based on feature alignment is designed to optimize the registration network, thereby providing the segmentation network with more reliable and realistic deformation images and deformation labels.
[0059] Example 1:
[0060] In this embodiment, a semi-supervised segmentation method for movie cardiac magnetic resonance images using deep learning is provided, such as... Figure 1 As shown, the specific implementation steps are as follows:
[0061] Step S1: Obtain case data. Each case data set includes labeled and unlabeled images. Each case data set is used as a sample. Based on the samples, a training set and a test set are constructed.
[0062] In this embodiment:
[0063] The case data used were the publicly available cardiac cinema magnetic resonance imaging dataset ACDC (hereinafter referred to as the ACDC dataset) and the M&Ms challenge dataset (hereinafter referred to as the M&Ms dataset). The ACDC dataset contained 150 case data, and the M&Ms dataset contained 125 case data. The case data in the ACDC dataset and the M&Ms dataset were divided into training set and validation set in an 8:2 ratio.
[0064] Step S2: Construct a registration network. After preprocessing the labeled and unlabeled images of the samples in the training set, input the labeled and unlabeled images into the registration network. The registration network registers the labeled images in the samples to the unlabeled images to obtain deformed images and deformed labels.
[0065] In this embodiment, the registration network uses the Voxelmorph framework, with 3D-Unet as the network backbone. After the input image is fed into the registration network, it undergoes four downsampling and four upsampling operations to generate a deformation field.
[0066] The above preprocessing includes cropping the labeled and unlabeled images in the sample to the same size (in this embodiment, the size is width × height × thickness of 224 × 224 × 20), and also includes scaling, translating, rotating and flipping the cropped labeled and unlabeled images in the same way.
[0067] The registration network registers labeled images in the samples to unlabeled images based on the following formula, mapping the labeled images to the image space of the unlabeled images and generating a deformation field Φ.
[0068] Φ=F(I m ,I u )
[0069] Among them, I m For labeled images (floating images), I u Φ represents the unlabeled image (target image), Φ represents the deformation field, and F represents the registration network.
[0070] Deformation images and deformation labels are based on the following formula:
[0071]
[0072] Among them, I' m It is a deformed image, S' m It's a deformation tag, S m This is the label before deformation, and ° indicates the deformation operation.
[0073] The registration loss function Loss1 is based on the following formula:
[0074] Loss1=L Reg_sim (I′ m ,I u )+λ1L Reg_smooth (Φ)
[0075] Where Loss1 is the registration loss function, L Reg_sim (I' m ,I u ) is the registration similarity loss function, L Reg_smooth (Φ) is the registration smoothing loss function, and λ1 is the weight parameter.
[0076] Registration similarity loss function L Reg_sim (I' m ,I u Based on the following formula:
[0077]
[0078] Where Ω represents the image space of the unlabeled image, |Ω| represents the operation performed on the unlabeled image space to calculate the total number of voxels, p is the number of voxels, and I' m (p) represents the value of voxel p in the deformed image, I u (p) represents the value of voxel p in the unlabeled image.
[0079] Registration smoothing loss function L Reg_smooth (Φ) is shown in the following formula:
[0080]
[0081] Where q is an element in the deformation field Φ, and Φ(q) is an element q in the deformation field Φ. Let q be the gradient of element q in the deformation field Φ.
[0082] Step S3: After inputting labeled and unlabeled images into the registration network, the network generates deformed images and deformed labels, and calculates the registration loss function Loss1. In this step, deformed images and deformed labels are generated based on the current weight parameters of the registration network. Finally, in step 4, the total loss function Loss1 is used to calculate the final loss. Reg Update the weight parameters of the registration network.
[0083] Step S4: Construct a dual segmentation network, which includes a weakly supervised segmentation network Seg. w and fully supervised segmentation network Seg f In this invention, a dual-segmentation network is introduced for both weakly supervised and fully supervised segmentation learning. The weakly supervised segmentation network, Seg... w and fully supervised segmentation network Seg f All are 2D UNet structures with ResNet50 as the backbone network, with different initialization operations applied.
[0084] Step S5: Using the deformed image I' m For the fully supervised segmentation network Seg f Training is performed, and a backpropagation is conducted to update the fully supervised segmentation network Seg. f Weight parameters; using unlabeled images to train the weakly supervised segmentation network Seg w Training is performed, and a backpropagation is conducted to update the weakly supervised segmentation network Seg. w Weight parameters; using a weakly supervised segmentation network Seg w Segmenting unlabeled images I u And generate the corresponding pseudo-label P u Calculate the weakly supervised similarity loss function Specifically, the following steps are included:
[0085] Step 5.1: Freeze the weight parameters of the registration network and freeze the weakly supervised segmentation network Seg. w The weight parameters are used to activate the fully supervised segmentation network Seg. f The weight parameters will affect the deformed image I' m Input into the fully supervised segmentation network Seg f Perform segmentation to obtain the fully supervised segmentation probability map S' w ,
[0086] S′ w =Seg f (I′ m ;θ a )
[0087] Among them, S' w For a fully supervised segmentation probability graph, I' mFor the deformed image, θ a Seg, a fully supervised segmentation network f The weight parameters are used, and deformation labels are used as the weight parameters for the fully supervised segmentation network Seg. f Using the supervised information, calculate the fully supervised loss function. And perform a backpropagation to update the fully supervised segmentation network Seg. f The weight parameters,
[0088] Fully supervised loss function Based on the following formula:
[0089]
[0090] Among them, L ce Let S' be the cross-entropy loss function. m For deformation tags.
[0091] Step 5.2: Freeze the weight parameters of the registration network and activate the weakly supervised segmentation network Seg. w The weight parameters are frozen in the fully supervised segmentation network Seg. f The weight parameters are used to input the unlabeled image into the weakly supervised segmentation network Seg. w Perform segmentation to obtain the weakly supervised segmentation probability map S. u ,
[0092] S u =Seg w (I u ;θ b )
[0093] Among them, S u For the weakly supervised segmentation probability graph, I u Unlabeled image, θ b Seg, a weakly supervised segmentation network w The weight parameters are used, and deformation labels are used as the weight parameters for the weakly supervised segmentation network Seg. w Based on the supervision information, calculate the weak supervision loss function. Then perform a backpropagation to update the weakly supervised segmentation network Seg. w The weight parameters,
[0094] Weakly supervised loss function Based on the following formula:
[0095]
[0096] Among them, L ce Let S' be the cross-entropy loss function. m For deformation tags.
[0097] Step 5.3: Freeze the weight parameters of the registration network and activate the weakly supervised segmentation network Seg. w The weight parameters are frozen in the fully supervised segmentation network Seg. f The weight parameters are adjusted, and the inference mode is entered; the weakly supervised segmentation network Seg is used. w Segmenting unlabeled images I u And generate the corresponding pseudo-label P u Calculate the weakly supervised similarity loss function
[0098]
[0099] Where Ω is the image space of the unlabeled image, |Ω| represents the total number of voxels obtained by calculating the total number of voxels in the unlabeled image space Ω, p is the number of voxels, and S' m (p) represents the value of voxel p of the deformation label, P u (p) represents the value of voxel p in the unlabeled image.
[0100] Step S6: Construct a feature-based spatiotemporal attention perception module to process unlabeled images I u And labeled image I in the same sample m The two input images are fed into the spatiotemporal attention perception module, which will then process the deformed image I'. m And labeled image I in the same sample m Two images are input to the spatiotemporal attention perception module, and the similarity loss function L of the perception module is calculated. Reg_TAP (F u ,F w ).
[0101] Calculate the similarity loss function of the perception module for deformed image I' ′m Compared with unlabeled image I u To achieve better registration results, this invention proposes a spatiotemporal attention perception module based on the feature level; the spatiotemporal attention perception module is based on the following assumptions;
[0102] |I u -I m |=|I′ m -I m |
[0103] That is, if the deformed image I' m Compared with unlabeled image I u It is perfectly registered, deformed image I' m Compared with unlabeled image I u Compared to labeled image I in the same sample m The difference should also be consistent.
[0104] Unlabeled image I u And labeled image I in the same sample m The two images are fed into the spatiotemporal attention perception module to obtain the corresponding feature maps F. u ;
[0105] Deformed image I' m And labeled image I in the same sample m The two images are fed into the spatiotemporal attention perception module to obtain the corresponding feature maps F. w ;
[0106] To improve the spatiotemporal continuity between unlabeled images and deformed images, the perceptual module similarity loss function L... Reg_TAP (F u ,F w )for:
[0107]
[0108] Where Ω is the image space of the unlabeled image, |Ω| represents the total number of voxels obtained by calculating the total number of voxels in the unlabeled image space Ω, p is the number of voxels, and F u (p) is the feature map F u The value of voxel p, F w (p) is the feature map F w The value of voxel p.
[0109] In this embodiment, the spatiotemporal attention perception module includes an encoder and a spatiotemporal attention perception layer, which is based on the following formula:
[0110]
[0111] Where W is an intermediate feature, Conv 1×1 The convolution is 1×1, AvgPool is an average pooling layer, Conv is a 3×3 convolution, and f is a 1×1 convolution. a and f b These are two feature maps obtained by downsampling the two input images through the encoder of the spatiotemporal attention perception module. ⊙ represents element-wise addition, ⊙ represents element-wise multiplication, and S represents the output feature of the spatiotemporal attention perception module, such as... Figure 2 As shown.
[0112] Step S7: Calculate the total loss function Loss Reg Based on minimizing the total loss function Loss Reg Update the weight parameters of the registration network.
[0113]
[0114] Where λ2 is the weighting coefficient.
[0115] Step S8: After completing the training by looping through steps S1-S7, the inference phase begins, using the trained fully supervised segmentation network Seg. f As an inference network, the inference object is the unlabeled image to be segmented in the test set, and a segmentation probability map is obtained.
[0116] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. 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 methods.
[0117] To further demonstrate the advantages of this invention, results from this invention were compared with other state-of-the-art methods on two publicly available datasets. Quantitative comparisons were performed using the Dice similarity coefficient (DSC), average symmetric surface distance (ASSD), and Haussdorf distance (HD). To verify the effectiveness of this method, it was compared with seven commonly used state-of-the-art methods. Experimental results demonstrate the performance of the method presented in this invention, such as... Figure 3(a) and 3(b) As shown.
[0118] Tables 1 and 2 list the DSC and ASSD values of this invention compared to other segmentation methods, respectively. Table 1 shows the results of this invention on the ACDC dataset, using 100 cases as training samples and 50 cases as test samples. The bolded black sections indicate the best performance under this evaluation metric. Table 2 shows the results of this invention on the M&Ms dataset, using 75 cases as training samples and 50 cases as test samples. The bolded black sections indicate the best performance under this evaluation metric. Ours represents the method proposed in this patent, and FS represents the fully supervised segmentation method. Observation of the tables shows that the proposed method even surpasses the fully supervised method in some aspects.
[0119] Table 1 shows the performance of each method on the ACDC dataset.
[0120]
[0121] Table 2 shows the performance of each method on the M&Ms dataset.
[0122]
[0123] Example 2:
[0124] This embodiment provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0125] Example 3:
[0126] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.
[0127] Example 4:
[0128] This embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0129] It should be noted that the embodiments described in this invention are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains can make various modifications or additions to the described embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. A semi-supervised segmentation method for magnetic resonance images based on deep learning, comprising the following steps: Step S1: Obtain case data. Each case data set includes labeled and unlabeled images. Each case data set is used as a sample. Based on the samples, a training set and a test set are constructed. Step S2: Construct the registration network; Step S3: Input labeled and unlabeled images into the registration network, generate deformed images and deformed labels, and calculate the registration loss function; Step S4: Construct a dual segmentation network, which includes a weakly supervised segmentation network and a fully supervised segmentation network; Step S5: Train the fully supervised segmentation network using deformed images, and perform one backpropagation to update the weight parameters of the fully supervised segmentation network; train the weakly supervised segmentation network using unlabeled images, and perform one backpropagation to update the weight parameters of the weakly supervised segmentation network; use the weakly supervised segmentation network to segment the unlabeled images and generate corresponding pseudo-labels, and calculate the weakly supervised similarity loss function. Step S6: Construct a feature-level spatiotemporal attention perception module. Input the unlabeled image and the labeled image from the same sample as two input images into the spatiotemporal attention perception module to obtain feature map F. u The deformed image and the labeled image from the same sample are input into the spatiotemporal attention perception module to obtain the feature map F. w Calculate the similarity loss function of the perception modules; Step S7: Calculate the total loss function and update the weight parameters of the registration network based on minimizing the total loss function; Step S8: After completing the training by looping through steps S1-S7, input the unlabeled image to be segmented into the trained fully supervised segmentation network Seg. f , thus obtaining the segmentation probability map.
2. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, In step S2, the labeled and unlabeled images are preprocessed before being input into the registration network. The preprocessing includes cropping to the same size, and also includes scaling, translating, rotating and flipping the cropped labeled and unlabeled images in the same way.
3. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, The registration loss function is based on the following formula: Loss1=L Reg_sim (AND' m ,AND u )+λ1L Reg_smooth (Φ) Where Loss1 is the registration loss function, L Reg_sim (I' m ,I u ) is the registration similarity loss function, L Reg_smooth (Φ) is the registration smoothing loss function, λ1 is the weight parameter, and I' m It is a distorted image, I u The image is unlabeled, and Φ represents the deformation field. The registration similarity loss function L Reg_sim (I' m ,I u Based on the following formula: Where Ω represents the image space of the unlabeled image, |Ω| represents the operation performed on the unlabeled image space to calculate the total number of voxels, p is the number of voxels, and I' m (p) represents the value of voxel p in the deformed image, I u (p) represents the value of voxel p in the unlabeled image. The registration smoothing loss function is shown in the following formula: Where q is an element in the deformation field Φ, and Φ(q) is an element q in the deformation field Φ. Let q be the gradient of element q in the deformation field Φ.
4. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, Step S5 involves training the fully supervised segmentation network using the deformed image and performing a backpropagation to update the weight parameters of the fully supervised segmentation network, including the following steps: Freeze the weight parameters of the registration network and freeze the Seg segmentation network under weak supervision. w The weight parameters are used to activate the fully supervised segmentation network Seg. f The weight parameters will affect the deformed image I' m Input into the fully supervised segmentation network Seg f Perform segmentation to obtain the fully supervised segmentation probability map S' w , S′ w =Seg f (IN' m ;θ a ) Among them, S' w For a fully supervised segmentation probability graph, I' m For the deformed image, θ a Seg, a fully supervised segmentation network f The weight parameters are used, and deformation labels are used as the weight parameters for the fully supervised segmentation network Seg. f Using the supervised information, calculate the fully supervised loss function. And perform a backpropagation to update the fully supervised segmentation network Seg. f The weight parameters, Fully supervised loss function Based on the following formula: Among them, L ce Let S' be the cross-entropy loss function. m For deformation tags.
5. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, Step S5, which trains the weakly supervised segmentation network using unlabeled images and performs a backpropagation to update the weight parameters of the weakly supervised segmentation network, includes the following steps: Freeze the weight parameters of the registration network and activate the weakly supervised segmentation network Seg. w The weight parameters are frozen in the fully supervised segmentation network Seg. f The weight parameters are used to input the unlabeled image into the weakly supervised segmentation network Seg. w Perform segmentation to obtain the weakly supervised segmentation probability map S. u , S u =Seg w (IN u ;θ b ) Among them, S u For the weakly supervised segmentation probability graph, I u Unlabeled image, θ b Seg, a weakly supervised segmentation network w The weight parameters are used to calculate the weakly supervised loss function. Then perform a backpropagation to update the weakly supervised segmentation network Seg. w The weight parameters, Weakly supervised loss function Based on the following formula: Among them, L ce Let S' be the cross-entropy loss function. m For deformation tags.
6. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, The weakly supervised similarity loss function in step S5 is based on the following formula: in, S' is a weakly supervised similarity loss function, where |Ω| represents the total number of voxels obtained by calculating the total number of voxels in the unlabeled image space Ω, p is the number of voxels, and S' is the number of voxels. m (p) represents the value of voxel p of the deformation label, P u (p) represents the value of voxel p in the unlabeled image.
7. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, In step S6, the similarity loss function of the perception module is based on the following formula: Among them, L Reg_TAP (F u ,F w F is the similarity loss function for the perception module, |Ω| represents the total number of voxels obtained by calculating the total number of voxels in the unlabeled image space Ω, p is the number of voxels, and F u (p) is the feature map F u The value of voxel p, F w (p) is the feature map F w The value of voxel p.
8. The semi-supervised segmentation method for magnetic resonance images based on deep learning according to claim 1, characterized in that, The total loss function in step S7 is based on the following formula: Among them, Loss Reg Let $\frac{1}{\frac ... Let L be the weakly supervised similarity loss function, where λ² is the weight coefficient and L is the weight coefficient. Reg_TAP (F u ,F w ) is the similarity loss function for the perception module.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the segmentation method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the segmentation method according to any one of claims 1 to 8.