Search code examples
python-3.xazureazure-machine-learning-service

how to upload images from csv file that have column with labels and urls of images in Azure machine learning by code


I have a dataset(CSV) file that looks like this one column with an identifier and another with the URL of the image, and I need to download images to my storage in azure machine learning, maybe someone could help what is the core should be?


Solution

  • Please refer to the sample code provided in this tutorial. Specifically, where it explains how to upload data to Azure.

    from azureml.core import Workspace
    ws = Workspace.from_config()
    datastore = ws.get_default_datastore()
    datastore.upload(src_dir='./data',
                     target_path='datasets/cifar10',
                     overwrite=True)