mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
delay creating pickled_images until necessary
This commit is contained in:
parent
661f13f3b3
commit
9995343e24
@ -164,9 +164,6 @@ def find(
|
|||||||
f"Consider to delete {datastore_path}"
|
f"Consider to delete {datastore_path}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# embedded images
|
|
||||||
pickled_images = {representation["identity"] for representation in representations}
|
|
||||||
|
|
||||||
# Get the list of images on storage
|
# Get the list of images on storage
|
||||||
storage_images = set(image_utils.yield_images(path=db_path))
|
storage_images = set(image_utils.yield_images(path=db_path))
|
||||||
|
|
||||||
@ -186,6 +183,11 @@ def find(
|
|||||||
|
|
||||||
# Enforce data consistency amongst on disk images and pickle file
|
# Enforce data consistency amongst on disk images and pickle file
|
||||||
if refresh_database:
|
if refresh_database:
|
||||||
|
# embedded images
|
||||||
|
pickled_images = {
|
||||||
|
representation["identity"] for representation in representations
|
||||||
|
}
|
||||||
|
|
||||||
new_images = storage_images - pickled_images # images added to storage
|
new_images = storage_images - pickled_images # images added to storage
|
||||||
old_images = pickled_images - storage_images # images removed from storage
|
old_images = pickled_images - storage_images # images removed from storage
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user