Skip to content

nakahiro1206/RealTimeFaceSwap

Repository files navigation

RealTimeFaceSwap

Overview

This project is about face-swapping processing in video. Inspirations are iperov/DeepFaceLive and haofanwang/inswapper.

Adopted techniques

Demonstration

Suppose you want to swap your face with the image below,

input

Source by Pexels.com

InsightFace recognizes your face and replaces yours to the input image.

swapped

The swapped image is a little rough and CodeFormers upsamples face area.

res

Source code

Some codes are borrowed from sczhou/CodeFormer

  • basicsr/
  • facelib/
  • weights/
  • FaceRestorationHelperWrapper.py largely stems from inference_codeformer.py

Installation of the required packages

pip install opencv-python torch torchvision insightface

Ref. useful pre-trained models worth trying(I did not though)

Releases/Sapphire