diff --git a/env/common.sh b/env/common.sh index 491a5225..e9fdcd1a 100644 --- a/env/common.sh +++ b/env/common.sh @@ -17,7 +17,7 @@ export CELERY_RESULT_BACKEND=redis://localhost/0 export ONE_KNOWN_PERSON_BYPASS_QUEUE_MODE=0 export DEEP_ANALYSIS_MODE=1 export SAMPLING_TO_SAVE_ENERGY_MODE=0 -export RESTRICT_RECOGNITON_MODE=0 +export RESTRICT_RECOGNITON_MODE=1 export MINIMAL_FACE_RESOLUTION=100 export BIGGEST_FACE_ONLY_MODE=0 export UPLOAD_IMAGE_SERVICE_ENABLED=0 diff --git a/src/face_detection/detector.py b/src/face_detection/detector.py index e63e3de1..a8b41e4f 100644 --- a/src/face_detection/detector.py +++ b/src/face_detection/detector.py @@ -60,8 +60,8 @@ 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_distance < 10: - print('(Eye distance less than 10 pixels) Add style') + if eye_distance < 2: + print('(Eye distance less than 2 pixels) Add style') style.append('side_face') elif eye_1[0] > middle_point: print('(Left Eye on the Right) Add style')