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) – The pe.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

_save_image(image, label_name, label_id, index, iteration)[source]

A helper function that saves an image.