From 60c23fbc8e100ed3effdac58282ec37582045aed Mon Sep 17 00:00:00 2001 From: Andrea Lanfranchi Date: Thu, 22 Feb 2024 14:43:01 +0100 Subject: [PATCH] Remove unnecessary file close --- deepface/modules/recognition.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/deepface/modules/recognition.py b/deepface/modules/recognition.py index 3b835589a..e51af147f 100644 --- a/deepface/modules/recognition.py +++ b/deepface/modules/recognition.py @@ -115,12 +115,10 @@ def find( if not os.path.exists(datastore_path): with open(datastore_path, "wb") as f: pickle.dump([], f) - f.close() # Load the representations from the pickle file with open(datastore_path, "rb") as f: representations = pickle.load(f) - f.close() # Check if the representations are out-of-date if len(representations) > 0: