A heart segmentation method based on dual-path convolutional hybrid coding enhancement
Through the heart segmentation method based on dual-path convolution hybrid coding enhancement, the problem of low accuracy in the existing technology centered heart MR image segmentation algorithm when dealing with motion artifacts, noise and complex structures is solved, and more efficient and accurate heart multi-class segmentation is achieved.
Patent Information
- Application Number
- CN202410750835.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The existing automatic cardiac MR image segmentation algorithm has low accuracy when dealing with motion artifacts, noise and complex heart structures, making it difficult to accurately distinguish the boundaries between lesional heart tissue and normal tissue.
The cardiac segmentation method based on dual-path convolution hybrid coding enhancement is adopted. Through the dual-path convolution neural network model, data augmentation, Laplace filtering algorithm and hybrid coding enhancement blocks are combined to improve the anti-interference ability and feature recognition ability of the model to cardiac images.
The model's processing ability of motion artifacts, noise and complex structures in cardiac MR images is improved, and the ability to identify key features is enhanced, achieving more accurate cardiac multi-category segmentation.
Smart Images

Figure CN118608486B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the interdisciplinary technical field of deep learning and medical image segmentation, and specifically to a heart segmentation method based on dual-path convolutional hybrid coding enhancement. Background Art
[0002] As a key organ of the human circulatory system, the heart undertakes the important physiological function of transporting blood and essential nutrients to tissues throughout the body. The anatomical structure of the heart is mainly composed of myocardial tissue, and its internal chambers are divided into four parts: left atrium, left ventricle, right atrium and right ventricle. Severe lesions of the cardiac veins or arteries may lead to major cardiovascular diseases, posing a serious threat to human health. With the improvement of my country's material level and the continuous development of society, the lives of contemporary people have undergone great changes. These changes are mainly reflected in the quality of life and habits of residents. Bad habits such as drinking, smoking, irregular work and rest, lack of exercise, and overeating are gradually rampant. These changes have led to an increasing incidence of cardiovascular diseases year by year. Heart segmentation technology occupies a core position in medical image analysis, especially for the early diagnosis and treatment of cardiovascular diseases. It is crucial to study automated heart segmentation methods to improve the efficiency and accuracy of diagnosis and treatment.
[0003] At present, most advanced cardiac segmentation algorithms are implemented using FCN or U-Net architectures. These methods enhance the feature extraction capabilities of training samples by building complex feature extraction modules, and fuse prior information in a multi-stage and multi-perspective manner to improve the robustness and generalization of the model. However, when using the existing automatic segmentation of cardiac MR images, since the heart is a constantly moving organ, its beating and blood flow will introduce motion artifacts during the imaging process. These artifacts will interfere with the accuracy of the image segmentation algorithm. At the same time, cardiac MR will also be affected by equipment noise, breathing-induced noise, etc. In addition, the heart is composed of multiple different tissues and structures, including the myocardium, endocardium, epicardium, and four chambers of the heart. The morphological and functional complexity of these structures affects the key features in the image, such as intensity, texture, and boundary information; as well as the lesion areas in the cardiac tissue, such as myocardial infarction or cardiac tumors, whose edges are often difficult to define, and have a high degree of similarity in morphology and structure with the surrounding healthy myocardial tissue. This similarity makes it difficult for the segmentation algorithm to accurately distinguish the boundary between diseased cardiac tissue and normal tissue in cardiac MR images. Therefore, it may cause certain deviations in cardiac images and reduce the accuracy of cardiac images. Summary of the invention
[0004] The object of the present invention is to provide a heart segmentation method based on dual-path convolutional hybrid coding enhancement to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a heart segmentation method based on dual-path convolution hybrid coding enhancement, comprising the following steps:
[0006] S1. Image acquisition: obtain cardiac MR images as sample data, and obtain the cardiac labels corresponding to the MR images after manual annotation;
[0007] S2, image preprocessing: preprocess the image through normalization, data enhancement and Laplace filtering algorithm;
[0008] S3, model construction: construct a dual-path convolutional neural network model based on the encoder-encoder structure;
[0009] S4, model training: randomly crop the preprocessed data, input the data into the network, compare the segmentation results predicted by the model with the manually annotated labels, optimize the algorithm after calculating the loss function, and update the network weights;
[0010] S5. Model reasoning: The human heart MR three-dimensional image to be segmented is input into the trained heart classification and segmentation model for pixel classification to complete the multi-class segmentation of the heart.
[0011] Preferably, the heart labels in S1 include 10 different labels from 0 to 9, wherein label 0 is the background label, and labels 1 to 9 are respectively right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium, and left ventricle labels. In S1, the labeled sample data is divided into a training set and a test set.
[0012] Preferably, in S2, the cropped cardiac MR image is subjected to Z-score normalization, and the Z-score normalization formula is as follows:
[0013] Z=(x-μ) / σ
[0014] Among them, x is the HU value of the pixel in the cardiac MR image, u is the mean HU value of all pixels, and σ is the standard deviation of all pixels.
[0015] Preferably, the data enhancement in S2 needs to use random scaling, random Gaussian noise, random contrast enhancement, random mirror flipping, random dynamic blur and random ghosting, and the random dynamic blur includes the following steps:
[0016] a. Determine the blur kernel: The blur kernel can be a Gaussian kernel or other types of kernels, which are used to simulate blur effects. The Gaussian blur kernel formula is:
[0017]
[0018] σ is the standard deviation, G(p, q) is the value of the Gaussian kernel at the cardiac MR image point (p, q)
[0019] b. Select randomness: determine the position and strength of the kernel during blurring;
[0020] c. Repeated application of blur kernel: applying blur kernel to MR cardiac image multiple times;
[0021] d. Composite blur effect: All the results of repeated applications are combined to produce the final dynamic cardiac MR blurred image.
[0022] Preferably, the random ghosting comprises the following steps:
[0023] a. Convert cardiac MR images to frequency space using Fourier transform. For a given cardiac image I(m, n), its Fourier transform F(u, v) can be calculated using two-dimensional Fourier transform:
[0024] F(u,v)=∫∫I(m,n)·e -2πi(um+vn) dmdn
[0025] Where u and v are frequency components, and m and n are coordinates in the cardiac MR imaging space.
[0026] b. Add ghosting in frequency space, simulating ghosting by duplicating and shifting the original data points in frequency space
[0027] c. Adjust the ghost intensity by adjusting the amplitude of the data point copied to the frequency space. If A is the amplitude of the original data point and s is the intensity parameter of the ghost, the amplitude of the ghost point can be expressed as A′=A·s, where s is 0.3;
[0028] d. Convert back to image data from frequency space using inverse Fourier transform, the formula is:
[0029] I′(m,n)=∫∫F′(u,v)·e 2πi(um+vn) dudv.
[0030] Preferably, the Laplace filtering algorithm comprises the following steps:
[0031] a. The kernel of Laplace is:
[0032]
[0033] b. Convolution operation: Use the above Laplace kernel to perform convolution operation with the cardiac MR image. For each pixel in the MR image, multiply the pixel value in its neighborhood with the corresponding value in the Laplace kernel, and then sum the results to obtain the new value of the pixel;
[0034] c. Result conversion: superimpose the image result after Laplace filter kernel processing with the original image to enhance the edge while retaining the content of the MR image.
[0035] Preferably, each encoder in S3 is composed of 4 encoding blocks, each encoding block has 1 residual block and 1 downsampling block, each residual block is composed of a 3x3x3 convolution layer connected to a leakyRelu and a batch normalization layer BN, and then connected to a 3x3x3 convolution layer and a leakyRelu layer and a batch normalization layer BN, and the data input is short-connected to the output of the first residual block, and the hybrid coding enhancement block is composed of a convolution layer block, a GAP module and a softmax module.
[0036] Preferably, in S4, a 3D patch block with a size of 96×96×96 is cropped for training, and the AdamW optimization algorithm is used to update the network weights after calculating the loss through the loss function.
[0037] The aggregation loss function formula is:
[0038] M Loss=aFocal loss+bDice loss
[0039] in, α is the loss weight of the foreground, β is the adjustment factor, is the predicted value of the pixel in the target image sample, γ is the true value of the pixel in the target image sample, Dice loss = 1-Dice, Dice = 2|X∩Y| / (|X|+|Y|), X is the geometry of the pixel in the segmentation result, Y is the geometry of the pixel in the true result, a and b are the weights representing Focalloss and Diceloss respectively.
[0040] Preferably, the initial learning rate of the network training model in S4 is set to 0.0001, and the ReduceLROnPlateau learning rate is automatically decayed, and the patience parameter is set to 30 times. When the Loss does not decrease in 50 consecutive Epochs, the learning rate is automatically reduced to 1 / 10 of the original, the Batchsize is set to 4, and a total of 1000 rounds of training are performed.
[0041] Preferably, the multi-category segmentation of the heart in S5 includes segmentation of the right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium and left ventricle.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] 1. The present invention uses random dynamic blur and random ghosting algorithms in data enhancement to simulate real cardiac MR images by adding dynamic blur and partial ghosting to the image, thereby enhancing the model's anti-interference ability to cardiac MR image blur and artifacts, and enhancing the overall generalization and robustness of the model;
[0044] 2. The present invention sets a dual-path convolutional neural network model. The overall structure of the network model uses two encoders to fully capture the contextual information and detail features of the cardiac image. The hybrid coding enhancement block dynamically adjusts the weights between the original image feature map and the Laplace feature map to improve the model's ability to recognize key features in the cardiac image. The decoder gradually restores the spatial size of the feature map by upsampling, and maps the deep features with lower resolution to the output with higher resolution, so that the network can simultaneously learn the global and local features of the image, summarize and effectively integrate the semantic information, and perform more accurate cardiac segmentation.
[0045] 3. The present invention uses the Laplace filter algorithm in data preprocessing, and the high-frequency components of cardiac MR images are enhanced, including the edges and texture details in the image. The second-order differential characteristics of the algorithm highlight the areas with significant grayscale changes in the image, making the edges of the cardiac tissue structure more obvious, providing more accurate input data for the subsequent segmentation algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic structural diagram of a preferred embodiment of a heart segmentation method based on dual-path convolutional hybrid coding enhancement provided by the present invention;
[0047] Figure 2 A schematic diagram of the structure of the dual-path convolutional network model provided by the present invention;
[0048] Figure 3 A schematic diagram of the coding block structure of the encoder provided by the present invention;
[0049] Figure 4 A schematic diagram of the structure of the residual block provided by the present invention;
[0050] Figure 5 A schematic diagram of the structure of a hybrid coding enhancement block provided by the present invention;
[0051] Figure 6 A schematic diagram of the coding block structure of the decoder provided by the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] See also Figure 1-6 As shown, a heart segmentation method based on dual-path convolutional hybrid coding enhancement includes the following steps:
[0054] S1. Image acquisition: obtain cardiac MR images as sample data, and obtain the cardiac labels corresponding to the MR images after manual annotation;
[0055] S2, image preprocessing: preprocess the image through normalization, data enhancement and Laplace filtering algorithm;
[0056] S3, model construction: construct a dual-path convolutional neural network model based on the encoder-encoder structure;
[0057] S4, model training: randomly crop the preprocessed data, input the data into the network, compare the segmentation results predicted by the model with the manually annotated labels, optimize the algorithm after calculating the loss function, and update the network weights;
[0058] S5. Model reasoning: The human heart MR three-dimensional image to be segmented is input into the trained heart classification and segmentation model for pixel classification to complete the multi-class segmentation of the heart.
[0059] refer to Figure 1 As shown, the heart labels in S1 include 10 different labels from 0 to 9, wherein label 0 is the background label, and labels 1 to 9 are right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium, and left ventricle labels, respectively. In S1, the labeled sample data is divided into a training set and a test set.
[0060] In S2, the cropped cardiac MR image is subjected to Z-score normalization, and the Z-score normalization formula is as follows:
[0061] Z=(x-μ) / σ
[0062] Among them, x is the HU value of the pixel in the cardiac MR image, u is the mean HU value of all pixels, and σ is the standard deviation of all pixels.
[0063] The data enhancement in S2 requires the use of random scaling, random Gaussian noise, random contrast enhancement, random mirror flipping, random dynamic blur and random ghosting, and the random dynamic blur includes the following steps:
[0064] a. Determine the blur kernel: The blur kernel can be a Gaussian kernel or other types of kernels, which are used to simulate blur effects. The Gaussian blur kernel formula is:
[0065]
[0066] σ is the standard deviation, G(p, q) is the value of the Gaussian kernel at the cardiac MR image point (p, q)
[0067] b. Select randomness: determine the position and strength of the kernel during blurring;
[0068] c. Repeated application of blur kernel: applying blur kernel to MR cardiac image multiple times;
[0069] d. Composite blur effect: All the results of repeated applications are combined to produce the final dynamic cardiac MR blurred image.
[0070] The random ghosting comprises the following steps:
[0071] a. Convert cardiac MR images to frequency space using Fourier transform. For a given cardiac image I(m, n), its Fourier transform F(u, v) can be calculated using two-dimensional Fourier transform:
[0072] F(u,v)=∫∫I(m,n)·e -2πi(um+vn) dmdn
[0073] Where u and v are frequency components, and m and n are coordinates in the cardiac MR imaging space.
[0074] b. Add ghosting in frequency space, simulating ghosting by duplicating and shifting the original data points in frequency space
[0075] c. Adjust the ghost intensity by adjusting the amplitude of the data point copied to the frequency space. If A is the amplitude of the original data point and s is the intensity parameter of the ghost, the amplitude of the ghost point can be expressed as A′=A·s, where s is 0.3;
[0076] d. Convert back to image data from frequency space using inverse Fourier transform, the formula is:
[0077] I′(m,n)=∫∫F′(u,v)·e 2πi(um+vn) dudv.
[0078] The Laplace filtering algorithm comprises the following steps:
[0079] a. The kernel of Laplace is:
[0080]
[0081] b. Convolution operation: Use the above Laplace kernel to perform convolution operation with the cardiac MR image. For each pixel in the MR image, multiply the pixel value in its neighborhood with the corresponding value in the Laplace kernel, and then sum the results to obtain the new value of the pixel;
[0082] c. Result conversion: superimpose the image result after Laplace filter kernel processing with the original image to enhance the edge while retaining the content of the MR image.
[0083] like Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, each encoder in S3 consists of 4 encoding blocks, each encoding block has 1 residual block and 1 downsampling block, each residual block consists of a 3x3x3 convolution layer connected to a leakyRelu layer and a batch normalization layer BN, and then connected to a 3x3x3 convolution layer and a leakyRelu layer and a batch normalization layer BN, and the data input is short-connected to the output of the first residual block. The hybrid coding enhancement block consists of a convolution layer block, a GAP module and a softmax module. ori is the feature map of the original image, F l It is the feature map of the Laplacian image. The hybrid coding enhancement block first adds the two features to fuse them, and performs GAP, i.e. global average pooling, on the added feature map to generate the channel feature vector F G , use one-dimensional convolution on the channel feature vector to interact with the information between channels to obtain the feature vector F′ G , and then use softmax to perform channel weighting on the feature vector, calculate the weight vectors α and β corresponding to the original feature map and the Laplace feature map, and multiply the weight vectors with the feature map to obtain the original image enhanced feature map F′ ori and Laplace enhanced feature map F′ l Finally, the two enhanced feature maps are added together to obtain the mixed enhanced feature map F o, the hybrid coding enhancement block dynamically adjusts the weights of the original image feature map and the Laplacian feature map to enhance the model's learning of key features of cardiac images, such as intensity, texture, and boundary information. At the same time, the adaptive multi-dimensional feature fusion mechanism helps the model better learn the mixed features of cardiac images and improves the network model's understanding and accuracy of cardiac segmentation tasks. The decoder consists of four decoding blocks, each of which has 1 residual block and 1 upsampling block. The residual block in the decoding block has the same structure as the above, consisting of a 3x3x3 convolution layer connected to a leakyRelu and a batch normalization layer BN, and then connected to a 3x3x3 convolution layer and a leakyRelu layer and a batch normalization layer BN. At the same time, the data input is short-circuited to the output of the residual block. The upsampling block in the decoding block is the deconvolutional neural network ConvTranspose, which is used to upsample the low-resolution feature map to a higher resolution and learn complex feature mapping. The segmentation layer uses a 3D convolutional network with a kernel size of 1x1x1, where the convolution layer is used to extract cardiac MR image features, the LeakyReLU activation function introduces nonlinear changes, the BN layer is used to speed up training and improve model generalization, and the short-circuit structure makes it easier for the network to learn the identity mapping, thereby solving the degradation problem in the deep network. The downsampling block in the encoding block is the maximum pooling layer, which uses the maximum pooling layer to retain the significant features in the cardiac image, increases the invariance of the network model to the translation, rotation and deformation of the image input, and reduces the size of the feature map, helping to accelerate network training.
[0084] In S4, a 3D patch block with a size of 96×96×96 is cut for training. The loss function needs to be used to calculate the loss and then use the AdamW optimization algorithm to update the network weights.
[0085] The aggregation loss function formula is:
[0086] M Loss=aFocal loss+bDice loss
[0087] in, α is the loss weight of the foreground, β is the adjustment factor, is the predicted value of the pixel in the target image sample, γ is the true value of the pixel in the target image sample, Dice loss = 1-Dice, Dice = 2|X∩Y| / (|X|+|Y|), X is the geometry of the pixel in the segmentation result, Y is the geometry of the pixel in the true result, a and b are the weights representing Focalloss and Diceloss respectively.
[0088] The initial learning rate of the network training model in S4 is set to 0.0001, and the ReduceLROnPlateau learning rate is automatically decayed. The patience parameter is set to 30 times. When the loss does not decrease in 50 consecutive Epochs, the learning rate is automatically reduced to 1 / 10 of the original. The batch size is set to 4, and a total of 1000 rounds of training are performed.
[0089] The multi-category segmentation of the heart in S5 includes the segmentation of the right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium and left ventricle.
[0090] Working principle: cardiac MR images are obtained as sample data, and the cardiac labels corresponding to the MR images are obtained after manual annotation. The labels include 10 different labels from 0 to 9, specifically: label 0 is the background label, labels 1 to 9 are the right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium, and left ventricle labels respectively. The labeled sample data are divided into a training set and a test set, and then the cropped cardiac MR images are Z-score normalized. The Z-score normalization is shown in the formula Z = (x-μ) / σ, and then random dynamic blur and random ghosting are used for data enhancement. First, the blur kernel is determined. The present invention uses a Gaussian blur kernel, and the formula adopts Then determine the position and strength of the kernel during blurring, apply the blur kernel to the MR cardiac image multiple times, and synthesize the results of all repeated applications to produce the final dynamic cardiac MR blurred image. When performing data enhancement by random ghosting, first convert the cardiac MR image to frequency space using Fourier transform. For a given cardiac image I(m,n), its Fourier transform F(u,v) can be calculated using a two-dimensional Fourier transform, and the formula is F(u,v)=∫∫I(m,n)·e -2πi(um+vn) dmdn, then add ghosting in the frequency space, simulate ghosting by copying and shifting the original data points in the frequency space, and then control it by adjusting the amplitude of the data points copied to the frequency space. If A is the amplitude of the original data point and s is the intensity parameter of the ghosting, the amplitude of the ghost point can be expressed as A′=A·s, s is 0.3, and finally converted back to image data from the frequency space. The inverse Fourier transform formula is I′(m,n)=∫∫F′(u,v)·e 2πi(um+vn) dudv, through the Laplace filtering algorithm, where the Laplace kernel is: Then, the Laplace kernel is used to perform convolution operation with the cardiac MR image. For each pixel in the MR image, the pixel value in its neighborhood is multiplied by the corresponding value in the Laplace kernel, and then the results are summed to obtain the new value of the pixel. Finally, the image result processed by the Laplace filter kernel is superimposed on the original image to enhance the edge while retaining the content of the MR image. Then, a dual-path convolutional neural network model is constructed. The overall structure is based on the encoder-decoder structure, which includes two encoders, a hybrid coding enhancement block, a decoder and a segmentation block. Each encoder consists of 4 coding blocks, each of which has 1 residual block and 1 downsampling block. Each residual block consists of a layer of 3x3 The convolution layer of x3 is connected to a leakyRelu and a batch normalization layer BN, and then connected to a 3x3x3 convolution layer, a leakyRelu layer and a batch normalization layer BN. At the same time, the data input is shorted to the output of the first residual block. The hybrid coding enhancement block consists of a convolution layer block, a GAP module and a softmax module. The decoder consists of four decoding blocks, each of which has 1 residual block and 1 upsampling block. The residual block in the code block has the same structure as above, consisting of a 3x3x3 convolution layer connected to a leakyRelu and a batch normalization layer BN, and then connected to a 3x3x3 convolution layer, a leakyRelu layer and a batch normalization layer BN. At the same time, the data input is shorted to the residual The output of the difference block, the upsampling block in the decoding block is the deconvolutional neural network ConvTranspose, which upsamples the low-resolution feature map to a higher resolution, learns complex feature maps, and uses a 3D convolutional network with a kernel size of 1x1x1 to construct the segmentation layer, thereby completing the construction of the neural network, and then training it. First, the preprocessed data is randomly cropped, and the 3Dpatch block with a cropping size of 96×96×96 is trained. By inputting the data into the network, the output result, that is, the predicted segmentation of the heart, is obtained. The segmentation result predicted by the model is compared with the manually annotated label, and the loss is calculated through the loss function and then the AdamW optimization algorithm is used. The network weights were updated using the ReduceLROnPlateau learning rate automatic decay method. The patience parameter was set to 30 times. When the Loss did not decrease in 50 consecutive Epochs, the learning rate was automatically reduced to 1 / 10 of the original value. The batch size was set to 4, and a total of 1000 rounds of training were performed. After the model training was completed, the human heart MR three-dimensional image to be segmented was input into the trained heart multi-class segmentation model for pixel classification to complete the multi-class segmentation of the heart, including the segmentation of the right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium, and left ventricle.
[0091] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0092] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A heart segmentation method based on dual-path convolutional hybrid coding enhancement, characterized in that: The following steps are involved: S1. Image acquisition: obtain cardiac MR images as sample data, and obtain the cardiac labels corresponding to the MR images after manual annotation; S2, image preprocessing: preprocess the image through normalization, data enhancement and Laplace filtering algorithm; S3, model construction: construct a dual-path convolutional neural network model based on the encoder-encoder structure; S4, model training: randomly crop the preprocessed data, input the data into the network, compare the segmentation results predicted by the model with the manually annotated labels, optimize the algorithm after calculating the loss function, and update the network weights; S5, model reasoning: input the human heart MR three-dimensional image to be segmented into the trained heart classification and segmentation model for pixel classification to complete the multi-class segmentation of the heart; The heart labels in S1 include 10 different labels from 0 to 9, where label 0 is the background label, and labels 1 to 9 are right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium, and left ventricle labels, respectively. In S1, the labeled sample data is divided into a training set and a test set; The multi-category segmentation of the heart in S5 includes segmentation of the right atrium, right ventricle, atrial septum, left atrial anterior wall, left atrial posterior wall, left top wall, left atrial appendage, left atrium and left ventricle; The data enhancement in S2 requires the use of random scaling, random Gaussian noise, random contrast enhancement, random mirror flipping, random dynamic blur and random ghosting, and the random dynamic blur includes the following steps: a. Determine the blur kernel: The blur kernel is a Gaussian kernel, which is used to simulate the blur effect. The Gaussian blur kernel formula is: ; σ is the standard deviation, G(p, q) is the value of the Gaussian kernel at the cardiac MR image point (p, q); b. Select randomness: determine the position and strength of the kernel during blurring; c. Repeated application of blur kernel: applying blur kernel to MR cardiac image multiple times; d. Synthetic blur effect: synthesizing the results of all repeated applications to produce the final dynamic cardiac MR blurred image; The random ghosting comprises the following steps: a. Convert cardiac MR images to frequency space using Fourier transform. For a given cardiac image I(m, n), its Fourier transform F(u, v) can be calculated using two-dimensional Fourier transform: ; Where, u, v are frequency components, m, n are coordinates in the cardiac MR image space; b. Adding ghosting in frequency space, simulating ghosting by replicating and shifting the original data points in frequency space; c. Adjust the ghost intensity by adjusting the amplitude of the data point copied to the frequency space. If A is the amplitude of the original data point and s is the intensity parameter of the ghost, the amplitude of the ghost point can be expressed as , s is 0.3; d. Convert back to image data from frequency space using inverse Fourier transform, the formula is: ; The Laplace filtering algorithm comprises the following steps: a. The kernel of Laplace is: ; b. Convolution operation: Use the above Laplace kernel to perform convolution operation with the cardiac MR image. For each pixel in the MR image, multiply the pixel value in its neighborhood with the corresponding value in the Laplace kernel, and then sum the results to obtain the new value of the pixel; c. Result conversion: superimpose the image result after Laplace filter kernel processing with the original image to enhance the edge while retaining the content of the MR image.
2. The heart segmentation method based on dual-path convolutional hybrid coding enhancement according to claim 1, characterized in that: In S2, the cropped cardiac MR image is subjected to Z-score normalization, and the Z-score normalization formula is as follows: ; Among them, x is the HU value of the pixel in the cardiac MR image, u is the mean HU value of all pixels, and σ is the standard deviation.
3. The heart segmentation method based on dual-path convolutional hybrid coding enhancement according to claim 1, characterized in that: In the S3, the encoder-decoder structure includes two encoders, a hybrid coding enhancement block, a decoder and a segmentation block. Each encoder in the S3 is composed of 4 coding blocks, each coding block has a residual block and a downsampling block, and each residual block is composed of a 3x3x3 convolution layer connected to a leakyRelu and a batch normalization layer BN, and then connected to a 3x3x3 convolution layer and a leakyRelu layer and a batch normalization layer BN. At the same time, the data input is short-connected to the output of the first residual block. The hybrid coding enhancement block is composed of a convolution layer block, a GAP module and a softmax module.
4. The heart segmentation method based on dual-path convolutional hybrid coding enhancement according to claim 1, characterized in that: In S4, a 3D patch block with a size of 96×96×96 is cut for training. The loss function needs to be used to calculate the loss and then use the AdamW optimization algorithm to update the network weights. The loss function formula is: in, , α is the loss weight of the foreground, β is the adjustment factor, is the predicted value of the pixel in the target image sample, y is the true value of the pixel in the target image sample, , X is the set of pixels in the segmentation result, Y is the set of pixels in the real result, a and b are the weights representing Focalloss and Diceloss respectively.
5. The heart segmentation method based on dual-path convolutional hybrid coding enhancement according to claim 1, characterized in that: The initial learning rate of the network training model in S4 is set to 0.0001, and the ReduceLROnPlateau learning rate is automatically decayed. The patience parameter is set to 30 times. When the loss does not decrease in 50 consecutive Epochs, the learning rate is automatically reduced to 1 / 10 of the original. The batch size is set to 4, and a total of 1000 rounds of training are performed.
Citation Information
Patent Citations
Heart segmentation model and pathological classification model training, heart segmentation and pathological classification method and device based on heart MRI (Magnetic Resonance Imaging)
CN113012173A
Three-dimensional image segmentation method based on double-path attention coding and decoding network
CN113643303A
Multi-stage segmentation method based on multi-modal MRI heart image
CN116797618A