TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tf.contrib.gan.eval.add_stargan_image_summaries

View source on GitHub

Adds image summaries to see StarGAN image results.

Aliases:

  • tf.contrib.gan.eval.summaries.add_stargan_image_summaries
tf.contrib.gan.eval.add_stargan_image_summaries(
    stargan_model,
    num_images=2,
    display_diffs=False
)

If display_diffs is True, each image result has 2 rows and num_domains + 1 columns. The first row looks like: [original_image, transformed_to_domain_0, transformed_to_domain_1, ...] The second row looks like: [no_modification_baseline, transformed_to_domain_0-original_image, ...] If display_diffs is False, only the first row is shown.

IMPORTANT:

Since the model originally does not transformed the image to every domains, we will transform them on-the-fly within this function in parallel.

Args:

  • stargan_model: A StarGANModel tuple.
  • num_images: The number of examples/images to be transformed and shown.
  • display_diffs: Also display the difference between generated and target.

Raises:

  • ValueError: If input_data is not images.
  • ValueError: If input_data_domain_label is not rank 2.
  • ValueError: If dimension 2 of input_data_domain_label is not fully defined.