Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems in the prior art, the invention provides a 3D brain lesion segmentation method based on optimal transmission, which aims to effectively reduce the precision loss caused by brain image preprocessing, ensure the integrity of image global information, enlarge the influence of lesion information and improve the lesion segmentation precision by using a proper neural network model.
The technical scheme is as follows: A3D brain lesion segmentation method based on optimal transmission is characterized by comprising the following steps:
step 1: constructing a transmission cost function aiming at 3D brain medical images, establishing a corresponding optimal transmission model, and designing an algorithm to quickly solve the model problem; calculating two-stage optimal transmission mapping from the 3D brain to a cuboid by using an optimal transmission model to obtain a 3D brain medical image data set represented by a tensor;
step 1.1: build up of the 3D brain: (
) A guaranteed quality optimal transmission model to a unit sphere, calculating a corresponding optimal transmission map
. The optimal transmission model is as follows,
wherein the content of the first and second substances,
representing a set of 3D brain to unit sphere mappings,
representation collection
The mapping of (1) to (2),
a collection of 3D mid-brain points is represented,
to represent
The point (b) in (c) is,
indicating points
Is transmitted to a point
The cost of the transmission of (a) is,
indicating points
The mass of (c);
step 1.2: build lengthCube (
) A guaranteed quality optimal transmission model to a unit sphere, calculating a corresponding optimal transmission map
. The optimal transmission model is as follows,
wherein the content of the first and second substances,
representing the set of mappings from cuboids to unit spheres,
representation collection
The mapping of (1) to (2),
a collection of the mid-points of the cuboid is shown,
to represent
The point (b) in (c) is,
indicating points
Is transmitted to a point
The cost of the transmission of (a) is,
indicating points
The mass of (c);
step 1.3: the brain MRI image is different from a general image and is a four-channel 3D image, and each channel stores images shot by different signal sources of the same brain and displays the images with different resolutions; among them, the MRI brain image contains a large amount of air, and the volume of the air accounts for about 83% of the image, which brings extra work and negative influence on the image segmentation. The optimal transmission can change irregular brain into cuboid in a quality-preserving manner, so that the influence of air on brain lesion segmentation is eliminated; solving the two optimal transmission models by using a projection gradient method, and utilizing the solved optimal transmission mapping
And
and calculating two-stage optimal transmission mapping from the 3D brain to the cuboid:
double shot
The one-to-one correspondence between the 3D brain and the cuboid is realized;
step 2: adopting a convolution neural network model most suitable for 3D brain image segmentation processing, and inputting tensor form data of 3D brain medical image data provided by an authoritative website media data.
And step 3: restoring the prediction result on the cuboid to the 3D brain by means of the inverse mapping of the two-stage optimal transmission mapping
Is inverse ofAnd (5) restoring the prediction result of the tensor form to the original 3D brain to obtain the prediction result of the 3D brain lesion segmentation.
Has the advantages that:
1. the invention realizes the one-to-one mapping transformation of the brain image, namely the corresponding transformation of a 3D brain to a cuboid, thereby saving the input data volume. In a general method, the input data volume is about 8 times of the original data volume; the method of the invention ensures one-to-one conversion, so that the input data volume is consistent with the original data volume;
2. ensuring that the image is converted into a cuboid shape and accords with the input rule of a neural network model;
3. by means of data enhancement, the precision loss caused by brain image transformation processing is effectively reduced, and the transformation precision of the whole tumor, the tumor core and the strengthened tumor can be respectively improved by 1.49%, 2.88% and 1.43%;
4. after image processing, the global information of the brain is reserved, the lesion volume is enlarged, the proportion of the whole tumor in the brain is enlarged by 1.86 times, and the influence of the lesion is enhanced while the integrity of the global information of the image is ensured;
5. the most appropriate convolutional neural network model is selected, the lesion segmentation precision is effectively improved, and compared with the existing best result, the segmentation precision of the whole tumor, the tumor core and the strengthened tumor can be respectively improved by 3.07%, 2.88% and 2.17%.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. Thus, the following detailed description of the embodiments of the invention presented in the figures is not intended to limit the scope of the invention as claimed.
Example 1
As shown in fig. 1, the invention provides a 3D brain lesion segmentation method based on optimal transmission, which comprises the following specific steps:
step 1: constructing a transmission cost function aiming at 3D brain medical images, establishing a corresponding optimal transmission model, and designing an algorithm to quickly solve the model problem; calculating two-stage optimal transmission mapping from the 3D brain to a cuboid by using an optimal transmission model to obtain a 3D brain medical image data set represented by a tensor;
step 1.1: build up of the 3D brain: (
) A guaranteed quality optimal transmission model to a unit sphere, calculating a corresponding optimal transmission map
. The optimal transmission model is as follows,
wherein the content of the first and second substances,
representing a set of 3D brain to unit sphere mappings,
representation collection
The mapping of (1) to (2),
a collection of 3D mid-brain points is represented,
to represent
The point (b) in (c) is,
indicating points
Is transmitted to a point
The cost of the transmission of (a) is,
indicating points
The mass of (c);
step 1.2: build up a rectangular parallelepiped
) A guaranteed quality optimal transmission model to a unit sphere, calculating a corresponding optimal transmission map
. The optimal transmission model is as follows,
wherein the content of the first and second substances,
representing the set of mappings from cuboids to unit spheres,
representation collection
The mapping of (1) to (2),
a collection of the mid-points of the cuboid is shown,
to represent
The point (b) in (c) is,
indicating points
Is transmitted to a point
The cost of the transmission of (a) is,
indicating points
The mass of (c);
step 1.3: the brain MRI image is different from a general image and is a four-channel 3D image, and each channel stores images shot by different signal sources of the same brain and displays the images with different resolutions; among them, the MRI brain image contains a large amount of air, and the volume of the air accounts for about 83% of the image, which brings extra work and negative influence on the image segmentation. The optimal transmission can change irregular brain into cuboid in a quality-preserving manner, so that the influence of air on brain lesion segmentation is eliminated; solving the two optimal transmission models by using a projection gradient method, and utilizing the solved optimal transmission mapping
And
and calculating two-stage optimal transmission mapping from the 3D brain to the cuboid:
double shot
The one-to-one correspondence between the 3D brain and the cuboid is realized;
step 2: building a multi-layer U-net model architecture, inputting 3D brain image data represented by tensor into a model for training, and obtaining prediction data of test set data on the basis of the trained model; by adopting a U-net model which is most suitable for 3D brain image segmentation processing and comprises a plurality of coding layers and a plurality of decoding layers, the coding layers are connected with the decoding layers through bridge layers and are linked in series, and the model is autonomously programmed by Python or MATLAB; com, the tensor form data of the medical image data are input into a program by means of an authoritative website, and the prediction of image segmentation is realized;
and step 3: restoring the prediction result on the cuboid to the 3D brain by means of the inverse mapping of the two-stage optimal transmission mapping
And (3) the inverse mapping of (1) and restoring the prediction result of the tensor form to the original 3D brain to obtain the prediction result of the 3D brain lesion segmentation. After the pathological change result of the cuboid is predicted through the U-net model, the result needs to be restored to the 3D brain, the two-stage optimal transmission mapping obtained in the step 1 is bijection, the 3D brain can be mapped into the cuboid, and meanwhile, the cuboid can be restored to the 3D brain through inverse mapping.
Example 2
As shown in fig. 1, the invention provides a 3D brain lesion segmentation method based on optimal transmission, which mainly performs tumor segmentation on a brain, and specifically includes the following steps:
step 1: constructing a transmission cost function aiming at 3D brain medical images, establishing a corresponding optimal transmission model, and designing an algorithm to quickly solve the model problem; calculating two-stage optimal transmission mapping from the 3D brain to a cuboid by using an optimal transmission model to obtain a 3D brain medical image data set represented by a tensor;
step 1.1: using the square of the Euclidean distance
As a function of the transmission cost, a 3D brain is built (
) A guaranteed quality optimal transmission model to a unit sphere, calculating a corresponding optimal transmission map
. The optimal transmission model is as follows,
wherein the content of the first and second substances,
representing a set of 3D brain to unit sphere mappings,
representation collection
The mapping of (1) to (2),
a collection of 3D mid-brain points is represented,
to represent
The point (b) in (c) is,
indicating points
The mass of (c);
step 1.2: build up a rectangular parallelepiped
) A guaranteed quality optimal transmission model to a unit sphere, calculating a corresponding optimal transmission map
. The optimal transmission model is as follows,
wherein the content of the first and second substances,
representing the set of mappings from cuboids to unit spheres,
representation collection
The mapping of (1) to (2),
a collection of the mid-points of the cuboid is shown,
to represent
The point (b) in (c) is,
indicating points
The mass of (c);
step 1.3: using projection gradient method, solving
And
optimal transmission model of (2): inputting three-dimensional manifold
(including 3D brains
And a rectangular parallelepiped
) Subdivision of tetrahedron (
A set of vertices is represented that is representative of,
the set of representative edges is then used to represent the set of edges,
represents a collection of triangular faces of the object,
representing a collection of tetrahedrons), three-dimensional manifold surface triangular elements
Slice constant density function of
Three-dimensional manifold tetrahedral unit
Slice constant density function of
Error limit
(ii) a Computing initial boundary maps by the stretching energy minimization method (ASEM)
Iteratively calculating the optimal rotation
Wherein
Represents a two-dimensional unit sphere surface,
indicating rotationThe set of the conversion operators is then converted,
representing a set of vertices
A point of (1);
order to
,
Respectively represent boundary points and interior points, order
Iterative solution of linear systems
Obtaining an optimal transmission mapping
Induced vector of
I.e. mapping of the three-dimensional manifold to the best transmission of the unit sphere with guaranteed quality
Induced vector of
Wherein
Representing three-dimensional unit spheres, matrices
Is represented as follows:
wherein
Representation matrix
Middle corresponding index set
A row of
Together with the columns of the sub-matrix,
the same process is carried out;
representing a set of tetrahedral edges resulting from a three-dimensional manifold subdivision,
representing the vertices on the corresponding tetrahedral area,
representing triangles
And a triangle
The two-surface angle is formed by the two-surface angle,
、
both represent the edges in the tetrahedron connecting these two points,
representing a set of tetrahedrons
The tetrahedron (a) in (b),
representing tetrahedrons
The volume of (a) to (b),
to represent
(ii) a density of (d); finally outputting the optimal transmission mapping
Induced vector of
,
The result is the discrete value of the optimal transmission mapping;
mapping by optimal transmission
And
calculating two-stage optimal transmission mapping from the 3D brain to the cuboid:
double shot
The one-to-one correspondence between the 3D brain and the cuboid is realized; as shown in FIG. 2, the 3D brain first passes the first stage of mapping
Converting into unit ball, and mapping from cube to unit ball
Inverse mapping of
The unit ball is changed into a cuboid to realize two-stage conversion;
the resulting cuboid can be used directly for image segmentation, thereby converting the 3D brain data set into a cuboid data set, which has the following characteristics with respect to the 3D brain data set: (1) the whole cuboid represents a 3D brain, the influence of air on image segmentation is eliminated, (2) the cuboid is of equal density, a part with high gray value (density) is more likely to be a lesion part, and a high-density area in an original image can be enlarged after the cuboid is mapped, so that the image segmentation is more accurate, (3) the cuboid eliminates the air, and compared with the original image, the cuboid image is smaller, and the training speed of model training can be accelerated;
TABLE 1 loss of conversion precision between 3D brain images and cubes of 96^3 and 128^3, respectively
As can be seen from Table 1, the transformation into the cube of 128^3 has less precision loss, so we have chosen to use the data of 128^3 for experiments in this case;
step 2: building a three-layer U-net model architecture, inputting 3D brain image data represented by tensor into a model for training, and obtaining prediction data of test set data on the basis of the trained model; by adopting a U-net model which is most suitable for 3D brain image segmentation processing, as shown in FIG. 3, each cuboid and upper number represent the output shape and channel value of each layer, the model comprises three coding layers and three decoding layers, and the coding layers and the decoding layers with the same resolution are connected through a bridge layer and are connected in series; com medical image data of an authoritative website is used for inputting tensor morphological data of the medical image data into a program by using Python and MATLAB autonomous programming, so that the prediction of image segmentation is realized;
TABLE 2 number of parameters for each layer in the three-layer U-net model
Table 2 shows the change in the number of parameters in each layer of the U-net model, and the dimensions of the input data and the output data are still consistent through the learning of the model;
besides a three-layer U-net model, a four-layer U-net model architecture is also built, the model is similar to the three-layer U-net model, comprises four coding layers and four decoding layers, and is a similar model which is formed by adding one layer on the basis of the three-layer U-net model;
TABLE 3 number of parameters for each layer in the four-layer U-net model
As can be seen from the above table, the four layers of U-nets increase parameters of tens of millions of levels compared with the three layers of U-nets, on the same equipment, the average time increased by each iteration is 167s, the accuracy improved by the previous 50 iterations is only within 0.02%, and the improvement of the subsequent iterations is almost negligible, so that the model selected in the study is a three-layer U-net model;
and step 3: restoring the prediction result of the cube to the 3D brain by means of the inverse mapping of the two-stage optimal transmission mapping, wherein the specific method is to utilize the two-stage optimal transmission
And (3) the inverse mapping of (1) and restoring the prediction result of the tensor form to the original 3D brain to obtain the prediction result of the 3D brain lesion segmentation. After the pathological change result of the cube is predicted through the U-net model, the result needs to be restored to the 3D brain, the two-stage optimal transmission mapping obtained in the step 1 is bijection, the 3D brain can be mapped into the cube, and meanwhile, the cube can be restored to the brain through inverse mapping. In actual operation, the process only causes about 0.5% of precision loss, the loss is caused by objective hardware conditions and is inevitable, and the precision loss is acceptable compared with the segmentation precision improvement obtained by using the method;
TABLE 4.3D segmentation accuracy of brain tumors
The table shows the brain tumor segmentation results based on the two-stage optimal transmission method, and it is seen from the table that after 1000 times of model iterative training, the training precision of each tumor can respectively reach 0.9852, 0.9743 and 0.9433, and the testing precision can respectively reach 0.9202, 0.8794 and 0.8420, and compared with the existing best results, the testing precision of the whole tumor, the tumor core and the strengthened tumor can be respectively improved by 3.07%, 2.88% and 2.17%.
Based on the tumor segmentation method of the two-stage optimal mapping, similar data processing can be carried out on medical images of other organs, such as pancreas, eyeballs, liver and the like, and then lesions in the organs are segmented through an efficient segmentation model; a set of complete algorithm library is expected to be established, whether the organ of the patient contains the tumor can be judged by inputting a medical image, and if the organ of the patient contains the tumor, the segmentation image of the tumor is output, so that extremely convenient service can be provided for the patient, assistance can also be provided for doctors, and the working efficiency of the doctors is greatly improved; in the future, a set of formed medical software is designed, the algorithm library is combined with the algorithm library and packaged into mature organ lesion distinguishing and segmenting software which is provided for hospitals with requirements, patients can be independently placed into machines of the hospitals after medical images are obtained, paper results are directly output by means of the lesion segmenting software in the machines and sent to hands of the patients, doctors can timely give medicines according to symptoms, and therefore medical efficiency is greatly improved, cure rate is improved, and death rate is reduced.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.