久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何在谷歌合作實(shí)驗(yàn)室上傳數(shù)據(jù)集?

How to upload dataset in google colaboratory?(如何在谷歌合作實(shí)驗(yàn)室上傳數(shù)據(jù)集?)
本文介紹了如何在谷歌合作實(shí)驗(yàn)室上傳數(shù)據(jù)集?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我需要在 google colaboratory 中上傳圖像數(shù)據(jù)集.它里面有包含圖像的子文件夾.我在網(wǎng)上找到的都是單個(gè)文件.

I need to upload dataset of images in google colaboratory. It has subfolder inside it which contains images. Whatever I found on the net was for the single file.

from google.colab import files

uploaded = files.upload()

有什么辦法嗎?

推薦答案

要上傳數(shù)據(jù)到 Colab,你有三個(gè)方法.

For uploading data to Colab, you have three methods.

方法一

您可以在 Colab UI 中直接上傳文件或目錄

You can directly upload file or directory in Colab UI

數(shù)據(jù)保存在 Colab 本地機(jī)器中.在我的實(shí)驗(yàn)中,有三個(gè)特點(diǎn):1)上傳速度不錯(cuò).2)它將保持目錄結(jié)構(gòu),但不會(huì)直接解壓縮.您需要在 Colab 單元中執(zhí)行此代碼

The data is saved in Colab local machine. In my experiment, there are three features: 1) the upload speed is good. 2) it will remain directory structure but it will not unzip directly. You need to execute this code in Colab cell

!makedir {dir_name}
!unzip {zip_file} -d {dir_name}

3) 最重要的是,當(dāng) Colab 崩潰時(shí),數(shù)據(jù)會(huì)被刪除.

3) Most importantly, when Colab crashes, the data will be deleted.

方法二

在 Colab 單元格中執(zhí)行代碼:

Execute the code in Colab cell:

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

在我的實(shí)驗(yàn)中,當(dāng)您運(yùn)行單元格時(shí),它會(huì)出現(xiàn)上傳按鈕.當(dāng)單元格執(zhí)行指示器仍在運(yùn)行時(shí),您選擇一個(gè)文件.1) 執(zhí)行后,文件名會(huì)出現(xiàn)在結(jié)果面板中.2)刷新 Colab 文件,您將看到該文件.3) 或者執(zhí)行!ls,你會(huì)看到你的文件.如果不是,則文件沒有成功上傳.

In my experiment, when you run the cell, it appears the upload button. and when the cell executing indicator is still running, you choose a file. 1) After execution, the file name will appear in the result panel. 2)Refresh Colab files, you will see the file. 3) Or execute !ls, you shall see you file. If not, the file is not uploaded successfully.

方法三

如果您的數(shù)據(jù)來自 kaggle,您可以使用 Kaggle API 將數(shù)據(jù)下載到 Colab 本地目錄.

If your data is from kaggle, you can use Kaggle API to download data to Colab local directory.

方法四

將數(shù)據(jù)上傳到 Google Drive,您可以使用 1)Google Drive Web Browser 或 2) Drive API (https://developers.google.com/drive/api/v3/quickstart/python).要訪問驅(qū)動(dòng)器數(shù)據(jù),請(qǐng)?jiān)?Colab 中使用以下代碼.

Upload data to Google Drive, you can use 1)Google Drive Web Browser or 2) Drive API (https://developers.google.com/drive/api/v3/quickstart/python). To access drive data, use the following code in Colab.

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

我建議將數(shù)據(jù)上傳到 Google Drive,因?yàn)樗怯谰眯缘?

I would recommend uploading data to Google Drive because it is permanent.

這篇關(guān)于如何在谷歌合作實(shí)驗(yàn)室上傳數(shù)據(jù)集?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to draw a rectangle around a region of interest in python(如何在python中的感興趣區(qū)域周圍繪制一個(gè)矩形)
How can I detect and track people using OpenCV?(如何使用 OpenCV 檢測(cè)和跟蹤人員?)
How to apply threshold within multiple rectangular bounding boxes in an image?(如何在圖像的多個(gè)矩形邊界框中應(yīng)用閾值?)
How can I download a specific part of Coco Dataset?(如何下載 Coco Dataset 的特定部分?)
Detect image orientation angle based on text direction(根據(jù)文本方向檢測(cè)圖像方向角度)
Detect centre and angle of rectangles in an image using Opencv(使用 Opencv 檢測(cè)圖像中矩形的中心和角度)
主站蜘蛛池模板: 免费h在线| 一级大黄| 国产日韩欧美 | 精品国产乱码久久久久久闺蜜 | 亚洲乱码国产乱码精品精98午夜 | 久久成人人人人精品欧 | 中文字幕精品一区久久久久 | 国产一区二区在线视频 | 自拍偷拍视频网 | 男女羞羞在线观看 | 91精品国产综合久久精品图片 | 91五月婷蜜桃综合 | 羞羞网站在线免费观看 | 91天堂网 | 91视频日本 | 精品国产乱码久久久久久88av | 色资源在线观看 | 午夜精品一区二区三区在线观看 | 精品无码久久久久久国产 | 亚洲国产欧美一区 | 亚洲日产精品 | 精品99在线 | 超碰97人人人人人蜜桃 | 福利av在线| 在线观看视频福利 | 欧美国产91 | 久久狼人天堂 | 国产一区在线免费 | www.久久99 | 粉色午夜视频 | 亚洲男人天堂 | 国产91一区 | 欧洲视频一区二区 | 中文在线日韩 | 亚洲欧洲精品成人久久奇米网 | 九七午夜剧场福利写真 | 91久久爽久久爽爽久久片 | 在线观看中文字幕dvd播放 | 羞羞视频免费在线 | 色网站在线 | 日本a在线 |