VisionDataset
- class VisionDataset(images: Sequence[str | Path | Tensor], transforms: Sequence | None = None, root: Path | None = None)[source]
Bases:
Dataset
A dataset of images with data augmentation.
Note
requires
torchvision
to be installed.Initialize the dataset.
- Parameters:
images (Sequence[str | Path | Tensor]) – The images, either as (relative) path, or preprocessed tensors.
transforms (Sequence | None) – A sequence of transformations to apply to the images, cf.
torchvision.transforms
. Defaults to random size crops.root (Path | None) – The root directory for images.