How to access image names from dataloader?

You could write a custom Dataset and return the image names in the __getitem__. This tutorial might be a good starter.