AI on the Jetson Nano LESSON 55: Training a Deep Neural Network With Transfer Learning

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello guys this is Paul McWhorter with top tech boy comm and we are here today with lesson number 55 in our incredible tutorial series we're learning artificial intelligence on the Jetson Nano I'm going to need you to pour yourself a nice big mug of iced coffee today I will be enjoying supplemental backup caffeine in the form of hot coffee and I'm gonna need you to get ready to learn some cool new stuff so let's go ahead and let's get out our Jetson nano gear and while you're getting out your gear as always I want to give a shout out to you guys who are helping me out over at patreon your help and your encouragement keeps this great content coming you guys that are not helping out yet think about looking down in the description there is a link over to my patreon account think about hopping on over there and hooking a brother up hey seriously guys you know have in the last videos been having problem with my video my camera video freezing in the middle of the lesson hey that was because I was using kind of a low end cam link board for grabbing the HDMI signal coming off of the cameras I was able to upgrade that to a really nice magwell board and we should not have any more of those glitches so again thank you guys that are helping me out over at patreon you allow me to keep the good equipment rolling in here and the good content coming ok so enough of this talking about patreon let's talk about what we are going to learn today what we are going to learn is we are going to learn how to train a deep neural network now we started working with deep neural networks I think in about Lesson number 50 and that's when we installed those Nvidia jets and utilities and they allowed us to go in and work with some of the pre-trained networks like the Alex Ned and the Google net and the res net 18 there were pre trained networks that we downloaded and then we could run those networks and we could recognize things like teapots and cats and dogs and things like that so that was really really cool and some of those networks I think could could recognize like a thousand different items and so that was really powerful but the problem is is that in general and artificial intelligence you and I don't need to recognize a thousand items we need to recognize a smaller number and kind of differentiate between is this and Apple or is this an orange and chances are the things that we really want to do those pre-trained networks aren't going to work for so what we're going to learn today is we're gonna learn how to train your own network now this is the problem if we were to try to train a deep neural network from scratch we would have to have thousands and thousands of images taken very carefully and classified very carefully and then we would have to have just an unimaginable amount of CPU time to actually build the network and so it would not be something that we could do at home with our desktop PC or excuse me or with our even like in Jetson Nano or a Jetson Xavier we would have to have a major GPU sitting on our desktop or we would have to go out up to the cloud and kind of rent a GPU to do the training from scratch beyond the scope of what we can do as individuals but the good news is you don't actually have to start from scratch you can take one of those existing networks and you can retrain it for the objects that you're interested in and this retraining is called transfer learning we're gonna transfer learning to an existing network and that is what we are going to do today well to do that we have to figure out what to train it on I'm going to train it on six different items now you could train it on whatever six items you are interested in but I decided it'd be kind of neat to create a deep neural network that could recognize different single board shooters and so what we're gonna do today is I'm going to Train it to recognize an Arduino Uno a Raspberry Pi zero an Arduino Nano and a Raspberry Pi 3 a Jetson Xavier in X in our old friend the Jetson Nano and so that is 6 single board computers and what our goal is today is to train it on these things if you don't have those six if you just have three of them trained on those three or you can train on something else maybe you would want to do fruits maybe you would want to do bananas oranges mangoes peaches you know that type of thing apples ok so pick up six fruit and train it to recognize and differentiate between those six different types of fruit ok so enough of this talking let me have you go ahead and call up a fresh new terminal and then I had better get out of your way because you get very angry at me when I am in your way and what we're going to need to do is we're gonna need to create some swap space because to run this training or this transfer learning we are gonna need more memory than what the Jetson Nano has so we need to create some swap space that's where you go out and kind of use the SD card in the place of memory and so to create that swap space we need to do a sudo and let me see I'm gonna go back to home back to my home directory ok we're going to do a su sudo eff allocate eff allocate I think you can see that right sudo eff allocate and a minus L and then we want to allocate for G of space for gigabyte of space and then we want to put it at /m in T / 4 gb dot swap like that so that will create that that will allocate that swap space now we need to go ahead and make it so we will say sudo in M k SW AAP sudo MK s w AP and what we just created /m in t / 4g b dot swap like that okay it's giving me a little complaint there but that should be okay that should not be an issue and now what we are going to do is we are going to go ahead now and turn the swap on so we will say sudo swap on sudo swap on turn the swap on / m NT / 4gb dot swap now we have our swap on the next thing we need to do is make sure that when we reboot the swap comes back and so we will need to do that by editing our FS tab file and we can do that it's a system file so we will need to sudo and then we will need to G edit and then /et c / fstab okay let's see there we go boom comes up and we need to add the swap file here and so we will add to the end another line and that line is going to be /mnt 4G 4gb dot swap mount / 4gb dot swap and then we're gonna put none space swap space SW space 0 space 0 okay so we've got /mnt / 4gb dot swap space none space swap space SW space 0 space 0 now we will need to save that and it looks like it's saved and then we can close out of this and we should be in good position looks like it complained about something there but we should be okay just a modder complaint and I'll clear this to get us back up to the top okay so now we have our swap file created okay now remember in Lesson number 50 we did and I got to tell you guys that this lesson is a follow-on to lesson number 50 so if you're just hopping into the middle of these lessons you've got to go back in at least to lesson number 50 because that's where we installed these libraries and the jets and utilities you've got to do what I did in lesson number 50 or this lesson isn't gonna work so those of you who are playing along though have already done lesson number 50 and so if you're in your home directory and do an LS we want to go to download so CD downloads okay and an LS since you did lesson number 50 you've got that folder Jetson inference so we want to work in there so we are going to CD down into Jetson inference okay and now LS and so that all looks good so we need to create a folder in which we can put our training data so I'm going to create a folder m'kay I guess I should not call it a folder I should call it a directory mkdir for make directory and I'm just going to call it my train and so this will be a folder where we put our training data now we need to go down into that so I'm going to say CD into my train okay now I'm in that folder that I created alright now the first thing that we need to do you in training or transfer learning is to create a text file that has the classes of objects that we are going to recognize okay and so what we will need to do is I'm going to inside my train I'm going to G edit G edit and then a file we're going to create called label dot txt now this doesn't exist so by editing it it will create it label plural labels txt like that okay now we come up with an empty file but what I need to do is I need to give the name of my classes and I need to give them in alphabetical order all right and so what I will start with is I will start with let's see it's hard to do alphabetical order on the fly but I will start with the Arduino wood nano or uno Nana would come first nano Arduino Nano and then I will do the Arduino Uno those are still in alphabetical order and then I will do the jet Sun Nano and then I will do the jet son Xavier and X so that's 4 and then we have the Raspberry Pi and let's see we would do the 3 Raspberry Pi 3 and then Raspberry Pi 0 why am i doing 3 and 0 because I know think for sure that it will work alphabetically that way I'm not sure about if I put a number there whether it knows in a smart way how to do alphabetical order but those now are in alphabetical order 1 2 3 4 5 6 that's what we said we were going to train on so we are gonna save that and we should be good there ok after saving it we can kill it ok now what we are going to need to do is I'm going to need to do a little bit of windows management let's see here I should have had this done before ok so now what we are going to need to do is we are going to need to start capturing our training data ok and dusty over at Nvidia who sort of put this stuff together he put together a nice little training program that makes it really easy to capture the images that we need and put them in the right spot and so in order to get there we need to go back to home so I'm going to CD back to home and then I'm going to CD into downloads and then LS I'm going to CD into jet Sun inference and then I'm gonna CD into tools okay and I Phi L s you see that there is a program here called camera capture and that is the program that is going to allow us to begin to put together the training data like if we're gonna recognize the Arduino Uno it's got to know what the Arduino Uno looks like okay let's go ahead now and let's see if we can launch that capture that camera program and we do that with the command C Amer a camera - capture and now we've got to give it the width and the height now make sure that you're using a width and a height that you know that work with your webcam because if you use the wrong if you use the wrong width and height that'll crash the program but I know for my help I'm using my help today and I know that it will work at width - - right you see my - - with equal 800 space - - height equal 600 like that and then again - - camera and the camera is going to be equal to for me / de Vie / vid do1 all right now if you're using the Raspberry Pi camera you don't need to give the camera command it should just default to that on its own okay it should just default to that camera on its own if you're using a webcam it's probably going to be slash de vie slash video 1 and you will probably want to put that in so let's hold our breath boom look at that okay it is live it is live all right we are making some progress we're gonna have to train things and we're gonna have to tell it a couple of things we're gonna have to tell it where the data set is where what is the path to the data set so we're gonna click here and then we are gonna go back to our let's see we're going to let's just go to desktop and then let's go to downloads and let's go to jet jets and inference and then remember we did my train we created a folder for this my train so once I get there we're gonna say open so that's where all these pictures are gonna be now it wants to know where the labels are remember we made the label file and it was in Jetson inference and then it was in my train and there's our label file so we got to tell it those two things alright now I'm gonna go over here and look with my file explorer ok and let's go to downloads and let's go to jetson inference and let's go to my train look at that boom ok so when we ran this camera program it went ahead and set the folders up it set the folders up for all these pictures to go into now what we're going to have to do is we're gonna have to have three types of pictures the first type of picture are the training pictures so if I'm gonna train it on the Jetson Xavier what I'm gonna need is like a hundred training pictures and to get a good training picture you don't want to like have it here because it doesn't know what your training are you training on the microphone are you training on this your training on my face so you want something where let me get this out of your way you want something where what it sees is what you're training on and that's why I kind of like this elk camera with the little tripod because it lets me get a nice good view and so what I'm gonna do is what would be the problem with training like this well the problem with training like this is there's other stuff in the picture and it's other stuff that we actually are going to train on so that would be horrible all right so you don't want these other things in the picture so we got to get all that stuff completely out of the frame and then even what I like is I like to do it with nothing but just the gray background so as much as I can I'm going to try to have nothing but the grave and okay let's see that looks pretty good and then I want a nice clear picture and I want to focus on it okay so that is nicely focused and in a position where there's nothing in the picture but what I want alright so now what I would need is a hundred pictures for training and so how would I do that well I would go like one two three four five now make sure your hands not in it you don't want to Train on the hand so I would go like one and then two and then three and so you can get all those well when you go all the way around that might be like twenty five pictures well then come from a different angle like come down low and get it kind of like at this angle you see the kind of light coming in from the side angle and spin it around and take the pictures and then come up high and then shoot kind of straight down on it like that and then go around okay so you kind of like take 25 pictures go 25 spinning it around then change the camera angle from steep to 45 to shallow and the more pictures you do the better it's gonna work okay the more pictures you do the better it's going to work but those what would you do you would come in here to Train because these are training pictures and then you would come into this is the Jetson Xavier in X okay and then what we would do is we would just do like if we're gonna start taking pictures here for training we would go like this I'll kind of get you started I'm not gonna make you sit and watch me take 600 pictures okay I'm just gonna get you started I would go spacebar that took a picture turn it spacebar that took a picture that took a picture spacebar spacebar spacebar spacebar okay I'm gonna go ahead and I'm gonna do a hundred of those and I'm gonna come in and then I'm gonna get a different angle and I'm gonna take like a hundred pictures and try to have it where the item is all the way in the picture okay try to have it where the item is all the way in the picture all right and that is gonna fill out so now if like if I go to train and I look in the Jetson Xavier in X you can see those pictures that I just took okay those are training pictures all right now after you do the training then you need to come in and do the validation picture so validation or pictures that it doesn't train on but after it trains itself it says okay I'm gonna go look at these pictures and I'm going to see how well I'm doing so it kind of test itself with the doubt validation pictures and so what you want is you'll want a hundred pictures a hundred training pictures for each one of the boards okay so you're gonna do and it's probably better to look at it up here so what you're gonna do is you're gonna come to train and then you're gonna come to let's start with the Nano site we're gonna put the Arduino Nano there and you're going to take a hundred pictures of it all different angles but I think it's good to have a common background okay which is the gray background but lots of different angles you're going to take a hundred pictures for training on the Arduino then you are going to come to the evaluate or the valuation and then you're going to take about twenty pictures so those are just pictures for it to sort of see how well it's doing so a hundred trained pictures twenty validation pictures and then if you want some pictures for you to test you can do some test pictures that you can play with later and say two or three four five that's all you need just a few of those so now we finished this then we'll go to the next board and so we want to come back and we want to go to the Arduino Uno and then we want to go back to train and then again a hundred pictures okay you got to get that training set together and then when you do that what it will do is it will populate all of these folders right so we are in downloads and we are in Shutts and inference and we are in my train and it will like if I look under train there's a folder for each of the items that I'm training how did it know that it got them from the labels file okay so you can go and you can do all of that yourself now if for some reason things aren't working for you and you absolutely cannot do that you can come to my github that's github.com /m C WH o RP J and then go to the slash board training data okay and you can get that and you can say clone or download and then you can hit the little icon there you can hit here right mouse click copy and now you can come back to that folder and let me open up a new terminal I don't need to do it but you can just do a git clone and that inside of that folder and it will go get all of my pictures for you I really do need to show you that just in case you guys are not able to your camera going so you can say open terminal and then you can say CD into downloads jut son Jetson inference okay Jetson inference and then you can let's see here you can do Jetson inference and then we said it was my drink like that oops let's go change directory downloads / Chet son inference LS and it has changed directory into my train like that okay now what you would do is just do a git clone and then paste that paste that address in there and it will go and it should pull down all the training data I put together if you want to use my training data okay but really are you really training it if you are using my training data I don't think so I don't think you're really training it if you are using my training data so I hope you will really go out and train this thing yourself by hitting the spacebar hitting the spacebar hitting the spacebar and so you'll do train after you train then you'll do 20 valuation and then you'll do just a couple tests and then you will move to the next one so I'm going to ask you guys to go ahead and do that and then I will pause the video and I will come back in a minute to show you the next steps after you have taken all of your pictures okay guys hopefully you have taken all your pictures I have taken all umpteen jillion of mine and so let's go ahead and kill this let's go ahead and kill this training capture training image capture and now let's go ahead and make sure that our folders look right so I'm going to open my file manager and then I'm gonna go to downloads I'm going to go to Jetson inference and then my train let's see this does not belong in there you won't have that but let me move that to the trash okay so I've got my labels file and then I have my test data my train data in my valuation data if I come to train or I come to any of those I'll see all six of the items and then for training it's the one that had like a hundred pictures each okay so there are all my pictures that all looks very good that all looks very good and so now I need to come back to my file here give me just a second to get back to where I was okay so we now have everything we have all of our images okay and like I say you can get the images that I use from github but if you do that you've got to make sure because I think that if you just come and do it the way I showed you there's just one thing that you've got to see that if I go to downloads jetson inference my train you'll probably end up with a folder and all of this stuff inside of that folder well you've got to get it out of that folder and put it here okay you've got if there's an extra folder it's going to be my github and you take everything out of that lower folder and put it in this folder and then you should have everything just exactly the way I have it here all right so let's see what we can do here I think we are ready to train this thing now okay so to do that we need to go CD and we need to go back home and then we need to go to down loads okay and then we need to go to Jetson inference okay let's look at that misspelled it Jetson inference like that and out LS and now we want to go to pythons we're going to CD into Python and then we're going to see lets LS okay we want a CD down into training okay and now LS and now we want a CD down into classification like that okay so now we are in the right folder okay and now let's just look and see what's in there alright these are the various things for my yours might look a little bit different than mine but now what I need to do here I need to actually train the model so I'm going to say Python 3 because we're running on Python 3 further out of your way before I block you python 3 and then we're gonna run train dot pi that's this program that you see here train dot P and now I have to tell it what do I want my model to be called right and so I've got to go - - - - is - - and then I'm gonna say model - dir is equal to I'm gonna call it mine model so I'm going to create a deep neural network I'm going to create a model I'm going to call it my model and now I got to tell it where the data is well the data is at home and then /downloads / you got to be good at this by now Jett son inference and then where did we put it we put it in Maya train so it's got to know where to go find all those pictures so it's in Monterrey so what matters it matters a whole lot that you start in this folder because that's where it's going to put your model so you need to be down here in this folder and then it will find train dot PI right here and then it will put my model right here but it's got to go over and it's got to find your training data which is what you do here check this before you enter it okay check it before you enter it I think mine looks good let's make sure that it runs here okay now what this is going to do is it's going to run 35 epochs okay an epoch is sort of like a grand optimization it's going to do that grand optimization 35 times and that probably very well could take like 30 minutes and so let's go ahead and pause the video and let's get together after your training okay guys did you get your model train mine took I don't know 30 45 minutes I had lunch while while it was training but you see that we completed all 35 epochs and now the real question is you know how well is it going to work but there is I'm sorry one more little step that we have to do here we're staying in this training / classification folder make sure that you're still in that same folder and the thing is is that the pod torch creates a model in one format and then the Jets and utilities wants a different format so we have to kind of export the model from pod torch into something that the jets and utilities is going to like let's see if I do LS here LS you can see that there is a program called oh in in X export so we are going to want to run Python 3 and then we are going to want to run let's see we are going to want to run that program o n n X underscore export I'll get out of your way o n in X underscore export dot tie that's the program we're going to run now we've got to tell it what model we're running on okay do you see how now we have something we didn't have before my model that was created by the training and that is the one that we are going to convert so it is going to be model - directory so we have - - model - der okay is equal to my model right and that's this my model here you notice my models a folder it's got the stuff down in it well now it's gonna get more stuff down in it so let's hope this works okay I think I clicked enter I always get nervous when the cursor stops blinking but then you got to be patient you got to be patient hopefully something will happen here in a second okay yep let's see looks happy so far that's good this will probably take two or three minutes to do but we'll just sit and chat while we're doing this okay it's exporting model to onn X that's good and we will just sit here and wait a second for this to work enjoy a little coffee while we're sitting here okay now as this model once we get the model done then what we're going to do is we're going to open up a program and we're gonna see if we can do the the object recognition right we're gonna see if we can recognize the objects from the live camera once we have our model and this will be kind of a big step forward we did a little bit of the training with the facial recognition where we could train it on one person versus another person that worked amazingly well but if you're just gonna go out and arbitrarily find something like you know a board or an apple or an orange or whatever you really have to do a lot more work on me you've got to do a lot more work on the training and so that's why you need so many pictures I'll tell you also I played around with this for the last three or four days it really really really matters that you get a good that you get a good data set in getting good sharp clear pictures that don't have a lot of distractions in there make a big difference boom okay it says that our model was exported so I'm gonna take that as a good son okay so now we are ready to write a program and we will come over and open up a new Visual Studio code and we will be coding in deep learning - 10 PI that is the program and I am working inside of my Nvidia folder and this is deep learning - 10 dot pi is the program and we want to start where we left off in lesson number 52 and so I need you to go to the most excellent wwth org Icom I need you to search on AI on the Jetson Nano lesson number 52 and you had up here and remember this is where we were improving the quality of the image coming off the Raspberry Pi camera but also if you remember here we had this little bit of code it's not this first one okay it's down below it and it's the option number one which is to launch the camera using OpenCV and this is doing the image recognition the object recognition using OpenCV for the camera and so we're gonna go ahead and click on that and then we're gonna right mouse click and copy and then we're gonna come back to our program and we are going to paste it in okay and what this program is doing is it is running our old friend let me get this file browser out of the way this is firing up the camera and this is using the Raspberry Pi camera I want to use the webcam because the webcam is easier to point so I'm going to comment out the Raspberry Pi camera and I'm gonna go with video 1 now it's very important that when we're using these Jetson inference tools that we know what our width and height is and so we don't want to just use the defaults we want to actually set them on the cameras using these two commands they were already in the program I just uncommented them out and I do believe that I am on video one so that looks good all of that stuff looks good for my camera I am using the help camera so I really need to say 800 by 600 I don't think that help camera does 1280 by 720 if you have the logitech camera you could probably use 1280 by 720 you've just got to use one that the camera will accept or your program will crash ok so what really matters here is this right here where we set up our imagenet model and before we just said Alex net well now we're using a custom model so what we've got to do is we can leave Alex net or Google net or whatever you have there that's okay but now we've got to put in the real model that we're going to do and that's with a second set of parameter so it's a little bit goofy you've got to use you've got to leave this in here but it's going to ignore it and you put a comma and now what you need to put in is you need to put in an array and you start that array with an Open bracket it closes the brackets for you and now we've got to tell it what model we're really gonna use in the model that we are really going to use is - - model equal and I need to make that a string so I open my string okay you see how I opened my string there then - - model is equal to model is equal to and we can kind of just go to your home directory right and then where did we go we went to downloads and then where did we go we went to jet Sun inference remember that and then remember we went to Python and then we went to training and then we went to let me let me adjust my view here for just a second little windows management we went to classification after that okay we went to classification and then we went to and we we better look over here I think it was my model so let's go to Jetson inference we went to Python we went to training we went to classification and then it was my model there is what we did so then I will come here and I will say my model like that and then inside of my model was res net 18 dot o and an X now this Resnik 18 is the Reznick 18 that we trained with that training that we just did and it put it in the my mold my model folder folder but it's still named it Reznik 18.0 in and X and then we're going to end that string that we created and now we have to put a comma and then make another so another string okay and this is going to be - - input blob you input blob input blob is equal to input underscore zero all right now we're going to move out of that string and put a comment and now we're going to put - - output blob output blob and that should also be in a string okay so string output blob is equal to output output underscore zero okay and then in the string and now we got to tell it where the labels are and so we're going to start another screen string - - labels equal and then we're gonna go to our home with the squiggly and then we are going to go to downloads and then - Jetson inference okay Jetson inference and then we had a folder and what did we call that folder let's go back to Jetson inference and then we called that my train right and then labels so we went to my train and then slash labels dot txt so we're pointing it to that label file okay including that long path and then we close out that array and then we close out that whole call all right then everything else down here we're going to read from kam one we're set on cam 1 we're going to convert it to a CUDA top object we're going to recognize that CUDA top object and then we are going to come down here and identify what it is all right guys let's right mouse click we're not going to hold our breath on this one because the first time you run these models it might take two or three minutes because the tensor RT goes in and starts optimizing itself so even though it's trained it sort of starts running some optimizations so the first time we run this this can take two or three minutes or sometimes it can just crash immediately without doing anything like it did for us here image failed to load networks so I probably have an error in here somewhere okay guys this really looks right so the only thing that I can think is the only thing that I can think is it doesn't like this shortcut to home and so instead of the squiggly for the shortcut to home I'm going to put slash home so slash takes you to the root then to home then to my username PJM right there you need to put your username not my username i'm PJM and then the same thing over here this is just all I can think everything looks good but I don't think it likes the squiggly so we're gonna go slash home slash PJM and now we have an absolute path to those two files that it's looking for so let me make this down here let me get it back over here and now let's run this thing run Python file in terminal now it might take a few minutes to run again because the first time it runs this thing it does a lot of optimization and a lot of learning that it doesn't do after this now look at this I think it is it's it's working on the graph that's good it's looked through 28 layers and so it's doing a lot of stuff here and we're just going to be patient and let this thing run okay look at that a lot of stuff happening a lot of happy stuff happening alright tensor RT is doing its magic this is the fun part here and then guys next time you run the program it won't take but just you know 15 20 seconds to run it but the first time it's got to go in and really optimize that model all happy-looking stuff here that we're seeing now the first question is will it run and then the second question is will it recognize these single board computers and so we got a couple of things we got to look at here I think yeah it's all right boom look at that Shazam look at that do you see that Arduino Uno at 16 frames per second yes now let's uh hey let's kind of spin it around here Ord we know uno Arduino Uno you see all these different views it knows it as the Arduino Uno and that's really good okay and let's kind of lift it up you see we're kind of because we did such a good job at that training data it's recognizing it from a lot of different angles okay we're gonna say the Arduino Uno worked okay so now what is this Raspberry Pi zero giddy up look at that Raspberry Pi zero it's recognizing it let's see that is doing amazingly well all right you ready arduino nano boom look at that I'm gonna give it a little focus guys the reason I like the elped camera is you can focus it manually because I have such trouble with the auto focus on those Logitech cameras Arduino Nano it got that one now for the big test Jetson Xavier in X it got it look at that all different possible angles okay and then let's come in here and let's put the Raspberry Pi 3 look at that all right now let's look over here and it recognizes that as the Jetson nano look at that - Jetson Nano Raspberry Pi 3 Jetson Xavier in X [Music] Arduino Arduino Nano you see you don't want to start getting that other thing in there because you see it starts looking over there at that and then we have the Arduino Uno ok guys this is just really really really exciting now what I'll say is is that we kind of did a simple training with kind of like the hundred types of images and you know to have it really do more than that you'd have to take a lot more pictures and you would have to do a lot more of the optimizations but you could see that this would be useful like if you had like a little assembly line and wanted to know what was coming coming down the conveyor belt you could look at it and certainly it would recognize it in a condition like that and also like what if you you know you could just make these things and have it remember what your different components were put it under there and it would tell you what the component was all right guys I am just super excited about this this really really really works very very well in fact I would say that this works a lot better than what I had anticipated it was going to work and so with just a little bit of training we have this thing recognizing six different boards and we could train on a lot more than that in that program does get NVIDIA put together it really makes the data collection a lot easier because you just it kind of organized it you're just sitting there hitting the spacebar as you put your pictures together okay guys let me know down below did you actually get this thing working and let me just let me just quit out of this and just remind you that you know I showed you that github where you could get my if where you could get my training data let's see right here github.com /m CW h o RP j and then slash board training data and then what you would do is you would clone okay you would click clone and then you would come here and copy that then you would go into this folder okay the my train folder and in there in the terminal if you did get clone in that address that you copied it would bring that whole thing down but it would put it in a new folder you would have to take the stuff out of that folder to bring it up here right then you would go in and you would do your training you would go in and you would do the training and then exporting the model and then you could be working with exactly the same images that I'm working with but half the battle is you putting together a good training set so if you're trying to debug things or don't know why things are not working exactly the way that you wanted them to what you could do is go in and use my data but what you've just got to be very careful of is you've got to be very careful when you give these commands to you know give it the right path so like when you're training you have to make sure that you go to that Python I mean you have to make sure that you go to that classification folder okay and then you've got to make sure that you put those paths and write the paths worked fine with the shortcuts when we were running the program but then inside of our Python program OpenCV it wanted the absolute path from the root not the shortcut to the squiggly it didn't seem to recognize the shortcuts to the squiggly okay man this is a little bit tedious but I've shown you everything that you need in order to train your own deep neural network through transfer learning so you guys leave me a comment down below let me know if anybody was able to get this working let me know how it worked for you let me know what you trained on what you're thinking about doing I think this is just really really slick okay guys remember that there's some really cool stuff going on also over on the jetson on the Jetson Xavier in X lessons you guys might want to check some of those out as well because a lot of that stuff will run on the Jetson Nano as well all right a quarter from top tech boy calm I will talk to you guys later
Info
Channel: Paul McWhorter
Views: 10,790
Rating: undefined out of 5
Keywords: DNN, Transfer Learning, Deep Neural Networks, Artificial Intelligence, AI, Tutorial, Lesson
Id: kpsam0g9unM
Channel Id: undefined
Length: 54min 1sec (3241 seconds)
Published: Sat Aug 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.