Hello and welcome back to the course on deep learning.
Today we're kicking off convolutional neural networks is going to be exciting.
Let's dive straight into it.
We're going to start off with an image.
What do you see when you look at this image.
Do you see a person looking at you or do you see a person looking to the right you can see that your
brain is is struggling is struggling to adjust if you look to the right side of the image.
Just look at the right border there which you'll see a person looking to the right.
If you look at the left border of the image you'll see a person looking at you.
And this just proves that what our brain is looking for when we see things is features depending on
the features that it sees depending on the features that you process.
You categorize things in certain ways.
So when you look on the right side of the image you see certain features of a person looking to ride
because they're closer to your center of focus and therefore your brain classifies as a person looking
to the right.
When you look to the left side of the image you see more features of a person looking at you and therefore
your brain classifies it as such.
So let's have a look at another one.
This is a very famous image.
You probably have already seen it.
But what you see here.
So some people will say that they see a young lady wearing a dress looking away.
Some people say they see an old lady wearing a scarf on her head looking down.
So I'm going to point this out and you'll see that will become very obvious so this is the face of the
young lady looking away.
She's looking into the distance as her coat.
That's her hair that's her little feather in her hair and on the other hand.
This is the head of the old lady looking down her nose her mouth her chin that's the scarf on her head
and she's looking down.
So as you can see two in one and depending on which features your brain picks up it will switch between
classifying each image as one or the other.
The oldest one of these illusions recorded in the printed work is this one.
It's the duck or the rabbit.
So is this a duck or is this a rabbit.
Another example.
And now I'm going to show an image which will just for a second just look at it and see what what what
emotions or what kind of experience visual experience you go through.
So what do you see does you feel like a bit not dizzy but a little bit dazzled like your brain is trying
to try and understand what it is what it is like it's trying to.
Is jumping between her eyes up and down eyes and this is a classic example of when there are certain
features where it could be this it could be that but your brain cannot decide.
And because both seem plausible.
Yeah so basically all these examples illustrate to us how the brain works that it processes certain
features on an image or on whatever you see in real life and it classifies that as.
You probably have been in situations when you look over your shoulder quickly and you see something
you think it's I don't know if it's like a a ball but it turns out to be a cat or you think it's a it's
a car.
Turns out to be a shadow or things like that that's because you don't have enough time to process those
features or you don't have enough features to classify things as such.
And this is for me this is very interesting because what we're going to be doing with neural networks
with have convolutional neural networks is very similar and you'll find that the way that computers
are going to be processing images is going to be extremely similar to the way we are processing images
so it's is very valuable to understand and just kind of remember these things that this is how we do
it.
And I'm going to take this lady off your screens because she's probably already freaking out by now.
So here's something different.
Here's an experiment an experiment done on computers on convolutional neural network so we're slowly
moving now from humans to computers.
And this slide is from a told by Geoffrey Hinton and here you have basically describes an experiment
that he had done on some conventional neural networks that he had trained up.
So here you see three images and we're going to go through them with left to right and see how you would
classify them and then see how they can be reclassified.
So on the left what do you think this is.
He probably said cheetah and you will be right.
And this is what the computer said so and the right right away right off the bat we're going to learn
how to read these images because if you going to go deep into call convolutional neural networks no
pun intended you're going to start learning more and more about and using them you'll see a lot of these.
So and I've actually seen people read them incorrectly so here at the top Shida is what it actually
is.
So that's the actual correct label of the image that's what's the label of the images regardless of
any processing.
And the computer vision and then here are the guesses the top four or five sometimes guesses of the
algorithm and they're given the probabilities so the computer said or the neural network said Chitta
personal apparel or Egyptian cat can be one of the four.
And cheetah has the highest vote.
And throughout this part of the Course you understand what these votes mean and how they are derived.
But for now it's pretty intuitive right.
So it's a cheetah in reality and the neural network guessed right.
It said with a hyper ability about like 95 99 percent.
Then the second one.
What do you think does it that is that it is a bullet train.
And the neural network was able to distinguish between bullet train passenger car subway train electric
locomotive.
Those are the top choice of course.
It had many more options these neural networks learn to distinguish from not just four categories from
dozens thousands of categories at the same time.
So those are the four options that it picked.
And so that's bullet train and its will.
And so what did you think the last one is it very.
There are a couple of options or it's not very clear what is it could be a frying pan could be a magnifying
glass it could be even maybe a pair of scissors some might say while the neural network said it was
a pair of scissors.
But you can see how you can go wrong here.
First of all it's not a very clear image.
And also you can see that the probabilities are not as clear here so the neural network was a bit confused
a bit indecisive just as we are.
So I said Scissors with the high probability but then it had hand-glass which it actually was with not
not so far away on second place and frying pan stethoscope.
So basically here you can see that scissors was its first guess but the correct option was number two
and that's why it's highlighted in red.
So there we go those That's what all the drugs are already capable of.
And this is actually quite an old slide.
This was several years ago.
Now they're even better and you will see that from the practical application that you'll be coding together
had lunch.
But now let's try this out a bit better.
What convenance or convolutional neural networks actually are and why are they gained so much popularity.
And they actually are gaining popularity so you can see here a Google Trends comparison I did just yesterday.
Here you can see that convention illusional neural networks are even taking over artificial neural networks
so a massive increase.
And this is going to keep going that way because it is a very important field that that is where all
the things happen such as like self-driving cars.
How do they recognize people on the road how to recognize stop signs and things like that how do how
does Facebook is Facebook able to tag images or people in images and not only just like remember previously
years ago you had to tell people yourself then it would recognize faces you had to add the names.
And now it just recognizes the faces and adds the names at the same time.
Well that is what convolutional neural networks are capable as being on Facebook.
If Jeffrey Hinton is the godfather of artificial neural networks and deep learning then yalla Kuhn is
the grandfather of convolutional neural networks Lukken is a student of Jeffrey Hinton's and in fact
here you can see them together.
And Jeffrey Hinton now is pioneering de-planing at Google young.
Is the director of Facebook artificial intelligence research and also a professor at NYU.
So we're slowly aware of this part of the core slowly we are building up this way.
These names are this kind of picture of the profiles of the people who are driving this field and next
in the next couple of pars will get to know about a few more and we'll have this whole Mafia as they
call themselves or you can call them mafia or conspiracy of deep learning and you'll learn a bit more
about how this whole field developed.
Yeah it's just these are just some great great people.
And so RIKOON back in the 80s and the 90s made significant contributions to the field of convolutional
neural networks.
And as you'll see throughout this course has been able to develop or help the world develop something
so extremely powerful.
So moving on to how can illusional neural networks work.
You have an input it's very simple it's very straightforward so they have an input image.
It goes through the can illusional neural network and you have an label so it classifies that image
as something like has a Cheeto or a bullet train or something else.
Now kind of like going into a bit more detail.
For instance you can officer neroli has been trained up on on certain images on certain classified images
or categorized images prior there been higher prior.
After that you can give it let's say a neural network has been trained up to recognize facial expressions
and motions you can give it a face of a smiling person not just a face like a drawing of a face like
this but actual face of a person smiling.
And I'll tell you that that person is happy and you can get a face of a person that's frowning.
I'll tell you that the person is sad.
He can recognize these emotions and as you can see that's already very powerful in terms of so many
different implications just this one example you can think of right away and in both cases Ill give
you a operability so it won't say you know we're 100 percent the person's happy or sad.
It'll be 99 or 98 or maybe 80 percent when it's unclear of what's going on and just like we are right
sometimes we can mistake things for what they're not.
Or sometimes we can sometimes it's just not clear if the person is smiling or frowning or if it's if
it's a dog or a cat or if it's a train or a bullet train.
All right sometimes we don't have it we haven't seen enough features in all goes down to features because
that's how we process visual information as we saw from the start of this tutorial.
So but how does a neural network housing neural network able to recognize these features.
Well it all starts at the very basic level you have.
Let's say you have an image you have two images one is black and white image of two by two pixels and
one is a color image of two by two pixels while neural networks leverage the fact that the black and
white image is a two dimensional array.
So the way we see it right now on the left is just the visual representation.
I suppose some kind of picture.
And for simplicity's sake it's just a two way to picture but in computer terms it's actually a two dimensional
array with every single one of those pixels having a value between 0 and 55.
So that's eight bits of information to the two to the power of eight is 256.
So therefore the values from 0 to 255 and that's intensity of the color.
And in this case the color white so 0 will be a completely black pixel.
255 will be a completely white pixel and between them you have the grayscale range of possible options
for this pixel.
And based on that information computers are able to then work with the image and that's kind of like
the starting point that any image is actually has a digital representation has a digital form.
And those are just basically ones and zeros that form a number 0 to 255 for every single pixel and that's
what the computer works with.
It doesn't actually work with you know colors or anything it works with the ones and zeros at the end
of the day.
That's as kind of like the foundation of it all.
And in a color image it's actually a three dimensional array.
You've got blue pixel blue Larry Green and the red glare and arrows and that sense for RGV red green
blue.
And each one of those colors has its own intensity.
So basically a pixel has three three values assigned to it.
Each one of them is between 0 and 256 255.
And therefore you can find out what's this image what color exactly this pixel is.
By combining those three values and again computers are going to be working with that.
So that's the foundation of it all that's the red channel the green channel the blue channel.
And finally let's have a look at for instance an example of a very trivial example of a smiling face.
In computer terms.
If we just really simplify things instead of having from 0 to 255 and having those values just so that
we can understand things better and really grasp the concepts we're going to say zero is is white one
is black.
Right.
So we're just going to simplify things to the extreme and you will see that that image can be represented
like that.
So the reason why we've brought this up is because we go into all of our intuitions Stroh's we get to
structure an image is like this which is very simple but at the same time then all those concepts can
translate back to the 0 2 256 range of values and everything applies the same way there.
And the steps are we're going to be going through if these images are optimal one evolution.
Step number two max pooling.
Step number three flattening and step number a full connection and I can imagine that probably all of
these words mean much to you at the moment but by the end of this section of the course you will understand
them in great detail and exactly what they're doing.
So we'll get started in the next tutorial.
For now the additional reading that you might want to look into is a young Lukens original paper that
gave rise to an emotional neural networks.
It's called gradient based learning applied to documentary cognition.
You may have seen this image before floating around the Internet.
It is from that paper so if you want to go back to the very beginnings of how it all happened where
it all came from this is the paper to look into and I look forward to seeing in the next tutorial.
Until then enjoy deep learning.