Hi, welcome back in this section, we'll take a look at Google Deep Dream, which is a very cool algorithm
that produces some amazing, trippy effects.
So let's take a look at this.
So here's what we can expect from deep dream.
Look at these weird artifacts here.
So we input a normal image of some clouds here, and then it produces this sort of weird image here.
But if you zoom in on these spots in these images, you'll see some weird things like Admiral Dog or
the pink snail or the candle bird, which I'm not even sure it's a bird looks like a can of fish or
something, as well as a dogfish here.
So pretty cool.
Pretty weird.
So what is the dream?
Well, it's simply, we're taking an image and then outputting dreams of coolest effects on the image.
So what is a process to do this?
Well, let's take a look at a very trippy, hallucinogenic image in the next slide.
Wow.
Very, very weird, isn't it?
And by the way, this input for this image, I believe, was very simple.
Landscape image So you can see we've got tons of weird artifacts happening here.
So sort of new animals that have been invented by CNN.
So let's take a look at the deep shrimp process.
So here's the next nice image here as well.
So firstly, the deep, deep stream deep dream algorithm is effectively asking a pre-trained CNN to
take a look at an image and then identify patterns that it recognizes in that image and then amplify
them like expand and go crazy, go nuts on them.
It uses the representations learned by CNN to produce this hallucinogenic or trippy images, and it
was introduced by these guys from Google in 2015 in a publication titled Deep Dream called Example for
Visualizing Neural Networks.
And I do recall this people being very, very popular.
It went viral, but actually when it was released back in 2015.
So remember filters?
This is a basically I'm going to explain the intuition behind understanding deep dream deep stream now,
deep dream deep streamers, invidious deployment platforms and keep constantly confusing those names.
Apologies for that.
So remember how we created a filter visualizations?
Keep that in mind and also remember how we did our class like civilizations where we just had some random
noise here.
And then we optimize on that to give us what classic things a banana looks like or a heartbeat.
So much so I know this stuff.
And to starfish screw a parachute.
These were what these were the maximum the fetus image back into CNN.
It would give you a 100 percent probability that that's a parachute or a screw.
So keep that in mind.
So how does this work, OK?
Well, in deep dream, instead of maximizing a class output, we let them.
That would decide.
What does that mean?
Well, it means that when we is an image and input image and the network unlicensed image, we then
asked the network we have, which actually we choose earlier and we asked that network now to just amplify
and enhance whatever it detected.
So remember, each layer deals with different features.
We have high level features like faces and more complex patterns and low level features, which could
be things like stripes or edges or something very small.
So the complexity of the person depends on the features.
If we if you ask network to amplify, if it choose a different live and then occidentale to amplify
what detected, you'll get different, different features depending on what value or what level you
selected.
So here's how the algorithm looks at a low level.
So a more granular explanation of the algorithm.
We take an input image.
We load it.
Pretreat Network VIDEO Inception tend to work well for this visualization algorithm, and if we're going
to use them as a feature extractor, which you've seen in the previous lesson.
So next we calculate loss, which is basically as some of the activations between the chosen layers.
We then normalize at each layer so that the contributions from all the layers are equal.
And then we use a process called gradient descent, which is the opposite of gradient descent gradient
S.A..
And then, unlike gradient descent, where we're trying to find a local minima gradient descent tries
to maximize its loss.
So this allows the network to find less meaningful patterns in the image.
And then we apply this to different skill sizes.
So the patterns.
Don't all look and occur at the same level of granularity.
So that's it for deep dream algorithm and you've seen some cool images.
Now it's time to actually go into the code and actually experiment with Google prim and good Keras and
PyTorch.
So stay tuned for that lesson.
Thank you.