1 00:00:01,040 --> 00:00:01,670 All right. 2 00:00:01,680 --> 00:00:05,910 Welcome to a brand new module in this module. 3 00:00:05,940 --> 00:00:08,910 We're gonna be building a Caris model from scratch. 4 00:00:08,920 --> 00:00:11,070 Do some image classification. 5 00:00:11,160 --> 00:00:13,760 Previously we've been using a pre trained model. 6 00:00:13,770 --> 00:00:19,700 This time we're gonna train our own model and we're gonna do all of that from beginning to end. 7 00:00:19,710 --> 00:00:22,470 So we're gonna formulate our research question. 8 00:00:22,470 --> 00:00:29,100 We're going to gather our data clean our data and process our data explore and visualize some of the 9 00:00:29,100 --> 00:00:34,000 data and we're going to train our neural network on our local machine. 10 00:00:34,020 --> 00:00:40,320 And finally we're going to evaluate how we're doing a high actually want to kick off this module with 11 00:00:40,320 --> 00:00:44,550 a bit of a story you see in 2015. 12 00:00:44,550 --> 00:00:52,950 A Japanese man called Makoto Koichi kit was helping out his parents on their cucumber farm and one thing 13 00:00:52,950 --> 00:00:59,070 he realized was that his parents were sorting their cucumbers by the cucumbers quality. 14 00:00:59,130 --> 00:01:07,050 So for example a really fresh crispy and prickly cucumber sold at a huge premium to something that's 15 00:01:07,050 --> 00:01:13,740 like lower grade or damaged not all cucumbers are created equal apparently. 16 00:01:13,740 --> 00:01:21,420 However he also learned that farming cucumbers is a lot of work especially sorting cucumbers because 17 00:01:21,420 --> 00:01:28,520 apparently during harvest time his mother would spend about eight hours a day just sorting cucumbers. 18 00:01:28,710 --> 00:01:30,750 So that's when Makoto had an idea. 19 00:01:31,470 --> 00:01:38,510 What if he could use image classification to classify the cucumbers according to their grade. 20 00:01:38,520 --> 00:01:45,720 So like premium normal or lower grade hen then he could put those cucumbers on a conveyor belt and probably 21 00:01:45,720 --> 00:01:47,790 drop them off in the appropriate box. 22 00:01:48,540 --> 00:01:56,060 So this was the task that Makoto set himself the first step was gathering lots of data on his cucumbers. 23 00:01:56,070 --> 00:02:01,290 He started taking pictures of them and he started labelling these pictures of the cucumbers according 24 00:02:01,290 --> 00:02:03,210 to their grade hand. 25 00:02:03,270 --> 00:02:11,100 Makoto spent about three months or so taking about 7000 pictures of these cucumbers and this data set 26 00:02:11,160 --> 00:02:13,470 was what he used to train his algorithm. 27 00:02:13,470 --> 00:02:20,370 First he downsized all these pictures into like 80 pixel by 80 pixel images and then he used to tensor 28 00:02:20,400 --> 00:02:27,360 flow on his own computer to train a neural network and then his computer spent about two days training 29 00:02:27,360 --> 00:02:29,960 the model and calculating the weights. 30 00:02:31,160 --> 00:02:37,100 And after all that was done all he had to do was build some sort of sorting machine which had the cucumbers 31 00:02:37,100 --> 00:02:38,810 coming on a conveyor belt. 32 00:02:38,810 --> 00:02:44,390 They would make a stop in a photo booth where a picture was taken of them and then they moved down the 33 00:02:44,390 --> 00:02:48,770 conveyor and were deposited in the appropriate box. 34 00:02:48,770 --> 00:02:55,790 So this is a real story of a real person using image classification to solve a real problem. 35 00:02:55,790 --> 00:02:58,810 And we're going to take some inspiration from this story. 36 00:02:58,850 --> 00:03:01,210 We're also going to build our own image classifier. 37 00:03:01,470 --> 00:03:04,190 And it's going to classify 10 different things. 38 00:03:04,190 --> 00:03:16,870 It's going to differentiate among dogs ships horses frogs deer cats trucks cars planes and birds. 39 00:03:16,940 --> 00:03:21,280 In total we're actually going to have 10 different classes. 40 00:03:21,320 --> 00:03:25,810 That's the word that you'll see in the literature for the different categories. 41 00:03:26,800 --> 00:03:31,840 And the simple model that we're going to build is going to be an artificial neural network called a 42 00:03:31,890 --> 00:03:34,070 multi-layer perception. 43 00:03:34,090 --> 00:03:36,050 That's the name for it. 44 00:03:36,100 --> 00:03:40,850 It's one of the simplest kinds of neural networks and we're going to see how it fares. 45 00:03:40,960 --> 00:03:46,070 We're gonna see what kind of challenges we come up against and how we can resolve them. 46 00:03:46,090 --> 00:03:48,840 So I hope you're as excited as I am. 47 00:03:48,940 --> 00:03:52,300 I can't wait to see you in the next lesson where we're gonna do the setup.