Update README.md

This commit is contained in:
YangJX
2024-07-19 18:13:22 +08:00
committed by GitHub
parent d23edb9173
commit b93fc87c2d
+16
View File
@@ -7,3 +7,19 @@ Match two faces' shape before using other face swap nodes
Face-swapping tools typically only replace facial features during the swap, without altering the facial shape. When there is a significant difference in facial shape between the target person and the person in the original photo, the result of the face swap is less satisfactory.
This project is a small script that can first liquefy and stretch the face in the original photo according to the horizontal and vertical proportions of the target person's facial contour. The resulting image can be used as input for other face-swapping nodes.
#Install
run in ComfyUI/custom_nodes:
git clone https://github.com/fssorc/ComfyUI_FaceShaper
need dlib and opencv-python
put dlib model files in ComfyUI/models/dlib/
shape_predictor_68_face_landmarks.dat
shape_predictor_81_face_landmarks.dat
shape_predictor_5_face_landmarks.dat
Test Results:
the faceSwap tool I am using is instantid and DZ_FaceDetailer
While writing the code, I was inspired by ComfyUI_FaceAnalysis, and I would like to express my gratitude here.