>> You're not going to want to miss this episode of The AI Show.
We talk about building computer vision models
using AutoML for images.
Make sure you tune in.
[MUSIC]
>> Hello and welcome to this episode of
The AI Show where we're talking about
building computer vision models using AutoML for images.
I'm here with Swati.
How you doing my friend?
>> Doing good.
How are you doing Seth?
>> Fantastic.
Why don't you tell us who you are and what you do?
>> I'm Swati Gharse.
I'm a Product Manager
on the Azure Machine Learning Team.
I am very excited to talk to you-all about
a brand new capability we launched just this past week.
This is AutoML for images where you can use AutoML
to build computer vision models.
>> Fantastic. Let's start with the kinds of problems
that computer vision can actually solve
so that we can ground the discussion in the actual problem set.
>> Yeah. There's a whole bunch of problems
actually out in the industry.
Customers across various industries,
they are looking to build models that can process image data.
Applications can range from
image classification of fashion photos,
say on the Internet,
or PPE detection in industrial environments.
This includes a variety of tasks
including image classification, object detection,
instance segmentation, and AutoML has newly
added support for all of these computer vision related tasks.
I'll try to have a quick slide showing what these tasks mean.
Image classification is simply identifying different classes.
Like here you can see are there cats are there dogs?
We support both multi-class and multi-label.
With object detection,
you might want to find out where exactly are
these cats and dogs
and draw a rectangular bounding boxes around them.
With instance segmentation you want to do
this detection at the pixel level and draw polygons around these.
AutoML has added support for all of these tasks
where it can boost data scientists productivity
as they're building models for these computer vision tasks.
>> This is awesome.
For those who don't know,
this is actually a challenging problem.
Could you tell us why it's challenging?
>> Absolutely. In the ideal world,
when you're building models for computer vision tasks,
you would want to have an easy way to build these models.
But at the same time,
you also want to have control on
how that model is trained
so that you can optimize model performance.
You want to use these models out in the real world
so you need to operationalize them
and you want to have control on the
end-to-end model lifecycle once that model is generated.
But in reality, what happens is
data scientists are traditionally relying now
on really manual methods for manually building these models.
It's a tedious task trying to try these different algorithms,
you come in with your own training scripts.
You got to identify the right hyperparameters
that are going to make your model work.
All of this typically is painstakingly manual
and requires a lot of data scientist's effort and time,
something that's at a premium.
That's where AutoML can help.
Because using AutoML, you can easily build models
for all of these computer vision related tasks
without having to write any training code.
AutoML makes it really easy for you as a user
to optimize your model training
so that you have a model that performs really well.
You can control the model algorithms at the hyperparameters.
Once that model generated,
you can easily deploy this model as a web service in
Azure Machine Learning or you can download it
and use it in your local inferencing scenarios.
All of this comes to you as a part of
the Azure Machine Learning service
so you can very easily and seamlessly integrate
with other Azure ML capabilities.
I'm talking about things like
the data labeling capability in Azure ML.
You can now have multiple labelers coming
and labeling your training data.
You can export the training data and use that with AutoML
or you can bring it your own labeled dataset
if you already have labeled training data.
The other big thing we hear is
about operationalizing these models.
Because AutoML is a part of Azure Machine Learning,
once you've generated this model,
you can very easily operationalized it at scale
using the MLOps capabilities within Azure Machine Learning.
Think of things like their automated retraining or batch scoring,
all of this is within your control.
>> This is awesome, but generally,
when we talk about AutoML,
it feels a little black boxy.
You talked about data scientists.
How does AutoML for images go about solving these challenges
in a way that empowers data scientists,
but also allows them to look inside?
>> That is a great question because
I think you summarized this really well.
This is about letting the data scientist control
all of the different things that go into model making
and empowering them to be more productive.
As a data scientist, you can come in
and while you're training these models
for the different task types,
you can select from a variety of
state-of-the-art algorithms that we support
and here, I've named some of the algorithms that you can use.
You can either come in and say,
choose this one single algorithm and try that out
or you can choose multiple options
and explore these multiple algorithms in a single AutoML run.
The other big thing that's really important when data scientists
are building models is finding the right hyperparameters.
Because your model performance is going
to depend heavily on the values that you choose.
Of course, you've got to have your machine learning knowledge
and your data science skills because
you've got to know what hyper-parameters you're tuning.
But AutoML exposes a variety of hyperparameters
for each of these tasks.
Many of these hyperparameters are model agnostic.
Some of them are task specific,
and some of them are model specific.
By exposing these hyperparameters,
you as the user can easily try these different values
and tune your model for best performance in a single run.
Think of things like learning rate or batch size and all of this
you can try very easily exploited all in a single AutoML run,
while you're still leveraging your
machine learning scheme but you're
being more productive because all of this is
happening so easily in a single run.
>> Interesting.
This is more like a stick shift car
as opposed to an automatic car
because you actually need to know,
like for example, if you don't know what a YoloV5
is or a Faster-RCNN or a Retinanet.
This is probably not going to be for you.
But if you're a data scientist that wants to go through
the entire process of figuring out what's the best solution.
This is a good shock on to get
a sense for where things are, right?
>> Absolutely right. Once you know what to try,
this allows you to try these different values very easily.
I like that analogy.
I'm going to use that the next time.
>> Yes, I did a good thing.
>> It's the stick shift car of model-building.
>> Cool. Now I feel like I want to see how it actually works.
Can you give us a demo of the capabilities?
>> Absolutely.
>> Let me bring that one here. You have my screen.
>> I got it.
>> All right, so here is a sample notebook.
I'm going to show you guys really quick where
user's coming in and let's see what the user's doing.
I'm going to build an object detection model here
for a simple task of detecting objects from my fridge.
I have a toy dataset with things
like cans of Coke or water bottles.
I'm going to use AutoML to help
me build an object detection model for this.
To get started I'm
using all of the goodness of Azure Machine Learning,
I create my workspace.
I bring in my compute target,
set up an experiment.
Out here I need to bring in my training data.
Like I mentioned earlier,
I can either bring in my previously labeled training data or I
can leverage Azure Machine Learning data labeling capabilities,
and export that labels data to use for training.
Let's get to the good stuff real quick.
All of this notebook shows how to bring in
your training data and create
that as an Azure Machine Learning dataset.
Here is the part I want to show you where
you can get started with the AutoML goodness.
Let's say I'm getting started.
I know I want try your YoloV5,
but to start, I'm not quite sure which hyperparameters to use.
I set up my AutoML config like this.
I say my task is object detection,
I give it a compute target, my training data,
I can optionally give it validation data
or reserve a part of my training dataset for validation.
Here I come in and say, try YoloV5.
In this example, I'm giving just one algorithm,
but I could totally have used more.
By doing this simple step,
it's going to try the default
YoloV5 algorithm the default hyperparameter response.
But now I want to take this one step further.
I really want to get the best model performance out of this.
The default was good,
but I want to see how much more performance
and accuracy I can squeeze out of that model.
I can now come in
and easily tune the different hyperparameters
or try different algorithms all in a single run.
Here's how I do that.
In this case I'm trying a combination of YoloV5 and Faster-RCNN.
For each of these,
I'm calling out which hyperparameters I want to tune.
I'm actually giving it ranges of learning rate,
giving a different choices of model size.
Similarly with Faster-RCNN,
I'm using different learning rates and optimizers.
I can build this model space,
however it is,
and try multiple algorithms for each one,
I can try multiple hyperparameters.
Then here I control how I'm actually going to be trying
all these different algorithms and hyperparameter combinations.
I give it my budget.
I leveraged concurrency of my compute target.
I had a multi-node computer target here.
I can select things like,
what sampling do I want?
Do I want random
or I can pick vision or grid as well.
This is another cool feature
where I can leverage early termination.
Meaning any of my configurations that aren't performing as well,
they'll be automatically terminated to save me compute resources.
Once I've set up my config,
I go in and I say again, "Hey,
give me an object detection model.
Here's my compute target,
my training data.
Submit this run."
>> That's cool.
Can you scroll up?
I have a question here because I want to make sure
I'm understanding this correctly.
Basically this parameter space is you saying,
"If I were to do this on my own as a data scientist,
I would go through all of these choices one by one,
but I'm just going to put them in a parameter space
until AutoML for images.
Just go do all of that for me."
>> Absolutely right. When you were doing this manually,
you would be trying one at a time,
going through that manual iterative process that this work,
that does not work, what should I try next?
You're not only saying try all of these.
But if you take a look at the learning rate here,
and simply saying use a uniformly distributed space,
try values from 0.001-0.01 and pick randomly from that space.
I'm not even calling out individual learning rates
like I can basically give it a continuous or discrete space
and tell it how you want it to sample from that space,
and it does that all for you in one run.
>> That's really cool.
What does this look like when it actually runs?
>> Good question.
Out here, I have a completed run with
a similar parameter space that I gave for object detection.
This is my completed AutoML run.
I can go in here and it's loading.
>> As it's loading so basically is running
all of these experiments for you on the Cloud Compute.
Is that right?
>> That is correct.
It's running.
It is doing your job for you when you will get a coffee,
you just need your skills.
>> That's right. Basically,
the cool thing about this is if you have
an image classification or object detection.
You can basically just say over the weekend.
Let's try all the things that I know work
and then leave it running over the weekend
and then you will see something like this at the end.
>> One of my users actually said exactly that.
They said, "This functionality is so cool,
I'm getting my weekends back."
>> Nice.
>> Once I have my models,
this is my leaderboard of all the top models,
and you've complete visibility into what was tried,
what hyperparameter values were tried.
I can select any one of them and then go either
deploy the model out to Azure Machine Learning as a web service,
or I can download the model and use it locally.
Then I want to show you real quick a couple of the things.
Here are my Child runs.
I can go and explore each of these
and see how all of those performed.
Out here you can see these runs that weren't performing as well.
They got early dominated,
which is super cool for me as a user
because it's saving me compute resources.
These weren't promising runs.
What's the point in spending compute resources on that?
While these runs up on top are the ones that would win well,
and the system automatically decided
they should continue all the way through the end
because those are going to give me
the most promising model performance.
I can then get into any individual run here.
Let's take this guy for example and get into the outputs,
and out here I can access the model PyTorch file or the ONNX file
and I'm free to use it however I like in my AutoML.
>> That is the next question I wanted to ask,
because sometimes when we're looking at auto things,
it feels like we get locked in.
If you're going to use our auto thing,
you're going to have to use our auto.
Basically, when you're running this,
the outcome is whatever you would have done
before as a data scientist,
except it was done automatically for you.
Can you do whatever you want with the models?
>> Absolutely. At this point,
you can take your model and go and deployed it
as a web service out in Azure Machine Learning use that
in your inferencing scenario
or let's say you have a local inferencing scenario.
You can download these model files right here
and use them in local inferencing.
Then you can also use these with
other MLOps capabilities within Azure machine learning,
you can now use this automated retraining batch scoring,
whatever else you would do with a custom trained model
in Azure Machine Learning,
you can go ahead and do that.
You have full control of your model.
>> It feels like a really awesome productivity tool
for someone that wants to solve a computer vision problem.
Now I'm going to ask a question that might
seem to me that there's a little bit of a confusion.
We have something called custom vision.
We have computer vision, custom vision,
and now AutoML for images.
Can you maybe describe what the difference might be
and when you might choose one over the other.
>> Great question.
Custom vision is a great tool that helps
you build computer vision models
without needing any data science or ML expertise.
These models are built,
they're pre-trained with datasets
that are optimized for specific tasks.
Sometimes though, your scenario
might require you to have more control
on either model training or model deployment
or just the end-to-end ML lifecycle of that model.
>> I see.
>> Then you need this additional control.
AutoML offers you all of this control and flexibility,
while still making it easy for you to use.
Think of AutoML as being targeted to data scientists
with ML expertise in the computer vision area.
But it's boosting your productivity
as a data scientist as you're building these models.
>> I see, so auto for images is like stick shift.
Computer custom vision
is like you driving your own automatic car,
and computer vision is like getting
chauffeured around, so to speak,
because everything is a lot,
like you basically are doing less
and less of the data science work at that point.
>> I like your analogy, I guess you could say that.
>> Fantastic.
Where can folks go to find out more?
>> I'm going to share a link to a release announcement
that has all the information on the wonderful capabilities here,
and also more importantly,
links to documentation and sample notebooks.
I would love for folks to try this out
and get feedback on the product.
>> Fantastic.
Well, Swati. Thank you so much for being with us
and be learning all about building computer vision models
using AutoML for images on The AI Show.
Thank you so much for watching and hopefully
we'll see you next time take care.
[MUSIC]