Загрузка
Large-scale CelebFaces Attributes (CelebA) Dataset Dataset.
root (str or pathlib.Path) – Root directory where images are downloaded to.
split (string) – One of {‘train’, ‘valid’, ‘test’, ‘all’}. Accordingly dataset is selected.
target_type (string or list, optional) –
Type of target to use, attr, identity, bbox,
or landmarks. Can also be a list to output a tuple with all specified target types.
The targets represent:
attr(Tensor shape=(40,) dtype=int): binary (0, 1) labels for attributes
identity(int): label for each person (data points with the same identity are the same person)
bbox(Tensor shape=(4,) dtype=int): bounding box (x, y, width, height).
(Tensor shape=(10,) dtype=int): landmark points (lefteye_x, lefteye_y, righteye_x, righteye_y, nose_x, nose_y, leftmouth_x, leftmouth_y, rightmouth_x, rightmouth_y)
Defaults to attr. If empty, None will be returned as target.
transform (callable, optional) – A function/transform that takes in a PIL image
and returns a transformed version. E.g, transforms.PILToTensor
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.
Sample and meta data, optionally transformed by the respective transforms.
(Any)