VOCSegmentation — Torchvision 0.22 documentation (original) (raw)

class torchvision.datasets.VOCSegmentation(root: Union[str, Path], year: str = '2012', image_set: str = 'train', download: bool = False, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, transforms: Optional[Callable] = None)[source]

Pascal VOC Segmentation Dataset.

Parameters:

Special-members:

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

Parameters:

index (int) – Index

Returns:

(image, target) where target is the image segmentation.

Return type:

tuple