CN112446893A - Contour segmentation method and device for liver image - Google Patents

Contour segmentation method and device for liver image Download PDF

Info

Publication number
CN112446893A
CN112446893A CN201910803723.8A CN201910803723A CN112446893A CN 112446893 A CN112446893 A CN 112446893A CN 201910803723 A CN201910803723 A CN 201910803723A CN 112446893 A CN112446893 A CN 112446893A
Authority
CN
China
Prior art keywords
liver
slice
image
contour
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910803723.8A
Other languages
Chinese (zh)
Other versions
CN112446893B (en
Inventor
董家鸿
金烁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Precision Diagnosis Medical Technology Co ltd
Original Assignee
Tsinghua University
Beijing Tsinghua Changgeng Hospital
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University, Beijing Tsinghua Changgeng Hospital filed Critical Tsinghua University
Priority to CN201910803723.8A priority Critical patent/CN112446893B/en
Publication of CN112446893A publication Critical patent/CN112446893A/en
Application granted granted Critical
Publication of CN112446893B publication Critical patent/CN112446893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10072Tomographic images
    • G06T2207/10081Computed x-ray tomography [CT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30056Liver; Hepatic
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The embodiment of the invention provides a method and a device for segmenting a contour of a liver image. The method comprises the following steps: acquiring a medical slice image, wherein the medical slice image comprises a liver slice which comprises contour labeling information; inputting the medical slice image into an image segmentation model to obtain a liver contour segmentation result; the image segmentation model is obtained by taking a liver data block as a sample in advance, taking contour marking information of each liver slice in the liver data block as a sample label and training according to the weight of the sample; wherein the liver data block includes a first preset number of slices. According to the embodiment of the invention, the liver contour can be segmented through the pre-trained image segmentation model, and the image segmentation model is trained according to the weight of the sample, so that the segmentation accuracy of the segmentation of the sample with small data volume and the sample difficult to segment can be improved.

Description

Contour segmentation method and device for liver image
Technical Field
The invention relates to the technical field of image segmentation, in particular to a method and a device for segmenting a contour of a liver image.
Background
Liver cancer is the 5 th most severe malignant tumor worldwide. Anatomical liver resection (based on liver resection) is currently the most effective treatment. The three-dimensional reconstruction of the liver plays an important role in resection operation and is an important link for preoperative planning of the liver. The three-dimensional reconstruction of the liver is based on the segmentation of a two-dimensional image of the liver by Computed Tomography (CT), so the quality of the segmentation effect directly affects the three-dimensional reconstruction effect.
Current liver segmentation methods can be divided into methods based on traditional image processing: such as using basic information of the image, such as gray values, gradients, and other low-level features, typical methods include region growing, thresholding, graph-cutting methods, and also level-set based methods. Region growing is the way of aggregating one pixel or sub-region step by step into one complete independent connected region according to a predefined growing criterion. The threshold method is to divide a pixel set according to gray levels, and each obtained subset forms a region corresponding to a real scene, so that the threshold method is suitable for images with different gray level ranges occupied by an object and a background. The liver segmentation method segments the liver through a hybrid model implemented based on a level set, where the parameters are adjusted by using a supervised optimization procedure.
Compared with the conventional segmentation method, the segmentation method based on deep learning has become one of the research hotspots in recent years. In the prior art, a full convolution neural network (FCN) replaces a full connection network with a convolution network, so that the convolution neural network can perform an image segmentation task; the segmentation network simultaneously solves two important problems of target classification and classification positioning in the image, and makes automatic three-dimensional reconstruction possible. The prior art two 3D deep supervision networks (3D DSNs) solve this challenging task; the proposed 3D DSN utilizes a full convolution architecture, effective end-to-end learning and reasoning, and introduces a deep supervision mechanism in the learning process to resist potential optimization problems, so that the model can obtain higher convergence speed and stronger identification capability. Then, on the basis of FCN, the third prior art provides a U-Net network, firstly, the idea of cross connection is applied to the segmentation problem, the direct connection between an encoder and a decoder is added to help to recover the details of a target, the accuracy of medical image segmentation is greatly improved, and the optimal segmentation accuracy at that time is obtained on a plurality of problems such as cell images and liver CT images. However, most deep learning methods cannot fully utilize three-dimensional spatial information of a CT image, only use a two-dimensional convolution neural network, and also partially use a three-dimensional convolution algorithm, but do not combine shallow and deep features of the CT image. Recently, network structures such as U-Net +3D-CRF (Conditional Random Fields) and 3D U-Net are proposed in the fourth prior art, so that more three-dimensional information is provided for the original two-dimensional U-Net structure, and the accuracy of contour segmentation is further improved.
Because of the traditional liver segmentation method, the method greatly depends on parameter adjustment of a threshold value; on the other hand, the segmentation method based on deep learning has better generalization capability and precision, and thus is gradually becoming the mainstream method. The existing training strategy, which is the mainstream method based on deep learning, generally performs random extraction on all training samples for training.
In summary, the problems of the prior art are as follows: since the data types of the liver are diverse and unbalanced; the segmentation difficulty of different CT slices of the same liver sample is different; if all samples are randomly extracted without distinction, the samples with small data quantity are caused, and the extraction probability is low; therefore, the number of times of training is small, so that the learning of a few samples is insufficient, and on the other hand, the random extraction does not increase the attention on the difficult-to-divide samples, thereby influencing the dividing effect of the difficult-to-divide samples.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a method and a device for segmenting the outline of a liver image.
The embodiment of the invention provides a contour segmentation method of a liver image, which comprises the following steps:
acquiring a medical slice image, wherein the medical slice image comprises a liver slice which comprises contour labeling information;
inputting the medical slice image into an image segmentation model to obtain a liver contour segmentation result;
the image segmentation model is obtained by taking a liver data block as a sample in advance, taking contour marking information of each liver slice in the liver data block as a sample label and training according to the weight of the sample;
wherein the liver data block includes a first preset number of slices.
The embodiment of the invention provides a contour segmentation device of a liver image, which comprises:
a first acquisition unit configured to acquire a medical slice image, the medical slice image including a liver slice including contour labeling information;
the segmentation unit is used for inputting the medical slice image into an image segmentation model to obtain a liver contour segmentation result;
the image segmentation model is obtained by taking a liver data block as a sample in advance, taking contour marking information of each liver slice in the liver data block as a sample label and training according to the weight of the sample;
wherein the liver data block includes a first preset number of slices.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the above-mentioned method for segmenting the contour of the liver image.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for contour segmentation of a liver image is implemented.
According to the method and the device for segmenting the outline of the liver image, the liver outline can be segmented through the pre-trained image segmentation model, the image segmentation model is trained according to the weight of the sample, and the segmentation accuracy of the segmentation of the sample with small data volume and the sample difficult to segment can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for contour segmentation of a liver image according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for training an image segmentation model according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a contour segmentation apparatus for a liver image according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a training apparatus for an image segmentation model according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
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 will be 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, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a method for contour segmentation of a liver image according to an embodiment of the present invention.
As shown in fig. 1, the method comprises the steps of:
s11, acquiring a medical slice image, wherein the medical slice image comprises a liver slice which comprises contour labeling information;
specifically, the medical slice image may be a CT image, the CT image is actually a slice image sequence, the CT image acquired in the embodiment of the present invention includes a liver image and images of other human tissues or organs adjacent to the liver, wherein the slice image of the liver portion in the CT image is labeled with contour information of the liver.
S12, inputting the medical slice image into an image segmentation model to obtain a liver contour segmentation result;
the image segmentation model is obtained by taking a liver data block as a sample in advance, taking contour marking information of each liver slice in the liver data block as a sample label and training according to the weight of the sample;
wherein the liver data block includes a first preset number of slices.
Specifically, the CT image including the liver image is input into a pre-trained image segmentation model, and complete liver contour information can be output, so that the liver is segmented from the CT image.
The image segmentation model is obtained by training according to pre-prepared training data, training samples are cut liver data blocks, each liver data block comprises a certain number of slices, sample labels are outline marking information on the liver slices in the liver data blocks, all the training samples are randomly extracted and input into the constructed image segmentation model to obtain a predicted image segmentation result, and parameters of the image segmentation model are adjusted according to the predicted segmentation result and training errors of the sample labels judgment model. And continuously training until the image segmentation model with the best performance is obtained.
Due to the diverse liver data types (normal liver, liver with different lesion types) and the extremely unbalanced distribution (normal liver is always the majority), the current convolutional neural network-based model has poor generalization capability on a small number of samples (such as postoperative liver, liver with metal artifacts, etc.), and hard-to-divide slices (middle layers) in the samples. Therefore, the weight is added to the small samples and the difficultly-divided samples, random extraction is carried out according to the sample weight, the extraction probability is higher when the weight is higher, and the generalization capability and the accuracy of the training model on the small samples and the difficultly-divided samples are improved.
According to the method for segmenting the outline of the liver image, the liver outline can be segmented through the pre-trained image segmentation model, the image segmentation model is trained according to the weight of the sample, and the segmentation accuracy of the segmentation of the sample with small data volume and the sample difficult to segment can be improved.
Fig. 2 is a flowchart illustrating a method for training an image segmentation model according to an embodiment of the present invention.
As shown in fig. 2, the method comprises the steps of:
s21, initializing parameters of the image segmentation model, and acquiring a training set of the image segmentation model, wherein the training set comprises a plurality of liver data blocks;
specifically, 3DUnet is selected as a basic deep learning model structure, and all parameters of the network are initialized randomly. The 3DUnet can fully utilize the three-dimensional information of the liver to obtain higher segmentation precision.
Preparing training data, and carrying out CT sequence data of all livers according to a training set: dividing the test set into 4: 1; and according to the corresponding labeling information, cutting the training data set obtained by dividing to obtain all possible liver blocks (containing n continuous liver slices) with the thickness of n, wherein the liver blocks are used as training data of the deep learning model.
S22, randomly extracting a batch of liver data blocks according to the weight of each liver data block in the training set, inputting the liver data blocks into the image segmentation model, outputting a prediction segmentation result, and updating the parameters of the image segmentation model according to the prediction segmentation result and the contour labeling information of the liver slices in the liver data blocks;
specifically, a Batch of training data is randomly extracted according to the weight of each training sample, and an iterative training is performed, wherein the extraction probability is higher as the weight is higher. And (2) randomly extracting data of a Batch according to the initialized weights (all are equal and are 1) of all liver training data blocks by using a Weighted Random Sampler module (a module which can randomly sample according to the weight of each sample) of a pyrrch deep learning framework, and inputting the data into the network model of the first step to obtain a segmentation result output by the Batch.
It should be noted that the initialization is performed only during the first execution, and the subsequent updating is performed each time according to the weight obtained by the subsequent calculation.
The average loss of all slices of a Batch in B × n layers is calculated, where B is the number of liver data blocks in a Batch, and the model parameters are updated. And (3) calculating loss function loss values of the network prediction segmentation results and the real labeled segmentation results of B multiplied by n slices in one Batch in the third step according to a calculation formula of evaluation index Dice coefficients to obtain the loss value of each slice in the Batch, and finally obtaining a loss array. Sorting the loss arrays from top to bottom according to the size of the loss; selecting the loss with the specified percentage (for example, the top 20%) in the sorted array as the loss difficult to be sorted, multiplying the loss by a certain coefficient (for example, multiplying by 1.5), and keeping the rest unchanged; adding all the loss values in the loss array, and dividing the sum by the number of the loss to obtain B multiplied by n, wherein the B multiplied by n is used as the final average loss of the iteration; and (5) performing back propagation on the loss, and updating parameters of the network model.
S23, randomly extracting another batch of liver data blocks according to the weight of each liver data block in the training set, and repeatedly executing the steps until all liver data blocks are traversed to obtain an image segmentation model after one round of training;
and repeatedly executing the step S22, performing multiple iterations of batch, calculating the loss value of the model each time, and updating the network parameters according to the loss until all the training data are traversed once, thereby completing a complete training round.
S24, testing the liver data blocks in the training set according to the image segmentation model after the training, and updating the weight of the liver data blocks according to the test result;
specifically, after each round of training is finished, testing is performed on a training set, and the testing process, that is, the training process, obtains a testing Dice score of each training sample: score, which adjusts the weight of each training sample to 1-score, and then performs the next round of training. For a training sample, if the test score is score, the weight is 1-score, and it can be seen that the lower the test score is, the higher the weight is, and the higher the probability of extraction in the next training round is.
And S25, continuing training according to the preset training times until the training is finished.
Specifically, the next round of training is performed according to the preset number of times of training, if the training is not finished, the process returns to step S22, otherwise, the training is finished.
The training method of the image segmentation model provided by the invention improves the loss formula, and increases the weight for the slices with large loss; the selection strategy of the training samples is improved, the worse the expression on the training set is, the less the number of the samples is expressed, or the samples are difficult to be classified, and the weight is increased; the whole process is fully automatic, and no marking personnel is required to participate. According to the training method provided by the invention, the segmentation effect of the model on the small sample and the difficultly-divided sample is greatly improved, and the training method is very easy to combine with the training of each current model. The extraction probability of the sample is dynamically adjusted in a self-adaptive manner, and manual participation is not needed; and a new loss function is adopted, the attention degree of the samples difficult to divide is increased, and the accuracy of the current dividing method for deep learning on the division of the small samples and the samples difficult to divide is further improved.
On the basis of the foregoing embodiment, step S22 specifically includes:
calculating an average loss function value of all liver slices of the batch of liver data blocks;
calculating a gradient of the image segmentation model according to the average loss function value;
and updating the parameters of the image segmentation model according to the gradient.
The average loss function values for all liver slices of the one batch of liver data blocks include:
calculating a loss function for each liver slice in the batch according to the following formula:
Figure BDA0002183033160000071
wherein loss is a loss function of the liver slice, X represents a binarization prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents an actual binarization result of the liver slice; the | X | is the number of all the pixel points with the value of 1 in X, | Y | is the number of all the pixel points with the value of 1 in Y, | X | N.Y | is the number of the pixel points with the same position as 1 in X and Y;
arranging the loss functions in a descending order to obtain a loss function array;
selecting a loss function with a designated proportion from the array from front to back, and multiplying the selected loss function by a first numerical value;
and adding all the loss functions in the array, and dividing the sum by the number of the loss functions to obtain the average loss function value of all the liver slices of the batch of the liver data blocks.
Specifically, loss of all slices of the B × n layer is calculated, wherein X in the formula represents a binarization 0/1 prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents an actual binarization 0/1 result of the liver slice.
Sorting from top to bottom according to the loss; selecting the first 20% of the sorted arrays as the unmarked los, multiplying the unmarked los by the weight of 1.5, and keeping the rest unchanged; adding all the loss, and averaging to obtain the final loss of the iteration; and calculating the gradient of the network model according to the loss, and updating the parameters of the network model according to the gradient.
On the basis of the foregoing embodiment, step S24 specifically includes:
inputting the liver data blocks in the training set into the image segmentation model after the training, and obtaining a prediction segmentation result of each liver slice in the liver data blocks;
calculating the fraction of the liver slice according to the prediction segmentation result and the outline labeling information of the liver slice, wherein the calculation formula is as follows:
Figure BDA0002183033160000081
wherein s is the fraction of the liver slice, X represents the binarization prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents the actual binarization result of the liver slice; the | X | is the number of all the pixel points with the value of 1 in X, | Y | is the number of all the pixel points with the value of 1 in Y, | X | N.Y | is the number of the pixel points with the same position as 1 in X and Y;
calculating the fraction of the liver data block according to the fraction of the liver slice, and calculating the weight of the liver data block according to the fraction of the liver data block, wherein the calculation formula is as follows:
weight=1-score
wherein score is the score of the liver data block, and weight is the weight of the liver data block;
and updating the weight of the liver data block according to the calculation result.
Specifically, in the testing process, that is, the process of retraining once, the scores of the samples are calculated according to the prediction results obtained by inputting the prediction results into the model and the real labeling information of the samples, the samples with poor performance are found out, and the selection weight is added to the samples with poor performance. The meaning of X and Y in the formula for calculating the score of each slice is the same as that of X and Y in the formula for calculating loss described above. The average score of one sample (liver data block) is obtained from the score of each slice, the weight of the sample is 1-the score of the sample.
On the basis of the foregoing embodiment, step S21 specifically includes:
determining the starting position and the ending position of the liver slice according to the contour marking information of the liver slice;
expanding a second preset number of all-zero slices before the initial position and after the end position to obtain expanded liver slices;
sequentially and continuously selecting the slices of the first preset number from each slice to cut the expanded liver slices to obtain a plurality of liver data blocks;
wherein the first preset number is smaller than the number of liver slices in the medical slice image;
the relationship between the second preset quantity and the first preset quantity is as follows:
Figure BDA0002183033160000091
wherein n is a first preset number, and m is a second preset number.
Specifically, the specific process of preparing the training data is as follows:
(1) determining a starting position start and an ending position end of a liver slice in a set of liver CT data according to the label of the liver slice, for example, the number of the starting position start is 10, and the number of the end is 90;
(2) padding (extended) (n-1)/2 slices of all 0's above start and below end; if n is 11, 5 slices are respectively expanded above the start and below the end, and the expanded serial numbers are 5 for the start and 95 for the end;
(3) and selecting n continuous slices (n is less than the number of the slices of the liver) from each slice to cut the expanded slices, and repeatedly cutting the liver blocks to be used as training data in a manner of numbering 5-15 and 6-16 … … if the number of the slices is from start to start + n-1 and numbering.
Fig. 3 is a schematic structural diagram illustrating an apparatus for segmenting a contour of a liver image according to an embodiment of the present invention.
As shown in fig. 3, the apparatus includes: a first acquisition unit 11 and a segmentation unit 12, wherein:
the first acquiring unit 11 is configured to acquire a medical slice image, where the medical slice image includes a liver slice that includes contour labeling information;
the segmentation unit 12 is configured to input the medical slice image into an image segmentation model to obtain a liver contour segmentation result;
according to the contour segmentation device for the liver image, provided by the embodiment of the invention, the liver contour can be segmented through the pre-trained image segmentation model, and the image segmentation model is trained according to the weight of the sample, so that the segmentation accuracy of the sample with small data volume and the sample difficult to segment can be improved.
Fig. 4 is a schematic structural diagram illustrating a training apparatus for an image segmentation model according to an embodiment of the present invention.
As shown in fig. 4, the apparatus includes: a second obtaining unit 21, a first updating unit 22, a traversing unit 23, a second updating unit 24 and a training unit 25, wherein:
the second obtaining unit 21 is configured to obtain a training set of the image segmentation model, where the training set includes a plurality of liver data blocks;
the first updating unit 22 is configured to randomly extract a batch of liver data blocks according to the weight of each liver data block in the training set, input the liver data blocks into the image segmentation model, output a predicted segmentation result, and update parameters of the image segmentation model according to the predicted segmentation result and contour labeling information of liver slices in the liver data blocks;
the traversal unit 23 is configured to randomly extract another batch of liver data blocks according to the weight of each liver data block in the training set, and repeatedly execute the above steps until all liver data blocks are traversed to obtain a round of trained image segmentation model;
the second updating unit 24 is configured to test the liver data blocks in the training set according to the image segmentation model after the one round of training, and update the weights of the liver data blocks according to the test results;
the training unit 25 is configured to continue training according to a preset training number until training is finished.
On the basis of the above embodiment, the first updating unit 22 includes:
a first calculation module, configured to calculate an average loss function value of all liver slices of the batch of liver data blocks;
a second calculation module for calculating a gradient of the image segmentation model according to the average loss function value;
and the first updating module is used for updating the parameters of the image segmentation model according to the gradient.
On the basis of the above embodiment, the first calculation module includes:
a first calculation submodule, configured to calculate a loss function for each liver slice in the batch, where the calculation formula is:
Figure BDA0002183033160000111
wherein loss is a loss function of the liver slice, X represents a binarization prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents an actual binarization result of the liver slice; the | X | is the number of all the pixel points with the value of 1 in X, | Y | is the number of all the pixel points with the value of 1 in Y, | X | N.Y | is the number of the pixel points with the same position as 1 in X and Y;
the sequencing submodule is used for sequencing the loss functions from large to small to obtain a loss function array;
the second calculation submodule is used for selecting a loss function with a specified proportion from the array from front to back and multiplying the selected loss function by a first numerical value;
and the third calculation submodule is used for adding all the loss functions in the array and dividing the sum by the number of the loss functions to obtain the average loss function value of all the liver slices of the batch of the liver data blocks.
On the basis of the above embodiment, the initial weight of each liver data block in the training set is 1;
on the basis of the above embodiment, the second updating unit 24 includes:
the prediction module is used for inputting the liver data blocks in the training set into the image segmentation model after the training, and obtaining the prediction segmentation result of each liver slice in the liver data blocks;
a third calculating module, configured to calculate a score of the liver slice according to the predicted segmentation result and the contour labeling information of the liver slice, where the calculation formula is as follows:
Figure BDA0002183033160000112
wherein s is the fraction of the liver slice, X represents the binarization prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents the actual binarization result of the liver slice; the | X | is the number of all the pixel points with the value of 1 in X, | Y | is the number of all the pixel points with the value of 1 in Y, | X | N.Y | is the number of the pixel points with the same position as 1 in X and Y;
a fourth calculating module, configured to calculate a score of the liver data block according to the score of the liver slice, and calculate a weight of the liver data block according to the score of the liver data block, where the calculating formula is:
weight=1-score
wherein score is the score of the liver data block, and weight is the weight of the liver data block;
and the second updating module is used for updating the weight of the liver data block according to the calculation result.
On the basis of the foregoing embodiment, the second obtaining unit 21 is specifically configured to obtain a medical slice image for training, and cut the medical slice image according to contour labeling information of a liver slice to obtain a training set of the image segmentation model.
On the basis of the above embodiment, the second acquiring unit 21 includes:
the determining module is used for determining the starting position and the ending position of the liver slice according to the contour marking information of the liver slice;
the expansion module is used for expanding a second preset number of all-zero slices before the initial position and after the end position to obtain expanded liver slices;
the cutting module is used for continuously selecting the first preset number of slices from each slice to cut the expanded liver slices to obtain a plurality of liver data blocks;
wherein the first preset number is smaller than the number of liver slices in the medical slice image;
the relationship between the second preset quantity and the first preset quantity is as follows:
Figure BDA0002183033160000121
wherein n is a first preset number, and m is a second preset number.
The contour segmentation apparatus for liver images according to this embodiment may be used to implement the above method embodiments, and the principle and technical effect are similar, which are not described herein again.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)31, a communication Interface (communication Interface)32, a memory (memory)33 and a communication bus 34, wherein the processor 31, the communication Interface 32 and the memory 33 are communicated with each other via the communication bus 34. The processor 31 may call logic instructions in the memory 33 to perform the methods provided by the above embodiments.
In addition, the logic instructions in the memory 33 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to execute the methods provided in the foregoing embodiments.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of contour segmentation of a liver image, the method comprising:
acquiring a medical slice image, wherein the medical slice image comprises a liver slice which comprises contour labeling information;
inputting the medical slice image into an image segmentation model to obtain a liver contour segmentation result;
the image segmentation model is obtained by taking a liver data block as a sample in advance, taking contour marking information of each liver slice in the liver data block as a sample label and training according to the weight of the sample;
wherein the liver data block includes a first preset number of slices.
2. The method of contour segmentation of liver images according to claim 1, further comprising the step of training the image segmentation model:
acquiring a training set of the image segmentation model, wherein the training set comprises a plurality of liver data blocks;
randomly extracting a batch of liver data blocks according to the weight of each liver data block in the training set, inputting the liver data blocks into the image segmentation model, outputting a prediction segmentation result, and updating parameters of the image segmentation model according to the prediction segmentation result and contour labeling information of liver slices in the liver data blocks;
randomly extracting another batch of liver data blocks according to the weight of each liver data block in the training set, and repeatedly executing the steps until all liver data blocks are traversed to obtain an image segmentation model after one round of training;
testing the liver data blocks in the training set according to the image segmentation model after the training, and updating the weight of the liver data blocks according to the test result;
and continuing training according to the preset training times until the training is finished.
3. The method of claim 2, wherein the updating the parameters of the image segmentation model according to the predicted segmentation result and the contour labeling information of the liver slice in the liver data block comprises:
calculating an average loss function value of all liver slices of the batch of liver data blocks;
calculating a gradient of the image segmentation model according to the average loss function value;
and updating the parameters of the image segmentation model according to the gradient.
4. The method of contour segmentation of liver images according to claim 3, wherein the calculating the average loss function value of all liver slices of the batch of liver data blocks comprises:
calculating a loss function for each liver slice in the batch according to the following formula:
Figure FDA0002183033150000021
wherein loss is a loss function of the liver slice, X represents a binarization prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents an actual binarization result of the liver slice; the | X | is the number of all the pixel points with the value of 1 in X, | Y | is the number of all the pixel points with the value of 1 in Y, | X | N.Y | is the number of the pixel points with the same position as 1 in X and Y;
arranging the loss functions in a descending order to obtain a loss function array;
selecting a loss function with a designated proportion from the array from front to back, and multiplying the selected loss function by a first numerical value;
and adding all the loss functions in the array, and dividing the sum by the number of the loss functions to obtain the average loss function value of all the liver slices of the batch of the liver data blocks.
5. The method of contour segmentation of liver images according to claim 2, wherein the initial weight of each liver data block in the training set is 1;
the step of testing the liver data blocks in the training set according to the image segmentation model after the round of training, and the step of updating the weight of the liver data blocks according to the test result comprises the following steps:
inputting the liver data blocks in the training set into the image segmentation model after the training, and obtaining a prediction segmentation result of each liver slice in the liver data blocks;
calculating the fraction of the liver slice according to the prediction segmentation result and the outline labeling information of the liver slice, wherein the calculation formula is as follows:
Figure FDA0002183033150000022
wherein s is the fraction of the liver slice, X represents the binarization prediction result of the image segmentation model for each pixel point of the liver slice, and Y represents the actual binarization result of the liver slice; the | X | is the number of all the pixel points with the value of 1 in X, | Y | is the number of all the pixel points with the value of 1 in Y, | X | N.Y | is the number of the pixel points with the same position as 1 in X and Y;
calculating the fraction of the liver data block according to the fraction of the liver slice, and calculating the weight of the liver data block according to the fraction of the liver data block, wherein the calculation formula is as follows:
weight=1-score
wherein score is the score of the liver data block, and weight is the weight of the liver data block;
and updating the weight of the liver data block according to the calculation result.
6. The method of contour segmentation of liver images according to claim 2, wherein the obtaining of the training set of image segmentation models comprises:
and acquiring a medical slice image for training, and cutting the medical slice image according to the contour marking information of the liver slice to obtain a training set of the image segmentation model.
7. The method for contour segmentation of liver image according to claim 6, wherein the cropping the medical slice image according to the contour labeling information of the liver slice comprises:
determining the starting position and the ending position of the liver slice according to the contour marking information of the liver slice;
expanding a second preset number of all-zero slices before the initial position and after the end position to obtain expanded liver slices;
sequentially and continuously selecting the slices of the first preset number from each slice to cut the expanded liver slices to obtain a plurality of liver data blocks;
wherein the first preset number is smaller than the number of liver slices in the medical slice image;
the relationship between the second preset quantity and the first preset quantity is as follows:
Figure FDA0002183033150000031
wherein n is a first preset number, and m is a second preset number.
8. An apparatus for contour segmentation of a liver image, the apparatus comprising:
a first acquisition unit configured to acquire a medical slice image, the medical slice image including a liver slice including contour labeling information;
the segmentation unit is used for inputting the medical slice image into an image segmentation model to obtain a liver contour segmentation result;
the image segmentation model is obtained by taking a liver data block as a sample in advance, taking contour marking information of each liver slice in the liver data block as a sample label and training according to the weight of the sample;
wherein the liver data block includes a first preset number of slices.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method of contour segmentation of a liver image according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for contour segmentation of a liver image according to any one of claims 1 to 7.
CN201910803723.8A 2019-08-28 2019-08-28 Contour segmentation method and device for liver image Active CN112446893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910803723.8A CN112446893B (en) 2019-08-28 2019-08-28 Contour segmentation method and device for liver image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910803723.8A CN112446893B (en) 2019-08-28 2019-08-28 Contour segmentation method and device for liver image

Publications (2)

Publication Number Publication Date
CN112446893A true CN112446893A (en) 2021-03-05
CN112446893B CN112446893B (en) 2023-06-02

Family

ID=74741160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910803723.8A Active CN112446893B (en) 2019-08-28 2019-08-28 Contour segmentation method and device for liver image

Country Status (1)

Country Link
CN (1) CN112446893B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114445424A (en) * 2022-01-17 2022-05-06 推想医疗科技股份有限公司 Model training method and device and liver segment segmentation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180260957A1 (en) * 2017-03-08 2018-09-13 Siemens Healthcare Gmbh Automatic Liver Segmentation Using Adversarial Image-to-Image Network
CN109087318A (en) * 2018-07-26 2018-12-25 东北大学 A kind of MRI brain tumor image partition method based on optimization U-net network model
CN109360210A (en) * 2018-10-16 2019-02-19 腾讯科技(深圳)有限公司 Image partition method, device, computer equipment and storage medium
CN109741346A (en) * 2018-12-30 2019-05-10 上海联影智能医疗科技有限公司 Area-of-interest exacting method, device, equipment and storage medium
CN110148129A (en) * 2018-05-24 2019-08-20 深圳科亚医疗科技有限公司 Training method, dividing method, segmenting device and the medium of the segmentation learning network of 3D rendering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180260957A1 (en) * 2017-03-08 2018-09-13 Siemens Healthcare Gmbh Automatic Liver Segmentation Using Adversarial Image-to-Image Network
CN110148129A (en) * 2018-05-24 2019-08-20 深圳科亚医疗科技有限公司 Training method, dividing method, segmenting device and the medium of the segmentation learning network of 3D rendering
CN109087318A (en) * 2018-07-26 2018-12-25 东北大学 A kind of MRI brain tumor image partition method based on optimization U-net network model
CN109360210A (en) * 2018-10-16 2019-02-19 腾讯科技(深圳)有限公司 Image partition method, device, computer equipment and storage medium
CN109741346A (en) * 2018-12-30 2019-05-10 上海联影智能医疗科技有限公司 Area-of-interest exacting method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DONE STOJANOV等: "Topological MRI Prostate Segmentation Method", 《PROCEEDINGS OF THE 2014 FEDERATED CONFERENCE ON COMPUTER SCIENCE AND INFORMATION SYSTEMS》 *
孙明建等: "基于新型深度全卷积网络的肝脏CT影像三维区域自动分割", 《中国生物医学工程学报》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114445424A (en) * 2022-01-17 2022-05-06 推想医疗科技股份有限公司 Model training method and device and liver segment segmentation method and device

Also Published As

Publication number Publication date
CN112446893B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN107563983B (en) Image processing method and medical imaging device
CN109242844B (en) Pancreatic cancer tumor automatic identification system based on deep learning, computer equipment and storage medium
CN110232383B (en) Focus image recognition method and focus image recognition system based on deep learning model
CN105574859B (en) A kind of liver neoplasm dividing method and device based on CT images
CN111161311A (en) Visual multi-target tracking method and device based on deep learning
CN111105424A (en) Lymph node automatic delineation method and device
CN111640120B (en) Pancreas CT automatic segmentation method based on significance dense connection expansion convolution network
CN110599500B (en) Tumor region segmentation method and system of liver CT image based on cascaded full convolution network
CN109872325B (en) Full-automatic liver tumor segmentation method based on two-way three-dimensional convolutional neural network
CN112288786B (en) Electronic device and non-transitory computer-readable storage medium
CN110310287A (en) It is neural network based to jeopardize the automatic delineation method of organ, equipment and storage medium
CN110310280B (en) Image recognition method, system, equipment and storage medium for hepatobiliary duct and calculus
CN102663416A (en) Segmentation method of viscera and internal blood vessels thereof in surgical planning system
CN111179237A (en) Image segmentation method and device for liver and liver tumor
CN112308846A (en) Blood vessel segmentation method and device and electronic equipment
CN111080592B (en) Rib extraction method and device based on deep learning
CN112446893A (en) Contour segmentation method and device for liver image
CN113192069A (en) Semantic segmentation method and device for tree structure in three-dimensional tomography image
CN110211166B (en) Optic nerve dividing method and device in magnetic resonance image
CN110428431B (en) Method, device and equipment for segmenting cardiac medical image and storage medium
CN116778486A (en) Point cloud segmentation method, device, equipment and medium of angiography image
CN116883341A (en) Liver tumor CT image automatic segmentation method based on deep learning
CN110189332A (en) Prostate Magnetic Resonance Image Segmentation method and system based on weight G- Design
CN114519722A (en) Carotid artery extraction method based on convolutional neural network
Zhang et al. Ir-nas: Neural architecture search for image restoration

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210714

Address after: 102629 Room 401, 4th floor, building 1, 38 Yongda Road, Daxing biomedical industrial base, Zhongguancun Science and Technology Park, Daxing District, Beijing

Applicant after: Beijing precision diagnosis Medical Technology Co.,Ltd.

Address before: 100084 mailbox, 100084-82 Tsinghua Yuan, Beijing, Haidian District, Beijing

Applicant before: TSINGHUA University

Applicant before: BEIJING TSINGHUA CHANGGUNG Hospital

GR01 Patent grant
GR01 Patent grant