Skip to content

Commit

Permalink
To discard when eye distance is less than 10 pixels.
Browse files Browse the repository at this point in the history
  • Loading branch information
solderzzc committed Apr 18, 2019
1 parent 760ae99 commit 72097c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/face_detection/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def faceStyle(landmark, bb, face_width):
middle_point = (bb[2] + bb[0])/2
y_middle_point = (bb[3] + bb[1]) / 2
eye_distance = abs(eye_1[0]-eye_2[0])
if eye_1[0] > middle_point:
if eye_distance < 10:
print('(Eye distance less than 10 pixels) Add style')
style.append('side_face')
elif eye_1[0] > middle_point:
print('(Left Eye on the Right) Add style')
style.append('left_side')
# continue
Expand Down

0 comments on commit 72097c0

Please sign in to comment.