A COVID-19 CT Image Segmentation Method Based on CGAN
Through the CGAN-based CT image segmentation method of COVID-19, the improved Deeplabv3+ network and PatchGAN discriminator were used to solve the problem of adaptability and efficiency of lesion area segmentation of COVID-19 CT image, and high-precision and efficient lesion recognition were achieved.
Patent Information
- Application Number
- CN202210351069.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-04-02
AI Technical Summary
The prior art has poor adaptability in the lesion region segmentation of CT images of COVID-19, low segmentation accuracy and efficiency, and large parameters of deep convolutional neural networks, long segmentation time and poor robustness.
The CGAN-based CT image segmentation method of COVID-19 is adopted, and the improved Deeplabv3+ network is used as the generator, combined with mobilenetv2 network and CBAM module for feature extraction, and a 6-layer fully convolutional layer PatchGAN discriminator was constructed. The Nash equalization between the generator and the discriminator was trained through CGAN, and the segmentation effect was optimized with the L1 distance loss function.
The segmentation accuracy and running speed of the lesion area of the CT image of the new coronary pneumonia was improved, the network parameters were reduced, and the segmentation efficiency and robustness of the model were improved.
Smart Images

Figure CN114708278B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical image processing in deep learning, and specifically relates to the problem of improving the segmentation accuracy and performance of COVID-19 CT images, and proposes a COVID-19 CT image segmentation method based on CGAN. Background Art
[0002] Since the emergence of coronavirus disease 2019 (COVID-19), it has rapidly spread in local areas and spread to the whole world, attracting global attention. The World Health Organization declared the COVID-19 epidemic a public health emergency of international concern and confirmed it as a pandemic on March 11, 2020, which has caused great public health concern in the international community. Reverse transcription polymerase chain reaction (RT-PCR) has been established as the gold standard for COVID-19 screening. RT-PCR can detect viral RNA in specimens obtained by nasopharyngeal swabs, oropharyngeal swabs, bronchoalveolar lavage fluid or tracheal aspirates. However, various recent studies have shown that the sensitivity of RT-PCR detection is relatively low, about 71%, and repeated testing is required for accurate diagnosis. In addition, due to the lack of necessary materials, screening for COVID-19 by RT-PCR is very time-consuming and causes a huge pressure on medical resource consumption.
[0003] The alternative to RT-PCR for screening COVID-19 is medical imaging techniques, such as X-rays or computed tomography (CT), especially CT imaging plays an important role in the quantitative assessment and disease monitoring of COVID-19. On CT images, the infected area of COVID-19 in the initial stage of infection can be distinguished by ground-glass nodules in the lungs, and in the later stage of infection, it can be distinguished by pulmonary consolidation. Compared with RT-PCR, multiple studies have shown that chest CT imaging is more sensitive and effective for COVID-19 detection even without clinical symptoms. Generally, doctors diagnose whether the patient's lungs are infected with COVID-19 by viewing the patient's CT images. However, the ground-glass nodules in the lungs in the initial stage of infection are not obvious in CT images, and experienced doctors are needed to accurately identify and mark the infected area. If doctors lack experience or are not careful enough in diagnosis, it may lead to misdiagnosis of COVID-19. In addition, COVID-19 is characterized by fast transmission speed and wide influence area, and patients need to have a CT examination every 5 days during the treatment period. Calculated based on 300 images per chest CT, it takes 5-15 minutes for doctors to read the images manually, resulting in a huge increase in the pressure on medical resources in the short term. The rapid and accurate identification of chest CT images has become a major constraint on the diagnosis of COVID-19 worldwide. To accelerate the diagnosis speed of COVID-19 and reduce the occurrence of human misdiagnosis and missed diagnosis, the development of an automatic segmentation method for the CT infected area of COVID-19 is crucial for disease identification and prevention and control.
[0004] In recent years, scholars have proposed a large number of methods for the automatic segmentation of COVID-19 lesion regions. For example, Xu et al. proposed a smart diagnosis model for COVID-19 in chest CT combining deep learning and radiomics, using an AI model based on deep learning to achieve automatic segmentation of pneumonia lesions, extracting radiomics features from the lesion regions of each frame of image, and finally establishing a radiomics model. Song et al. proposed an improved U-Net method for COVID-19 image segmentation, using a pre-trained network in the encoder to extract features of effective information, and replacing the traditional upsampling operation with a new data-dependent upsampling structure in the decoder to fully obtain the detailed feature information of the lesion edges and improve the segmentation accuracy. Although some deep learning methods have helped in the diagnosis of COVID-19 and the segmentation of lung lesion regions, the overall effect is still not ideal. Because the size and location of the infected lesions in actual COVID-19 CT slices are changing at all times, the target lesion area has many irrelevant features, and the boundaries of the ground-glass area usually have low contrast and blurred appearance, making it difficult to identify, resulting in poor segmentation effect and weak adaptability of the model. In addition, most of the existing methods use deep convolutional neural networks, with a huge number of network parameters and a relatively long overall segmentation time, resulting in low efficiency and poor robustness of the model's automatic segmentation. Summary of the Invention
[0005] The purpose of the present invention is to propose a method for segmenting COVID-19 CT images based on CGAN in view of the deficiencies of the existing technology. This method can not only solve the problem of poor adaptability in segmenting COVID-19 lesion regions, but also achieve ideal results in terms of segmentation accuracy and running speed.
[0006] To achieve the above purpose, a method for segmenting COVID-19 CT images based on CGAN of the present invention specifically includes the following steps:
[0007] (1) Dataset preprocessing:
[0008] (1a) Uniformly crop the obtained COVID-19 CT images into a size of 512×512×3, and expand the dataset to a certain scale through mirroring and rotation methods;
[0009] (1b) Use the median filtering algorithm to remove the salt-and-pepper noise generated by the differences of various lung tissues and organs and quantum statistical fluctuations during the imaging process of CT chest radiographs;
[0010] (1c) Use gamma transformation to correct the gray value of CT chest radiographs, enhance the contrast of lung CT images, and improve image details;
[0011] (2) Randomly divide the preprocessed dataset into a training set, a test set, and a validation set according to a ratio of 3:1:1;
[0012] (3) Build a generator based on the Deeplabv3+ network:
[0013] (3a) Use the mobilenetv2 network to replace the original xception network as the backbone of the Deeplabv3+ model;
[0014] (3b) Use a dense prediction unit based on neural architecture search to replace the original Atrous Spatial Pyramid Pooling (ASPP) structure; By searching 2.8×10 4 dense prediction units on 370 GPUs, an optimal DPC architecture was obtained, which outperformed the ASPP model in feature extraction performance on multiple datasets;
[0015] (3c) Add a CBAM module composed of a channel attention mechanism and a spatial attention mechanism in series between the mobilenetv2 network and the DPC architecture;
[0016] (4) Build a discriminator based on PatchGAN:
[0017] (4a) Design a convolutional neural network with 6 fully convolutional layers. Except for the last convolutional layer, each convolutional layer includes batch normalization and the Leaky ReLU activation function. Each convolutional kernel size is 3×3, the convolutional stride of each intermediate layer is 2, the stride of the last layer is 1, and the number of feature channels of the intermediate layers are 6, 64, 128, 256, and 512 respectively;
[0018] (4b) For the final output layer, use the Sigmoid activation function to ensure that the generated data values are all constrained to (0,1);
[0019] (5) Objective function setting:
[0020] (5a) The optimization process of the CGAN network is to find the Nash equilibrium between the generator and the discriminator, and the objective function is expressed as: L cGAN (D,G)=E x,y [logD(x,y)]+E x [log(1-D(x,G(x)))]
[0021] where x is the original COVID-19 CT image as input, y is the manually segmented annotation image, the function D(x, y) represents the probability that the input image in the discriminator comes from the manual annotation, and D(x, G(x)) represents the probability that the input image in the discriminator comes from the generator;
[0022] (5b) The optimization direction of the entire model is to maximize the probability that the discriminator can correctly identify whether the image is from the image generated by the generator or the manually labeled image, while minimizing the probability that the sample data generated by the generator is identified by the discriminator. The objective function is expressed as:
[0023] (5c) To make the segmented image generated by the generator closer to the standard segmented image of manual annotation, the L1 distance is added to the loss function, and the formula is: L L1 (G) = E x,y [||y - G(x, y)||]
[0024] (5d) Combine the objective function of CGAN and the L1 distance loss function, set λ = 100 to balance the values of the two functions, and the new objective function is expressed as: L * = G * + λL L1 (G)
[0025] (6) Train the COVID-19 CT image segmentation network based on CGAN:
[0026] (6a) Set the maximum number of training iterations to 100. The parameter learning in the backpropagation process of the network uses the Adam optimizer (β1 = 0.5, β2 = 0.99, ε = 1e-7), the learning rate lr = 0.001, and mini-batch = 1;
[0027] (6b) Fix the generator and keep the model parameters of the segmentation network unchanged, and train the discriminator;
[0028] (6c) Fix the discriminator and keep the model parameters of the discriminator network unchanged, and train the generator;
[0029] (6d) Repeat the steps of (6b) and (6c) for all samples in the training set samples to complete one training. Through multiple trainings and repeated optimizations, the training ends when the sample image generated by the generator is identified by the discriminator as a manually labeled image;
[0030] (7) Input the test set into the network trained in (6d) to obtain the segmentation result of the test set and the model segmentation performance evaluation index. Description of the Drawings
[0031] The drawings are only for more fully explaining the process of the present invention and do not constitute a limitation on the scope of the present invention.
[0032] Figure 1 It is a flowchart for implementing the method of the present invention;
[0033] Figure 2This is the effect diagram of amplifying, denoising, and enhancing the CT images of COVID-19 by the present invention;
[0034] Figure 3 This is the network structure diagram of the generator based on Deeplabv3+ proposed by the present invention;
[0035] Figure 4 This is the network structure diagram of the discriminator based on PatchGAN proposed by the present invention;
[0036] Figure 5 This is the overall network structure diagram of the COVID-19 CT image segmentation model based on CGAN proposed by the present invention;
[0037] Figure 6 This is the comparison diagram of the segmentation effects of the COVID-19 CT image lesion areas by the method of the present invention and the existing medical image segmentation methods; Specific implementation
[0038] The embodiments and effects of the present invention will be further described in detail below with reference to the accompanying drawings.
[0039] See Figure 1 , the specific implementation steps of the present invention are as follows:
[0040] Step 1, dataset preprocessing.
[0041] 1.1) Since the obtained COVID-19 CT images come from different hospitals and channels, the image sizes are different and the data volume is scarce, which is not enough to support the training of the subsequent model. Therefore, the original images are first uniformly cropped to a size of 512×512×3, and then the dataset is amplified to a certain scale by mirroring and rotating, so as to improve the adaptability of the model and avoid overfitting during the training process. The image amplification effect is as shown in Figure 2 (a);
[0042] 1.2) Since there are alveoli, alveolar walls, blood vessels, bronchi, connective tissues, and air in the lungs, and these tissues have different attenuation coefficients for X-rays, point-like or granular holes will appear in the CT images after imaging, similar to salt-and-pepper noise. The present invention uses the median filtering method to denoise the salt-and-pepper noise in the lung CT images:
[0043] g(x,y) = Median W {f(i,j)}
[0044] where W represents the filtering window, f(i,j) is the gray value of the pixel, g(x,y) is the gray value of the pixel in the lung CT image after median filtering, and Median W {.} represents taking the values within the window W. The window size used in this method is 3×3. The denoising effect is as shown in Figure 2(as shown in (b));
[0045] 1.3) Since the lung CT chest radiograph has problems such as low contrast with other tissues and unclear details in both dark and bright parts, the gamma transformation method is used to correct the gray value of the CT chest radiograph, and the image with inconsistent gray values is transformed. The transformation principle is to perform a multiplication operation on each pixel value of the original image, and the transformation function is:
[0046] where A is the gray scale coefficient, which is used to stretch the image gray scale and usually takes the value of 1, V in is the input gray level, V out is the output gray level, and γ is the gray transformation coefficient. When γ > 1, it has a stretching effect on the image gray histogram, making the gray scale extend to high gray values; when γ < 1, it has a shrinking effect on the image gray histogram, making the image gray scale approach the low gray value direction. After many experiments, when γ takes 1.5, the effect is the best. The effect after enhancing the contrast is as shown in Figure 2 (c);
[0047] Step 2: Randomly divide the preprocessed data set into a training set, a test set, and a validation set according to the ratio of 3:1:1.
[0048] Step 3: Construct a generator based on the Deeplabv3+ network. The network structure diagram is as shown in Figure 3 ;
[0049] 3.1) The backbone network used in the original Deeplabv3+ model is the improved xception network, but this network has a large number of parameters, a large amount of computation, and a slow training speed. The present invention uses the mobilenetv2 lightweight backbone network for network compression, reduces the number of network parameters, improves the training speed, and does not require high hardware resource requirements.
[0050] 3.2) Since the present invention uses the mobilenetv2 network as the backbone of the Deeplabv3+ model, while reducing the number of network parameters, it will cause a decline in the model's performance in processing image features. Therefore, the present invention adds a CBAM module composed of a channel attention mechanism and a spatial attention mechanism in series at the output end of the mobilenetv2 network, which not only improves the model stability but also makes the extraction of lung CT image features pay more attention to the target object itself.
[0051] 3.3) Use a dense prediction unit based on neural architecture search to replace the original ASPP structure. By searching on 370 GPUs for 2.8×10 4A dense prediction unit was used to obtain an optimal DPC architecture, which outperformed the ASPP model in feature extraction performance on multiple datasets. The architecture consists of 5 convolutions with a size of 3×3, and the sampling rates are 6×3, 18×15, 6×21, 1×1, and 1×6 respectively.
[0052] Step 4: Construct a discriminator based on the PatchGAN network. The network structure diagram is as Figure 4 shown.
[0053] 4.1) Design a convolutional neural network with 6 fully convolutional layers. Except for the last convolutional layer, each convolutional layer includes a batch normalization layer and a Leaky ReLU activation function. Each convolutional kernel has a size of 3×3. The convolutional stride of each intermediate layer is 2, and the stride of the last layer is 1. The number of feature channels in the intermediate layers is 6, 64, 128, 256, and 512 respectively.
[0054] 4.2) For the final output layer, use the Sigmoid activation function to ensure that the generated data values are all constrained within (0,1). Assume the input size is 512×512×3. After the data passes through the first convolution, it undergoes batch normalization and activation function processing to obtain a feature map with a size of 256×256×6. Then, through the remaining convolutional operations, the final classification output is a feature map of 16×16×1.
[0055] Step 5: Set the objective function.
[0056] 5.1) The optimization process of the CGAN network is to find the Nash equilibrium between the generator and the discriminator. The objective function is expressed as: L cGAN (D,G) = E x,y [logD(x,y)] + E x [log(1 - D(x,G(x)))]
[0057] where x is the original COVID-19 CT image as the input, y is the manually segmented annotation image, the function D(x,y) represents the probability that the input image in the discriminator comes from the manual annotation, and D(x,G(x)) represents the probability that the input image in the discriminator comes from the generator.
[0058] 5.2) The optimization direction of the entire model is to maximize the probability that the discriminator can correctly identify whether the image comes from the image generated by the generator or the manually annotated image, and at the same time minimize the probability that the sample data generated by the generator is identified by the discriminator. The objective function is expressed as:
[0059] 5.3) In order to make the segmented image generated by the generator closer to the standard segmented image of the manual annotation, the L1 distance is added to the loss function. The formula is: L L1 (G) = Ex,y [Py-G(x,y)P]
[0060] (5.4) Combine the objective function of the CGAN and the L1 distance loss function, set λ = 100 to balance the values of the two functions, and the new objective function is expressed as: L * = G * + λL L1 (G)
[0061] Step 6, refer to Figure 5 , and train the COVID-19 CT image segmentation network based on the CGAN.
[0062] (6a) Set the maximum number of training iterations to 100. The Adam optimizer (β1 = 0.5, β2 = 0.99, ε = 1e-7) is used for parameter learning during the backpropagation of the network, the learning rate lr = 0.001, and mini-batch = 1;
[0063] (6b) Fix the generator and keep the model parameters of the segmentation network unchanged, and train the discriminator. The main purpose of separate training is to enable the discriminative model to have the ability to distinguish between real and fake images. The training process is as follows:
[0064] Synchronously input the original image x and the real label image y into the discriminative network D. Since it has been determined that the input is a real sample label, the label should be true when calculating its loss function, that is, the result theoretically output by the discriminative network D should be "1". By comparing the difference between the actual output result of the discriminative network D and the theoretical output result "1", and then using the backpropagation algorithm to update the discriminative network.
[0065] Input the original image x into the generative network G and obtain the generated image G(x) output by the generative network G. Input the image x and the image G(x) into the discriminative network D at the same time. Since it has been determined that the input is a fake sample label, the label should be false when calculating its loss function, that is, the result theoretically output by the discriminative network D should be "0". By comparing the difference between the actual output result of the discriminative network D and the theoretical output result "0", and then using the backpropagation algorithm to update the discriminative network.
[0066] (6c) Fix the discriminator and keep the model parameters of the discriminative network unchanged, and train the generator. The purpose of training is to enable the generator to generate a precisely segmented image through the segmentation network for the input original image. This segmented image looks realistic enough to deceive the discriminator and make it unable to distinguish it from the labeled image. The training process is as follows:
[0067] The original image is input into the generation network G to generate a segmented image G(x), and then the value of the L1 distance loss function between G(x) and the true label image y is calculated.
[0068] The segmented image G(x) and the original image x are input into the discriminator network D. After training, the discriminator network has a certain ability to distinguish true from false, so the value of its loss function can reflect the similarity between the segmented image G(x) and the labeled image.
[0069] Combining the spatial distance between the segmented image and the labeled image and the similarity degree output by the discriminator network, and then backpropagating to update the parameters of the generator G.
[0070] (6d) Repeat the steps of (6b) and (6c) for all samples in the training set samples to complete one training. Through multiple trainings, the weights are repeatedly optimized, and the training ends when the sample image generated by the generator is identified by the discriminator as an artificially labeled image.
[0071] Step 7, input the test set divided in Step 2 into the COVID-19 CT image segmentation model based on CGAN trained in Step 6 to obtain the segmentation results of the test set and the model segmentation performance evaluation indicators.
[0072] The advantages and feasibility of the present invention will be illustrated through the analysis of experimental results below.
[0073] The experimental environment of the present invention is the Ubuntu18.04 operating system, configured with an Intel i7-9700k, a turbo frequency of 4.9G CPU, and an NVIDIA RTX A6000 GPU, using the Pytorch deep learning framework, and the development language is Python.
[0074] As Figure 6 shown, the CT images of COVID-19 patients are segmented using the method of the present invention and the existing medical image segmentation method respectively, and 3 different CT image segmentation effect diagrams are selected for comparison. Figure (a) is the original CT image of the lungs input into the model, Figure (b) is the gold standard of the ground-glass contour of the lungs marked by doctors, Figure (c) is the result of segmenting the ground-glass of the lungs using the method of the present invention, Figure (d) is the result of segmenting using the U-net network, and Figure (e) is the result of segmenting using the Deeplabv3+ network. By Figure 6It can be seen that there are phenomena of missed segmentation and excessive segmentation for the details of ground-glass in several methods. When the lesion area is simple and clear, all three methods can obtain relatively accurate segmentation results, and the method of the present invention is closest to the gold standard of the ground-glass contour of the lungs; when the lesion area is more complex, this method can obtain accurate segmentation results, but the other two methods have relatively blurred segmentation for the lesion edge area, showing the phenomenon of excessive segmentation, and the segmentation effect of the Deeplabv3+ network is the worst; when the lesion area is large and contains small target lesions, the method of the present invention can still obtain accurate segmentation results, but the other two methods all have different degrees of detail loss and missed segmentation phenomena.
[0075] To further verify the effectiveness of the method of the present invention, the quantitative indicators of the CT image segmentation of COVID-19 patients are calculated for the method of the present invention and the existing medical image segmentation methods respectively, and the results are shown in Table 1.
[0076]
[0077] Table 1
[0078] In Table 1, MIoU represents the mean intersection over union, and MPA represents the mean pixel accuracy. It can be seen from Table 1 that the mean intersection over union and mean pixel accuracy indicators of the method of the present invention for the lesion area segmentation of COVID-19 patients' CT images are higher than those of the existing methods, indicating that the method of the present invention has a better segmentation effect; at the same time, the processing time of the method of the present invention for a single picture is about 0.116 s, which is lower than the processing time of the existing methods, indicating that the method of the present invention has a higher operation efficiency.
[0079] In summary, through experimental comparison, it is proved that the method of the present invention can effectively avoid the problem of detail loss in the model segmentation process, improve the segmentation effect of the lesion area edge; at the same time, it greatly reduces the number of network parameters and improves the overall segmentation efficiency of the model, and can be used for the lesion recognition of COVID-19 CT images.
Claims
1. A method for segmenting COVID-19 CT images based on CGAN, characterized by including: (1) Dataset preprocessing: (1a) Uniformly crop the obtained COVID-19 CT images into a size of 512×512×3, and expand the dataset to a certain scale through mirroring and rotation methods; (1b) Use the median filtering algorithm to remove the salt-and-pepper noise generated by the differences of various lung tissues and organs and quantum statistical fluctuations during the imaging process of the CT chest radiograph; (1c) Use gamma transformation to correct the gray value of the CT chest radiograph, enhance the contrast of the lung CT image, and improve the image details; (2) Randomly divide the preprocessed dataset into a training set, a test set, and a validation set according to a ratio of 3:1:1; (3) Construct a generator based on the Deeplabv3+ network: (3a) Use the mobilenetv2 network to replace the original xception network as the backbone of the Deeplabv3+ model; (3b) Replace the original Atrous Spatial Pyramid Pooling (ASPP) structure with a dense prediction unit based on neural architecture search; by searching for 2.8×10 4 dense prediction units on 370 GPUs, an optimal DPC architecture is obtained, which outperforms the ASPP model in feature extraction performance on multiple datasets; (3c) Add a CBAM module composed of a channel attention mechanism and a spatial attention mechanism in series between the mobilenetv2 network and the DPC architecture; (4) Construct a discriminator based on PatchGAN: (4a) Design a convolutional neural network with 6 fully convolutional layers. Except for the last convolutional layer, each convolutional layer includes batch normalization and a Leaky ReLU activation function. The size of each convolutional kernel is 3×3, the convolutional stride of each intermediate layer is 2, the stride of the last layer is 1, and the number of feature channels of the intermediate layers are 6, 64, 128, 256, and 512 respectively; (4b) For the final output layer, use the Sigmoid activation function to ensure that the generated data values are all constrained to (0,1); (5) Objective function setting: (5a) The optimization process of the CGAN network is to find the Nash equilibrium between the generator and the discriminator, and the objective function is expressed as: L cGAN (D, G) = E x,y [log D(x, y)] + E x [log(1 - D(x, G(x)))] Where x is the original COVID-19 CT image input, y is the manually segmented annotation image, the function D(x, y) represents the probability that the input image in the discriminator comes from the manual annotation, and D(x, G(x)) represents the probability that the input image in the discriminator comes from the generator; (5b) The optimization direction of the entire model is to maximize the probability that the discriminator can correctly identify whether the image is from the image generated by the generator or the manually labeled image, while minimizing the probability that the sample data generated by the generator is identified by the discriminator. The objective function is expressed as: (5c) Add the L1 distance to the loss function, and the formula is: L L1 (G) = E x,y [Py - G(x, y)P] (5d) Combine the objective function of CGAN and the L1 distance loss function, set λ = 100 to balance the values of the two functions, and the new objective function is expressed as: L * = G * + λL L1 (G) (6) Train the COVID-19 CT image segmentation network based on CGAN: (6a) Set the maximum number of training iterations to 100. Use the Adam optimizer (β1 = 0.5, β2 = 0.99, ε = 1e-7) for parameter learning during the backpropagation process of the network, the learning rate lr = 0.001, and mini-batch = 1; (6b) Fix the generator and keep the model parameters of the segmentation network unchanged, and train the discriminator; (6c) Synchronously input the original image x and the real label image y into the discriminant network D. Since it is determined that the input is a real sample label, the label should be true when calculating its loss function, that is, the result theoretically output by the discriminant network D is "1". By comparing the difference between the actual output result of the discriminant network D and the theoretical output result "1", and then using the backpropagation algorithm to update the discriminant network; (6d) Input the original image x into the generation network G, and obtain the generated image G(x) output by the generation network G. Input the image x and the image G(x) into the discriminant network D at the same time. Since it has been determined that the input is a false sample label, the label should be false when calculating its loss function, that is, the result theoretically output by the discriminant network D should be "0". By comparing the difference between the actual output result of the discriminant network D and the theoretical output result "0", the discriminant network is updated using the backpropagation algorithm; (6e) Fix the discriminator and keep the model parameters of the discriminant network unchanged, and train the generator; (6f) Input the original image into the generation network G to generate the segmented image G(x), and then calculate the L1 distance loss function value between G(x) and the true label image y; (6g) Input the segmented image G(x) and the original image x into the discriminator network D. After training, the discriminator network has a certain ability to distinguish true from false, so its loss function value can reflect the similarity between the segmented image G(x) and the labeled image; (6h) Combine the spatial distance between the segmented image and the labeled image and the similarity degree output by the discriminator network, and then update the parameters of the generator G by backpropagation; (6i) Repeat the steps of (6b) and (6c) for all samples in the training set samples to complete one training; through multiple trainings and repeated optimizations, the training ends when the sample image generated by the generator is identified by the discriminator as the manually annotated image; (7) Input the test set into the network trained in (6) to obtain the segmentation result of the test set for the COVID-19 lesion area and the segmentation performance evaluation indicators MIoU and MPA.