SBDataset — Torchvision 0.22 documentation (original) (raw)

class torchvision.datasets.SBDataset(root: Union[str, Path], image_set: str = 'train', mode: str = 'boundaries', download: bool = False, transforms: Optional[Callable] = None)[source]

Semantic Boundaries Dataset

The SBD currently contains annotations from 11355 images taken from the PASCAL VOC 2011 dataset.

Note

Please note that the train and val splits included with this dataset are different from the splits in the PASCAL VOC dataset. In particular some “train” images might be part of VOC2012 val. If you are interested in testing on VOC 2012 val, then use image_set=’train_noval’, which excludes all val images.

Warning

This class needs scipy to load target files from .mat format.

Parameters:

Special-members:

__getitem__(index: int) → Tuple[Any, Any][source]

Parameters:

index (int) – Index

Returns:

Sample and meta data, optionally transformed by the respective transforms.

Return type:

(Any)