peal.data.custom_datasets.CelebAHQDataset

class peal.data.custom_datasets.CelebAHQDataset[source]

Bases: Image2MixedDataset

CelebA-HQ with the CelebAMask-HQ attribute annotations.

The annotation file is not a csv: it starts with a sample count and is aligned with variable whitespace. It is therefore pre-normalized by datastr and handed to parse_csv as raw_data, overwriting the attributes, data and keys that Image2MixedDataset.__init__ has just built.

Parameters:
  • config (DataConfig) – Uses dataset_path, label_rel_path and delimiter.

  • mode (str) – Split: "train", "val", "test" or "all".

  • **kwargs – Forwarded to Image2MixedDataset. data_dir overrides the annotation path, in which case the file is read by parse_csv itself instead of being pre-normalized.

Methods

Attributes

__init__(config, mode, **kwargs)[source]

Load the split, then re-parse the whitespace-aligned annotation file.