Skip to content

Commit

Permalink
Fix landmark indexes (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
bfreskura authored Apr 15, 2023
1 parent 213c8bb commit e158d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion facexlib/utils/face_restoration_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def get_face_landmarks_5(self,
bboxes = self.face_det.detect_faces(input_img, 0.97) * scale
for bbox in bboxes:
# remove faces with too small eye distance: side faces or too small faces
eye_dist = np.linalg.norm([bbox[6] - bbox[8], bbox[7] - bbox[9]])
eye_dist = np.linalg.norm([bbox[5] - bbox[7], bbox[6] - bbox[8]])
if eye_dist_threshold is not None and (eye_dist < eye_dist_threshold):
continue

Expand Down

0 comments on commit e158d51

Please sign in to comment.