Hi, i downloaded a kaggle image classification dataset.
It consists of a folder names “chest_xray” and the folder contains 5 folders named with their respective labels for the images in that folder.
I am using colab and i have uploaded the “chest_xray” folder to my google drive.
But i don’t know how to get it into the colab environment . Kindly help me out.
Did you import the Google Drive package?
If not, feel free to use this code below:
from google.colab import drive
self.mount_point = None
self.root_dir = None
self.base_dir = None
def make_folder(self, folder):
path = Path(self.base_dir)
folder_path = path/folder
drive_object = DriveAccess()
drive_object.mount_point = “/content/gdrive”
drive_object.root_dir = drive_object.mount_point+"/My Drive/"
drive_object.base_dir = drive_object.root_dir + “fastai-v3/ImageClassification/CricketVsBaseball”
The code posted above will let you mount your GDrive. In the base dir param, modify it to reflect your directory structure.
Hope this helps. If your issue was with Mounting Gdrive on colab, I recommend you to change to topic title, to reflect that for easy reference.
Hi, Thank you.
I was able to mount the Google drive and access the file therein.