Step 2-TFOD Set Up With Tensorflow 2.0 In Windows-Installing Cuda Toolkit And CuDnn

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello all my name is krishnak and welcome to my youtube channel so guys we are going to continue the step the setup for tensorflow object detection and this is basically the step two in the first step we created an environment installed tensorflow 2.2.0 the reason we use tensorflow 2.2.0 because i verified that the entire setup was working perfectly fine so we are going to follow that particular step yes you can obviously try with tensorflow 2.4.1 now in this particular step we are going to i'm just going to show you how you can install the cuda libraries and co dna library specifically for your gpus you know whichever gpus you are actually using and uh if you want and i'm just going to show you the steps guys the detailed video is already been created here you can see this tutorial 33 installing cuda toolkit and cdn here you can actually check it out because again i've discussed about the steps properly in this that is more than 20 minutes video so you can definitely follow this i'll provide you the link in the description of this particular video now the next step what i'm going to do i'm just going to show you the steps right now let me just of all first of all open anaconda prompt now inside the anaconda prompt we had created an environment which is called htfod and uh if i just write python okay and if i try to import tensorflow as tf right when i do this and when i execute how do you verify whether your gpu is working or not okay and probably for the people who do not have gpu in their local machine it is fine don't worry about it because this entire tfod will also run without any gpu also because you already have the pre-trained models they'll just download it from the github right so once i execute this here you can see that it will show successfully open dynamic library now this is the library this is the dll that is used for the tensorflow to communicate with the titan rtx gpu right so you don't have to do anything much uh with respect to this this installation is pretty much common right now i have nvidia titan rtx so based on nvidia titan rtx i have to install cuda 10.1 so i tried with 10.2 also 10.3 also it had some of the configuration issue so you have to find out which version of cuda toolkit will work i'll tell you the steps just follow it for the gpu start with 10.0 then go with 10.1 10.2 whatever version you want okay and if this kind of message comes and probably this dll will be different with respect to the version that you are using i'm using 10.1 so i'm getting this particular dll suppose if you're going to use 11.1 here you'll be getting cuda r64 underscore 111 right it may be like that okay so i'm just giving you as an example now over here before i go ahead i'll just go into print or i'll just go to write tf underscore version underscore if i execute it you can see my uh tensorflow version 2.2.0 now let's go and start the first steps now here i'm just going to open the notepad okay the first step is that we are going to install cuda toolkit 10.1 the reason 10.1 again it depends on your gpu which version will work okay and there is also a page in nvidia where you can check for which version which toolkit may work properly so first of all there is this so what i'm going to do i'm going to go to the google search for nvidia cuda toolkit 10.1 so this is your archive file for that i'll just open and click it over here remember before you go ahead you have to login into this particular account okay this is very very important without login you have to log in into the nvidia developer account now here you have cuda toolkit 10.1 original archive i'm just going to click on windows the version is 10 i'm just going to download this so once i get this exe network or you you can also download exe local this is a huge file you know somewhere around 2 2.4 gb i'd suggest go with exe network it is a small file 18.7 mb later on when you will be doing the execution of that particular exe it will download all the files from the internet okay so download this and after you download probably your downloading will happen after that you just have to execute this i mean just open this exe file and start the installation process once you start the installation process i'm just going to go to my file explorer inside my file explorer if i go to my c drive program files and there will be something called as nvidia gpu toolkit now inside this automatically this installation will happen so you here you can see the entire installation is basically happening over here now the next thing is that uh after this you have to go with code codnn libraries nvidia's udn and libraries this is the toolkit your next step you want the cu dnn library so for that just search for it nvidia cu dnn libraries download okay you'll get the first link open it again okay after opening it over here you can see download cu dnn probably for that also you have specific version let's see what all versions you have um it's okay you can you can fill this form okay so i'm doing object segmentation if you want really to select all this tensorflow and others i'm just submitting it like this because i have been using this okay enhanced coverage of 1d evolution um okay please explain how you use i'll just say object detection right that's it i'll submit it okay and these are some of the steps that we really have to do then i agree now here you can see 8.1.0 8.1.0 different different versions of cuda releases are also there what you can do is that along with 10.1 you can also try with different different things i definitely tell you go ahead with this uh this will definitely work sorry this one cuda 10.1 for specifically with respect to cuda toolkit you also have cu dna libraries now for 10.1 all over here right you will be able to see different different versions i'd suggest go with this one 8.0.5 which is the recent one for 2.10.1 now once you do this and probably i'll be installing it for windows see this guys this is the step right cuda archive i went i can see all the steps away you have to go really slowly you have to understand this particular steps right now here i'm just saying selecting this one which is the recent one for 10.1 i'm just going to download this windows 10 now here after you download this you will be able to get uh like this kind of file so let me just open that particular file if possible okay i'm just going to open that file and once you open this particular file guys you will be getting a dll file and that dll file you have to copy and paste in the bin folder okay so let me just explore it and extract here is to all okay so here it is this is your cuda file that that will be present inside your bin you probably have to just copy this copy this entire thing inside your drive which drive basically your this drive right so you just have to copy it and paste it over here okay copy this entire thing entire thing and just paste it over here that is the next step that you have to do this is from the zip file that you have taken just copy this paste it over here that's it that is the only step that you have to do after this go to your environment variable go to your environment variables inside this environment variable you need to set up the path which all path you need to set up we'll try to have a look so first of all uh the first part that you have to write is cuda underscore path gives the cuda path of 10.1 right wherever your path is so i've written c program files nvidia computing this this with this right automatically one path as you're doing the installation there also you'll be having an option to add the path so that part will also get added after this uh once you have done this go to the path section here you will be able to provide all the path now what all path you need to provide now see this guys the first thing first uh here you can see that nvidia gpu toolkit cuda v10.1 so you have to give your bin folder path after doing the entire copy paste the second thing that you have to give is of your lib nvp so i think it is there here over here leave nvvp right so this two path as you give it give it once okay then after that just select on okay okay and this is okay after this when all this particular setup is done go to your command prompt again go to your command prompt and just again check it out like this right so just check it out by just activating sorry just write python over here and then you just to import tensorflow as tf now based on the version it will directly pick up this particular dynamic library 64 uh cudat64 underscore101.dll now this particular dll is actually present over here you can see this okay let me just show you so i'll go to my c c drive and program files or toolkit cuda 10.1 bin sorry bin so here you can see one of the file will be here cuda1 kuda art cuda art cuda art cudart64101.dll so this is the file that is being used right now in order to access my nvidia gpu right and this is how you can basically check it out uh if you also want to find out a way other than this how to check it out i'm just going to open my anaconda prompt and probably open my jupyter notebook so that also i can show you so i'll go over here activate my env sorry it's not my initial tfod okay and probably what i'll do is that i'll open a jupyter notebook let me just show you uh okay here it is c drive i'll go to my e drive because i've kept the notebook over there i'll say cd deep learning and then i'll open my jupyter notebook jupyter notebook oh okay tfod okay i don't have a jupyter notebook but let me just install it so i'll go to my anaconda prompt you also have to install the jupyter notebook probably we are going to use the jupyter notebook for this particular purpose and here for this specific environment i do not have any jupyter notebook installed so i'll do it from the anaconda navigator it is quite simple so i'll click on no reminder remind me later i'll just go to that particular branch tfod okay and here you can have lot of things like pycharm you have jupyter notebook whichever you want pycharm is by default installed you can see over here let me install this jupyter notebook okay i'm just going to click on this so the installation will take place automatically so it will take some time but anyhow my internet is fast itself uh it will happen uh now this is fine now i have done it now i can launch it now i'll just go back over here and write jupiter notebook now i think it should work perfect that is opening now let me just take one example i think i had created on cats and dogs i think i have a code for this no i don't think so this is the thing um deep cotton diseases i think i had something like this okay this is also not the example but i think we can do uh with respect to this i had one code that had been written over here let me just check it out cotton disease um inception v3 okay so now if i go and write import tensorflow as tf let me do one thing let me just download a code from somewhere you know so let me download a code from somewhere you know and i'll say check tensorflow or i can just search in the google what is the check gpu is available gpu is available check if gpu is available in tensorflow so if i go and check this link probably i'll be getting the answer okay let me just go and pick up this and i'm going to say this tf.test dot is gpu available cuda only is equal to false let me just execute this probably i think this should work so it is saying me true okay uh i can also use this statement right so if i really want to find out my gpus that are available so i'll just paste it over here and here you have gpu is equal to zero if you have multiple gpus then you'll get values like zeros and ones if you just have one gpu i think this will be getting by default the number is zero okay now i think i've done the setup of this cuda libraries and all now the next step probably will be to create my object detection uh how do i create or set up my tfod that will be the next step but i hope you understood regarding cuda toolkit and all if you are selecting 10.1 right also make sure that whatever uh cu dnn libraries are you are selecting you're selecting for that specific toolkit itself which is very very important okay so i hope you like this video please do subscribe the channel if you're not subscribed i'll see you in the next video have a great day ahead thank you one doll bye bye and yes in the next video we'll try to start the setup you know from creating this everything now we in this step we have actually focused on installing the cuda toolkit yes i'll see you all in the next video bye bye guys
Info
Channel: Krish Naik
Views: 24,808
Rating: undefined out of 5
Keywords: object detection, machine learning, deep learning, data science, tfod set up, tfod set up with tensorflow 2.0, tfod set up in windows, krish naik, object detection tutorial
Id: g0tgElCTh-8
Channel Id: undefined
Length: 13min 50sec (830 seconds)
Published: Sat Feb 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.