Since dlib library is getting older, I edited main code and apply with the Media Pipe library. It's faster than dlib but I don't think it giving better results. I added faces that are processed with media pipe, so try both; and use the best result :)
Swap facial landmarks for the part-whole task
The part-whole task is a well-known task among face researchers especially studying face processing. It has been developed by (Tanaka & Farah, 1993) https://doi.org/10.1080/14640749308401045.
This script provides you a realistic results with seamlessClone function.
In order to get clear results, use high-quality images as much as possible. But if you have low-quality faces you probably need to use some extra filter methods to edges (Gaussian is working well in most scenarios).
Referance for the trained detector: https://github.com/codeniko/shape_predictor_81_face_landmarks
Faces from: https://thispersondoesnotexist.com/