How to fetch image dataset from Google Drive to Colab?
I have this very weird problem. I have searched across internet, read documentation but am not able to figure out how to do it. So what I want to do is train a classifier using Colab. And for that I have a image dataset of dogs on my local machine.

So what I did was I packed that dataset folder of images into a zip file and uploaded it onto Drive. Then from Colab I mounted the drive and from there I tried to unzip the files. Everything good. But I've realised that after sometime some of the extracted files get deleted. And thing is that those files aren't on Colab storage, but instead on Drive and I dunno why they are getting deleted after sometime. Like about an hour.

So far I've used the following commands to do the extraction -

from google.colab import drive
drive.mount('/content/drive')


from zipfile import ZipFile
filename = 'Stanford Dogs Dataset.zip'

with ZipFile(filename, 'r') as zip:
  zip.extractall()
  print('Done')


and also tried this - 

!unzip filename -d destination


Not sure where I am going wrong. And also, dunno why the extracted files though being extracted to a subfolder within drive, also starts showing up on the main root directory. And no I am not talking about the recent section, because when I want to check their location then they points to the root of the drive. It's all so confusing.

First you mount google drive

from google.colab import drive
drive.mount('/gdrive')


Then you can copy from your drive using !cp

!cp '/gdrive/My Drive/my_file' 'my_file'


then you can work as in your pc, unzip and ...
