Dependencies

  • paddlepaddle==2.1.2
  • insightface==0.2.1
  • opencv
  • numpy

Getting Started

  1. The pretrained models can be downloaded from Baidu Drive (passward:f6wu) or Google Drive.

  2. Run the codes as follows for image or video tests.

python image_test.py --target_img_path data/xxx.png --source_img_path data/xxx.png --output_dir results --use_gpu True

python video_test.py --target_video_path data/xxx.mp4 --source_img_path data/xxx.png --output_dir results --use_gpu True

Results

Citation

@inproceedings{xu2022MobileFaceSwap,
  title={MobileFaceSwap: A Lightweight Framework for Video Face Swapping},
  author={Xu, Zhiliang and Hong, Zhibin and Ding, Changxing and Zhu, Zhen and Han, Junyu and Liu, Jingtuo and Ding, Errui},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2022}
}