From 4255b4167ff02eefe0a0ce705f51d5e24078cf42 Mon Sep 17 00:00:00 2001 From: "Samuel J. Woodward" Date: Sat, 4 Jan 2025 12:05:58 -0500 Subject: [PATCH] pickle objects are now dumped with pickle.HIGHEST_PROTOCOL --- deepface/modules/recognition.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deepface/modules/recognition.py b/deepface/modules/recognition.py index 1edb430..f153132 100644 --- a/deepface/modules/recognition.py +++ b/deepface/modules/recognition.py @@ -149,7 +149,7 @@ def find( # Ensure the proper pickle file exists if not os.path.exists(datastore_path): with open(datastore_path, "wb") as f: - pickle.dump([], f) + pickle.dump([], f, pickle.HIGHEST_PROTOCOL) # Load the representations from the pickle file with open(datastore_path, "rb") as f: @@ -232,7 +232,7 @@ def find( if must_save_pickle: with open(datastore_path, "wb") as f: - pickle.dump(representations, f) + pickle.dump(representations, f, pickle.HIGHEST_PROTOCOL) if not silent: logger.info(f"There are now {len(representations)} representations in {file_name}")