Use basename

This commit is contained in:
Antonio J. Delgado 2021-09-06 16:56:12 +03:00
parent e121afdbea
commit 45a4591c57

View file

@ -113,7 +113,7 @@ class image_classifier:
for known_person in self.known_people:
for encoding in encodings:
if face_recognition.compare_faces([known_person['encoding']], encoding)[0]:
people.append(known_person['name'])
people.append(os.path.basename(known_person['name']))
except PIL.UnidentifiedImageError as error:
self._log.debug(f"File '{file}' don't seem to be an image.")
return False