You could create your own Dataset like this:
class MyDataset(Dataset):
    def __init__(self, data_paths):
        self.paths = data_paths 

    def __getitem(self, index):
        image, target_image = load_images(self.paths[index]) # load as np.array or PIL.Image
        # transform your images here
        x = transformations.ToTensor()(image)
        y = transformations.ToTensor()(target_image)

        return x, y

    def __len__(self):
        return len(self.paths)