Skip to content

Commit 72097c0

Browse files
committed
To discard when eye distance is less than 10 pixels.
1 parent 760ae99 commit 72097c0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/face_detection/detector.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ def faceStyle(landmark, bb, face_width):
6060
middle_point = (bb[2] + bb[0])/2
6161
y_middle_point = (bb[3] + bb[1]) / 2
6262
eye_distance = abs(eye_1[0]-eye_2[0])
63-
if eye_1[0] > middle_point:
63+
if eye_distance < 10:
64+
print('(Eye distance less than 10 pixels) Add style')
65+
style.append('side_face')
66+
elif eye_1[0] > middle_point:
6467
print('(Left Eye on the Right) Add style')
6568
style.append('left_side')
6669
# continue

0 commit comments

Comments
 (0)