From 27f0619e9dd6c9b858bd3493e1a38e79148263cb Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Sun, 24 Dec 2023 13:12:35 +0000 Subject: [PATCH] load img from url was loading rgb instead of bgr --- deepface/commons/functions.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/deepface/commons/functions.py b/deepface/commons/functions.py index c4bd947..a9aa469 100644 --- a/deepface/commons/functions.py +++ b/deepface/commons/functions.py @@ -104,9 +104,7 @@ def load_image(img): # The image is a url if img.startswith("http"): return ( - np.array(Image.open(requests.get(img, stream=True, timeout=60).raw).convert("BGR"))[ - :, :, ::-1 - ], + np.array(Image.open(requests.get(img, stream=True, timeout=60).raw).convert("BGR")), # return url as image name img, )