Skip to content

Commit

Permalink
Conditional log.info
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaLanfranchi committed Feb 22, 2024
1 parent 60c23fb commit 8472a8b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions deepface/modules/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def find(
new_images = list(set(storage_images) - set(pickled_images)) # images added to storage
old_images = list(set(pickled_images) - set(storage_images)) # images removed from storage

if not silent:
if not silent and (len(new_images) > 0 or len(old_images) > 0):
logger.info(f"Found {len(new_images)} new images and {len(old_images)} removed images")

# remove old images first
Expand All @@ -164,7 +164,6 @@ def find(
if must_save_pickle:
with open(datastore_path, "wb") as f:
pickle.dump(representations, f)
f.close()
if not silent:
logger.info(f"There are now {len(representations)} representations in {file_name}")

Expand Down

0 comments on commit 8472a8b

Please sign in to comment.