load img from url was loading rgb instead of bgr

This commit is contained in:
Sefik Ilkin Serengil 2023-12-24 13:12:35 +00:00
parent 308ab61b41
commit 27f0619e9d

View File

@ -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,
) )