torch_geometric.datasets.WILLOWObjectClass
- class WILLOWObjectClass(root: str, category: str, 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来自“Learning Graphs to Match”论文的WILLOW-ObjectClass数据集, 包含每个类别中至少40张图像的10个相同关键点。 这些关键点包含从预训练的VGG16模型在ImageNet上插值的特征 (
relu4_2和relu5_1)。- Parameters:
root (str) – Root directory where the dataset should be saved.
category (str) – 图像的类别(其中之一为
"Car","Duck","Face","Motorbike","Winebottle")。transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Dataobject 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.Dataobject 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.Dataobject 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 或 torch.device, 可选) – 用于处理原始数据的设备。如果设置为
None,将使用可用的GPU进行处理。(默认值:None)