deeplake
deeplake copied to clipboard
[BUG] np.array(hub.read(path)) fails if path is remote url
🐛🐛 Bug Report
⚗️ Current Behavior
image = hub.read("https://picsum.photos/200/300")
print(np.array(image)) # >> fails with file not found error
Expected behavior/code The remote image should be downloaded and decompressed
🧰 Possible Solution
Check if path is a remote path before calling Pillow here: https://github.com/activeloopai/Hub/blob/main/hub/core/sample.py#L236 (If remote path, read the bytes and then pass the bytes to pillow.)
I would like to work on this.
Hi @gaurav879 ! Go for it:)