项目作者: Kasidit0052

项目描述 :
Inference StyleGAN2 on Electron
高级语言: Jupyter Notebook
项目地址: git://github.com/Kasidit0052/StyleGAN2-Electron.git
创建时间: 2021-02-08T15:51:18Z
项目社区:https://github.com/Kasidit0052/StyleGAN2-Electron

开源协议:

下载


StyleGAN2-Electron

alt text

An Intuitive Approach to inference StyleGAN2

How to run ?

  • Create a python virtual environment using anaconda (Tested on python 3.7.3)
  • Run requirement.txt for stylegan2_pytorch (in your created virtual environment)

    1. pip install pip install -r requirements.txt
  • Download and Convert Pretrained Model

    • Download Pretrained StyleGAN2 Model (this project use model and dlatents from GWERN StyleGAN2 pretrained model)
    • Convert StyleGAN2 tf pretrained model to pytorch using script in ./stylegan2_pytorch/pretrained_model
      1. run_convert_from_tf.py --input="Path/To/PKL_MODEL" --output="stylegan2_pytorch/pretrained_model"
  • Install packages

    1. Yarn install and Yarn start
  • Setup python path using interface in application

If I don’t want to use stylegan2 anime model, how to Update your own latent direction ?

You can modify directional latent at stylegan2_pytorch/pretrained_model/modded_dlatents/tag_dirs_cont.pkl

How to Deploy ?

  1. Yarn Package

StyleGAN2 Tutorial Notebook for those who want to explore StyleGAN2

There is a tutorial notebook in /stylegan2_pytorch folder which demostrate a basic function to Generate and Interpolate Image

Special Thanks to