Deep learning multi-task magnetic resonance cardiac segmentation and quantification method

Through deep learning multi-task magnetic resonance heart segmentation and quantitative methods, combined with residual convolution network and multi-task loss function, the T2 segmentation and quantitative analysis of heart are achieved simultaneously, solving the problems of information isolation and algorithm inconsistency in traditional methods, and improving the accuracy and comprehensive capabilities of diagnosis.

CN117115112BActive Publication Date: 2025-06-06XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311094484.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-29
Publication Date
2025-06-06
Estimated Expiration
2043-08-29

AI Technical Summary

Technical Problem

Traditional cardiac magnetic resonance image analysis methods process quantitative analysis and structural segmentation as independent tasks, resulting in information isolation, algorithmic inconsistency and neglect of associations, limiting the comprehensive understanding and accurate diagnosis of heart disease.

Method used

Deep learning multi-task magnetic resonance heart segmentation and quantitative methods are adopted, and multi-task loss function strategy is designed to realize the simultaneous T2 segmentation and quantitative analysis of heart T2 segmentation and quantitative analysis.

Benefits of technology

By integrating quantitative analysis and structural segmentation tasks into a unified network structure, the comprehensive ability and accuracy of diagnosis are improved, information isolation and algorithm inconsistency problems are solved, and the intrinsic relationship between quantitative state and structure is fully captured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117115112B_ABST
    Figure CN117115112B_ABST
Patent Text Reader

Abstract

A deep learning multi-task magnetic resonance cardiac segmentation and quantification method, which relates to the field of image processing. Obtain multi-contrast magnetic resonance cardiac images, perform data preprocessing, and produce training labels; divide the processed data set into a training set, a validation set, and a test set according to a fixed ratio; construct a multi-task magnetic resonance cardiac segmentation and quantification network based on a residual convolutional network, and the network simultaneously includes a quantification module for generating cardiac T2 quantification and a segmentation module for cardiac structure segmentation; design a multi-task loss function strategy, determine the network optimizer parameters, and use the training data set with segmentation and quantification labels to perform model training; load the trained model, input the test set, perform RGB mapping operation on the output segmentation results, and perform window truncation operation on the output quantification results to obtain the final cardiac segmentation and quantification results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a deep learning multi-task magnetic resonance heart segmentation and quantification method in the field of multi-task magnetic resonance heart segmentation and quantification. Background Art

[0002] In the field of medical imaging, especially in the diagnosis and treatment of heart diseases, cardiac magnetic resonance imaging (CMRI) has become an important non-invasive diagnostic tool (CM Kramer, J. Barkhausen, C. Bucciarelli-Ducci, S.D. Flamm, R.J. Kim, and E. Nagel, "Standardized cardiovascular magnetic resonance imaging (CMR) protocols: 2020 update," Journal of Cardiovascular Magnetic Resonance, vol. 22, no. 1, pp. 1-18, 2020.). Currently, fast image reconstruction artificial intelligence algorithms such as artificial intelligence (Zi Wang, et al., One for multiple: Physics-informed synthetic data training) and image processing (Q. Yang, et al., "Physics-driven synthetic data learning for biomedical magnetic resonance: The imaging physics-based data synthesis paradigm for artificial intelligence," IEEE Signal Processing Magazine, 40 (2), 129-140, 2023) are being developed. boostsgeneralizabledeep learning for fast MRI reconstruction,arXivpreprint,arXiv:2307.13220,2023), can provide high-resolution cardiac images, thus helping doctors understand the patient's heart structure and function more accurately. However, the interpretation and analysis of cardiac magnetic resonance images has always been a challenging task, which requires comprehensive consideration of the complex structure and dynamic characteristics of the heart.

[0003] In traditional cardiac magnetic resonance image analysis, two main tasks are usually required: cardiac quantitative analysis (A. Seraphim, KD Knott, J. Augusto, ANBhuva, C. Manisty, and JC Moon, "Quantitative cardiac MRI," Journal of Magnetic Resonance Imaging, vol. 51, no. 3, pp. 693-711, 2020.) and cardiac structure segmentation (N. Painchaud, Y. Skandarani, T. Judge, O. Bernard, A. Lalande, and P.-M. Jodoin, "Cardiac segmentation with strong anatomical guarantees," IEEE Transactions on Medical Imaging, vol. 39, no. 11, pp. 3703-3713, 2020.). Cardiac quantitative analysis aims to measure specific biomarkers such as T from images. 2 Relaxation time, these markers can provide quantitative information about the state of cardiac tissue, which is helpful for the diagnosis and evaluation of heart disease (ATO'Brien, KEGil, J.Varghese, OPSimonetti, and KMZareba, "T2 mapping in myocardialdisease: a comprehensive review," Journal of Cardiovascular Magnetic Resonance, vol.24, no.1, pp.1-25, 2022). Cardiac structure segmentation aims to segment different tissue parts in cardiac images, such as ventricles, atria, and valves (C.Chen et al., "Deep learning for cardiac image segmentation: areview," Frontiers in Cardiovascular Medicine, vol.7, p.25, 2020), from the image to help doctors locate and analyze heart lesions.

[0004] However, this traditional method has some disadvantages when processing cardiac magnetic resonance images. First, since quantitative analysis and cardiac structure segmentation are processed independently, it may lead to scattered and localized use of information. This means that valuable information obtained from cardiac structure segmentation may not be fully utilized in the quantitative analysis stage, and vice versa. This information isolation may limit doctors' comprehensive understanding of cardiac conditions.

[0005] Secondly, because traditional methods use different independent algorithms for quantitative analysis and structural segmentation, there may be inconsistencies between algorithms. This inconsistency may affect the consistency and credibility of the results, thereby reducing the reliability of diagnosis. At the same time, parameter adjustment and optimization of different algorithms may require tedious manual intervention, increasing the complexity and subjectivity of the operation.

[0006] In addition, this separate processing method may ignore the intrinsic relationship between quantitative analysis and structural segmentation. The quantitative state of the heart is often closely related to its structure, and independent processing may not fully capture this relationship, thus limiting the in-depth understanding of the mechanism of heart disease. This may have an adverse impact on doctors' formulation of more effective treatment strategies.

[0007] In summary, the traditional method of treating the quantitative analysis of cardiac magnetic resonance images and cardiac structure segmentation as independent tasks has the disadvantages of information isolation, algorithm inconsistency and association neglect, which may limit the comprehensive understanding and accurate diagnosis of heart diseases. Therefore, a comprehensive method is needed to overcome these shortcomings and improve the accuracy and completeness of diagnosis. Summary of the invention

[0008] The present invention aims to provide a method for simultaneously performing magnetic resonance cardiac T 2 Deep Learning for Multi-Task Segmentation and Quantification Multi-Task MRI Heart Segmentation and Quantification Method.

[0009] The present invention comprises the following steps:

[0010] 1) Obtain magnetic resonance cardiac multi-contrast images, perform data preprocessing, and create training labels;

[0011] 2) The processed data set is divided into training set, validation set and test set according to a fixed ratio;

[0012] 3) Construct a multi-task MRI heart segmentation and quantification network based on residual convolutional network, which also includes a method for generating cardiac T 2 a quantification module for quantitative analysis and a segmentation module for cardiac structure segmentation;

[0013] 4) Design a multi-task loss function strategy, determine the network optimizer parameters, and use the training data set with segmentation and quantitative labels to train the model;

[0014] 5) Load the training model of step 4), input the test set, perform RGB mapping operation on the output segmentation result, perform window truncation operation on the output quantitative result, and obtain the final heart segmentation and quantitative results.

[0015] In step 1), the original image domain files of K contrasts of the magnetic resonance heart are read and saved into K files with different TE according to the dimension of pulse echo (TimeEcho, TE). These segmented image files are read and the image of each TE is is the pulse echo time, i=1,2,…,K, and is processed according to formula (1) to obtain the normalized

[0016]

[0017] K Expand each channel dimension and concatenate them to form a tensor

[0018] Read the original K-space files of the corresponding K contrasts, and convert the original K-space data into image domain data through inverse Fourier transform. For T in formula (2), 2 Modeling method, using nonlinear least squares to calculate T 2 Quantify the labels and perform window truncation so that they fall within the empirical interval [0ms, 200ms]:

[0019] (T 2 Quantitative signal model)S i =S 0 *exp(-TE i / T 2 ) (2)

[0020] Where i = 1, 2, ..., K, For pixels at TE i The magnetization intensity at the moment, S 0 represents the initial magnetization, is the relaxation time to be solved.

[0021] Read the corresponding segmentation label file, remove the background, and cut out the length of The original image, quantitative label and segmentation label are cropped according to the square matrix area and saved as an H5 file.

[0022] In step 3), the segmentation module adopts the traditional encoder-decoder architecture, inputs K contrasts, and the image size is N×N data, which is resampled to H×H dimensions through linear interpolation.

[0023] The encoder consists of an initial 2D convolutional layer to extract features, followed by multiple residual module iterations to downsample and generate deep feature maps.

[0024] The decoder restores deep semantic information through convolution, normalization, ReLU activation function and upsampling linear interpolation, gradually enlarges the restored resolution, and finally outputs the segmentation result.

[0025] Feature fusion is performed between the encoder and decoder, feature maps with the same resolution are spliced, and low- and high-level features, global and local information are integrated.

[0026] The segmentation module extracts feature maps containing J resolutions and the loss function size The J losses are accumulated, as shown in formula (3):

[0027]

[0028] Where j = 1, 2, ..., J, Indicates the weight corresponding to the loss calculated by the feature map at the current resolution. Indicates the size of the loss function calculated for the feature map at the current resolution.

[0029] The quantitative module uses the segmentation result of the previous layer as the input of the network and adopts a shallow encoder-decoder structure consisting of a residual module, two-dimensional convolution, normalization, ReLU activation function and upsampling linear interpolation.

[0030] Among them, only the output of the last layer will be used to calculate the loss size. The features extracted by the middle layer do not participate in the loss size calculation, and the final output is the single-channel T 2 Quantitative results.

[0031] In step 4), the segmentation loss function is shown in formula (3), and the cross-entropy (CE) loss function is used, and its size calculation is shown in formula (4):

[0032]

[0033] Where c = 1, 2, ..., C, C represents the total number of categories, p c represents the value of the true label, Indicates the probability that the model predicts that the result belongs to this category.

[0034] Quantifying the size of the loss function The Structural Similarity Image Measurement (SSIM) loss function is used, and the calculation method is shown in formula (5):

[0035]

[0036] in, represents the image predicted by the model, represents the image of the true label, Represent the mean of images X and Y respectively, Represents the standard deviation of images X and Y respectively, Represents the covariance of images X and Y;

[0037] The loss function of the overall network for:

[0038]

[0039] in, are the weights of the loss functions for the segmentation task and the quantitative task, respectively. Indicates the current training round.

[0040] For the multi-task loss function, the weights are automatically adjusted by dynamically balancing the weights, as shown in formula (7):

[0041]

[0042] Where, e = 1, 2, ..., E, E represents the total number of tasks, represents the loss change rate, represents the weight of the loss function corresponding to the task, is a hyperparameter.

[0043] The Adam optimizer is used to set the initial learning rate Lr, the total number of training rounds T, and the batch size B. The gradient descent method is used on the training set and the validation set to iteratively optimize the weights of the neural network until the loss function converges and the training process is completed.

[0044] In step 5), the trained network model is loaded, and the test set is input into the loaded network model.

[0045] The segmentation module outputs multi-channel prediction results, representing the probabilities of different categories. The maximum probability is selected channel by channel and mapped to the RGB channel to form a cardiac structure segmentation prediction image.

[0046] The quantitative module outputs the single-channel quantitative prediction results, which are normalized and mapped to the empirical interval of [0ms, 200ms] to obtain the final T 2 Quantitative prediction images.

[0047] Compared with the prior art, the advantages of the present invention are as follows:

[0048] Through the deep neural network method, the quantitative analysis and structural segmentation tasks of cardiac MRI images can be completed simultaneously. The introduction of this multi-task neural network method integrates the quantitative analysis and segmentation tasks into a unified network structure, so that the information and features between the two tasks can be more fully shared and interacted, thereby improving the comprehensive ability and accuracy of diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a flow chart of an embodiment of the present invention.

[0050] Figure 2 4 is a diagram of a neural network structure according to an embodiment of the present invention.

[0051] Figure 3 This is the segmentation result of the embodiment of the present invention.

[0052] Figure 4 A healthy person T in the embodiment of the present invention 2 Quantitative results.

[0053] Figure 5 Patient T in the embodiment of the present invention 2 Quantitative results. DETAILED DESCRIPTION

[0054] In order to more clearly illustrate the objectives, technical solutions and advantages of the present invention, the present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0055] The embodiment process of the present invention is as follows Figure 1 The execution shown includes the following steps:

[0056] 1) Obtain magnetic resonance cardiac multi-contrast images, perform data preprocessing, and create training labels, including:

[0057] Read the original image domain nii.gz file of three contrasts of the magnetic resonance heart. The data used are all from Task2: T1 / T2 mapping competition data in MICCAI2023CMRxRecon. There are a total of 120 healthy heart data, and then save them in different folders according to the examiner's number. The folder numbers are named P001-P120. According to the dimension of pulse echo (TimeEcho, TE), write a loop function and save them into nii.gz files with three different TEs. The data dimension in each file is the number of slices × 384 × 116. The number of slices for each examiner is not fixed, ranging from 4 to 7 slices. Read these segmented image files and perform a multi-slice analysis on each TE image. TE 1 =0ms,TE 2 =35ms,TE 3=55ms is the pulse echo time, and according to formula (1), the normalized

[0058]

[0059] Among them, i=1,2,3 will be 3 Expand each channel dimension and concatenate them to form a tensor

[0060] Read the original K-space mat files of the corresponding three contrasts, and convert the original K-space data into image domain data through the inverse Fourier transform function. For T in formula (2), 2 Modeling method, using nonlinear least squares function to calculate T 2 Quantitative labels are created and window truncated, i.e. values ​​less than 0ms are assigned to 0ms and values ​​greater than 200ms are assigned to 200ms, so that they fall within the empirical interval [0ms, 200ms]:

[0061] (T 2 Quantitative signal model)S i =S 0 *exp(-TE i / T 2 ) (2) Among them, For pixels at TE 1 =Magnetization intensity at 0ms, For pixels at TE 1 =Magnetization intensity at 35ms, For pixels at TE 1 =Magnetization intensity at 55ms, S 0 represents the initial magnetization, is the relaxation time to be solved.

[0062] Read the corresponding segmentation label nii.gz file, where the pixel values ​​are {0,1,2,3}, 0 represents the background, 1 represents the left ventricle, 2 represents the myocardium, and 3 represents the right ventricle.

[0063] According to the numerical position in the file, remove the background, retain the non-zero area, select the zero value area, ensure that the width 116 size remains unchanged, and cut the length 384 size. Use the loop function to traverse and find the minimum value on the left of the non-zero area in the entire matrix and the maximum value on the right The maximum value at the top and the lowest minimum value In this way, the central area of ​​the entire image is obtained and the maximum length of the region of interest |x is obtained max -x min|, taking the center of the image as the origin, add the total number of pixels of length to 116, crop a square matrix of length 116, crop the original image, quantitative label and segmentation label according to the square matrix area and save them into H5 files.

[0064] 2) The processed data set is divided into training set, validation set and test set according to a fixed ratio;

[0065] The entire data set is divided into training set, validation set and test set in a ratio of 8:1:1, with a total of 576 images in the training set, 72 images in the validation set and 72 images in the test set. The size of each image is 116×116.

[0066] 3) Construct a multi-task MRI heart segmentation and quantification network based on residual convolutional network, which also includes a method for generating cardiac T 2 a quantification module for quantitative analysis and a segmentation module for cardiac structure segmentation;

[0067] The overall network architecture is as follows Figure 2 As shown, it consists of a segmentation module and a quantification module.

[0068] The segmentation module adopts the traditional encoder-decoder architecture, inputting 3 contrasts and image size of 116×116 data, which is resampled to 128×128 dimensions by linear interpolation. The batch data B size is 32, so the dimension of the input data is 32×3×128×128.

[0069] The encoder first extracts features through an initial two-dimensional convolutional layer with a convolution kernel size of 3×3, a padding size of 1×1, and 64 output channels, so the output dimension is 32×64×128×128. The convolution kernel size is 3×3, the padding size is 1×1, and the output channel is 64, so the output dimension is 32×64×128×128. The convolution kernel size is 3×3, the padding size is 1×1, and the output channel size is 64. The convolution kernel size is 3×3, the padding size is 1×1, and the output channel size is 64. The convolution kernel size is 3×3, the padding size is 1×1, and the output channel size is 64. The convolution kernel size is 3×3, the padding size is 1×1, and the output channel size is 64. The convolution kernel size is 3×3, and the padding size is 1×1.

[0070] The decoder uses two-dimensional convolution with a convolution kernel size of 3×3, batch normalization, Relu activation function and upsampling linear interpolation. The interpolation method is bilinear interpolation, restores high-level semantic information, and gradually enlarges the recovery resolution. The corresponding dimensions are 32×1024×8×8, 32×512×16×16, 32×256×32×32, 32×128×64×64, 32×64×128×128. Finally, through a 64×4 two-dimensional convolution layer, a multi-channel segmentation result with a dimension of 32×4×128×128 is output, where 4 corresponds to 4 categories, namely {0,1,2,3} described in step 1), 0 represents background, 1 represents left ventricle, 2 represents myocardium, and 3 represents right ventricle.

[0071] Feature fusion is also performed between the encoder and the decoder. The feature maps with the same resolution are spliced ​​together to integrate low-level and high-level features, global and local information. That is, the feature map of 32×64×128×128 in the encoder and the feature map of 32×64×128×128 in the decoder are spliced ​​in the second channel dimension to obtain a feature map of 32×128×128×128, and then two-dimensional convolution is used to downsample its channel to obtain a fused feature map of 32×64×128×128. The feature maps with the same resolution are spliced ​​together to integrate low-level and high-level features, global and local information.

[0072] The segmentation module extracts 5 resolution feature maps and the loss function The five losses are accumulated as shown in formula (3):

[0073]

[0074] Among them, l 1 Indicates the size of the loss function calculated for a feature map with a dimension of 32×64×128×128, l 2 Indicates the size of the loss function calculated for a feature map with a dimension of 32×128×64×64, l 3 Indicates the size of the loss function calculated for a feature map with a dimension of 32×256×32×32, l 4 Indicates the size of the loss function calculated for a feature map with a dimension of 32×512×16×16, l 5 Indicates the size of the loss function calculated for a feature map with a dimension of 32×1024×8×8.

[0075] The quantitative module uses the segmentation result 32×4×128×128 of the previous layer as the input of this network layer, and adopts a shallow encoder-decoder structure.

[0076] First, the 4-channel input data is converted into a single channel through two-dimensional convolution, with a dimension of 32×1×128×128. It consists of a residual module with a maximum pooling layer of 2×2, two-dimensional convolution, a convolution kernel size of 3×3, batch normalization, ReLU activation function, and linear interpolation, and the interpolation method is bilinear interpolation.

[0077] Among them, only the output of the last layer will calculate the loss size. The features extracted by the middle layer will not be calculated for the loss size. The dimensions are 32×64×128×128, 32×128×64×64, 32×256×32×32, 32×512×16×16, 32×1024×8×8, and finally the output passes through a 64×1 two-dimensional convolution layer, and the output size is 32×1×128×128 single-channel T 2 Quantitative results.

[0078] 4) Design a multi-task loss function strategy, determine the network optimizer parameters, and use the training data set with segmentation and quantitative labels to train the model;

[0079] The segmentation loss function is shown in formula (3), which uses the cross-entropy (CE) loss function, and its size calculation is shown in formula (4):

[0080]

[0081] Among them, c = 1, 2, 3, class 0 represents the background, which does not participate in the calculation of the loss function, and p 1 =1,p 2 =2,p 3 =3 represents the value of the true label, q 1 ,q 2 ,q 3 ∈[0,1] indicates the probability that the model prediction result belongs to this category.

[0082] Quantifying the size of the loss function The Structural Similarity Image Measurement (SSIM) loss function is used, and the calculation method is shown in formula (5):

[0083]

[0084] in, represents the image predicted by the model, represents the image of the true label, Represent the mean of images X and Y respectively, Represents the standard deviation of images X and Y respectively, Represents the covariance of images X and Y.

[0085] The loss function of the overall network for:

[0086]

[0087] in, are the weights of the loss functions for the segmentation task and the quantitative task, respectively, and t∈[1,2000] represents the current training round.

[0088] For the multi-task loss function, the weights are automatically adjusted by dynamically balancing the weights, as shown in formula (7):

[0089]

[0090] Where, e = {segmentation, quantification}, represents the loss change rate, Represents the weight of the loss function corresponding to the task, A=1, F=2 are hyperparameters.

[0091] The Adam optimizer was used, and the initial learning rate Lr was set to 1e-3, i.e. 0.001, the total training rounds T = 2000, and the batch size B = 32. The software framework used for the training network in this experiment was Pytorch 1.13 version, the system memory size was 512GB, and the video memory size was 24GB.

[0092] The gradient descent method is used on the training set and the validation set to iteratively optimize the weights of the neural network until the loss function converges and the training process is completed.

[0093] 5) Load the trained network model, input the test set into the loaded network model, and obtain the return values ​​of the segmentation prediction results and quantitative prediction results;

[0094] Load the trained network model and input the test set into the loaded network model.

[0095] The segmentation results are as follows Figure 3As shown in the figure, it includes the segmentation results of healthy people in the test set and the segmentation results of the heart data of patients who did not participate in the training. The multi-channel prediction result 32×4×128×128 output by the segmentation module corresponds to the probability of prediction for each category. The maximum probability in the channel dimension is obtained, and the corresponding channel subscript is obtained to divide the category to which the pixel belongs. Then the pixels of different categories are mapped to the RGB channel, where the RGB channel corresponding to the value belonging to the first category is (255, 0, 0) and displayed in red, the RGB channel corresponding to the value belonging to the second category is (0, 255, 0) and displayed in green, and the RGB channel corresponding to the value belonging to the third category is (0, 0, 255) and displayed in blue, thereby obtaining the final complete cardiac structure segmentation prediction image.

[0096] Healthy people T in the test set 2 Quantitative results such as Figure 4 As shown, patients T who did not participate in the training 2 Quantitative results such as Figure 5 The single-channel prediction result output by the quantitative module is 32×1×128×128, and then the predicted quantitative result is normalized and multiplied by T 2 The empirical interval of the quantitative value is [0ms, 200ms], and the final T 2 Quantitative prediction images.

Claims

1. Deep learning multi-task magnetic resonance cardiac segmentation and quantification method, Features The following steps are involved: 1) Obtain magnetic resonance cardiac multi-contrast images, perform data preprocessing, and create training labels; 2) The processed data set is divided into training set, validation set and test set according to a fixed ratio; 3) Construct a multi-task MRI heart segmentation and quantification network based on residual convolutional network, which also includes a method for generating cardiac T 2 The quantitative module for quantitative analysis and the segmentation module for cardiac structure segmentation are specifically composed as follows: The segmentation module adopts the traditional encoder-decoder architecture, inputting K contrasts and image data of size N×N, which are resampled to H×H dimensions through linear interpolation; The encoder consists of an initial 2D convolutional layer to extract features, followed by multiple residual module iterations to downsample and generate deep feature maps; The decoder restores deep semantic information through convolution, normalization, ReLU activation function and upsampling linear interpolation, gradually enlarges and restores the resolution, and finally outputs the segmentation result; Feature fusion is performed between the encoder and decoder, which concatenates feature maps with the same resolution and integrates low-level and high-level features as well as global and local information. The segmentation module extracts Resolution feature map, loss function size The J losses are accumulated, as shown in formula (3): Where j = 1, 2, ..., J, Indicates the weight corresponding to the loss calculated by the feature map at the current resolution. Indicates the size of the loss function calculated for the feature map at the current resolution; The quantitative module takes the segmentation result of the previous layer as input and adopts a shallow encoder-decoder structure, which consists of a residual module, two-dimensional convolution, normalization, ReLU activation function and upsampling linear interpolation; Among them, only the result of the last layer output will calculate the loss size, the features extracted by the middle layer do not participate in the loss size calculation, and the final output is the single channel T 2 Quantitative results; 4) Design a multi-task loss function strategy, determine the network optimizer parameters, and use the training data set with segmentation and quantitative labels to train the model. The specific definitions are as follows: The segmentation loss function is shown in formula (3), which uses the cross entropy loss function. The loss function size calculation of the feature map at the current resolution is shown in formula (4): Where c = 1, 2, ..., C, C represents the total number of categories, p c represents the value of the true label, Indicates the probability that the model prediction result belongs to this category; Quantifying the size of the loss function The structural similarity loss function is used, and the calculation method is shown in formula (5): in, represents the image predicted by the model, represents the image of the true label, Represent the mean of images X and Y respectively, Represents the standard deviation of images X and Y respectively, Represents the covariance of images X and Y; The loss function of the overall network for: Among them, W 1 (t), are the weights of the loss functions for the segmentation task and the quantitative task, respectively. Indicates the current training round; For the multi-task loss function, the weights are automatically adjusted by dynamically balancing the weights, as shown in formula (7): Where, e = 1, 2, ..., E, E represents the total number of tasks, represents the loss change rate, represents the weight of the loss function corresponding to the task, is a hyperparameter; Adopt Adam optimizer, set the initial learning rate Lr, total training rounds T, batch size B; use gradient descent method on training set and validation set to iteratively optimize the weights of neural network until the loss function converges and the training process is completed; 5) Load the training model of step 4), input the test set, perform RGB mapping operation on the output segmentation result, perform window truncation operation on the output quantitative result, and obtain the final heart segmentation and quantitative results.

2. The deep learning multi-task magnetic resonance heart segmentation and quantification method as claimed in claim 1, Features In step 1), it includes: Read the original image domain files of K contrasts of the magnetic resonance heart, save them into K files with different TE according to the dimension of the pulse echo, read these segmented image files, and perform a is the pulse echo time, i=1,2,…,K, and is processed according to formula (1) to obtain the normalized K Expand each channel dimension and concatenate them to form a tensor Read the original K-space files of the corresponding K contrasts, and convert the original K-space data into image domain data through inverse Fourier transform. For T in formula (2), 2 Modeling method, using nonlinear least squares to calculate T 2 Quantify the labels and perform window truncation so that they fall within the empirical interval [0ms, 200ms]: T 2 Quantitative signal model: S i =S 0 *exp(-TE i / T 2 ) (2) Where i = 1, 2, …, K, For pixels at TE i The magnetization intensity at the moment, S 0 represents the initial magnetization, is the relaxation time to be solved; Read the corresponding segmentation label file, remove the background, and cut out the length of The original image, quantitative label and segmentation label are cropped according to the square matrix area and saved as an H5 file.

3. The deep learning multi-task magnetic resonance heart segmentation and quantification method as claimed in claim 1, Features In step 5), it includes: Load the trained network model and input the test set into the loaded network model; The segmentation module outputs multi-channel prediction results, indicating the probabilities of different categories; the maximum probability is selected channel by channel and mapped to the RGB channel to form a cardiac structure segmentation prediction image; The quantitative module outputs the single-channel quantitative prediction results, which are normalized and mapped to the empirical interval of [0ms, 200ms] to obtain the final T 2 Quantitative prediction image.

Citation Information

Patent Citations

  • Improved U-Net brain tumor segmentation method based on attention mechanism and multi-scale feature fusion

    CN115424103A

  • Magnetic resonance image heart segmentation method based on coarse-grained weak annotation

    CN116563549A