bob.med.tb.data.utils¶
Common utilities
Classes
|
PyTorch dataset wrapper around Sample lists |
- class bob.med.tb.data.utils.SampleListDataset(samples, transforms=[])[source]¶
Bases:
Generic
[torch.utils.data.dataset.T_co
]PyTorch dataset wrapper around Sample lists
A transform object can be passed that will be applied to the image, ground truth and mask (if present).
It supports indexing such that dataset[i] can be used to get ith sample.
- Parameters
samples (list) – A list of
bob.med.tb.data.sample.Sample
objectstransforms (
list
, Optional) – a list of transformations to be applied to both image and ground-truth data. Notice a last transform (torchvision.transforms.transforms.ToTensor
) is always applied - you do not need to add that.
- property transforms¶