Colab Read File From Google Drive | How To Read Dataset In Google Colab From Google Drive

Krish Naik

Subscribe Here





How To Read Dataset In Google Colab From Google Drive


Hello on today in this particular video. I’m going to show you how you can import a data set from your Google. Drive into the Google Collab environment. If you don’t know about Google Collab, Google Collab is basically a. You know, it is same like a Jupiter notebook will not install anything in your local machine instead. Google provides this feature that is hosted in the server. It will basically be like a Jupiter notebook where you can execute your commands, and you can basically execute your any kind of machine learning use cases so today in this particular video, I will be focusing on how you can upload the data set from Google. Drive into the Google Collab environment. So first to begin with what you have to do. Is that suppose you want to solve any problems in that particular use case from Carol? It may be anything you just download that particular data set. Now let me just give you an example. I was trying to, you know, solve a problem statement, which is called as malaria detection now for malaria detection. What I have done is that I have downloaded The images from the Google environment and then from the Kaggle are download this images and this particular images I’ve structured into various categories and have uploaded in my Google. Drive so here. It is first of all I imported, or, I mean, I have uploaded all the images in the Google Drive. You can see that this. The cell images basically hash train and test folder inside the train folder. I have folders like parasite images, OK? And then I also have uninfected folder. This is basically our normal cells images now. I’m going to implement a very small, deep Learning example, you know, and I’m trying to do that with the help of transfer learning to check whether the person is having malaria or not, but this I’ve still not yet completed. I am still on my way to do it, OK? But before this, I will just show you how we can read this particular data set into a Google Collab environment. Now to begin with what you have to do. Is that first of all you open your Google Collab environment to open the Google Collab environment. You just search for Google Collab. OK, you have to sign in for this and just click on this that automatically it will. Just, you know, it will show you that you can save your information. You can save your file in Google Drive. You can save your information and Github. So wherever you want to can basically share is save it, okay, and you can also create different types of Python notebook. Okay, create a new Python notebook, and you know, you can also create the Python notebook with respect to two point, seven three point, six or three point seven so that you have to do it first of all again to begin with guys what I’m going to do is that you can see that here. Is all my files suppose? I want to create in Google. Drive, go into this Google Drive. And I’ll rename my file. I’ll go and click on New Python Three notebook, and I just click on this as soon as I click on this. My notebook file will get opened as you can see over here. OK now! This is the thing as soon as you open this particular file. You will be seeing a left-side window. Which if you click on that that will just open it. You just go to these files now. In this files, initially, you will just have this sample data, okay. You’ll just have this sample data. This sample data is basically your normal data, which they have given some examples even that. Google has only uploaded. There’s some housing test data dot CSV housing on this foot train dot CSV. This is all files, you know, you can use it and try to predict the house price itself. But now suppose if you want to, you know, retrieve the data or whatever data that? I have uploaded in this Google Drive. I want in this particular. Google Collab environment. How do I do that? So let me just close this now? You can see that you can only see one folder over here, right, So what I will do is that I just close this and I will go and execute this particular command. Now you can see this command. This command basically says from googlecom. I’m going to import that. Try this drive basically means my Google. Drive, okay, And by default, the Google Drive path will be content slash stripe. Okay, so as soon as I execute this, You can see that it will take some time to execute and it will just give me a URL in this particular browser. Okay, now in this particular URL browser, I just click this, OK? I’ll just go to my Google account. Once I go to my Google around, It will just ask for my approval. I just click on allow soon as I click on allow. You can see that. I am having this particularly link right this link. I have to copy of this particular code. I have to copy and I have to just paste it over here and I press ENTER once I press. Enter will then verify whether I am the person exactly who is actually trying to retrieve my drive by that particular code itself. So now you can see that I can mount my content drive. Now, let me just open this particular folder and see my file section. How if you go and see and I have just refreshed it? You can see my drive section inside my drive, you know? I have created one group will have notebook files and here is all my files that are present, you know, and this cell’s images. You can see that it is present over here and here are all my images inside my parrot parasitized folder and uninfected folder so inside. This are all my images present now. The next step is that. I need to leave this images from here, right because I need to implement a deep learning model, saying that whether the person is having malaria or not so first of all. I need to install Kira’s. Okay, now see, guys, you are not installing this whole. Google Collab in your local machine, this is running in the server itself, right, so in order to install the Kiras you just have to use the command simple command as if install – Ki Q. Kara’s okay. As soon as you do this, it will get installed. Okay, then you can check it out by importing the Karas okay And whether it is working, fine or not or whether the installation has happened perfectly. Now you have input Kira’s. You can see this over here. It has been imported. This is just my deep loading code again. I’ll share you all this code in my next video because I am still in the process of completing this malaria detection using deep learning. It is still on the you know, training phase so here. Now everybody, look into this here. I have set my training path as content. Drive my Drive. Collab notebook cell underscore images train. How did I get this particular path? And suppose you want to put some path from this particular Google? Drive you! Just go to that folder suppose. I want this trail path. Okay, you just go to the folder. You just right, click in like it, right. Click it and you just copy this particular part. And you just paste it over here. You know, so this becomes my training part, right, This becomes my training path. Similarly, for the test. You just right, click over here and just copy the path and you just paste it over here. That’s it so once you do this now, you have your path of the data set That is put up in your Google Drive. This is my VG 16 code letter. I have basically written now. You can see over here. Is that okay. This is my model summary. I’m not going to explain much because in my next video. I’m going to explain you all this food, but just I wanted to show you how to read the data set. I am going to use something called as in each data generator. Okay, in this, we will be reading the data set from this particular path that is the training path and the test path. Now you see this after executing this, you can see. I’m having two five nine nine images belonging to two classes from my training data set that many images I have uploaded it and I have one one nine one images belonging to two classes That is for my translators. Now, after this, what will happen is that? I’m I will run my model. I’ll check my curacy. You can see that. I am still in my process of running it. And it has just completed three perks. You can see. I am getting 94% accuracy This. I am just doing in my local machine, but later on, I’ll try to integrate that in Google for that. So this is how you read your data set now. Not only this, the particular data set. You can read any CSV file for your machine learning for a deep learning you just upload in the Google Drive, see, you’ll be getting around 15 GB of series space in Google. Drive, so whenever you want to implement machine learning or deeper, you can use it now. What is the use of Google Collab? That is the main thing. Nowadays, you see that, you know. Processors are very, very costly, right. When many when you want to implement a deep learning, you basically need. Gpus or TP use, right, So for that case, what Google has done is that they provide you GPUs. Okay, you just go to the run time and you just go and click on change. Run time here. You have a feature called as hardware accelerator. Okay, you can select. GPU, this GPU will be pretty much fast. Where your installation? Americ code running will be very, very easily dark for a medium sized dataset. Okay, it will not be that super fast also. But yes, you can run code into this, and you can get the four times with respect to this part of the statement, so this Google Collab has been provided by the feature of Google. Please use this try to use this. You’ll get a lot of features. You have different types of runtime environment. You have runtime in? Python 3.2 you also have hardware accelerator of GPUs and CPUs also. And if you want none, that basically means that it will use the CPU of that particular machine itself, which is hosted in the clump. Okay, this particular. Ram and all, so I hope you liked this particular videos. Guys in my next video. I am also going to show you how to do malaria detection with the help of deep learning and then. I’m just that training is going on. You know, I’m getting the accuracy of around 94% as soon as the training gets so well as they are floating that video. I hope you like this particular video. Guys make sure you subscribe the channel. I am not already subscribed. Um, yes. I’ll see you all in the next video. Never give up, keep on learning. Thank you one and all God bless you all.

0.3.0 | Wor Build 0.3.0 Installation Guide

Transcript: [MUSIC] Okay, so in this video? I want to take a look at the new windows on Raspberry Pi build 0.3.0 and this is the latest version. It's just been released today and this version you have to build by yourself. You have to get your own whim, and then you...

read more