简体   繁体   English

将多标签图像从云端硬盘上传到 Google Colab

[英]Uploading multilabel images from Drive to Google Colab

I am trying to upload png images from Drive to Google Colab.我正在尝试将 png 图像从云端硬盘上传到 Google Colab。 The number of images is 12,000 but the process takes more than 70 minutes to upload from drive to Colab.图像数量为 12,000,但从驱动器上传到 Colab 的过程需要70 多分钟

Is there a way to make the process faster?有没有办法让这个过程更快?

from google.colab import drive
drive.mount("/content/gdrive")
import glob
import numpy as np
import os
from PIL import Image

filelist = glob.glob('/somepath/*')
X_train = np.array([np.array((Image.open(fname))) for fname in filelist])

尝试将文件复制到 colab,然后使用这些文件(如果它们不足以存储在 colabmachine 上)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM