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 Dataset.
- Parameters:
root (str or
pathlib.Path
) –Root directory where images and annotations are downloaded to. Expects the following folder structure if 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) – The dataset split to use. One of {
train
,val
,test
}. Defaults totrain
.transform (callable, optional) – A function/transform that takes in a PIL image and returns a transformed version. E.g,
transforms.RandomCrop
target_transform (callable, optional) – A function/transform that takes in the target and transforms it.
download (bool, optional) –
If true, downloads the dataset from the internet and puts it in root directory. If dataset is already downloaded, it is not downloaded again.
Warning
To download the dataset gdown is required.
- Special-members: