Add tolist

This commit is contained in:
Antonio J. Delgado 2021-09-06 16:34:27 +03:00
parent 42a06079c5
commit c226fc6e90

View file

@ -95,9 +95,9 @@ class image_classifier:
try:
image = face_recognition.load_image_file(file)
encodings = face_recognition.face_encodings(image)
self._log.debug(f"{len(encodings)} found")
self._log.debug(f"Found {len(encodings)} faces.")
for known_person in self.known_people:
if known_person['encoding'] in encodings:
if known_person['encoding'] in encodings.tolist():
names.append(known_person['name'])
except PIL.UnidentifiedImageError as error:
self._log.debug(f"File '{file}' don't seem to be an image.")