r/deepdream • u/zcxhcrjvkbnpnm • Jul 06 '15
Smiley implodes (testing pixelated shapes)
http://imgur.com/2F4IBhj14
5
u/thebestisyetocome Jul 07 '15
Right when the smiley turned all creepy and shit, I heard a Christopher Nolan BWAAAHH in my head and it fit perfectly.
3
3
u/ludicdreamer Jul 07 '15
That's amazing. It's got the same recursive feeling that fractals do. I'd love to see the video go on for another minute or so. Great work!
2
u/TravisE_ Jul 07 '15
Just came to say, "holy frickin shit that is scary" made me full on "ooh what the fuck have I just done"
1
1
1
u/TotesMessenger Jul 07 '15
1
0
Jul 06 '15
[deleted]
6
u/potatoclump Jul 06 '15
Would also like to know, if it's not too much trouble.
14
u/zcxhcrjvkbnpnm Jul 06 '15
I installed the package by ryankennedy following his instructions and it kind of worked. The last example of code provided in that Python Notebook launches a loop where the image is zoomed in slightly after each iteration and each frame is saved into a file.
I think the only alteration I made to that code was to change the file paths so that it loaded my image instead of the default one and saved the output frames in the same directory (/src/) instead of creating a new one somewhere.
Here's how the code looked (to be run after launching the four topmost code blocks in the Python Notebook, which are necessary to, umm, initialize the system):
frame = np.float32(PIL.Image.open('/src/smiley.jpg')) frame_i = 0 h, w = frame.shape[:2] s = 0.05 # scale coefficient for i in xrange(100): frame = deepdream(net, frame) PIL.Image.fromarray(np.uint8(frame)).save("/src/smiley-%04d.png"%frame_i) frame = nd.affine_transform(frame, [1-s,1-s,1], [h*s/2,w*s/2,0], order=1) frame_i += 1After it rendered about a hundred frames, I joined them into a video using Photoshop (I'm sure it's not the most efficient/accessible solution, but I'm a Photoshop user so I couldn't think of anything quicker). Then I uploaded the video to imgur.
2
u/potatoclump Jul 07 '15
you are great, thanks. i have been using his code package for still images i guess i just hadn't gotten to the last bit yet.. my fault. thanks again!
1
138
u/DoesntWearEnoughHats Jul 06 '15
That took a while to load and then scared the ever loving fuck out of me