fix sort by yaw/pitch for whole_face

This commit is contained in:
Colombo 2020-02-22 13:43:50 +04:00
parent f1d115b63b
commit 75a1adc7c4

View file

@ -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: