Loading images in google colab

后端 未结 11 1739
梦如初夏
梦如初夏 2021-01-30 15:01

My Jupyter Notebook has the following code to upload an image to Colab:

from google.colab import files
uploaded = files.upload()

I get prompted

11条回答
  •  时光取名叫无心
    2021-01-30 15:53

    Simpler Way:

    As colab gives options to mount google drive

    1. Upload images to your google drive
    2. Click on mount drive (right side of upload icon)
    3. See files under 'drive/My Drive/'

    code to check files

    import glob
    glob.glob("drive/My Drive/your_dir/*.jpg")
    

提交回复
热议问题