How are the ground truth labels stored?
Do you have and file storing all labels or is the label encoded in the file names?
Most likely the best approach would be to create a custom Dataset, and load as well as preprocess your data in the __getitem__ method.
Have a look at the Data loading tutorial 19 and let me know if you need some help implementing it.