torch_geometric.datasets.PascalVOCKeypoints

class PascalVOCKeypoints(root: str, category: str, train: bool = True, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, pre_filter: Optional[Callable] = None, force_reload: bool = False, device: Optional[str] = None)[source]

Bases: InMemoryDataset

Pascal VOC 2011数据集包含来自“Poselets: Body Part Detectors Trained Using 3D Human Pose Annotations”论文的Berkely关键点注释,每个示例包含0到23个关键点,涵盖20个类别。 该数据集经过预过滤,排除了困难、遮挡和截断的对象。 关键点包含从预训练的VGG16模型在ImageNet上提取的插值特征(relu4_2relu5_1)。

Parameters:
  • root (str) – Root directory where the dataset should be saved.

  • category (str) – 图像的类别(其中之一为 "Aeroplane", "Bicycle", "Bird", "Boat", "Bottle", "Bus", "Car", "Cat", "Chair", "Diningtable", "Dog", "Horse", "Motorbike", "Person", "Pottedplant", "Sheep", "Sofa", "Train", "TVMonitor")

  • train (bool, optional) – If True, loads the training dataset, otherwise the test dataset. (default: True)

  • transform (callable, optional) – A function/transform that takes in an torch_geometric.data.Data object and returns a transformed version. The data object will be transformed before every access. (default: None)

  • pre_transform (callable, optional) – A function/transform that takes in an torch_geometric.data.Data object and returns a transformed version. The data object will be transformed before being saved to disk. (default: None)

  • pre_filter (callable, optional) – A function that takes in an torch_geometric.data.Data object and returns a boolean value, indicating whether the data object should be included in the final dataset. (default: None)

  • force_reload (bool, optional) – Whether to re-process the dataset. (default: False)

  • device (str or torch.device, optional) – The device to use for processing the raw data. If set to None, will utilize GPU-processing if available. (default: None)