Now, let's talk about mobile wallet, which has been a very useful network for the mobile phone arena
as well as for other embedded devices.
So let's get started.
So mobile.
That was an architecture developed by Google Google researchers, and here's a link to the people if
you want to check it out yourself.
And it was designed primarily to be an efficient, lightweight CNN that can be used on phones and embedded
devices.
Now remember good.
CNN's All Very Deep also have a lot of parameters.
That means they're quite big a hundred megs.
Plus, it's not always practical to have a 100 Meg model on your cell phone, because especially back
then in 2017, a lot of cell phones didn't come with one hundred and twenty eight gigs of storage.
So upsize was a concern for a lot of these cell phones, as well.
As more importantly, though, in my opinion, was the inference speed because phones back then in 2017
were quite slow and note.
Nowadays, phones like the new iPhones and Google's new Pixel six, they have dedicated machine learning
or neural net processing chips, or it's only a GPU.
Sometimes that tensor unit like what the Google has, but it's effectively it's the way to speed up
the operation.
So you can have a lot more complicated models on cell phones because inference speed becomes an issue.
Inference speed is how long it takes to beautiful propagate and inputs like an input image through the
network and get the probability results for things like object detection.
Running it on a cell phone like my cell phone is actually two years old and running very basic ability
vectors gives me like three to five frames a second, which isn't very fast so mobile.
And that was a way to actually make these things a lot quicker.
So let's take a look at some of the use cases for mobile that they were things like simple object detection,
face attributes, fine grained classification, landmark recognition.
All of these.
All of these use cases use mobile that's in some form of the other to achieve its test.
So let's talk a bit about the world of mobile and embedded devices.
So CNN's basically have to be efficient to run properly on these devices.
This means that they can use a lot of computational power like CG and resonance.
Those are those are basically run on servers and they're quite quick.
They're quite scalable, high High-Performance.
We needed something.
Do it for the user.
End on the edge devices.
That's what mobile phones and other embedded systems embedded systems can refer to.
Also like cameras running Android OS or other types of IoT type devices that have little right to use
a little processing units in there.
But they're still there.
They're fast, but they're not that fast.
They can't run these big models like figure and those big resonates.
They need to run something much simpler.
So there are few ways we can actually make models smaller.
We can just use less parameters, use less complicated models.
That's one way.
However, it's not the most efficient way, sometimes because mobile that allowed us to use a lot less
parameters and achieve a lot better performance in multiple ways, which we'll discuss.
There are other methods of shrinking that do things like pruning, distillation or little bit networks.
They all work fairly well, to be to be fair.
But again, it's not the ideal solution, always.
Maybe nowadays, when cell phones are much faster, these methods with big networks can be better than
mobile at all.
However, mobile that still serves a very strong purpose in 2021.
I remember talking to a camera manufacturer who makes Android an Android OS for their cameras, and
they were recommending only to use mobile that Sony models not to use the other models because they
were quite slow.
So you can see that mobile that is still important in modern computer vision.
So mobile that was able to achieve good performance by using two decent two techniques.
It used something called depth was separable convolutions, which I'll explain to you, as well as two
other hyper hyper parameters that allowed you to control.
Basically, we'll get into this, but allowed you to control the image size, as well as the width of
the convolutions or width of the network.
So it's easy to scale, according to these parameters.
So how does mobile that achieve this, actually?
So let's take a look at what depth by inseparable convolution convolutions, actually.
Oh.
So firstly, that's a look at a regular convolution operation in a CNN.
We have to drill down into this lovely up because this concerns a number of operations, which is not
something we tend to think about when creating CNN's.
But when efficiency matters, it's a concern.
So let's take a look at this example here.
We have a 12 by 12.
Very small image with a color image here by tree, we apply a kernel, a five by five kill and the three
of them because it's a color image and that produces, you know, this feature map of size eight by
eight by one, and that's using a straight one.
Now, the amount of operations this takes is a five by five by three by 64.
It's quite a bit of operations, isn't it?
So if we had 128 filters, look how the this explodes.
We have now 75.
That's five by Firefly Tree by 64.
By 128.
This gives us 614 and 400 operations, which is quite a lot just for one kind of layer.
So let's take a look at depth wise convolutions.
What is this doing?
So what we do here, we use tree filters instead of five by five size.
Instead of using what we did previously, which was a five by five by tree, we use them separate separately
for each channel.
And that gives us an output, a feature map of embodied by tree.
That we have tree feature maps.
So now we have more stuff.
So how does this reduce the operations?
Well, point ways compositions are then used.
That's what this is here.
Point because it's a one by one by tree to get the same output, shape it by to it paid by one.
That's what he applied.
This and this.
You get it by eight, by one matrix.
So this is multiplied sixty four times and it gives us that output, as I just just mentioned.
So this is a number of calculations operations it needs five by five victory by 64, which is four thousand
eight hundred times tree.
Well, this is the other expansion of it tree by 64 by 128, which is when we apply this conversion.
This point weighs convolution here, and in some time up, we only get twenty nine thousand three hundred
and seventy six.
That's remarkably less, isn't it?
And that's what all 128 filled with, my in mind you.
So it's twenty x less operations now.
It doesn't achieve the same performance is something we sacrifice by using two point why called convolution
here and separable remotely refer to this as depth was separable convolutions.
Separable completions point to the fact that we have separate filters now to produce trees, separate
feature maps.
So you can see, though, that this operation does save a lot of operations.
However, that does sacrifice some accuracy, but not as much as you would think.
So the other two hyper parameters that we discussed are the width multiplier and resolution multiplier.
The width multiplier thins the model at each layer, allowing you to use smaller filters if you want
to do a less filters, as well as the resolution multiplier, which reduces the input image size, which
also because it's proportional operations are proportional to the image size.
It reduces the number of operations needed, so he could get much faster performance.
So given all these sacrifices, you would expect mobile.
That's performance to drop off considerably.
However, it doesn't take a look at this.
You can see it in this first table in the top right.
Mobile net with 224 pixel image size that's the input image size used achieved seventy point six percent
image net accuracy, which is quite remarkable because Video G was achieving seventy one point five
with look how many more parameters, 128 million parameters versus 4.2 parameters you can see mobile
that has extremely good performance and very little sacrifice.
Here's another example here similar mobile in that comparison where we use the image not again accuracy.
And we compare this note to other smaller networks, which actually I accept isn't that small squeeze
net is another lightweight model similar to mobile net, which we'll discuss shortly.
And you can see it's even it's better than that.
Also, you can compare it in the top one accuracy of the Stanford Dogs' dataset.
You can see how Inception with twenty three point two million parameters compares to mobile net 224.
And you can see eighty three point eighty eight point eighty three point three percent.
Why was that so hard to see of this 84 percent?
And so that's quite good.
So you can see mobile that is is very effective and very accurate, despite its small size.
And this figure also shows the parameters for the parameters vary with the input image size, as well
as you can see different sizes we used.
And that's basically it for the performance analysis you can dig into.
The people who use these tables were taken from the mobile that people that was published in Twenty
Seventeen.
So we'll stop there for now.
And next, we'll move on to the Inception network, which is a very cool network.
It was a bit trendy when it came out back then, and it's still used nowadays for some.
And tests, so will start, we'll continue with the Inception network next.
Thank you.