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.
Please add your input images to 'inputs' folder. Run the following commands
- Eg3d preprocessing
cd eg3d-main/dataset_preprocessing/ffhq
python salon_eg3d_preprocessing.py
- StyleganSalon preprocessing
cd ../../..
python salon_eg3d_preprocessing.py
- Run hairstyle transfer
python salon_main.py
This code borrows heavily from stylegan2: https://github.com/rosinality/stylegan2-pytorch eg3d: https://github.com/NVlabs/eg3d
@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},
}