Fail to load train datasets

#2
by KIKI99 - opened

I dont know how to correctly download trainning data from here after update to arrow files.

To load the dataset, you can use the HF APIs like in the example below. We will update the download script for extracting the raw materials.

ds = load_dataset(
    "gvecchio/MatSynth", 
    split = "test", 
    streaming = True,
)

Thank you for your response. May I have access to the training data? I was only able to download the test data.

Train data is available now and accessible in the same way!

Hello, I attempted to retrieve the image but received "Image(decode=True, id=None)".
Could you please advise if there is an issue with my code?

# load the dataset in streaming mode
ds = load_dataset(
    "gvecchio/MatSynth", 
    streaming = True,
)

# remove unnecessary columns to reduce downloaded data
ds = ds.remove_columns(["diffuse", "specular", "displacement", "opacity", "blend_mask"])
# keep only specified columns
ds = ds.select_columns(["basecolor", "normal", "roughness", "metallic"])

print(ds['train'].features['basecolor'])

Thank you!

Hello, print(ds['train'].features['basecolor']) is only printing you the type of the basecolor feature.
if you want to iterate over the trainset, you can do something like:

for x in ds["train"]:
    print(x["basecolor"])

Since you're loading the entire dataset the use ["train"] to select the train split. Alternatively, you can add split = "train" to the load_dataset call (same for the test set).
Let me know if you have further issues downloading the data. Soon enough I will release a dataset class for an easy integration with torch training code.

gvecchio changed discussion status to closed

Sign up or log in to comment