/AFS

This repository contains inference script for Face Swapping as A Simple Arithmetic Operation

Primary LanguagePython

Face Swapping as A Simple Arithmetic Operation

This repository contains inference script for Face Swapping as A Simple Arithmetic Operation.

model

Preparation

Requirements

  • Python
  • PyTorch
  • Opencv
  • ninja: pip install ninja

Pretrained Models

Download the following checkpoint to folder weights.

Inference

To swap two images, run

python inference.py \
    --src_img demo/source.jpg \
    --tgt_img demo/target.jpg \
    --save_dir demo/output.jpg

The swapped image will be saved as demo/output.jpg

Source image Target image Output