In the previous lesson,
we looked at how you would go from
the binary classifiers we'd
been looking at throughout the course,
to update it from multi-class classifier.
In this video, we'll look at the Rock Paper Scissors
workbook and explore how
it perform multi-class classification.
The first step is to get the data.
There are two zip files,
one for the training data, and one for the test set.
Once we have the data,
we'll unzip it into the subdirectories here.
Let's now take a look at some of the files within that.
You can see there are 840
of each class and a few filenames.
Let's now plot a few of the files
so we can see what the data looks like.
As we can see, we have a few different hands
with different skin colors,
and both male and female hands.
Let's now build the model.
Note that while the images are 300 by 300,
we are setting up the image generators to give
us 150 by 150 variance.
It will resize them on the fly and
augment the ones in the training directory.
We'll also print out the model if you want to inspect it.
Now, the training begins.
I'll speed up the video so that you can see the progress.
Keep an eye on the accuracy and the validation accuracy.
I'm only training for 25 epochs,
based on the chart you saw in the last lesson.
But by the time we reach the 10th epoch,
we're already doing quite well.
By the time we finish,
the training data is above 98% and
the validation data is at 95 percent accuracy.
This is highly specialized data that's optimized for
this lesson and not a great real-world scenario
for Rock, Paper, and Scissors.
I'll discuss why in a moment
but let's first plot the accuracy.
We can see the training
improving and trending towards one.
The validation zig-zags a bit,
but it's always between 0.9 and
one after the first few epochs.
Now, let's explore testing
it with some images that it hasn't previously seen.