def test_interpolation_sequence_1(self, sess): a = self.latent_space_traversal(sess, 934732, 234534678678, segments=60, inclusivity=(False, True)) a0 = self.latent_space_traversal(sess, 234534678678, 234534678678, segments=20, inclusivity=(False, True)) b = self.latent_space_traversal(sess, 234534678678, 56434523445, segments=60, inclusivity=(False, True)) b0 = self.latent_space_traversal(sess, 56434523445, 56434523445, segments=20, inclusivity=(False, True)) c = self.latent_space_traversal(sess, 56434523445, 6972514296, segments=60, inclusivity=(False, True)) c0 = self.latent_space_traversal(sess, 6972514296, 6972514296, segments=20, inclusivity=(False, True)) d = self.latent_space_traversal(sess, 6972514296, 8027089512, segments=60, inclusivity=(False, True)) d0 = self.latent_space_traversal(sess, 8027089512, 8027089512, segments=20, inclusivity=(False, True)) e = self.latent_space_traversal(sess, 8027089512, 383, segments=60, inclusivity=(False, True)) e0 = self.latent_space_traversal(sess, 383, 383, segments=20, inclusivity=(False, True)) f = self.latent_space_traversal(sess, 383, 19040, segments=60, inclusivity=(False, True)) f0 = self.latent_space_traversal(sess, 19040, 19040, segments=20, inclusivity=(False, True)) g = self.latent_space_traversal(sess, 19040, 94889, segments=60, inclusivity=(False, True)) g0 = self.latent_space_traversal(sess, 94889, 94889, segments=20, inclusivity=(False, True)) h = self.latent_space_traversal(sess, 94889, 89018, segments=60, inclusivity=(False, True)) h0 = self.latent_space_traversal(sess, 89018, 89018, segments=20, inclusivity=(False, True)) i = self.latent_space_traversal(sess, 89018, 934732, segments=60, inclusivity=(False, True)) i0 = self.latent_space_traversal(sess, 934732, 934732, segments=20, inclusivity=(False, True)) # image_sequence = np.concatenate([a, a0, b, b0, c, c0, d, d0, e, e0, f, f0, g, g0, h, h0, i, i0]) image_sequence = np.concatenate([a, b, c, d, e, f, g, h, i]) image_sequence = chicken.squeeze(image_sequence) image_sequence = chicken.data2d_to_grayscale(image_sequence) image_sequence = image_sequence * 255 image_sequence = np.array(image_sequence, dtype=np.uint8)
def save_as_gif(self, images, duration=0.1, loops=0, dither=1, output_directory="testoutput/", filename="my_gif"): images = chicken.squeeze(images) images = chicken.data2d_to_grayscale(images) images = images * 255 images = np.array(images, dtype=np.uint8) chicken.save_as_gif(images=images, duration=duration, loops=loops, output_directory=output_directory, filename=filename) return
def display_all(self, images, figs_per_page=20, titles=None): images = chicken.squeeze(images) images = chicken.data2d_to_grayscale(images) chicken.display_all(images, figs_per_page, titles) return