ihsaan-ullah / meta-album

Meta-Album meta-dataset for few-shot image classification
24 stars 7 forks source link

How to obtain the data? #2

Closed sebastianpinedaar closed 1 year ago

sebastianpinedaar commented 1 year ago

Hi!

I am trying to get the data, but when I use the reference code, I just obtain a dataframe with the images names.

More specifically, I am running:

dataset = openml.datasets.get_dataset(44241)

X, y, categorical_indicator, attribute_names = dataset.get_data(
    dataset_format="dataframe", target=dataset.default_target_attribute
)

And I obtain something like this: image

How can I obtain the images and labels in the data format suggested here?

Thanks in advance.

ihsaan-ullah commented 1 year ago

Hi,

Meta-Album datasets are in this format : https://github.com/ihsaan-ullah/meta-album/tree/master/DataFormat

Please use the following code to download the complete dataset:

import openml

dataset = openml.datasets.get_dataset(44241, download_data=True, download_all_files=True)

This dataset will be downloaded in openml cache directory. You can check it with this code:

print(openml.config.cache_directory)
sebastianpinedaar commented 1 year ago

Thanks, it actually worked! I had to update to openml=0.13.0 otherwise it does not work (I was using openml=0.12.2).