This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_img = PIL.Image.open('/home/niklas/interstellar/0465.png') | |
output_img = input_img | |
for i in xrange(465, 1100): | |
old_input_img = input_img | |
input_img = PIL.Image.open('/home/niklas/interstellar/%04d.png' % i) | |
output_img = Image.composite(output_img, input_img, ImageEnhance.Brightness(ImageOps.grayscale(compare_images(old_input_img, input_img, 10))).enhance(0.1)) | |
frame = deepdream(net, np.float32(output_img), end='pool5', iter_n=10, octave_n=2) | |
output_img = PIL.Image.fromarray(np.uint8(frame)) | |
output_img.save('/home/niklas/interstellar/out/%04d.png' % i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* addslashes() for multi-byte characters | |
* | |
* @param string $input Input characters | |
* @param string $enc Internal encoding (optional) | |
* @return string Charcters added slashes | |
*/ | |
function mb_addslashes($input, $enc = NULL) | |
{ |