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)[source]¶
LFW 数据集。
- Parameters:
root (str 或
pathlib.Path) – 数据集的根目录,其中目录lfw-py存在或将保存到,如果 download 设置为 True。split (string, optional) – 使用的图像分割。可以是
train,test,10fold(默认)。image_set (str, 可选) – 使用的图像漏斗类型,
original,funneled或deepfunneled。默认为funneled。transform (callable, optional) – 一个函数/变换,它接收一个PIL图像并返回一个变换后的版本。例如,
transforms.RandomRotationtarget_transform (callable, optional) – 一个函数/转换,它接收目标并对其进行转换。
下载 (bool, 可选) – 如果为真,则从互联网下载数据集并将其放入根目录。如果数据集已经下载,则不会再次下载。
- Special-members: