Loading images from Azure blob storage into Python without downloading them

mikey 0 Reputation points
2023-10-30T11:43:38.7333333+00:00

I have a large number of .tif files stored in a blob storage container in Azure, which I need to access from a compute node where I'm deploying deep learning models using TensorFlow and PyTorch. However, I want to avoid downloading these images to the compute node to save time.

Is there a way to load the blob files into Python and convert them to tensors without downloading them first? Can I use a dataloader from TensorFlow and PyTorch without downloading the images, or is it necessary to download them first before deploying the models?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,088 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bhanu Ejjagiri 251 Reputation points Microsoft Employee
    2023-11-03T07:12:41.37+00:00

    Hi mikey

    Thanks for reaching Microsoft Q&A.

    If you generate a SAS on one of the blob (.tif) and can read the content of the blob through any browser using the link integrated with the SAS. You should be able to perform the same operation over python.

    Sorry, as we do not have expertise on python and tensors, I think this article helps https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-download-python#download-to-a-string

    0 comments No comments