This is the repository of the paper Identity-Preserving Face Swapping via Dual Surrogate Generative Models. For now, we upload the inference code and checkpoint.
pip install -r requirements.txt
Then download ID encoder weight ms1mv3_arcface_r100_fp16_backbone.pth from:
and should be placed in ./model/arcface/
You can download the checkpoints from [https://1drv.ms/f/c/64d71f39113d98e4/ElBkLV2YQXdHgJbsc2Aboy8B979bVu6ilvcYxbiGOWClLQ?e=n647fU] and place them at ./.
Before swapping, use facealign.sh to align the face images.
After alignment, inference_adapter.sh is utilized to swapping
bash facealign.sh
bash inference_adapter.sh