mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 20:15:21 +00:00
load img from url was loading rgb instead of bgr
This commit is contained in:
parent
308ab61b41
commit
27f0619e9d
@ -104,9 +104,7 @@ def load_image(img):
|
|||||||
# The image is a url
|
# The image is a url
|
||||||
if img.startswith("http"):
|
if img.startswith("http"):
|
||||||
return (
|
return (
|
||||||
np.array(Image.open(requests.get(img, stream=True, timeout=60).raw).convert("BGR"))[
|
np.array(Image.open(requests.get(img, stream=True, timeout=60).raw).convert("BGR")),
|
||||||
:, :, ::-1
|
|
||||||
],
|
|
||||||
# return url as image name
|
# return url as image name
|
||||||
img,
|
img,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user