A lung CT image segmentation model construction method, device and electronic equipment
By generating pseudo-labels and optimizing the loss function in medical CT image segmentation, the problem of labeling difficulties is solved, achieving efficient lung CT image segmentation, meeting clinical needs, and improving model accuracy and segmentation precision.
Patent Information
- Application Number
- CN202211635850.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-12-20
AI Technical Summary
Existing technologies for medical CT image segmentation rely on a large amount of high-quality labeled data, which makes labeling difficult and expensive, and lacks the constraints of 3D sequences, affecting the segmentation results.
By acquiring multiple 3D images of lung CT scans, pseudo-labels are generated using interpolation. Then, supervised loss, unsupervised loss, and interpolation consistency loss are combined to optimize the parameters of the preset segmentation model until the model accuracy reaches a preset threshold.
It effectively reduces the reliance on high-quality labeled data, improves model accuracy, adapts to actual clinical conditions, saves time and effort, and improves the segmentation accuracy of lesion areas.
Smart Images

Figure CN115829994B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a lung CT image segmentation model construction method and device and electronic equipment. BACKGROUND
[0002] Segmentation of medical image lesion regions is an important support for tasks such as disease diagnosis, surgery or radiotherapy planning, and prognosis evaluation. In recent years, methods such as convolutional neural networks (CNN) have achieved excellent results in medical image segmentation, and in particular, nnUNet has achieved the best results in almost all fully supervised medical image segmentation tasks. However, this does not mean that the medical CT (Computed Tomography) image segmentation task has been perfectly solved, because fully supervised medical image segmentation still relies on a large amount of high-quality labeling. Unlike natural images, which can be quickly completed through crowdsourcing and other methods due to the lower threshold for data labeling, medical image labeling requires professional knowledge and clinical experience, making it difficult and expensive to obtain a large amount of labeled data. However, it is relatively easy to obtain a large amount of unlabeled data. In reality, only a small portion of CT data is labeled, and a large amount of data is unlabeled, making image segmentation more difficult. And most of the current CT image segmentation methods mainly rely on 2D CT images, lacking the constraints of 3D sequences. Using 3D images can better extract the most original lesion semantic information. SUMMARY
[0003] Therefore, the embodiments of the present application provide a lung CT image segmentation model construction method to solve the problem of relying on a large amount of labeled data when performing image segmentation on CT images in the prior art.
[0004] To achieve the above object, the present application provides the following technical scheme:
[0005] The embodiments of the present application provide a lung CT image segmentation model construction method, comprising:
[0006] Obtaining a plurality of three-dimensional data images of lung CT, the three-dimensional data images comprising labeled data images and unlabeled data images;
[0007] Performing interpolation processing on the unlabeled data images to generate pseudo-labels;
[0008] Inputting the labeled data images and the unlabeled data images with the pseudo-labels into a preset segmentation model, and analyzing supervised loss and unsupervised loss according to output results;
[0009] Calculating an interpolation consistency loss according to the unlabeled data images and the pseudo-labels;
[0010] An overall weighted loss of the preset segmentation model is obtained through the supervised loss, the unsupervised loss and the interpolation consistency loss;
[0011] Model parameters of the preset segmentation model are updated according to the overall weighted loss, and the step of obtaining three-dimensional data images of multiple lung CTs is returned until the model precision reaches a preset threshold.
[0012] Optionally, the inputting the labeled data images and the unlabeled data images with the pseudo labels into the preset segmentation model and analyzing the supervised loss and the unsupervised loss according to output results comprises:
[0013] The labeled data images are input into the preset segmentation model, and a supervised loss is calculated according to an output result, the preset segmentation model comprising a primary doctor segmentation model and an assistant doctor segmentation model;
[0014] The unlabeled data images with the pseudo labels are input into the preset segmentation model, and an unsupervised loss is calculated according to an output result.
[0015] Optionally, the inputting the labeled data images into the preset segmentation model and calculating the supervised loss according to an output result comprises:
[0016] The labeled data images are input into the primary doctor segmentation model to obtain a first feature map;
[0017] A first supervised loss is obtained by analyzing a loss difference between the first feature map and the labeled data images;
[0018] The first feature map is input into the assistant doctor segmentation model to obtain a second feature map;
[0019] A second supervised loss is obtained by analyzing a loss difference between the second feature map and the first feature map.
[0020] Optionally, the inputting the unlabeled data images with the pseudo labels into the preset segmentation model and calculating the unsupervised loss according to an output result comprises:
[0021] The unlabeled data images with the pseudo labels are input into the primary doctor segmentation model to obtain a third feature map;
[0022] A first unsupervised loss is obtained by analyzing a loss difference between the third feature map and the unlabeled data images with the pseudo labels;
[0023] The third feature map is input into the assistant doctor segmentation model to obtain a fourth feature map;
[0024] The loss difference between the fourth feature map and the third feature map is analyzed to obtain a second unsupervised loss.
[0025] Optionally, the interpolation processing on the unlabeled data image to generate a pseudo label comprises:
[0026] The unlabeled data images are randomly paired to generate a plurality of pairs of unlabeled image groups.
[0027] Based on the unlabeled image group, interpolation calculation is performed to obtain a result as a pseudo label.
[0028] Optionally, the interpolation consistency loss is calculated according to the unlabeled data image and the pseudo label, comprising:
[0029] The unlabeled data image is input into a main doctor segmentation model in the preset segmentation model to obtain an output image.
[0030] The output image is interpolated to obtain a first interpolation image.
[0031] The unlabeled data image with the pseudo label is input into the main doctor segmentation model to obtain a predicted image.
[0032] The first interpolation image is analyzed for consistency according to the predicted image to obtain an interpolation consistency loss.
[0033] Optionally, before the interpolation processing on the unlabeled data image to generate a pseudo label, the method further comprises:
[0034] The three-dimensional data image is oversampled.
[0035] The oversampled three-dimensional data image is resampled.
[0036] The resampled three-dimensional data image is data enhanced.
[0037] The embodiment of the application further provides a lung CT image segmentation model construction device, comprising:
[0038] An acquisition module is configured to acquire a plurality of three-dimensional data images of lung CT, wherein the three-dimensional data images comprise labeled data images and unlabeled data images.
[0039] An interpolation module is configured to perform interpolation processing on the unlabeled data image to generate a pseudo label.
[0040] A first loss module is configured to input the labeled data image and the unlabeled data image with the pseudo label into a preset segmentation model respectively, and analyze a supervised loss and an unsupervised loss according to an output result.
[0041] a second loss module configured to calculate an interpolation consistency loss according to the unlabeled data image and the pseudo label;
[0042] a total loss calculation module configured to obtain a total weighted loss of the preset segmentation model through the supervised loss, the unsupervised loss and the interpolation consistency loss;
[0043] a parameter adjustment module configured to update model parameters of the preset segmentation model according to the total weighted loss, and return to the step of obtaining the plurality of three-dimensional data images of lung CT until the model accuracy reaches a preset threshold.
[0044] The embodiment of the present application also provides an electronic device, comprising:
[0045] a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the lung CT image segmentation model construction method provided by the embodiment of the present application.
[0046] The embodiment of the present application also provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the lung CT image segmentation model construction method provided by the embodiment of the present application.
[0047] The technical scheme of the present application has the following advantages:
[0048] The present application provides a lung CT image segmentation model construction method, which obtains a plurality of three-dimensional data images of lung CT, and the three-dimensional data images include labeled data images and unlabeled data images; performs interpolation processing on the unlabeled data images to generate pseudo labels; inputs the labeled data images and the unlabeled data images with the pseudo labels into a preset segmentation model respectively, and analyzes supervised loss and unsupervised loss according to output results; calculates interpolation consistency loss according to the unlabeled data images and the pseudo labels; obtains a total weighted loss of the preset segmentation model through the supervised loss, the unsupervised loss and the interpolation consistency loss; updates model parameters of the preset segmentation model according to the total weighted loss, and returns to the step of obtaining the plurality of three-dimensional data images of lung CT until the model accuracy reaches a preset threshold. The present application can effectively reduce the annotation threshold of medical image segmentation which still relies on a large amount of high-quality labeled data, save a lot of time and effort by using a small amount of labeled data and a large amount of unlabeled data to construct a lung CT image segmentation model; at the same time, the model training difficulty can be effectively reduced and the model accuracy can be improved by better utilizing unlabeled data for model training, which provides higher quality data support for accurate segmentation of lesion regions in computer-aided diagnosis. BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0050] Figure 1 The flow chart of the lung CT image segmentation model construction method in the embodiment of the present application;
[0051] Figure 2 The flow chart of the pre-processing of the three-dimensional data image according to the embodiment of the present application;
[0052] Figure 3 The flow chart of the interpolation processing of the unlabeled data image to generate pseudo labels according to the embodiment of the present application;
[0053] Figure 4 The flow chart of the analysis of supervised loss and unsupervised loss according to the embodiment of the present application;
[0054] Figure 5 The flow chart of the calculation of the supervised loss according to the embodiment of the present application;
[0055] Figure 6 The flow chart of the calculation of the unsupervised loss according to the embodiment of the present application;
[0056] Figure 7 The flow chart of the calculation of the interpolation consistency loss according to the embodiment of the present application;
[0057] Figure 8 The structural schematic diagram of the lung CT image segmentation model construction device in the embodiment of the present application;
[0058] Figure 9 The structural schematic diagram of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the following will describe the technical solutions in the embodiments of the present application clearly and completely with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0060] According to an embodiment of the present application, a lung CT image segmentation model construction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.
[0061] In this embodiment, a lung CT image segmentation model construction method is provided, which can be used to segment the lesion area in the computer lung CT image, and is used for preoperative assistance, such as new coronavirus infection auxiliary diagnosis, etc. Figure 1 As shown in the figure, the lung CT image segmentation model construction method includes the following steps:
[0062] Step S1: Obtain a plurality of three-dimensional data images of lung CT, and the three-dimensional data images include labeled data images and unlabeled data images. Specifically, the labeled data images are three-dimensional data images of lung CT with labeled data, and the unlabeled data images are three-dimensional data images of lung CT directly obtained without medical image labeling.
[0063] Step S2: Interpolation processing is performed on the unlabeled data image to generate pseudo labels. Specifically, pseudo labels are generated by interpolation processing on the unlabeled data to improve the utilization rate of the unlabeled data image, so as to effectively improve the segmentation accuracy and test index of the model in the case where the proportion of the unlabeled data is relatively large.
[0064] Step S3: The labeled data image and the unlabeled data image with pseudo labels are respectively input into a preset segmentation model, and supervised loss and unsupervised loss are analyzed according to the output results. Specifically, by analyzing the model output results of the labeled data image and the unlabeled data image, the data loss of the labeled data image after the segmentation model (supervised loss) and the data loss of the unlabeled data image after the segmentation model (unsupervised loss) are obtained. Thus, the model can be optimized according to the loss in the subsequent process.
[0065] Step S4: Calculate the interpolation consistency loss according to the unlabeled data image and the pseudo label. Specifically, the interpolation consistency training can be used to calculate the loss, which can effectively resist various disturbances on the unmarked data to increase the universality of these new data points.
[0066] Step S5: Obtain the total weighted loss of the preset segmentation model through the supervised loss, the unsupervised loss and the interpolation consistency loss.
[0067] Step S6: updating the model parameters of the preset segmentation model according to the total weighted loss, and returning to the step of obtaining the three-dimensional data image of the plurality of lung CTs until the model accuracy reaches a preset threshold. Specifically, the model is continuously trained through iteration, and the weight coefficients of the parameters in the model are updated according to the loss of each time to improve the model accuracy.
[0068] Through the steps S1 to S6, the lung CT image segmentation model construction method provided by the embodiment of the present application can effectively reduce the medical image segmentation still relying on a large amount of high-quality labeled data annotation threshold, save a lot of time and effort by using a small amount of labeled data and a large amount of unlabeled data to construct the lung CT image segmentation model. At the same time, by better utilizing unlabeled data for model training, the model training difficulty can be effectively reduced, the model accuracy can be improved, and higher quality data support can be provided for accurate segmentation of the lesion area in computer-aided diagnosis.
[0069] In recent years, the convolutional neural network based on full supervision has achieved good results in the field of medical image segmentation. However, one of the important factors for this advantage is that the full supervision segmentation algorithm needs a large amount of high-quality labeled training data, and the high-quality labeled data needs the professional knowledge and clinical experience of the staff, which consumes a lot of time and effort, making it difficult and expensive to obtain a large amount of labeled data. The lung CT image segmentation model construction method provided in the embodiment of the present application can alleviate this problem by using limited labeled data and rich unlabeled data, which is closer to the clinical actual data and adapts to the clinical conditions in reality.
[0070] Specifically, in an embodiment, before the step S2, as shown in Figure 2 , the method further comprises the following steps:
[0071] Step S11: oversampling the three-dimensional data image. Specifically, the data imbalance condition can be handled by ROI oversampling. ROI (Region of Interest, ROI, region of interest) generates more samples with the same label by analyzing the rules of samples with few labels in the region of interest, so that the data tends to be balanced.
[0072] Step S12: resampling the three-dimensional data image after oversampling. Specifically, the digital image composed of discrete data after sampling is resampled according to the required pixel position or pixel spacing to form a new image after geometric transformation. Thus, the picture can achieve higher resolution and enhance useful information. The resampling of layer thickness can be realized by adjusting the spacing of Z-axis direction of three-dimensional data image.
[0073] Step S13: data augmentation is performed on the three-dimensional data image after the resampling processing. Specifically, by performing data augmentation on the image, the data diversity of the image is increased, and the effect of subsequent model training is improved.
[0074] Specifically, in an embodiment, the step S2 described above specifically includes the following steps: Figure 3
[0075] Step S21: randomly pair the unlabeled data images to generate multiple pairs of unlabeled image groups. Specifically, two samples are randomly sampled from the unlabeled data set:
[0076] (3) Step S22: interpolation calculation is performed based on the unlabeled image group to obtain a result as a pseudo label. Specifically, the pseudo label is generated:
[0077] Specifically, assuming that the data points of two unlabeled images are u a and u b , another unlabeled image data point is obtained by interpolation Mix λ (u a , u b ), wherein the formula Mix λ (u a , u b ) = λu a +(1-λ)u b , λ belongs to a hyperparameter. Let the parameter of the student network be θ, and the parameter of the teacher network be the exponential moving average of the student network parameter, that is, θ', the student network in the main doctor module is represented by f θ , and the teacher network is represented by f θ′ . The output of the student network after the two unlabeled images are input to the student network after interpolation is represented as: f θ (Mix λ (u a , u b )), according to the formula Mix λ (u a , u b ) = λu a +(1-λ)u b , then the result of the unlabeled data after the network output and the interpolation can be represented as:
[0078] Mix λ (f(u a ), f(u b )) = λf(u a )+(1-λ)f(u b )
[0079] This process utilizes network learning and predicts the pixel-level segmentation map of the input image, and maintains consistency learning between the output after interpolation and the interpolated output map of the original image input.
[0080] Therefore, the unlabeled image samples in the dataset are used to generate new interpolated images and corresponding pseudo labels. This is to take two unlabeled images as input, and then return the interpolated image and the corresponding pseudo label, which is used by the network pipeline again. Therefore, the consistency regularization strategy can be represented as follows:
[0081] f θ (Mix λ (u a ,u b ))≈Mix λ (f θ′ (u a ),f θ′ (u b ))
[0082] This way of data mixing can help the model learn more robust features and improve learning on subsequent segmentation tasks.
[0083] Specifically, in an embodiment, the above-mentioned step S3, as shown in Figure 4 , specifically includes the following steps:
[0084] Step S31: input the labeled data image into the preset segmentation model, and calculate the supervised loss according to the output result, the preset segmentation model including the primary doctor segmentation model and the assistant doctor segmentation model. Specifically, the primary doctor segmentation model and the assistant doctor segmentation model are composed of a student network and a teacher network, and are trained by the ground truth of the labeled image and the image feature map.
[0085] Step S32: input the unlabeled data image with pseudo label into the preset segmentation model, and calculate the unsupervised loss according to the output result.
[0086] Specifically, the overall training objective function (total weighted loss) of the preset segmentation model is:
[0087]
[0088] Wherein, loss1 and loss2 are the supervised losses of the primary doctor segmentation model and the assistant doctor segmentation model, respectively, and loss3 and loss4 are the unsupervised losses of the primary doctor segmentation model and the assistant doctor segmentation model, respectively. Alpha: control the exponential moving average change rate of update rate (θ′=Δθ′ t-1 +(1-α)θ t ); Mix λ (u a ,ub ) x l u a + (1 - l) u b ; a1, a2, a3, a4 are weight coefficients for controlling the main doctor segmentation model and the assistant doctor segmentation model, and r(t) is a ramp function used to adjust the weight function of loss5 after each iteration.
[0089]
[0090] Since different doctors have different reading focuses on the lesion area for the same CT image, the main doctor segmentation model and the assistant doctor segmentation model can learn from each other in two ways to improve the segmentation accuracy.
[0091] Specifically, in an embodiment, the step S31 described above specifically includes the following steps as shown in Figure 5 .
[0092] Step S311: inputting the labeled data image into the main doctor segmentation model to obtain a first feature map.
[0093] Step S312: analyzing the loss difference between the first feature map and the labeled data image to obtain a first supervised loss.
[0094] Step S313: inputting the first feature map into the assistant doctor segmentation model to obtain a second feature map.
[0095] Step S314: analyzing the loss difference between the second feature map and the first feature map to obtain a second supervised loss.
[0096] Specifically, it is assumed that N labeled data and M unlabeled data are obtained, the labeled data set is represented as , and the unlabeled data set is represented as The unlabeled data is divided into M1 and M2, where M1+M2=M, loss1 is the first supervised loss, and loss2 is the second supervised loss.
[0097]
[0098]
[0099] where the supervised loss function l seg and l assist adopt cross-entropy loss.
[0100] where f seg represents the main doctor segmentation model, f assist represents the assistant doctor segmentation model, The feature map is generated from the labeled data in the primary doctor segmentation model. The labeled data is used to train the student network in the primary doctor module and the assistant doctor module. The parameters of the assistant teacher network are obtained through the exponential moving average (EMA) of the assistant student network.
[0101] Specifically, in an embodiment, the step S32 described above specifically includes the following steps as shown in the figure: Figure 6
[0102] Step S321: input the unlabeled data image with pseudo-label into the primary doctor segmentation model to obtain a third feature map.
[0103] Step S322: analyze the loss difference between the third feature map and the unlabeled data image with pseudo-label to obtain a first unsupervised loss.
[0104] Step S323: input the third feature map into the assistant doctor segmentation model to obtain a fourth feature map.
[0105] Step S324: analyze the loss difference between the fourth feature map and the third feature map to obtain a second unsupervised loss.
[0106] Specifically, the first unsupervised loss loss3 and the second unsupervised loss loss4 are:
[0107]
[0108]
[0109] wherein, L con is an unsupervised consistency loss function, which improves the utilization of unlabeled data by calculating the unsupervised consistency loss of the primary doctor model and the assistant doctor model.
[0110] Specifically, in an embodiment, the step S4 described above specifically includes the following steps as shown in the figure: Figure 7
[0111] Step S41: input the unlabeled data image into the primary doctor segmentation model in the preset segmentation model to obtain an output image.
[0112] Step S42: perform interpolation processing on the output image to obtain a first interpolation image. Specifically, the interpolation operation process is: u c =Mix λ (u a , u b ), Mix λ (y a , y b ), and the result output after interpolation through the network is: f θ (u c ).
[0113] Step S43: Input the unlabeled data image with pseudo-labels into the main doctor segmentation model to obtain the predicted image.
[0114] Step S44: Perform consistency analysis on the first interpolated image based on the predicted image to obtain the interpolation consistency loss.
[0115] Specifically, the network is trained by calculating the interpolation consistency loss through pixel-level data perturbation as a consistency regularization method, ensuring stable and accurate segmentation from the interpolated image points. Loss 5 is achieved by applying a mini-batch (u) to each sample. a u b ) and pseudo-tags The combined calculation results, where θ′ is obtained by the exponential moving average of θ, are used to calculate the prediction results. After interpolation, the original image is input into the student network within the main image segmentation model. Where u c =Mix λ (u a u b During training, the parameters θ are updated to improve the model's prediction of the result y. c Mix interpolation results that are closer to pseudo-labels λ (y a y b In each round of loss calculation, MSE loss was used. Therefore, the interpolation consistency loss of the main physician segmentation model can be expressed as:
[0116]
[0117] The parameters of the teacher network in the main doctor module and assistant doctor module are automatically generated from the parameters of the student network, so this is a self-integrated model. The parameters of the teacher network can be expressed by the following formula:
[0118] θ′=αθ′ t-1 +(1-α)θ t
[0119] Where, θ t These are the parameters of the student network at training epoch t, while θ′ t These are the parameters of the teacher network at training epoch t, where α is the EMA decay rate controlling the update rate, typically between 0.9 and 0.999. This is used to calculate the overall loss. Then, the parameters θ′ and θ are updated through gradient calculation.
[0120] A lung CT image segmentation model construction device is also provided in the embodiment, which is used to implement the above-mentioned embodiments and preferred embodiments, and details are not described herein again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0121] The embodiment provides a lung CT image segmentation model construction device, as shown in the accompanying drawings, comprising: Figure 8
[0122] The acquisition module 101 is configured to acquire a plurality of three-dimensional data images of lung CT, wherein the three-dimensional data images comprise labeled data images and unlabeled data images, and details are described in the step S1 of the above-mentioned method embodiment.
[0123] The interpolation module 102 is configured to perform interpolation processing on the unlabeled data images to generate pseudo labels, and details are described in the step S2 of the above-mentioned method embodiment.
[0124] The first loss module 103 is configured to input the labeled data images and the unlabeled data images with the pseudo labels into a preset segmentation model respectively, and analyze supervised loss and unsupervised loss according to output results, and details are described in the step S3 of the above-mentioned method embodiment.
[0125] The second loss module 104 is configured to calculate interpolation consistency loss according to the unlabeled data images and the pseudo labels, and details are described in the step S4 of the above-mentioned method embodiment.
[0126] The total loss calculation module 105 is configured to obtain total weighted loss of the preset segmentation model through the supervised loss, the unsupervised loss and the interpolation consistency loss, and details are described in the step S5 of the above-mentioned method embodiment.
[0127] The parameter adjustment module 106 is configured to update model parameters of the preset segmentation model according to the total weighted loss, and return to the step of acquiring a plurality of three-dimensional data images of lung CT until the model precision reaches a preset threshold, and details are described in the step S6 of the above-mentioned method embodiment.
[0128] The lung CT image segmentation model construction device in this embodiment is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0129] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0130] According to embodiments of the present invention, an electronic device is also provided, such as... Figure 9 As shown, the electronic device may include a processor 901 and a memory 902, wherein the processor 901 and the memory 902 may be connected via a bus or other means. Figure 9 Taking the example of a connection between China and Israel via a bus.
[0131] Processor 901 can be a Central Processing Unit (CPU). Processor 901 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0132] The memory 902, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the method embodiments of the present invention. The processor 901 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 902, thereby implementing the methods in the above method embodiments.
[0133] The memory 902 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor 901, etc. Furthermore, the memory 902 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 902 may optionally include memory remotely located relative to the processor 901, and these remote memories may be connected to the processor 901 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0134] One or more modules are stored in the memory 902, and when executed by the processor 901, perform the methods in the above-described method embodiments.
[0135] The above-described electronic device specific details can be understood in correspondence with the above-described method embodiments corresponding to the relevant description and effects, which will not be described here.
[0136] Those skilled in the art can understand that all or part of the processes in the above-described embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-described embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc. The storage medium can also include a combination of the above-mentioned types of memories.
[0137] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A method for constructing a lung CT image segmentation model, characterized in that, The method comprises the following steps: obtaining a plurality of three-dimensional data images of lung CT, wherein the three-dimensional data images comprise labeled data images and unlabeled data images; interpolating the unlabeled data images to generate pseudo labels; inputting the labeled data images and the unlabeled data images with the pseudo labels into a preset segmentation model respectively, and analyzing supervised loss and unsupervised loss according to the output results; calculating interpolation consistency loss according to the unlabeled data images and the pseudo labels; obtaining total weighted loss of the preset segmentation model through the supervised loss, the unsupervised loss and the interpolation consistency loss; updating model parameters of the preset segmentation model according to the total weighted loss, and returning to the step of obtaining a plurality of three-dimensional data images of lung CT until the model precision reaches a preset threshold; the training objective function of the preset segmentation model as a whole is: ; wherein, , are supervised losses of the primary physician segmentation model and the assistant physician segmentation model, respectively, , are unsupervised losses of the primary physician segmentation model and the assistant physician segmentation model, respectively, , , , belong to weight coefficients of controlling the primary physician segmentation model and the assistant physician segmentation model, is a ramp function used to adjust the weight function of after each iteration; is an interpolation consistency loss of the primary physician segmentation model. 2.The method of claim 1, wherein, the step of inputting the labeled data images and the unlabeled data images with the pseudo labels into the preset segmentation model respectively and analyzing the supervised loss and the unsupervised loss according to the output results comprises: inputting the labeled data images into the preset segmentation model, and calculating the supervised loss according to the output results, wherein the preset segmentation model comprises a main doctor segmentation model and an assistant doctor segmentation model; inputting the unlabeled data images with the pseudo labels into the preset segmentation model, and calculating the unsupervised loss according to the output results. 3.The method of claim 2, wherein, the step of inputting the labeled data images into the preset segmentation model and calculating the supervised loss according to the output results comprises: inputting the labeled data images into the main doctor segmentation model to obtain a first feature map; analyzing the loss difference between the first feature map and the labeled data images to obtain a first supervised loss; inputting the first feature map into the assistant doctor segmentation model to obtain a second feature map; analyzing the loss difference between the second feature map and the first feature map to obtain a second supervised loss. 4.The method of claim 2, wherein, the step of inputting the unlabeled data images with the pseudo labels into the preset segmentation model and calculating the unsupervised loss according to the output results comprises: inputting the unlabeled data images with the pseudo labels into the main doctor segmentation model to obtain a third feature map; analyzing the loss difference between the third feature map and the unlabeled data images with the pseudo labels to obtain a first unsupervised loss; inputting the third feature map into the assistant doctor segmentation model to obtain a fourth feature map; analyzing the loss difference between the fourth feature map and the third feature map to obtain a second unsupervised loss. 5.The method of claim 1, wherein, the step of interpolating the unlabeled data images to generate pseudo labels comprises: randomly pairing the unlabeled data images to generate a plurality of pairs of unlabeled image groups; based on the unlabeled image groups, interpolating calculation is performed to obtain a result as a pseudo label. 6.The method of claim 1, wherein, the step of calculating interpolation consistency loss according to the unlabeled data images and the pseudo labels comprises: inputting the unlabeled data images into the main doctor segmentation model in the preset segmentation model to obtain an output image; interpolating the output image to obtain a first interpolation image; input the unlabeled data image with the pseudo label into the main doctor segmentation model to obtain a predicted image; perform consistency analysis on the first interpolation image according to the predicted image to obtain an interpolation consistency loss. 7.The method of claim 1, wherein, Before the interpolation processing is performed on the unlabeled data image to generate the pseudo label, the method further comprises: performing oversampling processing on the three-dimensional data image; performing resampling processing on the three-dimensional data image after the oversampling processing; performing data enhancement on the three-dimensional data image after the resampling processing. 8.A lung CT image segmentation model construction device, characterized by comprising: Comprise: an acquisition module configured to acquire a plurality of three-dimensional data images of lung CTs, the three-dimensional data images comprising labeled data images and unlabeled data images; an interpolation module configured to perform interpolation processing on the unlabeled data images to generate pseudo labels; a first loss module configured to input the labeled data images and the unlabeled data images with the pseudo labels into a preset segmentation model respectively, and analyze supervised loss and unsupervised loss according to output results; a second loss module configured to calculate an interpolation consistency loss according to the unlabeled data images and the pseudo labels; a total loss calculation module configured to obtain a total weighted loss of the preset segmentation model through the supervised loss, the unsupervised loss and the interpolation consistency loss; a parameter adjustment module configured to update model parameters of the preset segmentation model according to the total weighted loss, and return to the step of acquiring the plurality of three-dimensional data images of lung CTs until the model precision reaches a preset threshold; the training objective function of the preset segmentation model as a whole is: ; wherein, , are supervised losses of the primary physician segmentation model and the assistant physician segmentation model, respectively, , are unsupervised losses of the primary physician segmentation model and the assistant physician segmentation model, respectively, , , , belong to weight coefficients of controlling the primary physician segmentation model and the assistant physician segmentation model, is a ramp function used to adjust the weight function of after each iteration; is an interpolation consistency loss of the primary physician segmentation model.
9. An electronic device, comprising: Comprise: a memory and a processor, which are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the lung CT image segmentation model construction method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a computer to perform the lung CT image segmentation model construction method in any one of claims 1-7.
Citation Information
Patent Citations
Coarse-to-fine image dense matching method, system and device and storage medium
CN114429555A
Integrated cross pseudo tag-based tumor image semi-supervised segmentation method
CN115393289A