﻿1
00:00:00,510 --> 00:00:01,320
‫Welcome back.

2
00:00:01,860 --> 00:00:06,630
‫I hope you have installed keras and tensorflow in your system.

3
00:00:08,270 --> 00:00:13,490
‫Now, as a practice project, we are going to create an image classifier.

4
00:00:15,400 --> 00:00:23,380
‫We will be classifying this kind of images into ten different categories, such as T-shirts, trousers,

5
00:00:23,410 --> 00:00:26,870
‫pullover dresses, bags, boots, et cetera.

6
00:00:29,130 --> 00:00:36,330
‫For this, we are going to use a very famous database that is known as Fashion emnist Database.

7
00:00:37,800 --> 00:00:45,900
‫Here we have around 70000 grey scale images of ten different fashion categories, objects.

8
00:00:47,500 --> 00:00:49,700
‫Our training set will be of

9
00:00:49,850 --> 00:00:55,580
‫60000 images which we are going to use to train our model.

10
00:00:57,640 --> 00:01:05,680
‫We have an another set of 10000 images which we will be using as a test set to evaluate the performance

11
00:01:05,680 --> 00:01:06,430
‫of our model.

12
00:01:07,870 --> 00:01:16,480
‫These images are in a form of twenty eight by twenty eight pixel  square and each pixel is represented

13
00:01:16,690 --> 00:01:17,740
‫on a gray scale.

14
00:01:17,890 --> 00:01:20,590
‫On a scale of 0 to 255.

15
00:01:21,840 --> 00:01:29,400
‫The great thing about this database is that it is available within keras and we can directly import it from

16
00:01:29,400 --> 00:01:29,940
‫Keras.

17
00:01:30,210 --> 00:01:34,750
‫We don't have to upload a separate file to access this database. Here

18
00:01:35,160 --> 00:01:39,810
‫You can see the ten different objects that are present in this database.

19
00:01:43,330 --> 00:01:50,470
‫Now, to access this database from keras, we are first creating a fashion underscored mnist object

20
00:01:51,360 --> 00:01:59,950
‫where we are calling this database and after that we are loading this database into our X and y datasets.

21
00:02:01,160 --> 00:02:07,490
‫We are calling our train dataset as X underscore tarin underscore  full and y underscore train

22
00:02:07,520 --> 00:02:13,790
‫underscore full and our test dataset as X underscore test and y underscore test.

23
00:02:14,570 --> 00:02:17,180
‫So just load this database.

24
00:02:19,210 --> 00:02:24,700
‫No, we can use macplot library to view images in this database.

25
00:02:24,880 --> 00:02:31,990
‫So, for example, if I want to access the first image, I can just write x underscore train underscore

26
00:02:31,990 --> 00:02:32,320
‫full.

27
00:02:32,650 --> 00:02:34,840
‫And we're accessing the first element.

28
00:02:34,930 --> 00:02:38,490
‫That is the picture that is present at position zero.

29
00:02:42,940 --> 00:02:48,010
‫You can see that this is our first image if we want to access the second image.

30
00:02:48,340 --> 00:02:50,470
‫I'm just changing the location to one.

31
00:02:52,720 --> 00:02:58,040
‫In this way, you can access the different images that are present in this database.

32
00:03:01,020 --> 00:03:03,240
‫Now, this is our X variable.

33
00:03:04,290 --> 00:03:08,640
‫This are of the pixels that we are going to use to predict the object.

34
00:03:10,570 --> 00:03:13,300
‫Not to view the actual category of this object.

35
00:03:14,110 --> 00:03:21,010
‫We have to call the y train dataset so you can just call the element that is present at the first

36
00:03:21,010 --> 00:03:21,550
‫position.

37
00:03:21,760 --> 00:03:22,960
‫So if I run this.

38
00:03:25,210 --> 00:03:27,820
‫You can see that the output is zero.

39
00:03:29,530 --> 00:03:38,290
‫To view the category that is responding to this zero label, we can refer this above table here, zero

40
00:03:38,290 --> 00:03:39,940
‫Stands for t shirt and tops.

41
00:03:40,150 --> 00:03:44,980
‫One is stands for trouser, who stands for pullover and so on.

42
00:03:47,450 --> 00:03:54,830
‫So this image is of a T-shirt and the output is also representing that this is a T-shirt.

43
00:03:58,480 --> 00:04:02,270
‫We just checked this for the first element.

44
00:04:04,250 --> 00:04:10,010
‫You can see that this is a boot and the y label is nine.

45
00:04:11,300 --> 00:04:15,260
‫If you see label 9 correspond to ankle boot.

46
00:04:16,880 --> 00:04:22,490
‫So instead of referring table each time, we can create a list of class name.

47
00:04:23,360 --> 00:04:23,660
‫Where

48
00:04:23,710 --> 00:04:29,180
‫We have listed all the categories  in the order of their labels.

49
00:04:30,820 --> 00:04:38,010
‫So that if I call the first element of this list, it will directly give me the T-shirt, if I call

50
00:04:38,020 --> 00:04:38,890
‫the second element.

51
00:04:39,220 --> 00:04:41,580
‫It will give trousers as an output.

52
00:04:42,390 --> 00:04:45,920
‫So instead of calling the labels, I can directly call

53
00:04:45,940 --> 00:04:50,610
‫The description of those labels using this class name list.

54
00:04:52,490 --> 00:04:57,810
‫So just check the image of object that is present location

55
00:04:58,010 --> 00:04:58,370
‫10

56
00:05:02,610 --> 00:05:04,920
‫Who check  the y label of this object

57
00:05:05,250 --> 00:05:10,680
‫I can directly call class name and then the label of the position 10.

58
00:05:12,450 --> 00:05:15,540
‫You can see the class name here tshirt or top.

59
00:05:19,200 --> 00:05:19,390
‫If you notice

60
00:05:19,890 --> 00:05:27,690
‫Here we are using matplot to plot the data that is stored in the x train dataset, now to view the content

61
00:05:27,690 --> 00:05:28,440
‫of this data.

62
00:05:29,100 --> 00:05:29,850
‫You can

63
00:05:33,360 --> 00:05:37,460
‫You can just write x train full and then call the object.

64
00:05:38,660 --> 00:05:45,290
‫So earlier I have mentioned that this images are of 28 by 28, greyscale format.

65
00:05:46,160 --> 00:05:51,950
‫So here in the data, you are seeing 28 into 28 pixel values.

66
00:05:53,390 --> 00:05:57,710
‫These are the pixels that are present at the first row.

67
00:06:00,300 --> 00:06:02,110
‫These are the pixels that are present at

68
00:06:02,300 --> 00:06:06,330
‫The second row and so on for the 20th row. Here

69
00:06:06,660 --> 00:06:11,180
‫Zero represent pure black and 255 represents white.

70
00:06:12,220 --> 00:06:16,510
‫So the location of first pixel, that is the first row and the first pixel.

71
00:06:17,050 --> 00:06:19,060
‫You can see it's pure black.

72
00:06:19,240 --> 00:06:21,040
‫That's why we are getting zero.

73
00:06:22,090 --> 00:06:27,130
‫So our data is present in this form to view the data.

74
00:06:27,250 --> 00:06:28,120
‫You have to use

75
00:06:28,210 --> 00:06:34,480
‫Imshow method and to get the y values the actual category of this data.

76
00:06:35,140 --> 00:06:42,580
‫You have to call y train data and you can also use class name list to directly get the descriptions

77
00:06:42,710 --> 00:06:43,470
‫Instead  of label.

78
00:06:44,440 --> 00:06:49,240
‫So this is the data that we are going to use for each record.

79
00:06:49,360 --> 00:06:54,460
‫We have 28 into 28 values, that is 784 values.

80
00:06:55,660 --> 00:07:00,860
‫And using these values, we are going to predict the description of this.

81
00:07:01,510 --> 00:07:03,130
‫So that's all for the data.

82
00:07:03,460 --> 00:07:05,800
‫You have the raw data can view this data.

83
00:07:06,040 --> 00:07:07,360
‫And you have the class names.

84
00:07:07,510 --> 00:07:10,370
‫Now, we have to create model on this data.

85
00:07:11,230 --> 00:07:17,620
‫In the next lecture, we will normalize our dataset and further divided our train dataset into validation

86
00:07:17,620 --> 00:07:18,720
‫and train set.

87
00:07:19,200 --> 00:07:19,620
‫Thank you.

