0:00 and we're on te boom we're on going live 0:04 yeah yeah yeah yeah okay maybe I start 0:07 with just just my face there we go okay 0:09 we're in if you're in the chat let me 0:12 know if you can see me let me know if 0:13 you can hear me because we have a very 0:16 exciting stream today we're 0:18 celebrating 100,000 subscribers which is 0:21 an insane amount yo yo 0:26 yo let me 0:28 know 0:31 if you can hear see all 0:36 good hello everyone welcome welcome 0:39 welcome I like your T-shirt thank you 0:41 Oscar perfect sound beautiful beautiful 0:45 beautiful and what about the screen if I 0:48 put the screen on here let's get some 0:51 code can you see this all right because 0:53 we're going to be going for 10 hours and 0:55 I would hate for people not to be able 0:57 to see so let me know if you can see 0:58 what's happening 1:02 sound like a fellow Aussie yes yes yes 1:05 movember 1:07 mustache I do have a movember 1:10 mustache we can hear and see very quick 1:13 clearly amazing okay for me YouTube is 1:16 looking good let's get 1:18 started first what we're going to do is 1:23 we need to lay out some ground rules for 1:24 the 1:25 stream 1:27 so welcome everyone I have no idea how 1:31 this is going to turn out 10 hours is a 1:33 long time uh but not really because it's 1:35 only really just a day so let's go over 1:38 here and we will get page title is It's 1:43 November the 6th where I live it is 8 1:45 a.m. in the beautiful Northern beaches 1:47 of Brisbane so I can't show you it but I 1:49 have the beautiful water there you can 1:51 see the trees the water the sky it's 1:55 good it's a good day November 6 100K 1:58 live stream 2:02 celebration the editor is a bit small 2:05 I'll increase 2:06 that okay so what about this how's the 2:09 size 2:15 there is that a good size for the 2:25 editor it's afternoon in the real 2:28 world 2:31 11:00 p.m. in France hello everyone 2:34 everyone leave their country flag in the 2:37 chat let's see how many different 2:39 countries we 2:41 have okay so that's that's good that's 2:43 where we're going to go okay and now 2:45 let's go here how do I zoom 2:50 in zoom 2:53 in zoom we're just going to use notion 2:56 actually 2:58 notion 3:00 add to uh that way you guys can see 3:02 what's going on as well November 6 100K 3:06 live 3:07 stream celebration look at that I can't 3:09 even zoom 3:11 in openers page we're on okay so let's 3:17 add a little icon we can go 3:21 party okay you can all see this here's 3:24 what we're going to do today so we need 3:26 to lay out some 3:27 rules we've got plenty of time so we're 3:30 not going to rush rules so every 3:35 hour equals 10 3:38 push-ups 10 situps no 10 3:42 squats and let's go 10 kicks 10 3:49 punches that way we got to keep moving 3:51 all right and then let's go surprises at 3:54 77 minutes in and then that's about it 3:58 for the timing wise so let's set a timer 4:00 there's going to be a surprise at 77 4:02 minutes in everyone we're going to set a 4:07 timer 4:09 timer 77 4:12 minutes oh 77 minutes and 77 seconds 4:16 let's do that okay so there's surprises 4:19 when this timer goes 4:23 off that way every hour if we keep 4:25 moving cuz we don't want to I don't want 4:27 to be inside and sitting down for 10 4:28 straight hours that's not me you know 4:30 that's not me and then what 4:34 we're going to build so um let's build a 4:39 full stack ml application and we're 4:42 going to build I had this idea something 4:44 simple because 10 hours is a lot of time 4:47 but it's also not enough time if 4:48 something goes wrong cuz I'm going to be 4:50 doing all of this live so let's 4:54 build food notf food.app 4:58 so who remembers hot dog not hot dog 5:01 we'll start off and again if this takes 5:03 less than 10 hours we can do something 5:05 else but hot dog not hot 5:09 dog of course the model to build for 5:12 this 5:14 is pretty straight forward you get 5:16 photos of hot dogs and not hot dogs but 5:18 we want this deployed so I want to 5:21 before the end of the stream you should 5:23 be able to go to food food.app 5:26 and use a machine learning model to take 5:29 a photo of something and see if it's 5:30 food so what we have to do is let's go 5:33 to do we need a data set we're going to 5:36 do all of this from St scratch collect 5:38 data set and then we're going to model 5:41 data 5:42 set build 5:45 application um deploy 5:48 application and then after that well who 5:52 knows okay so we don't have any data we 5:55 don't have a model we don't have an 5:57 application and we can't we have haven't 5:59 deployed the application yet so let's 6:02 start a GitHub 6:05 repo who's in for that we'll build food 6:08 not food.app and then if we have more 6:09 time we can of course do whatever but we 6:12 need to build a full stack application 6:15 today um let's go new 6:18 repo we want what should we call it food 6:22 not 6:25 food 6:27 um machine learning 6:31 powered app to 6:34 decide whether a 6:37 photo is food or 6:41 not who wants to build this choose a 6:44 license it's going to be all open source 6:46 so you can copy it and whatever but we 6:49 have to collect a data set get ignore 6:52 and let's make it 6:55 python create repo so there's the repo 7:00 Mr D Burke food not 7:03 food hello RJ 7:06 namala oh look at all these flags thank 7:08 you so much for sharing them we have UK 7:10 we have America we have 7:13 India we have Netherlands another 7:17 America beautiful we have Poland thank 7:20 you all so much we have a pirate flag 7:21 beautiful if you're living if you're 7:23 watching this from a pirate ship 7:26 hello there's going to be some Treasures 7:28 out there I am from 7:30 Australia 7:31 so let's do 7:36 it okay we need a data set people who's 7:39 ready to start going so I'm going to 7:41 also probably put the notion 7:44 here 7:46 um that way you can 7:50 see copy 7:54 link show link options people want that 7:56 way people can 7:58 uh 8:03 see notes on 8:09 notion okay everyone's ready to go now 8:12 food not food see notes on notion and we 8:16 also need an 8:22 image um save image 8:25 as hot 8:27 dog not 8:35 dog Poland hello hello oh the 8:41 kangaroo Egypt Pakistan France Nigeria 8:46 hello hello everyone welcome welcome 8:49 welcome this is going to be fun all 8:51 right we're going to spend most of it 8:53 coding and then if we have spare time 8:55 I'll answer questions probably by the 8:56 time I get cooked I'll um I'll just 8:59 start talking to you for a bit and then 9:01 go back to coding I actually don't know 9:03 I have no idea how this is going to turn 9:05 out so we'll 9:07 see we're doing it to celebrate 100,000 9:10 subscribers so thank you so much 9:11 wherever you are in the world for tuning 9:13 in to my crazy videos this will probably 9:16 be one of the 9:19 craziest so let's go to CD food not 9:24 food LS clear beautiful food not food 9:29 okay um I'm going to now add the image 9:32 into there so LS 9:36 um desktop 9:41 L tell me if you can see the 9:44 terminal we're going to be using this a 9:46 lot clear LS we want hot dog not hot dog 9:58 move 9:59 um I want 10:02 code food not 10:22 food now we're going to add hot dog not 10:25 hot dog so people know what we're 10:26 working 10:28 on 10:30 first 10:31 commit add hot dog 10:38 image what we're going to build so let's 10:41 let's do this collect data set so I want 10:43 to show you 10:44 how we can this 10:48 is we're going to deploy it a few 10:50 different ways actually um I just 10:53 realized this so a lot of people ask me 10:57 how do I work on my full stack 10:58 application so hopefully this stream is 11:00 going to show you like how I would 11:02 approach it um so we can do it with 11:04 gradio we can also do it with live web 11:08 app um we could do it as an 11:13 API I mean there's three different ways 11:15 but I'm probably going to use it with 11:17 tensorflow.js why is that because 11:20 tensorflow JS runs in the 11:22 browser and it's very easy to to once 11:26 you if you know a bit of JavaScript you 11:28 can get it up and running pretty quickly 11:30 so collect data set we need 11:34 need images of food and not food we're 11:38 going to figure that out right we don't 11:39 have a data set and 11:42 then we'll go model data 11:45 set we want to um build a computer 11:49 vision 11:50 model to 11:53 classify food and not 11:56 food and oh I just remembered that we 12:00 want I've got a tweet 12:03 here this is the important thing about 12:05 data sets we go 12:08 here you all know Abraham loss 12:12 function very very smart 12:16 person this is why we have to build a 12:18 data set 12:20 so we 12:23 want data set or no we'll go ml 12:27 model 12:34 why isn't that 12:38 embedding it won't embed that's all 12:41 right but this very 12:44 important if you had 8 hours to build a 12:46 machine learning model we have 10 I'd 12:48 spend the first 6 hours preparing my 12:50 data set quote from Abraham loss 12:53 function which is of course Abraham 12:55 Lincoln but I've memed that so let's 12:59 bring this in here this is what we got 13:01 to pay attention to what if you it's 13:03 easy to start a machine learning model 13:04 with a data set but what if you don't 13:06 have a data set and what we're going to 13:11 build what we're going to build and we 13:13 want let's get in that image of hot dog 13:15 not hot 13:16 dog choose 13:21 image where hot dog not hot dog 13:26 code okay 13:34 [Music] 13:36 caption what we're building except for 13:39 food not food a nice and simple app 13:42 that's what we want so full stack 13:44 machine learning application surprises 13:47 at 77 minutes in every hour someone keep 13:49 a track of an hour and thank you 13:54 for this is going to be saved yes you're 13:57 right uh you're good in JS is it easy to 14:00 me to learn machine learning in JS yes 14:02 of course it is I'm about to show you 14:04 I'm terrible in JS but we're going to 14:05 figure this 14:08 out tweet ah thank 14:13 you there we 14:20 go um 14:24 delete so now let's go back to where we 14:28 were I'm going to get out of that put in 14:31 the 14:34 GitHub what we're 14:37 building except for food not 14:41 food let's go image source 14:54 equals did that not 14:57 push 15:18 okay we're on so now let's figure out 15:21 how we can build a data set we need to 15:24 model data set we need 15:26 to build application 15:30 simple HTML with 15:33 JavaScript and 15:35 then deploy 15:39 model we've got a few options 15:44 here gradio gradio is probably the 15:46 easiest I'll show you how how beautiful 15:48 that is once we've got a data set though 15:50 we don't have a data set um and then 15:52 there's also we're going to do 15:56 tensorflow Js 15:59 and then maybe an API so let's do that 16:03 uh we're going to deploy a web app and 16:06 Implement ml Ops dark mode please maybe 16:10 I should turn on dark mode for for the 16:14 stream 16:19 system dark 16:21 mode boom we're on dark 16:24 mode why didn't that go into dark 16:27 mode 16:34 hey this is not in dark 16:44 mode 16:57 appearance 17:04 how come this is not changing that's 17:08 right nothing's in dark mode that's all 17:11 right so let's figure out how we can 17:14 collect a data set that's what we want 17:15 to do so we need a 17:17 way let's 17:19 go image net a good 17:22 downloader download imag 17:25 net uh down download from imag net we 17:30 need 17:39 images so we don't want the full image 17:42 net data set of 17:46 course who knows how to turn on dark 17:48 mode 17:52 in vs 17:55 code why is that not dark 18:17 I just restarted 18:27 it 18:40 that's all right we can go light mode 18:43 light 18:52 mode contrl P theme thank 18:57 you 19:02 them no 19:22 results ah here we 19:24 go there we go we're on we're in the 19:28 dark Ness people welcome to the 19:33 darkness welcome to the darkness my 19:37 friends so let's collect a data set and 19:40 build a model first do I 19:42 have I'm trying to think I should train 19:44 the model on my deep learning 19:47 PC so let's connect to 19:55 that opening remote we 20:00 want clone get 20:02 [Music] 20:06 repo food not 20:22 food and I have a tensorflow environment 20:25 ready to 20:27 go 20:30 all 20:39 right 20:57 cond beautiful so we have hot dog not 20:59 hot 21:03 dog and we want we need to find a data 21:05 set 21:16 though image net data 21:19 downloader so that's what we're going to 21:21 do now first things first is collecting 21:23 a data 21:25 set so when I make time stamps for this 21:28 video I'm going to say timestamp and 21:31 then that way I can search the text and 21:33 say 21:33 timestamp that collect a data set is at 21:36 this Tim stamp so we're going to four 21:41 images of not food 21:46 download random 21:49 images from 21:53 imet and for images of 21:58 food um we can use food 101 so we're 22:01 going to combine two different data sets 22:03 food 22:05 101 random subset of images from food 22:12 101 hey Egan how are you it's 1:00 a.m. 22:15 in Turkey oh no worries my friend yeah 22:17 this video will be on the channel for 22:20 everyone um for everyone is uh who who 22:24 can't join into to the live stream no 22:26 worries this video will be on my my 22:28 YouTube channel once it's finished and I 22:30 will put time stamps in there will be a 22:32 lot of time stamps probably build a 22:35 computer vision model to classify food 22:36 and not food so this is what we need we 22:38 need images of not food and we need 22:42 images of food so let's go to 22:47 here is there imag net downloader data 22:51 set this is what we want imag net data 22:53 sets 22:54 downloader you can create data sets from 22:57 subsets of imag net by specifying how 22:59 many classes you need and how many 23:00 images per class beautiful this is 23:03 achieved by using URLs provided by imag 23:05 net wonderful okay so the following 23:09 command will randomly select a 100 100 23:12 of imag net classes which at least 200 23:14 this is what we want okay so we want to 23:17 build a not food data 23:22 set from each selecting 23:26 class 23:29 so let's go imag net class 23:37 list how many foods are in 23:39 here Food Food Market grocery store 23:45 Market okay what we could do is we could 23:48 download 23:50 this and then randomly select 23:54 say 500 classes or something and then 23:57 then delete the ones that are food cuz 24:00 that way we'll have a data 24:07 set is banana in here 24:13 banana I see 24:17 fruit jack fruit pineapple apples okay 24:21 so that's that's what we need we need 24:22 some data from imag 24:26 net 24:30 how about we do some data processing on 24:39 this 24:40 [Music] 24:43 so 24:48 raw let's start up a python 24:52 script hello from 24:56 Pakistan 24:59 hello from 25:01 Peru you're looking good brav thank you 25:03 Adam I appreciate it my friend Asik it's 25:06 3:45 a.m. there well I appreciate you 25:09 joining in Legend banana banana 25:22 banana wait why is 25:26 this 25:28 download Nvidia 25:31 compute hey hey hey hey 25:34 hey I don't want to get 25:38 that why did that just download a Cuda 25:46 repo we 25:49 want let's just download the zip of 25:53 this download 25:56 zip what's in this Z 26:01 zip uh why not just download non food 26:04 images from the web well think about how 26:06 many different non-f food images we'd 26:07 have to download whereas we can just use 26:11 this imag 26:14 net um so I'm going to need to copy this 26:17 over so let's move this into 26:26 downloads 26:36 actually we'll move it to the 26:38 desktop so we have image net a th000 26:41 class idx to label 26:43 so uh yes aik I am connected to the Deep 26:46 learning PC via SSH you can see that 26:49 there this is running um on my deep 26:53 learning PC 26:54 downstairs um oh no I don't need the 26:57 Nvidia SMI hello from Saudi Arabia hello 27:01 from Australia there we go we have a 27:03 Nvidia Titan X GPU ready to go but we 27:06 have to do some data processing first so 27:09 let's get to 27:10 terminal we CD into desktop oh no we can 27:13 just commit 27:14 it so 27:22 um 27:24 move image net and then we want to move 27:27 this to 27:28 code food not 27:56 food 28:03 so now we're going to just add the image 28:05 net 28:09 classes we'll commit 28:19 this and then we can just pull that down 28:21 on we could have secure copied that SCP 28:24 but we're going to just 28:26 pull so now we 've got imag net classes 28:29 here beautiful okay so now we need to 28:33 write some python 28:35 code to we want to get all of the 28:38 classes in here that are not food that 28:41 way we can build a data set we can 28:43 download images from imet that aren't 28:45 food so if someone takes a photo of not 28:48 not food class it will recognize it is 28:51 not 28:54 food hello from Florida hello from Iraq 29:00 oh well a Chic you just wait the Deep 29:01 learning PC is going to be used a whole 29:03 bunch we have 100 people watching thank 29:06 you so much for tuning 29:08 in okay so let's start to write some 29:11 code and we can just probably manually 29:13 go through all of these classes and 29:15 delete them if 29:16 they're 29:19 uh if they're 29:21 food does that make 29:23 sense and then we can get all of the 29:25 ones that a not food and we'll download 29:29 100 images of each and that way we'll 29:31 have a pretty big data set of like 29:32 10,000 29:33 images and of course this doesn't 29:35 include everything in the whole world 29:37 but that's the idea of our 29:40 model is to learn a probabilistic 29:42 relationship between what a food image 29:44 of food looks like and what an image of 29:45 not food looks like so let's create uh 29:49 if you want to replicate this this will 29:51 all be on my 29:56 GitHub 29:59 um and now let's open up 30:01 this data exploration we want import 30:04 pandas as PD uh import num 30:16 NP import 30:21 CSV 30:23 reinstall hold 30:25 on kernel I 30:31 want okay there we go um we want with 30:38 open image 30:44 net copy the 30:51 path dot um read bit as f um f read 31:01 lines we 31:03 want 31:05 imagnet classes equals a list and then 31:10 f. read 31:13 lines is this going to work might have 31:16 to look up how to read a a text file 31:21 imet classes. 31:26 pend 31:30 M1 is going 31:33 great oh did that 31:36 work beautiful 31:38 okay uh maybe we don't want to read it 31:40 as bites so we don't have bite strings 31:43 there we go okay read 31:47 lines um but we don't necessarily want 31:52 that we've got each one as a 31:56 line 32:00 or we could just go imag net classes 32:02 equals f. 32:08 readlines image net classes 32:11 beautiful um this is a Jupiter notebook 32:14 this is a Jupiter notebook running in vs 32:19 code 32:21 so there's a better way to do this let's 32:23 look that up um python how to read in 32:28 dictionary from 32:33 txt dictionary from a 32:37 file file open dictionary 32:43 string as literal 32:53 aval is this from the python standard 32:56 Library 33:00 okay we just want 33:06 read f. 33:11 read and 33:25 then 33:31 okay beautiful we've got a a a list of 33:34 imet classes now hm who knows a good way 33:39 to explore a 33:43 dictionary in vs code yes you do get to 33:45 press Tab and get suggestions look at 33:47 this 33:49 um there we 33:52 go vs code is very 33:55 good 33:58 hello from Ivory Coast I don't even know 34:00 what that is let's look up Ivory Coast 34:04 Ivory Coast hello from Brisbane 34:06 Australia Ivory Coast wow West Africa so 34:10 good to see you thank you for joining 34:13 in that's 34:17 amazing what does Ivory Coast look 34:22 like wow that's 34:24 beautiful how do you say this cot 34:27 deore 34:29 diore sounds 34:31 French okay we're getting a bit 34:33 distracted let's go back to the code so 34:35 we need a way let's go through this 34:38 and how do we edit a 34:41 dictionary I mean I turn a dictionary 34:44 into I want to 34:47 remove let's Loop through this so for 34:51 imag net classes so we want 4 34:54 KV in image classes. items um if 35:03 V if V do 35:06 contains um 35:11 banana 35:13 print 35:17 K string has no attribute 35:24 contains python check if string 35:30 contains 35:32 string I 35:34 thought 35:36 find does python have a string contain 35:42 substring oh 35:45 in I'm too used to writing 35:48 pandas 35:51 if 35:53 banana in the 35:58 954 okay so 36:03 H maybe we just go imag net Food 36:18 classes no way this 36:24 guy swar k has built food not 36:30 food distinguish between food and 36:32 non-food see this is the beautiful thing 36:35 okay how did they create a data 36:38 set vgg 36:42 16 how do they get the data 36:55 set 37:05 food image data set beautiful look at 37:07 this team we have so many different 37:09 options okay well that link is dead look 37:12 at that to develop an app that can 37:15 distinguish between food and non- food 37:16 we're going to extend this you know what 37:18 we're going to come back to our friend 37:20 uh sishwar k at the end of this and once 37:23 we've built it we'll uh we'll Link in 37:25 the app hey 37:27 come back he built the model but didn't 37:30 build the app to do come back to how do 37:33 you spell his name said 37:39 isua 37:44 ISU to 37:46 say we've built the 37:50 app we're going to come back to this 37:53 lovely person and say hey you know what 37:55 thanks you for getting that started 37:56 online we're going to we're going to 37:58 we're going to build upon 38:00 it so what other foods are in here 38:06 Apple pineapple is there meat in here 38:10 meat 38:14 egg 38:16 um 38:25 chocolate see this is how you got to go 38:28 through crafting a data set so let's go 38:30 um python list of common eaten 38:45 Foods 38:48 nope hello from Turkey it's French could 38:51 pronounce it as cavor I'll probably get 38:54 all this wrong hey hey from Columbia two 38:56 people from 38:57 Colombia thank you so much um what do 39:01 you think about the new Macbook Pros 39:02 will first M1 generation be about be 39:05 enough for beginner medium DS and ml 39:07 user yeah for sure the beginner ml I 39:09 mean M1 is a fantastic machine I've got 39:13 some of the new ones on order I'm going 39:15 to test them out 39:16 too so 39:22 python here we 39:25 go close 39:46 oh here we 39:51 go 39:53 nltk you can get what does this do 40:13 this is beautiful we're just going to 40:15 combine a whole bunch of different data 40:16 here 40:20 so 40:25 USDA 40:29 food 40:35 data oh we could work through 40:38 this I've already got this data 40:41 downloaded let's try the nltk method and 40:43 then we'll come back 40:45 hey we'll get this the food Cy net and 40:48 word net so let's go food wordnet subset 40:55 downloader 40:57 congrats on 100K thank you so 41:02 much uh Trey review that's what we're 41:04 doing we're getting a data set of only 41:06 non food food 41:15 items uh an M1 with 16 g g gig of RAM is 41:20 uh perfect to get 41:25 started 41:27 full Fast multi-threaded download of 41:29 images from 41:43 imet okay here we 41:55 go 42:01 so let's install nltk hey 42:05 nltk 42:24 wordnet okay 42:30 let's do 42:34 this seeing 8:42 a 8:43 a.m. freaked you 42:38 out yeah it's nice and early 42:40 here um let's let's try this out let's 42:44 install nltk 42:50 hey so what's the 42:55 recommended installing 43:20 nltk so we need to install 43:25 nltk 43:33 nice and quick and we're going to 43:40 download this is a very nice 43:52 website okay so let's let's just save 43:54 some steps 44:00 log downloaded imag net class list from 44:08 GitHub um downloaded and 44:11 installed 44:14 nltk want to get um 44:18 nonfood 44:21 classes from 44:23 imet installed nltk to get um to try and 44:29 get a list of words associated with 44:35 food this is our log 44:39 clear LS we 44:43 have where's the image net 44:47 classes I'm just going to put this here 44:50 this is so someone can replicate what 44:51 we've done I'm just going to I want the 44:53 code to 44:54 be um it's all going to be open source 44:57 so I want someone to be able to 44:58 replicate what we've done so let's let's 45:00 now go back and figure out what this 45:09 does so this is going to 45:14 be we'll make it 45:17 here food names from NL 45:24 2K 45:28 hello Manus how are 45:31 you uh vamy thought I was in California 45:33 no I'm in Brisbane Australia my 45:36 friend land down under so from what I 45:40 understand do I not have 45:45 nltk no module named 45:52 nltk we're going to have to do some 45:54 environment 45:59 refreshing 46:09 nltk hey why didn't that install in 46:24 ltk 46:27 requirement already satisfied in sight 46:30 packages um 46:32 H I want 46:36 to cond how to install in current M with 46:42 Pip it should 46:51 install yes okay this is what I 46:54 want 47:02 cond install pip that's what I 47:18 need there we go okay clear now we want 47:22 pip install and 47:24 ltk requirement already satisfied in 47:27 site packages okay pip 47:30 install 47:35 um cond MV list we want it in the 47:39 current 47:54 EnV 48:08 wonder if I can just install it from 48:11 here pip install and 48:14 ltk requirement already satisfied I 48:17 don't want it in there oh there we 48:22 go import 48:24 nltk 48:27 no modle named nltk 48:38 Classic oh I had to restart the 48:54 konel 48:58 machine 49:01 learning insist on neural network so 49:03 Neal network is just a function 49:05 estimator machine learning in a nutshell 49:07 is you use machine learning to identify 49:10 patterns and data or turn data into 49:13 numbers whatever data is could be words 49:14 could be images could be videos could be 49:16 text could be anything and then you use 49:19 a machine learning algorithm to turn 49:20 that data into numbers or a 49:22 pre-processing algorithm to turn that 49:24 data into some numer representation then 49:27 a uh machine learning algorithm such as 49:28 a neural network or whatever will go 49:30 through those numerical representations 49:32 and find the patterns in there what the 49:34 patterns are you define and what the 49:36 patterns are that the machine learning 49:38 model actually figures out it learns 49:40 those 49:42 patterns okay so let's see oh look at 49:45 this team there we go okay we've got a 49:48 list of classes this is 49:49 wonderful um Let's Go nltk 49:53 Corpus what's wrong with this yes it 49:56 worked turn the warnings 50:00 off so look at this we've got a list of 50:02 foods this is wonderful how long is this 50:07 list I need some I need some space to 50:10 code here so wordnet dopy discarded 50:13 redundant search 50:18 for that's all 50:21 right food 50:24 list 50:28 oh look at 50:30 this now we've got a list of food 50:35 items 1,600 food items let's have a look 50:38 through these so now we've got a list of 50:41 food that we can we want to filter if 50:45 the image net class has any of these in 50:48 it look at this 50:51 Tabasco chips mashed potato cut of pork 50:55 Del delicious 50:56 takeaway pet chocolate bar gray mullet 51:00 gamon yogurt brat okay this is wonderful 51:04 we have a list of foods now so what 51:05 we're going to do 51:09 is got a list of 51:11 foods um 51:15 now we have a list of 51:18 foods now to filter the image net data 51:22 set classes and remove any class that 51:27 contains a 51:29 food so we can download images of non 51:34 food from imet we're building a data set 51:38 from scratch here people that way you 51:40 can replicate this whole thing from 51:42 machine learning model to data set 51:43 building to everything so let's let's 51:46 have a little bit more of a look here in 51:48 our data exploration notebook we have a 51:51 food list let's just view the first 10 51:53 so we have 10 and let's check if 51:56 banana in food list true there we go 52:01 this a banana is our our sanity check 52:05 check for banana in food 52:09 list so now we want to 52:12 filter the imag net data set so imag net 52:17 data set I believe doesn't have okay we 52:20 need to strip let's strip the 52:24 strings 52:27 from here we'll lower them all so 52:29 they're all lowered and we'll get rid of 52:32 the hyphens and any 52:35 punctuation I think there's only hyphens 52:38 and underscores and the same thing we'll 52:39 do with this we'll get rid of the 52:40 underscores and lower 52:43 so um 52:46 filter non filter food items out 52:52 of image net list 53:02 can I show time to time your RAM usage 53:04 with activity 53:06 monitor yes um this is not on my M1 this 53:10 is this is on my MacBook 16 53:14 in so 53:17 memory I have 64 gigs of memory on here 53:21 but remember I'm streaming and doing a 53:22 whole bunch of things and it's Al going 53:25 to use more memory if you have it 53:30 so yeah I have like Dropbox uses a lot 53:35 and window server and 53:37 whatever but that's all right filter 53:39 Foods out of here uh thank you for the 53:42 comment on the mo sioban I appreciate 53:45 that so filter food items out of imag 53:48 net 53:49 list we want to have um four 53:54 food 53:57 for food item in food 54:01 list um string no food item lower lower 54:07 all the 54:11 text no 54:14 print okay and we want lower and we want 54:21 to 54:24 strip 54:28 Japanese Plum 54:39 hey um no what's the 54:44 method what's the method to break a 54:46 string on a certain thing who knows 54:54 this 54:56 uh if you're not really sure where to 54:57 start machine learning you can go to my 55:00 blog and go search for this Daniel Burke 55:04 five steps to 55:07 ml right there's a lot of lot of 55:10 out there on machine learning or 55:11 whatever this will this is pretty 55:16 straightforward and split that's it 55:18 thank you and otherwise look 55:21 up look up the machine learning road map 55:27 thank you 55:28 everyone for helping me with split 55:31 machine learning road map look at all 55:33 this look at these ads that are above me 55:36 above there above there above there 55:38 above there but look my GitHub machine 55:41 learning road 55:42 map number 55:46 one got ads all these ads are above my 55:49 post my post is machine learning road 55:52 map number one on G on Google 55:55 so thank you everyone let's use the 55:57 split 56:01 command the perfectionist am I getting 56:03 the new Macbook Pro well I've got some 56:05 on order I'm going to test some 56:08 out split okay there we go and we 56:16 want so let's 56:18 [Music] 56:21 remove remove punctuation and lower 56:27 we 56:28 [Music] 56:29 want food list 56:36 equals food item 56:39 lower do 56:49 split for food item in food 56:53 list 57:00 okay and now we need to create a list 57:04 of item 57:08 for 57:14 um food 57:16 item 57:18 for subl list 57:23 in 57:27 does this 57:31 work 57:36 food 57:38 nope for sub list 57:46 in no food for food item that's what 57:49 we're got to 57:50 do a list of 57:53 lists 58:04 food for food item I always get this 58:06 mixed up python create a list from list 58:11 of 58:14 lists it's a subl 58:17 list that item for subl list in 58:23 t 58:27 flatlist 58:31 equals food item 58:36 for food 58:52 list no no no no I got an 59:00 idea so we got food list 59:04 there hey what happened 59:11 there so now let's flatten it 59:15 out 59:23 flat 59:27 so flat food list equals food for food 59:34 list 59:36 in um food 59:40 list 59:53 in food for food subl list in food 1:00:01 list 1:00:04 in 1:00:11 for did we make it we made it okay there 1:00:14 we go so we've got flat food list we've 1:00:15 got a list of 1:00:20 foods now let's do the same for our 1:00:22 image net I'll make this all nice and 1:00:26 clean before 1:00:27 um it's uploaded but we got a flat food 1:00:30 list but we only really want to see the 1:00:32 first 10 don't 1:00:34 we and every time we rerun these cells 1:00:37 it's going to override variables so that 1:00:39 sucks but that's 1:00:49 okay I really love you says I'm a Noob 1:00:52 and I hate guys who work in machine 1:00:54 learning 1:00:55 oh that's unfortunate man you're in the 1:00:58 wrong 1:01:01 stream so we have a flat food list now 1:01:04 let's um we want imag net 1:01:09 classes so for KV in imag net 1:01:14 classes um 1:01:20 if if V Dot 1:01:27 we need to 1:01:33 split v. lower 1:01:37 in flat food 1:01:40 list print K what's this going to 1:01:46 do uh we need 1:01:51 items hey there we 1:01:53 go 1:01:58 fv. 1:02:08 lower so let's 1:02:11 go 1:02:12 check image net classes for 1:02:16 Foods 1:02:18 so this 1:02:20 is our list of imag net 1:02:23 classes 1:02:24 and we want print 1:02:27 KV what does this look like hen Quail 1:02:29 Partridge Goose snail hair sorl 1:02:33 honeycomb pin wheel plate pretzel 1:02:36 broccoli cauliflower Cardon mushroom B 1:02:38 strawberry orange banana so the banana 1:02:41 sanity check is there that's beautiful 1:02:44 okay let's now but V is 1:02:49 also uh multi level 1:02:52 strings so 1:02:54 we actually 1:02:58 want uh print v. 1:03:01 lower and we want 1:03:05 split on 1:03:11 comma 1:03:14 yes and then we want the items from a 1:03:21 list how do we retrieve the item from a 1:03:25 list or maybe we can do a straight up 1:03:26 comparison will that 1:03:37 work no okay I need to go to the 1:03:40 bathroom I'll be 1:03:42 back um Dan reflecting on your time in 1:03:45 ml what's the biggest highlight and 1:03:47 lowest point so far I'll be back in a 1:03:49 second and we'll answer that question 1:03:51 and move net for BJJ oh that's that's an 1:03:54 interesting one one 1:04:23 sec 1:04:53 for 1:05:15 okay welcome 1:05:17 back uh Muhammad says I've always 1:05:20 wondered how to make do online using ml 1:05:22 what's the easiest path there is no such 1:05:25 thing as the easiest path well it's like 1:05:26 every path is easy if you choose your 1:05:28 own 1:05:30 so I could sit here and talk at length 1:05:33 for how to do it but my only way is to 1:05:37 actually just do it instead of thinking 1:05:38 about it and talking about it out loud 1:05:40 this is like we're literally doing 1:05:42 machine learning online right now so 1:05:45 that's that's how I do it is I just 1:05:47 think of something to that I'd like to 1:05:48 build and I build that 1:05:51 thing um but sioban said 1:05:54 four I really easily get overwhelmed 1:05:57 when I try to do ml project any advice 1:05:59 or tip just keep going till you get 1:06:02 better um who knows I'm doing a live ml 1:06:05 project right now I might get 1:06:06 overwhelmed so we'll see um sioban 1:06:11 reflecting on your time in ml what's 1:06:13 your biggest highlight and lowest point 1:06:14 so far uh highlight is like right now 1:06:17 look at this how cool is this we can we 1:06:19 can make machine learning apps to 100 1:06:22 people around the world and and share 1:06:25 the code make it open source what's not 1:06:27 to love about 1:06:35 that is machine learning course by 1:06:37 Andrew on still relevant in 2021 yes 1:06:40 most of the courses online these days 1:06:41 are are pretty good right so like that's 1:06:44 the beauty of online it like filters out 1:06:45 the ones that are and the ones that 1:06:46 are good pretty 1:06:49 easily so a lot of people are doing a 1:06:52 course and they they rate it pretty 1:06:53 highly 1:06:54 I'm not saying anyone's coures are rated 1:06:56 pretty highly but someone might be um 1:07:00 you know pretty quickly whether it's 1:07:01 good or not so that's the beauty of code 1:07:05 as well code either works or it doesn't 1:07:07 and if it's math it either works or it 1:07:09 doesn't so you can pretty quickly find 1:07:13 out if a course doesn't work if the code 1:07:15 doesn't 1:07:16 work so we're going to go back to coding 1:07:19 I'll get more Q&A later but we're on a 1:07:21 bit of a roll here so I really want to 1:07:22 start downloading a data set cuz I don't 1:07:24 know how long the download is going to 1:07:26 take but for building projects just do 1:07:29 it you're far smarter doing than you are 1:07:30 thinking um for doing machine learning 1:07:33 online literally just don't you're 1:07:35 overthinking it just start doing it add 1:07:38 code to your GitHub write stuff on your 1:07:40 blog or medium or whatever that's how 1:07:42 you do it so we need a way to compare 1:07:46 the strings 1:07:47 here so what's the best way to extract 1:07:50 items from a list in Python get items 1:07:53 from a list list so I would like to 1:07:57 compare 1:07:59 if this is what I want to compare you 1:08:02 all can help me with this this is what 1:08:03 we're going to do this is a Community 1:08:05 Driven project we have this string I 1:08:08 want to compare that 1:08:10 to the flat food list so flat food list 1:08:15 looks like this I want to know if this 1:08:18 item is 1:08:22 in that's what we 1:08:26 do so we could get the imag 1:08:30 net uh 1:08:32 items and then we've got 1:08:37 the I want to 1:08:41 unpack how should we do this python 1:08:44 unpack at 1:08:47 list string 1:08:49 one if and doubt coded out string one 1:08:53 string to 1:09:00 for uh I I will save I will save 1:09:05 the the stream will be on my YouTube 1:09:07 channel yes string one string to so we 1:09:10 want we're doing some basic string 1:09:12 manipulation here people remember 1:09:14 Abraham loss function said if you're 1:09:17 building a machine learning project 1:09:18 spend the first six hours preparing the 1:09:21 data so we want string one string two in 1:09:25 string 1:09:26 one so that's not going to work right 1:09:31 so not list we need to get we want to 1:09:35 extract those 1:09:38 strings so maybe we break this 1:09:43 down do understand what I'm trying to 1:09:46 do 1:09:49 so let's write this in pseudo 1:09:51 code thank you hatan I appreciate 1:09:56 that I'm glad you like my shirt so look 1:10:01 at image net 1:10:04 classes and then we want to get value 1:10:08 from imag net 1:10:11 classes 1:10:12 string and then we want 1:10:15 to see if value appears in flat food 1:10:22 list 1:10:25 intersect intersect could be a good one 1:10:28 as 1:10:34 well 1:10:36 oh can we see weights and biases later 1:10:39 too yeah let's do that we'll get the 1:10:41 whole shebang we'll use weights and 1:10:43 biases to track our 1:10:45 experiments good 1:10:51 idea so 1:10:55 let's try that hey that's a good idea 1:10:57 set I want to also strip will this work 1:11:01 if I 1:11:02 go get rid of spaces 1:11:08 strip list has 1:11:19 no I need to remove the strip okay 1:11:21 that's what we're going to do we're 1:11:23 going to create a list 1:11:28 of um let's 1:11:34 go 1:11:43 print no 1:11:46 space 1:11:48 for 1:11:52 space word 1:11:55 in um V do 1:12:22 lower 1:12:31 okay there we go we got a way to do that 1:12:33 now we can turn that into a 1:12:38 set 1:12:40 um let's 1:12:49 go a list comparison that's what we 1:12:52 could do 1:12:54 maybe we do 1:13:01 that 1:13:16 intersect let's try it up 1:13:18 here 1:13:21 set someone said intersect and they are 1:13:24 amazing I'm pretty sure you're going to 1:13:25 be right 1:13:30 intersection 1:13:34 nothing uh this needs to be a 1:13:40 set 1:13:52 huh 1:13:54 then iterate over the 1:14:04 set am I not doing this 1:14:22 right python set 1:14:33 intersection oh do I need to assign it 1:14:36 to a 1:14:52 variable 1:14:56 what's happening here just join not not 1:14:59 entirely sure what you want to 1:15:02 do do I need to turn this into 1:15:08 a hey there we go okay my set set Co 1:15:12 I've got the itchiest nose on 1:15:15 earth 1:15:17 oh Maro guys what's going 1:15:20 on um there we go we got an intersection 1:15:23 uh you need to turn things into list 1:15:25 first so now what we could do is a set 1:15:28 so let's 1:15:30 go 1:15:33 um print we're going to 1:15:36 get 1:15:38 um imag net class 1:15:42 list 1:15:44 equals 1:15:50 this and we'll go set 1:15:54 enget class 1:15:57 set someone said whoever said Thank you 1:16:00 big shout out to whoever said us a set 1:16:02 didn't even think about 1:16:04 that see that's the power of pythons 1:16:06 built-in type someone has thought about 1:16:08 this before there we go okay we got a 1:16:11 set now 1:16:14 let's 1:16:16 go we've got a flat food list and we're 1:16:20 going 1:16:22 to 1:16:24 go image net class set 1:16:28 dot 1:16:32 intersect in flat food 1:16:36 list well done team look at 1:16:41 that okay let's can this printing out 1:16:46 what do we 1:16:47 get look at that that's what's up that's 1:16:51 what's up okay now we need 1:16:56 um this is for Foods 1:17:00 so image net Food classes we want to 1:17:04 filter these 1:17:06 out equals uh an empty dictionary and 1:17:10 now let's create this imag net Food 1:17:15 classes equals or we want 1:17:20 key uh k equals 1:17:24 V and now let's have a 1:17:27 look at imag net 1:17:34 food food 1:17:37 classes there we go team we're on fish 1:17:41 on Fish on so now we've got our image 1:17:44 net classes that are up here this is the 1:17:46 full list of 1:17:49 classes and this is all the ones that 1:17:51 are related to food clip well not really 1:17:56 actually how many we 1:17:58 got 1:18:05 length we have 49 classes that are from 1:18:08 imet 1:18:13 with but I feel like we 1:18:16 can get rid of some of these the manual 1:18:20 filter that's what we might have to do 1:18:22 now 1:18:27 so I wonder what the best way is to 1:18:29 filter a 1:18:32 dictionary let's have a look at 1:18:41 this we're going to use our best 1:18:43 judgment here team 1:18:46 to what classes shouldn't be 1:18:51 there 1:18:57 hen we could use hen there rough rough 1:19:00 grass what is roughed 1:19:06 grass oh 1:19:08 bird well that is that food or 1:19:11 not we need to discuss this on the 1:19:14 stream is this a is a rough grass is 1:19:18 that food or not or is that a bird 1:19:21 because technically that is food 1:19:24 but let's say this 1:19:26 is are we we classifying this as food or 1:19:29 not 1:19:31 food if you took a photo of 1:19:40 that what do we 1:19:50 reckon so let's remove 1:19:55 non food 1:19:57 classes manual 1:20:01 sort it's food we can eat it it's a food 1:20:04 okay depends on the culture it's a food 1:20:06 we're classifying as it a food 1:20:10 so going 1:20:13 through image net Food classes 1:20:20 manually equals now we're going to 1:20:22 create a list here Quail Partridge Goose 1:20:25 snail spinny lobster crayfish hair 1:20:29 sorl almost reaching 77 1:20:35 minutes can you hear me breathing too 1:20:37 loud should I turn the mic down here 1:20:40 it's a product of food okay it's going 1:20:42 to be food chime Bell 1:20:45 gong well that's not a food is it so 1:20:51 $494 1:20:54 Birds equals food yes you're 1:20:56 right salmon blue Jack yes puffer puffer 1:21:00 fish blowfish bow tie a bow tie is not a 1:21:04 food so now we're going to have to get a 1:21:06 little manual that's 1:21:08 okay nltk has done very well for us so 1:21:11 far chime belt frying pan fry pan 1:21:14 Skillet now a frying pan on its own is 1:21:17 not food so that's not food honeycomb 1:21:21 hook claw 1:21:23 H 1:21:26 lighter 1:21:31 626 lighter you're right pin wheel pin 1:21:35 wheel is not 1:21:36 food pot flower pot no 738 refrigerator 1:21:42 ice box well it has food but it's not 1:21:44 actually a food plate that's an 1:21:46 interesting 1:21:48 one no plate is not a food Bagel PR hot 1:21:52 dogs there's hot 1:21:54 dogs what's a Cardon who knows what a 1:21:56 Cardon 1:22:00 is Cardon oh is that a 1:22:04 food sunflower 1:22:07 family including the arch 1:22:11 choke what the heck do I do with a 1:22:17 Cardon 1:22:19 edible a celery stalk 1:22:24 okay popular ingredient in Italian 1:22:26 dishes so it's eatable eatable 1:22:33 edible um these are all foods Cliff 1:22:37 Cliff drop drop off I don't know what 1:22:41 that class is to do with but let's 1:22:42 filter it out if in doubt filter it out 1:22:45 these are the classes we don't want uh 1:22:48 Promontory Headland 1:22:50 no let's go 976 six and I think that's 1:22:53 going to be it so 1:22:59 now you're right pigs are food but dogs 1:23:02 are 1:23:12 not 1:23:14 oh look at that team you know what time 1:23:16 it is well maybe you don't because 1:23:18 you're joining in but you know what that 1:23:20 is that's 77 minutes 1:23:23 we now have some surprises so let me 1:23:25 just leave a note here of where we're up 1:23:27 to um so that's non- food classes manual 1:23:31 sort we have tea as well thank 1:23:38 you 1:23:40 yeah have the fabulous Georgia bringing 1:23:42 me tea thank you so 1:23:44 much 1:23:46 um we have some surprises to give away 1:23:48 but I'm going to leave a little note 1:23:49 here thank you thank you we're going to 1:23:52 leave a little note um next we've got 1:23:55 non- food classes 1:23:58 is 1:24:00 remove non-f food 1:24:02 classes manual sort from image net Food 1:24:07 classes and then we want to 1:24:10 download um 1:24:15 imet no then we want 1:24:18 to filter 1:24:21 nonfood 1:24:24 classes from 1:24:27 imet food classes imet 1:24:31 classes and then 1:24:34 download non- food 1:24:37 classes from imet downloader all right 1:24:42 that's what we're doing next but now we 1:24:43 have some surprises so thank you all so 1:24:46 much for joining in I need to go to my 1:24:49 website oh not Affinity photo we quick 1:24:53 that 1:24:55 cancel um I have a blog post that I'm 1:24:58 about to 1:25:00 publish so if we go to 1:25:03 Safari 1:25:06 site let me just publish this so then 1:25:09 you can all have the 1:25:12 link we have a 100K subscribers live 1:25:15 live stream celebration post which is 1:25:18 now public everyone should be able to go 1:25:20 to this 1:25:23 if you go to Mr 1:25:25 www.mr dk.com 1:25:27 100ks Subs we have 1:25:31 this so I'm going to link this into the 1:25:33 chat this is my way of saying thank you 1:25:35 to you all so um we have 100K 1:25:39 subscribers live stream celebration you 1:25:42 found the page of magic to celebrate 1:25:44 100,000 subscribers on YouTube I'm doing 1:25:46 a 10hour coding live stream you might 1:25:48 even be watching right now thank you so 1:25:49 much for tuning in there are some 1:25:51 goodies to go away so we have 50% off 1:25:54 the first month of access to all zero to 1:25:57 Mastery Academy there's 100 codes there 1:25:59 the first 100 people to redeem these 1:26:01 codes will get 50% off the first month 1:26:04 beware for all of these if you do not 1:26:06 cancel before the month ends you will be 1:26:08 charge full price so there's link number 1:26:10 one you also get the first 100 people to 1:26:13 sign up to 1:26:14 corsa's uh Google data analytics 1:26:17 professional certificate the month off 1:26:18 for free is this is this the right link 1:26:21 look at this special offer for Daniel 1:26:24 Burke fans first month free okay if you 1:26:27 sign up there's a 100 there's 100 passes 1:26:29 to this the link is at 1:26:32 www.md.com 100ks Subs we have 1:26:37 this and then we have 52% off my book 1:26:41 Charlie walks if you use the 1:26:44 code um 1:26:47 100K so all of these links we have the 1:26:50 first 100 for each so 100 codes here for 1:26:54 ztm we have 100 free passes for the 1:26:57 first month of Google's data analytics 1:26:59 professional certificate which has been 1:27:01 taken by 400,000 people around the world 1:27:04 if you want to learn data analytics this 1:27:06 is one of the best courses and you get 1:27:08 the first month for free so you could do 1:27:09 the whole thing for free by Google and 1:27:13 52% off my book so make sure you go 1:27:15 check that out it's for the first 100 1:27:17 people okay once the codes are out 1:27:20 they're out so check out that page if 1:27:22 anyone wants it you're in and I'm going 1:27:25 to put this in the description of the 1:27:27 stream as 1:27:28 well that way 1:27:31 edit and 1:27:34 then get the free stuff slash 1:27:41 surprises here so the Link's in the 1:27:44 description and the link is in the chat 1:27:46 thank you all so much for joining in if 1:27:48 you have any problems let me 1:27:49 know but there we go first month free 1:27:53 corsa's Google Dat otics professional 1:27:55 50% off the first month of all zero to 1:27:57 Mastery Academy courses and 52% off my 1:28:00 book Charlie walks so go and enjoy that 1:28:04 that's the 77 minute 1:28:06 surprise and of course it's over an hour 1:28:09 in so what we have to do 10 push-ups 1:28:11 what was the rules we're going to make 1:28:14 this fun we're getting back into code in 1:28:15 a second but we have 10 push-ups 10 1:28:17 squats 10 kicks 10 punches every hour 1:28:20 who wants to join in push-ups 1:28:34 first now squats I just realized you 1:28:37 can't really see me why 1:28:40 52% because if you add 5 + 2 it equals 1:28:46 7 nine 10 I don't know if that was 10 1:28:50 but we'll call it 10 now 10 1:28:53 kicks five each leg we need to keep 1:28:56 moving 1:28:58 otherwise we'll be sitting down for far 1:29:00 too long 1:29:01 today 10 kicks two three 1:29:07 4 five now 10 punches one two three four 1:29:11 five six seven eight n 10 one for good 1:29:14 luck okay now another hour 1:29:19 timer oh I got my breath up that's good 1:29:23 another hour 1:29:24 timer go and check out those 1:29:28 links 1:29:30 um 50% off 1:29:34 ztm first month free on Google 1:29:36 professional data analytics and my book 1:29:39 is 52% off valid for the first 100 1:29:42 people only and because you're here live 1:29:45 you get first 1:29:47 pick okay back to the code we have in 1:29:49 another hour we're going to do more 1:29:53 moving 1:29:55 so next we wrote ourselves some notes 1:29:58 we're still building the data set now 1:30:01 this is important back to Edward lost 1:30:04 function Abraham lost function 1:30:06 saying we haven't built any machine 1:30:08 learning code here yet because we're 1:30:10 building a unique project and that like 1:30:14 the the way we need to build a model is 1:30:17 we can't build a model without data so 1:30:19 this is what we're working on we're 1:30:21 still collecting a data 1:30:24 set so here food brakes will come at 1:30:28 some 1:30:31 point uh if so hatan is saying asking 1:30:35 for bank account so you'll still need uh 1:30:40 on both websites zero to Mastery and 1:30:42 corsera you will need to enter your 1:30:44 credit card 1:30:47 um again read the t's and C's that I've 1:30:50 put on here if you don't cancel your 1:30:52 subscription by the end of the first 1:30:53 month you will be charged for the full 1:30:55 price for the second month that's the 1:30:57 way these platforms work I don't manage 1:30:59 the the payment system so keep in mind 1:31:02 if you want the free month cancel before 1:31:05 it re refreshes so you can have 50% off 1:31:08 the first month or you can have the 1:31:10 first month free you do need to enter a 1:31:11 credit card but if you just want those 1:31:13 first months cancel before it renews the 1:31:17 second month so that's your warning 1:31:20 let's get back into code 1:31:25 um as for the book you just buy you pay 1:31:27 the price and you you own the book like 1:31:29 the book's yours after 1:31:32 that I'm going to refresh this 1:31:36 te that the lovely and beautiful Georgia 1:31:39 bought me thank 1:31:43 you 1:31:45 okay so we need to now we have image 1:31:50 net classes 1:31:54 imag net classes there we go but we want 1:31:57 to 1:31:58 remove we want to remove all of 1:32:02 the non food classes so imet food 1:32:06 classes let's now 1:32:09 update 1:32:11 um 1:32:12 image 1:32:16 net 1:32:19 manual filtered 1:32:24 food 1:32:27 classes we'll create another variable 1:32:30 here we'll turn it into a dictionary so 1:32:33 we've got a list of keys that shouldn't 1:32:35 be in our imet food classes so let's 1:32:38 have a look at this image net Food 1:32:40 classes we want just the first five so 1:32:43 we can see what's going on there slice 1:32:45 unhashable type what's going on here oh 1:32:49 it's a dictionary so let's turn it into 1:32:51 a list 1:32:53 and we're going to turn this 1:32:55 into 1:32:59 that first 1:33:02 five how do you view the first five 1:33:04 items of a 1:33:05 dictionary that's all right we can we 1:33:07 can work with this we'll work with 1:33:10 this so now let's 1:33:18 um image net Food classes and so 1:33:22 so 1:33:24 for 1:33:26 KV in imet food classes do items 1:33:33 if IFK 1:33:36 in we have keys of non food classes 1:33:41 manual sort I'm going to get rid of that 1:33:44 now so we're on here team in there FK in 1:33:50 here um no IFK not 1:33:54 in that's what we want don't want keys 1:34:00 that 1:34:04 are aren't food from the manual 1:34:12 sort uh what did I miss you were taking 1:34:15 mock test 1:34:17 um you want a Sheik we got giveaway 1:34:22 here so this is the 1:34:24 giveaways 1:34:26 www.md.com 100ks Subs there we 1:34:32 go uh thank you Georgio dictionary is 1:34:35 not ordered you're so right we 1:34:40 want here image net manual filtered food 1:34:45 classes k equal 1:34:49 V and now we we 1:34:52 have we're going to put some mark down 1:34:55 here remove the manually 1:35:00 filed food classes 1:35:04 from imet food 1:35:09 classes some classes 1:35:14 in imag net Food 1:35:18 classes um weren't actually 1:35:23 food so 1:35:25 now we're going to manually filter 1:35:31 them beautiful so let's have a look at 1:35:34 what our new dictionary is 1:35:38 wonderful and we've manually filtered 1:35:40 the food classes now so this is the imag 1:35:43 net Food 1:35:45 classes 1:35:49 length wonderful we have 39 manual 1:35:52 filtered 1:35:55 classes te is 1:36:00 deliciosa uh you can turn the key or 1:36:02 values into a list and splice 1:36:05 it so now what we have to do is we have 1:36:08 image net 1:36:11 classes um get list of food and nonfood 1:36:17 classes 1:36:18 from 1:36:20 imet 1:36:27 so now what we want to do is compare 1:36:30 imag net manual food classes 1:36:33 from we still have imag net classes this 1:36:37 is the overall list so now we want 1:36:41 to go 1:36:46 hey imag net nonfood classes 1:36:52 equals a 1:36:54 dictionary and so for every key that's 1:36:57 not in here let's get a list of those 1:37:00 keys um 1:37:03 get 1:37:05 food class 1:37:08 Keys now this is very hacky right but 1:37:11 that's it's it's working we can refine 1:37:13 this later if we wanted to do 1:37:16 Keys um and we 1:37:19 want uh no we want a list of 1:37:26 keys food 1:37:28 class Keys equals that let's have a look 1:37:31 food class Keys we'll get the 1:37:35 first first 10 okay wonderful so now we 1:37:39 want imet non food classes is going to 1:37:42 be what is the length of 1:37:46 our how many classes do we 1:37:49 have equals 1:37:53 this is some simple 1:37:56 data data filtering here uh hello that's 1:38:00 not 1:38:05 it let internet classes we have a th 1:38:08 yeah so now we want to remove remove the 1:38:10 ones that are non food so that and we go 1:38:14 four KV in imet 1:38:18 classes do items 1:38:22 if K not in 1:38:26 um food class 1:38:33 Keys um image net so we got some just 1:38:36 just basic dictionary and manipulation 1:38:39 here non food classes could this be 1:38:41 optimized yes it could that might be an 1:38:44 extension for one of you watching at 1:38:47 home k equals V now we have a we have a 1:38:52 dictionary now of nonfood 1:38:58 classes look at that team okay and now 1:39:02 let's get how many are 1:39:06 there 961 that makes complete sense 1:39:09 because we have what we have 39 food 1:39:13 classes so we've removed those from the 1:39:15 list so now we have a list of image net 1:39:17 non-f Food classes that we can download 1:39:19 to create what are we working on 1:39:21 creating we're working on creating 1:39:23 images of not 1:39:25 food um and food images of food can be 1:39:29 and uh 1:39:32 from 1:39:35 imet photos that are 1:39:38 food so now we have two dictionaries one 1:39:41 is imag net manual filtered food classes 1:39:45 and one is image net non food classes so 1:39:49 how about we filter the strings that are 1:39:51 in here as well image net non food 1:39:55 classes of course there's going to be 1:39:57 some overlap here there's probably going 1:39:58 to be this is not a perfect data set for 1:40:00 sure we could probably fix that out 1:40:03 chick D I don't know what a chick D 1:40:05 is what is a chick who knows what's in 1:40:09 IM image 1:40:11 net is that food that's probably food 1:40:14 but we're just going to leave that in 1:40:15 there for now we've done enough 1:40:17 filtering what te is 1:40:19 it 1:40:23 we 1:40:27 have this is poer tea so po tea is a 1:40:31 Chinese tea a Chinese black tea and it's 1:40:34 one of my favorites the Chinese really 1:40:36 figured this out po 1:40:39 te that's what we're 1:40:41 having 1:40:44 images it comes in cakes like this 1:40:46 sometimes but this is yeah this is what 1:40:48 I'm drinking po tea with some delicious 1:40:52 milk and sometimes a little bit of honey 1:40:54 in there you 1:40:59 know well let's go back we're getting 1:41:01 distracted from from coding here let's 1:41:02 let's lower these strings and remove 1:41:07 any uh or do we want to lower them let's 1:41:10 just leave that at that so now let's see 1:41:15 how our imag net class downloader 1:41:19 works 1:41:26 so let's write in notion 1:41:31 log got uh list of food classes and nonf 1:41:37 food classes 1:41:40 from 1:41:42 imet now 1:41:44 to figure out how to 1:41:48 download nonfood 1:41:51 and food images from 1:41:58 imet random 1:42:01 samples and can also 1:42:05 create a food data 1:42:09 set food image data 1:42:12 set from 1:42:15 food1 random samples of images from 1:42:19 different classes how many images of 1:42:21 each do you think we should have I 1:42:23 reckon 10,000 of each is a good idea um 1:42:26 someone is asking uh oh hello greetings 1:42:30 from Europe you have to sleep soon 1:42:32 that's all right the stream will be on 1:42:33 YouTube later I'm going to be here for a 1:42:35 few hours uh Michael really love this 1:42:38 stream keep at it you're my motivation 1:42:39 while I'm coding as well thank you so 1:42:41 much Michael I appreciate that I I've 1:42:44 been thinking about this for a while 1:42:45 actually should I I've been streaming on 1:42:47 Twitch but should I just move it to this 1:42:48 Channel and then just keep it all in one 1:42:51 place and then I just have a live stream 1:42:52 playlist where all of my streams are in 1:42:55 one place on YouTube will that clog up 1:42:57 the 1:42:59 channel or is it better just to have 1:43:02 everything like separated on Twitch and 1:43:04 whatever so let's get rid of this get 1:43:06 rid of this get rid of this get rid of 1:43:08 this get rid of this get rid of 1:43:13 this data downloader okay here's what we 1:43:16 want the following will randomly select 1:43:18 aund of imag net classes with at least 1:43:21 200 images in them and start 1:43:24 downloading ah so the class list 1:43:27 here we need it 1:43:31 in where I list every class that appear 1:43:34 in imag net with the number of total 1:43:37 URLs this 1:43:39 CSV maybe we should have filtered out 1:43:42 that on that but that's all right we 1:43:43 should be able to map 1:43:45 things 1:43:48 okay class ID class name how many is 1:43:53 this okay we could have filtered things 1:43:55 off this but that's all 1:43:58 right that's probably what we should 1:44:00 have 1:44:02 done we can adjust 1:44:09 it okay this is 1:44:14 beautiful I like twitch and would prefer 1:44:19 separated 1:44:28 yeah twitch is I think twitch is still 1:44:29 the better way to go twitch and then 1:44:31 upload it to the VOD I mean to the other 1:44:33 channel so okay this is probably a 1:44:35 better list that we can filter 1:44:38 on let's come 1:44:44 back this is a long list but that's all 1:44:47 right food well food is a class in here 1:44:49 we obviously want want to filter that 1:44:54 out we need the 1:44:56 ID I'll be back in a second I need to 1:44:58 pee again uh is it enough for your 1:45:01 course for machine learning and data 1:45:02 science or should take you can take 1:45:04 whatever you want follow your 1:45:06 curiosity my machine learning and data 1:45:08 science course do you need to take that 1:45:10 of course not like this is this is the 1:45:12 thing there's a lot of resources out 1:45:13 there but it's usually best to just pick 1:45:15 a couple and practice on those so uh if 1:45:19 you want to do Google data analytics do 1:45:20 that if you want to do my course do that 1:45:23 try it out that's the beauty of like 1:45:24 having a month free you can see if you 1:45:26 like it if you don't cancel 1:45:49 it 1:46:20 we're going 1:46:33 down uh YouTube is a source of income 1:46:36 but like I don't rely on it 1:46:41 so maybe we should filter on these cuz 1:46:44 these have 1:46:45 the these have the keys but that's all 1:46:49 right so 1:47:00 let's I should have really just read the 1:47:02 docs on this but why read the docs when 1:47:05 you can spend multiple hours just 1:47:07 figuring stuff 1:47:12 out words.txt 1:47:15 too 1:47:19 big classes in image net okay let's 1:47:21 filter these out let's get this CSV 1:47:25 file 1:47:37 raw can we read this straight in with 1:47:40 pandas it's all right because we've got 1:47:42 we've got this 1:47:44 uh we need we need the codes I didn't 1:47:47 realize that that we needed the codes 1:47:48 for downloading 1:47:51 see how this takes in a class list of 1:47:53 different 1:48:07 codes let's read the 1:48:18 script okay 1:48:21 so it takes in a class 1:48:29 list thank you ad I I appreciate 1:48:34 it uh hatan if you want to do the Google 1:48:37 data analytics course you can do it but 1:48:39 if you've already done mine you probably 1:48:40 don't need 1:48:47 it any tips on starting a YouTube 1:48:50 YouTube channel I just I make the videos 1:48:53 that I I like to watch need imag net 1:48:59 Keys that's my only advice for starting 1:49:02 a YouTube channel need imag net 1:49:06 Keys turns out the download 1:49:11 script downloads 1:49:14 using imet class 1:49:19 keys for 1:49:31 example so we need 1:49:33 to 1:49:36 map class keys to the classes that we 1:49:44 want let's download this 1:49:49 CSV 1:49:52 so we want let's put it in 1:50:09 here import pandas as 1:50:11 CSV um DF equals 1:50:14 PD we can read CSV straight from the 1:50:19 URL 1:50:29 straight from the raw GitHub URL that's 1:50:31 all right now 1:50:34 dfad okay there we go and now one of the 1:50:38 beautiful things about vs code as well 1:50:39 is I believe it has a viewer 1:50:43 variables we can view the data frame 1:50:45 look at 1:50:48 this hey hey look at 1:51:02 that that's 1:51:10 cool food okay there we go we can filter 1:51:13 out anything to do with food but we 1:51:17 still have our food list from nltk which 1:51:19 is beautiful so let's filter this out 1:51:27 now see you try 1:51:30 review thank you for joining in I 1:51:32 appreciate it my friend so now let's get 1:51:35 the 1:51:36 DF 1:51:39 um food 1:51:43 list we want the flat food 1:51:48 list 1:51:51 once we build this data set team the 1:51:52 model building will be the easy 1:51:56 part 1:52:00 so we want to now filter the panda data 1:52:03 frame if any of the class names 1:52:08 contains uh let's go 1:52:13 DF class 1:52:15 name what do these look like vitamin C 1:52:24 okay 1:52:31 planking uh so this is pd. read CSV oh 1:52:35 my 1:52:38 bad that was a mistake import pandas is 1:52:41 CSV that was a 1:52:43 mistake uh class 1:52:48 name 1:52:56 lower okay and is there any spaces in 1:53:07 these I think we can get a pretty good 1:53:16 filter look it's not going to be perfect 1:53:18 but it's going to it's going to it's 1:53:19 going to 1:53:27 do food 1:53:34 list so we want to 1:53:43 now I'll lower all the 1:53:45 strings no actually let's go 1:53:50 get the length of 1:53:55 DF okay 21,000 rows let's see how many 1:53:59 uh this filters 1:54:01 out so um 1:54:04 filter data frame from food 1:54:11 classes that was a 1:54:14 glitch I don't know why it worked but 1:54:16 yeah Georgio is 1:54:18 correct 1:54:21 um I imported it earlier as 1:54:24 PD so 1:54:29 DF non 1:54:31 food 1:54:33 equals 1:54:36 DF filter on 1:54:38 DF class 1:54:42 name no not contains we want to make 1:54:45 this 1:54:47 not class name 1:54:52 string 1:54:55 contains string. is 1:55:18 in 1:55:48 float 1:55:58 h no 1:56:05 duplicates we've got PD as PDS here 1:56:08 panda say PD 1:56:10 here so it seems that 1:56:18 there's 1:56:27 bad operator not for 1:56:38 float ah how many nans are in here you 1:56:48 reckon 1:57:01 Okay so we've got a 1:57:09 few remove 1:57:18 n 1:57:26 okay there we go we're on team fish on 1:57:29 here so we got to remove all the ones 1:57:31 that have food in them so is 1:57:33 [Music] 1:57:37 food once we build this model we are on 1:57:41 this is going to be a beautiful 1:57:43 model okay there we 1:57:46 go string. lower 1:57:50 do 1:58:12 contains let's lower all the 1:58:18 strings 1:58:21 DF 1:58:43 equals there we 1:58:48 go 1:58:54 there we go DF non 1:58:59 food how many did we filter out with 1:59:10 that 1:59:18 2,820 1:59:21 so we filtered out 19 classes with just 1:59:23 the food string 1:59:27 so 1:59:44 string now we want to filter 1:59:48 out 1:59:54 there we go okay so we filtered out a 1:59:57 bunch of foods here so this is the 1:59:59 nonfood 2:00:08 classes so we filtered out about a th 2:00:10 with that so that's good uh but now we 2:00:13 also want 2:00:14 [Music] 2:00:15 to 2:00:17 H we also want 2:00:23 to 2:00:36 um let's go because this is these class 2:00:45 names 2:00:48 DF class names have underscores and 2:00:52 whatnot so that's is in is a perfect 2:00:59 match so we 2:01:07 want let's go data frame filter 2:01:12 column 2:01:13 by strings in 2:01:18 list 2:01:34 yeah is 2:01:37 in is in seems the best way to do it uh 2:01:40 have I ever used pie torch for projects 2:01:42 um not for a project but I'm going to 2:01:44 start using it 2:01:48 actually 2:01:57 I think we can work with 2:02:17 this 2:02:34 yeah here we go this is what we 2:02:47 want 2:02:50 so we can standardize the text here how 2:02:53 about we change 2:03:05 the fishing 2:03:13 troll I think we've removed enough 2:03:15 classes 2:03:17 actually 2:03:23 it won't be 2:03:26 perfect but let's start to download some 2:03:28 data 2:03:43 hey so this 2:03:47 is 2:04:12 so now we have two data frames DF food 2:04:14 and DF non food there we go we have a 2:04:17 thousand different classes of food I'm 2:04:19 pretty happy with 2:04:20 that do 2:04:25 food now we can remove some of 2:04:32 these which one shouldn't be in 2:04:44 here there's probably a lot of these 2:04:46 that could be 2:04:47 removed 2:04:50 but let's start to download some images 2:04:52 and then we 2:04:58 can yeah 2:05:10 plate okay that's close enough to just 2:05:12 being all 2:05:17 food 2:05:19 so now what we can 2:05:22 do hey M how are you sioban Jeremy 2:05:26 Howard's in Brisbane yeah I believe he 2:05:28 lives I live Liv somewhere in Brisbane 2:05:30 not sure 2:05:37 where so we can remove things like ball 2:05:40 okay so that's going to be 2:05:47 to-do 2:05:54 CU if you take a photo of a 2:05:57 ball that shouldn't be in there should 2:06:17 it 2:06:26 ball Ball's a big 2:06:29 one what else have we got 2:06:33 here pin 2:06:38 wheel refrigerator okay let's start to 2:06:41 remove some of these 2:06:47 from 2:06:52 flat food 2:07:05 list not 2:07:17 food 2:07:21 okay we're going to spend 10 minutes 2:07:24 removing foods from this list or non 2:07:27 foods from 2:07:33 this let's get another timer where is 2:07:35 our timer at actually 21 minutes okay 2:07:37 let's spend 10 2:07:39 minutes M I appreciate that 10 minutes 2:07:43 filtering data so you've never really 2:07:46 worked on a proper problem if you 2:07:47 haven't filtered data manually ually 2:07:48 have 2:07:50 you so 2:07:56 ball manually removing not foods from 2:08:01 Flat food 2:08:05 list these are imag net classes as 2:08:17 well 2:08:19 now where did I view this 2:08:31 from there we go make sure we open 2:08:43 that not food list so we got ball 2:08:46 squashes of food puppy puppies aren't 2:08:50 food a puppy's 2:08:51 food in some countries maybe not in my 2:08:57 world 2:09:00 alligator if they're on the borderline 2:09:02 they can stay as 2:09:05 food perrywinkle what is a 2:09:14 perrywinkle it's a flower look at this 2:09:19 I search for a Periwinkle and I get ads 2:09:21 for 2:09:26 dresses hey how are you m uh we're 2:09:29 filtering we're creating an app called 2:09:31 food not food so you can see the GitHub 2:09:33 here and that'll have the link to the 2:09:35 notion but essentially we want to build 2:09:38 an image classifier to take a photo of 2:09:39 something that's food not food right now 2:09:41 we're building a data set filtering 2:09:43 image net for photos that are food and 2:09:45 aren't 2:09:47 food 2:09:49 if things I don't know is dog 2:09:51 food let's put dog in here I'm building 2:09:54 this from 2:09:55 my my 2:10:02 perspective 2:10:06 game 2:10:11 right okay this is good most of these 2:10:14 are 2:10:17 food 2:10:20 groper Runner Yellow Tail dolphin fish 2:10:23 Yellow Tail kroer mullet 2:10:29 mackerel 2:10:30 ball okay Ball's going to be 2:10:40 filtered bar what's a 2:10:47 bar 2:10:49 blade is blade blade could be a cut of 2:10:51 meat but we're going to remove 2:11:03 blade crepe cross delicates in Duck game 2:11:07 game's going Garden Garden's not a 2:11:17 food 2:11:20 hand hand and head can be 2:11:31 removed hey prisons 2:11:33 learning jacket not a 2:11:36 food oh we I believe we have some food 2:11:39 here freaking of 2:11:40 food wow thank you so 2:11:46 much WoW wow George has just made me 2:11:50 some food cuz we're about 2 hours into 2:11:52 this 2:11:53 stream we this is this is going to be 2:11:56 the ultimate test is I'm going to take a 2:11:57 photo of this now 2:12:00 and will the app if we're building food 2:12:03 not food so let me show you what the 2:12:06 amazing Georgia has just made we're 2:12:08 going to filter some images in a second 2:12:10 but let me look at this look at this 2:12:13 deliciousness so this is our test for 2:12:15 the app is 2:12:18 will the app classify this as food or 2:12:20 not 2:12:21 food thank you Georgia you're good so we 2:12:25 have we're going to stop for Q&A in a 2:12:27 second while I eat this food cuz I'm not 2:12:30 going to be coding while eating 2:12:32 food so we've got a test case now jacket 2:12:36 joint joint junk key we want 2:12:43 these 2:12:47 okay 2:12:52 we have an image now to test 2:12:57 out why not twitch today because we're 2:12:59 celebrating 100K 2:13:03 subscribers that food looks delicious 2:13:05 doesn't it I'm excited to eat it oven 2:13:12 pen pin 2:13:15 wheel now a plate is not food either 2:13:23 we're going to be here for 10 hours team 2:13:24 so we need to make sure that 2:13:26 we're taking stock of what's going on 2:13:29 plate not 2:13:30 food 2:13:33 pot not 2:13:36 food powder rack 2:13:46 refrigerator 2:13:53 saddle 2:14:00 shank spoon isn't food spring 2:14:05 steamer 2:14:16 stick 2:14:18 Temple we're going to eat this food in a 2:14:20 second tongue is tongue food tongue's 2:14:23 food in some 2:14:28 places truck 2:14:31 turban wedge wedges might be potato 2:14:35 wedges we're creating a data 2:14:39 set orange 2:14:46 ring cornmeal breakfast meal picnic 2:14:50 dinner tea stew caramel sweet candy 2:14:55 dumpling pudding pastry donut jelly 2:14:58 marmalade 2:14:59 bread Chala flatbread 2:15:03 pizza toast this is good this is really 2:15:06 good once we remove these pretzels 2:15:09 sandwich hot dog we're going to have a 2:15:12 pretty good data set here broccoli 2:15:14 squash 2:15:16 cauliflower 2:15:21 split PE soy Cardone okay this is 2:15:26 working amazing what is his twitch 2:15:28 channel name Mr D Burke you're right 2:15:30 coera oh thank you so 2:15:33 much hey Cera congrats on 100K 2:15:36 subscribers thank you so much I 2:15:38 appreciate 2:15:40 that I need to take a photo of that I 2:15:43 got started learning data science on 2:15:45 corsera and now we're here uh by the way 2:15:49 people if you want a special deal on 2:15:52 corsera don't forget to go to Mr dg.com 2:15:54 100ks Subs read the t's and C's there so 2:15:57 you don't get charged more than you want 2:15:58 but we have some goodies 50% off the 2:16:00 first month first month free of corsa's 2:16:02 Google D analytics and 52% off my book 2:16:05 Charlie walks but let's go back to 2:16:06 filtering data and sioban says please 2:16:09 let Georgia know that stream things food 2:16:12 looks delicious the stream thinks food 2:16:14 looks delicious Georgia Thank you thank 2:16:16 you 2:16:22 I 2:16:22 agree okay we're almost through this 2:16:28 list someone finished Udacity deep 2:16:31 learning n degree congratulations 2:16:33 massive effort my friend okay this is 2:16:35 beautiful team look at this we have uh 2:16:37 these are starting to be mostly all just 2:16:43 food we're preparing the data set the 2:16:45 modeling code and exploration will come 2:16:47 come soon fennel Ginger mustard tobacco 2:16:51 egg these are all foods this is 2:16:54 great parmesan honey molasses batter 2:16:58 chili lasagna 2:17:00 oatmeal you got to remember though this 2:17:02 is this is going to be inspired by imag 2:17:04 net data set so whever that came from 2:17:06 cup tea well cup is not 2:17:10 food 2:17:12 cup that'll be a tough one to do 2:17:16 honeycomb iceberg Mountain ocean rainbow 2:17:19 star star rock 2:17:24 shell these two aren't food 2:17:29 either once the timer goes off we're 2:17:31 going to eat and we're going to do Q&A 2:17:32 so if you have any questions you like me 2:17:33 to answer while eating I'm not going to 2:17:35 code while eat I don't eat while I use a 2:17:37 computer but I will eat while I talk to 2:17:40 you Runner what's a runner I don't know 2:17:43 let's remove that and pilot pilot is not 2:17:45 a food don't don't eat your Pilots if 2:17:49 you're in if you're in an airplane don't 2:17:52 eat your pilot you heard that here 2:17:57 first unless you can fly a 2:18:03 plane this is good we're nearly through 2:18:05 this is this list is about a thousand 2:18:06 long and oh look at that it's food 2:18:11 time we've got too many timers going on 2:18:13 here it's going to be food time and then 2:18:15 it's time to move again which is 2:18:17 beautiful 2:18:18 so and we're going to stand back up cuz 2:18:21 we're here for 10 hours how long we been 2:18:23 going for about 2 just over two 2:18:26 hours we're going to get to the end of 2:18:28 this thousand list Ash Ash is not 2:18:35 food we're making a data set to build 2:18:38 food not 2:18:40 food 2:18:42 chickpeas okay I'm pretty confident the 2:18:45 rest of these are going to be all food 2:18:49 have you worked on a machine learning 2:18:51 project if you haven't manually sorted a 2:18:54 massive data 2:18:55 set Rings going belly oh it could be 2:19:00 pork belly 2:19:02 sand sand is not 2:19:06 food 2:19:08 done okay so that's next let's write 2:19:10 this 2:19:13 down so code next uh answer 2:19:18 QA while eating so this is the test case 2:19:22 food the beautiful Georgia has made me 2:19:24 some food we're going to that's going to 2:19:25 be the test image for the um the 2:19:29 application food not food then filter 2:19:33 out non food items 2:19:37 from data frame manually 2:19:41 sorted and then 2:19:44 download imag net Food 2:19:48 and 2:19:49 nonfood classes class 2:19:53 images and then make data set of food 2:19:57 and not 2:20:00 food okay we're on we're going to take a 2:20:03 break we're not going to code for the 2:20:05 next however long it takes me to eat 2:20:07 this food but look at this this is some 2:20:10 delicious 2:20:12 food that Georgia has just made for me 2:20:15 so if you have any questions leave them 2:20:17 in the chat and I'm going to be 2:20:18 answering questions for the next 10 2:20:20 minutes or so while I eat 2:20:23 this oh man can we please do these 2:20:26 streams often yes I'm looking to stream 2:20:28 far more uh far more in the future I'm 2:20:31 going to keep building the app that I'm 2:20:33 working on which is called 2:20:35 nutrify wow look at this 2:20:39 omelette 2:20:46 Mushroom in my my country the Tim is go 2:20:49 backwards in Australia everything goes 2:20:51 backwards man we barely even use words 2:20:54 to 2:20:58 communicate like in Australia we say 2:21:00 like yeah n yeah is a valid reply in 2:21:12 Australia who's Georgia Georgia is my 2:21:16 girlfriend 2:21:22 what would you say about reinforcement 2:21:23 learning I don't know enough about 2:21:25 reinforcement 2:21:30 learning I think it's very valuable Deep 2:21:32 Mind and open AI doing a lot of cool 2:21:35 things 2:21:36 but I don't know enough I I'm not 2:21:39 skilled enough in re reinforcement 2:21:41 learning to comment and I haven't yet 2:21:45 seen like a a real big use case there 2:21:48 was one in the state of AI report saying 2:21:51 that reinforcement learning was used for 2:21:55 uh whatchamacallit was used 2:22:00 for how do you 2:22:02 say restocking restocking uh shelves at 2:22:06 like a 2:22:14 supermarket hey Daniel good night first 2:22:17 of all but you passed the tent flow 2:22:19 certificate last week and just want to 2:22:21 say thanks for the motivation oh man 2:22:22 that's so 2:22:24 cool congratulations 2:22:26 Legend M says am I from Australia yes I 2:22:29 live in Brisbane 2:22:31 Australia Kevin says where can I get 2:22:33 that 2:22:35 shirt I should have a store and sell 2:22:38 this 2:22:40 shirt um let's find out the brand of 2:22:42 this shirt hold 2:22:46 on 2:22:57 uh the brand of the shirt was there a 2:23:00 girlfriend 2:23:04 reveal uh Georgia has been on the stream 2:23:07 um a couple of times that she's bought 2:23:09 me some tea and some food but there was 2:23:11 no 2:23:12 uh like GF reveal no uh the brand of the 2:23:16 shirt is OT way 2:23:19 hway 2:23:20 clothing they look like they make some 2:23:22 good 2:23:23 stuff this look at these guys this this 2:23:26 is 2:23:28 Australia you can buy some brown 2:23:34 overalls you can buy a jacket but yeah 2:23:36 Otway is the 2:23:38 brand of 2:23:41 shirt okay we're got to finish this food 2:23:44 I never eaten a rush but we do have to 2:23:46 get back to Cod 2:23:49 let me get the chat back 2:23:54 up I'm just taking a short break to 2:24:04 eat can I show you my notion 2:24:11 setup 2:24:14 um I can but I think 2:24:17 organizing like it should be if you're 2:24:20 going to organize your files in 2:24:21 something like notion you should create 2:24:23 it yourself that way you know where to 2:24:26 look for 2:24:34 things this is delicious Georgia thank 2:24:40 you Dan Hi how are 2:24:44 you we're taking a little break to eat 2:24:47 some delicious 2:24:48 food before we get back into the 2:24:58 stream how many calor 2:25:05 calories do I eat per 2:25:08 day 2:25:11 um I would say somewhere between 2 and 1 2:25:13 12,000 and 3,000 I haven't measured in a 2:25:16 couple years is 2:25:22 though Amar making you feel hungry 2:25:32 well you should have known that when you 2:25:34 tune in to a food not food app building 2:25:38 stream no I'm 2:25:45 kidding 2:25:47 how long we got left well 7 and 1 half 2:25:50 hours 2:25:52 left but it doesn't really matter we'll 2:25:54 just go to when we need to 2:25:57 go 10 hours easy 2:26:15 money 2:26:17 uh have I done anything with knowledge 2:26:19 graphs before I haven't 2:26:22 actually I don't think I have maybe I 2:26:24 have like without knowing it but not 2:26:27 knowledge graphs I haven't used a 2:26:28 Knowledge Graph 2:26:30 before 2:26:32 but graph neural networks are starting 2:26:35 to become a real 2:26:40 thing so possibly I will do that 2:26:45 then 2:26:48 I haven't had a need for it yet I 2:26:50 probably will once I get deeper into 2:26:51 building 2:26:57 nutrify hey a Sheik's eating breakfast 2:27:00 too good on you 2:27:03 Legend sioban 2:27:08 says congratulations on your success so 2:27:10 far did you believe you would be here 2:27:14 today you know what secretly yes 2:27:17 but like you can't really predict where 2:27:20 you're going to be 2:27:24 so like I don't feel I really don't feel 2:27:27 any different to how I did 3 years ago 2:27:30 I'm just sort of now there's just the 2:27:32 numbers are are 2:27:34 larger does that make sense like I'm 2:27:36 still curious and I like creating and I 2:27:38 like learning things but it's just 2:27:42 everything else has grown around that so 2:27:44 I developed the habit of continually 2:27:45 learning continually 2:27:47 creating and then somehow the internet 2:27:51 has worked its magic and we're here 2:27:53 today and people are watching all over 2:27:54 the world and I thank you a lot for that 2:27:57 and so it's I always treat it as like a 2:27:58 circle as like I create things to put it 2:28:00 out there people respond to that that 2:28:02 that motivates me to keep creating and 2:28:04 it just goes on and on and on and on but 2:28:06 there's never really been a hey you know 2:28:08 what I really want to get to 100K 2:28:10 YouTube subscribers oh you probably know 2:28:13 that I don't I don't really care about 2:28:15 the number that's not to say that 2:28:17 I don't care about the people who are 2:28:19 subscribed is that the number on the 2:28:21 page will all there always be a higher 2:28:23 number on the page so it's now I'm at 2:28:24 100K it's like well why don't I get to 2:28:26 200 well for me that doesn't really 2:28:28 motivate me it does for some people for 2:28:30 me it's just like am I creating the 2:28:32 things I would like to enjoy am I having 2:28:36 fun every day that's that's my main 2:28:38 criteria and I feel like if I'm having 2:28:41 fun the people on the other end of 2:28:42 things will be having fun so who knows 2:28:53 my only Talent is getting very curious 2:28:55 about something and then following it 2:28:58 for long periods of 2:29:15 time 2:29:25 hellhound started the tensorflow course 2:29:28 on udemy a couple of months ago but had 2:29:29 to make a pause due to school coming 2:29:31 back next week regards from Mexico Oh 2:29:33 all the best my 2:29:35 friend enjoy the course it's a pretty 2:29:37 big 2:29:41 one we're tuning in Mexico that's 2:29:44 amazing Ariel I just want want to ask 2:29:47 I'm a software engineering student so 2:29:48 all my programming knowledge and focus 2:29:50 all these time is on data structures and 2:29:51 algorithms in OIP how useful are they in 2:29:54 ml well 100% that's useful 2:29:58 so like that's what machine learning is 2:30:00 it's basically just writing algorithms 2:30:03 to manipulate to find patterns in 2:30:05 different data structures look at that 2:30:07 it's a time again it is time to dance it 2:30:10 is time to move oh my gosh which tab is 2:30:14 my timer on there we go 2:30:17 okay we got to stand up again because 2:30:18 otherwise we'll be sitting down for too 2:30:20 long but that's what machine learning is 2:30:22 it's like programming just with data 2:30:30 so uh have I read about deep learning 2:30:33 Transformers yes I have I I'm going to 2:30:35 make more materials on those in the 2:30:36 future so stay 2:30:39 tuned Transformers are seeming to be the 2:30:42 one of the universal architectures 2:30:44 however there was another paper the 2:30:45 other day 2:30:47 that started to say like 2:30:49 hey is it the Transformer architecture 2:30:53 itself providing the benefits or is it 2:30:56 how you pre-process the 2:31:00 data am I working as a company as a 2:31:02 machine learning deep learning engineer 2:31:04 so I work for myself as a machine 2:31:05 learning 2:31:06 engineer my main title at the moment is 2:31:09 machine learning instructor but I'm 2:31:10 working on a project called nutrify at 2:31:12 the moment which is going to be my 2:31:14 return back to being a machine learning 2:31:16 engine ER well I'm machine learning 2:31:19 engineer 2:31:22 now 2:31:24 okay food is done I'll be back I'm going 2:31:28 to take this to the kitchen and then we 2:31:30 come back and coding all 2:31:45 right 2:32:15 for 2:32:27 okay we're coming back 2:32:29 up now I just 2:32:33 uh I just ate so not going to move we'll 2:32:37 we'll do double movement next 2:32:42 hour okay we're going back to 2:32:45 code thank you for joining me with the 2:32:49 food let's get this over here let's get 2:32:52 the chat back to where we need to 2:32:55 go 2:32:56 chat hello from Egypt thank 2:32:59 you uh if You' just finished the 2:33:01 Hands-On machine learning book uh what 2:33:03 would you suggest to read next um any of 2:33:08 Andre bov's books so Andre 2:33:12 burov 100 page ml book I like these 2:33:16 books 100 page machine learning or Andre 2:33:20 burkov um machine learning 2:33:24 engineering those are both two good 2:33:26 books you can read them both online for 2:33:28 free but now we are back to 2:33:33 coding so I'm going 2:33:36 to uh put a time stamp here 2:33:40 timestamp uh for when I transcribe this 2:33:42 video the timestamp will show that I'm 2:33:45 back into coding from the break so time 2:33:47 stamp here okay let's 2:33:51 go we need to now remove we've got we 2:33:54 created this manual list of not food 2:33:57 list so if you're wondering what we're 2:33:59 doing we are building a data set of not 2:34:02 food and food items and as we we learned 2:34:06 from Abraham loss function it's 2:34:09 important when you're starting a machine 2:34:11 learning project to spend a lot of time 2:34:13 preparing the data set so that's why 2:34:16 what we're 2:34:19 doing what happened to your Apple magic 2:34:21 pad it's still here it's still here I 2:34:25 just like I like to use both now I found 2:34:27 out I'm back to the mouse 2:34:29 world so we can get rid of this not food 2:34:34 list 2:34:35 wonderful we only want the top five so 2:34:39 we've answered the QA while eating well 2:34:41 done so the next eating break is going 2:34:44 to be in about 3 hours or so so like 2:34:46 like 1 or 2:34:48 130 by then we'll be halfway through the 2:34:53 stream who reckons we can get this full 2:34:56 app built by then our limiting factor is 2:35:00 going to be how long it takes to 2:35:01 download 2:35:03 food download food images so now let's 2:35:07 recreate our actual non-food data frame 2:35:13 again and DF food 2:35:20 equals not 2:35:31 in is 2:35:39 in I'm going to clean this up later but 2:35:41 it'll work 2:35:44 remove even more not food 2:35:51 items does that make sense not in not 2:35:54 food 2:35:57 list so how many does that remove we got 2:36:00 941 let's just put this here 9:41 good 2:36:04 time if you ever noticed that uh 2:36:09 apple look on this is going to blow your 2:36:11 mind I'm going to blow your mind for a 2:36:12 second I used to work for apple and this 2:36:16 is the Apple time every product on 2:36:19 Apple's website demos with 2:36:21 941 let's go Apple iOS 2:36:25 15 every demo photo from Apple has 941 2:36:29 in 2:36:30 there ready 9:41 2:36:35 941 941 2:36:38 941 you can't unsee this now 9:41 941 2:36:44 941 2:36:47 does this even have 941 on here on the 2:36:50 non-apple phone yes it does 2:36:53 941 941 941 so fun fact about that Jack 2:36:58 Arnold thank you so much oh I remember 2:37:00 you from the from the beginning my 2:37:02 friend thank you good to see you here I 2:37:05 appreciate 2:37:06 it Alex yes data pre-processing is very 2:37:12 uh very hacky but that's all right we're 2:37:14 going to we're going to make it we're 2:37:16 all going to make it DF food remove oh 2:37:20 my 2:37:20 goodness 2:37:22 um ah no we need DF food not 2:37:32 in balling series key will be reindex to 2:37:35 match okay so now let's have a look at 2:37:36 DF 2:37:40 food 2:37:44 Dot 2:37:57 okay so we 2:37:58 removed we removed about another 100 2:38:01 classes that's good enough for me so now 2:38:03 we have DF non food and 2:38:07 DF so let's 2:38:14 get get list 2:38:17 of 2:38:18 nonfood and food 2:38:22 class 2:38:31 Keys let's go this 2:38:36 was this was made by going 2:38:44 through 2:38:50 um by 2:38:55 my 2:38:57 criteria equals I asked 2:39:06 myself is this a 2:39:09 food okay still building the data set 2:39:13 almost 3 hours in but that's okay that's 2:39:16 that's I wanted to make this as real as 2:39:18 possible so DF 2:39:20 [Music] 2:39:24 food imag net 2:39:28 Food class IDs equals um DF 2:39:33 [Music] 2:39:37 food what are the column 2:39:41 names let's cancel this get rid of 2:39:44 that 2:39:46 uh sin ID okay that's what we want DF 2:39:52 food sin ID do to 2:40:01 list uh we actually could we want this 2:40:04 as a 2:40:07 dictionary yeah that's a better 2:40:14 option 2:40:18 is it class 2:40:34 name what does that look like sin 2:40:37 [Music] 2:40:44 ID 2:40:58 let's 2:41:04 go this is what we can do turn it into a 2:41:07 list and then combine 2:41:10 them to list and then we 2:41:14 want 2:41:44 that 2:41:52 there we go okay now this is our 2:42:00 food can we do order 2:42:09 dick so now let's do the same but for 2:42:12 non 2:42:14 food 2:42:44 for 2:42:48 there we go okay we're on so now we 2:42:52 have we have the nonfood we finally have 2:42:55 Split Image net 28,000 nonfood items or 2:42:59 sorry 21,000 2:43:02 thereabouts and we 2:43:08 have 2:43:11 862 food 2:43:14 classes 2:43:15 so who wants to now download some 2:43:29 data Kevin I really appreciate it 2:43:31 brother appreciate keeping it real so 2:43:38 yes yeah you're right Alex uh the 941 2:43:41 number is the iPhone was revealed at 2:43:44 941 so now let's we've got we've got a 2:43:48 dictionary of classes we got to figure 2:43:50 out now how to download them so let's 2:43:54 open up a 2:43:56 terminal we'll get the downloader 2:44:03 script 2:44:04 [Music] 2:44:10 so have I started 2:44:14 this 2:44:18 we need a 2:44:23 list um 2:44:28 so let's go to 2:44:34 notion 2:44:37 updated list of imag net Food 2:44:42 and non 2:44:44 food 2:44:48 items to 2:44:51 [Music] 2:44:55 include imag net keys 2:45:03 from 2:45:05 hey did that have GitHub in 2:45:10 there a notion now embeds 2:45:16 so we want the script are we running 2:45:19 we're not running on here anymore we can 2:45:21 close that 2:45:24 terminal LS um make 2:45:28 the image 2:45:31 net 2:45:43 downloader let's go 2:46:08 I need to give some claps to this 2:46:10 Martins 2:46:11 frolovs good morning ruga hello hello 2:46:14 thank you for tuning in good to see you 2:46:27 here images per class okay so a lot of 2:46:30 images and imag net have over a th000 2:46:32 images per 2:46:44 class 2:47:10 this is beautiful what a great blog 2:47:13 post 2:47:31 80% of the flicker URLs are 2:47:43 successful 2:47:48 yeah so it's only going to use flicker 2:47:49 URLs that's all 2:47:54 right let's go 2:47:57 here the data downloader only uses 2:48:01 flicker 2:48:03 URLs less than Total Image net 2:48:12 images um because 2:48:16 image n 2:48:18 images 2:48:19 [Music] 2:48:21 are downloaded with different 2:48:25 URLs 2:48:27 however flicker 2:48:30 URLs are 2:48:32 most 2:48:36 reliable I'm very excited to watch GTC 2:48:39 next week uh I haven't got one of the 2:48:41 new MacBooks but probably 2:48:43 later Yanik thank you so much for 2:48:46 joining in it's late in France it's 2:48:48 going to be recorded yes it'll live on 2:48:50 the channel after it's done May the 2:48:52 force be with me thank you so much I'll 2:48:54 see you next 2:49:00 time 0.2 seconds per image 2:49:09 wonderful how much space do I have on 2:49:11 this 2:49:13 machine 2:49:20 okay let's 2:49:21 see um let's go to here let's clone the 2:49:43 repo 2:49:50 uh I actually want to move this folder 2:50:13 now 2:50:28 what's happened 2:50:41 there ah I see so we actually just want 2:50:45 to 2:51:13 move 2:51:21 we're just cleaning up the repo 2:51:35 here 2:51:43 okay 2:51:45 what's in the uh requirements.txt 2:52:05 here so we 2:52:10 want what requirements do we 2:52:12 need oh 2:52:15 it's all written in Python 3 that's 2:52:18 beautiful hey Noah we're working on 2:52:21 creating an app called food not food so 2:52:23 we want to build a full stack machine 2:52:25 learning app um to allow you to classify 2:52:29 whether a food a photo is of a photo of 2:52:32 food or a photo of not 2:52:35 food and the the notes that I'm taking 2:52:38 are available in notion and the code let 2:52:41 me update the 2:52:43 code so it's going to be 2:52:51 full it's going to be uh deployed by the 2:52:53 end of the 2:52:56 Stream So we 2:53:04 want let's get out of some extra 2:53:08 tabs how do we use this python 2:53:11 downloaded. py let's just try 2:53:15 uh what's data 2:53:37 route okay beautiful so we need to 2:53:40 create uh a folder of 2:53:43 images 2:54:11 now let's just download 100 random 2:54:13 images or so in into 2:54:16 there get rid of this shopping 2:54:23 website 2:54:34 um 2:54:40 python downloaded. 2:54:43 py 2:55:37 we're going to do number of classes 2:55:39 we'll just get five random 2:55:43 classes 2:55:44 five and we'll also 2:55:47 get 10 images per 2:56:13 class 2:56:14 here we go scraping images look at that 2:56:17 light brown Herald escapement 2:56:23 diameter yes look at this 2:56:28 team wooo there we go okay so downloaded 2:56:32 some images so ran a test command to 2:56:37 download images 2:56:40 from 2:56:43 with 2:56:51 so this was 2:57:09 bash now let's have a look at these 2:57:11 images 2:57:13 hey 2:57:21 Oh wrong 2:57:24 machine 2:57:26 um I'm running this 2:57:35 remotely 2:57:36 [Music] 2:57:42 so there we we go look at this we've got 2:57:46 some images 2:57:48 now this is 2:57:53 diameter and then the class 2:57:57 is wonderful look at this we have images 2:58:05 now that's from Herold what does this 2:58:08 mean I have no 2:58:10 idea light 2:58:12 brown beautiful eyes okay so now we need 2:58:16 to care get rid of all of 2:58:19 these look this is funny for image net 2:58:21 it's like why how is this North Carolin 2:58:25 anyway okay so we have data 2:58:29 downloaded greetings from Turkey hello 2:58:31 hello hello greetings from Brisbane 2:58:37 Australia so we have some images 2:58:39 officially have some images let's oh I 2:58:42 didn't mean to close that but that's all 2:58:43 right we can get that 2:58:51 back so now we want how do we get a 2:58:56 list 2:58:58 of see if we have here imet food class 2:59:03 IDs in 2:59:07 De oh goodness we need to run this 2:59:12 all is it going to error 2:59:19 wow it didn't 2:59:24 error there we go okay so we need to 2:59:27 figure out how we can pass who knows who 2:59:29 knows how to pass a list uh to a script 2:59:33 like this 2:59:34 right or can we just run this 2:59:38 in 2:59:42 Jupiter py 2:59:44 how to 2:59:45 pass list 2:59:48 to um command line 2:59:51 argument who knows how to do 3:00:12 this 3:00:20 hey you're from ad alide 3:00:42 nice 3:01:10 hey they look like they're downloading 3:01:12 from 3:01:14 image net 3:01:29 too okay so we can look like we can 3:01:39 do quibby hello 3:01:41 hello so we need to pass a list we 3:01:47 want we want 3:01:50 this we want this as 3:01:55 Keys we want to pass this list to our 3:01:57 command line 3:02:01 argument this is the keys that we want 3:02:04 what is 3:02:05 this let's get out of 3:02:08 this and let's get out of this pie 3:02:11 torch and let's get out of this we'll 3:02:16 put that up 3:02:19 there all right so this is what we want 3:02:21 to do we want to pass somehow pass this 3:02:24 giant list to this 3:02:30 command can you have an autograph sure 3:02:42 thing we download download 500 images 3:02:44 from each of the selected 3:02:46 class 3:02:51 so can you pass a 3:02:54 list can I just run 3:02:58 this from in 3:03:00 here 3:03:02 python 3:03:12 um hello from Seattle WA in the USA hey 3:03:16 thank you for the great content and 3:03:18 training courses it helped me transition 3:03:19 from software engineer to data scientist 3:03:21 wow that's amazing with a large software 3:03:24 company congratulations my friend I 3:03:26 really appreciate that oh and don't 3:03:28 forget people actually I'm going to say 3:03:30 that at the next hour is the 3:03:32 surprises don't forget the 3:03:34 surprises if people want some surprises 3:03:37 go and check out this link 100K Subs 3:03:40 giving away free months and discounts 3:03:42 and whatnot everywhere 3:03:44 so this should this should work I reckon 3:03:47 let's go 3:03:49 here we 3:03:52 want data root is going to 3:03:56 be um let's try 3:03:59 this try to download 3:04:06 images python now we want data route to 3:04:12 be test 3:04:16 images and then we can go 3:04:19 enter we 3:04:22 want number of classes to be five and we 3:04:30 want images per class to be 3:04:35 10 test images does not oh cuz it's it's 3:04:39 right 3:04:40 here there we go Del Des desus plant 3:04:45 soil pipe Swedish meatball windfall 3:04:47 Buckeye there we go okay so that's 3:04:50 downloading images 3:04:55 there now wonderful let's 3:04:57 try test 3:05:12 list 3:05:42 for 3:05:49 okay test list 3:06:12 images 3:06:41 I don't want to modify the original file 3:06:44 empty 3:07:12 string 3:07:23 hey yeah there we 3:07:25 go is it really live yes I'm live here 3:07:28 I'm right here cty how are 3:07:32 you uh are there any content creators 3:07:34 that I look up on YouTube doesn't have 3:07:36 to be ml um I watched RuneScape 3:07:40 videos cty I'm live I'm live I'm right 3:07:48 here it's not pre-recorded my 3:07:53 friend ask me to hold up a number on my 3:07:56 hand and I will show you that I am 3:08:09 live is this going to 3:08:12 work 3:08:17 no okay so we need a way to pass 3:08:23 in a python 3:08:31 list big fan thank you so much so let's 3:08:36 go how to pass python list 3:08:40 to command line 3:09:00 who knows how to do 3:09:11 this 3:09:25 my goodness the ads on this 3:09:41 website 3:09:46 oh any creators that I look look up to 3:09:49 on YouTube um is the stream going all 3:09:53 right I just got like a bit of a lag 3:10:04 Spike three blue one brown of 3:10:11 course 3:10:41 for 3:10:44 that's what I need to do I need to 3:10:59 use where's the downloader 3:11:11 script 3:11:23 this is beautiful so we have a default 3:11:26 type 3:11:28 equals 3:11:39 list can you 3:11:41 pass 3:11:43 pass string from file to 3:11:46 python 3:12:11 command 3:12:21 can I just pass in a 3:12:25 list I'd like to do 3:12:41 this 3:12:50 oh 3:13:11 derp 3:13:22 d d d look at 3:13:24 that thank you Alex I appreciate 3:13:37 it someone saying add 3:13:41 a 3:14:11 for 3:14:20 there we 3:14:21 go okay fish on team test 3:14:28 images 3:14:33 wedge boom look at 3:14:35 that 3:14:38 okay thank 3:14:41 you 3:14:53 I 3:14:56 flag should I this is hm this is what 3:15:01 I'd like to do I'd like to export those 3:15:04 these to a cl to a like a just a a file 3:15:09 a text file and then can you use 3:15:14 what's inside a text 3:15:17 file in 3:15:22 here does that make 3:15:34 sense python use 3:15:41 content 3:16:11 for 3:16:39 H this is not very pythonic but we we 3:16:42 can try it 3:16:57 so so let's create the big one that we 3:17:11 want 3:17:47 there we 3:18:11 go 3:18:30 there we go okay 3:18:41 now 3:19:11 for 3:19:41 for 3:19:58 and now let's go food 3:20:10 class 3:20:40 for 3:20:44 there we go 3:20:55 beautiful so these are the third classes 3:20:57 that we want to 3:21:05 download does this make sense I want to 3:21:07 put this into a file and then with this 3:21:10 command I want 3:21:12 to or with this 3:21:16 command I'd like it 3:21:20 to uh 3:21:22 download download the images or read it 3:21:26 is there a way to do 3:21:28 that if I pass in a text file 3:21:32 here does that make 3:21:34 sense so this is the command I'd like to 3:21:40 do all right I'd like to do this but 3:21:42 then I'd like to pass in 3:21:45 this food class ID 3:21:48 string uh do txt can you do that someone 3:21:53 let me know if we can do 3:22:10 that 3:22:40 for 3:22:45 otherwise we're just going to have 3:22:50 to who's ready to start downloading some 3:22:53 images let's just start downloading 3:22:55 let's just scoll it to the wind and we 3:22:56 can fix this up 3:23:05 later Daniel tutorial was uploaded on 3:23:08 official tensorflow website right anyone 3:23:10 can forward me that link please 3:23:13 what do you mean the tutorial on 3:23:15 official tflow 3:23:19 website my tutorial or a tutorial on 3:23:27 this how many images per class should we 3:23:39 do let's just start downlo loading some 3:23:42 images 3:24:10 hey 3:24:21 uh one pot dish says my tutorial was 3:24:23 uploaded to an official tensorflow 3:24:27 website was 3:24:29 it Victor what's going 3:24:32 on if you find the link for that one pot 3:24:34 dish I'd love to have a look at that 3:24:37 let's create images make do food 3:24:43 images oh let's make D 3:24:58 data there we go and then we'll get non 3:25:02 food images in data as 3:25:10 well 3:25:14 okay who's ready to download this how 3:25:16 many images per class should we get if 3:25:19 we 3:25:20 have 3:25:21 [Music] 3:25:25 food if we have we want to download oh 3:25:28 actually let's get non food images from 3:25:31 imet 3:25:39 first nonfood 3:25:43 we have 20,000 classes 3:25:48 here so nonfood class ID list and so if 3:25:54 we download if there's 20,000 classes we 3:25:59 want let's get at 3:26:01 least 3:26:03 H 10 images cuz that's going to 3:26:07 be if there is 10 images that is it's 3:26:10 going to be 200,000 3:26:19 images data non food 3:26:29 images you ready to try 3:26:32 this non food images use class 3:26:35 list uh we need 3:26:40 string 3:26:49 um my I don't know if my tensorflow 3:26:51 tutorial is on tensorflow's website but 3:26:53 it's if you just search Daniel Burke 3:26:55 tensorflow you'll find all my tens flow 3:26:58 stuff okay let's download this who's 3:27:00 ready to download images in three two 3:27:03 well I just I need to hold my fingers up 3:27:05 correctly three 2 one let's download 3:27:09 some images oh what did we miss 3:27:12 argument L too 3:27:15 long damn 3:27:37 it yeah that string is 28,000 characters 3:27:41 long 3:27:44 um what's the maximum 3:28:00 length Okay I got this I got an idea 3:28:03 we're just going to download random 3:28:08 classes and then we're going to filter 3:28:10 it on the back end 3:28:11 yes that's a great idea so let's just 3:28:14 download random 3:28:18 images data we're going to make D and 3:28:22 then we can filter them this is genius 3:28:25 make 3:28:26 D data images imag net 3:28:36 images so we're going to download random 3:28:38 classes let's do 3:28:40 that 3:28:45 number of classes let's do a 3:28:48 thousand and the number of 3:28:54 images let's just execute this in the 3:29:05 terminal we can just all the filtering 3:29:07 we've done we can filter it on the back 3:29:10 end so number of images per class 3:29:14 100 and number of 3:29:17 classes well let's go 3:29:31 50 so 3:29:40 python 3:29:43 python we're going to 3:29:45 go downloader 3:29:49 dopy we're going to store the images 3:29:53 in data imet 3:30:02 images oh it needs to 3:30:10 be 3:30:13 data image net 3:30:33 images data rout 3:30:40 is 3:30:44 number of 3:30:49 classes let's get th000 or 3:30:53 500 500 classes should be 3:30:58 enough oh let's go the whole hog why not 3:31:06 500,000 3:31:09 classes 3:31:21 and then images per 3:31:25 class 100 so that's going to be 100,000 3:31:29 images potentially 3:31:34 downloaded should we do more classes or 3:31:36 more 3:31:39 images 3:31:55 let's do 3:31:56 50 there we go ready 3 2 1 let's start 3:32:00 downloading 3:32:03 data boom okay now this is going to 3:32:07 download it's going to take a while of 3:32:09 course 3:32:15 so now image net images is filling up so 3:32:18 we can fillter this on the back 3:32:21 end 3:32:23 heal okay 3:32:39 beautiful this is beautiful scraping 3:32:42 stats flick 3:32:45 up 3:32:47 57% 65% success rate so we're 3:32:50 downloading images how can I concentrate 3:32:53 10 hours straight who knows we're going 3:32:54 to figure out uh I'm going to get a 3:32:56 drink of 3:32:58 water but we're now downloading images 3:33:01 so we're going to filter these images on 3:33:03 the back 3:33:05 end oh would you look at 3:33:09 that it is time to do some push-ups and 3:33:13 dance 3:33:18 around started downloading images from 3:33:23 imet going to filter these on the back 3:33:28 end into food 3:33:34 images and non food 3:33:39 images 3:33:42 command 3:33:49 used 3:33:53 downloading uh random images from or 50 3:33:57 random 3:33:59 images 50 random images from a th000 3:34:04 random 3:34:08 classes then 3:34:11 filter uh th000 random classes and 3:34:14 images into food not 3:34:32 food beautiful so this is downloading it 3:34:35 is now 3:34:37 time we've got a 75% success rate from 3:34:40 downloading images from flicker so now 3:34:43 let's uh let's do some push-ups and what 3:34:46 are the rules let's come back to 3:34:58 notion 10 push-ups 10 squats 10 kicks 10 3:35:01 punches but this time we have to do 3:35:02 double because we missed the last 3:35:09 hour 3:35:27 20 push-ups now we got 20 3:35:30 squats let's move this over here uh just 3:35:34 a little time stamp we are downloading 3:35:37 images now Tim stamp downloading IM 3:35:40 images 20 3:35:51 squats 8 9 10 11 12 13 14 15 16 17 18 19 3:36:09 20 beautiful 3:36:11 10 kicks we'll do 10 kicks each leg CU 3:36:14 we need to do 20 3:36:16 total 3:36:26 one 3:36:31 eight we could do a move net 3:36:35 classifier for if I'm doing kicks or not 3:36:38 or 3:36:39 punches 3:36:55 now we got 20 3:37:07 punches okay it's water time for 3:37:11 me uh we are downloading thousands of 3:37:15 images we could end up with close to 3:37:17 50,000 images here 3:37:20 so we're collecting a data set that's 3:37:22 almost ticked off then we have to model 3:37:25 the data set build the application and 3:37:32 deploy oh please thank you oh well would 3:37:36 you look at that get the water delivered 3:37:39 by little 3:37:43 very thank you Georgia okay we've 3:37:48 done 3:37:50 surprises check out the free 3:37:54 stuff the free SL discounted 3:38:00 stuff don't 3:38:01 forget uh 3:38:06 online oh please don't tell me the 3:38:09 download script is send us 3:38:11 offline are we 3:38:14 back if we're back let me know in the 3:38:25 chat should we start building a 3:38:30 model am I 3:38:32 back I'm back I got kicked off for a bit 3:38:36 thank you so much for uh people saying 3:38:37 that I'm back cuz I'm 3:38:39 back 3:38:41 we need to set another hour 3:38:49 timer okay while this is downloading 3:38:51 images let's start to build a model 3:39:01 Hy and we should also we need images of 3:39:04 food as well so we should get the food 3:39:06 101 data 3:39:09 set 3:39:12 all good again thank you so 3:39:19 much so food images are 3:39:27 downloading my shirt's coming 3:39:29 undone it's not that kind of stream this 3:39:33 isn't 3:39:34 twitch not an eir 3:39:37 okay 3:39:39 um so now we're downloading 3:39:43 images we 3:39:45 should start to get food 101 images or 3:39:48 we could start 3:39:49 to build a confuted vision model cuz 3:39:53 once we get the data set is the biggest 3:39:54 part once we get the data set the models 3:39:56 are ready to 3:39:58 go do I have tensor flow let's start 3:40:02 looking into this model 3:40:09 building 3:40:26 tensor flow yes tensorflow 3:40:33 config we have a GPU 3:40:36 available that is what's up but we need 3:40:38 to silence the tensor flow warnings here 3:40:40 we go we got our Nvidia Titan 3:40:42 RTX compute compute capability is 3:40:54 7.5 do we have 3:40:58 gradio we don't have gradio that's 3:41:09 okay 3:41:30 how many images are we 3:41:32 having oh this is what's up 3:41:37 team bleeding heart 3:41:42 Bobcat okay let's close that because 3:41:44 that's going to use up a lot of memory 3:41:47 um but we need a data set before this 3:41:50 let's turn off tensorflow 3:42:02 warnings Daniel do I watch cricket yes I 3:42:05 watch cricket I love 3:42:08 cricket 3:42:17 turn off tensor flow 3:42:38 warnings 3:42:51 there we 3:42:52 go turned off the tentor 3:42:59 flow do we have TF light model 3:43:08 maker we do have TF light model maker 3:43:11 beautiful so because we want to deploy 3:43:13 this model we need to build ra a 3:43:14 relatively small model 3:43:18 um can we build the infrastructure for 3:43:20 what we want to build and then just run 3:43:22 the code once it gets 3:43:31 in uh we are 3:43:35 building no we're just going to leave 3:43:37 the images in the folder that they're in 3:43:40 we're just going to load it off 3:43:42 that with the TF uh load 3:43:47 images torf flow load 3:43:53 images we're just going to use something 3:43:55 similar to 3:44:00 this uh no T to 3:44:06 flow car's image data set 3:44:10 from directory this is what we're going 3:44:12 to 3:44:20 use main 3:44:36 directory and then we want to look up 3:44:38 how to convert 10 flow 3:44:41 convert saved model to TF light 3:44:46 model here we go okay let's look into 3:44:49 how we convert so we're going to we got 3:44:50 data downloading over 3:44:53 here we'll keep that 3:45:05 running tend to flow 3:45:07 Carras we can save it to a saved model 3:45:10 put it into a tensorflow light converter 3:45:12 and get it 3:45:22 out wow you can just do it like 3:45:28 that convert the model how easy is that 3:45:31 to convert to tensorflow 3:45:38 light 3:45:50 okay well 3:45:53 let's let's start building a Model A 3:45:57 sample 3:46:05 one we need to load the datas um the 3:46:08 datas we need to load the 3:46:10 datas let's load the datas man uh I want 3:46:14 to move this 3:46:17 into 3:46:22 here 3:46:24 move I don't want that I want tensor 3:46:32 flow 3:46:34 okay so we're going to keep downloading 3:46:36 images looks like we've got about 7,000 3:46:38 plus images right right 3:46:40 now let's get rid of the 3:46:44 warnings there we 3:46:51 go cuz our model is going to be binary 3:46:56 classification we 3:47:07 want let's just make a 3:47:10 classifier for aircraft or 3:47:22 Anvil uh data let's let's create a small 3:47:26 data 3:47:31 set how many photos of aircraft do we 3:47:34 have 3:47:35 aircraft 3:47:37 Anvil clear 3:47:40 um 3:47:42 LS let's go 3:47:51 move copy make 3:47:58 the 3:48:02 uh model test 3:48:07 images copy 3:48:10 um imag net Images slash when I copy 3:48:17 recursive imag net 3:48:20 images aircraft aircraft to ramble 3:48:23 aircraft to model test 3:48:38 images 3:49:08 for 3:49:38 for 3:49:40 cannot 3:50:01 copy 3:50:08 ah 3:50:09 so the files are a little bit too deep 3:50:12 but that's 3:50:13 okay um do I know if there's a good 3:50:15 method to convert P torch model to TF 3:50:17 yeah you can use on 3:50:29 NX let's do aircraft versus 3:50:38 anvil there we 3:50:40 go clear uh if you want to convert P 3:50:44 torch to tensorflow or tensor flow light 3:50:46 um look up P torch i x to TF light or 3:50:51 something like 3:50:54 that there you 3:51:08 go 3:51:38 this seems like a good gu 3:51:40 that's how to convert P torch to tensor 3:51:44 flow 3:51:46 light so now we've got a lot lot more 3:51:49 images let's start to build a model hey 3:51:53 Everyone likes building 3:51:56 models 3:51:59 so 3:52:00 LS 3:52:02 [Music] 3:52:06 data so we have images of craft and 3:52:09 Anvil so it's like OS 3:52:12 walk uh 3:52:17 data import 3:52:34 OS um what is it for 3:52:36 files no for d 3:52:40 [Music] 3:52:47 we need to make a get ignore let's add 3:52:49 to get 3:52:50 ignore 3:52:55 um image 3:53:07 folders 3:53:37 for 3:53:44 clear so now we're going to build a 3:53:53 model now we have to explore our data 3:53:59 files uh and this is a timestamp for 3:54:03 model building I'm going to leave a 3:54:05 timestamp for model 3:54:07 building 3:54:10 that way when I transcribe this later we 3:54:12 will have timestamps for model 3:54:16 building 3:54:18 now we want to 3:54:21 find let's go 3:54:25 print files wonderful that's how many 3:54:28 files that we have hey why is that not 3:54:35 in OS 3:54:37 Lister 3:54:50 data 3:54:59 okay okay 3:55:07 good 3:55:37 for 3:55:50 now we want 3:56:02 to is there a way to does this make test 3:56:07 size 3:56:23 [Music] 3:56:31 [Music] 3:56:34 that was loud let's move some random 3:56:37 files into train and test so now we need 3:56:40 to create train 3:56:52 test um we 3:56:58 want 3:57:04 aircraft what's the best way to do 3:57:07 this 3:57:22 we want to make a 3:57:24 director in model test 3:57:28 images in data model test images and 3:57:32 we're going to call this train and we're 3:57:35 also going to make another one 3:57:37 data 3:57:42 data model test 3:57:45 images 3:57:50 test okay and now we need 3:57:53 [Music] 3:57:55 to make splits of 3:57:57 images so we 3:58:00 want aircraft and airplane in here but 3:58:03 we want random indexes so let's go 3:58:09 import 3:58:17 random but there's not the same amount 3:58:20 of images in each one is 3:58:23 there 3:58:34 so let's get a list of 3:58:37 images 3:58:39 we'll do this the hacky way and then 3:58:41 we'll do this the real 3:58:44 way aircraft 3:58:47 images hey shba what's going on will you 3:58:50 do data monitoring in this tutorial 3:58:52 depends depends what data monitoring 3:58:54 you're talking 3:58:57 about Shar we are building a full stack 3:59:00 machine application called food not food 3:59:02 from scratch that means we're connecting 3:59:04 collecting a data set and we are going 3:59:06 to be modeling it and then deploying the 3:59:08 model later on so 3:59:12 aircraft 3:59:15 images equals okay so we want to get 3:59:18 random indexes from this and then move 3:59:20 the 3:59:22 rest that aren't in 3:59:26 there how many images do we have James 3:59:29 Scott what's going on 3:59:31 Legend 53 53 that's all right so we can 3:59:37 go train split 3:59:40 equals 3:59:45 um 0.8 time length aircraft 3:59:52 images 42 okay so we have 11 test images 3:59:56 that's all right train 4:00:07 split 4:00:17 we want num 4:00:37 p 4:01:07 huh 4:01:37 wonderful 4:01:45 6 hours to 4:01:47 go I feel amazing we still haven't even 4:01:50 got into the model building stage but 4:01:52 what we're what we're getting what we're 4:01:53 seeing here now is that data building a 4:01:56 data set does take the longest part so 4:01:58 when you want to work on a custom uh a 4:02:01 custom project you need to build a data 4:02:07 set 4:02:09 now here's what we want to do we want to 4:02:11 get get 4:02:14 random indexes 4:02:18 of certain number from list of 4:02:23 images so we want a list of 4:02:27 images uh what's the random choice in 4:02:33 python python random select 4:02:37 k sample that's what we 4:02:49 want python random 4:03:03 seed okay let's go import random I think 4:03:06 we don't need nump I don't think 4:03:16 um random sample from aircraft images we 4:03:21 want 4:03:23 10 okay and then if we do random 4:03:34 seed 4:03:37 beautiful 4:03:48 but then we 4:04:01 want yeah that's what we can do randomly 4:04:07 select 4:04:32 let's get the train split up 4:04:36 here 4:04:38 try and 4:04:47 split random sample train 4:04:52 split train 4:04:55 image and then test image list equals 4:05:04 um 4:05:05 [Music] 4:05:06 aircraft 4:05:44 I want to get the ones that are not 4:06:06 in 4:06:36 for 4:06:40 set no I want the 4:06:49 difference there we 4:07:06 go 4:07:10 and then we should have 4:07:20 length so we've got a fair few images 4:07:22 now this is 4:07:25 good wonderful okay so now we we 4:07:29 want 4:07:36 um 4:07:43 def create train test 4:07:50 list Target 4:08:06 d 4:08:13 we're going to functionalize 4:08:36 this 4:09:02 so now we want 4:09:06 um 4:09:34 we're still downloading images people 4:09:36 but now we need to pre-process our data 4:09:38 into training and test sets wonderful 4:09:40 there we go okay we're on random sample 4:09:45 we've got a list a beautiful 4:09:49 list now we need a list of D that that 4:09:52 would be much better wouldn't 4:09:55 it 4:10:02 so Target 4:10:06 to 4:10:19 equals 4:10:36 data 4:10:45 so then we can get that list now we need 4:10:47 to create a function to move 4:10:53 images so we want to move we want to 4:10:55 copy all of the images 4:11:06 from 4:11:30 let's let's make another 4:11:36 day 4:11:39 hey D what's going 4:12:06 on 4:12:17 split well done 4:12:20 okay now we can get rid of 4:12:36 these 4:13:06 for 4:13:34 print image du we want 4:14:06 for 4:14:36 for 4:15:06 for 4:15:36 for 4:16:05 beautiful 4:16:10 okay but we actually want the full file 4:16:13 path 4:16:35 there 4:17:04 there we go team we've got list of r 4:17:07 images of train and test we're on a roll 4:17:35 here 4:18:05 for 4:18:35 for 4:19:05 for 4:19:16 we making training and test sets here 4:19:18 there probably an easier way to do this 4:19:20 but I'm hacking around having 4:19:35 fun 4:20:05 for 4:20:23 there we go we've got a way to move 4:20:25 images into train and test so let's now 4:20:27 do the 4:20:35 same 4:21:05 for 4:21:19 so I'm just 4:21:35 moving 4:22:05 for 4:22:24 lakman thank you for 100,000 subscribers 4:22:28 congratulations wow I can barely talk uh 4:22:30 congrats on 100K what are you using to 4:22:32 identify food not food I'm going to use 4:22:33 a efficient net model probably 4:22:41 um um image compression web app is 4:22:46 getting server timeout I'm not very 4:22:48 experienced with do that is it possible 4:22:50 to do ml work on the client side instead 4:22:51 of server side yes it is that's what I'm 4:22:53 going to be doing today with uh 4:22:55 tensorflow JS so I'd look into that 4:22:57 tensorflow JS or tentor flow 4:23:01 light so let's 4:23:05 now 4:23:25 copy is it copy 4:23:35 two 4:23:37 python shu2 4:23:54 copy okay copy 4:24:05 two 4:24:35 for 4:25:03 so we got to make a Target 4:25:05 directory 4:25:35 for 4:26:05 for 4:26:35 for okay I need another helper function 4:27:04 here 4:27:34 for 4:28:04 for 4:28:34 for 4:29:04 for 4:29:34 for 4:30:04 for 4:30:34 for 4:31:04 that 4:31:34 for 4:32:27 ah congratulations thank you so 4:32:31 much hi Venit how are 4:32:34 you 4:33:22 we're still downloading lots of images 4:33:23 here 74% success rate this is 4:33:34 beautiful 4:34:04 for 4:34:34 for 4:34:52 be 4:35:04 back use the 4:35:34 right 4:35:44 okay I know what to do 4:36:04 now 4:36:34 for 4:37:04 for 4:37:34 for 4:38:03 for 4:38:17 there we 4:38:33 go 4:38:44 oh no we need the 4:38:52 reverse we need train 4:38:55 test 4:39:03 derp 4:39:16 oh we got some more movement to do Wham 4:39:20 says hi hi Lex what's going 4:39:24 on tell Wham I said hi 4:39:28 too so we need to actually I need to fix 4:39:31 this up so we're going to do some 4:39:32 movement in a second but I'm going to 4:39:34 finish this code 4:39:35 we want make Target 4:39:38 directory no we won't don't want 4:39:42 that 4:39:43 so we 4:39:50 don't care about 4:40:03 that 4:40:10 Target dir is going to 4:40:33 be 4:41:03 for 4:41:33 for 4:42:03 for 4:42:24 so now we should 4:42:27 have aircraft Anvil 4:42:32 yes aircraft an 4:42:35 yes we're on okay we've got a way to 4:42:36 make 4:42:38 splits do the 4:43:01 twist now let's copy all of them 4:43:18 beautiful okay now we can build a model 4:43:20 but we need to move first we have a lot 4:43:22 of images downloading right 4:43:27 now look at all that isn't that 4:43:31 beautiful nearly 1,000 classes download 4:43:41 loading okay next 4:43:45 is uh make model data sets from train 4:43:50 test folders and then next 4:43:53 is build model on train 4:43:59 test data sets and 4:44:02 then evaluate model 4:44:05 convert model to TF light for 4:44:10 deployment okay we're on we've got a 4:44:13 data 4:44:15 set Vanette yeah I'm not doing much 4:44:18 talking at the moment because we we got 4:44:19 to write some code that's what this 4:44:20 stream is about we're doing a machine 4:44:22 learning coding stream and the way we're 4:44:25 going to check if the app works is in a 4:44:27 few hours we're nearly halfway this is 4:44:29 very exciting in a few hours we're going 4:44:30 to check if the website that we build 4:44:33 works on a a an iPhone um or you can 4:44:37 visit it that's how we'll know we win 4:44:39 okay time to 4:44:42 move let's bring the desk up or actually 4:44:46 I'll put it down we have the rules 4:44:50 are let's make a list of hours how many 4:44:53 hours have we done we're nearly at to 4:44:55 five let's go 4:44:57 here 4:45:01 hours 4:45:02 uh to do 2 1 2 4:45:06 3 4 5 6 7 8 9 10 we've done 4 hours so 4:45:12 far we're nearly at 5 actually on my 4:45:15 clock it says 5 how long does the stream 4:45:16 say we've been going for let me know in 4:45:18 the chat but we have 10 push-ups 10 4:45:21 squats 10 punches 10 4:45:33 kicks 4:45:38 now we have 4:45:39 squats one two 3 4 5 6 7 8 n 10 and 10 4:45:54 kicks let's bring this 4:45:58 up five each 4:46:03 leg 4:46:07 move this chair so I don't belt 4:46:14 myself 10 4:46:20 punches now 10 star jumps for 4:46:28 fun we're going to put a time stamp in 4:46:31 here a time stamp for 4:46:35 train and test sets made for a test data 4:46:38 set time stamp and now 10 seconds of 4:46:42 dancing 4 hours 4:46:45 43 so John I am 4:46:47 making uh a website called food not food 4:46:51 which is going to use a machine learning 4:46:53 model to predict whether an image is of 4:46:55 food or not of food you can seal all the 4:46:58 code here and the notion is going to 4:47:00 track all the notes now I'm going to get 4:47:03 some water 4:47:05 don't forget there is the live stream 4:47:07 celebration if you want some good deals 4:47:10 hello window man what's going on you can 4:47:13 get 50% off the first month of access to 4:47:15 all zeroa master year Academy first 4:47:17 month free of corsa's Google data 4:47:19 analytics professional certificate so 4:47:21 corsera giving us 100 free months for 4:47:26 this so thank you corsera and my book is 4:47:28 50% 52% off so it's 4:32 so go check 4:47:33 that out out uh read the t's and C's cuz 4:47:35 if you don't unsubscribe you'll be 4:47:37 charged for the second month I'm going 4:47:39 to get a drink we're downloading about 4:47:42 50,000 images right now so the next 4:47:44 thing is we want to make model we're 4:47:47 going to build a model this is exciting 4:47:50 okay I need to clean up some of this 4:47:51 stuff 4:47:55 here I'll be back in a 4:48:03 minute 4:48:33 for 4:48:53 you got much of 4:49:02 your be 4:49:32 back 4:49:37 okay let's set another 4:49:44 timer now we need to build a 4:49:46 model okay so we need to load the 4:49:49 data let's do that we're still 4:49:51 downloading lots of 4:49:53 images load 4:49:57 data 4:50:00 um have we got tent to 4:50:02 flow 4:50:04 did you notice that we just we spent the 4:50:07 first 4 and 1 half hours crafting a data 4:50:13 set that's 4:50:17 uh that's a big note in machine learning 4:50:19 right if you want to build a custom 4:50:20 project you need to create a custom data 4:50:22 set and that's what I wanted to do with 4:50:24 this uh project is rather than just 4:50:27 start off and build a model straight 4:50:28 away I wanted to have nothing ready and 4:50:31 then just start building it from scratch 4:50:34 so let's do that import T to flow as TF 4:50:38 we're going to figure out how to load 4:50:39 some 4:50:40 data um I think it's train data or train 4:50:46 folder trainer can 4:50:50 be uh 4:50:52 model we're building this is on a test 4:50:54 images by the way 4:50:57 splint this is a test model we're going 4:50:59 to build the real model once all the 4:51:00 images are downloading you see this 4:51:02 little see this down here 4:51:04 we've got our deep learning PC which is 4:51:06 downstairs from here running very hard 4:51:08 trying to download lots of images from 4:51:11 uh the 4:51:27 internet hot dog not hot dog Asik we're 4:51:30 about to start modeling good 4:51:32 timing we've got a 10 t uh data set set 4:51:35 up over here not the official data set 4:51:37 because we're still downloading 4:51:39 images 4:51:41 um if you want to know what we're 4:51:42 building all the codes on 4:51:48 GitHub and we're up to modeling now 4:51:52 we're downloading thousands of images so 4:51:55 let's let's start building a 4:51:59 model look how many images we have 4:52:02 now look at all these 4:52:05 classes how cool is 4:52:08 that but we're going to filter those in 4:52:10 a 4:52:11 second so we're building a binary 4:52:14 classification model first we're going 4:52:16 to go load in data so train data equals 4:52:20 TF caras 4:52:24 utils um 4:52:26 image data 4:52:30 set actually I think I don't have the 4:52:32 latest version of tens slow they only 4:52:34 changed that in one of the recent ones 4:52:37 so we're going to go 4:52:39 trainer we want what could be our batch 4:52:43 size batch size 4:52:47 32 4:52:49 um does this give me a dock 4:53:02 string 4:53:08 labels equals 4:53:10 inferred label mode color mode class 4:53:18 names image 4:53:23 size we want 224 4:53:32 224 then test 4:54:01 data found a 6 files look at all that 4:54:05 that's a bunch of jargon we want to get 4:54:08 rid of 4:54:09 the runtime here I mean 4:54:28 warnings we got 4:54:31 data so we got 86 this is just a simple 4:54:33 Model 86 4:54:36 um training images and 23 testing 4:54:40 images 4:54:44 so aircraft versus Anvil this the first 4:54:47 model that we're going to build first 4:54:49 model timestamp first model timestamp 4:54:52 first model um the first model that 4:54:54 we're going to build is Just Aircraft 4:54:56 versus Anvil and then we can scale it up 4:54:58 to more classes with more data we'll 4:55:00 make sure that the model is 4:55:04 uh running fine with a small amount of 4:55:09 data build the first 4:55:11 model I'm going to prefetch these data 4:55:14 sets as well so they're nice and 4:55:18 fast train data equals train 4:55:21 data do 4:55:23 prefetch and we want TF 4:55:32 data 4:55:37 we're lucky we got a big dog GPU because 4:55:39 this is going to 4:55:41 be build the first model okay um we can 4:55:46 get some model code 4:55:49 here let's 4:55:52 go uh base model let's build an 4:55:55 efficient net TF cares applications. 4:55:59 efficient net 4:56:01 b0 where's my do string 4:56:08 completion uh doc 4:56:11 strings 4:56:14 hey we'll just go to the 4:56:17 docs if you're wondering what efficient 4:56:19 net b0 is it's this 4:56:23 model efficient 4:56:26 net b 4:56:32 z this is efficient net convolutional NE 4:56:36 Network there we 4:56:40 go this is what we 4:56:44 have so it's an architecture from 4:56:47 2019 but it's just a bunch of 4:56:49 convolutional layers it's actually 4:56:51 mostly purely convolutional layers so 4:56:53 we're going to build a nice and easy one 4:56:55 effici should net b0 to start off with 4:56:57 we can of course scale this up as much 4:56:58 as we want as we keep going well let's 4:57:02 look this up then 4:57:08 docks Tor flow efficient net 4:57:15 b0 so we don't want to include the top 4:57:18 because we want to put our own custom 4:57:20 layer the top layer we're 4:57:22 removing so that means we uh when you 4:57:25 include the top layer these efficient 4:57:27 net models from um tentor flow so the 4:57:29 pre-trained ones they're pre-trained on 4:57:31 imag net already uh so we're going to 4:57:34 instead of it outputting a th000 classes 4:57:36 cuz that's what image net has a th000 4:57:38 different classes we want it to Output 4:57:40 uh two classes and in our cases our 4:57:42 classes are aircraft and Anvil so we're 4:57:46 just going to change the top but we also 4:57:49 want uh the weights are going to be from 4:57:52 imag net that's what we 4:57:53 want and I think everything else can 4:57:57 be that's about it include top equals 4:58:02 false 4:58:04 CU then if we go it's going to download 4:58:06 the base 4:58:08 model see downloads this from Google 4:58:12 thank 4:58:13 you and then we want to go base model. 4:58:18 trable so this right now it's trainable 4:58:21 we want to turn trainable 4:58:25 off that means um we don't want to do 4:58:28 any fine tuning cuz if we download this 4:58:30 model it's going to be hundreds of 4:58:32 layers 4:58:34 let's have a look at that see how many 4:58:35 layers that 4:58:38 is so heaps of layers uh if we turn 4:58:42 trainable to false make model 4:58:46 untrainable it means all of these base 4:58:48 layers are going to come with the 4:58:50 patterns that they get downloaded from 4:58:52 and we're not going to adjust them when 4:58:53 we train them on our own data so that 4:58:55 means the patterns that this model the 4:58:57 weights that this model has learned from 4:58:58 image net are going to remain the same 4:59:01 uh as when we downloaded it 4:59:04 but oh we should use weights and biases 4:59:06 let's do that before we train a model 4:59:08 we're going to use weights and 4:59:10 biases 4:59:11 um to track our experiments so make 4:59:15 model untrainable we'll just construct 4:59:17 the model 4:59:18 first trainable we can set that to false 4:59:22 um and then we want 4:59:24 to uh build a 4:59:28 functional 4:59:29 model um input equals 4:59:34 input 4:59:36 layer TF carries layers input uh then 4:59:40 the shape is going to be 224 224 4:59:45 3 and then we want x equals base model 4:59:49 pass it the input and then we want X is 4:59:53 going to be um TF caras layers we want a 4:59:58 global average pooling 5:00:01 2D uh on the 5:00:05 export here is that how you do 5:00:14 it where's the functional API that's 5:00:17 what we need to look at um tensorflow 5:00:20 functional API I can't remember the 5:00:26 syntax why not efficient net V2 oh we 5:00:29 could do 5:00:31 that Daniel says hi oh good name love 5:00:35 from India hello 5:00:38 hello can you post your GitHub link the 5:00:42 GitHub link is 5:00:44 here five more hours to go team we're 5:00:47 halfway 5:00:51 Woo is that 5:00:53 correct so we're not including the top 5:00:55 layers so let's have a look at this what 5:00:57 does this 5:00:59 mean where's the functional API 5:01:04 has this is the syn is the syntax here 5:01:06 correct a 5:01:13 Sheik there yeah it's correct okay I 5:01:16 forgot the Syntax for a bit I've been 5:01:17 writing pie torch code TF flow is a 5:01:19 little bit different 5:01:21 um so you still don't understand the 5:01:24 meaning of include top okay let's go 5:01:26 here online 5:01:31 whiteboard 5:01:33 look at all this ads just give 5:01:35 me a 5:01:38 whiteboard there we go okay so we have 5:01:41 this is a model and it's got 5:01:43 layers here okay this is our Baseline 5:01:47 model and when we download it we get the 5:01:50 whole thing right but when we set 5:01:52 include top we only get this section so 5:01:57 include top false we get rid of that so 5:02:00 we can put our own top on which which 5:02:02 means we're going to have an image here 5:02:05 of something and I know my face is in 5:02:07 the way hold on let me move my face over 5:02:09 here right this is our input image okay 5:02:13 that's going to go through the model and 5:02:16 the model's layers all of these patterns 5:02:19 here are going to be passed to our own 5:02:22 layer so in the case of the pre-trained 5:02:24 model it was trained on a thousand 5:02:26 different classes because you can see 5:02:28 that here that's on imag net imag net is 5:02:30 a a data set with millions of images 5:02:33 we're actually downloading a lot of them 5:02:34 now and it has a th000 classes in there 5:02:38 however with our problem we only want 5:02:40 two classes which is Anvil or aircraft 5:02:44 so we have the Baseline model here which 5:02:46 is all these layers poorly drawn but 5:02:49 when we set include top to be false we 5:02:51 remove that top layer which says 5:02:55 1,000 right 5:02:57 classes and we only want to put our own 5:03:00 layer on the top and say to so we still 5:03:04 get all the power of the 5:03:06 model's uh what it's learned and its 5:03:08 different weights on different images 5:03:10 but instead of outputting to decide is 5:03:12 this one of a th classes we're deciding 5:03:15 is this one of two classes does that 5:03:18 make sense so the same inputs same Bas 5:03:21 line here but now instead of an 5:03:24 outputting a thousand options we're 5:03:26 outputting two options so that's what 5:03:29 we're building at the moment and that's 5:03:31 a very poorly drawn one 5:03:33 but I've probably got a bit illustration 5:03:36 on my um tensorflow GitHub aik do you 5:03:39 know where the slides are for the 5:03:42 um Asik do you mind linking the slides 5:03:45 to 5:03:47 the um can you link the tutorial where 5:03:51 we do what's it not fine-tuning feature 5:03:55 extraction can you link the feature 5:03:57 extraction stuff in the chat please from 5:03:59 the tensorflow GitHub um now we're going 5:04:02 to do output 5:04:04 layer output 5:04:07 layer equals TF cares oh do we need 5:04:12 to could we use efficient net 5:04:15 V2 let's compare them that's what we can 5:04:18 use weights and biases for TF cares 5:04:21 layers 5:04:23 dense um we want two right because this 5:04:26 is our top layer we only want two 5:04:29 classes oh no we actually want 5:04:31 one because we're going to use a sigmoid 5:04:34 activation function because we're doing 5:04:35 binary class entropy um construct 5:04:40 model model one 5:04:43 equals um TF car's 5:04:48 model um input 5:04:52 layer now this is probably going to 5:04:55 be 5:04:56 busted input layer output 5:04:59 layer cuz there's probably an error here 5:05:02 that's right I haven't even included X 5:05:06 there build a model do we need an 5:05:08 activation function for the output 5:05:11 here I don't think 5:05:15 so I can't remember now let's have a 5:05:18 look at our model model one what error 5:05:20 did we get did we get error 5:05:23 yeah inputs to a layer should be tensors 5:05:26 why is that not 5:05:31 working 5:05:40 uh inputs to a layer should be tensors 5:05:43 oh input 5:05:45 layer 5:05:52 oops there we go okay now let's have a 5:05:55 look at our 5:05:56 model um from 5:06:00 carers TF carers do U tools import plot 5:06:08 model 5:06:11 hey what's Cara's 5:06:14 utils Cara's plot 5:06:31 model 5:06:36 pip install pie 5:06:53 dot oh we need to restart 5:06:56 this will that 5:07:01 matter yeah why not we're going to 5:07:03 install weights and biases anyway okay 5:07:04 let's start to let's start getting 5:07:06 weights and biases ready this is uh a 5:07:09 time stamp for getting weights and 5:07:11 biases set up pip 5:07:21 install um restart 5:07:24 restart restart that's all 5:07:29 right let's install this pip install P 5:07:31 Dot 5:07:33 pip 5:07:36 install uh weights and biases 5:07:45 hey did I do an uppercase 5:07:50 K that's all 5:08:00 right oh I have to install a bunch of 5:08:03 different things I have to install graph 5:08:22 viz I'll be shocked if this 5:08:28 works I'm going to just YOLO install 5:08:31 this 5:08:36 there should be a YOLO 5:08:39 install there we go installed graph is 5:08:42 let's get weights and biases up and 5:08:44 running weights and biases 5:08:53 tensorflow 5:08:55 clear weights and biases a knit 5:09:01 paramedic 5:09:08 try the collab okay we're going to set 5:09:09 up weights and biases to 5:09:20 track here we 5:09:22 go weights and 5:09:30 biases and we want hyper parameters 5:09:33 defaults config that's what we can 5:09:58 do yeah so they set up a config this is 5:10:00 going to be great okay 5:10:03 that way we can compare efficient net v0 5:10:05 and efficient net 5:10:28 one yeah I had to install a bunch of 5:10:31 things for 5:10:33 we're getting weights and biases then I 5:10:35 need to weights and bias a 5:11:00 knit 5:11:07 import 5:11:15 WMBB let's get a lot of code on the 5:11:17 screen and and make a really fun face so 5:11:19 we can get a thumbnail for this 5:11:22 video thumbnail like should we go hack a 5:11:25 mode 5:11:29 like I need to find a thumbnail for this 5:11:31 video so there we go it looks like we're 5:11:33 doing a lot of coding here 5:11:38 thumbnail okay so we're going to get 5:11:40 weights and biases working so we can 5:11:42 compare two different 5:11:44 models but now let's make sure all of 5:11:47 this runs can we import weights and 5:11:49 biases yes we can okay so we 5:11:56 want how did they do that 5:12:00 here 5:12:02 add a few lines to any tent tolow script 5:12:04 so weights and biases per 5:12:23 dictionary Waits and biases tensive flow 5:12:30 guide 5:12:32 what's this one 5:12:35 saying can we use a functional 5:12:54 API we still got images downloading and 5:12:57 we still got plenty of time so this is 5:12:59 this is where we're 5:13:00 going 5:13:07 load files from 5:13:10 Drive okay I'm going to turn my screen 5:13:12 off for a second while I log into 5:13:15 weights and biases so just give me a 5:13:17 moment hey move this chair so we look 5:13:22 professional let me log into weights and 5:13:30 biases 5:14:00 for 5:14:06 I'm just authorizing my weights and 5:14:07 bias's 5:14:17 account signing in with 5:14:22 GitHub hello 5:14:30 aquid 5:15:00 for 5:15:21 I'm just logging into 5:15:23 a entering an API key 5:15:30 here 5:16:12 okay I think I've logged in let me just 5:16:14 make sure that 5:16:16 that key is not 5:16:30 there 5:16:32 going to stop 5:16:35 this project 5:16:40 equals 100K live 5:16:43 stream 5:16:58 modeling oh yes team what 5:17:25 on Okay 5:17:30 so 5:17:33 we've now got weights and biases up here 5:17:35 let me just bring you back on Welcome 5:17:38 Back who was that one person who do I 5:17:41 have any web or mobile development 5:17:43 background no I'm only machine learning 5:17:46 one person who disliked the video well 5:17:49 we don't have 5:17:50 that surely no one would dislike this 5:17:57 video okay weights and biases where are 5:17:59 they using 5:18:04 next you import the weights and biases a 5:18:30 net 5:18:39 so that's what we want to do sync tensor 5:19:00 board 5:19:10 sink tensor board 5:19:30 yes we on 5:19:48 that hey this is with tensorflow one 5:19:52 dude why you using tens oflow 5:20:00 one 5:20:17 weights and biases 5:20:20 sync tensor 5:20:30 board 5:21:00 for 5:21:07 this is what I want tensor 5:21:26 flow is this going to automatically log 5:21:30 if this aut automatically loads I'm 5:21:59 done let's find out together 5:22:19 hey let's build the 5:22:29 model 5:22:31 plot model so this is what's happening 5:22:34 now uh do we have include 5:22:43 shapes uh tend to flow car's plot 5:22:54 model uh yes I'm going to be 5:22:59 deploying 5:23:06 I'm going to be deploying with 5:23:07 tensorflow light tensorflow JS show 5:23:10 shapes that's what we 5:23:16 want there we go so this is what happens 5:23:20 we have our images that go into 5:23:21 efficient net efficient net outputs a 5:23:23 feature Vector of size 1280 so that 5:23:27 means that our efficient net model is 5:23:29 going to turn every image that we put in 5:23:30 into it into a feature Vector of 1280 5:23:33 size so uh one big array of numbers 5:23:38 that's 1,280 numbers long then we're 5:23:41 going to global average pull that to 5:23:43 condense it to a single Vector smaller 5:23:46 Vector which is this the output of that 5:23:48 and then we're going to condense that 5:23:50 again 5:23:50 into uh another output Vector of shape 5:23:55 one but I feel like we could have 5:23:57 another layer in 5:23:59 here that's all right we're to condense 5:24:01 it all we'll see how the model 5:24:03 trains first so let's 5:24:08 compile this will be interesting will 5:24:10 weights and biases track 5:24:14 this if it does I'll be interested I'll 5:24:17 be very surprised we still downloading 5:24:20 images we are still downloading 5:24:23 images compile model model. compile loss 5:24:28 equals TF carers losses we want binary 5:24:32 cross entropy because we're doing a 5:24:34 binary 5:24:35 function uh model one we need an output 5:24:38 fun output activation that's what we're 5:24:40 missing I thought we were missing 5:24:42 something sigmo did someone miss that 5:24:44 did someone get that activation equals 5:24:49 sigmoid model. compile Optimizer we're 5:24:53 going to use our faithful 5:24:56 atom TF carries 5:24:59 optimizers do atom uh learning rate can 5:25:03 be the 5:25:04 default and metrix 5:25:07 [Music] 5:25:08 equals 5:25:12 um 5:25:15 loss no accuracy that's what we 5:25:22 want what why is metrix getting 5:25:27 angry 5:25:29 ah now let's fit the 5:25:34 model history 1 equals model one do fit 5:25:39 we're going to fit on the train 5:25:42 data how many Epoch let's do 10 let's do 5:25:46 25 5:25:47 EPO it's going to go pretty quickly but 5:25:50 we'll use early 5:25:53 stopping um 5:25:57 create early stopping 5:25:59 callback 5:26:03 now what we want to do is 5:26:07 um make sure so early stopping means 5:26:10 that once our model starts to get worse 5:26:13 it's going to stop 5:26:15 so patience equals 5 if it doesn't 5:26:19 improve on 5:26:23 Metric monitor I believe it is Monitor 5:26:26 equals if it doesn't improve on the Val 5:26:28 loss validation set 5:26:31 oh we're not going to have a validation 5:26:32 set are we if it doesn't improve its 5:26:37 loss do we have a validation 5:26:42 set yeah we do we will we'll validate on 5:26:45 the test 5:26:47 data um epox equal 25 validation data so 5:26:53 our model's going to train on the 5:26:54 training data it's going to validate so 5:26:55 it's going to so it learns on the 5:26:57 training data and then it tests itself 5:26:59 on the validation data or the test data 5:27:01 that's where we created a trainer test 5:27:04 set so um let's go test 5:27:10 data and then we want to go callbacks 5:27:14 equals early 5:27:16 stopping who's ready to fit the first 5:27:19 model will this if this I don't know if 5:27:22 this is going to upload to weights and 5:27:24 biases actually let's let's give this a 5:27:26 model 5:27:28 name name 5:27:33 equals efficient 5:27:37 Net v 5:27:42 0 5:27:45 V1 5:27:47 compile 5:27:50 epox let's go 5:27:57 50 ready 3 2 1 5:28:01 fit oh we get an error what did we get 5:28:05 wrong here oh my 5:28:10 goodness look at this input zero is 5:28:13 incompatible with layer efficient 5:28:15 net expected 5:28:18 shape what is 5:28:21 this 5:28:24 223 ah who caught 5:28:27 that of course it was me coding that 5:28:30 wrong we're fitting okay first model 5:28:33 time stamp first model Tim stamp first 5:28:36 model oh Tor flows out look how fast 5:28:39 this is 5:28:42 going done okay our model is uh 5:28:45 performing at 100% accuracy so that is 5:28:49 insane model one. 5:28:51 evaluate test 5:28:54 data okay our model performs at 100% 5:28:57 accuracy great we've built a first model 5:28:59 how goes that 5:29:08 what would you do with situations where 5:29:09 you're absolutely stuck uh with two to 5:29:12 three things with the same deadline so I 5:29:16 would 5:29:17 uh do I need to use yeah log for weights 5:29:20 and biases you're 5:29:22 right but there's no 5:29:24 clear statement here that tells me how 5:29:27 to use a 5:29:29 log 5:29:38 how do I turn off these 5:29:59 warnings 5:30:16 please don't give me so many updates T 5:30:18 to FL look at 5:30:19 that okay the GPU is very 5:30:26 quick okay 95% accuracy that's pretty 5:30:29 darn good I'm happy with that weights 5:30:32 and 5:30:41 biases we've built a test model how 5:30:44 good's 5:30:59 that 5:31:22 let's get tensor flow tensor board logs 5:31:25 if you go to learn tenser flow.io it's a 5:31:29 book 5:31:37 tens 5:31:42 board uh aik uh when I'm stuck for 5:31:45 different things I would um just pick 5:31:49 one focus on 5:31:59 one create tensor flow 5:32:02 callback I knew I had one of 5:32:09 these so we're going to copy 5:32:22 this oh my goodness why does it do that 5:32:25 every 5:32:29 time 5:32:58 um 5:33:12 so now we're going to import helper 5:33:17 functions we can delete helper functions 5:33:20 one are we still downloading data oh the 5:33:24 data is finished we've got food 5:33:27 images we've got images people we can 5:33:30 start to build a bigger 5:33:33 model so now we're going to do that in a 5:33:36 second we got to finish we're going to 5:33:37 get weights and bias is logging up here 5:33:40 still nothing 5:33:47 here call 5:33:58 back 5:34:11 dur name Target 5:34:25 dur experiments equals let's do 5:34:30 create a 5:34:58 dictionary 5:35:02 I think this might 5:35:18 work is that how I do 5:35:21 it see this is why you write a book so 5:35:24 you can come back and reference your own 5:35:28 code 5:35:30 thank you yes please oh it's snack time 5:35:34 did the timer go off no 5:35:47 ready okay here we go this is how we're 5:35:49 going to get tensor board 5:35:56 logs 5:35:58 okay 5:36:22 let's see if this 5:36:28 works 5:36:45 okay how did this guy did this log into 5:36:46 weights and 5:36:58 biases okay we a warning from weights 5:37:00 and biases when using several event 5:37:28 logs so now let's go 5:37:58 here 5:38:28 for 5:38:44 Waits and bies you need a you need a 5:38:46 better guide 5:38:47 here weights and biases sync tensor 5:38:51 board don't just tell me to right sync 5:38:54 tensor 5:38:58 board 5:39:05 syn tensor board equals true 5:39:28 huh 5:39:58 for 5:40:05 tensor 5:40:28 board 5:40:48 there we go okay we're 5:40:58 on 5:41:06 okay now we can try fishion net V2 but 5:41:08 now we need a bigger data set okay we've 5:41:09 got more data this is 5:41:14 exciting hey the cadina what's going on 5:41:18 uh I am working on building a machine 5:41:20 learning application called food not 5:41:22 food and you can find the GitHub code 5:41:24 there we're building a machine learning 5:41:26 model and we're going to deploy 5:41:28 it uh 5:41:31 using um 5:41:34 tensorflow and we we've downloaded a 5:41:37 data set that's what we've spent the 5:41:38 past 5 hours 5:41:41 doing is downloading a data 5:41:46 set so now we've got data imag net 5:41:49 images we need to split our images 5:41:53 into uh food and non food images so how 5:41:57 about we do 5:41:58 that and I'm sick of getting all these 5:42:00 tensorflow 5:42:06 warnings let's go 5:42:07 [Music] 5:42:19 logs 5:42:21 yes now I wonder now cuz we've got 5:42:24 tensor tensor board up and 5:42:27 running if we load our data and build 5:42:29 another model will this 5:42:32 upload to tensor 5:42:36 board cuz we've got tensor board running 5:42:46 here I W to make 5:42:49 it I W to make it with 5:42:58 you 5:43:02 hey we're 5:43:03 on there we go okay look at 5:43:28 this 5:43:43 GPU 5:43:58 yes 5:44:27 for 5:44:57 for 5:45:25 will this 5:45:27 work 5:45:29 if we can't get it to work I'm just 5:45:31 going 5:45:57 to 5:46:18 now is this going to be on weights and 5:46:27 biases 5:46:57 for 5:47:01 okay I'll be back in a 5:47:27 sec 5:47:45 I actually don't know I'm not using 2.7 5:47:48 I actually don't know why this is not 5:47:52 working weights and biases log tensor 5:47:57 board logs 5:48:25 do I need to write a custom Training 5:48:27 Loop 5:48:45 um I'm 5:48:49 perplexed let's just get into writing I 5:48:52 thought we were going to be able to use 5:48:53 weights and biases pretty easily but it 5:48:55 turns 5:48:56 out I thought last time I used 5:49:00 was easy as 5:49:15 pie that's what I'm missing 5:49:27 log 5:49:29 will that work if I just 5:49:45 say hey there we go what was I missing 5:49:57 before 5:50:06 okay okay we've got some we've got some 5:50:08 reports here now let's now do the 5:50:13 same oh we got a 5:50:17 timer you know what that means we got 10 5:50:20 push-ups 10 squats 10 kicks 10 punches 5:50:23 we're going to start building a big 5:50:24 model because deployment needs to 5:50:27 happen we're going to start building the 5:50:29 model after this one 5:50:41 sec 10 5:50:55 squats 10 5:50:57 kicks 5:51:04 five 5:51:09 more 10 5:51:16 punches okay time to build a big 5:51:20 model next thing we're going to do is 5:51:22 just test while efficient net V2 is not 5:51:24 big enough the model's already 5:51:26 performing too good on our small data a 5:51:28 set so let's 5:51:32 now I think I need to 5:51:35 call weights and biases a knit sink 5:51:38 tensor board every time I run it but 5:51:42 that's all right okay so now we need to 5:51:47 merge a back kick for some 5:51:53 variety we can get back kicks baby okay 5:51:57 so let's 5:51:59 um let's move the 5:52:03 data so we need to copy 5:52:06 these 5:52:08 paths now we need to filter we need to 5:52:11 filter out our I'm going to sit down 5:52:16 now hello I'm a very small version of 5:52:21 myself and now I'm getting bigger and 5:52:23 bigger hello I'm 5:52:27 back 5:52:33 okay now let's filter out image net data 5:52:37 sets so we did data exploration before 5:52:41 that can be canned we need to start 5:52:42 training a big model we've got a small 5:52:44 model our modeling code works on a 5:52:46 binary classification problem which is 5:52:48 what we want because we are doing food 5:52:50 not food binary classification and now 5:52:52 we have uh a a bajillion images let's 5:52:57 use use them so uh 5:53:01 timestamp we're going to filter the imag 5:53:04 net images now timestamp we're filtering 5:53:08 the images from 5:53:10 imet so let's now let's have a look how 5:53:14 many images do we have 5:53:18 total um OS 5:53:21 walk and image files equals 5:53:25 boom os4 5:53:28 do 5:53:30 subd uh files in OS Walk we're going to 5:53:35 go into data and then image net images 5:53:39 we need to people we need to keep this 5:53:41 on track all 5:53:43 right do I not have 5:53:47 OS we're keeping this on 5:53:54 track now let's have a look how many 5:53:56 image files we have 5:54:00 a 5:54:27 thousand 5:54:35 there's all the files that we have but 5:54:37 it's really a lot more than 5:54:39 that so we want to 5:54:57 append 5:55:27 for 5:55:35 so let's see how many images that we 5:55:40 have we got a list of 5:55:42 lists where's our list 5:55:47 code Su list I need to bring this back 5:55:49 over 5:55:56 here 5:55:58 hey Adam welcome to the 5:56:00 stream uh can we Implement PCA using 5:56:02 tensorflow GS probably I'm pretty sure 5:56:05 I've never done it tensorflow.js is 5:56:09 uh basically just a JavaScript version 5:56:12 of tensorflow find 5:56:15 um sub 5:56:19 list there we 5:56:26 go 5:56:53 we have 50,000 images people this is 5:56:55 what's up let's do that let's 5:56:58 let's build a we've got enough images to 5:57:00 build a model let's build a model Hy so 5:57:05 let's get the class names 5:57:08 so image 5:57:11 does 5:57:15 equals uh image does. 5:57:21 append I want to move I want to reix 5:57:24 this data set so it's 5:57:26 just 5:57:30 we've got 50,000 images who's ready to 5:57:32 build a big model uh LS 5:57:36 clear unless we're in data we want to 5:57:40 move 5:57:42 data imag net images imag net 5:57:48 images um all to data imag net 5:57:56 images 5:58:26 for 5:58:37 there we go we got a thousand different 5:58:39 classes so now we've got image files and 5:58:42 we are also going to 5:58:45 get image do 5:58:52 equals 5:58:56 um 5:59:12 hey why in that aend 5:59:26 subdo 5:59:56 all 6:00:16 so we have image 6:00:26 doors 6:00:48 okay here's our classes and now what we 6:00:50 need to do 6:00:53 is we've got a big food list so 6:01:03 food 6:01:08 class are the names in 6:01:26 there 6:01:32 we got a, 1,999 6:01:36 different 6:01:46 classes why is 6:01:56 that 6:02:11 okay now let's start filtering some 6:02:13 data give us the mullet haircut heading 6:02:16 to sleep Alex thank you so 6:02:21 much thank you for joining in Legend 6:02:23 good night my 6:02:26 friend 6:02:28 this is uh this is vs code Jupiter 6:02:31 running Jupiter notebook so now we need 6:02:32 to here's what we need to do we need to 6:02:34 move images 6:02:38 from 6:02:41 uh we need data we need to 6:02:47 make train and test 6:02:54 folders 6:02:56 okay 6:03:26 for 6:03:46 this is what we need we need 6:03:50 data train 6:03:56 images 6:03:59 and we need 6:04:08 data test how long we got left about 4 6:04:11 hours beautiful that's exactly what we 6:04:18 need okay and then this image inside 6:04:21 here is going to be food images and non- 6:04:24 food 6:04:25 images so let's do 6:04:29 that we need to bring our model building 6:04:32 code 6:04:50 here I'm going to make a data splitting 6:04:56 notebook 6:05:06 so we want to turn this into team we're 6:05:09 on the up here we've got we've got data 6:05:11 we've got model code we've got 6:05:13 everything that we 6:05:26 need 6:05:41 and then I'm going to claim this all up 6:05:43 after the 6:05:56 Stream 6:06:26 for 6:06:55 for 6:07:04 okay don't run this cell cuz that's 6:07:05 already run however we need to 6:07:25 filter 6:07:43 okay we want food do food class 6:07:55 name 6:08:09 going to call this food list 6:08:25 filter 6:08:45 boom 6:08:46 baby 6:08:51 everybody do some 6:08:54 dancing do some Romance 6:08:58 okay now we need to 6:09:02 split our images from imag net images 6:09:15 into um 6:09:17 move food images to food images 6:09:24 folder so let's go 6:09:33 here imag net downloaded image 6:09:50 folders so these are the images that we 6:09:53 have 6:09:55 downloaded 6:10:03 equals folder name do lower for folder 6:10:11 name I'm going to lower them 6:10:15 all 6:10:19 lowered 6:10:25 done 6:10:34 get list of 6:10:39 downloaded imag 6:10:43 net class folder 6:10:52 names move food 6:10:55 images 6:10:58 from 6:11:05 imet downloaded folders 6:11:10 to 6:11:14 data gav what's going on my 6:11:21 friend uh grav I use uh screen flow to 6:11:25 record my course videos 6:11:29 and the cool zoom in are all from 6:11:31 editing did I set another timer We we 6:11:34 forgot to set a timer team that's all 6:11:40 right okay 6:11:43 so let's 6:11:55 go 6:12:05 four image folder in imag 6:12:09 net 6:12:19 if if um image 6:12:24 folder in 6:12:29 foodless 6:12:55 filter 6:13:03 oh we're on here figured out how to do 6:13:06 it D equals we're going to uh OS we're 6:13:10 going to make a 6:13:12 d I'm going to call it image folder 6:13:15 exists okay equals 6:13:18 true 6:13:25 um then we're going 6:13:28 to No we're going to make doors 6:13:35 of destal 6:13:38 os 6:13:44 path desk uh image 6:13:55 folder 6:14:25 for 6:14:54 oh that's what I need to do as well 6:15:02 follow up tweet 6:15:07 saying actually did 6:15:10 this 6:15:16 post uh always start we're going to join 6:15:20 the image 6:15:21 folder 6:15:23 list 6:15:25 h 6:15:31 and then 6:15:35 for image to 6:15:39 copy in images to 6:15:44 copy copy 6:15:55 to 6:16:14 I love writing 6:16:18 code we get the last 6:16:23 one we'll print this out first print 6:16:55 for 6:17:25 for 6:17:54 for 6:18:24 for 6:18:54 for 6:18:56 hm Jesus how are you vasal thank you so 6:19:03 much I appreciate it 6:19:19 Legend 6:19:24 ah 6:19:54 for 6:20:24 for 6:20:51 [Music] 6:20:54 B 6:20:58 here we go 6:21:01 everybody Japanese 6:21:24 cayen 6:21:34 uh I don't 6:21:37 use yeah Amar you're totally correct 6:21:40 lower case is an issue but now there's 6:21:42 this 6:21:54 h 6:22:01 rashan how are you uh I don't use a Mac 6:22:04 for training no I use a 6:22:07 GPU what are we doing today we're 6:22:09 building a full stack machine learning 6:22:11 application called food not food you can 6:22:15 find the code on GitHub uh and the notes 6:22:17 on notion and all the code will be up 6:22:19 there by the end of 6:22:21 today so we're trying to copy some 6:22:24 images 6:22:29 what's happening here let's step back 6:22:30 through the 6:22:54 code 6:23:24 for 6:23:27 ah I see what's 6:23:29 happened it's just 6:23:52 stopping need to bring the for Loop out 6:24:24 for 6:24:54 for 6:25:06 stream stream looks like it's coming 6:25:08 back 6:25:09 online let me know if I'm 6:25:23 back yes thank you so much 6:25:27 Amar you're so 6:25:31 right thank you I'm back I'm back I'm 6:25:34 back I'm 6:25:54 back 6:26:06 what do you reckon here 6:26:21 Amar oh did that just restart everything 6:26:29 oh goodness I'm going to have to rerun 6:26:30 all of this 6:26:54 code 6:27:24 for 6:27:54 e 6:28:04 there we 6:28:20 go we got 6:28:23 it thank you Amar I appreciate 6:28:37 that uh my brother is still coding in 6:28:39 Swift 6:28:40 so stay tuned for 6:28:51 that but I don't know enough Swift Swift 6:29:23 for 6:29:36 why is this making a 6:29:53 new 6:29:56 food images okay this is what I want to 6:30:04 delete 6:30:23 so 6:30:47 thank you PTI I appreciate that 6:30:53 Legend 6:31:23 for 6:31:42 ah I 6:31:53 see 6:32:23 for 6:32:27 [Music] 6:32:38 thank you aash I really appreciate 6:32:53 it 6:33:23 for 6:34:23 for 6:34:53 for 6:35:23 for 6:35:34 okay we need to copy all the images to 6:35:37 here I think we've got it 6:35:53 now 6:35:58 why doesn't it make a new 6:36:00 folder for 6:36:23 Japanese 6:36:28 there we go Team food 6:36:32 images loaded 6:36:38 locked now let's do non food 6:36:45 images move food images from 6:36:50 imet 6:36:53 to 6:37:03 now time to do the same for the non- 6:37:05 food 6:37:23 images 6:37:53 for 6:37:58 there we go Team non- food images 6:38:00 filling 6:38:03 up let's get out of that data 6:38:23 splitting 6:38:46 okay we're 6:38:49 on uh 101 food image data set created 6:38:51 from image Vice Versa 6:38:56 I'm not sure I think foodo 101 wasn't 6:38:58 created from imag net so now we're going 6:39:01 to oh it's still 6:39:23 copying 6:39:52 now 6:39:55 we just want to 6:40:07 extract we don't care about the classes 6:40:10 the class name is 6:40:15 there so let's write down some pseudo 6:40:18 code 6:40:19 [Music] 6:40:22 move extract food 6:40:26 images files and move to food 6:40:43 images do the same with 6:40:50 test okay I'll be back um um I train 6:40:54 models on the cloud and I also train 6:40:56 models on uh my deep learning PC and 6:41:00 Google 6:41:22 collab 6:41:52 you 6:41:55 thank 6:42:00 you 6:42:07 okay background to 6:42:16 White some people ask for dark mode at 6:42:18 the start of the 6:42:21 Stream So we switched a mode for the 6:42:24 rest of the 6:42:33 stream 6:42:47 jeez what do you reckon light mode for 6:42:49 the rest of the stream 6:42:52 team let let me know in the 6:42:56 chat well this is even we W wigging me 6:42:59 out 6:43:01 okay 6:43:03 so now we have to 6:43:06 move we just need to adjust this a 6:43:08 little 6:43:10 bit let's get all the files in the in 6:43:13 the food 6:43:15 images so food 6:43:18 image file 6:43:20 pods equals OS 6:43:41 H for 6:43:47 D um OS 6:43:52 walk 6:44:04 light mode or 6:44:14 no we're going off light 6:44:22 mode there we go okay I got to used to 6:44:25 dark 6:44:28 mode do aen 6:44:30 files and now let's have a look 6:44:34 at we've literally spent 5 hours 6:44:37 manipulating 6:44:38 data that's all 6:44:42 right 6:44:52 um 6:44:59 python get list of all 6:45:22 files 6:45:35 there we 6:45:52 go 6:46:13 yeah 6:46:15 boy now how many food images do we have 6:46:20 2,800 so we're going to need to pack 6:46:22 that up we're going to need bump those 6:46:23 numbers up a bit for model 6:46:27 building damn what are your opinions on 6:46:29 the metaverse no idea uh I'm actually 6:46:32 sort of not a fan I prefer the real 6:46:34 world metaverse to me really doesn't 6:46:37 have much 6:46:44 appeal okay so now we want to just get 6:46:49 the copy 6:46:52 this 6:46:55 let's randomly get a train and 6:46:57 test 6:47:22 split 6:47:52 for 6:48:07 there we go train and test 6:48:22 done 6:48:52 for 6:49:22 yeah I'm not a fan of the Met verse or 6:49:24 Facebook's version of 6:49:26 it just put it this way do you trust 6:49:31 Facebook I know they renamed to meta but 6:49:33 do you trust 6:49:52 Facebook 6:49:54 there we 6:50:06 go move to train and 6:50:22 test 6:50:51 for 6:50:54 so we're going to take in a path of 6:50:58 images Target 6:51:21 d 6:51:51 for 6:52:21 for 6:52:51 for 6:53:21 for 6:53:51 for 6:54:07 oh 6:54:17 man so it's going to Loop through 6:54:21 this 6:54:26 let's just rewrite this from scratch CU 6:54:29 I need some different logic 6:54:51 here 6:55:21 for 6:55:37 oh I need to get rid 6:55:40 of I only want to 6:55:51 copy 6:56:16 thank you so much when is next machine 6:56:18 learning monthly coming out uh machine 6:56:20 learning monthly is on hold for the time 6:56:22 being while I make other videos cuz 6:56:23 machine learning monthly is the videos 6:56:26 only last like a week then they're 6:56:27 irrelevant you know so I want to make 6:56:29 more longer lasting stuff image file 6:56:51 name 6:57:21 ah 6:57:51 for 6:58:21 for 6:58:51 for 6:59:21 for 6:59:51 for 7:00:21 for 7:00:43 there we go team we got 7:00:51 this 7:00:59 this could really be functionalized but 7:01:01 we're just we're just hacking along 7:01:03 here we need to get a model 7:01:21 training 7:01:38 what are we at 7 hours this is beautiful 7:01:40 we're about to get our first big dog 7:01:42 model 7:01:45 training 7:01:50 hey 7:02:20 for 7:02:25 hey so ham what's going on uh we're 7:02:28 building a 7:02:29 model we're building a full stack 7:02:31 machine learning application called food 7:02:33 not 7:02:35 food what's the timer going 7:02:39 on if you go to my 7:02:42 GitHub 7:02:44 repos food not food you can see it 7:02:50 there 7:02:52 but we need to get this model built why 7:02:54 is it taking me so long to split this 7:02:58 data let's functionalize 7:03:20 this 7:03:50 for 7:04:20 for 7:04:47 thank you thank you thank 7:04:50 you okay how's it going thank you going 7:04:54 excellent we're on a roll we're on a 7:04:56 roll image file name oh my goodness what 7:04:59 do we need to do here Target 7:05:01 dles food 7:05:05 images we're 7:05:20 on 7:05:25 oh nice thank you thank you thank 7:05:30 you there we go we got 7:05:50 images 7:06:20 for 7:06:26 why didn't that 7:06:50 work 7:07:20 for 7:07:50 for 7:08:10 praise the 7:08:12 Lord okay we're on I know I've said that 7:08:15 a lot but we are actually on here we can 7:08:17 just do the same 7:08:19 [Music] 7:08:20 for 7:08:50 for 7:09:00 there we 7:09:09 go okay now we have two classes who's 7:09:13 ready to build a big dog 7:09:17 model I'm going to get a drink of water 7:09:19 I'll be back 7:09:50 oh 7:09:55 we're back time is going 7:10:06 off let's build a big dog model eh don't 7:10:09 forget discounts are live go and see the 7:10:13 discounts 7:10:20 there 7:10:30 OKAY model 7:10:42 time I can do some movement I got a 7:10:44 mouthful of 7:10:45 food but I'm ready to build a 7:10:50 model 7:10:53 listen to that s 7:10:56 pelo this stream is not sponsored by S 7:10:58 pelo but if they would like to you know 7:11:01 where to find 7:11:10 me I'm going to finish my food first 7:11:12 hold 7:11:20 on 7:11:50 for 7:11:53 we 7:11:54 have 50,000 images ladies and gentlemen 7:11:58 welcome to the 7:12:02 stream 50,000 downloaded images have a 7:12:06 got 7:12:10 that 43,000 training images 10,000 7:12:13 testing images we can of course upgrade 7:12:16 it the classes are a little bit 7:12:17 imbalanced but that's all 7:12:20 right 7:12:21 it's time to build a big big big big big 7:12:23 big big dog 7:12:26 model who's ready okay 7:12:30 so this this stream contains coding 30% 7:12:33 and eating drinking 7:12:38 70% 5% Kung Fu which Speaking of which 7:12:42 we 7:12:44 got we have some push-ups and kicks and 7:12:48 punches to 7:12:49 do 7:12:52 10 push-ups we're at the 7 hour mark 7:12:55 time to build a big model I don't know 7:12:56 how long this is going to take the train 7:12:58 but we got a big dog GPU down there and 7:13:00 we're going to push it to the 7:13:13 Limit 10 push-ups what was the other one 7:13:16 10 7:13:19 squats three 7:13:21 four five six 7:13:26 seven8 9 10 get some back kicks 7:13:32 going one two three four four 7:13:39 over five six left foot 7:13:45 one 7:13:47 two 7:13:49 three four 7:13:53 five six okay 10 punches one two three 7:13:57 four five six 7 8 9 10 energy is back to 7:14:03 me and now we ready to build a 7:14:06 model let's go big dog 7:14:09 model we'll start with an efficient net 7:14:12 B 7:14:14 zero 7:14:16 um or 7:14:18 V2 V1 7:14:22 and let's 7:14:24 see how long this is going to 7:14:28 take 7:14:31 running and let's get 7:14:33 a Nvidia 7:14:37 SMI 7:14:40 and 7:14:49 watch 7:14:54 how do you 7:15:08 do Nidia SMI 7:15:19 watch that's it 7:15:22 watch 7:15:26 N1 Nvidia SMI so this is the GPU it's 7:15:31 currently got all of its memory used 7:15:34 let's 7:15:35 see if we run this big dog model what's 7:15:39 it going to do binary cross 7:15:42 entropy early 7:15:45 stopping and we're going to train for 7:15:47 some 7:15:49 AO how many Apo should we train for 7:15:51 maybe start with five to see how long 7:15:53 it's going to 7:15:54 take weights and biases is not defined 7:15:57 oh we we 7:16:10 reset we reset weights and 7:16:18 biases who's ready to train 7:16:24 sync tensor board 7:16:28 go loading create tensor board callback 7:16:32 is not 7:16:33 defined 7:16:42 classic we're only really going to 7:16:46 get there we go we need 7:16:49 to 7:16:56 let's train this model 7:17:13 team uploading 7:17:17 data watching Nidia SMI 7:17:29 oh look how fast that's 7:17:33 going the GPU is 7:17:37 pumping oh my gosh already had an 7:17:40 accuracy of 7:17:41 93% the Titan 7:17:45 baby look at the Titan loading okay we 7:17:48 we can probably train for a few EPO here 7:17:50 turns out 7:17:55 holy crap now this is fast this is on 7:17:58 50,000 7:18:04 images mind you the images have been 7:18:06 already trained 7:18:11 on hey what happened 7:18:18 there he's waiting by is logging 7:18:28 this oh we're training here look at this 7:18:31 we're training live there we 7:18:36 go train 7:18:39 step we've got Epoch 7:18:48 loss compute how's the compute G 7:18:53 CPU where's the GPU utilization there we 7:18:56 go that's what we want to see 80% GPU 7:19:01 usage GPU memory allocated 80 7:19:05 99% team we're going good very 7:19:12 good validation 7:19:19 training 7:19:28 have a go with that now how do I add 7:19:31 some panels 7:19:38 here yes this is 7:19:44 beautiful we got a lot of warnings being 7:19:46 pumped out here but that's 7:19:49 okay 95% accuracy is pretty darn 7:19:57 good Val accuracy is 7:20:04 95% hey atoro what's going 7:20:08 on hey couple burpees just for fun we'll 7:20:11 do burpees 7:20:15 next 60 7:20:19 minutes okay look at this this is 7:20:21 beautiful we 7:20:24 have GPU is 7:20:28 pumping actually putting the Titan to 7:20:30 use case now okay so we're looking at 7:20:32 about 95% accuracy that's good enough 7:20:34 for 7:20:38 me we do have a large class 7:20:46 imbalance we're getting far too many 7:20:48 warnings for my liking Elon Musk oh 7:20:51 thank you so much for tuning 7:20:53 in I love what you're doing with 7:21:01 Tesla there we 7:21:04 go training Epoch accuracy is pushing 7:21:07 towards 7:21:19 100% 7:21:24 Doge man the Doge man taking everyone to 7:21:26 the Mars okay look at the Titan just 7:21:29 humming along like no 7:21:33 tomorrow let's get a model from this 7:21:41 hey we can 7:21:47 save save model 7:21:58 convert model to TF 7:22:19 light 7:22:28 any resources there good morning from 7:22:31 India 7:22:34 hello you can start this you need to 7:22:36 know TF to build the 7:22:40 model the GitHub is 7:22:43 here have we done 5 epox 7:22:46 yet how's our model going on the test 7:22:49 data 7:22:54 we got a model performing at 95% 7:22:56 accuracy that's enough for 7:23:02 me uh but 7:23:12 we let's go 7:23:19 length 7:23:29 so we only have 2,200 food 7:23:33 images 7:23:37 versus 41,000 non- food images so that's 7:23:40 what we're going to have to fix up we're 7:23:41 going to have to 7:23:44 increase let's increase how many food 7:23:46 images that we have food 101 can I get 7:23:50 the food 101 data set in the 7:23:57 house 7:24:07 um should we do that or focus on 7:24:10 deployment 7:24:12 first let's just get it working deployed 7:24:15 version working and then we 7:24:17 can uh build a 7:24:22 then we can build a bigger 7:24:29 model do save um food not food model 7:24:48 v0 7:25:06 there we go now we can 7:25:12 convert to TF 7:25:18 light 7:25:34 food not food model 7:25:48 v0 7:26:02 saved Model D TF light 7:26:18 converter 7:26:28 do we have a tensorflow light 7:26:32 model we have a TF light model ladies 7:26:34 and Gentlemen let's do it let's see if 7:26:35 we can get this deployed 7:26:40 now so to get this 7:26:44 model do we have a timer running yes we 7:26:47 do okay there's the way and 7:27:02 biases let's now go to um 7:27:18 reppel 7:27:24 let's go food not 7:27:41 food going to 7:27:48 delete 7:27:50 now the classes for this will be one 7:27:55 is food two is not food I think let's 7:28:01 check the 7:28:05 order train data. Class 7:28:18 names 7:28:27 yeah you're so right isn't the Baseline 7:28:28 accuracy already 95% due to 7:28:31 imbalance um yes you're 7:28:35 right we do need to fix 7:28:48 this 7:28:50 we'll fix it in a 7:29:00 second Aman thank you for that and same 7:29:03 same with you 7:29:04 artoro uh let's go class 7:29:09 weights we can pass the class 7:29:17 weights where do we pass them 7:29:25 class weights go into the fit 7:29:48 function 7:29:56 let's scale the 7:30:00 weights can you all see 7:30:18 that 7:30:37 um 7:30:48 equals 7:31:04 I'm going to scale the class for now 7:31:06 because they're going to be different 7:31:08 either 7:31:15 way uh yes that's actually right 7:31:21 one so it's going to be food non food 7:31:23 and 7:31:48 then total samples and then we go food 7:32:18 samples 7:32:48 for 7:33:06 there we 7:33:09 go uh weight for zero is 7:33:18 food 7:33:31 well they're going to come in like that 7:33:33 aren't 7:33:48 they 7:33:59 since we 7:34:08 have uro thank 7:34:14 you hey why is 7:34:18 this 7:34:48 for 7:35:18 for 7:35:26 shouldn't they add to 7:35:47 one 7:35:58 now what do we got we got class weights 7:36:00 let's see how this influences the 7:36:01 training 7:36:17 run 7:36:22 aik welcome back good to see you my 7:36:24 friend class weit 7:36:26 so adjust for different numbers of 7:36:31 classes so let's see how this adjusts do 7:36:34 we have weights and biases tracking the 7:36:36 history 7:36:39 here no 7:36:47 thanks 7:37:17 for okay they're the only ones we want 7:37:20 to look 7:37:21 at we just want to only look at Splendid 7:37:46 dream let's upload weit and 7:37:54 bies we're going to get a new 7:38:15 run okay we're going nice and fast here 7:38:18 team 7:38:24 the Titan a Sheik have a got this the 7:38:26 Titan is training like a 7:38:29 beast so let's see where we can 7:38:32 go we got different Darkness six and 7:38:36 Splendid dream we want to see which one 7:38:38 does better does the class weight affect 7:38:40 how our model is 7:38:47 training 7:38:51 let's put a note in 7:39:14 here yeah so the class weight is 7:39:16 changing it it's not as performing as 7:39:19 good but that's what we 7:39:22 want wonderful okay so this model is 7:39:24 going to be a bit more 7:39:27 robust and the metrics uh the metrics 7:39:30 are are more uh aligned with how the 7:39:34 model's actually going I'll be 7:39:47 back 7:40:01 how you going with 7:40:17 it 7:40:29 okay so this is much more reflective of 7:40:31 how our model's going I think we need 7:40:33 some more food 7:40:36 images 7:40:45 so we're getting about 80% accur that's 7:40:48 all 7:40:49 right youres how are 7:40:53 you farz how are you what do you mean by 7:40:56 Basics tensorflow course um the modeling 7:40:59 is not too advanced the collecting the 7:41:01 data we went through a fair bit to get 7:41:03 the data because this is a custom 7:41:05 project so uh we don't necessarily have 7:41:08 a data set ready to 7:41:09 go now let's 7:41:13 start comparing the models yeah 7:41:17 see 7:41:19 Splendid dream was overfitting because 7:41:22 we didn't adjust the class 7:41:24 weight now different 7:41:31 Darkness I think we more need more 7:41:33 images of 7:41:47 food 7:42:02 isn't it fun just to watch models 7:42:04 train who wants to just sit here and 7:42:06 watch this model train for a couple of 7:42:08 minutes no we have things to do so this 7:42:11 is probably going to be our model it's 7:42:13 training at a very good rate about a 7:42:14 minute per Epoch cuz the class weight is 7:42:16 adjusting the training time 7:42:28 yeah we're getting a lot of warnings 7:42:30 here I'd like to turn them off 7:42:31 permanently cuz they're distracting so 7:42:33 we're getting about 80% accuracy which 7:42:34 is pretty good 7:42:38 um and it's adjusted for the class 7:42:40 imbalance so 7:42:42 let's let's save the 7:42:47 model 7:43:03 and then we'll get it converted to TF 7:43:17 light 7:43:20 will you be able to fast and stream for 7:43:22 10 hours I've already had some food in 7:43:24 this stream and I've been drinking tea 7:43:27 and 7:43:29 whatnot but I could probably fast and 7:43:31 stream for 10 hours 7:43:33 yeah um let's go 7:43:35 [Music] 7:43:39 to let's get another 7:43:42 terminal aless we want to upload our 7:43:45 food uh GSU to do I have GSU to here 7:43:54 clear let's create another 7:43:56 bucket so I'm going to upload my model 7:43:59 to Google storage and we have done 7:44:01 six 7 hours we've got just over 2 hours 7:44:06 left team this is beautiful so we got 2 7:44:09 hours left to deploy a model Easy Money 7:44:17 console 7:44:22 so I'm going to create a 7:44:25 bucket so if you haven't used Google 7:44:27 Cloud that's 7:44:30 okay create bucket and let let's call 7:44:33 this food 7:44:36 Vision 7:44:38 food not food or actually I'm going to 7:44:41 call I'm going to use one of my existing 7:44:43 buckets so we don't 7:44:44 have uh model playground 7:44:50 food Vision model 7:44:55 playground 7:45:02 continue I'm creating a Google storage 7:45:04 bucket because that that way we can host 7:45:06 our model on Google storage which will 7:45:07 be very good um now I can upload this to 7:45:12 food Vision model 7:45:14 playground okay LS we're going to upload 7:45:17 this using in Google 7:45:19 storage so um 7:45:22 gsutil copy food not food you're 7:45:27 starting to see how we could script this 7:45:29 up V1 7:45:32 tflight uh 7:45:34 GS food Vision model 7:45:37 playground so we got a 15 megabyte 7:45:40 model uh I reckon we can get that 7:45:45 smaller who thinks we could get that 7:45:47 smaller 7:45:53 we should probably do that with tentor 7:45:55 flow light 7:45:57 model TF light model 7:46:01 maker cuz we're using the full scale 7:46:04 efficient net we might want to use 7:46:06 efficient net 7:46:09 light okay so let's get that model uh 7:46:13 thank you Kevin I appreciate that I 7:46:14 think we can do it um let's get a 7:46:17 smaller model 7:46:27 building uh ashik you're pretty confused 7:46:29 with the Google bucket so the Google 7:46:31 bucket is literally just a hard drive on 7:46:33 the internet so rather than uh me going 7:46:36 hey I've got this model on my local 7:46:38 machine and every time you go to a 7:46:39 website like say on your phone and the 7:46:42 website going to try and query my local 7:46:44 machine we store it on a cloud storage 7:46:46 provider so that because there's so many 7:46:49 they have so many data centers around 7:46:51 it's a lot it loads a lot faster to 7:46:53 whatever device you're using so rather 7:46:55 than relying on my server here or my 7:46:58 hard disk to upload something to the 7:47:00 internet and then you take it which you 7:47:01 could do uh we upload it to a 7:47:04 centralized system and then that way 7:47:06 that centralized system is able to load 7:47:08 the the model 7:47:10 faster 7:47:13 so yeah that's the main reason we do 7:47:15 that but let's uh let's 7:47:20 now we're going to build a smaller model 7:47:22 in a 7:47:26 second so we should have a model 7:47:29 here there we go food not food model 7:47:32 says 15 megabytes which is probably too 7:47:35 big for me under 10 megabytes is 7:47:37 probably better but we're going to make 7:47:38 this 7:47:41 public uh public can read it so now you 7:47:45 should be able to download this this 7:47:47 model 7:47:48 so if we go to 7:47:51 collab and this is what I mean this is 7:47:54 the reason it's public now so you should 7:47:57 be able to the reason why we make it 7:47:59 public is so that if someone visits a uh 7:48:02 a website and say food not food.app 7:48:05 which is what we're building they can 7:48:06 download it like 7:48:09 this W get so the website when you visit 7:48:13 it food food.app is going to download 7:48:16 the model just just like that see how 7:48:19 quickly that downloaded that's that's 7:48:20 the power of storing it on 7:48:23 Google and Amazon S3 is much the same uh 7:48:27 I think Azure call it blob storage or 7:48:30 something like that but that's generally 7:48:34 what you 7:48:36 want so the way this is going to work is 7:48:39 we now have uh We've downloaded a data 7:48:41 set we've built a model and now it's up 7:48:44 to we're up to the deployment 7:48:46 part so 7:48:48 timestamp model deployment timestamp 7:48:52 model 7:48:59 deployment uh let's go here we've 7:49:02 collected a data set we've modeled the 7:49:04 data set we need to build the 7:49:05 application we're going to do both of 7:49:06 these at the same time build and deploy 7:49:09 we could deploy with 7:49:16 gradio 7:49:19 uh yes you got to pay for Google storage 7:49:21 buckets but Google storage is very cheap 7:49:24 let's have a look at 7:49:26 this Google storage 7:49:33 pricing look at this Cloud Storage 7:49:36 storage is cheap online compute is what 7:49:38 costs 7:49:39 you uh pricing 7:49:42 tables look at this per gigabyte per 7:49:45 month so what's our model is 15 mbes so 7:49:49 it's not even standard storage our model 7:49:53 is 15 mbes so divide that by a 100 so 7:49:56 it's costing us 2 cents a month to store 7:49:58 this model you will pay some transfer 7:50:00 fees so when the the model loads but 7:50:03 that's again pretty small so right now 7:50:05 it's costing us less than 2 cents per 7:50:09 month does that make 7:50:12 sense or less than 2 cents per month cuz 7:50:14 that is 2 cents per month 2 cents per 7:50:16 gigabyte 7:50:18 so that's that's what you need to know 7:50:21 about Google storage so now it's public 7:50:24 but we also do need to change the cause 7:50:26 setting so this is something I ran into 7:50:28 the other day cause setting cause policy 7:50:31 Google storage bucket so cross origin 7:50:33 resource sharing so excuse me too many 7:50:37 bubbles in the S pelina so if you think 7:50:41 about this from a security perspective 7:50:43 if we if I've just made this file public 7:50:45 and yes you can download it but what if 7:50:47 someone wants to use that maliciously so 7:50:50 what cause does is um I can set my 7:50:53 bucket cause so that if you try to load 7:50:56 this model in your own website it won't 7:50:58 actually work for you cuz I haven't 7:51:00 approved it so even though it's public 7:51:02 you can download it using W get um but 7:51:06 you won't be able to load it in a 7:51:07 website let me give you uh an example of 7:51:10 that so we got to start coding an app 7:51:13 food not 7:51:15 food we want this 7:51:19 classes I'm going to get rid of that 7:51:27 delete so this is some code 7:51:31 here to download a model and run 7:51:35 inference with tensorflow 7:51:39 JS so this is the only stuff I'm not 7:51:41 skilled in JavaScript so this is what I 7:51:43 prepared earlier I'll leave links to 7:51:45 where I I got this from but this is 7:51:49 what's going to allow us to load tons 7:51:50 oflow JS now if we get rid of 7:51:54 this model let's no let's upload our 7:51:58 other one before 7:52:00 we upload 7:52:02 file 7:52:04 code food not 7:52:14 food oh that's right food not food is 7:52:16 not local 7:52:23 LS yes we can do this actually so come 7:52:27 back into 7:52:28 here if we run this look what's going to 7:52:32 happen so tensorflow JS is loaded this 7:52:35 is all this HTML does let me just step 7:52:37 through this line by line tensorflow so 7:52:39 let's call this food food not food food 7:52:42 not 7:52:44 food hello 7:52:46 world 7:52:50 P this app will tell you 7:52:55 if the image you upload is food or 7:53:01 not right this is all it's going to 7:53:04 do watch 7:53:10 this Kevin says JS oh yes Kevin thank 7:53:14 you so much well I probably will have Js 7:53:16 questions I need to learn more about JS 7:53:19 see I'm I'm a bit more on the ml side of 7:53:21 things but uh less knowledge well barely 7:53:24 any knowledge about JS like it took me 7:53:27 you don't know you don't want to know 7:53:28 how long this took me to figure out how 7:53:30 to write this script of uh loading a 7:53:32 model and then just creating a simple 7:53:35 button to upload a 7:53:38 um an image took me a long time but 7:53:42 that's all 7:53:44 right and we got javascripts importing 7:53:46 okay I'm going to step through the HTML 7:53:48 code first cuz the way a website works 7:53:50 is you have HTML code is going to 7:53:52 structure things so that's going to give 7:53:53 you like the the frame it give you the 7:53:56 title it'll give you the text it'll give 7:53:58 you the the button whatnot uh CSS is 7:54:02 style so that'll give you colorful right 7:54:04 now I've got no CSS so hence this is 7:54:06 just text on a page but that's my style 7:54:09 I'm just making literally the most Bare 7:54:11 Bones app that I can and then the 7:54:13 JavaScript is the the logic behind it so 7:54:16 um HTML structure CSS style JavaScript 7:54:21 is the logic behind your website so what 7:54:24 we want to do is the HTML I'm just going 7:54:26 to build it like with some plain text 7:54:28 then the JavaScript is going to give us 7:54:30 the opportunity to upload an image here 7:54:34 um yeah image 7:54:36 uploading and then the tensorflow JS 7:54:39 model which will sorry tensorflow.js 7:54:42 package will allow us to load our 7:54:44 tensorflow light model because 7:54:46 tensorflow JS is now compatible with 7:54:48 tensorflow light uh could we load a full 7:54:51 scale model in here using pure 7:54:52 tensorflow probably not you probably 7:54:54 want to you do want to convert it to 7:54:55 tensorflow why because tensorflow JS is 7:54:58 going to run directly in the browser 7:55:00 that means that our model is going to 7:55:02 work rather than sending data to an API 7:55:05 which could be slow it's going to work 7:55:07 directly on whatever device you're using 7:55:09 in the browser so it's going to work 7:55:11 within Google Chrome it's going to work 7:55:13 within Safari on an iPhone whatever the 7:55:16 browser is on an Android app um yes 7:55:21 that's all it 7:55:22 does that's it 7:55:26 it'll tell 7:55:29 you it'll use a computer vision machine 7:55:33 learning 7:55:35 model 7:55:36 to does that make sense a Sheik let me 7:55:39 know if you have any questions uh to 7:55:41 classify your 7:55:44 image uh as 7:55:48 food or not 7:55:52 food so basically if you want to 7:55:56 learn we could build it through an API 7:55:59 but for me that's not the best personal 7:56:01 experience because people often have to 7:56:02 wait to upload data and then it has to 7:56:04 be computed somewhere else then it has 7:56:06 to come back why not just do it on the 7:56:07 device they're working 7:56:09 with um run 7:56:16 that 7:56:43 and this repple repple is just a website 7:56:51 uh that allows you to write code and 7:56:52 have it quickly refreshed in the browser 7:56:54 we could do all this locally but I'm 7:56:55 just doing this on repple 7:57:16 so 7:57:45 for 7:57:49 there we go okay now this is not going 7:57:52 to and now so if we go back through here 7:57:54 uh the HTML we've got some upload image 7:57:56 code uh we have a label we have an input 7:57:59 input creates a button so now I can 7:58:02 upload a file 7:58:06 mushrooms there we go 7:58:09 undefined wonderful now it's going to be 7:58:11 undefined because I just changed class 7:58:13 names in here food not food 7:58:25 and then we have predicted class and 7:58:27 predicted probability and now we also 7:58:29 have a couple of script tags here what 7:58:32 this script tag here tells us to do is 7:58:34 to load this is um tlow JS right so we 7:58:39 load that from cdnjs deliver CDN is 7:58:42 content delivery Network JS deliver is 7:58:44 like um to me I understand it as like 7:58:47 it's similar to pip in Python so JS 7:58:50 deliver is going to give us an mpm 7:58:51 package which is a node package is that 7:58:54 correct Uh Kevin so it's like loading in 7:58:57 um uh pandas like pip install pandas for 7:59:01 me this is like pip install tensorflow 7:59:04 JS but the JavaScript equivalent version 7:59:06 of that then we do the same but for tfjs 7:59:08 TF light so this is going to give us uh 7:59:11 compatibility between tensorflow JS and 7:59:14 TF light because that was a recent 7:59:15 upgrade in tensorflow uh now TF light 7:59:18 models work with tfjs or supposedly they 7:59:21 do and so the reason why this model 7:59:24 works is because we've got TF light 7:59:26 there so um we've got this here but if 7:59:31 we wanted it to load from the website 7:59:35 Google storage we could put in a URL 7:59:37 there so now let's do 7:59:43 that okay so mpm I don't know what mpm 7:59:46 stamps for but Kevin's saying that npm 7:59:50 hosts JavaScript scripts as well as 7:59:54 um uh packages so not necessarily pure 7:59:59 node so now let's try to load the model 8:00:02 in 8:00:04 from 8:00:06 um I want 8:00:08 to maybe we go to terminal I want to 8:00:11 download 8:00:14 it so w get do I have W get 8:00:22 installed let's just get 8:00:29 it okay we've got the model 8:00:32 now I want to just give you an example 8:00:34 of what's going to 8:00:36 happen so we downloaded the model this 8:00:38 is just the same model that we hosted in 8:00:40 Google 8:00:44 storage a come on man 8:00:47 so we've got our tensorflow light model 8:00:49 here we've just trained that so now 8:00:51 there the same one in Google storage if 8:00:53 we want to copy the URL we can do that 8:00:57 go back to the 8:00:59 repple can that can that can that we do 8:01:02 need to update the cross region uh 8:01:04 origin policy so look there's the model 8:01:13 code right but if we add the model in 8:01:16 here 8:01:18 let's see if this 8:01:20 works upload 8:01:25 file 8:01:27 downloads oh no 8:01:29 code food not 8:01:32 food we just want to get this working 8:01:35 and then we can go on from 8:01:42 there could I learn to do deep learning 8:01:44 projects without very expensive machine 8:01:46 yes you can you can use Google collab 8:01:49 for 8:01:52 free mpm is like 8:01:56 pip yeah yarn is basically a wrapper for 8:02:00 npm so now we have food not food model 8:02:03 which is not going to open of course 8:02:05 because it's a TF light model I'm not 8:02:07 even sure what that structure is but now 8:02:09 let's load in 8:02:12 this we'll copy the 8:02:15 path 8:02:27 so we 8:02:28 want 8:02:30 food not food model 8:02:34 b1. TF 8:02:43 light so let's see if it loads the model 8:02:50 model loaded look at that team who's 8:02:55 ready who's ready to test out the 8:03:03 model uh yeah so Canal you can 8:03:06 definitely start just start with Google 8:03:07 collab and uh um kaggle so we've got the 8:03:11 model food not food can H1 tags have 8:03:15 emojis 8:03:19 um let's go 8:03:28 burger or 8:03:31 burger 8:03:39 no 8:03:43 run model loaded okay we need to find 8:03:46 let's let's get a random what should we 8:03:48 try um 8:03:50 truck image of a 8:03:57 truck let's 8:04:00 go truck is our sanity test oh and we 8:04:03 had the beautiful food that Georgia 8:04:05 cooked us before so I'm going to use 8:04:08 that as the sanity test to see if this 8:04:10 works truck. 8:04:12 jpeg upload 8:04:15 image where we want 8:04:18 desktop 8:04:20 truck hey where'd that truck file 8:04:38 go 8:04:40 desktop truck. jpeg we're on let's 8:04:45 see 8:04:47 script error oh what did we get wrong 8:04:51 undefined converting int to float 8:05:03 32 the bottom 8:05:07 truck this one oh apparently yeah Ford 8:05:12 have released a new truck that's 8:05:13 electric I heard about that 8:05:17 so we've got a script 8:05:21 error what happens if we can 8:05:24 this and upload our truck 8:05:29 image do we still have a script 8:05:38 error okay that 8:05:45 works 8:06:15 for 8:06:17 okay we're getting a script error for 8:06:19 this one so there's probably something 8:06:20 wrong 8:06:22 here we're not getting any outputs when 8:06:24 we change the 8:06:29 model 8:06:32 run what outputs do we get here 8:06:45 truck 8:06:52 I think the image will be our issue will 8:06:55 be 8:07:12 here let's console log something here 8:07:18 we're got to this is so this is the 8:07:19 input output type so the error we've got 8:07:21 here is that our model is I'm pretty 8:07:23 sure our model is not accepting the 8:07:26 right type of uh 8:07:33 data 8:07:45 n32 8:08:10 so we're getting an error 8:08:12 here 8:08:14 undefined don't cast any 8:08:17 32 thank you 8:08:19 minu hatan you slept and you come 8:08:23 back I have just woken up to start the 8:08:25 day and I still can't believe the goat 8:08:26 is still riding go I'm still 8:08:29 here hey hey 8:08:44 hey 8:08:48 script error so we're getting something 8:08:49 wrong here let's let's console log the 8:08:53 image what does our image look 8:09:01 like we're doing some pre-processing 8:09:04 code 8:09:08 now 8:09:11 okay float 8:09:14 32 8:09:23 uh you can learn you don't need to do a 8:09:25 masters for machine learning you can 8:09:28 learn it online yourself that's how I 8:09:29 got started but of course like it's up 8:09:32 to you do you learn better on your own 8:09:33 or do you learn better in an 8:09:35 environment so shape is two dtype is 8:09:38 float 8:09:41 32 8:09:44 h 8:10:14 for 8:10:20 so we're troubleshooting our model here 8:10:23 I might if I still don't if I don't get 8:10:25 it correct we're going to 8:10:35 download 8:10:43 okay let's look at this um 8:10:49 tensorflow light model 8:11:11 input Objective 8:11:14 C 8:11:44 for 8:12:14 for 8:12:24 so TF light 8:12:35 converter yes I 8:12:41 did metan I did I did change the labels 8:12:45 here 8:12:46 food no 8:12:59 food I don't want to log the array image 8:13:05 sync console log 8:13:14 image 8:13:17 so we have a script error int 32 where 8:13:20 is int32 coming 8:13:42 from so image is 8:13:52 32 but the model 8:14:09 requires converting end flo2 to to float 8:14:14 32 8:14:23 whereas if we use the other 8:14:26 model what does that 8:14:44 say 8:14:48 warning converting 8:14:54 in what D type is required by this model 8:14:56 I thought it was float float 8:14:58 32 let's try float 8:15:14 32 8:15:24 script 8:15:44 error 8:15:50 what UT does tensor flow light model 8:16:11 T 8:16:14 H 8:16:16 so we go back to the model training 8:16:39 code TF float 8:16:44 32 8:16:47 efficient net model input type is float 8:17:03 32 so let's go back 420 we're going 8:17:08 [Music] 8:17:10 to 420 8:17:14 baby 8:17:21 the model is erroring on the prict 8:17:33 function hello from Madagascar 8:17:36 hello uh matanu you're so right the 8:17:39 nutrify app required un 8 that's why the 8:17:41 image was cast to 8:17:44 tensorflow 8:17:47 so we 8:18:01 want maybe I train the model in the same 8:18:14 way 8:18:18 but this is yeah this is strange CU see 8:18:20 how the D type comes in here I'm not 8:18:22 sure why the predict function didn't 8:18:44 work 8:18:46 TF light 8:19:14 converter 8:19:19 how to check input type to TF 8:19:43 l 8:19:46 uploaded 8:19:51 model let's upload a model 8:19:56 here we're going to check what our input 8:19:59 type is here food Vision food not 8:20:13 food 8:20:16 here we 8:20:18 go this is a cool 8:20:27 website float 8:20:43 32 oh we're 8:20:47 on shaking basket I thank you so much 8:20:50 you're a fantastic 8:20:56 help remove all pre-processing steps in 8:20:59 the error messages should say what shape 8:21:01 the data is 8:21:13 required 8:21:18 handstand push-up 8:21:33 time we got someone else moving in here 8:21:35 with 8:21:36 us 8:21:38 shape what if we choose another 8:21:43 file 8:21:45 well 8:21:52 done so the model model is buckling on 8:22:13 the 8:22:18 script 8:22:20 error and 8:22:43 then 8:23:13 for 8:23:22 undefined so the output is what's 8:23:43 buckling 8:23:50 okay we got to 8:23:51 move we're going to try that in a second 8:23:54 all right push-ups 8:24:05 time you 8:24:07 finished well done we're going to do St 8:24:10 jumps instead of squat this 8:24:13 time Georgia just finished her last 8:24:17 assessment well done 8:24:20 Georgia but we've still got just under 8:24:22 two hours left if this doesn't work 8:24:24 we're going back to the tensor flow 8:24:26 light model maker 10 punches we'll 8:24:29 finish off maybe another 8:24:31 five with this 8:24:38 okay one back flip at the 10 hour mark 8:24:43 okay 8:24:45 all right let's get this 8:24:49 deployed see we're running into a lot of 8:24:51 image 8:24:52 processing 8:25:01 errors did my internet just Buckle 8:25:08 out oh 8:25:13 no 8:25:18 okay we can't log the 8:25:22 model Jake what's going on my 8:25:26 friend yeah the shape supposed to be uh 8:25:30 if we have a look at the image shape it 8:25:31 gets reshaped 8:25:36 here so if we 8:25:42 upload the image gets shaped into that I 8:25:44 don't know what's going on 8:25:49 there okay we're going back to 8:25:54 down let me 8:25:57 know 8:26:01 okay I'm not sure what's going on let's 8:26:03 try to recreate the same model it's time 8:26:06 to move on because if we want to get 8:26:07 this deployed before the stream's over 8:26:09 we need to try and train it it a 8:26:11 different way there's something going on 8:26:12 with the predict function which I don't 8:26:13 know what 8:26:15 but let's get rid of the truck get rid 8:26:19 of this oh wait what was 8:26:38 that load and run a 8:26:42 uh okay let's try 8:27:02 okay let's try to run 8:27:10 this test run TF light model and if it 8:27:13 doesn't work we're going to go with the 8:27:15 tensorflow light model 8:27:43 maker 8:28:10 undefined just print the 8:28:13 output 8:28:18 you're so right but I'm trying to 8:28:30 here let's 8:28:42 see it's bu 8:28:44 the model is not taking the predicted 8:28:46 image in some way shape or 8:29:12 form thank you that's okay 8:29:33 okay here we go let's try 8:29:43 this 8:30:11 wow it's working 8:30:13 here 8:30:21 in 8:30:42 32 8:30:54 you 8:31:12 rocking 8:31:29 okay 8:31:32 let's input details it 8:31:36 takes shape negative 8:31:40 one D type 8:31:42 n32 8:31:50 in 32 let's try 8:31:53 that did we try that 8:32:11 already uh last commit was a a while ago 8:32:15 but I'm going to commit it all at the 8:32:20 end converting int 32 to float 32 why 8:32:24 why is it converting int32 to float 8:32:33 32 last commit let's commit some 8:32:42 code 8:33:12 for 8:33:38 no need to 8:33:42 cast 8:33:47 but still we're getting some sort of 8:33:48 error 8:34:12 here hey 8:34:15 matanu what do you think's going on here 8:34:18 we're getting int32 8:34:21 error script error it's happening at the 8:34:24 predict function it's breaking 8:34:29 here console let's log 8:34:39 this model 8:34:42 about 8:34:51 there something going on with the 8:34:52 function here let's train another model 8:34:54 let's get a let's get more data 8:35:02 hey it's breaking at the predict 8:35:06 function um let's let's use tlow light 8:35:09 model maker to train a bigger model and 8:35:13 I'm pretty sure that that'll 8:35:15 work so let's go get another 8:35:42 script 8:36:03 uh let's get more 8:36:12 data um we want food 8:36:21 101 so I think I have it stored in a 8:36:28 bucket in the TF 8:36:37 course food 8:36:42 vision all 8:36:45 classes let's go 8:37:02 here okay we're downloading more images 8:37:05 and in the meantime we're going to 8:37:09 build small 8:37:12 model 8:37:35 um need to turn these tens of flow 8:37:37 warnings 8:37:42 off 8:37:49 so while we're downloading some more 8:37:50 let's let's build a model with tent 8:37:52 tolow uh light model 8:38:12 maker 8:38:43 now we're just going to this is some Co 8:38:44 I prepared 8:39:12 earlier 8:39:42 oh 8:40:03 okay so let's this is this data is 8:40:06 almost 8:40:08 downloaded uh you could probably wrap it 8:40:11 in a try and accept 8:40:16 I guys I really appreciate the help by 8:40:18 the way thank you so 8:40:20 much I'm still 8:40:42 perplexed 8:40:55 you went 32 you 8:41:04 reckon Jake programming says convert to 8:41:07 u32 let's see what 8:41:12 happens 8:41:18 hey script 8:41:28 error Alexandra what's going 8:41:41 on 8:41:47 converting image 8:42:10 to so it broke there oh did I set the 8:42:13 timer again yes I 8:42:19 did Harry PR what's going 8:42:22 on so we're 8:42:25 downloading 8:42:26 uh we're downloading more food images to 8:42:29 make the model 8:42:33 better we're going to get this to work 8:42:35 team congrats on 100K man thank you so 8:42:41 much 8:42:49 tensor flow please set your logging 8:42:52 info to 8:43:06 nothing what do we got wrong 8:43:11 here 8:43:35 oh no we've run into a Cuda 8:43:41 error 8:43:56 we've got more 8:44:01 images prit hello sansar how are 8:44:11 you 8:44:27 so does this still 8:44:41 work 8:45:05 this still works come on 8:45:11 now 8:45:41 for 8:46:07 okay we're training a model now with Tor 8:46:09 flow light model maker uh but now we're 8:46:11 going to build a bigger data set set so 8:46:13 we 8:46:15 have 8:46:31 data I want to 8:46:41 unzip 8:46:49 beautiful these are all images of 8:47:04 food need to go to the bathroom be 8:47:11 back 8:48:09 the Titan's going incredibly 8:48:11 well 8:48:13 so we're inflating 100,000 food images 8:48:15 here from the food1 101 data 8:48:20 set and we're also training another 8:48:29 model no I'm using I'm sshing into my 8:48:34 deep learning PC which is 8:48:36 downstairs and I'm using that to 8:48:41 compute 8:48:59 and it's taking a little while now 8:49:01 because we're doing too many things at 8:49:02 once on the 8:49:08 CPU I going to get this image 8:49:11 ready 8:49:18 look at the beautiful food that Georgia 8:49:21 made for me 8:49:23 earlier this is our test 8:49:28 image right this is a delicious food 8:49:30 that Georgia made earlier so big shout 8:49:33 out to Georgia thank you and we're going 8:49:36 to put this on the 8:49:38 desktop and we're going to call this 8:49:45 food we need to open this up and Export 8:49:58 it food. 8:50:07 jpeg there we go this is our 8:50:11 test 8:50:16 I'm all selftaught yes Jake you're right 8:50:18 my JavaScript skills are terrible but my 8:50:19 python skills are pretty good um if you 8:50:22 want to go to find out what I did I 8:50:25 created my own AI master's 8:50:28 degree so I just went through a whole 8:50:30 bunch of online courses that that tells 8:50:32 me that tells you a lot about me and 8:50:36 then um start AI ml is's another one as 8:50:41 well 8:50:48 that's how I got 8:50:50 started we've been doing ml for about 4 8:50:53 years now so let's we just unraveled 8:50:58 100,000 images so 8:51:05 LS let's get let's upgrade 8:51:09 the food classes 8:51:15 to 8:51:16 get let's get an 8:51:19 extra 8:51:20 [Music] 8:51:33 um let's get an extra 20,000 data points 8:51:37 or an extra 8:51:41 30,000 8:51:44 yeah there we go okay we're going to 8:51:46 we're going to do this we're going to do 8:51:47 this 8:51:48 very we want to call 8:51:52 this food not food model 8:52:03 V2 that takes a little while to 8:52:10 convert we're going to let that run for 8:52:12 a 8:52:17 bit so we're going to go back to our 8:52:19 other 8:52:23 editor hey vs 8:52:35 code let's open 8:52:40 this 8:52:50 let's go to food not 8:52:51 food and then go add more food 8:53:03 images got more food 8:53:06 images to 8:53:10 load 8:53:15 balancing the data 8:53:20 sets so we want 8:53:25 to we' downloaded more data from food 8:53:32 101 now to 8:53:35 add more food images to the 8:53:40 model so let 8:53:44 let's get list of 8:53:47 food 101 8:54:07 images how's this going still exported 8:54:09 oh it's 8:54:10 exported 8:54:20 team it's about to start raining 8:54:23 here we're not leaving until this is 8:54:28 deployed load 8:54:39 image Tor flow 8:54:42 Cara's load 8:55:01 image oh 8:55:10 do 8:55:37 it 8:55:38 predicted non food image more 8:55:42 then food 8:55:46 image that's not 8:55:55 good yeah I wrote that 8:56:01 um the heck Elon Musk doing here uh Jake 8:56:05 programming yeah you're so right I wrote 8:56:07 that SJ Ral as a wizard I wrote that 8:56:11 when I first started to learn it since 8:56:14 then a few things have changed but when 8:56:16 I first started to learn AI uh SJ did 8:56:21 give me a lot of uh 8:56:27 inspiration so we need 8:56:29 more we need more non- food images so 8:56:33 that's what we're going to 8:56:34 do uh I haven't 8:56:38 done yeah 2017 so that's when I started 8:56:41 so 4 years ago and as you can see things 8:56:45 change but that's the beauty of having 8:56:47 that article documented when it's 8:56:55 documented LS okay let's 8:57:06 get 8:57:10 wait 8:57:19 sub once again we're 8:57:26 doing sir is it a good way to solve text 8:57:28 to text NLP Problems by doing one hot 8:57:30 encoding so uh no I would create an 8:57:34 embedding so Bol ad wait I'd look up 8:57:37 hugging face 8:57:40 um 8:57:42 hugging face 8:57:45 NLP hugging face NLP course I'd do 8:58:03 that food image paths equals we need 8:58:07 more food images 8:58:09 people equals um 8:58:24 I finished Milestone one of TF course 8:58:25 and want to do some small cfp 8:58:29 projects uh should I do something from 8:58:32 scratch or use transfer learning I'd try 8:58:34 start from scratch first and then use 8:58:35 transfer learning to improve it you'll 8:58:37 probably find transfer Learning Works 8:58:39 far better than from scratch so so for 8:58:42 file 8:58:44 in 8:58:46 files 8:58:59 um 8:59:10 join 8:59:15 there we 8:59:19 go hey 8:59:32 test 102,000 images 8:59:40 beautiful 9:00:10 for 9:00:40 for how to remove I haven't 9:00:44 created we're not using image 9:00:46 augmentation no do I have a plan to get 9:00:48 a master's degree 9:00:52 no uh have I created any course on 9:00:54 hugging face no use hugging faces 9:00:57 standard course on their 9:01:04 website I've lost some weight hope 9:01:07 you're I've actually gained some 9:01:10 weight 9:01:14 I'm about 5 kilos heavier than I was at 9:01:17 the start of the year 9:01:40 now 9:02:10 okay 9:02:16 there we 9:02:17 go food image paths let's get a random 9:02:24 10,000 9:02:27 get or 30,000 images that way we've got 9:02:30 a Balan class 9:02:33 Set uh import 9:02:37 random random seed 42 we need to create 9:02:40 a bigger data set to build bigger model 9:02:42 then we're going 9:02:46 to man which data set am I using I'm 9:02:49 using a custom data set one from imag 9:02:51 net and one from well about to be from 9:02:53 food 9:02:54 101 so let's 9:03:03 go 30k 9:03:07 random random 9:03:09 30k 30 image 9:03:12 paths 9:03:14 equals 9:03:16 random 9:03:18 dot 9:03:21 sample uh food image 9:03:24 paths 9:03:32 30,000 okay we have 30,000 more images 9:03:35 or actually let's make it 35k that way 9:03:39 it's closer to what did we get for the 9:03:40 difference lengths of data 9:03:48 sets let's open up model 9:04:05 building 41,000 so let's get an extra uh 9:04:10 38,000 9:04:25 so now we'll have 40,000 images of 9:04:27 each food and not 9:04:31 food okay now we want 9:04:39 to 9:04:42 so where did I do this I did this in 9:04:43 data 9:04:54 splitting data 9:05:09 splitting 9:05:23 I need to clean up this code don't worry 9:05:24 I'll clean it up after the 9:05:39 Stream 9:05:42 there we 9:05:43 go extra 9:06:09 images 9:06:28 copy images to file image list Target 9:06:39 d 9:07:02 okay we just we just inflated our data 9:07:09 set 9:07:21 copy three 9:07:30 oops okay we're copying data set there 9:07:33 we go we can now build another 9:07:39 model 9:08:09 for 9:08:30 now we've got more testing 9:08:33 data 9:08:39 word 9:08:47 beautiful we've got 880,000 nearly 9:08:50 100,000 total images now of food and not 9:08:52 food let's try in a 9:08:58 model here we go okay this is taking a 9:09:00 longer time this is 9:09:09 beautiful 9:09:23 now let's go back to 9:09:25 here add 9:09:29 file V2 of 9:09:39 code 9:09:58 did I say food not food model 9:10:09 V2 9:10:26 there we 9:10:39 go 9:10:58 see how this is much smaller this model 9:11:00 the V2 model but now we're also training 9:11:03 another 9:11:04 one a third 9:11:09 one 9:11:16 so the model made with tent tolow light 9:11:17 model maker is a lot 9:11:20 smaller hey did that not 9:11:26 work 9:11:32 completed uh this is not the same 9:11:34 project as a food Vision project on ztm 9:11:36 course it's close but not the same 9:11:53 so see we've reduced the model size here 9:11:55 by 5x that's pretty 9:11:57 good um now 9:12:09 let's 9:12:36 going to upload the version two of the 9:12:39 model and see how it goes predicting 9:12:42 food not 9:12:43 food who's ready to 9:12:48 go who's ready to make a prediction 9:12:52 let's do a time stamp time stamp 9:12:55 for making a prediction with model V2 9:12:58 we've tried again with the tensorflow 9:13:00 light model maker so this is a time 9:13:02 stamp for version two of the model made 9:13:04 with tensorflow light model 9:13:07 maker let's run this 9:13:12 loaded the 9:13:13 model upload 9:13:16 model we 9:13:21 need script error 9:13:39 again 9:13:45 there we 9:13:47 go what did we 9:14:09 get truck here we go prediction food 9:14:12 predicted probability 100% so I think 9:14:15 our classes are back the 9:14:22 front cuz let's change this we got a we 9:14:25 got a we got a prediction here team look 9:14:27 at this predicted class with the truck 9:14:29 now if we add up a photo of food. 9:14:36 jpeg food predicted probability 100% yes 9:14:39 okay 9:14:41 need um we 9:14:44 need is softmax the right one to 9:14:49 do 9:14:55 sigmoid tensor flow JS 9:15:09 sigmoid TF 9:15:19 sigmoid how's our other model going but 9:15:22 this is working the model is now working 9:15:23 look at this how exciting is this we've 9:15:26 got too much going on 9:15:31 here 9:15:32 sigmoid what does a sigmoid give 9:15:38 us 9:15:58 undefined so let's 9:16:04 go console log output values 9:16:08 Dot 9:16:38 food 9:16:52 we got it working in the browser 9:17:08 team 9:17:14 how's the model code going here okay 9:17:17 this is going 9:17:38 better 9:17:50 so let's 9:18:08 go 9:18:38 for 9:18:47 Benjamin Cullen what's going on oh of 9:18:49 course I'm not giving up my friend we 9:18:51 need to get this model deployed we need 9:18:52 to get everything 9:18:54 deployed let's save version three of the 9:18:57 model see if it works 9:19:08 better 9:20:08 for 9:20:38 for 9:20:41 okay so the 9:20:44 output we want the ARG Max of 9:20:50 zero maybe 9:21:08 get 9:21:38 for 9:21:58 so we need to fix up 9:22:08 the 9:22:20 output values. ARG Max is not a 9:22:38 function 9:22:58 how do I get the ug Max what happened 9:23:02 just 9:23:08 before 9:23:16 TF AR Max okay let's upload image model 9:23:24 3 while we're 9:23:28 here much 9:23:31 better so chicken wings 9:23:35 Works V3 is ready to go 9:23:43 so let's load up upload model 9:23:51 V3 and we're almost we're almost there 9:23:54 people we're almost 9:24:08 there 9:24:24 TF argmax is not a 9:24:38 function 9:25:01 oh it's TF ARG 9:25:08 Max 9:25:23 we're getting 9:25:38 closer 9:25:41 so this is Art 9:25:49 array oh we got to move we're into the 9:25:52 final 9:25:56 hour but is our final model 9:26:08 here 9:26:37 for 9:26:40 so we I need to move okay the final 9:26:43 Final Countdown is on we have 10 9:26:47 push-ups for the final 9:26:59 time we're going to do 10 9:27:02 lunges 9:27:04 one 9:27:06 2 9:27:07 3 9:27:09 4 9:27:11 5 9:27:13 6 9:27:15 7 9:27:16 8 9:27:18 nine 9:27:20 10 10 kicks one two back kick three I'm 9:27:28 going to boot this chair across the room 9:27:30 in a second 9:27:31 four five left one two three 9:27:39 four five 10 punches to finish off one 9:27:42 two three four five six seven eight nine 9:27:48 10 9:27:49 okay let's 9:27:51 keep Kevin you've been in here the whole 9:27:54 time my boy Legend do let's set one more 9:27:58 timer we're going to finish this we are 9:28:02 going to finish this this took longer 9:28:03 than I 9:28:05 thought ug Max okay why why can't we get 9:28:09 the ARG Max of 9:28:21 this output 9:28:23 values is not 9:28:27 outputting however we get the array 9:28:32 sync output zero let's try 9:28:37 that 9:28:53 script 9:28:56 error let's let's block that 9:29:00 out console log 9:29:07 output 9:29:37 for 9:29:42 predict output array sync array 9:29:48 sync output is not an 9:29:57 array matanu welcome back thank 9:30:07 you 9:30:16 okay that's all right that can stay 9:30:18 there but the output 9:30:21 is now I want to get the array ARG Max 9:30:25 of 9:30:36 this how did I calculate the 9:31:37 for 9:31:50 how do you turn this onto dark 9:32:07 mode 9:32:10 wrapp in TF AR Max yeah I've got that 9:32:13 here output do array 9:32:18 sync 9:32:20 done output 9:32:37 values hey there we 9:33:07 go 9:33:14 Halloween 9:33:22 baby there we 9:33:24 go ARG 9:33:37 Max 9:34:07 for 9:34:16 so now let's add the final 9:34:19 model TF 9:34:37 V3 9:34:48 not food okay there we go now we can 9:34:50 start to adjust the 9:34:53 code how much should we expect to earn 9:34:55 from machine learning it really depends 9:34:57 I have no 9:34:59 idea so now let's get rid of this I 9:35:03 don't want to log the 9:35:07 output 9:35:10 I want to 9:35:17 get output 9:35:25 values and I want to get I need to Sig 9:35:29 sigmoid this probably 9:35:37 actually 9:35:49 let's try this is it going to predict on 9:35:54 food 9:35:56 food 9:35:59 yes woohoo there we go team we finally 9:36:02 predicted on food okay now let's predict 9:36:05 the let's get the probability Hy no this 9:36:08 should 9:36:10 be 9:36:12 um output values should be if we go 9:36:19 to let's do TF soft 9:36:24 Max output array 9:36:32 sync and then we're going to 9:36:37 go this equals 9:36:41 argmax do eras 9:36:44 sync and thank you Matan Shu I 9:36:49 appreciate it my 9:36:50 Legend and then we want output values 9:36:57 Max let's 9:37:00 run choose file let's try 9:37:06 truck oh it failed out 9:37:21 again oh here we 9:37:30 go 9:37:36 run 9:37:39 not food 9:37:40 100% wo there we go time stamp time 9:37:45 stamp 100 now we're got to try it on one 9:37:48 more image and that's the 9:37:50 food predicted class food 9:37:54 100% W baby there we go team okay now 9:38:00 let's get this 9:38:02 onto um 9:38:06 GitHub so 9:38:09 we got one final step we need to host it 9:38:12 we need to host it how long do we have 9:38:19 left 9:42 okay can we get this hosted so 9:38:23 let's get the cause policy set for our 9:38:25 bucket so the cause policy allows us to 9:38:27 download different things 9:38:29 LS uh do we have cause. 9:38:34 Json 9:38:36 h 9:38:58 let's go 9:39:06 here 9:39:37 I need to figure out where twitch ml 9:39:40 deploy 9:39:42 is all my codes everywhere twitch ml 9:39:45 deploy there we go co. 9:39:50 Json I don't want to open 9:40:06 xcode 9:40:13 now let's go 9:40:36 code 9:40:38 so we're going to make this available 9:40:41 everywhere for an 9:40:48 hour we got it 9:40:57 loaded Pro tip unrelated use text 9:41:00 content for inner text for performance 9:41:03 thank you 9:41:06 Kevin 9:41:08 so if I just 9:41:11 go text content 9:41:36 here 9:41:41 Boom baby yeah 9:41:46 yeah console log output values 9:42:06 Dot 9:42:26 okay we still need to deploy the model 9:42:29 so we need to update the cause settings 9:42:30 of this 9:42:36 bucket 9:42:43 uh GSU tool set call so the CES allows 9:42:45 us to 9:42:47 download 9:42:52 um the model into 9:42:54 different platforms otherwise if if we 9:42:57 don't I'll show you what it's like 9:42:58 without the cause um Google storage set 9:43:06 cuse 9:43:13 uh set CES Json file name bucket name so 9:43:17 this is without setting the CES let me 9:43:19 show you what happens if we have the 9:43:22 model as a 9:43:24 URL so we have the model here we've got 9:43:27 the 9:43:28 URL if we go into our code let's get rid 9:43:31 of some 9:43:36 things so 9:43:38 so we want 9:43:41 here if we load our model with instead 9:43:44 of see how we we loaded it with a 9:43:47 string uh because our model is available 9:43:50 in the file format here we want to load 9:43:54 it with a Google storage 9:43:57 URL let's see what happens when we try 9:44:00 to load it using a 9:44:06 URL 9:44:22 we run we try to load the model it won't 9:44:25 it'll fail to fetch see what I 9:44:30 mean so that's what happens when we try 9:44:32 to load the 9:44:34 model from Google storage but of course 9:44:36 we won't always have this available so 9:44:39 that's why we have to set the cause now 9:44:40 if we set the cause Watch What Happens 9:44:43 um cause 9:44:45 config Json GS we want to set it on this 9:44:53 bucket so food Vision model 9:45:01 playground gsutil set CES CES 9:45:06 set 9:45:19 now if you go 9:45:23 GSU cuse get and then GS the bucket it 9:45:29 should have we can now do an hour worth 9:45:32 of these 9:45:33 requests uh from any origin with any 9:45:36 response header so let's have a look at 9:45:39 what this does now notice how just 9:45:41 before we had this type error failed to 9:45:43 fetch now this should work if we load it 9:45:46 from here 9:45:48 run might take a little bit to to kick 9:45:59 in still failed the 9:46:06 fetch 9:46:32 I thought this was going to work and it 9:46:33 didn't 9:46:36 work 9:46:40 see how we've loaded tensorflow uh JS 9:46:42 but we haven't loaded the 9:47:06 model 9:47:17 wait classic I thought this was going to 9:47:20 work but now it doesn't that's all 9:47:30 right we're going on Twitch ml 9:47:36 deploy 9:47:56 make sure we've got the same setup 9:48:06 here 9:48:16 type 9:48:32 error but if I change 9:48:35 this 9:48:52 to 9:48:57 this it gets 9:49:00 it let's try with a different photo 9:49:05 hey 9:49:20 Apple predicted class not food 9:49:25 what is it just fluking 9:49:35 now 9:49:38 oh my gosh my brain is so fried right 9:49:40 now 9:49:43 food predicted class 9:49:54 food okay well it worked on that but now 9:49:58 it's not uploading 9:50:05 to 9:50:20 now I wonder 9:50:22 if I 9:50:25 get this model does it 9:50:28 work no it won't 9:50:35 test 9:50:48 do we get the same 9:50:50 error twitch mloy last 10 mens that's 9:50:54 all 9:50:55 right we're going to fix we're going to 9:50:57 fix this we're going to get this 9:51:05 done 9:51:25 so if I put that in 9:51:28 there it doesn't load 9:51:35 either 9:51:54 24hour stream I'll be 9:52:05 back 9:52:35 h for some 9:52:37 reason it's not loading but that's all 9:52:40 right we'll fix it 9:52:43 up GS 9:53:05 till 9:53:35 why I cut my facial hair 9:53:37 I felt like 9:53:40 it we're approaching the 10hour mark and 9:53:42 I'm not leaving until this is 9:53:45 fixed I had this working I had something 9:53:48 very similar 9:53:52 working why did this fail to 9:54:03 fetch I look like a boomer with a 9:54:06 mustache 9:54:12 I look like a boomer with a 9:54:14 mustache uh 9:54:18 JS uh JS 9:54:22 deliver 9:54:26 TF I need 9:54:31 this I don't think this will change 9:54:33 anything but let's see if it changes 9:54:35 anything 9:54:47 [Music] 9:55:05 um 9:55:18 I've got the latest version here why is 9:55:20 the cause not working why is it all of a 9:55:22 sudden have an issue 9:55:26 when let's try and get it on Vel and see 9:55:29 what 9:55:35 happens 9:55:51 download a 9:55:54 zip I will get this 9:56:05 working 9:56:13 well let's just go to local actually 9:56:15 local and we'll 9:56:35 go 9:57:05 for 9:57:13 we'll copy the Java Script into 9:57:35 here 9:57:46 uh but I actually want this form of 9:58:05 Js 9:58:14 we're just copying some stuff from some 9:58:15 code I've already 9:58:20 written but we're going to get this 9:58:35 live 9:58:54 we're going a little bit past 10 9:59:05 hours 9:59:10 now let's deploy and see what 9:59:12 happens oh wait we need to add the 9:59:20 model this is the beauty of tend to flow 9:59:22 light the model's so 9:59:34 small 9:59:41 add the US file JS file I didn't add the 9:59:43 JS 9:59:45 file you 9:59:59 sure oh you're 10:00:04 right 10:00:23 let's go to our trusty 10:00:33 Vel look how easy this is to deploy now 10:00:36 team 10:00:38 v.com I don't want to create a team I 10:00:42 have my git repo 10:00:43 there it's going to 10:00:57 deploy here we go we should be 10:01:02 deployed woohoo let's open it up 10:01:06 up food not 10:01:10 food model 10:01:14 loaded 10:01:18 food 10:01:22 y 10:01:23 food oh it only took us the entire 10:01:26 stream to build but it is live time 10:01:30 stamp time stamp time stamp the 10:01:33 deployment there we go 10:01:37 food not food. Vel doapp is live people 10:01:42 okay now let's change the code a 10:01:45 little to I'm going to make it uh 10:01:50 Ls cuse I'm going to change this to this 10:01:55 URL now this should be able to 10:02:00 access we are live people fully deployed 10:02:04 check it out 10:02:11 get 10:02:13 uh 10:02:15 gsutil 10:02:17 cause set um cause config 10:02:23 GS we want our bucket to 10:02:31 be 10:02:33 clear and now let's 10:02:36 change the script here to use the model 10:02:40 from the URL and see what 10:02:44 happens get 10:02:47 add script.js get update script to use 10:02:55 uh oh 10:02:57 get 10:03:02 commit update script to use 10:03:07 tfjs uh TF light model from 10:03:14 bucket get push let's see if this does 10:03:17 anything now we're going to do the real 10:03:19 test I need to get uh let's do 10:03:23 camera we got a camera that's not food 10:03:25 and I'll get some actual food and we'll 10:03:27 see if we can 10:03:29 compare tried it with a BK burger and it 10:03:32 worked yes and beautiful so so let me uh 10:03:37 see if it works still I've just updated 10:03:40 the 10:03:47 bucket is the model going to load from 10:03:49 the bucket I think we might have an 10:03:50 issue 10:03:53 here it's not loading from the 10:04:04 bucket 10:04:08 a waiting tfjs 10:04:14 model okay so that's broken I need to 10:04:17 fix that but that's all right let's get 10:04:18 this out it's deployed if I if I don't 10:04:21 deploy it from there it's going to go 10:04:23 get add 10:04:26 script.js 10:04:28 get commit revert back to using local 10:04:35 model 10:04:37 get 10:04:46 push oh I didn't save 10:04:50 that I need to add up the index HTML 10:04:54 title 10:04:56 is food not food 10:05:00 app get add index 10:05:04 HTML 10:05:06 update HTML title and uh model 10:05:15 usage I've just changed the title I'm 10:05:17 going to go get a 10:05:20 um I'm going to go get food be 10:05:34 back 10:05:45 so we have two options 10:05:48 here we have some bananas and 10:05:50 blueberries as you can see I'm going to 10:05:53 take a photo of 10:05:56 these the title of the web page should 10:05:59 be updated 10:06:04 now and then I have then I also have a 10:06:08 camera I'm going to take a photo of 10:06:16 that so now let me just get those over 10:06:20 to 10:06:32 here offloading it 10:06:36 downloads date 10:06:40 modified so here's my camera 10:06:43 photo I'm going to export 10:06:48 that camera. 10:06:50 jpeg into food not 10:06:56 food and then here's my bananas and 10:07:04 blueberries bananas and 10:07:13 blueberries done 10:07:19 done how's the app going we still 10:07:25 working um where is 10:07:29 it food not food model is 10:07:33 loaded there you go there's his app so 10:07:36 we're got to choose a 10:07:38 file food not food we have 10:07:43 camera not 10:07:45 food 10:07:48 Y and then we have bananas and 10:07:53 blueberries not 10:07:59 food oh no why is that not 10:08:04 working 10:08:07 let's try it 10:08:11 again 10:08:14 um let's try another image of food that 10:08:17 I know that's food 10 Whole Foods train 10:08:20 banana 10:08:26 bananas not 10:08:30 food oh my 10:08:33 goodness not 10:08:37 food okay so we need some actual food 10:08:39 classes in the 10:08:43 model 10:08:47 food uh so the model is not very 10:08:53 good that's all 10:08:57 right let's try another 10:09:04 class 10:09:10 egg not food okay so I think it's 10:09:14 getting the images we need more food 10:09:16 images that's that's going to be the fix 10:09:17 for this but uh that's enough for the 10:09:21 stream let's go uh here I'm going to do 10:09:25 one more thing oh hello 10:09:27 bananas it's making me very hungry hey 10:09:30 look at that mustache happy movember 10:09:32 everyone I need to do one thing behind 10:09:34 the scenes 10:09:36 uh to really finish this app 10:09:41 off if you got any chat if you want to 10:09:44 have any questions we've nearly we've 10:09:45 nearly reached the end of it yeah we've 10:09:48 over fit I got to fix that but that's 10:09:50 all 10:09:52 right we've got a simple model 10:09:59 deployed hey arunava how are 10:10:04 you 10:10:09 so I'm doing one thing that's going to 10:10:12 just finish 10:10:20 up hot dog 10:10:26 worked I need 10:10:33 to 10:10:53 add some csss to it you 10:10:59 can 77 minutes if you want the 77 10:11:03 minutes stuff you can see here 10:11:23 um I need 10:11:33 advanced 10:11:43 I'm just updating something give me one 10:11:54 second I can't do this with my stuff on 10:11:57 the 10:12:03 screen 10:12:18 I do R 10:12:23 Jiu-Jitsu I love 10:12:26 Jiu-Jitsu someone says my uh explanation 10:12:30 is very 10:12:33 crazy 10:12:37 for my tensorflow course is that what 10:12:38 you 10:12:47 mean an ml engineer can be called a 10:12:50 developer in my opinion I doing a lot of 10:12:54 I'm doing a lot of developing 10:13:03 now 10:13:09 thank you Ryan NG I appreciate it being 10:13:13 subscribed thank you so much my 10:13:16 beautiful picture of cheese 10:13:33 worked wel computer's loing 10:13:37 lagging tell me if I'm still 10:13:40 live YouTube don't kick me off it's 10:13:42 right at the 10:13:51 end oh my 10:13:55 goodness right when we want to start 10:13:57 loading 10:14:03 stuff 10:14:25 thank you thank you I'm still 10:14:32 live so the app is deployed 10:14:37 and I believe it should also be so I'm 10:14:42 back here we go I've just started the 10:14:46 website food food.app 10:14:51 site can't be 10:15:02 loaded I think it's taken a little while 10:15:04 to propagate but if you go to Food 10:15:06 food.app 10:15:08 it's live 10:15:21 here is this going to work on 10:15:26 this it's 10:15:28 food yeah 10:15:33 baby 10:15:38 food yeah all right it's working okay 10:15:41 okay we're 10:15:44 good food not 10:15:52 food um let's try another 10:15:57 one 10:15:59 food 10:16:02 yes we are 10:16:05 live it's working for 10:16:07 me everyone the app's working for 10:16:10 you and then if we go to a new 10:16:14 tab if we go to food not food.app what 10:16:17 happens 10:16:33 here 10:16:35 is it working on Safari food not 10:16:38 food.app 10:16:43 yo selem what's going 10:16:49 on I'm not sure why food not food.app is 10:16:53 not 10:16:54 working let me go off stream for one 10:16:56 second I'd like to finish the stream 10:16:58 with this being 10:17:00 live might take about half an hour 10:17:03 to beef sample is 10:17:09 strong a 10:17:33 record 10:18:03 for 10:18:32 host why is this not working 10:19:03 for 10:19:09 maybe it takes a little while to 10:19:10 propagate 10:19:12 through it's 10:19:24 working model 10:19:28 loaded there we go 10:19:31 beef is this 10:19:33 food 10:19:35 food yeah yeah yeah 10:19:42 yeah 10:19:45 food okay team I think that's uh it 10:19:49 works for 10:20:02 you food not food.app 10:20:12 food food.app is working for you 10:20:24 guys can anyone confirm if food not 10:20:27 food.app is 10:20:33 working 10:20:40 well that's so 10:20:41 strange thank you Kevin for tuning in I 10:20:43 really appreciate it let's go to food 10:20:45 not 10:20:48 food not food.app 10:20:59 Kevin thank you so 10:21:03 much 10:21:07 so this if you guys go to this 10:21:11 website food not 10:21:14 food.app 10:21:17 it's 10:21:26 working okay I got to load this this is 10:21:29 the final 10:21:32 test 10:21:45 it's 10:21:47 [Music] 10:21:52 working food food.app is not working but 10:21:56 Vel is 10:21:58 working can we 10:22:02 confirm can we confirm is this link 10:22:10 working that link is 10:22:12 working and food notf food.app is that 10:22:21 working is this link 10:22:30 working someone confirming me if we 10:22:33 confirm that food not food is working in 10:22:35 the chat then we're done food notot 10:22:37 food.app 10:22:39 that is 10:22:44 crazy it's not working for me on either 10:22:56 device that is insane okay well 10:23:01 friends thank you so much for tuning in 10:23:03 to the 10hour 10:23:05 stream this was to 10:23:08 celebrate I for some reason look it's 10:23:11 supposed to be working there but it's 10:23:17 not that's 10:23:20 amazing we're all good I'm even trying 10:23:23 to load it with mobile data on my iPhone 10:23:25 and it's not working let's try one more 10:23:27 time we're trying Google Chrome on my 10:23:30 iPhone with mobile 10:23:32 data 10:23:41 Paul is trying yes food notf food.app 10:23:44 lives everyone go to food notf food.app 10:23:47 and you will you will test to see if 10:23:50 your food if your photos are of food or 10:23:53 not all right that's all it does food 10:23:56 not 10:24:00 food okay I now have 10:24:04 a totally new browser on my phone food 10:24:08 not 10:24:09 food.app 10:24:18 I cannot believe this I'm going to try a 10:24:20 different 10:24:23 device maybe the propagation to 10:24:25 Australia is not 10:24:32 working 10:24:38 I love how everyone in the chat everyone 10:24:41 in the 10:24:46 chat is leave an issue on GitHub if it 10:24:49 doesn't work for whatever food you're 10:24:51 using food notf food.app 10:25:04 it 10:25:05 loaded 10:25:07 yes I've got food. food. app food not 10:25:11 food baby there we go okay it's working 10:25:14 on my iPad is it going to work on my 10:25:16 iPhone now cuz these are using cellular 10:25:19 by the 10:25:20 way 10:25:21 so food not food this is what the 10 10:25:25 hours has been leading to food notf 10:25:27 food. 10:25:31 app can confirm it's not working working 10:25:33 on an 10:25:34 iPhone it's working on it's working on 10:25:38 it's working okay here we 10:25:42 go let's test it on these 10:25:46 bananas I think it doesn't like 10:25:50 bananas use 10:25:55 Photo 10:25:58 food yes you can't see that okay I need 10:26:01 to uh screenshot 10:26:04 that and then one more one more one 10:26:08 more and then I'll I'll I'll show you 10:26:11 then then we're then we're done so this 10:26:12 is a 10:26:15 camera use Photo not 10:26:20 food I'm going to screenshot that and 10:26:23 then I'll just show you them on the 10:26:24 screen because I don't know how to get 10:26:27 this stuff on here you know share my 10:26:29 iPhone 10:26:31 screen let's go to there 10:26:34 food food.app 10:26:36 this is the this is the real life 10:26:40 test and all of you are using it I'm 10:26:44 so Banana is a must so yeah please let 10:26:47 me know uh if leave a GitHub issue if 10:26:51 there's any foods you want and we'll 10:26:54 we'll make food not food work better but 10:26:55 we got we got it working food vision is 10:26:58 live people food notf food.app 10:27:01 go and check out food not food food.app 10:27:03 we need to upload update the website 10:27:09 with food not food.app 10:27:22 oh it is live it literally all it does 10:27:25 is tell you the food not food leave an 10:27:28 issue if you want it 10:27:30 fixed or if you want more Foods added 10:27:33 and we will work on that right we're 10:27:35 changing the world one food and one not 10:27:37 food at a time there we go we have 10:27:40 confirmation to finish the stream 10:27:45 off uh please feel free if if you want 10:27:49 to um look at this food not food.app go 10:27:53 and visit the website go and go and 10:27:56 break it um this is amazing thank you so 10:28:00 much for tuning into the stream we went 10:28:02 we went all from from the we went from 10:28:06 building a data set to modeling the data 10:28:08 set we built a data set from scratch we 10:28:10 built the application we deployed the 10:28:11 application with a live web app we could 10:28:14 do gradio we could do an API if you want 10:28:16 to add some styles to the website you 10:28:18 could leave a pull request uh please 10:28:20 please do if if anyone adds any styles 10:28:23 to the GitHub uh in a poll request I 10:28:26 will um I will push those changes and 10:28:29 you will be part of the food not food 10:28:31 Revolution okay so if you you want to 10:28:33 style it please style it if you want to 10:28:35 add some better JavaScript cuz my 10:28:36 JavaScript skills are poor please do 10:28:39 make a pull request and I will add it 10:28:41 but that is the 10hour live stream look 10:28:44 at that we finished it 10:28:47 off wow okay I need to go and chill out 10:28:50 for a bit cuz I've been staring at a 10:28:51 screen for 10 straight hours but thank 10:28:55 you so much there will be plenty more 10:28:57 the video is going to live on um live on 10:29:01 YouTube forever but if you want to see 10:29:02 future streams I stream on Twitch as 10:29:07 well and um you can also see streams on 10:29:12 my archive 10:29:13 Channel but thank you so much to the 10:29:16 100,000 people subscrib to this channel 10:29:18 I really appreciate it there is plenty 10:29:20 more to come so yeah if you want to add 10:29:22 any code to the GitHub go for it 10:29:24 otherwise I'm out people have a good 10:29:27 night have a good day wherever you are 10:29:28 in the world and uh I'll see you next 10:29:31 time B backflip and chill all right back 10:29:35 flip to finish no I'm kidding see you 10:29:39 guys thank you for joining in