pe.data.image.celeba module
- class pe.data.image.celeba.CelebA(root_dir, res=32, attr_name='Male', split='train')[source]
Bases:
Data
The CelebA dataset.
- __init__(root_dir, res=32, attr_name='Male', split='train')[source]
Constructor.
- Parameters:
root_dir (str) – The root directory of the CelebA dataset
res (int, optional) – The resolution of the image, defaults to 32
attr_name (str, optional) – The attribute name to use as the label, defaults to “Male”
split (str, optional) – The split of the dataset, default is “train”
- class pe.data.image.celeba.target_transform(attr_index)[source]
Bases:
object
From: https://github.com/fjxmlzn/DPImageBench/blob/main/data/preprocess_dataset.py