Github 推荐项目 | 用 TensorFlow 简单地实现 StarGAN

本库用 TensorFlow 简单的实现了 StarGAN。

StarGAN 是一种新颖且可扩展的方法,可以仅使用一个模型来执行多个域的图像到图像的转换。StarGAN 这样一个统一的模型体系架构让开发者可以同时训练单个网络中具有不同域的多个数据集,这导致StarGAN的图像转化结果比现有模型质量更高,并具有将输入图像灵活转化成任何期望目标域的新颖能力。

Github:

https://github.com/taki0112/StarGAN-Tensorflow

  依赖

  • Tensorflow 1.8

  • Python 3.6

  用法

下载数据集:

python download.py celebA

├── dataset
  └── celebA
      ├── train
          ├── 000001.jpg 
          ├── 000002.jpg
          └── ...
      ├── test (It is not celebA)
          ├── a.jpg (The test image that you wanted)
          ├── b.png
          └── ...
      ├── list_attr_celeba.txt (For attribute information)

训练:

  • python main.py --phase train

测试:

  • python main.py - 阶段测试

  • 同时运行 celebA 测试图像和您想要的图像

预训练模型:

  • Download checkpoint for 128x128

    https://drive.google.com/open?id=1ezwtU1O_rxgNXgJaHcAynVX8KjMt0Ua-

  总结

640?wx_fmt=png

  结果(128x128, wgan-gp):

女人

640?wx_fmt=png

男人

640?wx_fmt=png∞∞∞

640?wx_fmt=jpeg&wx_lazy=1

IT派 - {技术青年圈} 持续关注互联网、区块链、人工智能领域 640?wx_fmt=jpeg


公众号回复“机器学习”

邀你加入IT派{ AI机器学习群 } 


猜你喜欢

转载自blog.csdn.net/j2iayu7y/article/details/80788844
今日推荐