Aravind-Suresh / FaceSwap

A repository containing source codes for swapping faces/overlaying masks in images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FaceSwap

A repository which contains source codes for swapping faces in images.

main.py Orients input faces onto template faces.

Trial

First clone the repository. Then,

$ python main.py -p /path/to/shape_predictor -t /path/to/template/image -i /path/to/input/image -o /path/to/output/image

For example,

$ python main.py -p res/shape_predictor_68_face_landmarks.dat -t images/templates/1.png -i images/inputs/2.jpg -o images/outputs/tmpl_1_inp_2.png

Dependencies

  • OpenCV ( used 3.0.0 )
  • Dlib
  • You should also download the shape_predictor_68_face_landmarks.dat from here.

Sample outputs

Input Template Output

About

A repository containing source codes for swapping faces/overlaying masks in images.

License:MIT License


Languages

Language:Python 70.0%Language:Shell 30.0%