- [Instructor] Computer vision is the AI
that is trained using images and videos.
When you think about
what is the most important computer vision model,
what comes to mind is object detection.
Object detection is, as the name suggests,
the ability of the model
to detect common objects in an image.
It is about detecting many different objects
in the same image.
We are going to do this demo using Azure AI.
It's part of the Vision Studio.
Azure Vision AI is a pre-trained model
and it has been trained with thousands of common objects.
So let us look at a demo.
Let's pick one of the examples they've given here.
And as you can see, I'm not signed in,
so I'm using a free version of Azure.
So you can try this for yourself directly without any cost.
So here, as soon as I brought this image,
one of their example images here,
you can see there are boxes around it
that is called a bounding box.
That is the output of an object detection model.
It identifies objects in the images and it puts a box
and it recognizes a person
with 95.5 degree confidence.
And this one is a skateboard
and it recognizes it with 90% confidence.
What does that mean? Remember, all AI is stochastic.
That means it is making a prediction
every time you use the AI.
So this AI is an inference AI.
This is a pre-trained model from Azure
and we are users of this model
and we are giving this data, this image as the data
for the model to make a prediction
to say these are two common objects
and it looks at a person also as an object, right?
So it's, a object doesn't mean an inanimate object.
So it recognizes a person and a skateboard.
So it is giving the statistical confidence of how sure
that it is a skateboard.
You see something called a threshold value here.
That is something that you have control to decide
how flexible you are in accepting a low confidence
or high confidence from the AI.
In this example, it has only two objects.
So why don't I pick another one. So let's take this one.
As soon as I put it here, it is recognizing three people.
So it says person 85.6% confidence,
another person is 76.5% confidence,
and a third person at 72.3% confidence.
So outside of that, we can also see it recognizes objects,
it sees a laptop, it sees the seating
and more seating, and it also sees the table and footwear.
That's beautiful. So all of these objects are recognized.
So now, you're going to play with the threshold.
So threshold, we can make it low or we can make it high.
If I make the threshold as high,
then it does not bring as many objects.
So you can see if you want the AI to show you objects
that it is highly confident with a high degree
of confidence, then you can increase the threshold.
If you say it doesn't matter, even if you have low degree
of confidence, show me everything
that you can recognize in this object,
then you can actually find more things.
What is the difference? Can you think for a minute?
Why would this matter? What can you do with it?
So it goes back to what do you want
this computer vision model to do for you?
So if this is going to be a robotic surgery
and a robotic arm that is going to use the camera
to look at things, then you would want it
to have a very high degree of confidence, right?
Something like that.
If it is just identifying things around
in your office or in your warehouse
or counting inventory, then you might not be
so upset if it misses out a few objects
or it adds a few more objects
with a low degree of confidence.
So it is important for you to think about what is it
that you want the object detection model to do.
Object detection is a very important model used
by autonomous vehicles that we have been using
as an example in this course.
But you can apply this for any camera, anything with vision.
Okay, so let us move ahead
and I've shown you two examples.
I want to actually show you a different image
that is not in the examples.
So the way you insert your own image
is you click on browse for a file.
So I brought this image as a sample image
and you can see it's working
and it has identified couple humans in there.
Oh, it's recognizing three people in here.
What about this person and what about this robotic arm?
So again, it goes back to how confident you want this to be
and it it brings it down to one person at high degree
of confidence, two people or three people.
And however low I go on my threshold,
it does not recognize this robotic arm or a fire spark here
or the cables, nothing else.
So if I want to see what is this,
it doesn't recognize the table.
So again, it goes back to your use case
and how important that it recognizes everyone.
So I would say if it recognizes three humans in here
and you're building something like a robotic arm
that is going to be doing welding and it is going to coexist
and work well with humans, then it is important
to recognize all humans.
Let me give you another example.
Think of a warehouse
and it could be autonomous mobility robot
that is moving around in the warehouse or a factory.
Then it cannot say, I can recognize three people
and not the other person.
What if this robot is moving around?
The autonomous mobility robots are called AMRs.
What if the AMR is moving around
and any of these people are opening an elevator door
and coming in?
It has to stop for everyone equally.
So that becomes very important.
So what do you do if your existing model does not recognize
a situation that is important for your work?
That is why you have the option of testing this out
with your own images for your own environment.
And if it doesn't still work, then you go down here
and it says you want to use your own images
and you'll have to sign up for Azure
and it costs you to try out the REST API
and all the details of their API
and the SDK reference is all available here.
So your data scientists can actually use this
pre-trained model and train this model to become smarter,
to understand more objects to the degree of confidence
that you want using the images that you provide.
So computer cameras are essentially
trying to recreate vision as in human vision.
And we take it for granted.
It is a very complicated phenomena
for us to see our environment.
So it is not just that we are seeing things, they are in 3D.
So when you collect images of your own environment
and you want to train your model, you have to think about
how the human vision is a miracle.
It understands multiple layers of the image.
It understands background angle, lighting, placement.
You'll have to capture all that in your workflow.
So you have to collect sample images
that covers different lighting, daytime, evening,
twilight, different angle.
So the difference between these people
and this person might be the angle
in which they are standing,
or it could be that this image is layered
and this person is at a layer at the back.
So you might want to capture that placement of the people
or the objects that you want to identify.
A different background might confuse
the computer vision model.
And so you might want to give the same objects
in multiple different backgrounds
to teach the algorithm that it is the same object
regardless of the background where it is.
So there's a lot of different samples that you have to give
and you have to bring your business acumen of what you want,
how your environment changes over time
and what you want to capture,
what is important for your safety.
And later, we will learn how you want
to think about the data privacy
of what you don't want to capture.
I can see this person is holding a tablet,
this person is holding a paper.
Does it matter in your company, in your environment?
You might want to think about the privacy implication
of what you are using to train the model too.
So there's a lot to learn here.
The easiest thing what we learned here
is to use an existing image
and see how it puts bounding boxes
and does object detection.
The next step was to understand
that there is difference in which
it understand different objects.
And the third thing is for you to understand
how you as a product manager get to control the threshold
on what is applicable for your own application.
And then finally, you can test it with your own image.
And if you do not want
to use the existing model, it doesn't work for you,
you can try vision model from some other technology company.
I'm showing you Azure's Vision Studio,
and test and see what works for you.
Or as a last resort, you can go train this existing model
with your own data set
or your own collection of images
so that you're training the model.
At that point, it is important to remember
the difference between training and inference.
What you have here is an inference model.
It has been pre-trained by Azure and is given to you.
You are a user, it's an inference model.
The minute you say, I'm going to train it
and take a whole bunch of images and run the SDK
or API on top of it, you are training the AI to learn
to get the next level of AI.
Again, you have to test it and then bring it to inference
and then take it to your customer, to your environment
to test whether it works for you to see
exactly what it is detecting
so that it works for your example.
So you might want to just try this out
with different camera setting for factory equipments or city
or home or medical devices
or the AMR in the warehouse that we were talking about.
Next, we will do an interesting challenge.
And before I wrap up,
I want to give you two more references.
One is, if you're thinking about artificial intelligence
in IoT and Edge devices, you can refer
to my course artificial intelligence
and connected products right here on LinkedIn Learning,
especially if you want to learn about computer vision
and different models of computer vision,
there is a special lesson just for that.
And the other thing is, if you're thinking about,
hey, this is human-computer interface
and the device is standing here
with the sparkly fire in here and the people
are standing here, how do I design the AI
to work as a proper application in a human-centered way?
Then you can refer to my course AI design
Using Autonomous Vehicles.
It's actually Innovating
With AI Design Using Autonomous Vehicles
and you can learn about AI on variety
of different AI on Edge devices including computer vision.
So next, I'm going to see you at a challenge
and I'll give you the solution
and we will take this lesson forward
with your own image from your own environment.