Places365¶
- class torchvision.datasets.Places365(root: ~typing.Union[str, ~pathlib.Path], split: str = 'train-standard', small: bool = False, download: bool = False, transform: ~typing.Optional[~typing.Callable] = None, target_transform: ~typing.Optional[~typing.Callable] = None, loader: ~typing.Callable[[str], ~typing.Any] = <function default_loader>)[source]¶
Places365 classification dataset.
- Parameters:
root (str or
pathlib.Path
) – Root directory of the Places365 dataset.split (string, optional) – The dataset split. Can be one of
train-standard
(default),train-challenge
,val
.small (bool, optional) – If
True
, uses the small images, i.e. resized to 256 x 256 pixels, instead of the high resolution ones.download (bool, optional) – If
True
, downloads the dataset components and places them inroot
. Already downloaded archives are not downloaded again.transform (callable, optional) – A function/transform that takes in a PIL image and returns a transformed version. E.g,
transforms.RandomCrop
target_transform (callable, optional) – A function/transform that takes in the target and transforms it.
loader – A function to load an image given its path.
- Raises:
RuntimeError – If
download is False
and the meta files, i.e. the devkit, are not present or corrupted.RuntimeError – If
download is True
and the image archive is already extracted.
- Special-members: