Google Collab - how to upload to notebook from local PC or to download directly to notebooky out data

Hi, I just started first video and I was curious, since teacher said that we should try out besides cats & dogs some our own dataset for classification, how could I download to Google Collab notebook directly images from web or upload from my local PC some images I found? Is there any short tutorial on google collab?

For downloading from web, you can use curl or wget

!curl http://download.tensorflow.org/example_images/flower_photos.tgz  

!wget https://www.dropbox.com/s/7mc0xzbtkl0ppwx/simpsons.zip
1 Like

This is a guide by collab for handling io -
https://colab.research.google.com/notebooks/io.ipynb

For kaggle datasets -
https://medium.com/@move37timm/using-kaggle-api-for-google-colaboratory-d18645f93648

Hope this helps.

3 Likes

::::To Download ::::
! wget link-to-file

::::To Upload ::::
from google.colab import files
files.upload()

1 Like

You will need to mount a drive before importing files in your google colab

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

Hi, I went through the lesson 1 and used my own data set by importing images into the google drive. I am curious to know if is there a way to upload and use the images directly from the local machine? (without importing the images anywhere- this is needed due to some security reasons). Thanks in advance!