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.RandomCroptarget_transform (callable, optional) – 一個函式/轉換,接受目標並對其進行轉換。
download (bool, optional) –
如果為 True,則從網際網路下載資料集並將其放入根目錄。如果資料集已下載,則不會再次下載。
警告
下載資料集需要安裝 gdown。
- 特殊成員: