Fetal MRI (Magnetic Resonance Imaging) brain tissue segmentation method, system and equipment and medium
By combining the self-configuration method of U-Net and Resnet networks, the problem of multi-resolution data adaptability and low efficiency in lateral ventricular width measurement in fetal MRI brain tissue segmentation is solved, and rapid and robust fetal brain tissue segmentation and lateral ventricular dilation judgments are achieved.
Patent Information
- Application Number
- CN202411609021.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing deep learning-based fetal brain tissue segmentation methods are difficult to adapt to multi-resolution data, and the artificial measurement of lateral ventricle width is inefficient.
A self-configured fetal MRI brain tissue segmentation and classification method is adopted. Through the combination of U-Net segmentation module and Resnet classification module, combined with data preprocessing and automatic network configuration technology, robust segmentation and classification of multi-resolution data is achieved.
This method can quickly segment the brain tissue in the fetal MRI image and determine whether there is a problem of lateral ventricle dilation, which significantly improves the measurement efficiency and reduces the amount of repeated work by doctors.
Smart Images

Figure CN119600046A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, relates to the segmentation of brain tissue images, and in particular to a fetal MRI brain tissue segmentation method, system, equipment and medium. Background Art
[0002] Prenatal examination is crucial for early detection and treatment of fetal congenital diseases, among which the measurement and analysis of key biological indicators of the developing fetal brain is more critical. Ultrasound examination is a common method for prenatal diagnosis, but due to the influence of factors such as cranial acoustic attenuation, ultrasound examination has limitations in judging and analyzing fetal brain development. In recent years, magnetic resonance imaging (MRI) has become increasingly important in assessing fetal brain development and growth. It has the characteristics of superior image resolution and tissue contrast, and plays a vital role in solving difficult diagnoses. Analyzing important biological indicators based on MRI images and judging the degree to which the case deviates from the normal brain development trajectory can be used as an important means to measure fetal brain abnormalities. Among them, the lateral ventricles in the fetal brain tissue are the part that needs to be focused on. Many congenital diseases can cause the morphology of the lateral ventricles to change compared with normal conditions, and lateral ventricle dilatation is a typical example. Therefore, examining fetal brain tissue based on MRI images and analyzing whether the lateral ventricles are dilated is an important method for prenatal examination of pregnant women.
[0003] In the prior art, when the fetus is examined by MRI, the pregnant woman will receive a full-dimensional stereoscopic scan of the fetus in the uterus in the coronal, sagittal and axial directions according to a certain scanning sequence by a magnetic resonance imaging machine under the guidance of a professional physician in the imaging department. After the scan is completed, the doctor reads and analyzes each MRI image data obtained under the sequence, manually measures the width of the lateral ventricle on the imaging display device, analyzes its morphological features one by one, and determines whether there is an abnormality of lateral ventricle dilatation. Due to the huge workload of manual reading and diagnosis, long time consumption and low efficiency, in recent years, people have tried to use many automated and semi-automated methods to detect and segment brain tissue. Deep learning methods, especially convolutional neural networks (CNNs), are very popular in some target recognition and biological image segmentation challenges. They automatically learn complex and representative features directly from the data itself, and achieve better performance than traditional machine learning methods. Segmenting the lateral ventricle organs of fetal brain tissue and measuring the width of the lateral ventricle based on convolutional neural networks is a new method developed in recent years under the background of deep learning.
[0004] The invention patent with application number 202010337402.6 discloses a deep learning-based MRI whole-brain tissue segmentation system, including: an image data preprocessing module for preprocessing MR brain images; an image segmentation module for segmenting preprocessed images; a multi-prior feature network model construction module for constructing a multi-prior feature network model based on symmetric prior, edge prior and neighborhood prior feature information; a training module for training the multi-prior feature network model using a training set; a label fusion module for determining the final segmentation result of each pixel in the MR brain image; an inverse affine transformation module for completing the transformation operation of the MR brain image from the MNI space to the original image space after determining the final segmentation result of each pixel in the MR brain image. The present invention introduces a variety of prior features to make the segmentation results more accurate, the edges between brain tissues clearer, and the details richer.
[0005] The invention patent with application number 202110902377.6 discloses a method for infant brain tissue image segmentation based on U-net and attention mechanism, and the method includes the following steps: randomly select a certain number of samples of 32×32×32 pixels in size to form a training set; build a Dense-Unet network model; use the Dense-Unet network model to train and adjust the training set to obtain the optimal segmentation model and save it; compare the model prediction results and the manual labeling results to obtain the distribution map of the easily misclassified areas; use the Gaussian function to blur the distribution map of the easily misclassified areas of each sample and calculate the average value; form a training set for the training samples according to a certain proportion; design a self-attention mechanism containing space and easily misclassified areas and add it to the network model; use the new network model to train and adjust the training set to obtain the optimal segmentation model and save it.
[0006] Like the above-mentioned invention patent, the existing deep learning-based fetal brain tissue and organ segmentation methods are mostly aimed at data sets with uniform resolution under regular imaging quality. However, in practice, different medical centers have different MRI equipment, different habits of equipment operators, different conditions and situations for examining pregnant women, and different imaging accuracy. Therefore, there are differences in spatial resolution between the imaging sequences of actual fetal brain MRI images. MRI data sets containing multiple spatial resolutions are called multi-resolution data sets, and existing segmentation technologies are difficult to automatically adapt to multi-resolution data. Secondly, in the existing methods, doctors need to manually measure whether the fetus has lateral ventricle dilatation based on the width of the lateral ventricle, and the measurement method is limited to a single MRI image, and does not effectively utilize voxel information, resulting in low measurement efficiency. Summary of the invention
[0007] The purpose of the present invention is to provide a fetal MRI brain tissue segmentation method, system, device and medium in order to solve the problem that the deep learning-based segmentation method in the prior art cannot be applied to multi-resolution data and the manual measurement and single measurement of the lateral ventricle width result in low measurement efficiency.
[0008] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions: A fetal MRI brain tissue segmentation method comprises the following steps: Step S1, obtaining sample data and labels; Obtaining fetal brain MRI image data and label data, the label data including a lateral ventricle segmentation label of each fetal brain MRI image and a classification label of whether lateral ventricle dilatation exists; Step S2, constructing a lateral ventricle segmentation classification model; Constructing a lateral ventricle segmentation and classification model, which includes a U-Net segmentation module and a Resnet classification module. The output of the U-Net segmentation module is used as the input of the Resnet classification module. The U-Net segmentation module adopts a U-Net network, including multiple DWMF blocks for downsampling and multiple decoder blocks for upsampling. The DWMF blocks and the decoder blocks are connected by jump link blocks; each DWMF block includes two depth separation convolution blocks and four depth separation channel dilated convolution blocks. The image data is used as the input of the two depth separation convolution blocks, and the output of one depth separation convolution block is respectively input into three depth separation channel dilated convolution blocks. The outputs of the three depth separation channel dilated convolution blocks are used as the input of the last depth separation channel dilated convolution block. The output of the last depth separation channel dilated convolution block is fused with the output of another depth separation convolution block as the output of the DWMF block; Step S3, training a lateral ventricle segmentation classification model; The sample data and labels obtained in step S1 are used to train the lateral ventricle segmentation classification model constructed in step S2 to obtain a mature lateral ventricle segmentation classification model; Step S4, real-time segmentation and classification; The MRI image of the fetal brain to be tested is acquired in real time and input into the lateral ventricle segmentation classification model, and the lateral ventricle segmentation classification model outputs the segmentation result and the classification result.
[0009] Furthermore, in step S1, after obtaining the fetal brain MRI image data, the voxel information of each fetal brain MRI image is counted, and the counted voxel information is preprocessed; according to the result of the data preprocessing, the parameters of the lateral ventricle segmentation classification model are configured.
[0010] Furthermore, when preprocessing the statistical voxel information, the specific preprocessing method is: Step S1-1-1, determining the target voxel for data preprocessing based on the statistical voxel information; Step S1-1-2, preprocessing based on the target voxel; Based on the difference between the original voxel information and the target voxel, the new shape of the fetal brain MRI image is calculated after the original voxel is scaled to the target voxel, and the fetal brain MRI image is scaled to the size of the new shape by trilinear interpolation to obtain the target image shape size of trilinear interpolation; The calculation formula for the shape and size of the target image of trilinear interpolation is:
[0011] Where H, W, and D represent the width, height, and slice spacing of the slice in the MRI sequence, respectively. Represents the height of each voxel unit in the original voxel, reflecting the physical distance of each pixel point in the slice height dimension (H) corresponding to the real world. represents the height of each voxel unit in the target voxel, Represents the width of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice width dimension (W) corresponding to the real world The width per voxel unit in the target voxel, Indicates the depth of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice spacing size (D) corresponding to the real world. The depth per voxel unit in the target voxel.
[0012] Furthermore, in step S1-1-1, the method for determining the target voxel is: Step S1-1-1-1, determining the median of the voxel information of all samples according to the statistical voxel information; Step S1-1-1-2, judging whether the data set is anisotropic based on the median of the statistical voxel information, whether the voxel depth representing the interval (D) between slices of the MRI sequence exceeds twice the voxel height corresponding to the height (H) and the voxel width corresponding to the width (W) of a single slice of the MRI sequence; If anisotropy exists, proceed to step S1-1-1-3; if anisotropy does not exist, proceed to step S1-1-1-4; Step S1-1-1-3, count the voxel depths of all samples representing the intervals (D) between slices in the MRI sequence as a list, sort the list from small to large and take the mode of the top 10% of the values as the target depth value corresponding to the target voxel to reduce distortion during the interpolation process; for the voxel height corresponding to the height (H) of a single slice of the MRI sequence and the voxel width corresponding to the width (W), take the median of all the samples counted and reorganize them with the target depth value into the target voxel. Among them, the height and width of the target voxel are the median of the voxel width and height of the original image of all samples, and the depth of the target voxel is the mode of the top 10% of the values after counting all the samples; Step S1-1-1-4, count all sample original images to represent the voxel height corresponding to the height (H) of a single slice of the MRI sequence, the voxel width corresponding to the width (W), and the voxel depth representing the interval (D) between slices of the MRI sequence as a list, take the median of each statistical list, and reorganize it into the target voxel. Further, in step S1, when configuring the parameters of the lateral ventricle segmentation classification model, the specific method is as follows: Step S1-2-1, setting a minimum feature map size for a U-Net segmentation module of a lateral ventricle segmentation classification model; Step S1-2-2, calculating the mode of the size of each axis of all images in the fetal brain MRI image data, and recording it as the mode size after reorganization; and then calculating the required number of downsampling times of each axis according to the mode size and the minimum feature map size; Step S1-2-3, determining the input size of the lateral ventricle segmentation classification model according to the number of downsampling times; Step S1-2-4, calculates the configuration of the convolution layer and the maximum pooling layer during the downsampling process according to the number of downsampling times required for each axis, the target voxel, the input size, and the minimum feature map size.
[0013] Furthermore, in step S1-2-4, when calculating the configuration of the convolution layer and the maximum pooling layer, the specific steps are: Step S1-2-4-1, establish a loop with the maximum number of downsampling times, the loop start value is 0, and the end value is the number of downsampling times , the loop index is ; Step S1-2-4-2, calculating the voxel differences between the axes in the voxel, and checking whether there is an axis whose voxel value is twice that of other axes; Step S1-2-4-3, check the difference between the current feature map size and the minimum feature map size, and check whether the feature map size of some axes is less than twice the minimum feature map; Step S1-2-4-4, if there is an axis that meets the voxel requirement, the kernel size of the axis is adjusted to 1 in the convolution layer and the maximum pooling layer; if it does not meet the voxel requirement but meets the feature map requirement, the kernel size of the axis is adjusted to 1 in the maximum pooling layer, and the convolution layer uses the standard convolution layer; if neither the voxel requirement nor the feature map requirement is met, each axis is processed according to the standard convolution layer and pooling layer, that is, the convolution kernel size of the convolution layer is (3,3,3), and the convolution kernel size of the pooling layer is (2,2,2); Step S1-2-4-5, multiply the elements in the convolution kernel of the maximum pooling layer by the elements of the voxels of the i-th layer by index to obtain the voxels of the i+1-th layer, divide the feature map size of the i-th layer by the elements of the convolution kernel of the maximum pooling layer by index to obtain the feature map size of the i+1-th layer; repeat steps S1-2-4-2, S1-2-4-3, and S1-2-4-4 to calculate the configuration of the convolution layer and the maximum pooling layer of the i+1-th layer.
[0014] Furthermore, in step S2, the Resnet classification module adopts a Resnet network, including a convolutional layer, a maximum pooling layer, four Resnet residual blocks, a global average pooling layer and a fully connected layer arranged in sequence.
[0015] A fetal MRI brain tissue segmentation system, comprising: A sample data and label acquisition module is used to acquire fetal brain MRI image data and label data, wherein the label data includes a lateral ventricle segmentation label of each fetal brain MRI image and a classification label of whether there is lateral ventricle dilatation; A lateral ventricle segmentation classification model construction module is used to construct a lateral ventricle segmentation classification model. The lateral ventricle segmentation classification model includes a U-Net segmentation module and a Resnet classification module. The output of the U-Net segmentation module serves as the input of the Resnet classification module. The U-Net segmentation module adopts a U-Net network, including multiple DWMF blocks for downsampling and multiple decoder blocks for upsampling. The DWMF blocks and the decoder blocks are connected by jump link blocks; each DWMF block includes two depth separation convolution blocks and four depth separation channel dilated convolution blocks. The image data is used as the input of the two depth separation convolution blocks, and the output of one depth separation convolution block is respectively input into three depth separation channel dilated convolution blocks. The outputs of the three depth separation channel dilated convolution blocks are used as the input of the last depth separation channel dilated convolution block. The output of the last depth separation channel dilated convolution block is fused with the output of another depth separation convolution block as the output of the DWMF block; The lateral ventricle segmentation classification model training module is used to train the lateral ventricle segmentation classification model constructed by the lateral ventricle segmentation classification model construction module using the sample data and labels obtained by the sample data and label acquisition module to obtain a mature lateral ventricle segmentation classification model; The real-time segmentation and classification module is used to obtain the fetal brain MRI image to be tested in real time and input the lateral ventricle segmentation and classification model, and the lateral ventricle segmentation and classification model outputs the segmentation result and the classification result.
[0016] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0017] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to execute the steps of the above method.
[0018] The beneficial effects of the present invention are as follows: 1. The self-configured fetal MRI brain tissue segmentation and classification method based on deep learning for multi-resolution data proposed in the present invention can quickly segment the brain tissue in fetal MRI images in a short time and determine whether there is a problem of lateral ventricle dilatation. At the same time, it has good robustness for multi-resolution data, reducing a lot of repetitive work for doctors, and effectively solving the problem that the segmentation method based on deep learning cannot be applied to multi-resolution data and the manual measurement of the lateral ventricle width and single measurement result in low measurement efficiency.
[0019] 2. The present invention can automatically complete network configuration after specifying a small number of hyperparameters in the preprocessing stage, greatly shortening the model training and learning cycle, and improving the efficiency of analyzing and judging brain tissue and whether there is lateral ventricle dilatation. After model training, only the patient's brain MRI image needs to be input to automatically perform fetal brain tissue segmentation and diagnose whether there is lateral ventricle dilatation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 It is a schematic diagram of the structure of the U-Net network in the present invention; Figure 3 It is a schematic diagram of the structure of the DWMF block in the present invention; Figure 4 It is a schematic diagram of the structure of the Resnet network in the present invention; Figure 5 is a voxel distribution map of sample data in the present invention; Figure 6 is a schematic diagram of a process for obtaining a target voxel in the present invention; Figure 7 is a schematic diagram of a process for preprocessing target voxels in the present invention; Figure 8 It is a schematic diagram of the process of calculating the input size in the present invention; Fig. 9 It is a schematic diagram of the flow of configuring each layer of the computing network in the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0022] Therefore, based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.
[0023] Example 1 Since fetal MRI brain tissue image data has problems such as multi-resolution, i.e., non-uniform voxel data size, and anisotropy, i.e., large axial differences in voxels, etc., this embodiment takes multi-resolution coronal plane data as an example to provide a fetal MRI brain tissue segmentation method, firstly, statistics are performed on the voxel data to obtain the distribution information of the voxel size; then, the sample data is preprocessed according to the distribution information of the voxel size, unified into a voxel distribution and pixel normalization is performed; then, the network is automatically configured and trained based on the preprocessed data and the pre-set feature map annotations; finally, the trained network is used to process fetal MRI brain tissue images to obtain the segmentation results and classification results of the fetal brain tissue. Figure 1 As shown, the specific steps include: Step S1, obtaining sample data and labels; Obtain fetal brain MRI image data and label data, where the label data includes a lateral ventricle segmentation label for each fetal brain MRI image and a classification label for whether lateral ventricle dilatation exists.
[0024] The fetal brain MRI image data comes from 186 fetal brain coronal MRI images provided by West China Second Hospital / West China Women and Children's Hospital of Sichuan University, including samples of lateral ventricle dilatation and samples of normal lateral ventricle. In addition, each fetal brain MRI image has a lateral ventricle segmentation label and a classification label for whether there is lateral ventricle dilatation. The above labels are also annotated by doctors in the Department of Imaging of West China Second Hospital / West China Women and Children's Hospital of Sichuan University.
[0025] After obtaining the fetal brain MRI image data, the voxel information of each fetal brain MRI image is counted, and the counted voxel information is preprocessed; according to the results of data preprocessing, the parameters of the lateral ventricle segmentation classification model are configured. Specifically: Traverse all sample data, read the voxel information and 3D shape information of the MRI image, and perform statistics. The voxel size distribution of the data set obtained by statistics is as follows: Figure 5 shown.
[0026] After obtaining the voxel information of the sample data, preprocessing is performed to unify it into a voxel distribution and perform pixel normalization. The specific preprocessing method is: Step S1-1-1, determining the target voxel for data preprocessing based on the statistical voxel information. When determining the target voxel, Figure 6 As shown, the specific steps are: Step S1-1-1-1, determining the median of the voxel information of all samples based on the statistical voxel information.
[0027] Step S1-1-1-2, judging whether the data set is anisotropic based on the median of the statistical voxel information, whether the voxel depth representing the interval (D) between slices of the MRI sequence exceeds twice the voxel height corresponding to the height (H) and the voxel width corresponding to the width (W) of a single slice of the MRI sequence; If anisotropy exists, proceed to step S1-1-1-3; if anisotropy does not exist, proceed to step S1-1-1-4; Step S1-1-1-3, count the voxel depths of all samples representing the intervals (D) between slices in the MRI sequence as a list, sort the list from small to large and take the mode of the top 10% of the values as the target depth value corresponding to the target voxel to reduce distortion during the interpolation process; for the voxel height corresponding to the height (H) of a single slice of the MRI sequence and the voxel width corresponding to the width (W), take the median of all the samples counted and reorganize them with the target depth value into the target voxel. Among them, the height and width of the target voxel are the median of the voxel width and height of the original image of all samples, and the depth of the target voxel is the mode of the top 10% of the values after counting all the samples; Step S1-1-1-4, count all sample original images to represent the voxel height corresponding to the height (H) of a single slice of the MRI sequence, the voxel width corresponding to the width (W), and the voxel depth representing the interval (D) between slices of the MRI sequence as a list, take the median of each statistical list, and reorganize it into the target voxel.
[0028] according to Figure 5As shown in the voxel distribution, the median of the voxel in this embodiment is: (0.9375, 0.9375, 4.19998932), the axis indexed by D representing the spacing between slices of the MRI sequence is quite different from the other two axes, and after counting the values of the voxel depth representing the spacing (D) between slices of the MRI sequence in all samples, 3.9999969 is selected as the target value, and the median of the voxel height corresponding to the height (H) of a single slice of the MRI sequence and the voxel width corresponding to the width (W) are reorganized into (0.9375, 0.9375, 3.9999969) as the target voxel.
[0029] Step S1-1-2, preprocessing based on target voxels.
[0030] like Figure 7 As shown, based on the difference between the original voxel information and the target voxel, the new shape of the shape of the fetal brain MRI image after scaling the original voxel to the target voxel is calculated, and the fetal brain MRI image is scaled to the size of the new shape by trilinear interpolation to obtain the target image shape size of the trilinear interpolation; The calculation formula for the shape and size of the target image of trilinear interpolation is:
[0031] Where H, W, and D represent the width, height, and slice spacing of the slice in the MRI sequence, respectively. Represents the height of each voxel unit in the original voxel, reflecting the physical distance of each pixel point in the slice height dimension (H) corresponding to the real world. represents the height of each voxel unit in the target voxel, Represents the width of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice width dimension (W) corresponding to the real world The width per voxel unit in the target voxel, Indicates the depth of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice spacing size (D) corresponding to the real world. The depth per voxel unit in the target voxel.
[0032] In this embodiment, an original image with an original voxel of (1., 1., 4.2000076) and an original shape with a (H, W, D) size of (300, 320, 20) is used for demonstration. After interpolating it to the target voxel using the above calculation method, the new shape size obtained is (320, 341, 21).
[0033] The purpose of the above-mentioned preprocessing of voxels is to establish an automatic configuration scheme for the model, that is, to automatically configure some parameters of the model and shorten the training time of the subsequent model.
[0034] Downsampling is an important step in convolutional neural networks. While maintaining important information, the size of the feature map is gradually reduced, thereby capturing more abstract features at a high level and improving the network's receptive field. For multi-resolution anisotropic MRI datasets, a fixed downsampling process may lose too much information in a certain axis. For fetal MRI brain tissue segmentation and classification tasks, the model uses the improved Unet segmentation network and Resnet network as the backbone, and automatically configures the downsampling parts of the two networks based on the data preprocessing results. When configuring the parameters of the lateral ventricle segmentation and classification model, the specific method is: Step S1-2-1, setting the minimum feature map size for the U-Net segmentation module of the lateral ventricle segmentation classification model.
[0035] Setting the minimum feature map size for the (improved) U-Net network, corresponding to the bottom layer of the U-Net network, will affect the network depth. This feature map size is manually set as a hyperparameter, which mainly depends on the GPU memory used for training, the desired training time, and the desired training effect. Generally speaking, the smaller the minimum feature map size, the more GPU memory is required, the longer the training time, and the better the training effect may be.
[0036] Step S1-2-2, calculate the mode of the size of each axis of all images in the fetal brain MRI image data, and record it as the mode size after reorganization; then calculate the required number of downsampling times for each axis based on the mode size and the minimum feature map size.
[0037] For an input image of size (H, W, D), the number of downsampling times for each axis is calculated as follows: Indicates the minimum feature map size.
[0038]
[0039] In this embodiment, the mode size of the preprocessed data set is (320, 320, 25), and the FeatureMapMinSize of the Unet network is set to (4, 4, 4), and the calculated number of downsampling times for each axis is (6, 6, 2). For the Resnet network, since the minimum feature map size in the standard construction of Resnet is 7, and because the data set in this example is anisotropic, the voxel depth corresponding to the D axis in the image is smaller than the voxel height corresponding to H and the voxel width corresponding to W, the FeatureMapMinSize is set to (7, 7, 3), and the calculated number of downsampling times for each axis of the Resnet network is (5, 5, 3).
[0040] Step S1-2-3, determining the input size of the lateral ventricle segmentation classification model according to the number of downsampling times.
[0041] like Figure 8 As shown, according to the characteristics of downsampling, the input size of the model should satisfy the input size of each axis that can be divided by 2 times the power of the downsampling times of each axis, expressed as:
[0042] The method to calculate the regular input size to meet the above conditions is:
[0043] in, Indicates the number of downsampling times for each axis, Indicates the values corresponding to each axis in the image size.
[0044] In this embodiment, the number of downsampling times for each axis in the game of Unet network is (6, 6, 2), and the corresponding divisibility requirement is (64, 64, 4). The mode size used to calculate the number of downsampling times is (320, 320, 25), and the size that meets the conditions is (320, 320, 28). After calculating the regularization conditions, the consumed video memory capacity is estimated. This method sets the video memory occupied by a single MRI data during the training process to not exceed a certain value, so as to facilitate use on more devices. The calculation method of video memory is completed with the help of a common code library. This method adjusts the input size according to the video memory. When the video memory needs to be greater than the set requirement under the current input size, the ratio of the current size to the mode size is compared, and a value of the divisibility requirement is subtracted from the axis with the largest ratio to form a new input size, and the above work is repeated with the new input size until the requirements are met. In this method, the maximum video memory estimate for a single data set for the improved Unet is 4.5GB, and the maximum video memory estimate for a single data set for Resnet is 1.5GB. The input size of the improved Unet is (256, 256, 24), and the input size of the Resnet network is (224, 224, 24).
[0045] Step S1-2-4, according to the number of downsampling times required for each axis , target voxel , input size , minimum feature map size Compute the configuration of convolutional and max pooling layers during downsampling.
[0046] When calculating the configuration of the convolutional layer and the maximum pooling layer, such as Fig. 9 As shown, the specific steps are: Step S1-2-4-1, with the maximum number of downsampling times Create a loop with a starting value of 0 and an end value of , the loop index is ; Step S1-2-4-2, calculating the voxel differences between the axes in the voxel, and checking whether there is an axis whose voxel value is twice that of other axes; Step S1-2-4-3, check the difference between the current feature map size and the minimum feature map size, and check whether the feature map size of some axes is less than twice the minimum feature map; Step S1-2-4-4, if there is an axis that meets the voxel requirement, the kernel size of the axis is adjusted to 1 in the convolution layer and the maximum pooling layer; if it does not meet the voxel requirement but meets the feature map requirement, the kernel size of the axis is adjusted to 1 in the maximum pooling layer, and the convolution layer uses the standard convolution layer; if neither the voxel requirement nor the feature map requirement is met, each axis is processed according to the standard convolution layer and pooling layer, that is, the convolution kernel size of the convolution layer is (3,3,3), and the convolution kernel size of the pooling layer is (2,2,2); Step S1-2-4-5, multiply the elements in the convolution kernel of the maximum pooling layer by the elements of the voxels of the i-th layer by index to obtain the voxels of the i+1-th layer, divide the feature map size of the i-th layer by the elements of the convolution kernel of the maximum pooling layer by index to obtain the feature map size of the i+1-th layer; repeat steps S1-2-4-2, S1-2-4-3, and S1-2-4-4 to calculate the configuration of the convolution layer and the maximum pooling layer of the i+1-th layer.
[0047] In this embodiment, the voxel of the first cycle is equivalent to the target voxel (0.9375, 0.9375, 3.9999969), the D axis is twice the size of the H axis and the W axis, and the size of this axis in the current feature map is 24, which is larger than the minimum feature map size 4. Therefore, in the first cycle, the convolution kernel size will be set to (3, 3, 1), and the pooling layer is configured with a kernel size of (2, 2, 1) with a step size of (2, 2, 1). Finally, the elements in the downsampled kernel size are combined with the first The elements of the voxels of the layer are multiplied by index to get the The voxels of the first layer The feature map size of the layer is divided by the downsampling kernel size by index, and the The feature map size of the layer is used for The convolutional and pooling layers of the layer network are calculated. In this example, the voxel size of layer 0 is (0.9375, 0.9375, 3.9999969), and the downsampling size is (2, 2, 1). The voxel size of layer 1 is (1.8750, 1.8750, 3.9999969), and the feature map size is (128, 128, 24). Finally, the convolutional layer configuration of the improved Unet network in this example is (3, 3, 1), (3, 3, 1), (3, 3, 3), (3, 3, 3), (3, 3, 3), (3, 3, 3), and the downsampling configuration is (2, 2, 1), (2, 2, 1), (2, 2, 2), (2, 2, 2), (2, 2, 1), (2, 2, 1). Since the convolution kernel downsampling combination of the standard configuration of Resnet is different from that of Unet, the size of the convolution kernel of the first layer is (7,7,7). Therefore, the convolution layer configuration of the Resnet network in this example is (7,7,1), (3,3,1), (3,3,3), (3,3,3), (3,3,3), and the downsampling configuration is (2,2,1), (2,2,1), (2,2,2), (2,2,2), (2,2,2).
[0048] Step S2, constructing a lateral ventricle segmentation classification model; Constructing a lateral ventricle segmentation and classification model, which includes a U-Net segmentation module and a Resnet classification module. The output of the U-Net segmentation module is used as the input of the Resnet classification module. like Figure 2 As shown in the figure, the U-Net segmentation module uses a U-Net network, including multiple DWMF blocks for downsampling and multiple decoder blocks for upsampling. The DWMF blocks and the decoder blocks are connected by skip link blocks. Through the skip link blocks, the feature maps of the same size are spliced, which supplements the spatial detail information required for upsampling and restoring the image, and makes full use of the rich spatial detail information in the encoder and the semantic information in the decoder. Figure 3 As shown in the figure, each DWMF block includes two depth separation convolution blocks and four depth separation channel expansion convolution blocks. The image data is used as the input of the two depth separation convolution blocks, and the output of one depth separation convolution block is input into three depth separation channel expansion convolution blocks respectively. The outputs of these three depth separation channel expansion convolution blocks are used as the input of the last depth separation channel expansion convolution block together. The output of the last depth separation channel expansion convolution block is fused with the output of another depth separation convolution block as the output of the DWMF block.
[0049] like Figure 4As shown in the figure, the Resnet classification module adopts the Resnet network, including a convolutional layer, a maximum pooling layer, four Resnet residual blocks, a global average pooling layer and a fully connected layer. The input layer consists of a 7×7×1 convolutional layer. To ensure the correct structure of the Resnet network, its step size is (2,2,1) according to the downsampling configuration, followed by a 2×2×1 maximum pooling layer with a step size of 2, which is used to perform preliminary feature extraction and downsampling on the input image. Next are 4 stages, each of which consists of multiple Resnet Block residual learning modules. The first layer of each stage is the maximum pooling layer. The convolution kernel sizes of each stage are (3,3,3), (3,3,3), (3,3,3), (3,3,3). The first, second, third and fourth stages contain 3, 4, 6 and 3 residual learning modules respectively. Batch normalization and ReLU activation function are used in each residual learning module to enhance the stability and nonlinear expression ability of the network. Finally, the feature map of the last stage is converted into a fixed-size vector through global average pooling, and mapped to the final number of output categories through a fully connected layer. A Softmax function is usually added before the fully connected layer to convert the output of the network into a probability distribution for image classification. In this case, there are two categories that need to be classified: "lateral ventricle dilatation" and "lateral ventricle dilatation is not present", so the regression module maps the final extracted features to between 0 and 1 to reflect whether the MRI image of the input case has lateral ventricle dilatation.
[0050] Step S3, training a lateral ventricle segmentation classification model; The sample data and labels obtained in step S1 are used to train the lateral ventricle segmentation classification model constructed in step S2 to obtain a mature lateral ventricle segmentation classification model.
[0051] When training the lateral ventricle segmentation classification model, the training method is not the innovation of the present application. Those skilled in the art can use existing training methods, loss functions, etc. for training according to actual conditions without creative work.
[0052] Step S4, real-time segmentation and classification; The MRI image of the fetal brain to be tested is acquired in real time and input into the lateral ventricle segmentation classification model, and the lateral ventricle segmentation classification model outputs the segmentation result and the classification result.
[0053] Example 2 This embodiment provides a fetal MRI brain tissue segmentation system, including: The sample data and label acquisition module is used to obtain fetal brain MRI image data and label data. The label data includes the lateral ventricle segmentation label of each fetal brain MRI image and the classification label of whether there is lateral ventricle dilatation.
[0054] The fetal brain MRI image data comes from 186 fetal brain coronal MRI images provided by West China Second Hospital / West China Women and Children's Hospital of Sichuan University, including samples of lateral ventricle dilatation and samples of normal lateral ventricle. In addition, each fetal brain MRI image has a lateral ventricle segmentation label and a classification label for whether there is lateral ventricle dilatation. The above labels are also annotated by doctors in the Department of Imaging of West China Second Hospital / West China Women and Children's Hospital of Sichuan University.
[0055] After obtaining the fetal brain MRI image data, the voxel information of each fetal brain MRI image is counted, and the counted voxel information is preprocessed; according to the results of data preprocessing, the parameters of the lateral ventricle segmentation classification model are configured. Specifically: Traverse all sample data, read the voxel information and 3D shape information of the MRI image, and perform statistics. The voxel size distribution of the data set obtained by statistics is as follows: Figure 5 shown.
[0056] After obtaining the voxel information of the sample data, preprocessing is performed to unify it into a voxel distribution and perform pixel normalization. The specific preprocessing method is: Step S1-1-1, determining the target voxel for data preprocessing based on the statistical voxel information. When determining the target voxel, Figure 6 As shown, the specific steps are: Step S1-1-1-1, determining the median of the voxel information of all samples based on the statistical voxel information.
[0057] Step S1-1-1-2, judging whether the data set is anisotropic based on the median of the statistical voxel information, whether the voxel depth representing the interval (D) between slices of the MRI sequence exceeds twice the voxel height corresponding to the height (H) and the voxel width corresponding to the width (W) of a single slice of the MRI sequence; If anisotropy exists, proceed to step S1-1-1-3; if anisotropy does not exist, proceed to step S1-1-1-4; Step S1-1-1-3, count the voxel depths of all samples representing the intervals (D) between slices in the MRI sequence as a list, sort the list from small to large and take the mode of the top 10% of the values as the target depth value corresponding to the target voxel to reduce distortion during the interpolation process; for the voxel height corresponding to the height (H) of a single slice of the MRI sequence and the voxel width corresponding to the width (W), take the median of all the samples counted and reorganize them with the target depth value into the target voxel. Among them, the height and width of the target voxel are the median of the voxel width and height of the original image of all samples, and the depth of the target voxel is the mode of the top 10% of the values after counting all the samples; Step S1-1-1-4, count all sample original images to represent the voxel height corresponding to the height (H) of a single slice of the MRI sequence, the voxel width corresponding to the width (W), and the voxel depth representing the interval (D) between slices of the MRI sequence as a list, take the median of each statistical list, and reorganize it into the target voxel.
[0058] according to Figure 5 As shown in the voxel distribution, the median of the voxel in this embodiment is: (0.9375, 0.9375, 4.19998932), the axis indexed by D representing the spacing between slices of the MRI sequence is quite different from the other two axes, and after counting the values of the voxel depth representing the spacing (D) between slices of the MRI sequence in all samples, 3.9999969 is selected as the target value, and the median of the voxel height corresponding to the height (H) of a single slice of the MRI sequence and the voxel width corresponding to the width (W) are reorganized into (0.9375, 0.9375, 3.9999969) as the target voxel.
[0059] Step S1-1-2, preprocessing based on target voxels.
[0060] like Figure 7 As shown, based on the difference between the original voxel information and the target voxel, the new shape of the shape of the fetal brain MRI image after scaling the original voxel to the target voxel is calculated, and the fetal brain MRI image is scaled to the size of the new shape by trilinear interpolation to obtain the target image shape size of the trilinear interpolation; The calculation formula for the shape and size of the target image of trilinear interpolation is:
[0061] Where H, W, and D represent the width, height, and slice spacing of the slice in the MRI sequence, respectively. Represents the height of each voxel unit in the original voxel, reflecting the physical distance of each pixel point in the slice height dimension (H) corresponding to the real world. represents the height of each voxel unit in the target voxel, Represents the width of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice width dimension (W) corresponding to the real world The width per voxel unit in the target voxel, Indicates the depth of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice spacing size (D) corresponding to the real world. The depth per voxel unit in the target voxel.
[0062] In this embodiment, an original image with an original voxel of (1., 1., 4.2000076) and an original shape with a (H, W, D) size of (300, 320, 20) is used for demonstration. After interpolating it to the target voxel using the above calculation method, the new shape size obtained is (320, 341, 21).
[0063] The purpose of the above-mentioned preprocessing of voxels is to establish an automatic configuration scheme for the model, that is, to automatically configure some parameters of the model and shorten the training time of the subsequent model.
[0064] Downsampling is an important step in convolutional neural networks. While maintaining important information, the size of the feature map is gradually reduced, thereby capturing more abstract features at a high level and improving the network's receptive field. For multi-resolution anisotropic MRI datasets, a fixed downsampling process may lose too much information in a certain axis. For fetal MRI brain tissue segmentation and classification tasks, the model uses the improved Unet segmentation network and Resnet network as the backbone, and automatically configures the downsampling parts of the two networks based on the data preprocessing results. When configuring the parameters of the lateral ventricle segmentation and classification model, the specific method is: Step S1-2-1, setting the minimum feature map size for the U-Net segmentation module of the lateral ventricle segmentation classification model.
[0065] Setting the minimum feature map size for the (improved) U-Net network, corresponding to the bottom layer of the U-Net network, will affect the network depth. This feature map size is manually set as a hyperparameter, which mainly depends on the GPU memory used for training, the desired training time, and the desired training effect. Generally speaking, the smaller the minimum feature map size, the more GPU memory is required, the longer the training time, and the better the training effect may be.
[0066] Step S1-2-2, calculate the mode of the size of each axis of all images in the fetal brain MRI image data, and record it as the mode size after reorganization; then calculate the required number of downsampling times for each axis based on the mode size and the minimum feature map size.
[0067] For an input image of size (H, W, D), the number of downsampling times for each axis is calculated as follows: Indicates the minimum feature map size.
[0068]
[0069] In this embodiment, the mode size of the preprocessed data set is (320, 320, 25), and the FeatureMapMinSize of the Unet network is set to (4, 4, 4), and the calculated number of downsampling times for each axis is (6, 6, 2). For the Resnet network, since the minimum feature map size in the standard construction of Resnet is 7, and because the data set in this example is anisotropic, the voxel depth corresponding to the D axis in the image is smaller than the voxel height corresponding to H and the voxel width corresponding to W, the FeatureMapMinSize is set to (7, 7, 3), and the calculated number of downsampling times for each axis of the Resnet network is (5, 5, 3).
[0070] Step S1-2-3, determining the input size of the lateral ventricle segmentation classification model according to the number of downsampling times.
[0071] like Figure 8 As shown, according to the characteristics of downsampling, the input size of the model should satisfy the input size of each axis that can be divided by 2 times the power of the downsampling times of each axis, expressed as:
[0072] The method to calculate the regular input size to meet the above conditions is:
[0073] in, The number of downsampling times for each axis, Indicates the values corresponding to each axis in the image size.
[0074] In this embodiment, for the Unet network, the number of downsampling times of each axis is (6, 6, 2), the corresponding divisibility requirement is (64, 64, 4), the mode size used to calculate the number of downsampling times is (320, 320, 25), and the size that meets the conditions is (320, 320, 28). After calculating the regularization conditions, the consumed video memory capacity is estimated. This method sets the video memory occupied by a single MRI data during the training process to not exceed a certain value, so as to facilitate use on more devices. The calculation method of the video memory is completed with the help of a common code library. This method adjusts the input size according to the video memory. When the video memory needs to be greater than the set requirement under the current input size, the ratio of the current size to the mode size is compared, and a value of the divisibility requirement is subtracted from the axis with the largest ratio to form a new input size, and the above work is repeated with the new input size until the requirements are met. In this method, the maximum video memory estimate for a single data set for the improved Unet is 4.5GB, and the maximum video memory estimate for a single data set for Resnet is 1.5GB. The input size of the improved Unet is (256, 256, 24), and the input size of the Resnet network is (224, 224, 24).
[0075] Step S1-2-4, according to the number of downsampling times required for each axis , target voxel , input size , minimum feature map size Compute the configuration of convolutional and max pooling layers during downsampling.
[0076] When calculating the configuration of the convolutional layer and the maximum pooling layer, such as Fig. 9 As shown, the specific steps are: Step S1-2-4-1, with the maximum number of downsampling times Create a loop with a starting value of 0 and an end value of , the loop index is ; Step S1-2-4-2, calculating the voxel differences between the axes in the voxel, and checking whether there is an axis whose voxel value is twice that of other axes; Step S1-2-4-3, check the difference between the current feature map size and the minimum feature map size, and check whether the feature map size of some axes is less than twice the minimum feature map; Step S1-2-4-4, if there is an axis that meets the voxel requirement, the kernel size of the axis is adjusted to 1 in the convolution layer and the maximum pooling layer; if it does not meet the voxel requirement but meets the feature map requirement, the kernel size of the axis is adjusted to 1 in the maximum pooling layer, and the convolution layer uses the standard convolution layer; if neither the voxel requirement nor the feature map requirement is met, each axis is processed according to the standard convolution layer and pooling layer, that is, the convolution kernel size of the convolution layer is (3,3,3), and the convolution kernel size of the pooling layer is (2,2,2); Step S1-2-4-5, multiply the elements in the convolution kernel of the maximum pooling layer by the elements of the voxels of the i-th layer by index to obtain the voxels of the i+1-th layer, divide the feature map size of the i-th layer by the elements of the convolution kernel of the maximum pooling layer by index to obtain the feature map size of the i+1-th layer; repeat steps S1-2-4-2, S1-2-4-3, and S1-2-4-4 to calculate the configuration of the convolution layer and the maximum pooling layer of the i+1-th layer.
[0077] In this embodiment, the voxel of the first cycle is equivalent to the target voxel (0.9375, 0.9375, 3.9999969), the D axis is twice the size of the H axis and the W axis, and the size of this axis in the current feature map is 24, which is larger than the minimum feature map size 4. Therefore, in the first cycle, the convolution kernel size will be set to (3, 3, 1), and the pooling layer is configured with a kernel size of (2, 2, 1) with a step size of (2, 2, 1). Finally, the elements in the downsampled kernel size are combined with the first The elements of the voxels of the layer are multiplied by index to get the The voxels of the first layer The feature map size of the layer is divided by the downsampling kernel size by index, and the The feature map size of the layer is used for The convolutional and pooling layers of the layer network are calculated. In this example, the voxel size of layer 0 is (0.9375, 0.9375, 3.9999969), and the downsampling size is (2, 2, 1). The voxel size of layer 1 is (1.8750, 1.8750, 3.9999969), and the feature map size is (128, 128, 24). Finally, the convolutional layer configuration of the improved Unet network in this example is (3, 3, 1), (3, 3, 1), (3, 3, 3), (3, 3, 3), (3, 3, 3), (3, 3, 3), and the downsampling configuration is (2, 2, 1), (2, 2, 1), (2, 2, 2), (2, 2, 2), (2, 2, 1), (2, 2, 1). Since the convolution kernel downsampling combination of the standard configuration of Resnet is different from that of Unet, the size of the convolution kernel of the first layer is (7,7,7). Therefore, the convolution layer configuration of the Resnet network in this example is (7,7,1), (3,3,1), (3,3,3), (3,3,3), (3,3,3), and the downsampling configuration is (2,2,1), (2,2,1), (2,2,2), (2,2,2), (2,2,2).
[0078] The lateral ventricle segmentation classification model construction module is used to construct the lateral ventricle segmentation classification model. The lateral ventricle segmentation classification model includes a U-Net segmentation module and a Resnet classification module. The output of the U-Net segmentation module is used as the input of the Resnet classification module.
[0079] like Figure 2 As shown in the figure, the U-Net segmentation module uses a U-Net network, including multiple DWMF blocks for downsampling and multiple decoder blocks for upsampling. The DWMF blocks and the decoder blocks are connected by skip link blocks. Through the skip link blocks, the feature maps of the same size are spliced, which supplements the spatial detail information required for upsampling and restoring the image, and makes full use of the rich spatial detail information in the encoder and the semantic information in the decoder. Figure 3 As shown in the figure, each DWMF block includes two depth separation convolution blocks and four depth separation channel expansion convolution blocks. The image data is used as the input of the two depth separation convolution blocks, and the output of one depth separation convolution block is input into three depth separation channel expansion convolution blocks respectively. The outputs of these three depth separation channel expansion convolution blocks are used as the input of the last depth separation channel expansion convolution block together. The output of the last depth separation channel expansion convolution block is fused with the output of another depth separation convolution block as the output of the DWMF block.
[0080] like Figure 4As shown in the figure, the Resnet classification module adopts the Resnet network, including a convolutional layer, a maximum pooling layer, four Resnet residual blocks, a global average pooling layer and a fully connected layer. The input layer consists of a 7×7×1 convolutional layer. To ensure the correct structure of the Resnet network, its step size is (2,2,1) according to the downsampling configuration, followed by a 2×2×1 maximum pooling layer with a step size of 2, which is used to perform preliminary feature extraction and downsampling on the input image. Next are 4 stages, each of which consists of multiple Resnet Block residual learning modules. The first layer of each stage is the maximum pooling layer. The convolution kernel sizes of each stage are (3,3,3), (3,3,3), (3,3,3), (3,3,3). The first, second, third and fourth stages contain 3, 4, 6 and 3 residual learning modules respectively. Batch normalization and ReLU activation function are used in each residual learning module to enhance the stability and nonlinear expression ability of the network. Finally, the feature map of the last stage is converted into a fixed-size vector through global average pooling, and mapped to the final number of output categories through a fully connected layer. A Softmax function is usually added before the fully connected layer to convert the output of the network into a probability distribution for image classification. In this case, there are two categories that need to be classified: "lateral ventricle dilatation" and "lateral ventricle dilatation is not present", so the regression module maps the final extracted features to between 0 and 1 to reflect whether the MRI image of the input case has lateral ventricle dilatation.
[0081] The lateral ventricle segmentation classification model training module is used to train the lateral ventricle segmentation classification model constructed by the lateral ventricle segmentation classification model construction module using the sample data and labels obtained by the sample data and label acquisition module to obtain a mature lateral ventricle segmentation classification model.
[0082] When training the lateral ventricle segmentation classification model, the training method is not the innovation of the present application. Those skilled in the art can use existing training methods, loss functions, etc. for training according to actual conditions without creative work.
[0083] The real-time segmentation and classification module is used to obtain the fetal brain MRI image to be tested in real time and input the lateral ventricle segmentation and classification model, and the lateral ventricle segmentation and classification model outputs the segmentation result and the classification result.
[0084] Example 3 A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a fetal MRI brain tissue segmentation method.
[0085] The computer device may be a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with the user through a keyboard, a mouse, a remote control, a touch pad, or a voice control device.
[0086] The memory includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory can be an internal storage unit of the computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory can also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. Of course, the memory can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is often used to store the operating system and various application software installed on the computer device, such as the program code of the fetal MRI brain tissue segmentation method, etc. In addition, the memory can also be used to temporarily store various types of data that have been output or are to be output.
[0087] The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data, such as running the program code of the fetal MRI brain tissue segmentation method.
[0088] Example 4 A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the steps of a fetal MRI brain tissue segmentation method.
[0089] The computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor to enable the at least one processor to perform the steps of the fetal MRI brain tissue segmentation method as described above.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server or network device, etc.) to execute the fetal MRI brain tissue segmentation method described in the embodiment of the present application.
Claims
1. A fetal MRI brain tissue segmentation method, characterized in that: The following steps are involved: Step S1, obtaining sample data and labels; Obtaining fetal brain MRI image data and label data, the label data including a lateral ventricle segmentation label of each fetal brain MRI image and a classification label of whether lateral ventricle dilatation exists; Step S2, constructing a lateral ventricle segmentation classification model; Constructing a lateral ventricle segmentation and classification model, which includes a U-Net segmentation module and a Resnet classification module. The output of the U-Net segmentation module is used as the input of the Resnet classification module. The U-Net segmentation module adopts a U-Net network, including multiple DWMF blocks for downsampling and multiple decoder blocks for upsampling. The DWMF blocks and the decoder blocks are connected by jump link blocks; each DWMF block includes two depth separation convolution blocks and four depth separation channel dilated convolution blocks. The image data is used as the input of the two depth separation convolution blocks, and the output of one depth separation convolution block is respectively input into three depth separation channel dilated convolution blocks. The outputs of the three depth separation channel dilated convolution blocks are used as the input of the last depth separation channel dilated convolution block. The output of the last depth separation channel dilated convolution block is fused with the output of another depth separation convolution block as the output of the DWMF block; Step S3, training a lateral ventricle segmentation classification model; The sample data and labels obtained in step S1 are used to train the lateral ventricle segmentation classification model constructed in step S2 to obtain a mature lateral ventricle segmentation classification model; Step S4, real-time segmentation and classification; The MRI image of the fetal brain to be tested is acquired in real time and input into the lateral ventricle segmentation classification model, and the lateral ventricle segmentation classification model outputs the segmentation result and the classification result.
2. The fetal MRI brain tissue segmentation method according to claim 1, characterized in that: In step S1, after obtaining the fetal brain MRI image data, the voxel information of each fetal brain MRI image is counted, and the counted voxel information is preprocessed; according to the result of the data preprocessing, the parameters of the lateral ventricle segmentation classification model are configured.
3. The fetal MRI brain tissue segmentation method according to claim 2, characterized in that: When preprocessing the statistical voxel information, the specific preprocessing method is: Step S1-1-1, determining the target voxel for data preprocessing based on the statistical voxel information; Step S1-1-2, preprocessing based on the target voxel; Based on the difference between the original voxel information and the target voxel, the new shape of the fetal brain MRI image is calculated after the original voxel is scaled to the target voxel, and the fetal brain MRI image is scaled to the size of the new shape by trilinear interpolation to obtain the target image shape size of trilinear interpolation; The calculation formula for the shape and size of the target image of trilinear interpolation is: Where H, W, and D represent the width, height, and slice spacing of the slice in the MRI sequence, respectively. Represents the height of each voxel unit in the original voxel, reflecting the physical distance of each pixel point in the slice height dimension (H) corresponding to the real world. represents the height of each voxel unit in the target voxel, Represents the width of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice width dimension (W) corresponding to the real world The width per voxel unit in the target voxel, Indicates the depth of each voxel unit in the original voxel, reflecting the physical distance of each pixel in the slice spacing size (D) corresponding to the real world. The depth per voxel unit in the target voxel.
4. The fetal MRI brain tissue segmentation method according to claim 3, characterized in that: In step S1-1-1, the method for determining the target voxel is: Step S1-1-1-1, determining the median of the voxel information of all samples according to the statistical voxel information; Step S1-1-1-2, judging whether the data set is anisotropic based on the median of the statistical voxel information, whether the voxel depth representing the interval (D) between slices of the MRI sequence exceeds twice the voxel height corresponding to the height (H) and the voxel width corresponding to the width (W) of a single slice of the MRI sequence; If anisotropy exists, proceed to step S1-1-1-3; if anisotropy does not exist, proceed to step S1-1-1-4; Step S1-1-1-3, count the voxel depths of all samples representing the intervals (D) between slices in the MRI sequence as a list, sort the list from small to large and take the mode of the top 10% of the values as the target depth value corresponding to the target voxel to reduce distortion during the interpolation process; for the voxel height corresponding to the height (H) of a single slice of the MRI sequence and the voxel width corresponding to the width (W), take the median of all the samples counted and reorganize them with the target depth value into the target voxel. Among them, the height and width of the target voxel are the median of the voxel width and height of the original image of all samples, and the depth of the target voxel is the mode of the top 10% of the values after counting all the samples; Step S1-1-1-4, count all sample original images to represent the voxel height corresponding to the height (H) of a single slice of the MRI sequence, the voxel width corresponding to the width (W), and the voxel depth representing the interval (D) between slices of the MRI sequence as a list, take the median of each statistical list, and reorganize it into the target voxel.
5. The fetal MRI brain tissue segmentation method according to claim 2, characterized in that: In step S1, when configuring the parameters of the lateral ventricle segmentation classification model, the specific method is as follows: Step S1-2-1, setting a minimum feature map size for a U-Net segmentation module of a lateral ventricle segmentation classification model; Step S1-2-2, calculating the mode of the size of each axis of all images in the fetal brain MRI image data, and recording it as the mode size after reorganization; and then calculating the required number of downsampling times of each axis according to the mode size and the minimum feature map size; Step S1-2-3, determining the input size of the lateral ventricle segmentation classification model according to the number of downsampling times; Step S1-2-4, calculates the configuration of the convolution layer and the maximum pooling layer during the downsampling process according to the number of downsampling times required for each axis, the target voxel, the input size, and the minimum feature map size.
6. The fetal MRI brain tissue segmentation method according to claim 5, characterized in that: In step S1-2-4, when calculating the configuration of the convolution layer and the maximum pooling layer, the specific steps are: Step S1-2-4-1, establish a loop with the maximum number of downsampling times, the loop start value is 0, and the end value is the number of downsampling times , the loop index is ; Step S1-2-4-2, calculating the voxel differences between the axes in the voxel, and checking whether there is an axis whose voxel value is twice that of other axes; Step S1-2-4-3, check the difference between the current feature map size and the minimum feature map size, and check whether the feature map size of some axes is less than twice the minimum feature map; Step S1-2-4-4, if there is an axis that meets the voxel requirement, the kernel size of the axis is adjusted to 1 in the convolution layer and the maximum pooling layer; if it does not meet the voxel requirement but meets the feature map requirement, the kernel size of the axis is adjusted to 1 in the maximum pooling layer, and the convolution layer uses the standard convolution layer; if neither the voxel requirement nor the feature map requirement is met, each axis is processed according to the standard convolution layer and pooling layer, that is, the convolution kernel size of the convolution layer is (3,3,3), and the convolution kernel size of the pooling layer is (2,2,2); Step S1-2-4-5, multiply the elements in the convolution kernel of the maximum pooling layer by the elements of the voxels of the i-th layer by index to obtain the voxels of the i+1-th layer, divide the feature map size of the i-th layer by the elements of the convolution kernel of the maximum pooling layer by index to obtain the feature map size of the i+1-th layer; repeat steps S1-2-4-2, S1-2-4-3, and S1-2-4-4 to calculate the configuration of the convolution layer and the maximum pooling layer of the i+1-th layer.
7. The fetal MRI brain tissue segmentation method according to claim 1, characterized in that: In step S2, the Resnet classification module adopts a Resnet network, including a convolutional layer, a maximum pooling layer, four Resnet residual blocks, a global average pooling layer and a fully connected layer arranged in sequence.
8. A fetal MRI brain tissue segmentation system, characterized in that: include: A sample data and label acquisition module is used to acquire fetal brain MRI image data and label data, wherein the label data includes a lateral ventricle segmentation label of each fetal brain MRI image and a classification label of whether there is lateral ventricle dilatation; A lateral ventricle segmentation classification model construction module is used to construct a lateral ventricle segmentation classification model. The lateral ventricle segmentation classification model includes a U-Net segmentation module and a Resnet classification module. The output of the U-Net segmentation module serves as the input of the Resnet classification module. The U-Net segmentation module adopts a U-Net network, including multiple DWMF blocks for downsampling and multiple decoder blocks for upsampling. The DWMF blocks and the decoder blocks are connected by jump link blocks; each DWMF block includes two depth separation convolution blocks and four depth separation channel dilated convolution blocks. The image data is used as the input of the two depth separation convolution blocks, and the output of one depth separation convolution block is respectively input into three depth separation channel dilated convolution blocks. The outputs of the three depth separation channel dilated convolution blocks are used as the input of the last depth separation channel dilated convolution block. The output of the last depth separation channel dilated convolution block is fused with the output of another depth separation convolution block as the output of the DWMF block; The lateral ventricle segmentation classification model training module is used to train the lateral ventricle segmentation classification model constructed by the lateral ventricle segmentation classification model construction module using the sample data and labels obtained by the sample data and label acquisition module to obtain a mature lateral ventricle segmentation classification model; The real-time segmentation and classification module is used to obtain the fetal brain MRI image to be tested in real time and input the lateral ventricle segmentation and classification model, and the lateral ventricle segmentation and classification model outputs the segmentation result and the classification result.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
A Deep Learning-Based MRI Whole Brain Tissue Segmentation Method and System
CN111563903B
Infant brain tissue segmentation method based on U-net and attention mechanism
CN113516671A
MRI multi-modal image segmentation method and system based on ACU-Net
CN112215844A
Automatic cerebral artery sketching method based on deep neural network
CN113744272A
Image segmentation method and device, electronic equipment and storage medium
CN117830629A