CN110232721B - Training method and device for automatic sketching model of organs at risk - Google Patents

Training method and device for automatic sketching model of organs at risk Download PDF

Info

Publication number
CN110232721B
CN110232721B CN201910410741.XA CN201910410741A CN110232721B CN 110232721 B CN110232721 B CN 110232721B CN 201910410741 A CN201910410741 A CN 201910410741A CN 110232721 B CN110232721 B CN 110232721B
Authority
CN
China
Prior art keywords
training
model
pool
image segmentation
loss function
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.)
Active
Application number
CN201910410741.XA
Other languages
Chinese (zh)
Other versions
CN110232721A (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.)
Fujian Pilot Free Trade Zone Xiamen Area Manteia Data Technology Co ltd
Original Assignee
Fujian Pilot Free Trade Zone Xiamen Area Manteia Data Technology Co ltd
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 Fujian Pilot Free Trade Zone Xiamen Area Manteia Data Technology Co ltd filed Critical Fujian Pilot Free Trade Zone Xiamen Area Manteia Data Technology Co ltd
Priority to CN201910410741.XA priority Critical patent/CN110232721B/en
Publication of CN110232721A publication Critical patent/CN110232721A/en
Application granted granted Critical
Publication of CN110232721B publication Critical patent/CN110232721B/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
    • G06T11/002D [Two Dimensional] image generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-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/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a training method and a device for an automatic sketching model of an organ at risk, wherein the method comprises the following steps: acquiring training set data; sequentially constructing a loss function pool, an image segmentation model pool and a selectable parameter pool; randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, and training the training model based on the training set data to obtain a trained training model; performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test; and selecting the corresponding trained training model with the highest DICE value as a final automatic critical organ delineation model. In the embodiment of the invention, the optimal trained organ-at-risk automatic delineation model can be quickly obtained.

Description

Training method and device for automatic sketching model of organs at risk
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method and a device for training an automatic sketching model of a jeopardy organ.
Background
In recent years, algorithm models based on deep learning achieve great progress compared with traditional models, particularly, a neural network structure such as Unet is very expected in medical images, and in the field of organ delineation at risk, a plurality of deep learning models are proposed, some of the deep learning models use a classification algorithm in a local area, some of the deep learning models comprise image preprocessing and model postprocessing, and some of the deep learning models directly use a structure based on Unet; however, the models can only achieve the accuracy similar to that of human delineation on a plurality of organs, and most delineation results still need a large amount of manual modification, so that the method does not bring great improvement to the tumor treatment process; and the existing model training cannot quickly obtain an optimized model.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a method and a device for training an automatic organ-at-risk delineation model, which can quickly obtain an optimal trained automatic organ-at-risk delineation model.
In order to solve the technical problem, an embodiment of the present invention provides a method for training an organ-at-risk automatic delineation model, where the method includes:
acquiring training set data;
sequentially constructing a loss function pool, an image segmentation model pool and a selectable parameter pool;
randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, and training the training model based on the training set data to obtain a trained training model;
performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test;
and selecting the corresponding trained training model with the highest DICE value as a final automatic critical organ delineation model.
Optionally, the training set data includes:
acquiring CT image data and RTStructure structure data marked on the CT image data by a doctor;
generating label data corresponding to the CT image data based on the CT image data and RTStructure structure data labeled on the CT image data;
and normalizing the CT image data and the label data corresponding to the CT image data to obtain normalized CT image data and label data corresponding to the normalized CT image data.
Optionally, the sequentially constructing the loss function pool, the image segmentation model pool, and the selectable parameter pool includes:
constructing a loss function pool, and acquiring the loss function pool;
constructing an image segmentation model pool, and acquiring the image segmentation model pool;
and constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and acquiring the selectable parameter pool.
Optionally, the constructing a loss function pool and obtaining the loss function pool include:
and respectively obtaining Tversely Loss, dice Loss + Focal Loss and Generalized Dice Loss Loss functions, and putting the obtained Loss functions into a Loss function pool to construct a Loss function pool to obtain the Loss function pool.
Optionally, the formula of the Tversky Loss function is as follows:
Figure GDA0002269797290000021
the formula of the Dice Loss + Focal Loss function is as follows:
Figure GDA0002269797290000022
the formula of the Generalized Dice Loss function is as follows:
Figure GDA0002269797290000023
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; gt is the result of manual marking, smooth is the avoidance denominator 0, and is set to 1; alpha and beta are preset parameters, wherein alpha + beta =1;
Figure GDA0002269797290000031
r ln for results of artificial labeling of an organ, P ln Results are predicted for the training model.
Optionally, the constructing an image segmentation model pool and obtaining the image segmentation model pool include:
sequentially acquiring six image segmentation models, namely an Unet image segmentation model, a DenseUnet image segmentation model, a ResUnet image segmentation model, a VNet image segmentation model, an Unet-translation image segmentation model and an Unet-SE image segmentation model;
and putting the six image segmentation models into an image segmentation model pool to construct a loss function pool, and obtaining the image segmentation model pool.
Optionally, the constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and obtaining the selectable parameter pool includes:
constructing a selectable parameter pool according to the loss function in the loss function pool, the image segmentation model in the image segmentation model pool and the learning rate, the activation function type, the training step number and the Se-Block type in the automatic critical organ delineation model, and acquiring the selectable parameter pool;
wherein the learning rate is 3e-4; the activation functions comprise a Relu activation function and a LeakyRelu activation function; the Relu activation function is defined as:
Figure GDA0002269797290000032
the LeakyRelu activation function is defined as
Figure GDA0002269797290000033
x represents an input value, and λ is a fixed parameter; the Se-Block type includes 3 types.
Optionally, the randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, including:
randomly selecting corresponding loss functions, image segmentation models and training parameter values based on the selectable parameter pool to construct training models, and obtaining A constructed training models;
training the training model based on the training set data to obtain a trained training model, including:
selecting an organ from the M organs in an equal probability manner;
selecting all CT image data in the organ from training data set data, selecting one piece of CT image data and label data corresponding to the CT image data in the organ according to equal probability, and adding the selected piece of CT image data and the label data into a data buffer stream;
selecting data capable of occupying GPU video memory from the data buffer stream to form batch processing, training the constructed training models until A constructed training models are all trained and converged, and keeping the A trained training models which are trained and converged in a hard disk;
wherein, during training, the adopted optimizer is an Adam optimizer, the parameter learning rate of the Adam optimizer is set to be 0.002, and the exponential decay rate beta of the first-order matrix estimation is 1 0.5, second order matrix estimated exponential decay Rate beta 2 Is 0.999.
Optionally, the performing, on the corresponding verification set, a DICE value calculation process on each trained training model to obtain a DICE value of each trained training model verification test includes:
testing each trained training model by using a predefined corresponding verification set, and calculating a tested Dice value in the testing process, wherein a calculation formula of the Dice value is as follows:
Figure GDA0002269797290000041
wherein Pred is a prediction result output by a training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator being 0 and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
In addition, the embodiment of the invention also provides a training device for the automatic sketching model of the organs at risk, which comprises:
a data acquisition module: for obtaining training set data;
a pool construction module: the system comprises a loss function pool, an image segmentation model pool and a selectable parameter pool, wherein the loss function pool, the image segmentation model pool and the selectable parameter pool are sequentially constructed;
a training module: the system comprises a selectable parameter pool, a loss function model, an image segmentation model and a training parameter value, wherein the selectable parameter pool is used for randomly selecting a corresponding loss function, image segmentation model and training parameter value to construct a training model, and training the training model based on the training set data to obtain a trained training model;
a calculation module: the DICE value calculation processing is carried out on each trained training model on the corresponding verification set, and the DICE value of each trained training model verification test is obtained;
a selecting module: and selecting the corresponding trained training model with the highest DICE value as the final automatic critical organ delineation model.
In the embodiment of the invention, a loss function pool, an image segmentation model pool and a selectable parameter pool are constructed; and selecting a corresponding loss function, an image segmentation model and a training parameter value from the selectable parameter pool to construct a training model, constructing a plurality of training models, training the training models, and calculating the trained DICE value to obtain an optimal organ-at-risk automatic delineation model, so that the optimal trained organ-at-risk automatic delineation model can be quickly obtained, the precision of subsequent automatic delineation of CT image data is greatly improved, and a doctor can quickly delineate the CT image data.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for training an organ-at-risk auto-delineation model in an embodiment of the invention;
FIG. 2 is a network architecture design of a Unet image segmentation model in an embodiment of the present invention;
FIG. 3a is a network architecture design diagram of a DenseUnet image segmentation model in an embodiment of the present invention;
FIG. 3b is a network structure design diagram of a DenseUnet image segmentation model in another embodiment of the present invention;
FIG. 4a is a network architecture design diagram of a ResUnet image segmentation model in an embodiment of the present invention;
FIG. 4b is a network architecture design diagram of a ResUnet image segmentation model in another embodiment of the present invention;
FIG. 5 is a network architecture layout of a VNet image segmentation model in an embodiment of the present invention;
FIG. 6 is a network architecture design diagram of the Unet-partition image segmentation model in an embodiment of the present invention;
FIG. 7a is a network architecture design of the Unet-SE image segmentation model in an embodiment of the present invention;
FIG. 7b is a network architecture design of the Unet-SE image segmentation model in another embodiment of the present invention;
FIG. 7c is a network architecture design of a Unet-SE image segmentation model in a further embodiment of the present invention;
FIG. 8 is a schematic structural component diagram of a training apparatus for an organ-at-risk automatic delineation model in an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Examples
Referring to fig. 1, fig. 1 is a schematic flow chart of a training method for an organ-at-risk automatic delineation model according to an embodiment of the present invention.
As shown in FIG. 1, a method for training an organ-at-risk auto-delineation model, the method comprising:
s11: acquiring training set data;
in a specific implementation process of the present invention, the training set data includes: acquiring CT image data and RTStructure structure data marked on the CT image data by a doctor; generating label data corresponding to the CT image data based on the CT image data and the RTStructure structure data marked on the CT image data; and normalizing the CT image data and the label data corresponding to the CT image data to obtain normalized CT image data and label data corresponding to the normalized CT image data.
Specifically, CT image data of a patient and RTStructure structure data labeled by a doctor are obtained firstly, and then each instance of CT image data and label data corresponding to the CT image data are generated according to the obtained CT image data and the RTStructure structure data labeled by the doctor; because the CT image data of the patient comes from different hospitals, different CT devices usually have different spacing, such as (1 mm, 3mm, 5 mm), and the sizes of the output CT image data are not consistent, in order to unify the sizes, it is necessary to perform corresponding processing on the CT image data, that is, the spacing of the CT image data and the label data corresponding to the CT image data in the X, Y direction is normalized to 1mm by a linear difference, and no processing is performed in the Z direction, so as to obtain the normalized CT image data and the label data corresponding to the normalized CT image data.
S12: sequentially constructing a loss function pool, an image segmentation model pool and a selectable parameter pool;
in the specific implementation process of the present invention, the sequentially constructing a loss function pool, an image segmentation model pool, and a selectable parameter pool includes: constructing a loss function pool, and acquiring the loss function pool; constructing an image segmentation model pool, and acquiring the image segmentation model pool; and constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and acquiring the selectable parameter pool.
Further, obtaining Tvery Loss, dice Loss + Focal Loss and Generalized die Loss functions respectively, and putting the obtained Loss functions into a Loss function pool to construct a Loss function pool, so as to obtain the Loss function pool.
Further, the formula of the Tversky Loss function is as follows:
Figure GDA0002269797290000071
the formula of the Dice Loss function + Focal Loss function is as follows:
Figure GDA0002269797290000072
the formula of the Generalized die Loss function is as follows:
Figure GDA0002269797290000073
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; gt is the result of manual marking, smooth is the avoidance denominator 0, and is set to 1; alpha and beta are preset parameters, wherein alpha + beta =1;
Figure GDA0002269797290000074
r ln for results of artificial labeling of an organ, P ln And predicting the result for the training model.
Further, the constructing an image segmentation model pool and obtaining the image segmentation model pool include:
sequentially acquiring six image segmentation models, namely a Unet image segmentation model, a DenseUnet image segmentation model, a ResUnet image segmentation model, a VNet image segmentation model, a Unet-translation image segmentation model and a Unet-SE image segmentation model; and putting the six image segmentation models into an image segmentation model pool to construct a loss function pool, and obtaining the image segmentation model pool.
Further, the constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool to obtain a selectable parameter pool includes:
constructing a selectable parameter pool according to the loss function in the loss function pool, the image segmentation model in the image segmentation model pool, the learning rate, the activation function type, the training step number and the Se-Block type in the automatic critical organ delineation model, and obtaining the selectable parameter pool;
wherein the learning rate is 3e-4; the activation functions comprise a Relu activation function and a LeakyRelu activation function; the Relu activation function is defined as:
Figure GDA0002269797290000081
the LeakyRelu activation function is defined as
Figure GDA0002269797290000082
x represents an input value, and lambda is a fixed parameter; the Se-Block type includes 3 types.
Specifically, firstly, a loss function needs to be selected to construct a loss function pool, then an image segmentation model is selected to construct an image segmentation model pool, and finally, a selectable parameter pool is constructed according to the loss function pool and the image segmentation model pool to obtain a selectable parameter pool.
Specifically, the Loss function used during training is any one of a plurality of Loss functions, including Tversky, dice, focal, and Generalized Dice Loss functions, and the Loss functions are placed in a Loss function pool to construct a Loss function pool and obtain the Loss function pool.
Wherein, the formula of the Tversesky Loss function is as follows:
Figure GDA0002269797290000083
the formula of the Dice Loss + Focal Loss function is as follows:
Figure GDA0002269797290000084
the formula of the Generalized die Loss function is as follows:
Figure GDA0002269797290000085
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; gt is the result of manual marking, smooth is the avoidance denominator 0, and is set to 1; alpha and beta are preset parameters, wherein alpha + beta =1;
Figure GDA0002269797290000086
r ln for the result of an artificial annotation to an organ, P ln And predicting the result for the training model.
Specifically, please refer to fig. 2, which is a network structure design diagram of a Unet image segmentation model according to an embodiment of the present invention; FIG. 3a is a network architecture design diagram of a DenseUnet image segmentation model in an embodiment of the present invention; FIG. 3b is a diagram of the network architecture design of the DenseUnet image segmentation model in another embodiment of the present invention; FIG. 4a is a network architecture design diagram of a ResUnet image segmentation model in an embodiment of the present invention; FIG. 4b is a network architecture design diagram of a ResUnet image segmentation model in another embodiment of the present invention; FIG. 5 is a network architecture layout of a VNet image segmentation model in an embodiment of the present invention; FIG. 6 is a network architecture design diagram of a Unet-translation image segmentation model in an embodiment of the present invention; FIG. 7a is a network architecture design of the Unet-SE image segmentation model in an embodiment of the present invention; FIG. 7b is a network architecture layout of the Unet-SE image segmentation model in another embodiment of the present invention; FIG. 7c is a network architecture design of the Unet-SE image segmentation model in a further embodiment of the present invention.
As shown in fig. 2 to fig. 7c, six image segmentation model structures of the Unet image segmentation model, the DenseUnet image segmentation model, the ResUnet image segmentation model, the VNet image segmentation model, the Unet-division image segmentation model, and the Unet-SE image segmentation model are put into the image segmentation model pool to construct a loss function pool, and the image segmentation model pool is obtained.
Specifically, when a parameter pool required during model training is constructed, the parameter pool needs to include a loss function, an image segmentation model in the image segmentation model pool, and a learning rate, an activation function type, a training step number and a Se-Block type in an automatic critical organ delineation model, and after corresponding data are obtained, a selectable parameter pool is constructed to obtain a selectable parameter pool; wherein the learning rate is 3e-4; the activation functions comprise a Relu activation function and a LeakyRelu activation function; the Relu activation function is defined as:
Figure GDA0002269797290000091
the LeakyRelu activation function is defined as
Figure GDA0002269797290000092
x represents an input value, and λ is a fixed parameter; the Se-Block type includes 3 types.
Specifically, λ is generally set to 0.2, and may be specifically selected according to the implementation, where the Se-Block type includes 3 types, specifically referring to fig. 7a, 7b, and 7 c.
S13: randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, and training the training model based on the training set data to obtain a trained training model;
in a specific implementation process of the present invention, the randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model includes: and randomly selecting corresponding loss functions, image segmentation models and training parameter values based on the selectable parameter pool to construct training models, and obtaining A constructed training models.
Training the training model based on the training set data to obtain a trained training model, including: selecting an organ from the M organs in an equal probability manner; selecting all CT image data in the organ from training data set data, selecting one piece of CT image data and label data corresponding to the CT image data in the organ according to equal probability, and adding the selected piece of CT image data and the label data into a data buffer stream; selecting data capable of occupying GPU video memory from the data buffer stream to form batch processing, training the constructed training models until A constructed training models are all trained and converged, and keeping the A trained training models which are trained and converged in a hard disk; wherein, during training, the adopted optimizer is an Adam optimizer, the parameter learning rate of the Adam optimizer is set to be 0.002, and the exponential decay rate beta of the first-order matrix estimation is 1 0.5, second order matrix estimated exponential decay Rate beta 2 Is 0.999.
Specifically, a number a of training models are constructed by randomly selecting corresponding loss functions, image segmentation models and training parameter values in the parameter pool in the above steps.
Then, selecting an organ from M organs in an equal probability mode, then selecting all CT image data in the organ from training data set data, selecting one CT image data and label data corresponding to the CT image data in all CT image data in the organ in an equal probability mode, and adding the selected CT image data and the label data into a data buffer stream; selecting data capable of occupying GPU video memory from the data buffer stream to form batch processing, training the constructed training models until A constructed training models are all trained and converged, and keeping the A trained training models with the training convergence into a hard disk; wherein, during training, the adopted optimizer is an Adam optimizer, the parameter learning rate of the Adam optimizer is set to be 0.002, and the exponential decay rate beta of the first-order matrix estimation is 1 0.5, second order matrix estimated exponential decay Rate beta 2 Is 0.999.
S14: performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test;
in a specific implementation process of the present invention, the performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test includes: testing each trained training model by using a predefined corresponding verification set, and calculating a tested Dice value in the testing process, wherein a calculation formula of the Dice value is as follows:
Figure GDA0002269797290000101
wherein Pred is a prediction result output by a training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator to be 0, and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
Specifically, each trained training model is subjected to DICE value calculation processing by using a corresponding verification set, and a DICE value of each trained training model verification test is obtained, wherein a calculation formula of the DICE value is as follows:
Figure GDA0002269797290000111
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator being 0 and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
S15: and selecting the corresponding trained training model with the highest DICE value as a final automatic critical organ delineation model.
In the specific implementation process of the invention, after the DICE values are calculated and obtained, the DICE values are sequentially or reversely ordered, and then the trained training model with the highest DICE value is selected as the final automatic critical organ delineation model.
In the embodiment of the invention, a loss function pool, an image segmentation model pool and a selectable parameter pool are constructed; and selecting a corresponding loss function, an image segmentation model and a training parameter value from the selectable parameter pool to construct a training model, constructing a plurality of training models, training the training models, and calculating the trained DICE value to obtain an optimal organ-at-risk automatic delineation model, so that the optimal trained organ-at-risk automatic delineation model can be quickly obtained, the precision of subsequent automatic delineation of CT image data is greatly improved, and a doctor can quickly delineate the CT image data.
Examples
Referring to fig. 8, fig. 8 is a schematic structural component diagram of a training device for an organ-at-risk automatic delineation model according to an embodiment of the present invention.
As shown in fig. 8, a training apparatus for an organ-at-risk automatic delineation model, the apparatus comprising:
the data acquisition module 11: for acquiring training set data;
in a specific implementation process of the present invention, the training set data includes: acquiring CT image data and RTStructure structure data marked on the CT image data by a doctor; generating label data corresponding to the CT image data based on the CT image data and the RTStructure structure data marked on the CT image data; and normalizing the CT image data and the label data corresponding to the CT image data to obtain the normalized CT image data and the label data corresponding to the normalized CT image data.
Specifically, CT image data of a patient and RTStructure structure data labeled by a doctor are obtained firstly, and then each instance of CT image data and label data corresponding to the CT image data are generated according to the obtained CT image data and the RTStructure structure data labeled by the doctor; because the CT image data of the patient comes from different hospitals, different CT devices usually have different spacing, such as (1 mm, 3mm, 5 mm), and the sizes of the output CT image data are not consistent, in order to unify the sizes, it is necessary to perform corresponding processing on the CT image data, that is, the spacing of the CT image data and the label data corresponding to the CT image data in the X, Y direction is normalized to 1mm by a linear difference, and no processing is performed in the Z direction, so as to obtain the normalized CT image data and the label data corresponding to the normalized CT image data.
The pool building module 12: the system comprises a loss function pool, an image segmentation model pool and a selectable parameter pool, wherein the loss function pool, the image segmentation model pool and the selectable parameter pool are sequentially constructed;
in the specific implementation process of the present invention, the sequentially constructing a loss function pool, an image segmentation model pool, and a selectable parameter pool includes: constructing a loss function pool, and acquiring the loss function pool; constructing an image segmentation model pool, and acquiring the image segmentation model pool; and constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and acquiring the selectable parameter pool.
Further, obtaining Tvery Loss, dice Loss + Focal Loss and Generalized die Loss functions respectively, and putting the obtained Loss functions into a Loss function pool to construct a Loss function pool, so as to obtain the Loss function pool.
Further, the formula of the Tversky Loss function is as follows:
Figure GDA0002269797290000121
the formula of the Dice Loss function + Focal Loss function is as follows:
Figure GDA0002269797290000122
the formula of the Generalized Dice Loss function is as follows:
Figure GDA0002269797290000123
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; gt is a result of manual marking, and smooth is 0 for avoiding denominator and is set to be 1; alpha and beta are preset parameters, wherein alpha + beta =1;
Figure GDA0002269797290000131
r ln for results of artificial labeling of an organ, P ln And predicting the result for the training model.
Further, the constructing an image segmentation model pool and obtaining the image segmentation model pool include:
sequentially acquiring six image segmentation models, namely a Unet image segmentation model, a DenseUnet image segmentation model, a ResUnet image segmentation model, a VNet image segmentation model, a Unet-translation image segmentation model and a Unet-SE image segmentation model; and putting the six image segmentation models into an image segmentation model pool to construct a loss function pool, and obtaining the image segmentation model pool.
Further, the constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and acquiring the selectable parameter pool includes:
constructing a selectable parameter pool according to the loss function in the loss function pool, the image segmentation model in the image segmentation model pool, the learning rate, the activation function type, the training step number and the Se-Block type in the automatic critical organ delineation model, and obtaining the selectable parameter pool;
wherein the learning rate is 3e-4; the activation functions comprise a Relu activation function and a LeakyRelu activation function; the Relu activation function is defined as:
Figure GDA0002269797290000132
the LeakyRelu activation function is defined as
Figure GDA0002269797290000133
x represents an input value, and λ is a fixed parameter; the Se-Block type includes 3 types.
Specifically, firstly, a loss function needs to be selected to construct a loss function pool, then an image segmentation model is selected to construct an image segmentation model pool, and finally, a selectable parameter pool is constructed according to the loss function pool and the image segmentation model pool to obtain a selectable parameter pool.
Specifically, the Loss function used during training is any one of a plurality of Loss functions, including Tversky, dice, focal, and Generalized Dice Loss functions, and the Loss functions are placed in a Loss function pool to construct a Loss function pool and obtain the Loss function pool.
Wherein, the formula of the Tversesky Loss function is as follows:
Figure GDA0002269797290000134
the formula of the Dice Loss + Focal Loss function is as follows:
Figure GDA0002269797290000135
Figure GDA0002269797290000141
the formula of the Generalized die Loss function is as follows:
Figure GDA0002269797290000142
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; gt is the result of manual marking, smooth is the avoidance denominator 0, and is set to 1; alpha and beta are preset parameters, wherein alpha + beta =1;
Figure GDA0002269797290000143
r ln for the result of an artificial annotation to an organ, P ln And predicting the result for the training model.
Specifically, please refer to fig. 2, which is a network structure design diagram of a Unet image segmentation model according to an embodiment of the present invention; FIG. 3a is a network architecture design diagram of a DenseUnet image segmentation model in an embodiment of the present invention; FIG. 3b is a network structure design diagram of a DenseUnet image segmentation model in another embodiment of the present invention; FIG. 4a is a network architecture design diagram of a ResUnet image segmentation model in an embodiment of the present invention; FIG. 4b is a network architecture design diagram of a ResUnet image segmentation model in another embodiment of the present invention; FIG. 5 is a network architecture layout of a VNet image segmentation model in an embodiment of the present invention; FIG. 6 is a network architecture design diagram of the Unet-partition image segmentation model in an embodiment of the present invention; FIG. 7a is a network architecture layout of the Unet-SE image segmentation model in an embodiment of the present invention; FIG. 7b is a network architecture layout of the Unet-SE image segmentation model in another embodiment of the present invention; FIG. 7c is a network architecture design of the Unet-SE image segmentation model in a further embodiment of the present invention.
As shown in fig. 2 to 7c, six image segmentation model structures of the Unet image segmentation model, the DenseUnet image segmentation model, the ResUnet image segmentation model, the VNet image segmentation model, the Unet-displacement image segmentation model, and the Unet-SE image segmentation model are put into the image segmentation model pool to construct a loss function pool, and the image segmentation model pool is obtained.
Specifically, when a parameter pool required during model training is constructed, the parameter pool needs to include a loss function, an image segmentation model in the image segmentation model pool, and a learning rate, an activation function type, a training step number and a Se-Block type in an automatic critical organ delineation model, and after corresponding data are obtained, a selectable parameter pool is constructed to obtain a selectable parameter pool; wherein the learning rate is 3e-4; the activation functions comprise a Relu activation function and a LeakyRelu activation function; the Relu activation function is defined as:
Figure GDA0002269797290000144
the LeakyRelu activation function is defined as
Figure GDA0002269797290000145
x represents an input value, and lambda is a fixed parameter; the Se-Block type includes 3 types.
Specifically, λ is generally set to 0.2, which can be specifically selected according to the implementation, where the Se-Block type includes 3 types, which can be specifically referred to as three structure types in fig. 7a, 7b, and 7 c.
The training module 13: the system is used for randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, and training the training model based on the training set data to obtain a trained training model;
in a specific implementation process of the present invention, the randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model includes: and randomly selecting corresponding loss functions, image segmentation models and training parameter values based on the selectable parameter pool to construct training models, and obtaining A constructed training models.
Training the training model based on the training set data to obtain a trained training model, including: selecting an organ from the M organs in an equal probability manner; selecting all CT image data in the organ from training data set data, selecting one piece of CT image data and label data corresponding to the CT image data in all the CT image data in the organ with equal probability, and adding the CT image data and the label data into a data buffer stream; selecting data capable of occupying GPU video memory from the data buffer stream to form batch processing, training the constructed training models until A constructed training models are all trained and converged, and keeping the A trained training models with the training converged in a hard disk; wherein, during training, the adopted optimizer is an Adam optimizer, the parameter learning rate of the Adam optimizer is set to be 0.002, and the exponential decay rate beta of the first-order matrix estimation is 1 0.5, second order matrix estimated exponential decay Rate beta 2 Was 0.999.
Specifically, a number a of training models are constructed by randomly selecting corresponding loss functions, image segmentation models and training parameter values in the parameter pool in the above steps.
Then, selecting an organ from M organs in an equal probability mode, then selecting all CT image data in the organ from training data set data, selecting one CT image data and label data corresponding to the CT image data in all CT image data in the organ in an equal probability mode, and adding the selected CT image data and the label data into a data buffer stream; selecting data capable of occupying GPU video memory from the data buffer stream to form batch processing, training the constructed training models until A constructed training models are all trained and converged, and keeping the A trained training models with the training converged in a hard disk; wherein, during training, the adopted optimizer is an Adam optimizer, the parameter learning rate of the Adam optimizer is set to be 0.002, and the exponential decay rate beta of the first-order matrix estimation is 1 0.5, second order matrix estimated exponential decay Rate beta 2 Was 0.999.
The calculation module 14: the DICE value calculation processing is carried out on each trained training model on the corresponding verification set, and the DICE value of each trained training model verification test is obtained;
in a specific implementation process of the present invention, the performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test includes: testing each trained training model by using a predefined corresponding verification set, and calculating a tested Dice value in the testing process, wherein a calculation formula of the Dice value is as follows:
Figure GDA0002269797290000161
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator being 0 and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
Specifically, each trained training model is subjected to DICE value calculation processing by using a corresponding verification set, and a DICE value of each trained training model verification test is obtained, wherein a calculation formula of the DICE value is as follows:
Figure GDA0002269797290000162
wherein Pred is a prediction result output by a training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator to be 0, and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
A selecting module 15: and selecting the corresponding trained training model with the highest DICE value as the final automatic critical organ delineation model.
In the specific implementation process of the invention, after the DICE values are calculated and obtained, the DICE values are sequentially or reversely ordered, and then the trained training model with the highest DICE value is selected as the final automatic critical organ delineation model.
In the embodiment of the invention, a loss function pool, an image segmentation model pool and a selectable parameter pool are constructed; and selecting corresponding loss functions, image segmentation models and training parameter values in the selectable parameter pool to construct training models, constructing a plurality of training models, training the training models, and calculating the trained DICE values to obtain the optimal automatic critical organ delineation model, so that the optimal trained automatic critical organ delineation model can be rapidly obtained, the precision of subsequent automatic delineation of CT image data is greatly improved, and a doctor is facilitated to rapidly delineate the CT image data.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, or the like.
In addition, the detailed description is given above on the training method and device for the automatic critical organ delineation model provided by the embodiment of the present invention, and a specific embodiment should be adopted herein to explain the principle and the implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method of training an organ-at-risk auto-delineation model, the method comprising:
acquiring training set data;
sequentially constructing a loss function pool, an image segmentation model pool and a selectable parameter pool;
randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, and training the training model based on the training set data to obtain a trained training model;
performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test;
selecting a corresponding trained training model with the highest DICE value as a final automatic critical organ delineation model;
performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test, including:
testing each trained training model by using a predefined corresponding verification set, and calculating a tested Dice value in the testing process, wherein a calculation formula of the Dice value is as follows:
Figure FDA0003993844130000011
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator being 0 and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
2. The method of claim 1, wherein the training set data comprises:
acquiring CT image data and RTStructure structure data marked on the CT image data by a doctor;
generating label data corresponding to the CT image data based on the CT image data and RTStructure structure data labeled on the CT image data;
and normalizing the CT image data and the label data corresponding to the CT image data to obtain the normalized CT image data and the label data corresponding to the normalized CT image data.
3. The method for training the automatic critical organ delineation model according to claim 1, wherein the sequentially constructing the loss function pool, the image segmentation model pool and the selectable parameter pool comprises:
constructing a loss function pool, and acquiring the loss function pool;
constructing an image segmentation model pool, and acquiring the image segmentation model pool;
and constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and acquiring the selectable parameter pool.
4. The method for training an organ-at-risk automatic delineation model according to claim 3, wherein the constructing and obtaining a loss function pool comprises:
and respectively acquiring Tversely Loss, dice Loss + Focal Loss and Generalized Dice Loss Loss functions, and putting the acquired Loss functions into a Loss function pool to construct a Loss function pool to acquire the Loss function pool.
5. The method for training an organ-at-risk auto-delineation model of claim 4, wherein the formula of the Tverseky Loss function is as follows:
Figure FDA0003993844130000021
the formula of the Dice Loss function + focallloss is as follows:
Figure FDA0003993844130000022
the formula of the Generalized Dice Loss function is as follows:
Figure FDA0003993844130000023
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; gt is a result of manual marking, and smooth is 0 for avoiding denominator and is set to be 1; alpha and beta are preset parameters, wherein alpha + beta =1;
Figure FDA0003993844130000024
r ln for results of artificial labeling of an organ, P ln And predicting the result for the training model.
6. The method for training an organ-at-risk automatic delineation model according to claim 3, wherein the constructing and obtaining the image segmentation model pool comprises:
sequentially acquiring six image segmentation models, namely a Unet image segmentation model, a DenseUnet image segmentation model, a ResUnet image segmentation model, a VNet image segmentation model, a Unet-translation image segmentation model and a Unet-SE image segmentation model;
and putting the six image segmentation models into an image segmentation model pool to construct a loss function pool, and obtaining the image segmentation model pool.
7. The method for training an organ-at-risk automatic delineation model according to claim 3, wherein the constructing a selectable parameter pool according to the loss function pool and the image segmentation model pool, and obtaining the selectable parameter pool comprises:
constructing a selectable parameter pool according to the loss function in the loss function pool, the image segmentation model in the image segmentation model pool, the learning rate, the activation function type, the training step number and the Se-Block type in the automatic critical organ delineation model, and obtaining the selectable parameter pool;
wherein the learning rate is 3e-4; the activation functions comprise a Relu activation function and a LeakyRelu activation function; the Relu activation function is defined as: y = max (0,x); the LeakyRelu activation function is defined as y = max (λ x, x), x representing an input value, λ being a fixed parameter; the Se-Block type includes 3 types.
8. The method for training an organ-at-risk automatic delineation model according to claim 1, wherein the randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model comprises:
randomly selecting corresponding loss functions, image segmentation models and training parameter values based on the selectable parameter pool to construct training models, and obtaining A constructed training models;
training the training model based on the training set data to obtain a trained training model, including:
selecting an organ from the M organs in an equal probability manner;
selecting all CT image data in the organ from training data set data, selecting one piece of CT image data and label data corresponding to the CT image data in the organ according to equal probability, and adding the selected piece of CT image data and the label data into a data buffer stream;
selecting data capable of occupying GPU video memory from the data buffer stream to form batch processing, training the constructed training models until A constructed training models are all trained and converged, and keeping the A trained training models with the training converged in a hard disk;
wherein, during training, the adopted optimizer is an Adam optimizer, the parameter learning rate of the Adam optimizer is set to be 0.002, and the exponential decay rate beta of the first-order matrix estimation is 1 0.5, second order matrix estimated exponential decay Rate beta 2 Was 0.999.
9. A training device for automated organ-at-risk delineation modeling, the device comprising:
a data acquisition module: for acquiring training set data;
a pool construction module: the system comprises a loss function pool, an image segmentation model pool and a selectable parameter pool, wherein the loss function pool, the image segmentation model pool and the selectable parameter pool are sequentially constructed;
a training module: the system is used for randomly selecting a corresponding loss function, an image segmentation model and a training parameter value based on the selectable parameter pool to construct a training model, and training the training model based on the training set data to obtain a trained training model;
a calculation module: the DICE value calculation processing is carried out on each trained training model on the corresponding verification set, and the DICE value of each trained training model verification test is obtained;
a selecting module: the method is used for selecting a corresponding trained training model with the highest DICE value as a final endangered organ automatic delineation model;
performing DICE value calculation processing on each trained training model on the corresponding verification set to obtain a DICE value of each trained training model verification test, including:
testing each trained training model by using a predefined corresponding verification set, and calculating a tested Dice value in the testing process, wherein a calculation formula of the Dice value is as follows:
Figure FDA0003993844130000041
wherein Pred is a prediction result output by the training model of label data corresponding to the CT image data of each organ; smooth is to avoid the denominator being 0 and is set to be 1; gt is the result of manual labeling; n is the number of patients; m is the number of organs.
CN201910410741.XA 2019-05-16 2019-05-16 Training method and device for automatic sketching model of organs at risk Active CN110232721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910410741.XA CN110232721B (en) 2019-05-16 2019-05-16 Training method and device for automatic sketching model of organs at risk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910410741.XA CN110232721B (en) 2019-05-16 2019-05-16 Training method and device for automatic sketching model of organs at risk

Publications (2)

Publication Number Publication Date
CN110232721A CN110232721A (en) 2019-09-13
CN110232721B true CN110232721B (en) 2023-04-07

Family

ID=67860716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910410741.XA Active CN110232721B (en) 2019-05-16 2019-05-16 Training method and device for automatic sketching model of organs at risk

Country Status (1)

Country Link
CN (1) CN110232721B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686278B (en) * 2019-10-18 2023-10-20 杭州海康威视数字技术股份有限公司 Model acquisition method, device and storage medium
CN111402268B (en) * 2020-03-16 2023-05-23 苏州科技大学 Liver in medical image and focus segmentation method thereof
CN112991360A (en) * 2021-03-01 2021-06-18 北京邮电大学 Pre-cervical cancer pathological histology segmentation optimization method
CN113159147B (en) * 2021-04-08 2023-09-26 平安科技(深圳)有限公司 Image recognition method and device based on neural network and electronic equipment
CN115409739B (en) * 2022-10-31 2023-01-24 中山大学肿瘤防治中心(中山大学附属肿瘤医院、中山大学肿瘤研究所) Method and system for automatically sketching organs at risk

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109034365A (en) * 2018-07-06 2018-12-18 电子科技大学 The training method and device of deep learning model
CN109146899A (en) * 2018-08-28 2019-01-04 众安信息技术服务有限公司 CT image jeopardizes organ segmentation method and device
CN109635642A (en) * 2018-11-01 2019-04-16 浙江科技学院 A kind of road scene dividing method based on residual error network and expansion convolution
CN109636806B (en) * 2018-11-22 2022-12-27 浙江大学山东工业技术研究院 Three-dimensional nuclear magnetic resonance pancreas image segmentation method based on multi-step learning
CN109727235B (en) * 2018-12-26 2021-05-11 苏州雷泰医疗科技有限公司 Organ automatic delineation algorithm based on deep learning
CN109671022B (en) * 2019-01-22 2022-11-18 北京理工大学 Image texture super-resolution enhancement method based on depth feature translation network

Also Published As

Publication number Publication date
CN110232721A (en) 2019-09-13

Similar Documents

Publication Publication Date Title
CN110232721B (en) Training method and device for automatic sketching model of organs at risk
CN110232383B (en) Focus image recognition method and focus image recognition system based on deep learning model
WO2021115084A1 (en) Structural magnetic resonance image-based brain age deep learning prediction system
US20210264271A1 (en) Adaptable neural network
US11887300B2 (en) Method and apparatus for classifying a brain anomaly based on a 3D MRI image
US11069033B2 (en) Neural network evolution using expedited genetic algorithm for medical image denoising
CN107730507A (en) A kind of lesion region automatic division method based on deep learning
CN110110723B (en) Method and device for automatically extracting target area in image
CN112101162B (en) Image recognition model generation method and device, storage medium and electronic equipment
CN111881926A (en) Image generation method, image generation model training method, image generation device, image generation equipment and image generation medium
CN108542390A (en) Vascular plaque ingredient recognition methods based on more contrast nuclear magnetic resonance images
CN111161314B (en) Target object position area determination method and device, electronic equipment and storage medium
EP3973508A1 (en) Sampling latent variables to generate multiple segmentations of an image
WO2024032098A1 (en) Training method and apparatus for artifact removal model, and device, medium and program product
CN111738975B (en) Image identification method and image identification device
CN116524299A (en) Image sample generation method, device, equipment and storage medium
CN111563439B (en) Aquatic organism disease detection method, device and equipment
KR102274072B1 (en) Method and apparatus for determining a degree of dementia of a user
CN111667474A (en) Fracture identification method, apparatus, device and computer readable storage medium
CN111915626A (en) Automatic segmentation method and device for ventricle area of heart ultrasonic image and storage medium
CN115239508A (en) Scene planning adjustment method, device, equipment and medium based on artificial intelligence
CN112785575B (en) Image processing method, device and storage medium
Mansour et al. Kidney segmentations using cnn models
CN117252847A (en) Method and device for detecting and identifying defects of maxillary anterior alveolar bone
JP7315181B2 (en) Search method and information processing system

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
GR01 Patent grant
GR01 Patent grant