I think the easiest way would be to load the data using pandas in your custom Dataset and return the features with all images in its __getitem__.
Do you want to return all images for the corresponding ID and are you always dealing with the same number of images?