Hi,
I think making Dataset instance to return a batch of metadata with images (and targets) is a way if the meta-features can be represented in torch.Tensor.
For example, if we use the dataset defined below, in each iteration a DataLoader will generate a tuple of (image, target, metas), where each item is a torch.Tensor.
import torch

class DatasetWithMeta(torch.utils.data.IterableDataset):

    def __init__(self, inputs, targets, metas):
        super().__init__()
        self.inputs = inputs
        self.targets = targets
        self.metas = metas

    def __getitem__(self, index):
        return (self.inputs[index], self.targets[index], self.metas[index])