LFWPeople¶
- class torchvision.datasets.LFWPeople(root: str, split: str = '10fold', image_set: str = 'funneled', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False)[源代码]¶
LFW 数据集。
- 参数:
root (str 或
pathlib.Path
) – 数据集的根目录,目录lfw-py
存在于其中,或者如果 download 设置为 True,则将保存到该目录。split (string, 可选) – 要使用的图像分割。可以是
train
,test
,10fold
(默认) 之一。image_set (str, 可选) – 要使用的图像漏斗类型,
original
,funneled
或deepfunneled
。默认为funneled
。transform (callable, 可选) – 接收 PIL 图像并返回转换后版本的功能/转换。例如,
transforms.RandomRotation
target_transform (callable, 可选) – 接收目标并对其进行转换的功能/转换。
download (bool, 可选) – 如果为 true,则从互联网下载数据集并将其放入根目录。如果数据集已下载,则不会再次下载。
- 特殊成员: