Skip to content

Latest commit

 

History

History
143 lines (91 loc) · 3.26 KB

README.md

File metadata and controls

143 lines (91 loc) · 3.26 KB

Face Swapping With Deep Fakes Methods

Installation

  1. Clone this repository
git clone https://github.com/saba99/Face_Swap.git
cd Face_Swap
  1. Install dependent packages
pip install -r requirements.txt
  1. Download weights
sh download_models.sh

Face Swap On Image

** Colab google colab logo

You may set the target face, and then source will be swapped on this person, or you may skip this parameter, and then source will be swapped on any person in the image.

python inference.py --target_path {PATH_TO_IMAGE} --image_to_image True

Face Swap For Images-Results

Face Swap On Video

** Colab google colab logo

1.download Face Video From this link [Face Videos]

  1. Face Swap On Video
Swap to one specific person in the video. You must set face from the target video (for example, crop from any frame).

python inference.py --source_paths {PATH_TO_IMAGE} --target_faces_paths {PATH_TO_IMAGE} --target_video {PATH_TO_VIDEO}

Swap to many person in the video. You must set multiple faces for source and the corresponding multiple faces from the target video.
```bash
python inference.py --source_paths {PATH_TO_IMAGE PATH_TO_IMAGE ...} --target_faces_paths {PATH_TO_IMAGE PATH_TO_IMAGE ...} --target_video {PATH_TO_VIDEO}

3.Watch the Results

Source Video Image for Swapping Target Video
production_compressed.mp4
vid_out_1_compressed.mp4
video2160p_compressed.mp4
vid_out_2_compressed.mp4