eladrich / pixel2style2pixel

Official Implementation for "Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation" (CVPR 2021) presenting the pixel2style2pixel (pSp) framework
https://eladrich.github.io/pixel2style2pixel/
MIT License
3.2k stars 568 forks source link

Custom dataset training #215

Closed dongyun-kim-arch closed 3 years ago

dongyun-kim-arch commented 3 years ago

Hello!

I am trying to train my own dataset with p2p stylegan encoder model. My dataset was trained with stylegan2-ada-pytorch model and I have .pkl file. When I check p2p document for custom training, I need to set my dataset path at paths_config.py and transforms_config.py. But the problem is I couldn't find how I can load my trained model when I train p2p encoder. Doesn't trained stylegan model need to train p2p encoder? I am so confused in this point...

yuval-alaluf commented 3 years ago

Our StyleGAN implementation is taken from the rosinality repository linked in the README (which is the commonly used implementation for SG). We do not support the implementation from the stylegan2-ada-pytorch repository. However, it is possible to convert the weights of a model trained in using stylegan2-ada-pytorch to a model that is supported by our implementation. For details on how to convert the model you can follow the instructions here: https://github.com/yuval-alaluf/restyle-encoder#preparing-your-generator

dongyun-kim-arch commented 3 years ago

Thanks!