A repository which contains source codes for swapping faces in images.
main.py Orients input faces onto template faces.
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
- OpenCV ( used 3.0.0 )
- Dlib
- You should also download the shape_predictor_68_face_landmarks.dat from here.
Input | Template | Output |
---|---|---|