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 of the image.
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 the right
because they're closer to your center of focus,
and therefore your brain classifies that 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 do you see here?
So some people will say that they see a
young lady wearing a dress looking away.
Some people will say they see an old lady
wearing a scarf on her head, looking down.
So I'm going to point these features out and you'll see that it'll become
very obvious.
So this is the face of the young lady looking away.
She's looking into the distance. That's 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.
That's her nose.
That's her mouth, that's her chin.
That's the scarf on her head.
And she's looking down.
So, as you can see, two and one, and depending on which features
your brain picks up, it will switch between
classifying each the 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 you an image which will just for a second,
just look at it and see what, what's what is 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.
It's 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 and, yeah.
So basically, all of these examples illustrate to us how the brain works, that
it processes certain features on an image or on whatever you see in, in real life.
And it classifies that as such.
And you probably 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,
but it turns out to be a shadow and 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, it's
this is very interesting because what we're going to be doing with,
neural networks, with 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 it's 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 it's
she's probably already freaking you out by now.
So here's, something different.
Here's an experiment.
An experiment, done on computers, on convolutional neural networks.
So we're slowly moving now, from humans to computers.
And this slide is a is from a told by Geoffrey Hinton.
and here you have
basically it describes an experiment that he had done
on, some convolutional neural networks that he had trained up.
So here you see three images, and we're going to go through them
left to right and see how you would classify them,
and then see how the computer classify them.
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 right away, right off the bat we're going to learn how to read these images.
Because, if you're going to go deep into convolutional
neural networks, no pun intended, if you're going to,
start learning more and more about them 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, cheetah is what it actually is.
So that's the actual correct label.
of the image.
That's what, the label of the images, regardless of any processing and, and,
the computer vision.
and then here are the guesses.
The top 4 or 5 sometimes guesses of the,
algorithm and they're given the probability.
So the computer said or the neural network said
cheetah, leopard, snow leopard or Egyptian cat can be one of the four.
And cheetah has the highest vote.
And throughout this, part of the course, you will 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, with a high probability, about like 95, 99%.
It's a cheetah.
then the second one, what do you think?
Is it that is that 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 choices. 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 editable train.
So what do you think the last one is?
very there are a couple of options there.
It's not very clear what is it could be a frying pan.
It could be a magnifying glass.
It could be even maybe a pair of scissors.
Some might say, well, 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, it said scissors with the highest probability, but then it had hand gloss,
which it actually was with not, not so far away on the 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.
That's that's what neural networks 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 will be coding together with headland.
But now let's try to understand a bit better what Convnets or convolutional
neural networks actually are and why are they gaining 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, kind of convolutional neural networks
are even taking over artificial neural networks.
So, a massive increase.
And this just 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 how's Facebook
able to tag images or people in images?
And not only just like remember previously, years ago,
you had to tag people yourself, then it would recognize faces.
You had to add them and 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 of.
And speaking of Facebook, if Geoffrey Hinton is the godfather of,
artificial neural networks and deep learning, then Yann
LeCun is the grandfather of convolutional neural networks.
Yann LeCun is a student of Geoffrey Hinton's.
And, in fact, here you can see them together.
And, Geoffrey Hinton now is,
pioneering deep learning at Google.
Yann LeCun is the director of Facebook
Artificial Intelligence Research and also professor at NYU.
So Australia, where, I love this part of the course.
Slowly we're building up this, name, these names or this,
kind of picture of the profiles of the people who are driving this field.
And, next, in the next couple of parts will get to know about a few more,
and we'll have this whole mafia, as they call themselves,
or Yann LeCun calls them mafia or conspiracy of deep learning.
And you'll learn a bit more about how this whole field develops.
yeah.
It's just these are just some great, great people.
And so Yann LeCun back in, in the 80s, in the 90s, made
significant contributions to the field of, convolutional neural networks.
And as we will see, throughout this, course has been able
to, develop or help the world develop something so extremely powerful.
So moving on to how convolutional neural networks work.
you haven't input. It's very simple.
It's very straightforward.
So you have an input image, it goes through the convolutional neural network
and you have an output label.
So it classifies that image as something
like as a cheetah or a bullet train or something else.
Now, kind of like going into a bit more, detail.
For instance, you can, after neural network has been trained up,
on uncertain images, on certain,
classified images or categorized images that have been categorized 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 it'll tell you that that person is happy.
And, you can give it a face of a person that's frowning.
It will tell you that the person is sad.
It can recognize these emotions.
And as you can see,
that's already very powerful in terms of so many different applications.
Just this one, example you can think of right away.
And, and in both cases, it'll give you a probability.
So it won't say, you know, with 100% the person's, happy or sad,
it'll be 99 or 98, or maybe 80% 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 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.
Right.
Sometimes we don't have we haven't seen enough features
and 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,
how is a 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 a black and white image of two by two pixels,
and one is a colored image of two by two pixels.
Well, neural networks leverage the fact that,
the black and white image is a two dimensional like array.
So the way we see it
right now on the left is just the visual representation, right?
So it's some kind of picture.
And for simplicity's sake, it's just a two by two picture.
But in computer terms it's actually a two dimensional array
with every single of those, one of those pixels having a value between 0 and 255.
So that's eight eight bits of information to the two, to the power of eight is 256.
So therefore the values are from 0 to 255.
And that's intensity of the color.
And in this case the color white.
So zero 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, the colors or anything works with the ones and zeros.
At the end of the day, that's that's 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, you've got a blue layer, a green layer and a red layer.
And, and that stands for RGB, a 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, a very trivial example of,
a smiling face in, in computer terms,
if we just really simplify things instead of having from 0 to 255,
instead of 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, 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 intuition stores.
We're going to structure on images like this,
which are very simple, but at the same time, then
all those concepts can translate back to the 0 to 256
range of values, and everything applies the same way there.
And the steps that we're going to be going through with
these images are step number one convolution.
Step number two max pooling.
Step number three flattening.
And step number four full connection.
And I can imagine that probably none 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 Yann LeCun
original paper, that gave the rise to convolutional neural networks.
it's called gradient based learning applied to document recognition.
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 you in the next tutorial.
Until then, enjoy deep learning.