将位于 Google Drive 中的图像数据集(文件夹或 zip)加载到 Google Colab? [英] load image dataset (folder or zip) located in Google Drive to Google Colab?

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

问题描述

我的 Google Drive 上有一个图像数据集.我在压缩的 .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 或 Dropbox

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

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

编辑 1:

我发现另一个线程提出了与我相同的问题: 遗憾的是,在 3 个答案中,有两个指的是 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 Drive 中的图像数据集(文件夹或 zip)加载到 Google Colab?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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