18种热门GAN的PyTorch开源代码|附论文地址

夏乙 编译整理

量子位 出品 | 公众号 QbitAI

18种热门GAN的PyTorch开源代码|附论文地址

想深入探索一下以脑洞著称的生成对抗网络(GAN),生成个带有你专属风格的大作?

有GitHub小伙伴提供了前人的肩膀供你站上去。TA汇总了18种热门GAN的PyTorch实现,还列出了每一种GAN的论文地址,可谓良心资源。

这18种GAN是:

  • Auxiliary Classifier GAN
  • Adversarial Autoencoder
  • Boundary-Seeking GAN
  • Conditional GAN
  • Context-Conditional GAN
  • CycleGAN
  • Deep Convolutional GAN
  • DiscoGAN
  • DRAGAN
  • DualGAN
  • GAN
  • LSGAN
  • Pix2Pix
  • PixelDA
  • Semi-Supervised GAN
  • Super-Resolution GAN
  • Wasserstein GAN
  • Wasserstein GAN GP

18种热门GAN的PyTorch开源代码|附论文地址

来源:Kaggle blog

下面,量子位简单介绍一下这些GAN:

Auxiliary Classifier GAN

带辅助分类器的GAN,简称ACGAN。

18种热门GAN的PyTorch开源代码|附论文地址

在这类GAN变体中,生成器生成的每张图像,都带有一个类别标签,鉴别器也会同时针对来源和类别标签给出两个概率分布。

论文中描述的模型,可以生成符合1000个ImageNet类别的128×128图像。

paper

Conditional Image Synthesis With Auxiliary Classifier

GANsAugustus Odena, Christopher Olah, Jonathon Shlens

https://arxiv.org/abs/1610.09585

Adversarial Autoencoder

这种模型简称AAE,是一种概率性自编码器,运用GAN,通过将自编码器的隐藏编码向量和任意先验分布进行匹配来进行变分推断,可以用于半监督分类、分离图像的风格和内容、无监督聚类、降维、数据可视化等方面。

在论文中,研究人员给出了用MNIST和多伦多人脸数据集 (TFD)训练的模型所生成的样本。

18种热门GAN的PyTorch开源代码|附论文地址

paper

Adversarial Autoencoders

Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, Brendan Frey

https://arxiv.org/abs/1511.05644

Boundary-Seeking GAN

原版GAN不适用于离散数据,而Boundary-Seeking GAN(简称BGAN)用来自鉴别器的估计差异度量来计算生成样本的重要性权重,为训练生成器来提供策略梯度,因此可以用离散数据进行训练。

BGAN里生成样本的重要性权重和鉴别器的判定边界紧密相关,因此叫做“寻找边界的GAN”。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Boundary-Seeking Generative Adversarial Networks

R Devon Hjelm, Athul Paul Jacob, Tong Che, Adam Trischler, Kyunghyun Cho, Yoshua Bengio

https://arxiv.org/abs/1702.08431

Conditional GAN

条件式生成对抗网络,简称CGAN,其中的生成器和鉴别器都以某种外部信息为条件,比如类别标签或者其他形式的数据。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Conditional Generative Adversarial Nets

Mehdi Mirza, Simon Osindero

https://arxiv.org/abs/1411.1784

Context-Conditional GAN

简称CCGAN,能用半监督学习的方法,修补图像上缺失的部分。

18种热门GAN的PyTorch开源代码|附论文地址

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Semi-Supervised Learning with Context-Conditional Generative Adversarial Networks

Emily Denton, Sam Gross, Rob Fergus

https://arxiv.org/abs/1611.06430

CycleGAN

这个模型是加州大学伯克利分校的一项研究成果,可以在没有成对训练数据的情况下,实现图像风格的转换。

18种热门GAN的PyTorch开源代码|附论文地址

这些例子,你大概不陌生:

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks

Jun-Yan Zhu, Taesung Park, Phillip Isola, Alexei A. Efros

https://arxiv.org/abs/1703.10593

论文原作者也开源了Torch和PyTorch的实现代码,详情见项目主页:

https://junyanz.github.io/CycleGAN

Deep Convolutional GAN

深度卷积生成对抗网络(DCGAN)模型是作为无监督学习的一种方法而提出的,GAN在其中是最大似然率技术的一种替代。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks

Alec Radford, Luke Metz, Soumith Chintala

https://arxiv.org/abs/1511.06434

DiscoGAN

在这种方法中,GAN要学习发现不同域之间的关系,然后在跨域迁移风格的时候保留方向、脸部特征等关键属性。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Learning to Discover Cross-Domain Relations with Generative Adversarial Networks

Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, Jiwon Kim

https://arxiv.org/abs/1703.05192

官方PyTorch实现:

https://github.com/SKTBrain/DiscoGAN

DRAGAN

DRAGAN用一种梯度惩罚策略来避免退化的局部局部均衡,加快了训练速度,通过减少模式崩溃提升了稳定性。

Paper

On Convergence and Stability of GANs

Naveen Kodali, Jacob Abernethy, James Hays, Zsolt Kira

https://arxiv.org/abs/1705.07215

DualGAN

这种变体能够用两组不同域的无标签图像来训练图像翻译器,架构中的主要GAN学习将图像从域U翻译到域V,而它的对偶GAN学习一个相反的过程,形成一个闭环。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

DualGAN: Unsupervised Dual Learning for Image-to-Image Translation

Zili Yi, Hao Zhang, Ping Tan, Minglun Gong

https://arxiv.org/abs/1704.02510

GAN

对,就是Ian Goodfellow那个原版GAN。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Generative Adversarial Networks

Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, Yoshua Bengio

https://arxiv.org/abs/1406.2661

Least Squares GAN

最小平方GAN(LSGAN)的提出,是为了解决GAN无监督学习训练中梯度消失的问题,在鉴别器上使用了最小平方损失函数。

Paper

Least Squares Generative Adversarial Networks

Xudong Mao, Qing Li, Haoran Xie, Raymond Y.K. Lau, Zhen Wang, Stephen Paul Smolley

https://arxiv.org/abs/1611.04076

Pix2Pix

这个模型大家应该相当熟悉了。它和CycleGAN出自同一个伯克利团队,是CGAN的一个应用案例,以整张图像作为CGAN中的条件。

18种热门GAN的PyTorch开源代码|附论文地址

在它基础上,衍生出了各种上色Demo,波及猫、人脸、房子、包包、漫画等各类物品,甚至还有人用它来去除(爱情动作片中的)马赛克。

18种热门GAN的PyTorch开源代码|附论文地址

Paper:

Image-to-Image Translation with Conditional Adversarial Networks

Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, Alexei A. Efros

https://arxiv.org/abs/1611.07004

Pix2Pix目前有开源的Torch、PyTorch、TensorFlow、Chainer、Keras模型,详情见项目主页:

https://phillipi.github.io/pix2pix/

PixelDA

这是一种以非监督方式学习像素空间跨域转换的方法,能泛化到训练中没有的目标类型。

Paper

Unsupervised Pixel-Level Domain Adaptation with Generative Adversarial Networks

Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, Dilip Krishnan

https://arxiv.org/abs/1612.05424

Semi-Supervised GAN

半监督生成对抗网络简称SGAN。它通过强制让辨别器输出类别标签,实现了GAN在半监督环境下的训练。

Paper:

Semi-Supervised Learning with Generative Adversarial NetworksAugustus Odenahttps://arxiv.org/abs/1606.01583

Super-Resolution GAN

超分辨率生成对抗网络简称SRGAN,将GAN用到了超分辨率任务上,可以将照片扩大4倍。

18种热门GAN的PyTorch开源代码|附论文地址

Paper

Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network

Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, Wenzhe Shi

https://arxiv.org/abs/1609.04802

Wasserstein GAN

简称WGAN,在学习分布上使用了Wasserstein距离,也叫Earth-Mover距离。新模型提高了学习的稳定性,消除了模型崩溃等问题,并给出了在debug或搜索超参数时有参考意义的学习曲线。

本文所介绍repo中的WGAN实现,使用了DCGAN的生成器和辨别器。

Paper

Wasserstein GAN

Martin Arjovsky, Soumith Chintala, Léon Bottou

https://arxiv.org/abs/1701.07875

Wasserstein GAN GP

WGAN的改进版。

Paper

Improved Training of Wasserstein GANs

Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, Aaron Courville

https://arxiv.org/abs/1704.00028

GitHub地址:https://github.com/eriklindernoren/PyTorch-GAN

量子位之前还介绍过同一位作者整理的17种GAN的Keras实现,与今天这18种PyTorch实现涉及的GAN变体有部分重叠,到这里查看:17种GAN变体的Keras实现请收好

— 完 —

版权所有,未经授权不得以任何形式转载及使用,违者必究。