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。
- 特殊成员: