pe.callback.image package
Submodules
pe.callback.image.sample_images module
- class pe.callback.image.sample_images.SampleImages(num_images_per_class=10)[source]
Bases:
Callback
The callback that samples images from the synthetic data.
- __call__(syn_data)[source]
This function is called after each PE iteration that samples images from the synthetic data.
- Parameters:
syn_data (
pe.data.data.Data
) – Thepe.data.data.Data
object of the synthetic data- Returns:
A metric item with the list of sampled images
- Return type:
pe.callback.image.save_all_images module
- class pe.callback.image.save_all_images.SaveAllImages(output_folder, path_format='{iteration:09d}/{label_id}_{label_name}/{index}.png', tqdm_enabled=True)[source]
Bases:
Callback
The callback that saves all images.
- __call__(syn_data)[source]
This function is called after each PE iteration that saves all images.
- Parameters:
syn_data (
pe.data.data.Data
) – Thepe.data.data.Data
object of the synthetic data
- __init__(output_folder, path_format='{iteration:09d}/{label_id}_{label_name}/{index}.png', tqdm_enabled=True)[source]
Constructor.
- Parameters:
output_folder (str) – The output folder that will be used to save the images
path_format (str, optional) – The format of the image paths, defaults to “{iteration:09d}/{label_id}_{label_name}/{index}.png”
tqdm_enabled (bool, optional) – Whether to show tqdm progress bar when saving the images, defaults to True