Convolutional neural network training method and lesion segmentation method

By training the convolutional neural network with the Dice-CE loss function that combines the cross-entropy function and the Dice function, the problem of low accuracy of lesion segmentation in medical images is solved, and high-precision and fast lesion segmentation is achieved, which is suitable for insufficient data such as brain images. scene.

CN112561918BActive Publication Date: 2024-09-06CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011634830.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2024-09-06
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

In medical image segmentation, existing technology is difficult to achieve high-precision lesion segmentation in the absence of labels and data. In particular, brain images have low segmentation accuracy due to many artifacts and few data samples.

Method used

The Dice-CE loss function that combines the cross-entropy function and the Dice function is used to train the convolutional neural network to reduce the multiple detection rate and missed detection rate, thereby achieving high-precision lesion segmentation.

Benefits of technology

It achieves fast and fully automatic lesion segmentation with low manual intervention, improves segmentation accuracy, and is suitable for medical image processing environments with small sample data and imbalance between classes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112561918B
    Figure CN112561918B
Patent Text Reader

Abstract

The present invention provides a training method for a convolutional neural network, which includes an input layer, an intermediate layer and an output layer; the network training method includes: initializing the network parameters of the intermediate layer; forward propagating and calculating the expected output of the convolutional neural network based on the training sample image received by the input layer; calculating the error between the expected output and the label corresponding to the training sample image received by the output layer; back propagating the error and updating the network parameters of the intermediate layer; using the Dice-CE function formed by combining the cross entropy function and the Dice function to evaluate the error loss; when the error is evaluated as having the minimum loss, the corresponding network parameters of the intermediate layer are used as the final parameters of the convolutional neural network. By combining the cross entropy loss function and the Dice function to calculate the loss function, the multiple detection rate and the missed detection rate can be reduced, and the effect of accurate segmentation can be finally achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image processing, and in particular to a convolutional neural network training method and a convolutional neural network-based lesion segmentation method. Background Art

[0002] Accurate segmentation of lesions is crucial for disease diagnosis, treatment plan improvement, surgical planning, and postoperative evaluation. In the field of medical image segmentation, lesion segmentation methods based on deep learning have received widespread attention. Currently, among most image segmentation methods, convolutional neural networks are widely used because of their advantages in extracting image features.

[0003] Training based on convolutional neural networks is an important step in image segmentation. According to the degree of annotation of the data set, medical image segmentation can use three different learning methods, namely unsupervised, fully supervised, semi-supervised and weakly supervised. Unsupervised learning refers to the process of training an intelligent algorithm to map all data to multiple different labels according to certain preferences when the known data has no labels. Fully supervised learning refers to the process of training an intelligent algorithm to map the input data to labels when the known data and its one-to-one corresponding labels are known. Weakly supervised and semi-supervised learning are a learning method between the two. Although unsupervised learning does not require labels, it can only access low-level underlying information during network training, and it is difficult to achieve accuracy. The advantage of the fully supervised learning method is that the segmentation accuracy is high, but it is too dependent on labels. The acquisition of labels has become an obstacle to fully supervised learning for many tasks.

[0004] In addition, for cases where there are few image data samples, such as medical images of the brain, it is difficult to support deep learning due to the lack of sufficient data. In addition, there are many artifacts in the brain, so the relevant technology does not obtain enough contextual semantic information and spatial information, resulting in low segmentation accuracy. Summary of the invention

[0005] The embodiment of the present invention provides a convolutional neural network training method and a lesion segmentation method, so that the degree of human intervention in the training process of the convolutional neural network is low. The trained convolutional neural network can realize fully automatic and fast segmentation when performing lesion segmentation, and achieve high segmentation accuracy.

[0006] An embodiment of the present invention provides a training method for a convolutional neural network, which includes an input layer, an intermediate layer and an output layer; the training method includes: initializing network parameters of the intermediate layer; forward propagating and calculating the expected output of the convolutional neural network based on a training sample image received by the input layer; calculating the error between the expected output and the label corresponding to the training sample image received by the output layer; back-propagating the error and updating the network parameters of the intermediate layer; using the Dice-CE function formed by combining a cross entropy function and a Dice function to perform loss evaluation on the error; when the error is evaluated to have the minimum loss, the corresponding network parameters of the intermediate layer are used as the final parameters of the convolutional neural network.

[0007] An embodiment of the present invention also provides a lesion segmentation method based on a convolutional neural network, comprising: inputting a sample to be segmented into a convolutional neural network to obtain a lesion segmentation result; wherein the convolutional neural network is trained using the convolutional neural network training method mentioned above.

[0008] In the embodiment of the present invention, the cross entropy loss function and the Dice function are combined to calculate the loss function, which can reduce the multiple detection rate and the missed detection rate, and ultimately achieve the effect of accurate segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 is the network structure of the convolutional neural network in the first embodiment of the present invention;

[0010] Figure 2 is the network structure of the convolutional neural network in the third embodiment of the present invention;

[0011] Figure 3 is the network structure of the convolutional neural network in the fourth embodiment of the present invention;

[0012] Figure 4 The structure of the convolution block Conv-block in the convolutional neural network in the fourth embodiment of the present invention;

[0013] Figure 5 The structure of the identification block Identify-block in the convolutional neural network in the fourth embodiment of the present invention;

[0014] Figure 6 The hollow convolution structure of the convolution block Conv-block in the convolutional neural network in the fourth embodiment of the present invention;

[0015] Figure 7 A stacked autoencoder pre-training network in a convolutional neural network in the fifth embodiment of the present invention;

[0016] Figure 8This is a flow chart of the lesion segmentation method based on convolutional neural network in the seventh embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical scheme and advantages of the present invention clearer, the following will be described in detail with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the various embodiments of the present invention, many technical details are provided in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.

[0018] The first embodiment of the present invention provides a convolutional neural network training method. Figure 1 As shown, the convolutional neural network model includes an input layer, an intermediate layer and an output layer. The intermediate layer includes one or more layers of structure, such as a convolutional layer, a pooling layer, and a deconvolutional layer. The training method of the convolutional neural network includes the following steps:

[0019] The input layer receives input sample data;

[0020] Initialize the network parameters of the intermediate layer, such as the weights and biases of the intermediate layer;

[0021] Based on the sample data received by the input layer, the forward propagation calculates the expected output of the convolutional neural network;

[0022] Calculate the loss function between the above expected output and the label corresponding to the original sample data;

[0023] Back propagate the loss function value and update the network parameters of the intermediate layer.

[0024] The loss function used in the training method of this convolutional neural network is the Dice-CE function which is a combination of the cross entropy function and the Dice function.

[0025] The training method of the convolutional neural network of the embodiment of the present invention is applicable to the field of medical image processing, so the input sample data is the training sample image, such as MRI (nuclear magnetic resonance imaging) medical image. Brain MRI is a commonly used imaging examination method in medicine, and has a good examination effect for diseases such as ischemic stroke, brain tumors, encephalitis, and congenital brain abnormalities. Compared with normal brain tissue, the lesions of the above brain diseases are very small, which will cause class imbalance of the data.

[0026] In image segmentation, the cross entropy loss function is the most common loss function. This function represents the distance between the true sample label and the expected output. The smaller the value of the cross entropy loss function, the closer the true sample label is to the expected output. The classic cross entropy loss function is expressed as:

[0027]

[0028] Where N is the total number of sample data, ln represents the natural logarithm; y true is the true sample label, y pred is the expected output.

[0029] From formula (1), we can see that the first term y in the cross entropy loss function is true ·lny pred , when y true When y is 1, pred The closer to the true sample label 1, the smaller the missed detection rate and the smaller the loss function; the second term of the cross entropy loss function (1- true )·(1-lny pred ), when y true When y is 0, pred The closer it is to the true sample label 0, the smaller the multiple detection rate and the smaller the loss function.

[0030] The cross entropy loss function treats each pixel in the image data equally and does not consider the imbalance between classes. Therefore, using only the cross entropy loss function as the loss function for network training is prone to ignoring minority classes.

[0031] The essence of the Dice loss function is to measure the overlap of two samples. The expression of the Dice loss function is:

[0032]

[0033] Where X and Y are two sample sets, |X| and |Y| are the number of elements in each set, and |X∩Y| is the common element in the two sample sets. Its value range is 0 to 1, where 1 indicates complete overlap of the two samples.

[0034] The Dice loss function does not consider the true negative voxels and is not affected by the class balance problem. Therefore, the Dice loss function is more suitable for situations where the samples are extremely uneven. However, in general, the application of the Dice loss function will have an adverse effect on back propagation and easily make network training unstable. Moreover, the Dice loss function does not classify and predict each pixel like the cross entropy function, so its accuracy is not high enough and it is easy to produce multiple lesions.

[0035] The loss function used in this embodiment is the Dice-CE function, which is a combination of the cross entropy function and the Dice function. The Dice loss function is used to comprehensively measure the entire prediction probability map, rather than the simple average value of all voxels. In addition, the cross entropy function is used to accurately predict and classify each pixel point, ultimately achieving the effect of accurate segmentation. Therefore, the Dice-CE function is applicable to semantic segmentation environments with little sample data, extremely unbalanced sample classes, and high segmentation accuracy requirements.

[0036] The second embodiment of the present invention provides a convolutional neural network training method, which is an improvement on the first embodiment of the present invention. The expression of the Dice-CE function used in the second embodiment of the present invention is defined as

[0037] L Dice-E =-(αL CE +(1-α)·L Dice ) (3)

[0038] Among them, 0<α<1. The value of α can be obtained by searching the network method. The Dice-CE loss function in formula (3) combines the characteristics of the cross entropy function and the Dice loss function, that is, the missed detection rate can be greatly reduced on the basis of comprehensively measuring the entire prediction probability map using the Dice function, and each pixel can be accurately predicted and classified according to the cross entropy function, which can also reduce the multiple detection rate, and finally achieve the effect of accurate segmentation.

[0039] In one embodiment, the cross entropy loss function may also be in the form shown in formula (4):

[0040]

[0041] Among them, 0<β<1.

[0042] Compared with formula (1), formula (4) adjusts the loss function by adding different weights to different categories. If you want a small missed detection rate, you can set a larger value for β. If you want a small over-detection rate, you can set a larger value for (1-β), that is, set a smaller value for β. Therefore, formula (4) can reduce the impact of inter-class imbalance to a certain extent.

[0043] In one embodiment, the Dice loss function may also be in the form shown in formula (5):

[0044]

[0045] As can be seen from formula (5), the Dice loss function is used to compare the correlation between the expected output and the true sample label. If the function value is closer to 1, the effect is better. The numerator in formula (5) focuses on the common activation value between the expected output and the true sample label, while the denominator in formula (5) is related to the activation amount of both. Formula (5) produces a normalized effect based on the target label, making it easier to learn from a small number of classes.

[0046] The third embodiment of the present invention provides a training method for a convolutional neural network, and provides a specific structure of an intermediate layer and a specific method for forward propagation calculation.

[0047] The middle layer of the convolutional neural network can be divided into four parts: the first block A0, the second block A1, the third block A2 and the fourth block A3, see Figure 2 . The training sample image received by the input layer (hereinafter referred to as "input sample data") first passes through the first block A0 for the first feature extraction, and the output data of the first block A0 is the first feature image (hereinafter referred to as "first data"). The first data is input into the second block A1 for the second feature extraction to obtain the second feature image (hereinafter referred to as "second data"). Similarly, the second data is input into the third block A2 for the third feature extraction to obtain the third feature image (hereinafter referred to as "third data"). The third data is input into the fourth block A3 for the third feature extraction to obtain the fourth feature image (hereinafter referred to as "fourth data").

[0048] In one embodiment, if Figure 2 As shown, the input sample data size is 64×64×64, and the feature number is 3, that is, the input sample data is 64×64×64×3. After being processed by the first block A0, the first data is 32×32×32×16; after being processed by the second block A1, the second data is 32×32×32×32; after being processed by the third block A2, the third data is 16×16×16×64; after being processed by the fourth block A3, the fourth data is 8×8×8×128. For multimodal MRI images, the information is very complex. This embodiment uses a deep convolutional neural network structure for network training at a reasonable scale, which can be more expressive than a shallower corresponding network, can capture sufficient high-level features, and improve the training data capability of the convolutional neural network structure.

[0049] In one embodiment, the method of forward propagation of the convolutional neural network to calculate the expected output is as follows Figure 2As shown. A first prediction value is calculated based on the second data, and then a first loss function Loss1 between the first prediction value and the true label of the input sample data is calculated. A second prediction value is calculated based on the third data, and then a second loss function Loss2 between the second prediction value and the true label of the input sample data is calculated. A third prediction value is calculated based on the fourth data, and then a third loss function Loss3 between the third prediction value and the true label of the input sample data is calculated. The first loss function Loss1, the second loss function Loss2, and the third loss function Loss3 are multiplied to obtain a final loss function Loss0.

[0050] The first loss function Loss1, the second loss function Loss2 and the third loss function Loss3 in this embodiment can adopt the algorithm of the loss function in any embodiment of the present invention.

[0051] The above division of the middle layer is only made for the convenience of description, and does not limit the specific structure of the middle layer. Those skilled in the art can construct a specific structure of the middle layer according to actual needs.

[0052] The fourth embodiment of the present invention provides a convolutional neural network training method, which improves the structure of the intermediate layer based on the third embodiment.

[0053] Figure 3 The network structure used in the training method of the convolutional neural network in this embodiment is shown. For the convenience of description, the network structure can be named 3D-ResDeConvNet (Residual Depth Convolutional Network). As can be seen from the figure, 3D-ResDeConvNet consists of a convolutional layer, a pooling layer, a deconvolution layer, a loss function, and other parts.

[0054] like Figure 3 As shown in the figure, the first block A0 includes a padding layer (zero padding), a convolution layer and a pooling layer. The second block A1 includes a convolution block (Conv-block) and two identification blocks (Identify-block). The third block A2 includes a convolution block (Conv-block) and three identification blocks (Identify-block). The fourth block A3 includes a convolution block (Conv-block) and five identification blocks (Identify-block). For each block in the middle layer, each convolution block (Conv-block) and identification block (Identify-block) adopts a feature fusion structure cascaded with the same resolution to ensure the integrity of the information. Figure 2It can be seen that the input sample data is 64×64×64×3. After being processed by the first block A0, the first data is 32×32×32×16; after being processed by the second block A1, the second data is 32×32×32×32; after being processed by the third block A2, the third data is 16×16×16×64; after being processed by the fourth block A3, the fourth data is 8×8×8×128. Based on the second data, a first prediction value of 64×64×64×2 is obtained through a combination of a convolutional layer (Conv 1,32,BN,ReLU), a deconvolutional layer (DeConv 32,x2) and a convolutional layer (Conv 1,2,BN,ReLU), and then the first loss function Loss1 between the first prediction value and the true label of the input sample data is calculated; based on the third data, a second prediction value of 64×64×64×2 is obtained through a combination of a convolutional layer (Conv 1,64,BN,ReLU), a deconvolutional layer (DeConv 64,x2), a deconvolutional layer (DeConv 32,x2) and a convolutional layer (Conv 1,2,BN,ReLU), and then the second loss function Loss2 between the second prediction value and the true label of the input sample data is calculated; based on the fourth data, a convolutional layer (Conv 1,64,BN,ReLU), a deconvolutional layer (DeConv 64,x2), two deconvolution layers (DeConv 64,x2).(DeConv 32,x2) and a convolution layer (Conv1,2,BN,ReLU) are combined to obtain the third prediction value 64×64×64×2, and then the third loss function Loss3 between the third prediction value and the true label of the input sample data is calculated; the first loss function Loss1, the second loss function Loss2 and the third loss function Loss3 are multiplied to obtain the final loss function Loss0.

[0055] The specific structure of each of the above blocks can be specifically designed according to the size of the input sample data. This is only an example and does not limit the specific structure of each block.

[0056] Although the deep convolutional neural network structure has a strong function fitting ability, the parameters between each layer need to be multiplied during the network transmission process, especially the derivative of the activation function is between 0 and 1. The deeper the network, the smaller the value after multiplication, and even the value after multiplication may be 0, that is, the gradient disappears. The embodiment of the present invention adopts a residual structure to satisfy the requirement of deepening the number of network layers without causing the gradient to disappear. The purpose of the residual structure is to add the input x of the residual block and the output f(x) of the module pixel by pixel as the final output of the module. The formula is y=x+f(x), and the derivative is taken to obtain the derivative function of 1+f′(x). Therefore, the minimum gradient value is 1 instead of 0, which can completely eliminate the problem of gradient disappearance and effectively suppress the problem of gradient explosion. The residual structure not only greatly reduces the amount of calculation, but also retains rich high-dimensional feature information.

[0057] The convolution block (Conv-block) and identification block (Identify-block) in this embodiment use different residual structures. Figure 4 The structure of the convolution block (Conv-block) is shown. The function of the convolution block (Conv-block) is to perform downsampling. In addition, the downsampling operation is set inside the convolution block (Conv-block) rather than between different convolution blocks (Conv-block), which can ensure the integrity of the information. In the convolution block (Conv-block) k, the strict parameter of the first convolution layer is set to 2, which reduces the data scale by 2 times. The convolution layer is used instead of the pooling layer in the convolution block (Conv-block) for downsampling operations, which can minimize the damage of losing useful information.

[0058] Figure 5 The structure of the Identify-block is shown. The Identify-block is mainly used to extract features. By directly transferring the input information to the output, the integrity of the information is protected, and the problem of gradient disappearance is completely eliminated.

[0059] In one embodiment, the convolution block (Conv-block) can also be used as follows Figure 6In the atrous convolution structure shown in FIG. 1 , the convolution block (Conv-block) includes a first convolution layer, a second convolution layer, and a third convolution layer, which are used to extract features from the input of the convolution block (Conv-block) in sequence to obtain a first output; wherein the convolution kernels of the first convolution layer, the second convolution layer, and the third convolution layer are enlarged; the convolution block (Conv-block) also includes a fourth convolution layer, which extracts features from the input of the convolution block (Conv-block) to obtain a second output; the first output and the second output are added to obtain the output of the convolution block (Conv-block). The atrous convolution structure (atrous-conv) can avoid the problem of reduced feature map resolution caused by continuous and repeated maximum pooling and convolution with a step size greater than 1 in the full convolution network (FCN), and expand the convolution kernel without increasing the number of non-zero parameters and the amount of calculation, thereby effectively controlling the size of the receptive field and achieving a trade-off between small-scale areas and large-scale areas. Although the dilated convolution enlarges the filter, the number of parameters and the amount of computational operations do not increase, so the spatial resolution of the CNN feature map response can be simply and accurately controlled, the loss of spatial hierarchical information can be avoided, and small-scale object information can be better reconstructed.

[0060] The 3D-ResDeConvNet structure in this embodiment has the following advantages: the integrity of information is ensured by adopting a cascaded feature fusion structure with the same resolution; the problem of gradient vanishing is eliminated by using a residual structure; the receptive field is expanded by using a hole convolution structure to prevent the loss of important information; the network layer is deep, but each hidden layer is thin, and the number of parameters is controllable; fewer pooling layers are used, and the convolution layer is used to set the step size for downsampling operations, which not only ensures the integrity of information but also improves the transmission speed.

[0061] The fifth embodiment of the present invention provides a convolutional neural network training method, which is improved on the basis of the first to fourth embodiments and also includes a pre-training step when initializing the network parameters of the intermediate layer.

[0062] In medical images, if there is a lack of large-scale training data, it is not enough to fit the complex 3D-ResDeConvNet network, resulting in overfitting. This embodiment uses an unsupervised stacked autoencoder as a pre-training network, which can reduce overfitting and speed up training through pre-training.

[0063] The pre-trained network of this embodiment includes a first autoencoder, a second autoencoder and a third autoencoder. The autoencoder in this embodiment simulates the human brain's layer-by-layer and gradually abstract cognitive process of external things, adopts a layer-by-layer learning strategy, and performs "splitting" learning on the parameters between deep network layers.

[0064] like Figure 7As shown, this embodiment uses three autoencoders to form a stacked autoencoder (SAE). The training sample data is first input to the first autoencoder to train the network parameters of the first block A0 and the second block A1, and the output of the first autoencoder is calculated based on the trained network parameters of the first block A0 and the second block A1. The output of the first autoencoder is used as the training sample of the second autoencoder, input to the second autoencoder, train the network parameters of the third block A2, and calculate the output of the second autoencoder based on the trained network parameters of the third block A2. The output of the second autoencoder is used as the training sample of the third autoencoder, input to the third autoencoder, train the network parameters of the fourth block A3, and calculate the output of the third autoencoder based on the trained network parameters of the fourth block A3.

[0065] Substituting the trained network parameters of the first block A0, the second block A1, the third block A2 and the fourth block A3 into the 3D-ResDeConvNet network, the optimized initial values ​​can be obtained.

[0066] This embodiment obtains parameters by treating adjacent layers as shallow neural networks, and further, the layers after obtaining the initialization parameters form a deep neural network through "compounding". The stacked autoencoder in this embodiment can obtain optimized initial values, avoid falling into the local optimum too early, obtain parameters in a stable state close to the optimal parameters, and reduce overfitting.

[0067] The sixth embodiment of the present invention provides a convolutional neural network training method, which is improved on the basis of the first to fifth embodiments. Before forward propagation calculates the expected output of the convolutional neural network, the training method also includes preprocessing the training sample data.

[0068] In this embodiment, MRI (nuclear magnetic resonance imaging) images of ischemic stroke are used as raw data. MRI has three modes, namely DWI, ADC, and T2. T2 is obtained by using the FSE sequence, and DWI is obtained by using the SE-EPI sequence. After collecting the raw data, the ADC image is calculated using the diffusion scan raw data. In this embodiment, the raw data is first resampled using linear interpolation, for example, the pixel size is 1.77mm×1.77mm, and the corresponding T2 image and ADC image are obtained based on the DWI image.

[0069] In one embodiment, the original data format is a brain DCM file that is converted into a three-dimensional MHD image format in sequence. Simple Insight Toolkit (SimpleITK) is used to read the image and convert the MHD format of MRI to numpy. Because their domain values ​​are too different to be uniformly normalized, DWI, ADC, and T2 are normalized separately.

[0070] In one implementation, data enhancement can be achieved by horizontally flipping, vertically flipping, and rotating the image at a certain angle to increase the number of samples.

[0071] In one embodiment, an N×N×N 3D image block is used instead of the entire 3D image as sample data input to the network model. The 3D image block group can modify the ratio of positive and negative samples, reduce the problem of imbalance between classes, and reduce overfitting. In addition, using smaller image blocks can increase the training batch, which not only speeds up the training speed, but also makes the training more effective.

[0072] For example, the original 3D image is first cut into 3D image blocks in sequence using a sliding window with a center of 8×8×8 and a side length of N×N×N. Then the segmented 3D image blocks are resampled, all image blocks containing lesions are retained, and some 3D image blocks are randomly flipped horizontally or vertically. Finally, in each round of training, non-lesion image blocks are randomly selected with a ratio of 2:1 to lesion image blocks, and the order of the two is shuffled and put into the network for training.

[0073] The seventh embodiment of the present invention provides a lesion segmentation method based on a convolutional neural network, which is applicable to the field of lesion segmentation in medical image processing, such as the segmentation of lesions in MRI medical images.

[0074] This embodiment obtains a convolutional neural network by inputting training samples and lesion labels into a convolutional neural network and adopting the training method in the above embodiment. The lesion labels are manually annotated by experienced brain experts. In practical applications, after the convolutional neural network is trained, the image to be segmented is input into the trained convolutional neural network to obtain the lesion segmentation result.

[0075] The lesion segmentation method in this embodiment uses a deep convolutional network to capture enough high-level features from the original image, and can avoid the problem of poor effect caused by overfitting. Because the Dice-CE function is used as the loss function, it has a good inspection effect for segmentation environments with small sample data, imbalance between sample classes, and high segmentation accuracy requirements, such as diseases with small lesion volumes and ischemic stroke, etc., and can reduce the impact of imbalance between classes and improve the accuracy of lesion segmentation.

[0076] In one embodiment, the raw data of MRI ischemic stroke comes from 296 ischemic stroke patients provided by a cooperative hospital. Among them, 154 samples were used to train and test the network, and the remaining 142 samples were used to verify the network effect. 62% of the patients were male, with an average age of 56.21. MRI measurements came from three MRI Siemens scanners, two 3T MRI scanners named Skyra and Trio, and the remaining 1.5T MRI scanner named Avanto. T2 was obtained using an FSE sequence, and DWI was obtained using a SE-EPI sequence, with two b values ​​of 0 and 1000s / mm^2, respectively. After collecting the raw data, the ADC map was calculated using the diffusion scan raw data. T2, DWI, and ADC images must ensure the same slice position to facilitate image evaluation and measurement.

[0077] In one embodiment, if Figure 8 As shown in the figure, firstly, the image data and lesion labels of MRI in three modes, namely DWI, ADC and T2, are preprocessed to obtain preprocessed MRI image data and preprocessed lesion labels. The preprocessed MRI image data and preprocessed lesion labels are data cut, and then the cut three-dimensional image blocks are input into the 3D ResDeConvNet network for network training.

[0078] In one embodiment, the three-dimensional image blocks are spliced ​​back into the three-dimensional image according to the previous segmentation order, and then a connectivity method is used to generate connected blocks, so that the connected blocks of the predicted sample results can be compared with the connected blocks of the original labels.

[0079] In one implementation, post-processing uses post-processing DenseCRF to process the segmentation results, which can smooth the edges to a certain extent and further improve the segmentation effect.

[0080] The lesion segmentation method of this embodiment has a low degree of human intervention, strong robustness, high segmentation accuracy, and less time consumption. Therefore, it can be applied to actual medical clinical detection and diagnosis to meet the requirements of the development of modern medicine.

[0081] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.

Claims

1. A training method for a convolutional neural network, wherein the convolutional neural network comprises an input layer, an intermediate layer and an output layer; It is characterized in that The training method comprises: Initializing network parameters of the intermediate layer; Based on the training sample images received by the input layer, forward propagation calculates the expected output of the convolutional neural network; Calculating the error between the expected output and the label corresponding to the training sample image received by the output layer; Back-propagating the error and updating the network parameters of the intermediate layer; The Dice-CE function, which is a combination of the cross entropy function and the Dice function, is used to evaluate the loss of the error; When the error is evaluated as having the minimum loss, the corresponding network parameters of the intermediate layer are used as the final parameters of the convolutional neural network; Wherein, the Dice-CE function is ,in , is the cross entropy function, is the Dice function; Wherein, the Dice function is expressed as: Wherein, N is the total number of the training sample images, For the label, is the expected output; Wherein, the cross entropy function is expressed as: in, , ln represents the natural logarithm.

2. The convolutional neural network training method according to claim 1, characterized in that: The middle layer is divided into: a first block A0, a second block A1, a third block A2 and a fourth block A3; The training sample image received by the input layer is subjected to a first feature extraction by the first block A0 to obtain a first feature image; The first feature image is subjected to a second feature extraction by the second block A1 to obtain a second feature image; The second feature image is subjected to a third feature extraction by the third block A2 to obtain a third feature image; The third feature image is subjected to a fourth feature extraction by the fourth block A3 to obtain a fourth feature image; The forward propagation calculates the expected output of the convolutional neural network, including: Based on the second feature picture, the third feature picture and the fourth feature picture, respectively calculate a first prediction value, a second prediction value and a third prediction value; The calculating the error between the expected output and the label corresponding to the training sample image received by the output layer includes: Respectively calculating a first deviation, a second deviation and a third deviation between the first predicted value, the second predicted value and the third predicted value and the label; The first deviation, the second deviation and the third deviation are multiplied to obtain the error.

3. The convolutional neural network training method according to claim 2, characterized in that: The initializing the network parameters of the intermediate layer includes: Constructing a stacked autoencoder including a first autoencoder, a second autoencoder, and a third autoencoder; Input the training sample image into the first autoencoder, train the network parameters of the first block A0 and the second block A1, and calculate the output of the first autoencoder using the trained network parameters of the first block A0 and the second block A1; Using the output of the first autoencoder as a training sample of the second autoencoder, inputting it into the second autoencoder, training the network parameters of the third block A2, and using the trained network parameters of the third block A2 to calculate the output of the second autoencoder; Using the output of the second autoencoder as a training sample of the third autoencoder, inputting it into the third autoencoder, training the network parameters of the fourth block A3, and using the trained network parameters of the fourth block A3 to calculate the output of the third autoencoder; The trained network parameters of the first block A0, the second block A1, the third block A2 and the fourth block A3 are used as initial values ​​of the network parameters of the first block A0, the second block A1, the third block A2 and the fourth block A3.

4. The convolutional neural network training method according to claim 2, characterized in that: The second block A1 includes a convolution block and two recognition blocks; the third block A2 includes a convolution block and three recognition blocks; the fourth block A3 includes a convolution block and five recognition blocks; Each convolution block has a first residual structure, and each recognition block has a second residual structure; The first residual structure is downsampled by using a convolution layer, and the input of the first residual structure and the output of the first residual structure are processed by pixel addition as the final output of the first residual structure; The input of the second residual structure is directly passed to the output of the second residual structure.

5. The convolutional neural network training method according to claim 4, characterized in that: The convolution block includes a first convolution layer, a second convolution layer and a third convolution layer, which are used to extract features of the input of the convolution block in sequence to obtain a first output; wherein the convolution kernels of the first convolution layer, the second convolution layer and the third convolution layer are enlarged; The convolution block further includes a fourth convolution layer, which performs feature extraction on the input of the convolution block to obtain a second output; The first output and the second output are added to obtain the output of the convolution block.

6. The convolutional neural network training method according to claim 1, characterized in that: Before forward propagation to calculate the expected output of the convolutional neural network, the training method further includes: preprocessing the training sample images.

7. The convolutional neural network training method according to claim 6, characterized in that: The pretreatment includes any one or any combination of the following: Normalization, data enhancement, and data cutting.

8. A lesion segmentation method, characterized in that: include: Input the sample to be segmented into the convolutional neural network to obtain the lesion segmentation result; Wherein, the convolutional neural network is trained using the convolutional neural network training method described in any one of claims 1 to 7.