I have a dataset of images on my Google Drive. I have this dataset both in a compressed .zip version and an uncompressed folder.
I want to train a CNN using Google Colab. How can I tell Colab where the images in my Google Drive are?
official tutorial does not help me as it only shows how to upload single files, not a folder with 10000 images as in my case.
Then I found this answer, but the solution is not finished, or at least I did not understand how to go on from unzipping. Unfortunately I am unable to comment this answer as I don't have enough "stackoverflow points"
I also found this thread, but here all the answer use other tools, such as Github or dropbox
I hope someone could explain me what I need to do or tell me where to find help.
Edit1:
I have found yet another thread asking the same question as mine: Sadly, of the 3 answers, two refer to Kaggle, which I don't know and don't use. The third answer provides two links. The first link refers to the 3rd thread I linked, and the second link only explains how to upload single files manually.
I saw and tried all the above but it didn't work for me. So here is a simple solution with simple explanation that can help you load a .zip image folder and extract images from it.
from google.colab import drive
drive.mount('/content/drive')
(you will get a link sign in to your google account and copy the code and paste onto the code asked in the colab)
!pip install -q keras
import keras
(the zip file is loaded into the colab)
! unzip 'zip-file-path'
To get the path:
Now the unzipped image folder is loaded onto your colab use it as you wish
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With