- Clone this repository
git clone https://github.com/saba99/Face_Swap.git
cd Face_Swap
- Install dependent packages
pip install -r requirements.txt
- Download weights
sh download_models.sh
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
1.download Face Video From this link [Face Videos]
- 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 |