Skip to content

stylegan-salon/stylegan-salon

Repository files navigation

stylegan-salon

Preparing datasets

Please download and add these models to 'checkpoints' folder: face detection model from face-parsing.PyTorch-master https://drive.google.com/file/d/154JgKpzCPW82qINcVieuPH3fZ2e0P812/view

ffhqrebalanced512-64.pkl from eg3d https://github.com/NVlabs/eg3d/blob/main/docs/models.md

stylegan2-ffhq-config-f.pt from stylegan2 https://github.com/rosinality/stylegan2-pytorch/blob/master/README.md

we use eg3d preprocessing in our preprocessing step, please follow "Preparing datasets" installation in: https://github.com/NVlabs/eg3d. Ensure the Deep3DFaceRecon_pytorch submodule is properly initialized.

Getting Started

Please add your input images to 'inputs' folder. Run the following commands

  1. Eg3d preprocessing
cd eg3d-main/dataset_preprocessing/ffhq
python salon_eg3d_preprocessing.py
  1. StyleganSalon preprocessing
cd ../../..
python salon_eg3d_preprocessing.py
  1. Run hairstyle transfer
python salon_main.py

Acknowledgments

This code borrows heavily from stylegan2: https://github.com/rosinality/stylegan2-pytorch eg3d: https://github.com/NVlabs/eg3d

BibTeX

@inproceedings{Khwanmuang2023StyleGANSalon,
    author = {Khwanmuang, Sasikarn and Phongthawee, Pakkapon and Sangkloy, Patsorn and Suwajanakorn, Supasorn},
    title = {StyleGAN Salon: Multi-View Latent Optimization for Pose-Invariant Hairstyle Transfer},
    booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    year = {2023},
  }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published