A training method, device, equipment and storage medium for a lesion segmentation model

By using a combination training method with different loss functions in the lesion segmentation model, the problem of poor segmentation effect of small-size lesions is solved, which significantly improves the lesion detection rate and realizes effective segmentation of lesions of different sizes.

CN118628871BActive Publication Date: 2024-11-01HYGEA MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411112070.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-11-01
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

During the training of the lesion segmentation model, it is difficult to obtain sufficient quantity and quality data, which leads to challenges in the lesion detection rate of the model, especially the poor segmentation effect of small-sized lesions.

Method used

Two neural network models are used, and different loss functions are used for training. The first lesion segmentation model uses the first loss function, the second lesion segmentation model uses the first loss function in the first few rounds, and the second loss function is used for the subsequent round. To improve the segmentation accuracy of small-sized lesions.

Benefits of technology

The detection rate of small-sized lesions is significantly improved. Models trained through different training methods can more effectively deal with different size lesions, improving the segmentation performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628871B_ABST
    Figure CN118628871B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a training method, device, equipment and storage medium for a lesion segmentation model, a training method for a lesion segmentation model, comprising: reading and preprocessing a data set; training a first lesion segmentation model and a second lesion segmentation model based on the results of the reading and preprocessing, a first loss function and a second loss function; wherein the first lesion segmentation model and the second lesion segmentation model are both neural network models, the first lesion segmentation model is trained using a first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and the other rounds of training of the second lesion segmentation model use a second loss function, so that the size of the lesion segmented by the trained second lesion segmentation model is smaller than the size of the lesion segmented by the trained first lesion segmentation model. The two neural network models are trained by different training methods, and are used to solve the segmentation problem of lesions of different sizes in organs, respectively, which significantly improves the detection rate of small-sized lesions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a training method, device, equipment and storage medium for a lesion segmentation model. Background Art

[0002] With the rapid development of artificial intelligence (AI) technology, AI plays an increasingly important role in automatic lesion detection, greatly reducing the burden on doctors. However, the diversity of lesion locations and the complexity of morphology pose challenges to the training of AI models. To achieve satisfactory results, large-scale data support is required. However, obtaining sufficient and high-quality data is a difficult task, which makes the lesion segmentation model training process more difficult and time-consuming. How to achieve model training to improve the lesion detection rate of the model is crucial. Summary of the invention

[0003] The present invention provides a training method, device, equipment and storage medium for a lesion segmentation model to improve

[0004] The detection rate of the model in lesion segmentation.

[0005] In a first aspect, the present disclosure provides a method for training a lesion segmentation model, comprising:

[0006] Reading and preprocessing a data set, wherein the data set includes CT data, and the CT data includes a CT image and a corresponding annotated image;

[0007] Based on the results of reading and preprocessing, the first loss function and the second loss function, training a first lesion segmentation model and a second lesion segmentation model;

[0008] Among them, the first lesion segmentation model and the second lesion segmentation model are both neural network models, the first lesion segmentation model is trained using a first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and other rounds of training of the second lesion segmentation model use a second loss function, so that the lesion size segmented by the trained second lesion segmentation model is smaller than the lesion size segmented by the trained first lesion segmentation model.

[0009] In some embodiments, the second loss function is expressed as follows:

[0010]

[0011] in, Indicates i The loss weight of each lesion, The value is based on iThe number of pixels occupied by each lesion is determined by i The fewer pixels a lesion occupies, The larger the value of; Indicates i The cross entropy loss of each lesion; Indicates i Tversky loss of lesions; a 0 and b 0 respectively indicates and The coefficient of Indicates the loss of incorrectly detected lesions. The more incorrectly detected lesions are, The larger the value.

[0012] In some embodiments, the first i The loss weight of each lesion is:

[0013]

[0014] in, a 1 and b 1 indicates adjustable parameters. a 1 and b 1 can control the i The loss weight of each lesion; Indicates i The number of pixels occupied by a lesion, Indicates the number of pixels occupied by all lesions.

[0015] In some embodiments, the incorrectly detected lesion loss is determined by the following calculation:

[0016]

[0017] in, a and b All represent adjustable parameters. a and b Ability to control the size of the penalty for incorrectly detected lesions; num neg Indicates the number of lesions that were not correctly detected.

[0018] In some embodiments, the number of incorrectly detected lesions is obtained according to the following method: at the end of each training of the second lesion segmentation model, the Dice index value of each lesion in the annotated image of the data set and each lesion in the predicted annotated image is calculated, and the number of incorrectly detected lesions is obtained based on the calculated Dice index value.

[0019] In some embodiments, the number of incorrectly detected lesions is obtained as follows:

[0020] At the end of each training of the second lesion segmentation model, lesions are extracted one by one from the annotated images of the data set, Dice index values ​​are calculated for the extracted lesions and the lesions in the predicted annotated images, and the calculated Dice index values ​​are recorded in a first list, where the rows of the first list represent the lesions in the annotated images of the data set, and the columns of the first list represent the lesions in the predicted annotated images;

[0021] Sort each column of the first list according to the value of the Dice index;

[0022] Determine for each column of the first list whether the maximum Dice index value is not less than the first value;

[0023] If yes, the lesion corresponding to the Dice index value is correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected remains unchanged;

[0024] Otherwise, the lesion is not correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected is increased by one;

[0025] The final value of the number of incorrectly detected lesions is obtained by counting.

[0026] In some embodiments, the reading and preprocessing of the data set comprises:

[0027] Disrupting the order of each CT data in the data set and reading each CT data after the order is disrupted;

[0028] Performing dilation operation on the CT image in each CT data read corresponding to the lesion annotation in the annotation image;

[0029] Convert the orientation of each CT image and its annotated image into the RAI orientation;

[0030] For each CT image, adjust the window width and window position;

[0031] Perform pixel normalization on each CT image;

[0032] Each CT image and the corresponding annotated image are three-dimensionally cropped according to the region of interest;

[0033] Scale the X-axis and Y-axis of the cropped CT image and the corresponding annotated image;

[0034] Each CT image and the corresponding annotated image are sliced ​​to obtain a set of slice images;

[0035] All the groups of slice images corresponding to each CT data are disrupted to obtain the reading and preprocessing results.

[0036] In some embodiments, the first lesion segmentation model and the second lesion segmentation model are trained based on the results of reading and preprocessing, the first loss function and the second loss function, and the training process is as follows:

[0037] Extract image data in batches from the results of reading and preprocessing to perform online data augmentation processing;

[0038] Training the first lesion segmentation model or the second lesion segmentation model based on the image data after online data enhancement, and calculating the loss function value each time in the current round;

[0039] Calculate the current average loss function value;

[0040] Calculate the magnitude of the loss function value of each time in the current round and the current average loss function value: if the loss function value of each time in the current round is ≥ the current average loss function value, store the current batch of image data in the second list;

[0041] After the current round of image data training is completed, the image data in the second list is read for supplementary training. If the loss function value corresponding to any batch of image data in the second list is ≥ the current average loss function value, the batch of image data is stored in the third list;

[0042] After each round of training, the content in the second list is updated to the content in the third list;

[0043] Determine whether the current average loss function value is greater than a preset threshold: if so, continue with the next round of training; otherwise, end the training and save the first lesion segmentation model or the second lesion segmentation model when the average loss function value is the smallest.

[0044] In some embodiments, before reading and preprocessing the data set, the method further includes: performing offline data enhancement on the CT data in the data set to amplify the CT data in the data set.

[0045] In a second aspect, the present disclosure provides a lesion segmentation method, comprising:

[0046] Acquire CT images;

[0047] Slice the CT image to obtain a set of slice images;

[0048] This group of slice images is sequentially placed into the first lesion segmentation model and the second lesion segmentation model for calculation to obtain the segmentation results of the first lesion segmentation model and the second lesion segmentation model, wherein the first lesion segmentation model and the second lesion segmentation model are trained based on the training method of the lesion segmentation model described in the first aspect.

[0049] In some embodiments, the lesion segmentation method further includes: obtaining a union or intersection of a segmentation result of the first lesion segmentation model and a segmentation result of the second lesion segmentation model.

[0050] In a third aspect, the present disclosure provides a training device for a lesion segmentation model, comprising:

[0051] A data processing module, used for reading and preprocessing a data set, wherein the data set includes CT data, and the CT data includes a CT image and a corresponding annotated image;

[0052] A model training module is used to train a first lesion segmentation model and a second lesion segmentation model based on the results of reading and preprocessing, a first loss function and a second loss function; wherein, the first lesion segmentation model and the second lesion segmentation model are both neural network models, the first lesion segmentation model is trained using a first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and other rounds of training of the second lesion segmentation model use a second loss function, so that the size of the lesion segmented by the trained second lesion segmentation model is smaller than the size of the lesion segmented by the trained first lesion segmentation model.

[0053] In a fourth aspect, the present disclosure provides a lesion segmentation device, comprising:

[0054] An image acquisition module, used for acquiring CT images;

[0055] An image slicing module is used to slice the CT image to obtain a set of slice images;

[0056] A lesion segmentation module is used to sequentially place the group of slice images into a first lesion segmentation model and a second lesion segmentation model for calculation to obtain a segmentation result of the first lesion segmentation model and a segmentation result of the second lesion segmentation model, wherein the first lesion segmentation model and the second lesion segmentation model are trained by a training device for the lesion segmentation model described in the third aspect.

[0057] In a fifth aspect, the present disclosure provides a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the first aspect or the second aspect.

[0058] In a sixth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect or the second aspect.

[0059] In a seventh aspect, the present disclosure provides a computer program product, comprising a computer program / instructions, which, when executed by a processor, implements the steps of the method described in the first aspect or the second aspect.

[0060] The present disclosure provides a training method, apparatus, device and storage medium for a lesion segmentation model. The first lesion segmentation model is trained by using a first loss function, the first preset round of the second lesion segmentation model is trained by using the first loss function, and the other rounds of the second lesion segmentation model are trained by using a second loss function, so that the second lesion segmentation model pays more attention to and is more suitable for the segmentation of small-sized lesions. Two neural network models are trained by different training methods to solve the segmentation problem of lesions of different sizes in organs, respectively, thereby significantly improving the detection rate of small-sized lesions. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The present disclosure will be described in more detail below based on embodiments and with reference to the accompanying drawings:

[0062] Figure 1 A flowchart of a method for training a lesion segmentation model provided in an embodiment of the present disclosure.

[0063] Figure 2 The embodiment of the present disclosure provides i Schematic diagram of the curve of the loss weight of each lesion.

[0064] Figure 3 A schematic diagram of a curve showing the loss value of the number of incorrectly detected lesions provided in an embodiment of the present disclosure.

[0065] Figure 4 A flowchart of a lesion segmentation method provided in an embodiment of the present disclosure.

[0066] In the drawings, the same reference numerals are used for the same components, and the drawings are not drawn to scale. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, and to fully understand and implement how the present disclosure applies technical means to solve technical problems and achieve the corresponding technical effects, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. The embodiments of the present disclosure and the various features in the embodiments can be combined with each other without conflict, and the technical solutions formed are all within the scope of protection of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.

[0068] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0069] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0070] Embodiment 1

[0071] Figure 1 The flowchart of a training method of a lesion segmentation model provided in the embodiment of the present disclosure is as follows. Figure 1 As shown, a training method for a lesion segmentation model includes:

[0072] Step S11 : reading and preprocessing a data set, where the data set includes CT data, and the CT data includes a CT image and a corresponding annotated image.

[0073] Step S12: training the first lesion segmentation model and the second lesion segmentation model based on the reading and preprocessing results, the first loss function and the second loss function.

[0074] Among them, the first lesion segmentation model and the second lesion segmentation model are both neural network models, the first lesion segmentation model is trained using a first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and other rounds of training of the second lesion segmentation model use the second loss function, so that the lesion size segmented by the trained second lesion segmentation model is smaller than the lesion size segmented by the trained first lesion segmentation model.

[0075] In this embodiment, the first lesion segmentation model is trained using the first loss function, the first preset rounds of the second lesion segmentation model are trained using the first loss function, and the other rounds of the second lesion segmentation model are trained using the second loss function, so that the second lesion segmentation model pays more attention to and is more suitable for the segmentation of small-sized lesions. Two neural network models are trained by different training methods to solve the segmentation problems of lesions of different sizes in organs, respectively, thereby significantly improving the detection rate of small-sized lesions.

[0076] Before reading and preprocessing the data set, this embodiment needs to build a model training environment, for example:

[0077] A lightweight medical image segmentation model in a patent application with publication number CN117058158A and titled A lightweight medical image segmentation method, device, medium and electronic device is selected as the neural network model to be trained, marked as FDDW_ConvLSTM_SuperLight_3D. This neural network model to be trained is used as the first lesion segmentation model and the second lesion segmentation model to be trained in this application.

[0078] AdamW is selected as the optimizer and its learning rate is defined as:

[0079] ~ ,

[0080] Weight decay is defined as:

[0081] ~ .

[0082] Among them, batch_size is the batch size of one training.

[0083] It should be understood that when the method of this embodiment is actually applied, any neural network model can be selected for training and is not limited to the model in the above-mentioned patent application.

[0084] Taking the lightweight medical image segmentation model in the aforementioned patent application as an example, after training using the method of this embodiment, segmentation experiments were conducted on lung nodules and liver lesions, respectively. The experimental results are shown in the following table:

[0085] Table 1

[0086]

[0087] Table 2

[0088]

[0089] It can be seen that the second lesion segmentation model trained by the method of this embodiment has significantly improved the detection rate of small lesions or micro lesions. For lung nodules, lesions with a diameter between 3 mm and 8 mm are small lesions, and for liver lesions, lesions with a diameter less than 20 mm are micro lesions.

[0090] When training the first lesion segmentation model, only the first loss function needs to be used .

[0091] When training the second lesion segmentation model, the first round of training uses the first loss function , the second loss function is used for the next J rounds of training , the total number of training rounds of the second lesion segmentation model is I + J. In practical applications, the value range of I can be 1-20, and in a preferred case, I=10; the value range of J can be 1-100, and in a preferred case, J=50.

[0092] The first loss function of the first lesion segmentation model and the first I rounds of the second lesion segmentation model The definition is as follows:

[0093]

[0094] in, represents the cross entropy loss function, represents the Tversky loss function; m and n represent and The coefficients of m and n range from 0.0 to 1.0. Considering the small size of the lesion itself, it is necessary to ensure the detection rate of the lesion while ensuring the stable training of the model. m is set to 0.7 to ensure the stable training of the model, and n is set to 0.5 to achieve the requirement of improving the lesion detection rate.

[0095] The expression is:

[0096]

[0097] Among them, n represents the total number of samples, x represents the sample, and the set Represents the organ lesion annotation data drawn by doctors, set Represents the organ lesion annotation data generated by the model.

[0098] The expression is:

[0099]

[0100] Among them, the collection Represents the organ lesion annotation data generated by the model, set It represents the organ lesion annotation data drawn by doctors; represents a false positive FP, Indicates false negative FN, represents the smoothing coefficient, preferably, the value is The calculation is more accurate.

[0101] The Tversky loss function has two parameters α and β. Its advantage is that by adjusting the two parameters α and β, the balance between false positive FP and false negative FN can be controlled, thereby affecting the segmentation accuracy of small segmentation areas and large segmentation areas.

[0102] The parameter α ranges from 0.2 to 0.35, and the parameter β ranges from 0.6 to 0.75. In one example, α = 0.3 and β = 0.7. The setting of the parameters α and β increases the weight of the image segmentation sensitivity, which is beneficial to the segmentation of smaller lesion areas such as lung nodules.

[0103] In some implementations, the second loss function is expressed as follows:

[0104]

[0105] in, Indicates i The loss weight of each lesion, The value is based on i The number of pixels occupied by each lesion is determined by i The fewer pixels a lesion occupies, The larger the value of; Indicates i The cross entropy loss of each lesion; Indicates i Tversky loss of lesions; a 0 and b 0 respectively indicates and The coefficient of Indicates the loss of incorrectly detected lesions. The more incorrectly detected lesions are, The larger the value. a 0 and bThe value range of 0 is 0.0~1.0. Considering the small size of the lesion itself, while ensuring the stable training of the model, it is also necessary to ensure the detection rate of the lesion. a 0 is 0.7, which ensures stable training of the model. b 0 is 0.5, in order to achieve the requirement of improving the lesion detection rate.

[0106] In some embodiments, the first i The loss weight of each lesion is:

[0107]

[0108] in, a 1 and b 1 indicates adjustable parameters. a 1 and b 1 can control the i The loss weight of each lesion; Indicates i The number of pixels occupied by a lesion, Indicates the number of pixels occupied by all lesions. a The value range of 1 is 2~20, b The value range of 1 is 2 to 10. Preferably, when a 1=10, b When 1=3, the effect is better.

[0109] In order to adapt to the lesion segmentation tasks of different organs, the above i The loss weight calculation formula for each lesion is a 1 and b An example of how to set 1 parameter:

[0110] When setting parameters, fixed a 1=10 unchanged, adjust b 1 size. When a 1 is fixed to 10, and b When 1 is 2 or 5 respectively, this function The curve is as Figure 2 shown.

[0111] Among them, the parameters of curve 1 are a 1=10 and b 1=2, the parameters of curve 2 are a 1=10 and b 1=5. From Figure 2 It can be seen that b The larger the value of 1, the steeper the curve, and the greater the loss weight of the smaller lesion. b The smaller 1 is, the flatter the curve is, and the smaller the loss weight of the lesion is.

[0112] In some embodiments, incorrectly detected lesion loss is determined by the following calculation:

[0113]

[0114] in, a and b All represent adjustable parameters. a and b Ability to control the size of the penalty for incorrectly detected lesions; num neg represents the number of lesions that are not detected correctly. By adopting the i The loss weight of each lesion and incorrectly detected lesion loss Two control measures are used to adjust the degree of penalty for small lesions to control the detection rate of small lesions. a The value range is 2~20. b The value range of is 0.1~10.0. Preferably, when a =10, b =0.5, the effect is better.

[0115] In some embodiments, the number of incorrectly detected lesions can be obtained as follows: at the end of each training of the second lesion segmentation model, the Dice index value of each lesion in the annotated image of the data set and each lesion in the predicted annotated image is calculated, and the number of incorrectly detected lesions is obtained based on the calculated Dice index value.

[0116] In a specific example, the number of incorrectly detected lesions is obtained as follows:

[0117] At the end of each training of the second lesion segmentation model, lesions are extracted one by one from the annotated image of the data set, and Dice index values ​​are calculated for the extracted lesions and the lesions in the predicted annotated image, respectively, and the calculated Dice index values ​​are recorded in a two-dimensional first list S, where the rows of the first list S represent the lesions in the annotated image of the data set, and the columns of the first list S represent the lesions in the predicted annotated image;

[0118] Sort each column of the first list S according to the value of the Dice index;

[0119] Determine for each column of the first list S whether the maximum Dice index value is not less than the first value;

[0120] If yes, it means that the lesions in the doctor's annotated image in the data set and the lesions in the predicted annotated image are correctly matched, then the lesions corresponding to the Dice index value are correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected remains unchanged; otherwise, the lesions are not correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected increases by one;

[0121] After counting whether each lesion in the doctor's annotated image is correctly detected, the final value of the number of lesions that were not correctly detected is obtained. num neg .

[0122] In order to adapt to the lesion segmentation tasks of different organs, the above incorrectly detected lesion loss calculation formula is given here. a and b How to set the parameters:

[0123] When setting parameters, fixed a =10 unchanged, adjust b When a is fixed at 10, and b When is 0.5 or 5 respectively, the curve of the function is as follows Figure 3 shown.

[0124] The parameters of curve 1 are a =10 and b =5, the parameters of curve 2 are a =10 and b =0.5. Figure 3 It can be seen that b The smaller it is, the flatter the early curve is, the steeper the later curve is, the smaller the loss value caused by incorrectly detected lesions is, and the more uniform the change in the number of incorrectly detected lesions and the loss value is. b The larger it is, the steeper the curve is in the early stage and the flatter it is in the later stage. The greater the loss value caused by incorrectly detected lesions is. At the same time, it is difficult to ensure that the number of incorrectly detected lesions and the change in loss value are uniform.

[0125] The data set includes multiple CT data stored in the form of folders. Each CT data folder contains a compressed package of a CT data and a compressed package of a corresponding annotated image. In some embodiments, reading and preprocessing the data set includes:

[0126] Step S11a, disrupting the order of each CT data in the data set and reading each CT data after the disrupted order to avoid data deviation.

[0127] Step S11b: Perform a dilation operation on the CT image in each of the read CT data corresponding to the lesion annotation in the annotation image. For example, the dilation operation is a dilation operation with a kernel of 3.

[0128] Step S11c, in order to facilitate subsequent training, the direction of each CT image and its annotated image is converted to the RAI (Right Anterior Inferior) direction. The RAI direction is a concept in the anatomical coordinate system, which is established based on the characteristics of the human body. In the anatomical coordinate system, S (Superior) and I (Inferior) are a pair of opposite directions, representing the upper side (head side) and the lower side (foot side); L (Left) and R (Right) are a pair of opposite directions, representing the left side and the right side respectively; A (Anterior) and P (Posterior) are a pair of opposite directions, representing the front side and the back side respectively. The RAI direction is the three positive directions of the right side, the front side and the bottom side that constitute the spatial coordinate system.

[0129] Step S11d: For each CT image, adjust the window width and window position. If the lesion to be segmented is a lung nodule, it needs to be adjusted to a lung window; if the lesion to be segmented is a liver lesion, it needs to be adjusted to an abdominal window.

[0130] Step S11e: perform pixel normalization processing on each CT image, and normalize all pixels of the image to a range of 0 to 1.

[0131] Step S11f, each CT image and the corresponding annotated image is three-dimensionally cropped according to the region of interest. If the lesion to be segmented is a lung nodule, the lung region is the region of interest; if the lesion to be segmented is a liver lesion, the liver region is the region of interest.

[0132] Step S11g: scaling the X-axis and Y-axis of the cropped CT image and the corresponding annotated image, and keeping the Z-axis unchanged. For example, the cropped CT image and the annotated image may be enlarged to a pixel size of z*512*512.

[0133] Step S11h: Slice each CT image and the corresponding annotated image to obtain a set of slice images. In one example, each CT image and the corresponding annotated image is sliced ​​into 8*512*512 or 16*512*512 slice images.

[0134] Step S11i: shuffle the order of all the group slice images corresponding to each CT data to obtain the reading and preprocessing results.

[0135] In some embodiments, based on the results of reading and preprocessing, the first loss function and the second loss function, the first lesion segmentation model and the second lesion segmentation model are trained, and the training process is as follows:

[0136] Step S12a, extract image data in batches from the results of reading and preprocessing for online data enhancement processing. The results of reading and preprocessing include the results of integrating a group of slice images, from which batch data are extracted and input into the model for training. When a batch of data is input into the model for training, online data enhancement processing is first performed. In some examples, the probability of motion blur in data enhancement processing is 0.04~0.1, the probability of image mean filtering is 0.01~0.5, the probability of image horizontal flipping is 0.1~0.3, the probability of image vertical flipping is 0.1~0.3, the probability of random translation, size and rotation transformation of the image is 0.2~0.4, the probability of image grid distortion, optical distortion or elastic transformation is 0.1~0.3, and the probability of image Gaussian noise is 0.05~0.1.

[0137] Step S12b: training the first lesion segmentation model or the second lesion segmentation model based on the image data after online data enhancement, and calculating the loss function value of each time in the current round , i represents the i-th training.

[0138] It should be noted that when training the first lesion segmentation model, the loss function is the first loss function When training the second lesion segmentation model, the loss function of the first round of training is the first loss function , the loss function of the next J rounds of training is the second loss function .

[0139] Step S12c, calculate the current average loss function value, the calculation method is: the sum of the loss function values ​​divided by the number of training times, the calculation formula is as follows:

[0140]

[0141] in, is the i-th loss function value, i is the i-th training, and n is the number of training times.

[0142] When training the first lesion segmentation model, Hengwei When training the second lesion segmentation model, the first round of training for , after J round training for The value range of I is 1-20, preferably, I=10; the value range of J is 1-100, preferably, J=50.

[0143] Step S12d: Calculate the loss function value for each round and the current average loss function value Size: If the loss function value of each time in the current round is ≥ the current average loss function value, the current batch of image data (images and corresponding labeled images) is stored in the second list N.

[0144] Step S12e: After the current round of image data training is completed, read the image data in the second list N one by one for supplementary training. If the loss function value corresponding to any batch of image data in the second list N is ≥ the current average loss function value, then store the batch of image data in the third list M.

[0145] Step S12f: After each round of training, the content in the second list is updated to the content in the third list.

[0146] Assumptions represents the i-th batch of images and the corresponding labeled images in the second list N, represents the loss value of the i-th batch image segmentation result in list N. Then when When The batch of images and the corresponding annotated images are stored in the third list M; , the current batch of images and the corresponding annotated images will not be stored in list M. Finally, the content in list N is updated to the content in list M. M is cleared. Go to step S12a to perform the next batch of training.

[0147] Step S12g: Determine the current average loss function value Is it greater than the preset threshold: If so, continue to the next round of training; otherwise, end the training and save the first lesion segmentation model or the second lesion segmentation model when the average loss function value is the smallest.

[0148] In some embodiments, before reading and preprocessing the data set, the method further includes: performing offline data enhancement on the CT data in the data set to amplify the CT data in the data set.

[0149] In the pulmonary nodule segmentation scenario, ground glass nodules are different from most solid nodules in color and texture, and their number is rare and difficult to train. In this case, offline data enhancement technology can be used first to amplify the data of ground glass nodules. The specific method is: according to the annotated image, the ground glass lung nodule area in several different CT images is cropped and extracted, and recorded in a list A. Then all normal CT images without lung nodules are extracted and recorded in a list B. A CT image b is randomly extracted from list B, and the lung area of ​​the CT image b is found. Several (can be 1 to 4) ground glass nodule area images in list A are randomly and repeatedly extracted. After performing 3D random rotation transformation on these ground glass nodule images, the ground glass lung nodules are fused to the random position in the lung area of ​​CT image b with a weight of 0.8 to 0.9, and a CT image c containing ground glass lung nodule lesions is obtained. Similarly, after all CT images in list B are synthesized, they are added to the data set before preprocessing to complete offline data enhancement.

[0150] The first lesion segmentation model and the second lesion segmentation model are obtained, which can be used for model deployment to segment lesions in CT images using the first lesion segmentation model and the second lesion segmentation model.

[0151] Embodiment 2

[0152] Figure 4 FIG. 1 is a flow chart of a lesion segmentation method provided in an embodiment of the present disclosure. Figure 4 As shown, a lesion segmentation method includes:

[0153] Step S21, acquiring a CT image.

[0154] In practical applications, a CT image is acquired, and the direction of the CT image is converted to the RAI direction. The window width and window position of the CT image are adjusted. If the lesion to be segmented is a lung nodule, it is adjusted to a lung window. If the lesion to be segmented is a liver lesion, it is adjusted to an abdominal window. The CT image is pixel normalized, and all pixels of the image are normalized to the range of 0 to 1. The region of interest of the CT image is found for three-dimensional cropping. If the lesion to be segmented is a lung nodule, the lung region is the region of interest. If the lesion to be segmented is a liver lesion, the liver region is the region of interest. The cropped CT image is rescaled on the X and Y axes, and the Z axis remains unchanged. For example, the cropped CT image can be enlarged to a pixel size of z*512*512.

[0155] Step S22, slicing the CT image to obtain a set of slice images, for example, slicing the CT image into 8*512*512 or 16*512*512 slice images as the result of CT image data reading and preprocessing.

[0156] Step S23, sequentially placing the group of slice images into the first lesion segmentation model and the second lesion segmentation model for calculation to obtain the segmentation results of the first lesion segmentation model and the second lesion segmentation model, wherein the first lesion segmentation model and the second lesion segmentation model are trained based on the training method of the lesion segmentation model described in Example 1.

[0157] In some embodiments, the lesion segmentation method further comprises:

[0158] Step S24: finding the union or intersection of the segmentation result of the first lesion segmentation model and the segmentation result of the second lesion segmentation model.

[0159] In practical applications, the segmentation results of the two models can be combined to improve the detection rate of lesions, especially the detection rate of small lesions. In some cases, the segmentation results of the two models can also be intersected to obtain a segmentation result with relatively high confidence, thereby reducing the number of false lesions.

[0160] Embodiment 3

[0161] This embodiment provides a training device for a lesion segmentation model, including:

[0162] A data processing module, used for reading and preprocessing a data set, the data set includes CT data, and the CT data includes a CT image and a corresponding annotated image;

[0163] A model training module is used to train a first lesion segmentation model and a second lesion segmentation model based on the results of reading and preprocessing, a first loss function and a second loss function; wherein the first lesion segmentation model and the second lesion segmentation model are both neural network models, the first lesion segmentation model is trained using the first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and other rounds of training of the second lesion segmentation model use the second loss function, so that the size of the lesion segmented by the trained second lesion segmentation model is smaller than the size of the lesion segmented by the trained first lesion segmentation model.

[0164] In some implementations, the second loss function is expressed as follows:

[0165]

[0166] in, Indicates i The loss weight of each lesion, The value is based on i The number of pixels occupied by each lesion is determined by i The fewer pixels a lesion occupies, The larger the value of; Indicates i The cross entropy loss of each lesion; Indicates i Tversky loss of lesions; a 0 and b 0 respectively indicates and The coefficient of Indicates the loss of incorrectly detected lesions. The more incorrectly detected lesions are, The larger the value. a 0 and b The value range of 0 is 0.0~1.0. Considering the small size of the lesion itself, while ensuring the stable training of the model, it is also necessary to ensure the detection rate of the lesion. a 0 is 0.7, which ensures stable training of the model. b 0 is 0.5, in order to achieve the requirement of improving the lesion detection rate.

[0167] In some embodiments, the first i The loss weight of each lesion is:

[0168]

[0169] in, a 1 and b 1 indicates adjustable parameters. a 1 and b 1 can control the i The loss weight of each lesion; Indicates i The number of pixels occupied by a lesion, Indicates the number of pixels occupied by all lesions.

[0170] In some embodiments, incorrectly detected lesion loss is determined by the following calculation:

[0171]

[0172] in, a and b All represent adjustable parameters. a and b Ability to control the size of the penalty for incorrectly detected lesions; num neg represents the number of lesions that are not detected correctly. By adopting the i The loss weight of each lesion and incorrectly detected lesion loss Two control measures are used to adjust the degree of penalty for small lesions to control the detection rate of small lesions.

[0173] In some embodiments, the number of incorrectly detected lesions can be obtained as follows: at the end of each training of the second lesion segmentation model, the Dice index value of each lesion in the annotated image of the data set and each lesion in the predicted annotated image is calculated, and the number of incorrectly detected lesions is obtained based on the calculated Dice index value.

[0174] In a specific example, the number of incorrectly detected lesions is obtained as follows:

[0175] At the end of each training of the second lesion segmentation model, lesions are extracted one by one from the annotated image of the data set, and Dice index values ​​are calculated for the extracted lesions and the lesions in the predicted annotated image, respectively, and the calculated Dice index values ​​are recorded in a two-dimensional first list S, where the rows of the first list S represent the lesions in the annotated image of the data set, and the columns of the first list S represent the lesions in the predicted annotated image;

[0176] Sort each column of the first list S according to the value of the Dice index;

[0177] Determine for each column of the first list S whether the maximum Dice index value is not less than the first value;

[0178] If yes, it means that the lesions in the doctor's annotated image in the data set and the lesions in the predicted annotated image are correctly matched, then the lesions corresponding to the Dice index value are correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected remains unchanged; otherwise, the lesions are not correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected increases by one;

[0179] After counting whether each lesion in the doctor's annotated image is correctly detected, the final value of the number of lesions that were not correctly detected is obtained. num neg .

[0180] The data set includes multiple CT data stored in the form of folders. Each CT data folder contains a compressed package of a CT data and a compressed package of a corresponding annotated image. In some embodiments, reading and preprocessing the data set includes:

[0181] The order of each CT data in the data set is shuffled and each CT data after the shuffle is read. The CT image in each CT data read is dilated according to the lesion annotation in the corresponding annotation image. The direction of each CT image and its annotation image is converted to the RAI (Right Anterior Inferior) direction. For each CT image, the window width and window position are adjusted. Pixel normalization is performed on each CT image, and all pixels of the image are normalized to the range of 0~1. Each CT image and the corresponding annotation image are three-dimensionally cropped according to the region of interest. The X-axis and Y-axis of the cropped CT image and the corresponding annotation image are scaled, and the Z-axis remains unchanged. Each CT image and the corresponding annotation image are sliced ​​to obtain a group of slice images. The order of all groups of slice images corresponding to each CT data is shuffled to obtain the results of reading and preprocessing.

[0182] In some embodiments, based on the results of reading and preprocessing, the first loss function and the second loss function, the first lesion segmentation model and the second lesion segmentation model are trained, and the training process is as follows:

[0183] Extract image data in batches from the results of reading and preprocessing for online data enhancement. Train the first lesion segmentation model or the second lesion segmentation model based on the image data after online data enhancement, and calculate the loss function value for each time in the current round. Calculate the current average loss function value. Calculate the loss function value for each time in the current round and the current average loss function value Size: If the loss function value of each time in the current round is ≥ the current average loss function value, the current batch of image data (images and corresponding annotated images) is stored in the second list N. After the current round of image data training is completed, the image data in the second list N are read one by one for supplementary training. If the loss function value corresponding to any batch of image data in the second list N is ≥ the current average loss function value, the batch of image data is stored in the third list M. After each round of training, the content in the second list is updated to the content in the third list. Determine the current average loss function value Is it greater than a preset threshold: If so, continue with the next round of training; otherwise, end the training and save the first lesion segmentation model or the second lesion segmentation model when the average loss function value is the smallest.

[0184] In some embodiments, before reading and preprocessing the data set, the method further includes: performing offline data enhancement on the CT data in the data set to amplify the CT data in the data set.

[0185] In the pulmonary nodule segmentation scenario, ground glass nodules are different from most solid nodules in color and texture, and their number is rare and difficult to train. In this case, offline data enhancement technology can be used first to amplify the data of ground glass nodules. The specific method is: according to the annotated image, the ground glass lung nodule area in several different CT images is cropped and extracted, and recorded in a list A. Then all normal CT images without lung nodules are extracted and recorded in a list B. A CT image b is randomly extracted from list B, and the lung area of ​​the CT image b is found. Several (can be 1 to 4) ground glass nodule area images in list A are randomly and repeatedly extracted. After performing 3D random rotation transformation on these ground glass nodule images, the ground glass lung nodules are fused to the random position in the lung area of ​​CT image b with a weight of 0.8 to 0.9, and a CT image c containing ground glass lung nodule lesions is obtained. Similarly, after all CT images in list B are synthesized, they are added to the data set before preprocessing to complete offline data enhancement.

[0186] The first lesion segmentation model and the second lesion segmentation model are obtained, which can be used for model deployment to segment lesions in CT images using the first lesion segmentation model and the second lesion segmentation model.

[0187] This embodiment has at least all the technical effects of the first embodiment, which will not be described in detail here.

[0188] Embodiment 4

[0189] This embodiment provides a lesion segmentation device, including:

[0190] An image acquisition module, used for acquiring CT images;

[0191] An image slicing module is used to slice the CT image to obtain a set of slice images;

[0192] The lesion segmentation module is used to sequentially place the group of slice images into the first lesion segmentation model and the second lesion segmentation model for calculation to obtain the segmentation results of the first lesion segmentation model and the second lesion segmentation model. The first lesion segmentation model and the second lesion segmentation model are trained by the training device of the lesion segmentation model described in Example 3.

[0193] In some embodiments, the lesion segmentation module further calculates the union or intersection of the segmentation result of the first lesion segmentation model and the segmentation result of the second lesion segmentation model.

[0194] This embodiment has at least all the technical effects of the second embodiment, which will not be described in detail here.

[0195] Embodiment 5

[0196] On the basis of the above embodiments, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the method described in the above embodiments.

[0197] In some implementations of this embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.

[0198] In some implementations of this embodiment, a computer program product is provided, including a computer program / instructions, and when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.

[0199] The processor may include, but is not limited to, one or more processors or microprocessors. Each processor may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components to execute the method in the above embodiments.

[0200] Computer-readable storage media can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Computer-readable storage media may include, but are not limited to, for example, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (such as hard disks, floppy disks, solid-state drives, removable disks, CD-ROMs, DVD-ROMs, Blu-ray disks, etc.).

[0201] The computer-readable storage medium may also store at least one computer executable program / instruction, which may be, for example, a computer-readable instruction. The computer-readable storage medium includes, but is not limited to, for example, a volatile memory and / or a non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The computer-readable storage medium may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. For example, a non-transitory computer-readable storage medium may be connected to a computing device such as a computer, and then, when the computing device runs the computer-readable instructions stored on the computer-readable storage medium, the various methods described above may be performed.

[0202] In addition, the computer device may also include (but not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (eg, keyboard, mouse, speaker, etc.), etc.

[0203] The processor may communicate with external devices via an I / O bus via a wired or wireless network.

[0204] In one embodiment, the at least one computer executable instruction may also be compiled into or constitute a software product / computer program product, wherein one or more computer executable instructions are executed by a processor to perform the various functions and / or method steps in the embodiments described in the present technology.

[0205] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0206] It should be noted that in the present disclosure, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element limited by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0207] Although the embodiments disclosed in the present disclosure are as above, the above contents are only embodiments adopted for facilitating the understanding of the present disclosure and are not intended to limit the present disclosure. Any technician in the technical field to which the present disclosure belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present disclosure, but the scope of patent protection of the present disclosure shall still be subject to the scope defined in the attached claims.

Claims

1. A training method for a lesion segmentation model, characterized in that: include: Reading and preprocessing a data set, wherein the data set includes CT data, and the CT data includes a CT image and a corresponding annotated image; Based on the results of reading and preprocessing, the first loss function and the second loss function, training a first lesion segmentation model and a second lesion segmentation model; Wherein, both the first lesion segmentation model and the second lesion segmentation model are neural network models, the first lesion segmentation model is trained using a first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and other rounds of training of the second lesion segmentation model use a second loss function, so that the size of the lesion segmented by the trained second lesion segmentation model is smaller than the size of the lesion segmented by the trained first lesion segmentation model; The second loss function expression is as follows: in, Indicates i The loss weight of each lesion, The value is based on i The number of pixels occupied by each lesion is determined by i The fewer pixels a lesion occupies, The larger the value of; Indicates i The cross entropy loss of each lesion; Indicates i Tversky loss of lesions; a 0 and b 0 respectively indicates and The coefficient of Indicates the loss of incorrectly detected lesions. The more incorrectly detected lesions are, The larger the value of; The method of training the first lesion segmentation model and the second lesion segmentation model based on the reading and preprocessing results, the first loss function and the second loss function comprises: Extract image data in batches from the results of reading and preprocessing to perform online data augmentation processing; Training the first lesion segmentation model or the second lesion segmentation model based on the image data after online data enhancement, and calculating the loss function value each time in the current round; Calculate the current average loss function value; Calculate the magnitude of the loss function value of each time in the current round and the current average loss function value: if the loss function value of each time in the current round is ≥ the current average loss function value, store the current batch of image data in the second list; After the current round of image data training is completed, the image data in the second list is read for supplementary training. If the loss function value corresponding to any batch of image data in the second list is ≥ the current average loss function value, the batch of image data is stored in the third list; After each round of training, the content in the second list is updated to the content in the third list; Determine whether the current average loss function value is greater than a preset threshold: if so, continue with the next round of training; otherwise, end the training and save the first lesion segmentation model or the second lesion segmentation model when the average loss function value is the smallest.

2. The training method of the lesion segmentation model according to claim 1, characterized in that: Determine the i The loss weight of each lesion is: in, a 1 and b 1 indicates adjustable parameters. a 1 and b 1 can control the i The loss weight of each lesion; Indicates i The number of pixels occupied by a lesion, Indicates the number of pixels occupied by all lesions.

3. The training method of the lesion segmentation model according to claim 1, characterized in that: The loss of incorrectly detected lesions was determined by the following calculation: in, a and b All represent adjustable parameters. a and b Ability to control the size of the penalty for incorrectly detected lesions; num neg Indicates the number of lesions that were not detected correctly.

4. The training method of the lesion segmentation model according to claim 3, characterized in that: The number of incorrectly detected lesions is obtained according to the following method: at the end of each training of the second lesion segmentation model, the Dice index value of each lesion in the annotated image of the data set and the Dice index value of each lesion in the predicted annotated image are calculated, and the number of incorrectly detected lesions is obtained based on the calculated Dice index value.

5. The training method of the lesion segmentation model according to claim 4, characterized in that: The number of incorrectly detected lesions is obtained according to the following method: At the end of each training of the second lesion segmentation model, lesions are extracted one by one from the annotated images of the data set, Dice index values ​​are calculated for the extracted lesions and the lesions in the predicted annotated images, and the calculated Dice index values ​​are recorded in a first list, where the rows of the first list represent the lesions in the annotated images of the data set, and the columns of the first list represent the lesions in the predicted annotated images; Sort each column of the first list according to the value of the Dice index; Determine for each column of the first list whether the maximum Dice index value is not less than the first value; If yes, the lesion corresponding to the Dice index value is correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected remains unchanged; Otherwise, the lesion is not correctly detected by the second lesion segmentation model, and the value of the number of lesions that are not correctly detected is increased by one; The final value of the number of incorrectly detected lesions is obtained by counting.

6. The training method of the lesion segmentation model according to claim 1, characterized in that: The reading and preprocessing of the data set includes: Disrupting the order of each CT data in the data set and reading each CT data after the order is disrupted; Performing dilation operation on the CT image in each CT data read corresponding to the lesion annotation in the annotation image; Convert the orientation of each CT image and its annotated image into the RAI orientation; For each CT image, adjust the window width and window position; Perform pixel normalization on each CT image; Each CT image and the corresponding annotated image are three-dimensionally cropped according to the region of interest; Scale the X-axis and Y-axis of the cropped CT image and the corresponding annotated image; Each CT image and the corresponding annotated image are sliced ​​to obtain a set of slice images; All the groups of slice images corresponding to each CT data are disrupted to obtain the reading and preprocessing results.

7. The training method of the lesion segmentation model according to claim 1, characterized in that: Before reading and preprocessing the data set, the method further includes: performing offline data enhancement on the CT data in the data set to amplify the CT data in the data set.

8. A lesion segmentation method, characterized in that: include: Acquire CT images; Slice the CT image to obtain a set of slice images; This group of slice images is sequentially placed into the first lesion segmentation model and the second lesion segmentation model for calculation to obtain the segmentation results of the first lesion segmentation model and the second lesion segmentation model, wherein the first lesion segmentation model and the second lesion segmentation model are trained based on the training method of the lesion segmentation model according to any one of claims 1 to 7.

9. The lesion segmentation method according to claim 8, characterized in that: Also includes: The union or intersection of the segmentation result of the first lesion segmentation model and the segmentation result of the second lesion segmentation model is calculated.

10. A training device for a lesion segmentation model, characterized in that: include: A data processing module, used for reading and preprocessing a data set, wherein the data set includes CT data, and the CT data includes a CT image and a corresponding annotated image; A model training module, used for training a first lesion segmentation model and a second lesion segmentation model based on the results of reading and preprocessing, a first loss function and a second loss function; wherein the first lesion segmentation model and the second lesion segmentation model are both neural network models, the first lesion segmentation model is trained using a first loss function, the first preset round of training of the second lesion segmentation model uses the first loss function, and the other rounds of training of the second lesion segmentation model use a second loss function, so that the size of the lesion segmented by the trained second lesion segmentation model is smaller than the size of the lesion segmented by the trained first lesion segmentation model; The second loss function expression is as follows: in, Indicates i The loss weight of each lesion, The value is based on i The number of pixels occupied by each lesion is determined by i The fewer pixels a lesion occupies, The larger the value of; Indicates i The cross entropy loss of each lesion; Indicates i Tversky loss of lesions; a 0 and b 0 respectively indicates and The coefficient of Indicates the loss of incorrectly detected lesions. The more incorrectly detected lesions are, The larger the value of; The method of training the first lesion segmentation model and the second lesion segmentation model based on the reading and preprocessing results, the first loss function and the second loss function comprises: Extract image data in batches from the results of reading and preprocessing to perform online data augmentation processing; Training the first lesion segmentation model or the second lesion segmentation model based on the image data after online data enhancement, and calculating the loss function value each time in the current round; Calculate the current average loss function value; Calculate the magnitude of the loss function value of each time in the current round and the current average loss function value: if the loss function value of each time in the current round is ≥ the current average loss function value, store the current batch of image data in the second list; After the current round of image data training is completed, the image data in the second list is read for supplementary training. If the loss function value corresponding to any batch of image data in the second list is ≥ the current average loss function value, the batch of image data is stored in the third list; After each round of training, the content in the second list is updated to the content in the third list; Determine whether the current average loss function value is greater than a preset threshold: if so, continue with the next round of training; otherwise, end the training and save the first lesion segmentation model or the second lesion segmentation model when the average loss function value is the smallest.

11. A lesion segmentation device, characterized in that: include: An image acquisition module, used for acquiring CT images; An image slicing module is used to slice the CT image to obtain a set of slice images; A lesion segmentation module is used to sequentially place the group of slice images into a first lesion segmentation model and a second lesion segmentation model for calculation to obtain a segmentation result of the first lesion segmentation model and a segmentation result of the second lesion segmentation model, wherein the first lesion segmentation model and the second lesion segmentation model are trained by a training device for the lesion segmentation model according to claim 10.

12. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

14. A computer program product comprising a computer program / instructions, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.