IIRC what the Image folder does is to load from the folders, using the folder names as the labels.
So each sample is a pair (image, label) loaded from disk.
Then the dataloader concatenate a bunch of these to make your batch.

Isn’t the data read by ImageFolder in the form of a dictionary?

No I don’t think so.