goal: use deepdream flowers
Use a deep neural network trained to identify objects in images (The
ImageNet Challenge).
Some layers in that network are tuned to recognize flowers as these were
categories to classify in ImageNet.
- Start with a random image.
- How would the network update the image to make it more compatible
with the flower layer in the network?
- Push the image with those small updates.
- Iterate 20 times. Show the resulting image!
Use this tutorial
https://github.com/tensorflow/tensorflow/tree/r0.8/tensorflow/examples/tutorials/deepdream
Try on some images:
img0 = PIL.Image.open('IMG_2993.JPG')
img0 = np.float32(img0)
render_deepdream(T(layer)[:,:,:,139], img0)
img0 = PIL.Image.open('IMG_0791.JPG')
img0 = np.float32(img0)
render_deepdream(T(layer)[:,:,:,139], img0)
img0 = PIL.Image.open('IMG_3000rgb.JPG')
img0 = np.float32(img0)
render_deepdream(T(layer)[:,:,:,139], img0)
Cool! You can apply to any image. You can train a network on objects
you care about.
Here's what it get when started with an image of simple noise: