A construction method and application of MiSrc-GAN medical image model

Through the precision progressive generator, multi-scale discriminator and adversarial sample pairing module of the MiSrc-GAN model, the problems of insufficient annotation data and insufficient robustness in medical image generation are solved, and high-resolution image generation and anti-interference capabilities are achieved. promote.

CN113269256BActive Publication Date: 2024-08-27GUANGZHOU CIPHER CAMP INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110580757.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-26
Publication Date
2024-08-27
Estimated Expiration
2041-05-26

AI Technical Summary

Technical Problem

Existing medical image generation models have challenges in high-resolution image generation and robustness, especially due to insufficient annotation data and the impact of data perturbation, resulting in low generation quality and difficulty in training the model, which lacks anti-interference capabilities.

Method used

The MiSrc-GAN model is used to build an expanded training set through the precision progressive generator, multi-scale discriminator and adversarial sample pairing module, and conduct adversarial training to optimize the model. Combining the GAN framework and adversarial samples, it improves the robustness of the discriminator and accelerates the generator. Training,obtaining high-resolution medical images.

Benefits of technology

It effectively alleviates the problem of insufficient annotation data, improves the robustness and generation quality of the model, can generate high-resolution medical images, and maintains stability in the face of data disturbances and malicious attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113269256B
    Figure CN113269256B
Patent Text Reader

Abstract

The present invention discloses a construction method and application of a MiSrc-GAN medical image model, comprising the following steps: S1, inputting a real image dataset, wherein the image dataset comprises an input image set X and a target image set Y, pairing the input image and the target image to form a labeled training set (x i ,y i ); S2, construct a model framework, the model includes a precision progressive generator, a multi-scale discriminator and an adversarial sample pairing module, S3, expand the training set, and transform the input image set X into the image set to be generated Y′ through the precision progressive generator to form a generated training set (x i , y′ i ), the adversarial sample pairing module adds interference to the target image set Y to form an interference image set Y * , forming an adversarial training set (x i ,y i * ); S4, conduct adversarial training to optimize the model, use a multi-scale discriminator to perform discrimination at different scales based on the training set, and iteratively train the model to obtain the optimized model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and specifically to a construction method and application of a MiSrc-GAN medical image model. Background Art

[0002] Medical image generation is a key technology for computer-aided detection and diagnosis, and has a wide range of applications, including but not limited to medical image conversion, denoising, and segmentation. Generative adversarial networks (GANs) are the current mainstream image generation technology. Through adversarial training of generators and discriminators, they learn the distribution of real data to output realistic images. In recent years, research on medical image generation based on GANs has become a hot topic.

[0003] In order to generate high-resolution medical images, it is necessary to optimize the network structure of existing GANs. Early GANs could only generate low-resolution images because during the training process, the performance of the generator and the discriminator were required to be comparable. After multiple confrontations, Nash equilibrium was finally reached. High-resolution medical images mean complex feature spaces, which increases the difficulty of confrontation training and leads to a decrease in the quality of image generation. The existing technologies are as follows:

[0004] 1. DCGAN removes the pooling layer and the fully connected layer, and introduces batch normalization operations to generate images of size 64*64;

[0005] 2. LAPGAN uses a pyramid network structure to increase the resolution of generated images to 96*96;

[0006] 3. ACGAN improves the conditional generative adversarial network CGAN and designs auxiliary classifiers to utilize conditional information or label information in order to generate more ideal images, with a resolution of usually up to 128*128.

[0007] 4. The progressively trained PGGAN12 starts from low-resolution image generation and gradually transitions to higher-resolution image generation, achieving 1024*1024 image generation.

[0008] 5. pix2pixHD13 based on multi-scale generator and discriminator can generate 2048*2048 ultra-high resolution images.

[0009] However, the task of medical image generation faces the difficulty of insufficient labeled data. The more complex the GAN network structure is, the more difficult it is to converge during training, and the quality of image generation still needs to be improved. On the one hand, medical images have high resolution and insufficient labeled samples, making the model difficult to train and the quality of image generation limited; on the other hand, because the impact of data perturbations is not considered, the model is not robust and is easily attacked. Summary of the invention

[0010] The object of the present invention is to provide a method for constructing a MiSrc-GAN medical image model and its application, so as to alleviate the insufficient data of the training set and improve the robustness of the model.

[0011] The technical solution adopted by the present invention to solve the above technical problems is as follows:

[0012] A method for constructing a MiSrc-GAN medical image model includes the following steps:

[0013] S1. Input a real image dataset, which includes an input image set X and a target image set Y. Pair the input image and the target image to form a labeled training set (x i ,y i );

[0014] S2. Construct a model framework, wherein the model includes a precision progressive generator, a multi-scale discriminator, and an adversarial sample pairing module.

[0015] S3, expand the training set, transform the input image set X into the image set to be generated Y' through the precision progressive generator, and pair the input image and the image to be generated to form a generated training set (x i , y′ i ), the adversarial sample pairing module adds interference to the target image set Y to form an interference image set Y * , pair the input image and the interference image to form an adversarial training set (x i ,y i * );

[0016] S4. Perform adversarial training to optimize the model. Based on the training set, use a multi-scale discriminator to perform discrimination at different scales, calculate the loss function model parameters, and iteratively train the model to obtain the optimized MiSrc-GAN medical image model.

[0017] Furthermore, the precision progressive generator generates high-resolution images in a precision progressive manner, and includes a group of sub-generators with different resolutions, taking into account both the global features and local fine features of the generated image.

[0018] Furthermore, the steps of generating the interference image are as follows:

[0019] Assume δ is the target image y i The disturbance amount, L adv Represents the adversarial loss of the multi-scale discriminator

[0020] If lost, then:

[0021]

[0022] Among them, D k is the kth discriminator in the multi-scale discriminator, w d are the parameters of the discriminator network;

[0023] ||·||is l ∞ Paradigm, δ max Represents the disturbance threshold, L adv Select L2 loss, then:

[0024] y i * =y i +δ.

[0025] Furthermore, the pairing process of the adversarial training set includes the following steps:

[0026] Initialize the perturbation: δ = 0, where δ is a tensor and x i The dimensions are the same, for i=1to step, the number of adversarial sample pairing iterations step;

[0027] Initialize temporary adversarial sample: emp y i * =y i +δ;{x i , temp y i *} Input the multi-scale discriminator, pass through the network forward propagation, and output: iResult = {iResult1, iResult2, iResult3};

[0028] Calculate the L2 loss of each element in iResult and the true label l, and sum them up to get the adversarial loss L adv , where the true label 1 is a tensor with the same dimension as each element in iResult;

[0029] Taking Ladv maximization as the optimization goal, the multi-scale discriminator back-propagates to obtain the gradient grad, and calculates the perturbation amount: δ = epsIter*sign(grad). Among them, sign is the sign function, and epsIter is the step size of each adversarial attack;

[0030] Update the temporary adversarial sample: temp yi*=temp yi*+δ, and limit the perturbation amount to fall within the truncation interval:

[0031] δ=clip(temp y i * , clipM in, clipM ax)-y i. Wherein, clip is an interval cutoff function, which limits the disturbance amount to no more than a threshold: δ = clip(δ, -∞, eps), eps is the disturbance amount threshold for each adversarial attack;

[0032] end for, update the adversarial sample: yi*=yi+δ, limit the adversarial sample to fall within the truncation interval: yi*=clip(y i * , clipM in, clipM ax)

[0033] Construct adversarial training set pairing: (x i ,y i * ).

[0034] Furthermore, the objective function of the model is:

[0035] min G max D L real +L fake +α*L a +λ*L FM +μ*L VGG , where α, λ, and μ are weight indices;

[0036] Since the model framework includes three components: the precision progressive generator, the multi-scale discriminator, and the adversarial sample pairing module, L real , L fake , L a are the losses of the multi-scale discriminator, L FM is the image feature matching loss, L VGG is the VGG perceptual loss.

[0037] Furthermore, the step S4 is specifically as follows:

[0038] S41. Initialize the parameters w of the multi-scale discriminator d , initialize the parameters w of the precision asymptotic generator g ;

[0039] S42, batch sampling n d Paired labeled samples, (x i ,y i )~P(x i ,y i );

[0040] Batch sampling n g Generate sample pairs, (x i ,y′ i )~P G (x i ,y′ i);

[0041] For d Pair the sample annotations and construct n d Adversarial example pairs: (x i ,y i * )~P A (x i ,y i * );

[0042] S43, updating the parameters of the multi-scale discriminator and the precision progressive generator;

[0043] S44, repeat step S42 until convergence;

[0044] Among them, P represents the distribution of real data; P G represents the joint probability distribution of the data generated by the generator G, P A Represents the joint probability distribution of adversarial example pairs.

[0045] Furthermore, the step S43 uses the stochastic gradient ascent method to update the parameters of the multi-scale discriminator:

[0046]

[0047]

[0048] Furthermore, the step S43 uses the stochastic gradient descent method to update the parameters of the precision progressive generator:

[0049]

[0050]

[0051]

[0052] Among them, L g : represents the loss function of the generator G, n is the batch size or the number of samples in the dataset that are equally likely to represent the sample, ▽w g : represents the generator parameter w g gradient.

[0053] The second inventive scheme of the present invention is to apply the MiSrc-GAN medical image model constructed according to the above method to medical image generation, input the preprocessed inspection image into the constructed MiSrc-GAN medical image model to obtain a converted, denoised and segmented medical image.

[0054] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method described above.

[0055] Applying the technical solution of the present invention, the MiSrc-GAN medical image model is composed of a precision progressive generator, a multi-scale discriminator, and an adversarial sample pairing construction module. By integrating the GAN framework and adversarial samples, the robustness of the discriminator is improved, while the generator training is accelerated, and finally the joint probability distribution of the original image and the image to be generated is obtained. Among them, the precision progressive generator is essentially a group of sub-generators with different resolutions, and its core idea is to gradually obtain high-resolution medical images from coarse to fine; the multi-scale discriminator includes multiple discriminators with different receptive fields, which guide the generator to output images with complete global structures and finer details; the adversarial sample pairing construction module expands the scale of the data set, improves the robustness of the discriminator, and is conducive to accelerating the training of the generator, and finally the joint probability distribution of the original image and the image to be generated is obtained. The integration of adversarial samples and the GAN framework not only alleviates the problem of insufficient labeled data, but also enhances the model's ability to resist interference and ensures the quality of high-resolution medical image generation. Adding adversarial samples to real data sets effectively expands the size of the training set, which can not only guide the network to learn data invariance, but also improve the robustness of the network to cope with data perturbations and even malicious adversarial attacks.

[0056] Other features and advantages of the invention will be described in the following description, and partly become apparent from the description, or understood by practicing the invention. The purpose and other advantages of the invention can be realized and obtained by the structures particularly pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The present invention is described in detail below in conjunction with the accompanying drawings to make the above advantages of the present invention more clear.

[0058] Figure 1 It is a structural block diagram of the MiSrc-GAN medical image model of the present invention;

[0059] Figure 2 It is a ZOC internal test data diagram of an implementation case of the present invention;

[0060] Figure 3 It is a diagram of XEC external test data of an implementation case of the present invention. DETAILED DESCRIPTION

[0061] Data augmentation helps alleviate the problems of GAN training instability and convergence difficulties, and is particularly suitable for medical image generation tasks with limited labeled data. Image augmentation strategies mainly include cropping, rotation, scaling, contrast adjustment, random occlusion, and image blending. Different from conventional image augmentation strategies, adversarial samples are input samples formed by adding subtle perturbations to the data set, misleading the model to give incorrect outputs with high confidence. Increasing adversarial samples and effectively expanding the size of the training set can not only guide the network to learn data invariance, but also improve the robustness of the network to cope with data perturbations and even malicious adversarial attacks.

[0062] like Figure 1 As shown, a method for constructing a MiSrc-GAN medical image model is characterized by comprising the following steps:

[0063] S1. Input a real image dataset, wherein the image dataset includes an input image set X={x1, x2, .., x n} and target (like set Y = {y1, y2, .., y n}, pair the input image and the target image to form a labeled training set (x i ,y i );

[0064] S2. Construct a model framework, which includes a precision progressive generator G, a multi-scale discriminator D, and an adversarial sample pairing module A.

[0065] S3, expand the training set, and transform the input image set X into the image set to be generated Y (={y′1, y′2, .., y′ n}, pair the input image with the image to be generated to form a training set (x i , y′ i ), the adversarial sample pairing module adds interference to the target image set Y to form an interference graph (set Y * ={y1 * , y2 * , .., y * n} , pair the input image and the interference image to form an adversarial training set (x i ,y i * );

[0066] S4. Perform adversarial training to optimize the model. Based on the training set, use a multi-scale discriminator to perform discrimination at different scales, calculate the loss function model parameters, and iteratively train the model to obtain the optimized MiSrc-GAN medical image model.

[0067] The goal of MiSrc-GAN is to generate Y based on input X, that is, to learn the joint probability distribution P(x i ,y i ). That is, the precision asymptotic generator G represents the joint probability distribution P G (x i ,y′ i ). The adversarial sample pairing module A perturbs the real target image set Y to generate the adversarial sample set Y * ={y1 * ,y2 * 'y * n}, complete the adversarial sample pairing set (x,y * ), that is, the adversarial sample pairing module A represents the joint probability distribution P A (x i ,y i * ), when the perturbation is small enough, the distribution is approximately P G (x i ,y′ i ). The multi-scale discriminator D is used for 3 sets of paired data (x i ,y i )、(x i ,y′ i) and (x i ,y i * ) are judged at different scales, and the results are averaged to output true or false assertions for 3 sets of paired data.

[0068] In MiSrc-GAN training, the dataset size is n pairs of labeled samples (x i ,y i) and n groups of generated sample pairs (x i ,y′ i) On this basis, we add n additional adversarial sample pairs (x i ,y i * ), effectively expanding the training set, improving the robustness of the multi-scale discriminator D to deal with data noise or malicious attacks, and accelerating the training of the precision progressive generator G, and finally reaching the Nash equilibrium. At this time, the P learned by the precision progressive generator G G (x i ,y′ i) Approximately true P(x i ,y i ).

[0069] In this implementation case, the precision progressive generator generates high-resolution images in a precision progressive manner, including a group of sub-generators with different resolutions, taking into account both the global features and local fine features of the generated images. Considering that the generator and discriminator of pix2pixHD have significant advantages in generating high-resolution images, the precision progressive generator and multi-scale discriminator of the MiSrc-GAN medical image model can directly use the same network architecture.

[0070] In this implementation case, in the training of the MiSrc-GAN medical image model, adding adversarial sample pairing is an effective way to simultaneously solve the problem of insufficient labeled samples and ensure network robustness. Specifically, A extends the PGD algorithm by perturbing the real Y to generate an adversarial sample set Y*, which is used to construct an adversarial sample pairing set (X, Y*), expand the scale of the training data set, and is conducive to the adversarial training of D and G. Compared with traditional data enhancement technology, the introduction of adversarial samples can also improve the robustness of D under the framework of generative adversarial networks, thereby coping with data noise or malicious attacks, so that G can generate images with more reliable quality, which is suitable for actual medical application scenarios. A essentially simulates the image perturbation of real scenes to mislead fragile networks to misjudge the results and complete the adversarial attack. The steps for generating the interference image are as follows:

[0071] Assume δ is the target image y i The disturbance amount, L adv represents the adversarial loss of the multi-scale discriminator, then:

[0072] Formula 1:

[0073] Among them, l is the true label, with a value of 1, and is a tensor with the same dimension as the output of D. Since D is a multi-scale discriminator, the known network parameters are w d , Formula 1 can be rewritten as:

[0074]

[0075] Among them, D k Represents the kth discriminator in the multi-scale discriminator. In the generative adversarial network, the role of the discriminator is to distinguish between real data and fake data generated by the generator.

[0076] wd: represents the parameters of the discriminator network, namely weights and biases, which will be optimized during the training process;

[0077] ||·||is l ∞ Paradigm, δ max Represents the disturbance threshold, L adv Select L2 loss, then:

[0078] y i* =y i +δ.

[0079] In this implementation case, the pairing process of the adversarial training set includes the following steps:

[0080] Initialize the perturbation: δ = 0, where δ is a tensor and x i The dimensions are the same, for i=1to step, the number of adversarial sample pairing iterations step;

[0081] Initialize temporary adversarial sample: emp y i * =y i +δ;{x i , temp y i *} Input the multi-scale discriminator, pass through the network forward propagation, and output: iResult = {iResult1, iResult2, iResult3};

[0082] Calculate the L2 loss of each element in iResult and the true label l, and sum them up to get the adversarial loss L adv , where the true label 1 is a tensor with the same dimension as each element in iResult;

[0083] Taking Ladv maximization as the optimization goal, the multi-scale discriminator back-propagates to obtain the gradient grad, and calculates the perturbation amount: δ = epsIter*sign(grad). Among them, sign is the sign function, and epsIter is the step size of each adversarial attack;

[0084] Update the temporary adversarial sample: temp yi*=temp yi*+δ, and limit the perturbation amount to fall within the truncation interval:

[0085] δ=clip(temp y i * , clipM in, clipM ax)-y i . Wherein, clip is an interval cutoff function, which limits the disturbance amount to no more than a threshold: δ = clip(δ, -∞, eps), eps is the disturbance amount threshold for each adversarial attack;

[0086] end for, update the adversarial sample: yi*=yi+δ, limit the adversarial sample to fall within the truncation interval: yi*=clip(y i * , clipM in, clipM ax)

[0087] Construct adversarial training set pairing: (x i ,y i* ).

[0088] In existing models, the limited number of annotated medical image samples makes it difficult to train the generator and discriminator. In addition, the network does not take robustness into consideration and cannot cope with data perturbations or malicious attacks, which is not conducive to promotion in medical tasks.

[0089] In this implementation case, the objective function of the model is:

[0090] min G max D L real +L fake +∝*L a +λ*L FM +μ*L VGG , where ∝, λ, and μ are weight indices;

[0091] Since the model framework includes three components: the precision progressive generator, the multi-scale discriminator, and the adversarial sample pairing module, L real , L fake , L a are the losses of the multi-scale discriminator respectively, and the formula is as follows:

[0092]

[0093]

[0094]

[0095] L FM is the image feature matching loss. Since the precision progressive generator G needs to generate images at different scales, in order to further stabilize the training of GAN, the image feature matching loss L is introduced in combination with the multi-scale discriminator D. FM :

[0096]

[0097] Among them, D t k Indicates D k The tth layer network in the network, the total number of layers is recorded as T,N t is the feature dimension of the output of the t-th layer network;

[0098] L VGG VGG perceptual loss L is introduced to further improve the quality of model training output images. VGG To evaluate the accuracy of the asymptotic generator G:

[0099]

[0100] In this implementation case, the step S4 is specifically as follows:

[0101] S41. Initialize the parameters w of the multi-scale discriminator d , initialize the parameters w of the precision asymptotic generator g ;

[0102] S42, batch sampling n d Paired labeled samples, (x i ,y i )~P(x i ,y i );

[0103] Batch sampling n g Generate sample pairs, (x i ,y′ i )~P G (x i ,y′ i );

[0104] For d Pair the sampled and labeled samples and construct nd adversarial sample pairs: (xi,yi*)~PA(xi,yi*);

[0105] S43, updating the parameters of the multi-scale discriminator and the precision progressive generator;

[0106] S44, repeat step S42 until convergence;

[0107] P represents the distribution of real data, PG represents the joint probability distribution of data generated by the generator G, that is, the process of the generator trying to imitate the distribution of real data, PA: represents the joint probability distribution of adversarial sample pairing, that is, the joint distribution of adversarial samples generated by the adversarial sample generation module A and the input data.

[0108] In this implementation case, the step S43 uses the stochastic gradient ascent method to update the parameters of the multi-scale discriminator:

[0109]

[0110]

[0111] Ld represents the loss function of the discriminator D, which is used to evaluate and optimize the discriminator during training; n: may represent the batch size of samples or the number of samples in the dataset; α is a weight parameter used to balance the adversarial sample loss La; ▽wd represents the gradient of the discriminator parameter wd, which is used to guide the update of the discriminator parameter.

[0112] In this implementation case, the step S43 uses the stochastic gradient descent method to update the parameters of the precision progressive generator:

[0113]

[0114]

[0115]

[0116] Lg: represents the loss function of the generator G, which is used to evaluate and optimize the generator during training. n may also represent the batch size of samples or the number of samples in the dataset. ▽wg: represents the gradient of the generator parameter wg, which is used to guide the update of the generator parameters.

[0117] Theoretical analysis:

[0118] In the MiSrc-GAN medical image model, A is used to increase the adversarial sample pairing set, which is beneficial to the adversarial training of D and G, improves the robustness of D, and accelerates the training of G.

[0119] A is essentially an attacker who misleads D's discrimination result by adding tiny perturbations to the real image. Where there is attack, there is defense. D plays the role of defender and fights against A. The perturbation amount is known to be δ. In order to improve robustness to cope with adversarial attacks, the optimization goal of D is to minimize the adversarial loss L adv So as to solve the network parameter w d , using the expectation expression as follows:

[0120]

[0121] Using GAN to optimize the objective function form, rewrite it into Formula 3:

[0122]

[0123] The above formula 3 shows that the improvement of the robustness of D depends on the true distribution of the data.

[0124] Cloth P(x i ,y i ), and this distribution is unknown. This also explains why the adversarial defense method obtains a discriminator with good robustness on the training set, but once used on the test set, the performance will drop significantly.

[0125] To ensure the robustness of the model, the local Lipschitz value needs to be limited to a small value. The LLV constraint can be formalized as a composite loss minimization problem:

[0126]

[0127] Since P(x i ,y i) It is impossible to know, and the prior distribution is usually used to approximate:

[0128]

[0129] Assuming that there are enough data sets, the prior distribution is close to the true distribution. However, in real application scenarios, the limited medical image data cannot meet this assumption at all, resulting in the model being able to effectively constrain LLV on the training set but unable to generalize to the test set, i.e., the robustness is very poor. If we can directly obtain the true distribution P(x i ,y i) Sampling, rather than using a finite data set to approximate the optimal model, the LLV constraint can be easily achieved. In the MiSrc-GAN medical image model, we only focus on D and G, that is, standard GAN adversarial training. When the Nash equilibrium is reached, G represents P G (x i ,y i ′) approximates the true P(x i ,y i) Therefore, the MiSrc-GAN medical image model combines GAN and adversarial attacks to effectively ensure the robustness of D.

[0130] Next, we analyze how D with better robustness can accelerate the training of G. Assuming that D lacks robustness, it is easy to be paired with adversarial samples (x i ,y i *) Deception, once G adopts a similar adversarial sample pairing generation method to obtain (x i , y′ i ), D will not be able to judge whether the sample pairing is true or false, resulting in the adversarial training failing to reach the Nash equilibrium point, and D and G failing to converge. On the other hand, if D is robust, it can accurately distinguish the true or false sample pairings, providing G with rich gradient information, making P G (x i , y′ i) Quickly approximate the true P(x i ,y i ).

[0131] Existing literature records that the regularization constraint of D is reasonably relaxed, that is, only a small LLV is required in the high-dimensional feature space of the image, rather than a strict global 1-Lipschitz function restriction. This basically does not affect the robustness of D, and can theoretically accelerate the training of G. For D with a small LLV, it is equivalent to ||D′(x i ,y i )|| is very small. When the perturbation δ is small enough, we have:

[0132] D(x i ,y i +δ)≈D(xi ,y i )+D′(x i ,y i )·δ≈D(x i ,y i );

[0133] If δ is small, then (x i ,y i +δ) that is (x i ,y i *) satisfies the distribution that is largely matched with the forged samples (x i , y′ i) The distribution of P A (x i ,y i *)≈P G (x i , y′ i ), D can easily judge it as false. Assume that in the tth round of adversarial training, the network parameters of G are w t g , D gives an accurate judgment, that is, D(x i , y′ i ;w t g )≈0, then G needs to update its network parameters to w in the t+1th round. t+1 g , so that D(x i , y′ i ;w t+1 g )≈1. Based on the Lipschitz continuity assumption of D and G, we can get the lower bound of G parameter update:

[0134]

[0135] The constant D′(x i , y′ i ;w t g) and C d and C g , then Formula 4 can be rewritten as:

[0136]

[0137] When D is robust, C d is very small, then ||w t+1 g -w t || is very big, indicating w t+1 g Compared with w tg The change is large, that is, the convergence speed of G is fast. On the contrary, when the robustness of D is poor, the convergence speed of G slows down.

[0138] The second inventive solution of the present invention is to apply the MiSrc-GAN medical image model constructed according to the above method to medical image generation, input the preprocessed examination image into the constructed MiSrc-GAN medical image model, and obtain the converted, denoised and segmented medical image. The main purpose is to reduce unnecessary examinations for patients and improve the efficiency of disease diagnosis.

[0139] In this implementation case, the training set is created using the Central Serous Chorioretinopathy Research Dataset. The following tasks are tested:

[0140] (1) Use the preoperative OCT images of the CSC dataset to predict the postoperative OCT images, which is a medical image conversion task;

[0141] (2) Use the fundus image of the REFUGE dataset to infer the optic disc and optic cup segmentation map, which is the medical image segmentation task. The experimental indicators mainly include: image structure similarity, peak signal-to-noise ratio, Dice and actual image generation effect.

[0142] The experimental data sets include: Optical Coherence Tomography (OCT) data set CSC, which comes from Zhongshan Eye Center and Xiamen Eye Center. According to the size requirements of the input image of the MiSrc-GAN medical image model, the samples of the CSC and REFUGE data sets are preprocessed accordingly, the region of interest is cropped and the size is scaled to 512×512. The division of the training set and the test set is shown in Table 1. Among them, the test set of the CSC data set includes two parts: internal test ZOC (56 image pairs) and external test XEC (82 image pairs).

[0143] Table 1 Dataset information

[0144]

[0145]

[0146] This implementation case selects cycleGAN26 and pix2pixHD13 as comparisons, and the parameters used are derived from the literature. The parameters of the MiSrc-GAN medical image model are set as follows: learning rate or step factor lr = 0.0002, which is used to control the update rate of weights. A smaller value usually makes the training converge to better performance; the exponential decay rate of the first-order moment estimate β1 = 0.5; the exponential decay rate of the second-order moment estimate β2 = 0.999, which is usually close to 1 and is suitable for sparse gradient scenarios; the number of adversarial sample pairing iterations step = 3, the truncation interval [clipMin, clipMax] = [-1, 1], the step size of each adversarial attack epsIter = 0.0002, and the perturbation threshold of each adversarial attack eps = 0.1.

[0147] In this implementation case, the operating system of the experimental platform is CentOS Linux release 7.4, the image processor is Tesla V100, and the memory capacity is 60GB. The coding implementation uses Python 3.6.5 language based on the Pytorch 1.5.1 framework.

[0148] In this implementation case, SSIM (Structural SIMilarity) is an evaluation index that describes the similarity between two images.

[0149] Table 2 SSIM values ​​of different models on the CSC dataset

[0150]

[0151] Table 2 shows the SSIM mean performance of different models on the CSC dataset, and the best performance of each model is selected. The SSIM mean index of cycleGAN is the lowest on both the internal test ZOC and the external test XEC, and the variance is the largest, indicating that the image generation quality effect is worse than other models. The reason is that the cycleGAN network framework contains 2 discriminators and 2 generators, and the structure is too complex. The task of the CSC dataset is to predict preoperative images to postoperative images. The scale of training data is small, and it is difficult to train a complex GAN network. Compared with cycleGAN, the SSIM index of pix2pixHD is significantly improved, and the variance is the smallest among all models. It can be seen that the multi-scale generator and discriminator have alleviated the problem of lack of training data sets to a certain extent. The SSIM index of MiSrc-GAN is significantly better than the existing models, and is 0.5384 and 0.5713 on the internal test ZOC and the external test XEC, respectively, which are the best results at present. It can be seen that by integrating a network architecture with outstanding image generation performance and introducing adversarial sample paired data, MiSrc-GAN can well solve the image generation task of the CSC dataset, infer high-quality and high-resolution postoperative prediction images from preoperative images, provide decision support for doctors, and reduce unnecessary examinations for patients.

[0152] In this implementation case, PSNR, or peak signal-to-noise ratio, is also used to evaluate image quality.

[0153] Table 3 PSNR values ​​of different models on CSC dataset

[0154]

[0155] Table 3 shows the PSNR mean performance of different models on the CSC dataset, and the best performance of each model is selected. Basically, the performance of each model on PSNR is similar to the previous SSIM. The PSNR index of cycleGAN is the lowest among all models, and the variance is the largest, and the image generation quality effect is obviously not as good as other models. The PSNR mean index and variance of pix2pixHD are better than cycleGAN, which shows that the network structure is more suitable for high-resolution medical image generation tasks. MiSrc-GAN has the best PSNR index, which is 18.5761 and 19.3485 respectively on the internal test ZOC and the external test XEC. Compared with pix2pixHD, MiSrcGAN uses the same precision progressive generator and multi-scale discriminator, and only relies on the additional adversarial sample pairing module to expand the original training set size. Its PSNR index improvement is not particularly obvious. However, another advantage of MiSrc-GAN is robustness, which is not available in pix2pixHD, making this model more suitable for medical task scenarios.

[0156] like Figure 2-3 As shown, in this implementation case, the postoperative OCT image prediction results of the CSC dataset are visualized, which can intuitively compare the image generation effects of each model. The figure selects 10 preoperative OCT images (i.e., the first column Image) and their true postoperative OCT images (i.e., the second column Groundtruth), and gives the postoperative OCT images generated by each model based on these preoperative OCT images. Among them, the left side is the image generation effect of the ZOC internal test, and the right side is the image generation effect of the XEC external test. In general, the postoperative OCT images output by the MiSrc-GAN medical image model are close to the real annotations, the image structure is relatively complete, the texture is relatively clear and smooth, the details are richer, and basically conform to the actual situation; while the postoperative OCT images generated by other comparison models are of poor quality, and even the generated images are incomplete. In most cases, the postoperative OCT images generated by cycleGAN are closer to the preoperative OCT images than the real postoperative OCT images, such as the 5th row on the ZOC data and the 7th row on the XEC data. The reason is that the network focuses on style transfer, that is, the overall style of the preoperative OCT image is converted to the overall style of the postoperative OCT image, while ignoring the changes in texture features from the preoperative OCT image to the postoperative OCT image. In addition, cycleGAN is prone to incomplete generated images, such as the 6th row on the ZOC data and the 5th row on the XEC data. Compared with cycleGAN, pix2pixHD and MiSrc-GAN truly discover the correlation between the texture features of the preoperative OCT image and the postoperative OCT image, so the image generation quality is guaranteed. By adding adversarial sample pairing to improve model training, MiSrc-GAN obtains slightly better image details than pix2pixHD and has stronger anti-interference ability, such as the 6th row on the ZOC data and the 2nd and 6th rows on the XEC data. In summary, the image generation quality of the MiSrc-GAN medical image model is better than that of other comparison models.

[0157] In this implementation case, Mean Intersection Over Union (MIoU) is a standard measure of algorithm accuracy in image segmentation. The larger the MIoU value, the higher the segmentation accuracy.

[0158] Table 4 MIoU values ​​of different models on the REFUGE dataset

[0159] Model MIoU (Video Disc) MIoU (visual cup) cycleGAN 0.57 - pix2pixHD 0.8968 0.7657 MiSrc-GAN 0.9000 0.7718

[0160] Table 4 shows the MIoU performance of different models on the REFUGE dataset. Since the cup-disc segmentation effect of cycleGAN is not good, only simple optic disc segmentation tasks are performed. The optic disc MIoU index of cycleGAN is 0.57, which is quite different from other models, and the optic disc segmentation effect is not too bad. The reason is still that the network framework structure of cycleGAN is too complex, and the training difficulty is too large for the optic disc segmentation task of fundus images with insufficient labeled data. The optic disc MIoU index of pix2pixHD has been significantly improved to 0.8968, mainly due to the use of multi-scale generators and discriminators; but the optic cup MIoU index is much lower than the optic disc MIoU, indicating that for difficult optic cup recognition tasks, sophisticated network structure design cannot fundamentally solve the problem of limited labeled data. MiSrcGAN's MIoU indicators are better than existing models, and its optic disc MIoU and optic cup MIoU are 0.9000 and 0.7718 respectively. This shows that on the basis of excellent network architecture, adding additional adversarial sample pairing to expand the scale of training data sets can help improve segmentation accuracy.

[0161] In this implementation case, Dice is a metric function used to evaluate the similarity of two samples. Its value range is [0,1]. The larger the value, the more similar they are. MDice is the average of multiple Dice values ​​and is also a standard metric for measuring the accuracy of algorithms in image segmentation.

[0162] Table 5 MDice values ​​of different models on the REFUGE dataset

[0163] Model MDice (video disc) MDice(Visual Cup) cycleGAN 0.71 - pix2pixHD 0.9435 0.8608 MiSrc-GAN 0.9457 0.8667

[0164] Table 5 shows the MDice performance of different models on the REFUGE dataset. Similar to the comparison of MIoU, cycleGAN only gives the optic disc MDice index value, which is 0.71, the worst among all models; the optic disc MDice index of pix2pixHD is significantly improved, while the optic cup MDice index is slightly lower; the optic disc MDice and optic cup MDice of MiSrc-GAN are 0.9457 and 0.8667, respectively, which are better than other models. MiSrc-GAN and pix2pixHD are close, indicating that in addition to increasing the pairing of adversarial samples, other data enhancement methods need to be considered to further improve the segmentation effect. Of course, the introduction of the adversarial mechanism has another important role, which is to ensure the robustness of the MiSrc-GAN medical image model. In summary, the segmentation effect of the optic disc and optic cup of the fundus image depends on the network architecture design and the size of the training dataset.

[0165] In summary, MiSrc-GAN outperforms existing models in terms of indicators such as PSNR, SSIM, mean intersection ratio, Dice, and actual image generation effect.

[0166] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the method described above.

[0167] The technical solution of the present invention is that the MiSrc-GAN medical image model is composed of a precision progressive generator, a multi-scale discriminator and an adversarial sample pairing construction module. By fusing the GAN framework and adversarial samples, the robustness of the discriminator is improved, and the training of the generator is accelerated, and finally the joint probability distribution of the original image and the image to be generated is obtained. Among them, the precision progressive generator is essentially a group of sub-generators with different resolutions, and its core idea is to gradually obtain high-resolution medical images from coarse to fine; the multi-scale discriminator includes a plurality of discriminators with different receptive fields, which guides the generator to output images with complete global structures and finer details; the adversarial sample pairing construction module expands the scale of the data set, improves the robustness of the discriminator, and is conducive to accelerating the training of the generator, and finally obtains the joint probability distribution of the original image and the image to be generated. The fusion of adversarial samples and the GAN framework not only alleviates the problem of insufficient labeled data, but also enhances the model's anti-interference ability and ensures the generation quality of high-resolution medical images; adding adversarial samples on the basis of real data sets effectively expands the scale of training sets, which can not only guide the network to learn data invariance, but also improve the robustness of the network to cope with data disturbances, or even malicious adversarial attacks.

[0168] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for constructing a MiSrc-GAN medical image model, characterized in that: The following steps are involved: S1. Input a real image dataset, which includes an input image set X and a target image set Y. Pair the input image and the target image to form a labeled training set (x i ,y i ); S2. Construct a model framework, wherein the model framework includes a precision progressive generator, a multi-scale discriminator, and an adversarial sample pairing module. S3, expand the training set, transform the input image set X into the image set to be generated Y' through the precision progressive generator, and pair the input image and the image to be generated to form a generated training set (x i , y′ i ), the adversarial sample pairing module adds interference to the target image set Y to form an interference image set Y * , pair the input image and the interference image to form an adversarial training set (x i ,y i * ); S4, conduct adversarial training to optimize the model, use a multi-scale discriminator to discriminate at different scales based on the training set, calculate the loss function model parameters and iteratively train the model to obtain the optimized MiSrc-GAN medical image model; The steps of generating the interference image are as follows: Assume δ is the target image y i The disturbance amount, L adv represents the adversarial loss of the multi-scale discriminator, then: Among them, D k is the kth discriminator in the multi-scale discriminator, w d are the parameters of the discriminator network; ||·||is l ∞ Paradigm, δ max Represents the disturbance threshold, L adv Select L2 loss, then: and i * =and i +δ.

2. The method for constructing the MiSrc-GAN medical image model according to claim 1, characterized in that: The precision progressive generator generates a high-resolution image in a precision progressive manner, and includes a group of sub-generators with different resolutions, taking into account both the global features and the local fine features of the generated image.

3. The method for constructing the MiSrc-GAN medical image model according to claim 1, characterized in that: The pairing process of the adversarial training set includes the following steps: Initialize the perturbation amount: δ = 0, where δ is a tensor with the same dimension as xi, for i = 1 to step, the number of adversarial sample pairing iterations step; Initialize temporary adversarial sample: emp y i * =y i +δ;{x i , temp y i * } Input the multi-scale discriminator, pass through the network forward propagation, and output: iResult = {iResult1, iResult2, iResult3}; Calculate the L2 loss of each element in iResult and the true label l, and sum them up to get the adversarial loss L adv , where the true label 1 is a tensor with the same dimension as each element in iResult; Taking Ladv maximization as the optimization goal, the multi-scale discriminator back-propagates to obtain the gradient grad, and calculates the perturbation amount: δ = epsIter*sign(grad). Among them, sign is the sign function, and epsIter is the step size of each adversarial attack; Update the temporary adversarial sample: temp yi*=temp yi*+δ, and limit the perturbation amount to fall within the truncation interval: δ=clip(temp y i * , clipMin, clipMax)-y i .Wherein, clip is the interval cutoff function, clipMin is the lower limit of the disturbance δ, and clipMax is the upper limit of the disturbance δ, which limits the disturbance to not exceed the threshold: δ = clip(δ, -∞, eps), eps is the disturbance threshold for each adversarial attack; end for, update the adversarial sample: yi*=yi+δ, limit the adversarial sample to fall within the truncation interval: yi*=clip(y i * , clipM in, clipM ax) Construct adversarial training set pairing: (x i ,y i * ).

4. The method for constructing the MiSrc-GAN medical image model according to claim 1, characterized in that: The objective function of the model is: minutes G max D L real +L fake +a*L a +λ*L FM +μ*L VGG , Among them, α, λ, and μ are weight indices; Since the model framework includes three components: the precision progressive generator, the multi-scale discriminator, and the adversarial sample pairing module, L real , L fake , L a are the losses of the multi-scale discriminator, L FM is the image feature matching loss, L VGG is the VGG perceptual loss.

5. The method for constructing the MiSrc-GAN medical image model according to claim 4, characterized in that: Step S4 is specifically as follows: S41. Initialize the parameters w of the multi-scale discriminator d , initialize the parameters w of the precision asymptotic generator g ; S42, batch sampling n d Paired labeled samples, (x i ,y i )~P(x i ,y i ); Batch sampling n g Generate sample pairs, (x i ,y′ i )~P G (x i ,y′ i ); For d Pair the sample annotations and construct n d Adversarial example pairs: (x i ,y i * )~P A (x i ,y i * ); S43, updating the parameters of the multi-scale discriminator and the precision progressive generator; S44, repeat step S42 until convergence; Among them, P represents the distribution of real data; P G represents the joint probability distribution of the data generated by the generator G, P A Represents the joint probability distribution of adversarial example pairs.

6. The method for constructing the MiSrc-GAN medical image model according to claim 5, characterized in that: Step S43 uses the stochastic gradient ascent method to update the parameters of the multi-scale discriminator: Among them, L d represents the loss function of the discriminator D, α is the weight parameter, Represents the discriminator parameter w d The gradient of n represents the total number of samples, n d Indicates the number of labeled sample pairs sampled in each iteration, n g Represents the number of pairs of samples produced by the generator sampled in each iteration.

7. The method for constructing the MiSrc-GAN medical image model according to claim 6, characterized in that: Step S43 uses the stochastic gradient descent method to update the parameters of the precision progressive generator: Among them, L g : represents the loss function of the generator G, n is the batch size or the number of samples in the dataset that are equally likely to represent the sample, Represents the generator parameter w g gradient.

8. The method for constructing the MiSrc-GAN medical image model according to any one of claims 1 to 7, wherein the preprocessed inspection image is input into the constructed MiSrc-GAN model to obtain an application of the converted, denoised and segmented medical image.

9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.