CN111861924B - A cardiac magnetic resonance image data enhancement method based on evolutionary GAN - Google Patents
A cardiac magnetic resonance image data enhancement method based on evolutionary GAN Download PDFInfo
- Publication number
- CN111861924B CN111861924B CN202010715325.3A CN202010715325A CN111861924B CN 111861924 B CN111861924 B CN 111861924B CN 202010715325 A CN202010715325 A CN 202010715325A CN 111861924 B CN111861924 B CN 111861924B
- Authority
- CN
- China
- Prior art keywords
- generator
- training
- discriminator
- samples
- magnetic resonance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10072—Tomographic images
- G06T2207/10088—Magnetic resonance imaging [MRI]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
- G06T2207/30048—Heart; Cardiac
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/30—Assessment of water resources
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Magnetic Resonance Imaging Apparatus (AREA)
- Image Processing (AREA)
Abstract
本发明涉及一种基于进化GAN的心脏磁共振图像数据增强方法,该方法在训练生成器时,对生成器进行突变生成多个子代生成器,通过适应性分数函数来评判多个生成器的适应性分数,根据分数来选择最优的子代生成器作为下一个迭代的父代生成器,同时在判别器训练阶段,结合特征向量的线性插值合成新的训练样本并生成相关的线性插值标签,不仅拓展了整个训练集的分布,也对离散样本空间进行连续化并且提高了领域间的平滑性,从而使得模型能够更好地得到训练。本发明的方法图像增强方法,能够生成高质量且多样的样本对训练集进行扩充,最终提高了分类结果的各项指标。
The invention relates to a cardiac magnetic resonance image data enhancement method based on evolutionary GAN. When training a generator, the method mutates the generator to generate multiple descendant generators, and evaluates the adaptation of the multiple generators through an adaptability score function. sex score, and select the optimal offspring generator as the parent generator for the next iteration based on the score. At the same time, in the discriminator training stage, new training samples are synthesized using linear interpolation of feature vectors and related linear interpolation labels are generated. It not only expands the distribution of the entire training set, but also continuousizes the discrete sample space and improves the smoothness between fields, so that the model can be better trained. The image enhancement method of the present invention can generate high-quality and diverse samples to expand the training set, and ultimately improves various indicators of classification results.
Description
技术领域Technical field
本发明涉及图像处理领域,尤其涉及一种基于进化GAN的心脏磁共振图像数据增强方法。The invention relates to the field of image processing, and in particular to a cardiac magnetic resonance image data enhancement method based on evolved GAN.
背景技术Background technique
心脏磁共振被称为评估心脏功能的黄金标准,常规的心脏磁共振扫描技术已经相对成熟,在疾病诊断中发挥了至关重要的作用。目前,很多基于深度学习的心脏磁共振图像辅助诊断任务已经取得出了很好的效果,但心脏磁共振图像不仅需要昂贵的医疗设备来获取,还需要有经验的放射科医生进行大量手动数据标注,这无疑是极其耗时耗力的。除此之外,医学图像领域中患者的隐私问题一直相当敏感,因此获得大量正负样本均衡的数据集需要非常大的成本。Cardiac magnetic resonance is known as the gold standard for evaluating cardiac function. Conventional cardiac magnetic resonance scanning technology is relatively mature and plays a vital role in disease diagnosis. At present, many cardiac magnetic resonance image-assisted diagnosis tasks based on deep learning have achieved good results. However, cardiac magnetic resonance images not only require expensive medical equipment to obtain, but also require a large amount of manual data annotation by experienced radiologists. , which is undoubtedly extremely time-consuming and labor-intensive. In addition, patient privacy issues in the field of medical images have always been quite sensitive, so obtaining a large data set with balanced positive and negative samples requires a very high cost.
基于深度学习的医学成像领域中一个很大的挑战是如何处理小规模数据集和有限数量的标注数据,特别是在使用复杂的深度学习模型时,数据集不充足或者数据集样本不均衡会使参数巨大的深度卷积神经网络出现过拟合的情况。在计算机视觉领域,针对过拟合的问题,学者们已经提出了很多有效的方法,如:批量正则化、Dropout、早停法、权值共享、权值衰减等。上述的方法是在网络结构上进行调整,除此之外,数据增强是一种行之有效的针对数据本身进行操作的方法,它在图像的分析和分类中一定程度上缓解了过拟合的现象。经典的数据增强技术主要包括平移、旋转、缩放、翻转和剪切等仿射变换方法,并将原始样本与新样本混合作为训练集输入到卷积神经网络中;通过对调整样本颜色空间也是一种数据增强方法,Wang等人使用改变亮度值的方法来扩充样本量;这些方法虽然有提升,但是仅仅是针对原始样本进行操作并没有产生新的特征,原始样本的多样性并没有得到实质性提升,在处理小规模数据的时候提升效果微弱。A big challenge in the field of medical imaging based on deep learning is how to deal with small-scale data sets and limited amounts of annotated data. Especially when using complex deep learning models, insufficient data sets or unbalanced data set samples will cause Deep convolutional neural networks with huge parameters suffer from overfitting. In the field of computer vision, scholars have proposed many effective methods to solve the problem of over-fitting, such as batch regularization, dropout, early stopping method, weight sharing, weight attenuation, etc. The above method is to adjust the network structure. In addition, data enhancement is an effective method to operate on the data itself. It alleviates the problem of overfitting to a certain extent in image analysis and classification. Phenomenon. Classic data enhancement techniques mainly include affine transformation methods such as translation, rotation, scaling, flipping and shearing, and mixing original samples with new samples as training sets and inputting them into the convolutional neural network; adjusting the sample color space is also a As a data enhancement method, Wang et al. used the method of changing the brightness value to expand the sample size; although these methods have improved, they only operate on the original samples and do not produce new features, and the diversity of the original samples has not been substantially improved. Improvement, the improvement effect is weak when processing small-scale data.
生成对抗网络(Generative Adversarial Network,GAN)是Ian Good fellow等人提出的一种生成模型,它由生成网器G和判别器D组成,生成器G利用均匀分布或正态分布中采样出的噪声z作为输入来合成图像G(z),判别器D试图尽可能将合成图像G(z)判断为假,将真实图像x判断为真,并通过逐次对抗训练调整各模型的参数,最终由生成器得到真实样本的分布模型,获得接近真实图像的生成性能。Generative Adversarial Network (GAN) is a generative model proposed by Ian Good fellow and others. It consists of a generator G and a discriminator D. The generator G uses noise sampled from a uniform distribution or a normal distribution. z is used as input to synthesize the image G(z). The discriminator D tries to judge the synthesized image G(z) as false as possible and the real image x as true. It adjusts the parameters of each model through successive adversarial training, and finally generates The device obtains the distribution model of real samples and obtains generation performance close to real images.
生成对抗网络通过拟合原始样本分布来生成新样本,新样本是从生成模型学习到的分布中产生的,这就使得其具备了区别于原始样本的新特征。这种特性使得将生成网络生成的样本当作新的训练样本来达到数据扩充的方法成为了可能。虽然GAN在很多计算机视觉领域中取得了很好的效果,但是GAN在实际应用中存在很多问题。一方面,GAN非常难训练,一旦数据分布和生成网络拟合的分布在训练的一开始没有实质性的重合,生成网络的梯度就就很容易指向随机方向,从而产生梯度消失的问题。另一方面,生成器会为了让判别器给予高分尽量生成比较安全但缺乏多样性的单一样本,这就会导致了模式崩溃的问题。Generative adversarial networks generate new samples by fitting the original sample distribution. The new samples are generated from the distribution learned by the generative model, which gives them new characteristics that are different from the original samples. This feature makes it possible to use the samples generated by the generative network as new training samples to achieve data expansion. Although GAN has achieved good results in many computer vision fields, there are many problems in practical applications of GAN. On the one hand, GAN is very difficult to train. Once the data distribution and the distribution fitted by the generating network do not substantially overlap at the beginning of training, the gradient of the generating network will easily point in a random direction, thus causing the problem of gradient disappearance. On the other hand, the generator will try to generate a single sample that is safer but lacks diversity in order to let the discriminator give a high score, which will lead to the problem of mode collapse.
发明内容Contents of the invention
针对现有技术之不足,一种基于进化GAN的心脏磁共振图像数据增强方法,所述数据增强方法的具体步骤包括:Aiming at the shortcomings of the existing technology, a cardiac magnetic resonance image data enhancement method based on evolutionary GAN is proposed. The specific steps of the data enhancement method include:
步骤1:采集心脏磁共振图像数据集,所述数据集包括良性心脏磁共振图像和恶性心脏磁共振图像;Step 1: Collect a cardiac magnetic resonance image data set, the data set includes benign cardiac magnetic resonance images and malignant cardiac magnetic resonance images;
步骤2:对所述数据集进行预处理,并将所述数据集分为训练集和测试集;Step 2: Preprocess the data set and divide the data set into a training set and a test set;
步骤3:对预处理后的所述训练集进行仿射变换得到数据增强数据集;Step 3: Perform affine transformation on the preprocessed training set to obtain a data enhancement data set;
步骤4:将所述数据增强数据集输入构建的进化GAN模型进行训练,具体包括:Step 4: Input the data augmentation data set into the constructed evolutionary GAN model for training, which specifically includes:
步骤41:采集混合高斯分布中的噪声z作为生成器的初始输入,生成器将输入的噪声合成一张图像;Step 41: Collect the noise z in the mixed Gaussian distribution as the initial input of the generator, and the generator synthesizes the input noise into an image;
步骤42:在生成器训练阶段,固定判别器的参数,通过突变、评价和选择三个阶段来训练生成器;Step 42: In the generator training stage, the parameters of the discriminator are fixed, and the generator is trained through three stages: mutation, evaluation and selection;
步骤43:在判别器训练阶段,固定生成器的参数,将生成器合成的图像与所述数据增强数据集中的图像x通过线性插值方法合成一张图像作为判别器的输入;Step 43: In the discriminator training stage, the parameters of the generator are fixed, and the image synthesized by the generator and the image x in the data enhancement data set are synthesized into an image through linear interpolation method as the input of the discriminator;
步骤44:生成器和判别器分阶段对抗训练,不断重复步骤42至步骤43直到达到训练次数,训练结束;Step 44: The generator and the discriminator are trained against each other in stages, and steps 42 to 43 are repeated until the number of training times is reached, and the training ends;
步骤5:使用训练完成后的进化GAN模型合成新的图像,将合成图像加入所述训练集中,得到第二数据增强数据集;Step 5: Use the evolved GAN model after training to synthesize new images, and add the synthesized images to the training set to obtain a second data enhancement data set;
步骤6:使用所述第二数据增强数据集训练分类器,以验证数据增强的效果,其中,所述合成图像用于训练第二分类器并得到第二分类结果,所述训练集用于训练第一分类器并得到第一分类结果;Step 6: Use the second data enhancement data set to train a classifier to verify the effect of data enhancement, wherein the synthetic image is used to train the second classifier and obtain a second classification result, and the training set is used for training the first classifier and obtain the first classification result;
步骤7:用所述测试集对所述第一分类器和第二分类器进行测试。Step 7: Use the test set to test the first classifier and the second classifier.
根据一种优选的实施方式,步骤42的生成器训练还包括:According to a preferred implementation, the generator training in step 42 also includes:
步骤421:突变,在生成器训练阶段,固定判别器参数,对当前父代生成器进行三次突变操作得到多个子代生成器;Step 421: Mutation. In the generator training phase, the discriminator parameters are fixed, and three mutation operations are performed on the current parent generator to obtain multiple child generators;
步骤422:评价,通过适应性函数来计算当前父代判别器下的各子代生成器的适应性分数,在当前父代判别器下,使用适应性函数对子代生成器生成性能进行评估,并量化为相应的适应性分数:Step 422: Evaluate, use the fitness function to calculate the fitness score of each child generator under the current parent discriminator, and use the fitness function to evaluate the generation performance of the child generator under the current parent discriminator. and quantified as the corresponding fitness score:
F=Fq+γFd F= Fq + γFd
其中,Fq用于衡量生成样本的质量,Fd用于衡量生成样本的多样性,F表示适应性分数,γ表示超参数;Among them, F q is used to measure the quality of the generated samples, F d is used to measure the diversity of the generated samples, F represents the fitness score, and γ represents the hyperparameter;
步骤423:选择,通过排序选择适应性分数最高的子代生成器作为下一次迭代的父代生成器。Step 423: Selection, select the offspring generator with the highest fitness score through sorting as the parent generator for the next iteration.
本发明的有益效果在于:The beneficial effects of the present invention are:
1、本发明的数据增强方法,多个生成器突变中选择当前相对最优生成器以兼顾生成图片的质量与多样性,能够生成高质量且多样的样本对训练集进行扩充,最终提高了分类结果的各项指标。1. The data enhancement method of the present invention selects the current relatively optimal generator among multiple generator mutations to take into account the quality and diversity of generated images. It can generate high-quality and diverse samples to expand the training set, and ultimately improves classification. indicators of the results.
2、结合特征向量的线性插值合成新的训练样本并生成相关的线性插值标签,不仅拓展了整个训练集的分布,也对离散样本空间进行连续化并且提高了领域间的平滑性,从而使得模型能够更好地得到训练。2. Combined with linear interpolation of feature vectors to synthesize new training samples and generate related linear interpolation labels, it not only expands the distribution of the entire training set, but also continuousizes the discrete sample space and improves the smoothness between fields, thus making the model Be better trained.
附图说明Description of the drawings
图1是本发明增强方法的流程图;Figure 1 is a flow chart of the enhancement method of the present invention;
图2是残差块结构示意图;Figure 2 is a schematic diagram of the residual block structure;
图3(a)是真实患病图像;Figure 3(a) is a real diseased image;
图3(b)是合成患病图像;Figure 3(b) is a synthetic diseased image;
图3(c)是真实非患病图像;和Figure 3(c) is a real non-diseased image; and
图3(d)是合成非患病图像。Figure 3(d) is a synthetic non-diseased image.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明了,下面结合具体实施方式并参照附图,对本发明进一步详细说明。应该理解,这些描述只是示例性的,而并非要限制本发明的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本发明的概念。In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the specific embodiments and the accompanying drawings. It should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. Furthermore, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily confusing the concepts of the present invention.
下面结合附图进行详细说明。A detailed description will be given below with reference to the accompanying drawings.
针对小规模数据集在训练深度卷积神经网络时易出现过拟合的问题,本发明提出了一种基于进化生成对抗网络的心脏磁共振图像数据增强方法。本发明方法在多个生成器突变中选择当前相对最优生成器以兼顾生成图片的质量与多样性,同时还结合特征向量的线性插值合成新的训练样本并生成相关的线性插值标签,不仅拓展了整个训练集的分布,也对离散样本空间进行连续化并且提高了领域间的平滑性。In view of the over-fitting problem that occurs easily when training deep convolutional neural networks with small-scale data sets, the present invention proposes a cardiac magnetic resonance image data enhancement method based on evolutionary generative adversarial networks. The method of the present invention selects the current relatively optimal generator among multiple generator mutations to take into account the quality and diversity of the generated pictures. At the same time, it also combines linear interpolation of feature vectors to synthesize new training samples and generate relevant linear interpolation labels. It not only expands It not only improves the distribution of the entire training set, but also continuousizes the discrete sample space and improves the smoothness between fields.
图1为本发明的方法的流程图,如图1所示,基于进化生成对抗网络的生成式医学图像数据增强方法的具体步骤包括:Figure 1 is a flow chart of the method of the present invention. As shown in Figure 1, the specific steps of the generative medical image data enhancement method based on evolutionary generative adversarial networks include:
步骤1:采集心脏磁共振图像数据集,所述数据集包括良性心脏磁共振图像和恶性心脏磁共振图像;Step 1: Collect a cardiac magnetic resonance image data set, the data set includes benign cardiac magnetic resonance images and malignant cardiac magnetic resonance images;
步骤2:对所述数据集进行预处理,并将所述数据集随机分为训练集和测试集。预处理方法包括重采样、感兴趣区域选取、归一化和最终感兴趣区域选择。可根据实际需要分配训练集和测试集,一般按照4:1的比例进行动态分配,随机选择归属训练集还是测试集。Step 2: Preprocess the data set and randomly divide the data set into a training set and a test set. Preprocessing methods include resampling, region of interest selection, normalization and final region of interest selection. The training set and the test set can be allocated according to actual needs. Generally, they are dynamically allocated in a ratio of 4:1, and the training set or the test set is randomly selected.
步骤3:对预处理后的所述训练集进行仿射变换得到数据增强数据集。仿射变换操作包括水平翻转、垂直翻转、0°-20°随机放大旋转、90°、180°、270°旋转,纵横轴0-2%随机放大平移。Step 3: Perform affine transformation on the preprocessed training set to obtain a data enhancement data set. Affine transformation operations include horizontal flip, vertical flip, 0°-20° random enlargement and rotation, 90°, 180°, 270° rotation, and 0-2% random enlargement and translation on the vertical and horizontal axes.
步骤4:将所述数据增强数据集输入构建的进化GAN模型进行训练,本申请方法在训练过程中融合了进化算法与线性插值的思想,具体包括:Step 4: Input the data augmentation data set into the constructed evolutionary GAN model for training. The method of this application integrates the ideas of evolutionary algorithm and linear interpolation during the training process, specifically including:
步骤41:采集混合高斯分布中的噪声z作为生成器的初始输入,生成器将输入的噪声合成一张图像;Step 41: Collect the noise z in the mixed Gaussian distribution as the initial input of the generator, and the generator synthesizes the input noise into an image;
一般生成对抗网络会使用服从多元均匀分布或多元正态分布的噪声z来当做模型的输入,本发明采用多模态分布作为输入,可以更好的适应真实训练数据分布固有的多模态,本发明采用多模态作为输入的方法可以提升生成图片的质量与多样性。Generally, generative adversarial networks will use noise z that obeys multivariate uniform distribution or multivariate normal distribution as the input of the model. The present invention uses multimodal distribution as input, which can better adapt to the inherent multimodality of real training data distribution. The invention uses multi-modality as input method to improve the quality and diversity of generated images.
步骤42:在生成器训练阶段,固定判别器的参数,通过突变、评价和选择三个阶段来训练生成器;Step 42: In the generator training stage, the parameters of the discriminator are fixed, and the generator is trained through three stages: mutation, evaluation and selection;
步骤421:突变,在生成器训练阶段,固定判别器参数,对当前生成器进行三次突变操作得到子代生成器。三种突变操作分别为极大极小值突变、启发式突变、最小二乘突变。Step 421: Mutation. In the generator training phase, the discriminator parameters are fixed, and three mutation operations are performed on the current generator to obtain the offspring generator. The three mutation operations are maximum and minimum mutation, heuristic mutation, and least squares mutation.
极大极小值突变:该突变对原始目标函数改动较小,该突变能够提供有效梯度,缓解梯度消失现象。极大极小值可写作公式如下:Maximum and minimum value mutation: This mutation has small changes to the original objective function. This mutation can provide effective gradients and alleviate the phenomenon of gradient disappearance. The maximum and minimum values can be written as follows:
启发式突变:与最小化鉴别器正确的log概率的极小极大变异不同,启发式突变旨在最大化鉴别器错误的log概率,当鉴别器将生成样本判定为假时,启发式突变不会饱和,仍能够提供有效梯度,使得生成器能够持续不断的训练。启发式突变可写作公式如下:Heuristic mutation: Unlike minimax mutation, which minimizes the log probability that the discriminator is correct, heuristic mutation aims to maximize the log probability that the discriminator is wrong. When the discriminator judges the generated sample as false, heuristic mutation does not will be saturated and can still provide effective gradients, allowing the generator to continue training. The heuristic mutation can be written as follows:
最小二乘突变:灵感来自于LSGAN,最小二乘突变也可以避免消失梯度。同时,与启发式变异相比,最小二乘变异虽然不会用非常高的代价来生成假样本,但也不会用非常低的代价来避免惩罚,这在一定程度上避免了模式崩溃。最小二乘突变可写作公式如下:Least squares mutation: Inspired by LSGAN, least squares mutation can also avoid vanishing gradients. At the same time, compared with heuristic mutation, although least squares mutation does not use a very high cost to generate false samples, it does not use a very low cost to avoid penalties, which avoids model collapse to a certain extent. The least squares mutation can be written as follows:
步骤:422:评价,通过适应性函数来计算当前父代判别器下的各个子代生成器的适应性分数。即在当前父代判别器下,使用适应性函数对子代生成器生成性能进行评估,并量化为相应的适应性分数:Step: 422: Evaluation, calculate the fitness score of each child generator under the current parent discriminator through the fitness function. That is, under the current parent discriminator, use the fitness function to evaluate the generation performance of the offspring generator, and quantify it into the corresponding fitness score:
F=Fq+γFd F= Fq + γFd
其中,F表示适应性分数,Fq衡量生成样本的质量,即该子代生成器能否骗过判别器,其表达式如下:Among them, F represents the adaptability score, and F q measures the quality of the generated samples, that is, whether the descendant generator can fool the discriminator. Its expression is as follows:
Fq=Ez[D(G(z))]F q =E z [D(G(z))]
Fd衡量生成样本的多样性,它衡量了根据该子代生成器再次更新判别器参数时所产生的梯度大小,如果该子代生成器生成的样本相对集中,即缺乏多样性,则相应在更新判别器参数时更容易引起大幅度的梯度波动,其表达式如下:F d measures the diversity of generated samples. It measures the gradient size generated when the discriminator parameters are updated again according to the descendant generator. If the samples generated by the descendant generator are relatively concentrated, that is, they lack diversity, then the corresponding When updating the discriminator parameters, it is more likely to cause large gradient fluctuations. The expression is as follows:
γ(≥0)是用来调节生成质量与多样性权重的超参数,在实验中可以自由调节。γ (≥0) is a hyperparameter used to adjust the weight of generation quality and diversity, and can be adjusted freely in experiments.
步骤423:选择,通过排序选择适应性分数最高的子代生成器作为下一次迭代的父代生成器。Step 423: Selection, select the offspring generator with the highest fitness score through sorting as the parent generator for the next iteration.
改进生成对抗网络的训练方法是基于父代生成器突变了多个子代生成器进行训练,经过适应性分数函数的评价后选择最优的一个或多个生成器作为下一个判别环境中的父代生成器。The training method of improving the generative adversarial network is to train multiple descendant generators based on the mutation of the parent generator. After the evaluation of the adaptability score function, the optimal generator or generators are selected as the parent in the next discriminant environment. Builder.
步骤43:在判别器训练阶段,固定生成器的参数,将生成器合成的图像与所述数据增强数据集中的图像x通过线性插值方法合成一张图像作为判别器的输入。得到插值新样本与新标签,判别器损失为:Step 43: In the discriminator training stage, the parameters of the generator are fixed, and the image synthesized by the generator and the image x in the data enhancement data set are synthesized into an image through linear interpolation method as the input of the discriminator. Obtain the interpolated new sample and new label, and the discriminator loss is:
通过计算判别器的平均损失,更新判别器参数。Update the discriminator parameters by calculating the average loss of the discriminator.
本发明方法通过原始样本构建了虚拟的训练样本,结合特征向量的线性插值合成新的训练样本并生成相关的线性叉子标签来拓展整个训练集的分布,具体公示如下:The method of the present invention constructs virtual training samples from original samples, combines linear interpolation of feature vectors to synthesize new training samples, and generates related linear fork labels to expand the distribution of the entire training set. The specific disclosure is as follows:
其中xi,xj是原始输入向量,yi,yj是标签编码,(xi,yi),(xj,yj)是从原始样本中随机采样的两个样本,λ∈Beta[α,α]是权重向量,α∈(0,+∞)是控制特征-目标向量之间插值强度的超参数。该线性插值方法使得模型在处理原始样本和样本之间的区域时能够表现为线性,以达到降低预测训练样本之外的测试样本时的不适应性,增强泛化能力,同时可以对离散样本空间进行连续化,提高领域间的平滑性。where x i , x j are the original input vectors, y i , y j are the label codes, (x i , y i ), (x j , y j ) are two samples randomly sampled from the original samples, λ∈Beta [α, α] is the weight vector, and α∈(0,+∞) is the hyperparameter that controls the interpolation strength between feature-target vectors. This linear interpolation method enables the model to behave linearly when processing the original sample and the area between the samples, so as to reduce the incompatibility when predicting test samples other than the training samples, enhance the generalization ability, and at the same time, it can be applied to the discrete sample space. Continuity is performed to improve smoothness between domains.
步骤44:生成器和判别器分阶段对抗训练,不断重复步骤42至步骤43直到达到设定的的训练次数,训练结束;Step 44: The generator and the discriminator are trained against each other in stages, and steps 42 to 43 are repeated until the set training times are reached, and the training ends;
步骤5:使用训练完成后的进化生成对抗模型合成新的图像,将合成图像加入所述训练集中,得到第二数据增强数据集;Step 5: Use the evolved generative adversarial model after training to synthesize new images, and add the synthesized images to the training set to obtain a second data enhancement data set;
步骤6:使用所述第二数据增强数据集训练分类器,其中,所述合成图像用于训练第二分类器并得到第二分类结果,所述训练集用于训练第一分类器并得到第一分类结果。Step 6: Use the second data augmentation data set to train a classifier, wherein the synthetic image is used to train the second classifier and obtain the second classification result, and the training set is used to train the first classifier and obtain the second classification result. One classification result.
步骤7:用所述测试集对所述第一分类器和第二分类器进行测试。Step 7: Use the test set to test the first classifier and the second classifier.
通过分类实验来验证方法的有效性,并通过对比试验探究了生成样本的多样性以及生成样本数量对心脏磁共振图像分类结果的影响The effectiveness of the method was verified through classification experiments, and the impact of the diversity of generated samples and the number of generated samples on the classification results of cardiac magnetic resonance images was explored through comparative experiments.
本发明方法在训练过程中使用了TTUR(Two-Timescale Update Rule)方法,具体为:将低速更新规则用于生成网络中,将高速更新规则用于判别网络中,设置生成网络学习率为0.0001,判别网络学习率为0.0004,实验中可以实现1:1更新。The method of the present invention uses the TTUR (Two-Timescale Update Rule) method in the training process, specifically: the low-speed update rule is used in the generation network, the high-speed update rule is used in the discriminant network, and the learning rate of the generation network is set to 0.0001. The learning rate of the discriminant network is 0.0004, and 1:1 update can be achieved in the experiment.
本发明的心脏磁共振图像数据增强方法,在模型中使用改良的残差块结构和自注意力模块对生成器和判别器进行训练,残差块结构能够缓解梯度消失问题,加快模型收敛速度,从而在相同的训练时间内更快速的训练出高性能生成器。残差块结构如图2所示。The cardiac magnetic resonance image data enhancement method of the present invention uses an improved residual block structure and a self-attention module to train the generator and discriminator in the model. The residual block structure can alleviate the gradient disappearance problem and speed up the model convergence speed. Thus, high-performance generators can be trained more quickly in the same training time. The residual block structure is shown in Figure 2.
基于残差块结构和自注意力模块对生成器进行训练,举例说明如下:The generator is trained based on the residual block structure and self-attention module. An example is as follows:
步骤a1:对噪声z进行全连接映射,并进行尺寸重塑,输出尺寸为1024×4×4;Step a1: Perform fully connected mapping on the noise z and resize it. The output size is 1024×4×4;
步骤a2:将上一层的输出输入改良的残差结构,该输入会分为两条通道,其中一条通道为残差部分,该通道由5个子操作组成:步长为1的卷积操作、批归一化处理、LeakyReLU激活函数、步长为1的卷积操作以及批归一化,另一个通道为直连通道,与残差通道的输出合成为统一输出,输出尺寸为1024×4×4;Step a2: Input the output of the previous layer into the improved residual structure. The input will be divided into two channels, one of which is the residual part. This channel consists of 5 sub-operations: a convolution operation with a step size of 1, Batch normalization processing, LeakyReLU activation function, convolution operation with stride 1 and batch normalization. The other channel is a direct connection channel, which is combined with the output of the residual channel into a unified output. The output size is 1024×4× 4;
步骤a3:在经过残差结构后,用尺寸为3×3,步长为2的转置卷积层处理上一层的输出,在这之后还需要经过归一化处理与ReLU激活函数,输出尺寸512×8×8;Step a3: After passing through the residual structure, use a transposed convolution layer with a size of 3×3 and a stride of 2 to process the output of the previous layer. After this, it also needs to undergo normalization processing and ReLU activation function to output Size 512×8×8;
步骤a4:重复步骤a2至a3的操作3次后,得到尺寸为128×32×32的输出,将该输出输入自注意力模块中,得到的输出尺寸仍为128×32×32;Step a4: After repeating the operations of steps a2 to a3 three times, an output with a size of 128×32×32 is obtained. The output is input into the self-attention module, and the output size obtained is still 128×32×32;
步骤a5:重复步骤a2操作1次,使用尺寸为3×3,步长为1的转置卷积层,得到输出尺寸为64×32×32的输出,经过步长为2的转置卷积操作与tanh函数,得到3×64×64的图像;Step a5: Repeat step a2 once, using a transposed convolution layer with a size of 3×3 and a stride of 1, to obtain an output with an output size of 64×32×32, after transposed convolution with a stride of 2 Operate with the tanh function to obtain a 3×64×64 image;
基于残差结构和自注意力模块对判别器进行训练,举例说明如下:The discriminator is trained based on the residual structure and self-attention module. Examples are as follows:
步骤b1:输入一张尺寸为3×64×64的图片;Step b1: Enter a picture with size 3×64×64;
步骤b2:使用尺寸为3×3,步长为1的卷积层,得到输出尺寸为64×64×64的输出;Step b2: Use a convolutional layer with a size of 3×3 and a stride of 1 to obtain an output with an output size of 64×64×64;
步骤b3:将上一层的输出输入改良的残差结构,该输入会分为两条通道,其中一条通道为残差部分,该通道由5个子操作组成:步长为1的卷积操作、批归一化处理、LeakyReLU激活函数、步长为1的卷积操作以及批归一化,另一个通道为直连通道,与残差通道的输出合成为统一输出,Step b3: Input the output of the previous layer into the improved residual structure. The input will be divided into two channels, one of which is the residual part. This channel consists of 5 sub-operations: a convolution operation with a step size of 1, Batch normalization processing, LeakyReLU activation function, convolution operation with stride 1 and batch normalization. The other channel is a direct connection channel, which is synthesized with the output of the residual channel into a unified output.
步骤b4:重复步骤b3操作1次后,将输出经过尺寸为3×3,步长为2的卷积层,得到尺寸为128×32×32的输出;Step b4: After repeating step b3 once, pass the output through a convolution layer with a size of 3×3 and a stride of 2 to obtain an output with a size of 128×32×32;
步骤b5:将该输出输入自注意力模块中,得到的输出尺寸仍为128×32×32;Step b5: Input the output into the self-attention module, and the resulting output size is still 128×32×32;
步骤b6:重复步骤b3的操作3次后,得到尺寸为1024×4×4的输出;Step b6: After repeating the operation of step b3 three times, an output with a size of 1024×4×4 is obtained;
步骤b7:使用全连接映射将上一层的输出映射为尺寸为1的输出作为最终输出。Step b7: Use fully connected mapping to map the output of the previous layer to an output of size 1 as the final output.
图3是本发明方法得到的合成图像和真实图像的比较,相较于真实图像,合成图像的清晰度稍差,轮廓没有真实图像锐利,但可以有效地被应用于数据增强任务中。Figure 3 is a comparison between the synthetic image and the real image obtained by the method of the present invention. Compared with the real image, the clarity of the synthetic image is slightly worse, and the outline is not as sharp as the real image, but it can be effectively used in data enhancement tasks.
为了进一步说明本发明方法数据增强的效果,将本发明方法与现有方法进行准确率、特异性和敏感度的比较,具体结果如下:In order to further illustrate the data enhancement effect of the method of the present invention, the accuracy, specificity and sensitivity of the method of the present invention are compared with existing methods. The specific results are as follows:
从表中可以看出,本发明所提出方法准确率、特异性和敏感度都较现有技术高。It can be seen from the table that the accuracy, specificity and sensitivity of the method proposed in the present invention are higher than those of the existing technology.
需要注意的是,上述具体实施例是示例性的,本领域技术人员可以在本发明公开内容的启发下想出各种解决方案,而这些解决方案也都属于本发明的公开范围并落入本发明的保护范围之内。本领域技术人员应该明白,本发明说明书及其附图均为说明性而并非构成对权利要求的限制。本发明的保护范围由权利要求及其等同物限定。It should be noted that the above specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the scope of the present invention. within the scope of protection of the invention. Those skilled in the art should understand that the description of the present invention and the accompanying drawings are illustrative and do not constitute limitations on the claims. The scope of protection of the present invention is defined by the claims and their equivalents.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010715325.3A CN111861924B (en) | 2020-07-23 | 2020-07-23 | A cardiac magnetic resonance image data enhancement method based on evolutionary GAN |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010715325.3A CN111861924B (en) | 2020-07-23 | 2020-07-23 | A cardiac magnetic resonance image data enhancement method based on evolutionary GAN |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111861924A CN111861924A (en) | 2020-10-30 |
| CN111861924B true CN111861924B (en) | 2023-09-22 |
Family
ID=72949656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010715325.3A Active CN111861924B (en) | 2020-07-23 | 2020-07-23 | A cardiac magnetic resonance image data enhancement method based on evolutionary GAN |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111861924B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112561838B (en) * | 2020-12-02 | 2024-01-30 | 西安电子科技大学 | Image enhancement method based on residual self-attention and generation of countermeasure network |
| CN112613488B (en) * | 2021-01-07 | 2024-04-05 | 上海明略人工智能(集团)有限公司 | Face recognition method and device, storage medium and electronic equipment |
| CN114282581B (en) * | 2021-01-29 | 2023-10-13 | 北京有竹居网络技术有限公司 | Training sample acquisition method and device based on data enhancement and electronic equipment |
| CN114545255B (en) * | 2022-01-18 | 2022-08-26 | 广东工业大学 | Lithium battery SOC estimation method based on competitive generation type antagonistic neural network |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109902602A (en) * | 2019-02-16 | 2019-06-18 | 北京工业大学 | A method for identification of foreign body materials in airport runways based on data augmentation of adversarial neural network |
| CN109948693A (en) * | 2019-03-18 | 2019-06-28 | 西安电子科技大学 | A hyperspectral image classification method based on superpixel sample augmentation and generative adversarial network |
| CN110310345A (en) * | 2019-06-11 | 2019-10-08 | 同济大学 | An image generation method based on automatic division of labor and implicit clustering generative adversarial network |
| CN110415261A (en) * | 2019-08-06 | 2019-11-05 | 山东财经大学 | A facial expression animation conversion method and system for regional training |
| CN110457457A (en) * | 2019-08-02 | 2019-11-15 | 腾讯科技(深圳)有限公司 | Dialog generation model training method, dialog generation method and device |
| CN110826639A (en) * | 2019-11-12 | 2020-02-21 | 福州大学 | A zero-sample image classification method using full data training |
| CN111062880A (en) * | 2019-11-15 | 2020-04-24 | 南京工程学院 | Underwater image real-time enhancement method based on condition generation countermeasure network |
| CN111091059A (en) * | 2019-11-19 | 2020-05-01 | 佛山市南海区广工大数控装备协同创新研究院 | Data equalization method in household garbage plastic bottle classification |
| CN111325236A (en) * | 2020-01-21 | 2020-06-23 | 南京大学 | Ultrasonic image classification method based on convolutional neural network |
| CN111353995A (en) * | 2020-03-31 | 2020-06-30 | 成都信息工程大学 | Cervical single cell image data generation method based on generation countermeasure network |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9940712B2 (en) * | 2014-04-25 | 2018-04-10 | The Regents Of The University Of California | Quantitating disease progression from the MRI images of multiple sclerosis patients |
| US11024009B2 (en) * | 2016-09-15 | 2021-06-01 | Twitter, Inc. | Super resolution using a generative adversarial network |
| US11120337B2 (en) * | 2017-10-20 | 2021-09-14 | Huawei Technologies Co., Ltd. | Self-training method and system for semi-supervised learning with generative adversarial networks |
-
2020
- 2020-07-23 CN CN202010715325.3A patent/CN111861924B/en active Active
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109902602A (en) * | 2019-02-16 | 2019-06-18 | 北京工业大学 | A method for identification of foreign body materials in airport runways based on data augmentation of adversarial neural network |
| CN109948693A (en) * | 2019-03-18 | 2019-06-28 | 西安电子科技大学 | A hyperspectral image classification method based on superpixel sample augmentation and generative adversarial network |
| CN110310345A (en) * | 2019-06-11 | 2019-10-08 | 同济大学 | An image generation method based on automatic division of labor and implicit clustering generative adversarial network |
| CN110457457A (en) * | 2019-08-02 | 2019-11-15 | 腾讯科技(深圳)有限公司 | Dialog generation model training method, dialog generation method and device |
| CN110415261A (en) * | 2019-08-06 | 2019-11-05 | 山东财经大学 | A facial expression animation conversion method and system for regional training |
| CN110826639A (en) * | 2019-11-12 | 2020-02-21 | 福州大学 | A zero-sample image classification method using full data training |
| CN111062880A (en) * | 2019-11-15 | 2020-04-24 | 南京工程学院 | Underwater image real-time enhancement method based on condition generation countermeasure network |
| CN111091059A (en) * | 2019-11-19 | 2020-05-01 | 佛山市南海区广工大数控装备协同创新研究院 | Data equalization method in household garbage plastic bottle classification |
| CN111325236A (en) * | 2020-01-21 | 2020-06-23 | 南京大学 | Ultrasonic image classification method based on convolutional neural network |
| CN111353995A (en) * | 2020-03-31 | 2020-06-30 | 成都信息工程大学 | Cervical single cell image data generation method based on generation countermeasure network |
Non-Patent Citations (7)
| Title |
|---|
| Differentiable Augmentation for Data-Efficient GAN Training;Shengyu Zhao等;https://arxiv.org/pdf/2006.10738v1.pdf;第1-18页 * |
| Evolutionary Generative Adversarial Networks;Chaoyue Wang等;IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION;第23卷(第6期);第921-934页 * |
| Gaussian Mixture Generative Adversarial Networks for Diverse Datasets, and the Unsupervised Clustering of Images;Matan Ben-Yosef等;arXiv;第1-20页 * |
| mixup: BEYOND EMPIRICAL RISK MINIMIZATION;Hongyi Zhang等;arXiv;第1-13页 * |
| 基于多尺寸卷积与残差单元的快速收敛GAN胸部X射线图像数据增强;于贺等;信号处理;第35卷(第12期);第2045-2054页 * |
| 基于自编码结构的生成对抗网络人脸图像生成技术研究;李顼晟;中国优秀硕士学位论文全文数据库 信息科技辑(第7期);第I138-920页 * |
| 改进型循环生成对抗网络的血管内超声图像增强;姚哲维等;计算机科学(第5期);第228-234页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111861924A (en) | 2020-10-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111861924B (en) | A cardiac magnetic resonance image data enhancement method based on evolutionary GAN | |
| CN113361560B (en) | Semantic-based multi-pose virtual fitting method | |
| Liang et al. | Sketch guided and progressive growing GAN for realistic and editable ultrasound image synthesis | |
| Zhang et al. | Stackgan++: Realistic image synthesis with stacked generative adversarial networks | |
| Park et al. | Review on generative adversarial networks: focusing on computer vision and its applications | |
| Luo et al. | Dual VAEGAN: A generative model for generalized zero-shot learning | |
| CN109711401A (en) | A Text Detection Method in Natural Scene Images Based on Faster Rcnn | |
| Zhu et al. | Csrgan: medical image super-resolution using a generative adversarial network | |
| CN111260667B (en) | Neurofibromatosis segmentation method combined with spatial guidance | |
| CN112036260A (en) | An expression recognition method and system for multi-scale sub-block aggregation in natural environment | |
| Luo et al. | Measurement guidance in diffusion models: Insight from medical image synthesis | |
| CN112837318B (en) | Generation method, synthesis method, medium and terminal of ultrasonic image generation model | |
| CN107590775A (en) | A kind of image super-resolution amplification method using regression tree field | |
| CN118608910A (en) | Virtual try-on method and system based on adaptive multimodal fusion and dynamic feature enhancement | |
| Xu et al. | Xagen: 3d expressive human avatars generation | |
| CN112766340B (en) | Depth capsule network image classification method and system based on self-adaptive spatial mode | |
| CN117975007A (en) | Image augmentation-based semi-supervised medical image segmentation method, system, equipment and medium | |
| Wan et al. | SGBGAN: minority class image generation for class-imbalanced datasets | |
| CN119130802B (en) | Image compressed sensing reconstruction method and system based on dynamic convolution and feature fusion | |
| CN114783039A (en) | Motion migration method driven by 3D human body model | |
| Xing et al. | Dual attention based feature pyramid network | |
| CN109377498A (en) | An Interactive Mapping Method Based on Recurrent Neural Network | |
| CN118781236A (en) | A method for generating loose clothing animation for virtual fashion shows | |
| Chen et al. | CS-VITON: a realistic virtual try-on network based on clothing region alignment and SPM | |
| CN116580164B (en) | A clothing feature learning method for single-view three-dimensional human body reconstruction |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |