Welcome back.
It's time to have a little bit of fun because you've just been listening to me talking for a bit and
we want to get our hands dirty and try this machine learning ourselves.
But even though we don't know much about it yet we can actually play with it.
For example there's a great Web site here by Google called teachable machine.
And as you can see what it does is well it helps you do some machine learning activities.
So if I click on get started here and by the way by the time you watch the video maybe they've changed
the layout of this Web site.
It doesn't really matter because this is more for you to kind of understand how things work underneath
the hood and even play with this yourself.
So let's create an image project and for now all we're going to do is say hey I want to decide or create
a machine learning model that detects faces or cats.
So let's just say this is going to be faces and this is going to be cats.
And we have to give it some image samples.
So then the machine can learn.
Right.
So in here on my desktop I've actually saved a couple of photos.
I found a nice little cute cat picture online.
So let's upload the cat picture so well upload the cat picture here you can see that we're only uploading
one.
And here I will upload the faces picture while I upload the baby's picture here
so we have faces and cats and then we train our model.
We essentially tell the computer hey this is an example what a face looks like.
And this is an example of what a cat looks like.
So just learn please.
So you can see over here it's learning.
And there you go.
It now has created a model.
Now in here I can use my webcam or I can just upload a file.
So let's just upload a snorkel picture that I have of myself and I click open.
There you go.
This model that we trained thinks that this has a forty nine percent chance.
Let's make this a little bit bigger.
This has a forty nine percent chance that this image is a face and a 51 percent chance that I'm a cat
what's going on here.
What if we give it a better picture.
I mean this is a tough picture right.
It's a little bit fuzzy.
I have my snorkeling mask on.
Maybe it's a tough picture for this model to predict.
So I'm going to upload a different file.
Let's say this exact same face that I use in the image if I click open Oh boy that's even worse.
It thinks I'm 57 percent cat and it's 43 percent certain that this is a face.
What's happening here.
Well what you've just witnessed is how machine learning works.
We provide the computer some data in this case.
I provided one image of myself and Danielle's face and one picture of a cat based on those two inputs
and data.
I say Hey computer learn try to understand this picture and try to understand this picture.
And next time I give you any images based on this data predict for me or tell me how much confidence
you have that either it's a cat or a face and that's pretty much machine learning.
It doesn't have to be just images.
It just needs to be some sort of data.
We trained the computer and we create a model that can predict for us based on that data.
Now we see here that it's really really bad.
I mean this is definitely not a cat right.
So why is it bad.
Think about this for a second.
Try to answer it on your own.
Ready for the answer.
Well number one is that we've only given it one image each for a computer to really learn and to understand
what a face is what a cat is.
It needs hundreds thousands if not millions of images of cats to detect patterns to figure out hey this
is what a cat is hate.
This is what it faces right now.
I've only given it one sample each.
So this model is not very smart just like a human right to learn something in school you have to repeat
it.
You have to see it over and over.
And then also with the preview sometimes I give it a really clear image of a face or sometimes I give
it the snorkeling picture that's really fuzzy so that also affects the output but at the end of the
day machine learning is just that we give it some input and then we tell the machine to learn based
on those inputs and give us an output.
Next time we'll give it a new input.
Now I want you to take a break here.
I'm going to link to this resource so that you can actually play with this yourself and see if I can
improve this model.
You can even have your web cam on.
So instead of a file you have your web webcam just like in the examples that they provide.
So if I go to teach a machine you can see here different projects that you can build just by clicking
without programming anything you can even export your model.
Once you're done so that you can use it in your own projects.
Again if this is confusing don't worry we're actually going to go step by step and instead of just doing
something visually we're actually going to code and learn how machine learning and data scientists work.
But this is a great way for you to just understand on high level how machine learning works.
So go off and play with this Web site and I'll see you in the next video by.