Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ __pycache__
*.gif
*.webm
checkpoints/*
!checkpoints/.gitkeep
results/*
temp/*
segments.txt
.DS_Store
.idea
venv*
Empty file added checkpoints/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions third_part/GPEN/align_faces.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ def warp_and_crop_face(src_img,
raise FaceWarpException(
'facial_pts and reference_pts must have the same shape')

if align_type is 'cv2_affine':
if align_type == 'cv2_affine':
tfm = cv2.getAffineTransform(src_pts[0:3], ref_pts[0:3])
tfm_inv = cv2.getAffineTransform(ref_pts[0:3], src_pts[0:3])
elif align_type is 'cv2_rigid':
elif align_type == 'cv2_rigid':
tfm, _ = cv2.estimateAffinePartial2D(src_pts[0:3], ref_pts[0:3])
tfm_inv, _ = cv2.estimateAffinePartial2D(ref_pts[0:3], src_pts[0:3])
elif align_type is 'affine':
elif align_type == 'affine':
tfm = get_affine_transform_matrix(src_pts, ref_pts)
tfm_inv = get_affine_transform_matrix(ref_pts, src_pts)
else:
Expand Down