原文链接:GAN for Medical Imaging: Generating Images and Annotations (需要翻墙)
在这篇文章中,我们将展示一种使用生成对抗网络(GANs)同时生成医学图像和相应注释的方法。我们使用心脏MR图像进行实验。对于模型开发,我们使用Keras和theano后端。
介绍:
器官的自动检测和分割在医学成像应用中有着巨大的作用。例如在心脏分析中,心脏腔室的自动分割用于心脏容积和射血分数的计算。这个领域的一个主要挑战是缺乏数据和注释。具体来说,医学影像注释必须由临床专家进行,成本高、耗时长。在本文中,我们将介绍一种使用GANs同时生成数据和注释的方法。考虑到医学影像应用中数据和标注的稀缺性,我们的方法生成的数据和标注可以用于开发数据饥渴型深度学习算法。
数据:
我们使用了MICCAI 2012 RV分割挑战数据集。采用TrainingSet对16例患者进行图像和专家注释的训练,开发算法。我们将注释转换为与图像大小相同的二进制掩码。原始图像/蒙版尺寸为216×256。为了便于训练,我们将图像/蒙版的采样降至32×32。下图是心脏右心室(RV)的样本图像和相应的注释。
A 32 by 32 MR image and annotation mask.
方法:
We use a classic GAN network with two blocks:
- Generator: A convolutional neural network to generate images and corresponding masks.
- Discriminator: A convolutional neural network to classify real images/masks from generated images/masks.
Here mask refers to a binary mask corresponding to the annotation.
The block diagram of the network is shown below.
我们使用两个块的经典GAN网络:
生成器:用于生成图像和相应掩码的卷积神经网络。
鉴别器:一种卷积神经网络,用于从生成的图像/掩码中对真实图像/掩码进行分类。
这里的掩码是指与注释对应的二进制掩码。
该网络的框图如下所示。
Block diagram of GAN for generating image and annotation.
Algorithm Training
To train the algorithm we follow these steps:
- Initialize Generator and Discriminator randomly.
- Generate some images/masks using Generator.
- Train Discriminator using the collected real images/masks (with y=1 as labels) and generated images/masks (with y=0 as labels).
- Freeze the weights in Discriminator and stack it to Generator (figure below).
- Train the stacked network using the generated images with y=1 as forced labels.
- Return to step 2.
为了训练算法,我们遵循以下步骤:
1、随机初始化生成器和鉴别器。
2、使用生成器生成一些图像/掩码。
3、使用采集的真实图像/掩码(标签为y=1)和生成的图像/掩码(标签为y=0)训练鉴别器。
4、冻结鉴别器中的权重并将其叠加到生成器中(如下图所示)。
5、使用生成的图像y=1作为强制标签来训练叠加的网络。
6、返回到步骤2。
It is noted that, initially, the generated images and masks are practically garbage. As training continuous they will become more meaningful. Some sample generated images and masks are depicted below.
值得注意的是,最初生成的图像和掩码实际上是垃圾。随着训练的不断进行,它们将变得更有意义。下面描述了一些生成的示例图像和掩码。
Sample generated images and masks.
This was mainly a prototype of a proof of concept. Clearly, the idea could be expanded to generating a higher resolution data.
这主要是一个概念证明的原型。显然,这个想法可以扩展到生成更高分辨率的数据。
The code is shared in:github—code