Brain tissue segmentation method based on image clipping and convolutional neural network
Technical Field
The invention belongs to the technical field of image segmentation, and relates to a brain tissue segmentation method based on image clipping and a convolutional neural network.
Background
The brain diseases have the characteristics of high morbidity, high mortality, high disability rate, high recurrence rate, more complex complications and the like; the changes of the position, the volume and the shape of brain structures such as hippocampus, amygdala, thalamus and the like are closely related to various diseases, and the changes need to be accurately segmented to be determined and analyzed, so that the research on the position, the volume and the shape of the brain structures can provide support for the clinical research of various diseases. However, the anatomical structure of these brain structures is complex, mostly located in the middle of the brain, and is very close to the gray level of the surrounding tissues, and in addition to the offset field effect of the MR image itself, the local volume effect and the influence of tissue motion, etc., even the most experienced image physicians perform manual segmentation, which is a great challenge.
Therefore, how to segment brain tissue quickly, accurately and effectively is a problem which needs to be solved in the medical science at present.
Disclosure of Invention
The invention aims to provide a brain tissue segmentation method based on image cutting and a convolutional neural network.
The purpose of the invention can be realized by the following technical scheme:
a brain tissue segmentation method based on image clipping and a convolutional neural network comprises the following steps:
s1, cutting the brain MR image to obtain the brain tissue interested area;
s2, extracting the cut image by a convolution neural network model;
s3, increasing the number of the clipped image training data sets to obtain an expanded data set;
and S4, training the expanded data set by using the Segnet model, inputting the image to be tested into the trained network, using the output of the network as the initial segmentation result of the brain tissue, testing by using different amounts of data to obtain the initial segmentation results of a plurality of groups of brain tissues, and applying random selection fusion to the segmentation results to realize accurate segmentation of the brain tissue.
Further, a sub-portion with the center size of 128 × 128 of the original image is intercepted as an input image for subsequent deep learning, and the sub-portion includes all brain tissue regions.
Further, the data clipping method is as follows:
s11, searching from top to bottom, from left to right, and from right to left, respectively, determining a brain boundary line in the direction when a pixel point greater than 0 exists in the searched row or column, wherein the four boundary lines form a bounding box of the brain region and obtain four vertex coordinates;
s12, determining a linear equation according to the two points to obtain a linear equation of two diagonal lines of the bounding box, wherein the intersection point of the diagonal line equations is the center point of the brain region;
s13, a region of 128 × 128 size is cut out from the original image with the center point as the center, and the cut image region is obtained.
Further, the convolutional neural network model consists of two stages, namely a top-down stage and a bottom-up stage; the sizes of the convolutional layers in the top-down stage are 3x3, the sizes of the pooling layers are 2x2, and each convolutional layer enters a correction linear unit activation function after being processed; the bottom-up stage adopts up-sampling, pooling and correcting linear unit activation function, and the last layer is formed by a 1x1 convolution layer for realizing image segmentation.
The invention has the beneficial effects that:
the method realizes automatic extraction of brain tissue by using a deep learning and multi-map random selection method, firstly cuts the brain MR image to obtain the brain tissue region of interest, and convolves the cut data to more effectively learn image characteristics, thereby improving the segmentation precision of the deep learning. And then increasing the number of training data sets by rotating, translating and other operations on the cut images, training the expanded data sets by using a Segnet model, inputting the images to be tested into a trained network, outputting the network as an initial segmentation result of the brain tissue, testing by using different numbers of data to obtain the initial segmentation results of a plurality of groups of brain tissues, and applying random selection and fusion to the results to realize accurate segmentation of the brain tissue.
Drawings
In order to facilitate understanding for those skilled in the art, the present invention will be further described with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method for segmenting brain tissue based on image clipping and convolutional neural network according to the present invention;
FIG. 2 is a schematic diagram of an image cropping process of a brain tissue segmentation method based on image cropping and a convolutional neural network according to the present invention;
FIG. 3 is a schematic diagram of a brain tissue structure accurately segmented by the method of the present invention.
Detailed Description
The invention is explained in detail by the following examples in conjunction with fig. 1, 2 and 3:
as shown in fig. 1, the present invention provides a brain tissue segmentation method based on image clipping and convolutional neural network, comprising the following steps:
s1, cutting the brain MR image to obtain the brain tissue interested area;
s2, extracting the cut image by a convolution neural network model; the image features can be more effectively learned by performing convolution on the cut data, so that the segmentation precision of deep learning is improved.
S3, increasing the number of the clipped image training data sets to obtain an expanded data set; specifically, the number of training data sets can be increased by rotating, translating and the like the clipped image;
and S4, training the expanded data set by using the Segnet model, inputting the image to be tested into the trained network, using the output of the network as the initial segmentation result of the brain tissue, testing by using different amounts of data to obtain the initial segmentation results of a plurality of groups of brain tissues, and applying random selection fusion to the segmentation results to realize accurate segmentation of the brain tissue.
Further, a sub-portion with the center size of 128 × 128 of the original image is intercepted as an input image for subsequent deep learning, and the sub-portion includes all brain tissue regions.
As shown in fig. 2, the original MR image is typically 256 x 256 in size, and the brain tissue (hippocampus, thalamus, amygdala, etc.) is typically located in the central region of the imaged brain. Training the network by directly using the original image as the input of the deep learning network may result in poor or even failed segmentation effect (such as a completely black image) during testing. In order to solve the above problems, the present invention provides a fully automatic image cropping method, by which a sub-portion of 128 × 128 size of the original image center is intercepted as an input image for subsequent deep learning, and the sub-portion includes all brain tissue regions.
Further, the data clipping method is as follows:
s11, searching from top to bottom, from bottom to top, from left to right, and from right to left in the image, determining a brain boundary line (line 1 in fig. 2 (a)) in the direction when a pixel point greater than 0 exists in the searched row or column, wherein the four boundary lines form a bounding box of the brain region and obtain four vertex coordinates;
s12, determining a linear equation according to the two points to obtain a linear equation (line 2 in figure 2 (a)) of two diagonal lines of the bounding box, wherein the point where the diagonal line equations intersect is the center point of the brain region;
s13, a region of 128 × 128 size (line 3 in fig. 2 (b)) is cut out from the original image with the center point as the center, and the cut image region is obtained.
The invention adopts a convolution neural network to realize the extraction of brain tissues. The network model consists of two stages from top to bottom and from bottom to top. The traditional pooling and convolution operations are adopted in the top-down stage, the size of each convolutional layer is 3x3, the size of each pooling layer is 2x2, and each convolutional layer enters a correction linear unit activation function after being processed; the bottom-up stage adopts up-sampling, pooling and correcting linear unit activation function, and the last layer is formed by a 1x1 convolution layer for realizing image segmentation. The convolutional neural network structure used in the present invention is as follows:
using the method described in this example, the brain tissue structure was accurately segmented as shown in FIG. 3, which contains 6 tissues, 4 being the pallor nucleus, 5 being the hippocampus, 6 being the amygdala, 7 being the caudate nucleus, 8 being the lenticular nucleus, and 9 being the thalamus.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.