Here are the steps of the face morphing implementation with mesh-warping algorithm (you could implement it with opencv
or python scipy
/ scikit-image
):
- Defining Correspondences: find point-correspondences between the faces to be aligned using facial landmarks (detect landmarks with
dlib
, e.g.,).
- Delaunay Triangulation: You need to provide a triangulation (Delaunay triangulation, e.g.) of these points that will be used for morphing (with
scipy.spatial
's Delaunay
, e.g.,).
- Computing the Mid-way (morphed) Face: computing the average shape, warp both faces into that shape (calculate the affine transforms using the triangles in source image and the corresponding ones using the morphed image and warp the points inside the triangles and alpha-blend the warped images to obtain the final morphed image, using
scikit-image
's warp()
, e.g.,).
The next animation shows the animated output from an implementation of mesh-warping algorithm with scipy
/ numpy
/ scikit-image
in python (sequence of morph images starting from Monalisa image to Leonardo da Vinci image). This can be found here too.

Another popular algorithm is Beier-neely morphing algorithm (https://en.wikipedia.org/wiki/Beier%E2%80%93Neely_morphing_algorithm)