要将Google云端硬盘中的图片数据集(文件夹或zip)加载到Google Colab? [英] load image dataset (folder or zip) located in Google Drive to Google Colab?

查看:763
本文介绍了要将Google云端硬盘中的图片数据集(文件夹或zip)加载到Google Colab?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google云端硬盘上有一个图像数据集.我在压缩的.zip版本和未压缩的文件夹中都有此数据集.

I have a dataset of images on my Google Drive. I have this dataset both in a compressed .zip version and an uncompressed folder.

我想使用Google Colab训练CNN.如何告诉Colab我的Google云端硬盘中的图片在哪里?

I want to train a CNN using Google Colab. How can I tell Colab where the images in my Google Drive are?

  1. 官方教程对我没有帮助,因为它仅显示了如何上传单个文件,而不是像我这样的具有10000张图片的文件夹.

然后我找到了这个答案,但解决方案尚未完成,或者至少我不了解如何解压缩.不幸的是,由于我没有足够的"stackoverflow点",我无法对此答案发表评论.

我也找到了该线程,但是这里所有的答案都使用其他工具,例如作为Github或保管箱

我希望有人可以向我解释我需要做什么或告诉我在哪里可以找到帮助.

I hope someone could explain me what I need to do or tell me where to find help.

Edit1:

我发现了还有一个线程问与我的问题相同的问题:可悲的是,在这三个答案中,有两个是关于Kaggle的,我不知道,也没有使用.第三个答案提供了两个链接.第一个链接指向我链接的第三个线程,第二个链接仅说明如何手动上传单个文件.

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.

推荐答案

以更新答案.您现在可以在Google Colab中完成

To update the answer. You can right now do it from Google Colab

# Load the Drive helper and mount
from google.colab import drive

# This will prompt for authorization.
drive.mount('/content/drive')

!ls "/content/drive/My Drive"

Google文档

这篇关于要将Google云端硬盘中的图片数据集(文件夹或zip)加载到Google Colab?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆