Don't add duplicates
This commit is contained in:
parent
809337c5eb
commit
cb4ca96251
1 changed files with 2 additions and 1 deletions
|
@ -130,7 +130,8 @@ 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'])
|
||||
if known_person['name'] not in people:
|
||||
people.append(known_person['name'])
|
||||
except PIL.UnidentifiedImageError as error:
|
||||
self._log.debug(f"File '{file}' don't seem to be an image.")
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue