WIDERFace¶
- class torchvision.datasets.WIDERFace(root: Union[str, Path], split: str = 'train', transform: Optional[Callable] = None, target_transform: Optional[Callable] = None, download: bool = False)[source]¶
WIDERFace 数据集。
- 参数:
root (str 或
pathlib.Path
) –图像和注释下载到的根目录。如果 download=False,则预期以下文件夹结构:
<root> └── widerface ├── wider_face_split ('wider_face_split.zip' if compressed) ├── WIDER_train ('WIDER_train.zip' if compressed) ├── WIDER_val ('WIDER_val.zip' if compressed) └── WIDER_test ('WIDER_test.zip' if compressed)
split (string) – 要使用的数据集分割。可选值为 {
train
,val
,test
}。默认为train
。transform (callable, optional) – 一个函数/转换,接受 PIL 图像并返回转换后的版本。例如,
transforms.RandomCrop
target_transform (callable, optional) – 一个函数/转换,接受目标并对其进行转换。
download (bool, optional) –
如果为 True,则从互联网下载数据集并将其放入根目录。如果数据集已下载,则不会再次下载。
警告
下载数据集需要安装 gdown。
- 特殊成员: