Skip to content

Commit

Permalink
load img from url was loading rgb instead of bgr
Browse files Browse the repository at this point in the history
  • Loading branch information
serengil committed Dec 24, 2023
1 parent 308ab61 commit 27f0619
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions deepface/commons/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 27f0619

Please sign in to comment.