From 63b397aa8e8a12440d939b62785b3e35cf451c9b Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Wed, 6 Dec 2023 21:07:31 +0000 Subject: [PATCH] review comments resolved --- deepface/DeepFace.py | 6 +++--- deepface/commons/functions.py | 2 +- tests/face-recognition-how.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deepface/DeepFace.py b/deepface/DeepFace.py index f3228b9..4bda0a2 100644 --- a/deepface/DeepFace.py +++ b/deepface/DeepFace.py @@ -470,8 +470,8 @@ def find( if not silent: logger.warn( f"Representations for images in {db_path} folder were previously stored" - + f" in {file_name}. If you added new instances after the creation, then please " - + "delete this file and call find function again. It will create it again." + f" in {file_name}. If you added new instances after the creation, then please " + "delete this file and call find function again. It will create it again." ) with open(f"{db_path}/{file_name}", "rb") as f: @@ -876,7 +876,7 @@ def detectFace( detected and aligned face as numpy array """ - logger.info("⚠️ Function detectFace is deprecated. Use extract_faces instead.") + logger.warn("Function detectFace is deprecated. Use extract_faces instead.") face_objs = extract_faces( img_path=img_path, target_size=target_size, diff --git a/deepface/commons/functions.py b/deepface/commons/functions.py index 7bf5cfa..299bd03 100644 --- a/deepface/commons/functions.py +++ b/deepface/commons/functions.py @@ -360,7 +360,7 @@ def preprocess_face( Deprecated: 0.0.78: Use extract_faces instead of preprocess_face. """ - logger.info("⚠️ Function preprocess_face is deprecated. Use extract_faces instead.") + logger.warn("Function preprocess_face is deprecated. Use extract_faces instead.") result = None img_objs = extract_faces( img=img, diff --git a/tests/face-recognition-how.py b/tests/face-recognition-how.py index 72f4d33..2903237 100644 --- a/tests/face-recognition-how.py +++ b/tests/face-recognition-how.py @@ -35,7 +35,7 @@ distance_vector = np.square(img1_representation - img2_representation) logger.debug(distance_vector) distance = np.sqrt(distance_vector.sum()) -logger.info("Euclidean distance: ", distance) +logger.info(f"Euclidean distance: {distance}") # ---------------------------------------------- # expand vectors to be shown better in graph