Coder Social home page Coder Social logo

generators-with-stylegan2's Introduction

基于StyleGAN2的新版人脸生成器


  这儿是一批基于StyleGAN2制作的新版人脸生成器,即对于旧版的黄种人脸生成器网红脸生成器明星脸生成器超模脸生成器萌娃脸生成器进行了基于StyleGAN2的重制,使生成效果得到大幅提升。



新版的提升与价值何在?

  基于StyleGAN2制作的版本消除了图片中水滴斑点和扭曲/损坏现象的出现,使生成的成功率接近100%(可参见下方随机生成的数据集),能被应用于大批量生成任务之中;另外图片的质量进一步提升,清晰度已逼近于官方训练所采用的数据集。我希望,这个项目能为影视工作者、广告工作者和艺术工作者们助力,同时为普通爱好者们赋能。
  注意,由于模型的训练成本高,因此除了黄种人脸生成器可免费使用外,其他生成器暂时需要付费购买。此项目并非为了盈利,而是研究生成模型需要更多的显卡,所有的收入都会被用在科研当中。模型版权拥有者为:www.seeprettyface.com



效果预览

网红脸生成器

  Image text

  Image text

  纯随机生成(无筛选)的一万张生成图片数据集:https://pan.baidu.com/s/1AqlNlTY0-tbEORPuKLdkqg 提取码:c7v9

明星脸生成器

  Image text

  Image text

  纯随机生成(无筛选)的一万张生成图片数据集:https://pan.baidu.com/s/1LabQMFLsKkYK3hLgRCQ-0A 提取码:p43h

超模脸生成器

  Image text

  Image text

  纯随机生成(无筛选)的一万张生成图片数据集:https://pan.baidu.com/s/1AT4q1JkMvAxWrHMs4Af1wg 提取码:vxf4

萌娃脸生成器

  Image text

  Image text

  纯随机生成(无筛选)的一万张生成图片数据集:https://pan.baidu.com/s/1CQYQFiIdXxCSjJwSUo_tvw 提取码:4bd0

黄种人脸生成器

  Image text

  Image text

  纯随机生成(无筛选)的一万张生成图片数据集:https://pan.baidu.com/s/1uC5fQ4UTALA1uU36Cgnnnw 提取码:rqvq

环境配置

  · Both Linux and Windows are supported. Linux is recommended for performance and compatibility reasons.
  · 64-bit Python 3.6 installation. We recommend Anaconda3 with numpy 1.14.3 or newer.
  · TensorFlow 1.14 or 1.15 with GPU support. The code does not support TensorFlow 2.0.
  · On Windows, you need to use TensorFlow 1.14 — TensorFlow 1.15 will not work.
  · One or more high-end NVIDIA GPUs, NVIDIA drivers, CUDA 10.0 toolkit and cuDNN 7.5. To reproduce the results reported in the paper, you need an NVIDIA GPU with at least 16 GB of DRAM.
  · Docker users: use the provided Dockerfile to build an image with the required library dependencies.
  - On Windows, the compilation requires Microsoft Visual Studio to be in PATH. We recommend installing Visual Studio Community Edition and adding into PATH using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat".
  我的测试环境配置为:Win10,1050Ti,CUDA 10.0,CuDNN 7.6.5,tensorflow-gpu 1.14.0,VS2017可完美运行。

Windows下常见问题 :Could not find MSVC/GCC/CLANG installation on this computer如何解决?

  在安装VS2017/VS2019时一定要将‘使用C++的桌面开发’选上(如下图所示) Image text   装好之后进入C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/ 目录下会有一个版本号的文件夹,将版本替换为dnnlib/tflib/custom_ops.py 29行的对应版本号(那是我安装的版本),如下图所示。 Image text

运行步骤

  1.在networks文件夹中按照txt地址下载对应模型,放在该位置
  2.在main.py中选择对应的模型和生成数量,并运行main.py



赠品:基于StyleGAN2的属性编辑器

  基于StyleGAN2的属性编辑器(edit_photo.py)包含了与旧版属性编辑器基本相同的内容,含有21种可调整的方向,可实现简单的人脸属性编辑。此属性编辑器适用于此项目的所有生成器以及官方生成器。

调整样例


下述样例均采用黄种人脸生成器。

1.调整笑容

Image text


2.调整年龄

Image text


3.调整水平角度

Image text


4.调整竖直角度

Image text


5.调整性别

Image text


6.调整颜值

Image text


7.调整脸型

Image text


8.调整眼睛开合

Image text


9.调整是否佩戴眼镜

Image text


10.增添/减弱一些生气的情绪

Image text


11.增添/减弱一些厌恶的情绪

Image text


12.增添/减弱一些害怕的情绪

Image text


13.增添/减弱一些开心的情绪

Image text


14.增添/减弱一些沮丧的情绪

Image text


15.增添/减弱一些惊讶的情绪

Image text


16.增添/减弱一些平静的情绪

Image text


17.调整脸的宽度

Image text


18调整脸的高度

Image text


19.调整向黑种人衍变

Image text


20.调整向黄种人衍变

Image text


21.调整向白种人衍变

Image text




更多尝试:合成会说话的人脸视频

  推荐Few Shot Vid-to-vid(点此跳转)方法(效果如下图所示)。


Image text



了解技术原理 & 获取训练集:点此进入

Image text


generators-with-stylegan2's People

Contributors

a312863063 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.