peal.entrypoints.generate_dataset¶
Generate a synthetic confounded dataset from a DataConfig YAML.
Dispatches on dataset_class to the generators in
peal/data/dataset_generators.py: celeba runs
ConfounderDatasetGenerator, which stamps a confounder (e.g. a copyright
tag) onto a subset of the source images and writes the poisoned copy, and
SquareDataset runs SquareDatasetGenerator, which draws the synthetic
square images. Any other dataset_class does nothing.
Invocation:
python generate_dataset.py --config <data.yaml> \
[--<any DataConfig field> value]
Reads the source images under dataset_origin_path (CelebA) and writes
the new dataset into dataset_path: imgs/, masks/ where the
generator produces them, and the data.csv label file. An existing
SquareDataset directory is moved aside with an _old_<timestamp> suffix.
Functions
Load the |