Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. input_img = PIL.Image.open('/home/niklas/interstellar/0465.png')
  2. output_img = input_img
  3. for i in xrange(465, 1100):
  4. old_input_img = input_img
  5. input_img = PIL.Image.open('/home/niklas/interstellar/%04d.png' % i)
  6. output_img = Image.composite(output_img, input_img, ImageEnhance.Brightness(ImageOps.grayscale(compare_images(old_input_img, input_img, 10))).enhance(0.1))
  7. frame = deepdream(net, np.float32(output_img), end='pool5', iter_n=10, octave_n=2)
  8. output_img = PIL.Image.fromarray(np.uint8(frame))
  9. output_img.save('/home/niklas/interstellar/out/%04d.png' % i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement