(upbeat techno music)
- [Instructor] Now I'm going to share my solution
for the challenge
where you have taken your own image from your environment
and done object detection using Azure AI.
So let's get started.
I want to show you couple different images that I used
and let's see what resonates with you
and the image that you did object detection for.
So here's my first image.
Let's see.
Okay.
So this shows five people, okay?
And it is showing all five people, again,
with different degree of confidence, right?
This is 88, 90.
The person at is slightly at the back,
so it is saying 57.
This person is 81.
This person is also at the back,
but it recognizes them at 81.
And this person is looking slightly bigger
because they're in the front and they are taller,
so that's 93%.
So if you want, based on the use case, remember you have
to change the threshold.
So the important thing is in this case,
if you wanted the computer to be captured,
then it's not being captured.
If you want this machine to be captured,
then it's not being captured.
So it's important for you to think about what you want
to capture, whether that is missing in this picture.
Then do what you do?
You'll have to train the model.
And you have to create an account,
sign into Azure and get started,
and the SDK and everything is there.
It's going to cost you money,
so they're very transparent about it,
and you can review the pricing.
I'm going to show you another image.
Here's the next one.
So here, it is showing four people.
Seems very straightforward, right?
So again, it is showing 92%,
95, 91, 87.
This is pretty good.
And I wonder what are they all looking at.
They seem very excited.
So if I reduce the threshold,
it's still showing four people.
If I increase the threshold, it still shows four people.
So that's not too bad.
And again, it doesn't recognize this image in here.
If I wanted it to understand this machine in here, I'm going
to need a lot more training data
to retrain this existing pre-trained model.
So you understand that that's a drill
that we have to go through and it's an expensive exercise,
so you have to be aware of that.
So I'm going to show you a third image.
This is an exciting one.
On the surface, it looks like more people in the factory,
and it's three people.
One person with 81% confidence.
Another recognized at 71.
Another recognized at 92.
And again, it's not recognizing the laptop or paper,
and it is actually showing more people recognized, right?
So it's recognizing even this blurred image
of a person at the back here
and this other person at the back.
That's not bad, right?
Again, it depends on what you want the environment
to be seen, how you want the environment to be seen,
what you want to be visible to the camera, right?
And the reason I want
to show this picture is you can see there are five people,
and it is showing six people in here.
Who noticed that?
Nice job.
Which one is missing?
This person that it is recognizing
at 54.7% confidence doesn't exist in the picture.
Let's go figure that out.
So, we've been talking about recognizing objects.
It's doing a pretty good job.
This Azure AI is doing a pretty good job
of recognizing persons.
And in the previous demo, the real demo exercise
that I showed you, if you want to go back,
look at the demo lesson, a couple lessons back,
a couple videos back, you can see
that it recognized the footwear of the person, the seating.
It did a lot more object recognition.
And in this case, it doesn't seem to be doing that.
But if that's not your requirement, this is great,
then it'll do the job for you.
But, I am interested in seeing what is it looking at
as this other person?
Aha, it's a person at 54% confidence,
and it's not a person at all.
It is somehow seeing this part of this machinery
as the head of a person,
and it is saying, "I see a person not so confident.
It is at 54.7% confidence."
So the lesson here is
you create pictures from your own environment
on what your H-AI camera should be watching for,
and you test it and with lots of different images.
So, don't pick one image, test it and say, "Okay, good.
It's doing what it needs to do."
Here it is making things up.
And all AI is stochastic.
It makes a prediction every single time you deal
with an inference AI and feed it a piece of data.
In this case, it's computer vision.
And the data is this image.
And when you feed it an image,
it is going to make a prediction.
It's not just the low degree of confidence,
but it can make a false positive or a false negative.
So it's important to understand whether it is missing out
on some objects that it should recognize.
Then you need to retrain the model
or find a different model that could work
for you from a different vendor maybe.
But in this case,
it is making a false prediction as if a person is there.
So in this case, if you're trying to get a headcount of
how many people are in the factory, instead
of five people, it's going to say six.
What if you're running a fire drill
and you want to make sure
that everyone has left the building,
and it'll create a problem
because you're going to be looking
for this non-existent person who's just sitting and smiling
and happens to be a machine.
So think about it.
I want you to get very imaginative
about the different possibilities of the use cases
of every Edge device that you have.
What can it do?
What can it not do?
What should it not be doing?
It should not be making fake persons prediction
in your images.
And easy way to deal with this,
now that you know it is at 54% confidence is
to change the threshold value.
So here, if I bring it down all the way,
nope, it doesn't.
It's still, if I change the per threshold...
Oh, it did.
So if I went this way
and change the threshold, it says, aha, 54.
Mm, it's more than that, then it will, right?
So now, I change the threshold,
and I said, "Okay, if I have a high threshold, 57,
it's not going to make that prediction of that person."
So, you could actually change the threshold
and get rid of these imaginary images
that you don't want in the picture,
which have low confidence.
But what if this image was predicted,
but it was at high confidence?
Then this threshold won't work.
So that's a trade off you do.
So first you get pictures of your environment, get lots
of different pictures of your environment.
Look for what you are expecting the camera to catch,
make sure that's covered.
Make sure there are objects that are not missing.
Then you have to get more and more pictures
to train your model,
and it's going to cost you money, right?
The other thing is you don't want the model
to be making false predictions
and showing things that don't exist.
And again, I was giving you this example of, you know,
fire drill and making sure everyone got up the the building.
But, it might not matter if it is showing some piece
of equipment or something that is not as material
for your use case.
It might not matter.
But if you're sitting
and using your computer vision model to sit
and count how many products were produced,
and it is going to do a counting by identifying them.
If it makes a false prediction, it might double count
and it might cost you money.
So, it is important to not get carried away by, wow,
it is recognizing people,
but to get to the purpose of the use case
of what you want it to do.
So it has to identify the things you want.
It has to not identify the things you don't want.
You can play with the threshold value.
Try to make this work with the existing API.
Again, this, I'm showing this as a simple demo style
of input images and then try it easily.
But you can also do this using the help of a data scientist.
Use your REST API.
You can use the SDK for reference.
When would you do that?
When you want to integrate this.
So the easiest thing I think as a product manager,
you think about different images and test it.
See if this works for you.
So when many different vendors show up
and say, "Hey, we can do computer vision
and object detection, and we can find anomaly detection
and find that odd thing out in your image",
you actually think about your use case,
you think about the accuracy, think about the threshold,
test it out with various different pictures.
And then, you can actually use the REST API and SDK,
go to your IT department,
or you know, if you're going
to get your data scientists in-house,
get them to actually use this as an Azure AI
from Vision Studio,
and integrate it into your own product, into your workflow,
into your existing technology as an existing AI.
So that's what happens with all H-AI.
H-AI is built, trained by somebody.
It could be retrained by your own team if you want,
which is expensive.
It is all done by data science.
And then the final, the product, which is the AI,
is an inference model.
You just burn it into the device
or you actually get that AI
and integrate it into your workflow
so that it solves your problem.
So never lose focus on what is the customer problem.
What is the use case?
What is the degree of accuracy you want,
and what is right for your business and customers?
Good luck.