TianZhenGG / AFS

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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


Languages

Language:Python 80.5%Language:Cuda 16.5%Language:C++ 3.0%