Hi ! You can check our documentation on How to load image data
You can for example use something like
ds = Dataset.from_dict({
"image": list(glob.glob("images/*"))
})
def add_labels(example):
label_file = example["image"].replace("images/", "labels/")
return {"label": open(label_file).read()}
ds = ds.map(add_labels)
ds = ds.cast_column("image", Image())