From 75a1adc7c402f155631741f34421e987e891a305 Mon Sep 17 00:00:00 2001 From: Colombo Date: Sat, 22 Feb 2020 13:43:50 +0400 Subject: [PATCH] fix sort by yaw/pitch for whole_face --- mainscripts/Sorter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mainscripts/Sorter.py b/mainscripts/Sorter.py index dea0ad5..9a8c565 100644 --- a/mainscripts/Sorter.py +++ b/mainscripts/Sorter.py @@ -114,7 +114,7 @@ def sort_by_face_yaw(input_path): trash_img_list.append ( [str(filepath)] ) continue - pitch, yaw, roll = LandmarksProcessor.estimate_pitch_yaw_roll ( dflimg.get_landmarks() ) + pitch, yaw, roll = LandmarksProcessor.estimate_pitch_yaw_roll ( dflimg.get_landmarks(), size=dflimg.get_shape()[1] ) img_list.append( [str(filepath), yaw ] ) @@ -137,7 +137,7 @@ def sort_by_face_pitch(input_path): trash_img_list.append ( [str(filepath)] ) continue - pitch, yaw, roll = LandmarksProcessor.estimate_pitch_yaw_roll ( dflimg.get_landmarks() ) + pitch, yaw, roll = LandmarksProcessor.estimate_pitch_yaw_roll ( dflimg.get_landmarks(), size=dflimg.get_shape()[1] ) img_list.append( [str(filepath), pitch ] ) @@ -418,7 +418,7 @@ class FinalLoaderSubprocessor(Subprocessor): gray = cv2.cvtColor(bgr, cv2.COLOR_BGR2GRAY) sharpness = estimate_sharpness(gray) if self.include_by_blur else 0 - pitch, yaw, roll = LandmarksProcessor.estimate_pitch_yaw_roll ( dflimg.get_landmarks() ) + pitch, yaw, roll = LandmarksProcessor.estimate_pitch_yaw_roll ( dflimg.get_landmarks(), size=dflimg.get_shape()[1] ) hist = cv2.calcHist([gray], [0], None, [256], [0, 256]) except Exception as e: