(upbeat instrumental music)
- [Instructor] I am excited
to give you the solution
for the Dripping Water
Audio Classification Model challenge
that I'd given you.
I actually thought about it.
I told you about dripping water,
and I was wondering what if we used a cup of tea,
and made it drip?
Machine learning with an AI is so accurate
that if you actually had dripping water
versus dripping tea,
it will know the difference,
provided you give it enough sample set.
Anyway, coming back to a dripping water problem,
we are looking at water dripping in a pipe,
and you are creating an HJI device,
and it is going to have this HJI model,
which is going to identify the sound
of this dripping water.
That's what we are going here for.
I want you to remember that though
I'm teaching you to actually
build a training model,
and it is going to train,
and then you can export it.
When you export it,
it is an inference model,
so what will sit on your edge device
is an inference AI.
So I just want you to keep that in mind
that when you're dealing with training AI,
that's not what the customer is seeing.
What the customer is seeing is the inference AI.
Now, let's look at the demo.
The My Solution demo.
Okay,.
So we have background sound.
We made this using the mic,
and I just recorded for 20 seconds,
so let me delete this and start again.
And I basically said record for 20 seconds,
kept quiet and then I said, extract sample,
and it extracted the samples for me.
It's actually showing 30 samples and out of 20
because I deleted some,
and added more samples to be extracted.
Okay.
So you can add any number of background noise,
but it expects a minimum
of 20 in teachable machine.
Then the bell sound,
I literally used the mic,
and I did what we did in our demo,
and I said, record.
Let me start again.
(bell dinging)
And then I said extract,
and I got a bunch of samples,
and I got about 12 samples.
Okay.
Then I made a new class.
This is a dripping water class.
I just called it water.
Again, the name doesn't matter.
It's just a name for this group of data,
just named as water in this case.
Okay.
So again, it says you need eight minimum.
So I'm going to use the mic,
and I'm going to record,
and this is dripping water.
Okay.
So I have a cup with water in a spoon,
and as soon as I hit record,
I didn't like it.
I think I started slow,
so I'm going to get rid of it.
See what I did here?
I don't need to extract the sample.
I can just ignore it.
So I wanted to show you,
you don't have to be perfect.
You can try this any number of time.
When you extract the sample,
then it extracts the sample.
Even at that point,
you didn't like it, you can d delete it.
See, it's that simple.
Okay.
So I'm going to do it again,
and I'm holding a spoon of water over a cup.
I'm going to let it drip,
and at the same time I'm going to press
record two seconds.
Okay.
Now extract the sample.
Now I need eight of them.
I'm going to repeat this.
Okay, I've got 10 samples.
You don't have to have an exact equal number.
I have 12 in the bell and 10 in here.
It doesn't matter.
It has to be kind of close.
Okay.
So what did we do in our training?
We collected our samples in three classes.
That's what we've done here.
And then I taught you about epoch is the number
of times the training data
is going to be scanned.
And if you look closely, you can see
the sound is digitized,
and the frequency is captured here beautifully.
Okay, so I just press click,
and it'll train the model,
and it says preparing training and it's done.
Yeah.
Okay.
So now as I'm talking,
it's trying to hear my voice
because I've turned input here
from the mic,
and it's trying to guess
the sound that it is hearing.
Is that background?
Is that the bell or is it the water?
As I taught you during the demo,
this AI's world is very narrow.
It knows only three classes of sounds,
the background noise,
the bell sound and the water sound.
So anything else it hears
is going to fit under that.
See, if I go and go add a different sound.
(sounds tapping)
I'm tapping my spoon to my cup,
and it's just trying to fit in one of them.
Okay, now for the real test.
I'm going to be quiet,
and see whether it recognize the background.
Okay.
So 99% or 97%,
it thinks it's background.
That's good.
Now I'm going to test for the dripping water.
That is our real use case, right.
Pipe is leaking and you need to find
the AI needs to recognize it
so that it can notify you
or turn on the water, turn off the water,
do something meaningful, some automation.
It gives you the power to do that, right.
Here we go.
So the number goes up.
It could be another viscous fluid,
which will have a different sound when it drips.
And so if you want to capture that,
and you want your AI model
to capture that,
you want to train for that,
and you want to create the inference model,
which you're going to automate.
Maybe you have a full automation done
from the HJI device or it sends you notification
or it's integrated into your broader workflow
into other systems.
So there's so many possibilities,
but what you have learned here
is the foundation knowledge
of how that machine learning classification
is done,
how it is so easy to collect data.
So in instead of thinking of data
as multiple data sets,
and then download from here and there,
and things like that,
it's very simple,
and you just create different class of data,
and you train it, you export it,
and you've got the answer.
So let me show the export
to finish up the challenge solution.
All I did is press export and I said,
upload my model,
and it's uploading to the cloud.
I copy that and this is where it is going
to put the inference model.
This inference model that you copy,
you could also download it,
and you can download it
and burn it into your edge device.
Edge AI typically sits on the Edge,
and that is why it's call Edge AI
in the first place,
and then it runs inference from there.
So it receives data like the sound
of a dripping water
or whatever your model is supposed to do,
and it'll recognize
and then it'll say, yes,
I identified a water.
Now what do you do with it
is where you build the product
of a notification integration
into your workflow
or whatever you action you want to take.
Okay.