Hello, guys, and welcome back and this lecture, we're going to talk about neural networks.
Now, this section is going to introduce deep learning and we will see what is deep learning, why it's
so popular and how do we use this.
Deep learning will be for the Raspberry Pi.
So all of our application will be implemented on our Raspberry Pi so that we can have an embedded system
that is capable of doing machine learning or deep learning.
So the first step to do that is by introducing neural networks.
Now, it all started actually with the neural network and model and embedded systems are starting to
deploy deep learning to their applications.
But what does this deep learning even mean?
So it is it is taking a decision based on three train data.
So you have a deep learning model and you have a free train data.
You pass this free train data to your model so that you have the hope that if you bring in new data,
it will recognize it.
Let's say if you have digits that you want to recognize, let's say you give it an image of number one,
two, three, four, up to nine, and you want your system to recognize and print out what is the given
number.
So to do that, you pass it to, let's say, a deep learning network and it should be able to recognize
the number and print it out to you.
But first, you need to train this model so that it knows what is one, what is two, three, so that
when you give it a lot of data to train on, let's say you give it a thousand picture of number one,
a thousand picture of number two.
Each is with a different rotation, different orientation, different colors.
You give it a huge amount of data so that when you give it a four year data for number one or number
two, it will be able to recognize that this is the very basic idea of what the learning is for image
recognition.
Now, in order to learn that first, we need to learn a little bit about images.
So the prerequisite here is to understand what is an image.
So let's say that we have an image here, which is one, two, three, four, five pixels by five.
So this is five by five image.
And let's say this contains only about crap.
Now, this image here contains a background and the shape this shape actually is a square that has multiple
colors of all at the same time.
Now, every one of these has now each block of these is just a pixel.
And this pixel has three values if we are walking in the AGB.
So these three values represent what color you are seeing right now.
We are representing it with only one value.
But in reality now every RGV pixel is actually three values.
Let's say for black it's all it's zero zero zero.
It means red is zero.
Green is zero.
And the blue is zero.
Now for white, it's 255, meaning the red is 255, the blue is 255 and the green is still five five.
So every pixel on your screen, every single one of them has three values and you can actually extract
these values and print them out if you are using some image processing library.
So this is what an image.
So what we conclude is an image is just a bunch of numbers because every pixel is represented with the
three numbers.
It means that the whole image is just a bunch of numbers that are back together.
Right.
And every pixel has three layers of GB, so every pixel is three numbers.
This gives the possibility that we can do some processing on this image by processing and crunching
those numbers.
So now that we know what is an image, let us see what is a neural network?
A neural network is actually consisting of multiple notes.
There is input layer and every bunch of nodes.
We call them layers.
Let's say these are three nodes here of the input layer.
Then we have the layer which consists of four nodes.
Then we have an output layer.
OK, now the input layer is used in order to give the data, so we pass the data to these notes.
Now the hidden layer is where we do some processing on the numbers with just a plugged in and the output
is where we get the result of what we are trying to process.
OK, so this is like a general purpose function.
Now every input player is connected to the hidden layer.
So as you can see here, those three are connected to the first to the layer second phase.
Same thing, same thing here.
And finally, same thing here.
So they are totally interconnected with each other as we can see the input and the hidden layer.
Now, every hidden layer is connected to the output like that.
This will form a neural network, which is the basis of the learning.
So in order to learn deep learning, we need to understand.
What is a neural network?
Now, I'm going to give you a very basic example, let's say that we have these three shapes.
First, let us take this circle.
Let's assume I know this is not realistic, but let's assume that this circle consists of only three
pixels.
This is physically not possible.
But let's just assume that this circle only consists of three pixel.
OK, so what we do is we just put every pixel to one of these notes.
OK, so this node here will contain the OCB value of the first pixel as an array.
So we pass an array to the first input layer.
Then in the second input layer we pass the second pixel OCB or the three values of the pixel.
The third one, the same thing.
So we have a picture of three pixels.
Every pixel is going to one input of the input layer.
OK, and let's say here that at the output we are trying to recognize if this best image is a circle
or not.
So this will generate a binary valuable and it will generate either a zero or one.
So let's say we train this neural network and we're going to talk about training in the upcoming lecture.
Let's say we do it around 500 picture of multiple circles and this output will be able to tell me if
it's a circle or not.
Next, I could train a different neural network for triangles.
Again, I pass every pixel to the input layer and with training, this output layer will be able to
generate a zero or one to predict if it's a triangle or not, as we can test that for any shape we want.
So this is the basic idea of a neural network that is used for image processing and for image recognition.