Clarify error message and remove PIL import.

pull/693/head
Joseph Catrambone 2023-03-31 12:07:44 -07:00
parent f2c6341c9c
commit 603449ce48
2 changed files with 1 additions and 3 deletions

View File

@ -1,5 +1,3 @@
from PIL import Image
from .mediapipe_face_common import generate_annotation

View File

@ -106,7 +106,7 @@ def generate_annotation(
results = facemesh.process(img_rgb).multi_face_landmarks
if results is None:
print("Results is None rather than empty. There may have been an exception in processing.")
print("No faces detected in controlnet image for Mediapipe face annotator.")
return numpy.zeros_like(img_rgb)
# Filter faces that are too small