This repository contains the official PyTorch implementation of the paper Region-Aware Face Swapping (CVPR2022).
conda env create -f environment/psp_env.yaml
Download the CelebA-HQ to the path Data
and create mask annotations.
cd scripts
python mask_npy.py
Download pre-trained StyleGAN, IR-SE50, and StyleGAN inversion models to the path pretrained_models
, which could be downloaded following the instructions of original pSp Github repository.
python scripts/train.py
Download pre-trained model swap to the path checkpoints
python inference_celeba.py