1
00:00:00,000 --> 00:00:01,710
In the previous lesson,

2
00:00:01,710 --> 00:00:03,210
we looked at how
you would go from

3
00:00:03,210 --> 00:00:04,860
the binary classifiers we'd

4
00:00:04,860 --> 00:00:06,915
been looking at
throughout the course,

5
00:00:06,915 --> 00:00:09,735
to update it from
multi-class classifier.

6
00:00:09,735 --> 00:00:12,480
In this video, we'll look
at the Rock Paper Scissors

7
00:00:12,480 --> 00:00:13,950
workbook and explore how

8
00:00:13,950 --> 00:00:16,425
it perform multi-class
classification.

9
00:00:16,425 --> 00:00:18,330
The first step is
to get the data.

10
00:00:18,330 --> 00:00:19,560
There are two zip files,

11
00:00:19,560 --> 00:00:21,900
one for the training data,
and one for the test set.

12
00:00:21,900 --> 00:00:23,540
Once we have the data,

13
00:00:23,540 --> 00:00:25,665
we'll unzip it into
the subdirectories here.

14
00:00:26,695 --> 00:00:29,980
Let's now take a look at some
of the files within that.

15
00:00:29,580 --> 00:00:31,650
You can see there are 840

16
00:00:31,650 --> 00:00:34,340
of each class and
a few filenames.

17
00:00:34,340 --> 00:00:36,380
Let's now plot a few of the files

18
00:00:36,380 --> 00:00:38,450
so we can see what
the data looks like.

19
00:00:38,450 --> 00:00:40,850
As we can see, we have
a few different hands

20
00:00:40,850 --> 00:00:42,230
with different skin colors,

21
00:00:42,230 --> 00:00:44,735
and both male and female hands.

22
00:00:44,735 --> 00:00:46,625
Let's now build the model.

23
00:00:46,625 --> 00:00:49,700
Note that while the images
are 300 by 300,

24
00:00:49,700 --> 00:00:51,770
we are setting up
the image generators to give

25
00:00:51,770 --> 00:00:54,005
us 150 by 150 variance.

26
00:00:54,005 --> 00:00:56,225
It will resize them
on the fly and

27
00:00:56,225 --> 00:00:59,170
augment the ones in
the training directory.

28
00:00:59,170 --> 00:01:03,020
We'll also print out the model
if you want to inspect it.

29
00:01:08,620 --> 00:01:10,450
Now, the training begins.

30
00:01:10,450 --> 00:01:13,065
I'll speed up the video so
that you can see the progress.

31
00:01:13,065 --> 00:01:16,480
Keep an eye on the accuracy
and the validation accuracy.

32
00:01:16,480 --> 00:01:18,685
I'm only training for 25 epochs,

33
00:01:18,685 --> 00:01:21,175
based on the chart you
saw in the last lesson.

34
00:01:21,175 --> 00:01:23,440
But by the time we
reach the 10th epoch,

35
00:01:23,440 --> 00:01:25,210
we're already doing quite well.

36
00:01:32,410 --> 00:01:34,010
By the time we finish,

37
00:01:34,010 --> 00:01:36,960
the training data
is above 98% and

38
00:01:36,960 --> 00:01:40,255
the validation data is
at 95 percent accuracy.

39
00:01:40,255 --> 00:01:43,300
This is highly specialized data
that's optimized for

40
00:01:43,300 --> 00:01:46,150
this lesson and not a
great real-world scenario

41
00:01:46,150 --> 00:01:47,605
for Rock, Paper, and Scissors.

42
00:01:47,605 --> 00:01:49,240
I'll discuss why in a moment

43
00:01:49,240 --> 00:01:51,310
but let's first
plot the accuracy.

44
00:01:51,310 --> 00:01:52,720
We can see the training

45
00:01:52,720 --> 00:01:54,940
improving and
trending towards one.

46
00:01:54,940 --> 00:01:56,840
The validation zig-zags a bit,

47
00:01:56,840 --> 00:01:58,430
but it's always between 0.9 and

48
00:01:58,430 --> 00:02:00,400
one after the first few epochs.

49
00:02:00,400 --> 00:02:02,560
Now, let's explore testing

50
00:02:02,560 --> 00:02:05,900
it with some images that
it hasn't previously seen.