我正在尝试学习在Google colab中运行人体姿势估计HRNet模型。问题是我们这里的互联网真的很慢。而且我的Google驱动器也没有足够的存储空间。因此,我想直接将作者在其git repo中声明的google drive文件夹放到我的google colab目录中,该目录具有足够的空间。我怎样才能做到这一点?另外,如何使用链接将网站的数据集直接导入Google Colab?有可能吗?
由于以下消息,我无法使用wget进行操作:
!wget 'https://doc-8s-68-drive-data-export.googleusercontent.com/download/8ms8b89eqn0kfkoe2asvf6kn35pv2835/5bjm43l1uvq11mghfs876f196ug1g3rp/1599664500000/e97bd50e-8abd-4462-86b8-d28c67b5a33d/110209733636068532482/ADt3v-NmPxhenWuLgjH2m5c8emE66pjdExmgep47BAdKTrsso2Vu8Ke6GEY5W51wwPPMqKZJowXQCea0f7Y2ef0oWZN1GV9Jm2u7rmsCe65wKzPTw5jtS38n2tVEGiTDSVDAsZOS2VM8r39rCpZvMmSw7e1cM7M013RuxVt5ixo9ZaBeRpN5iSQnbbchwr-KXlnb5eOOsKsMRgODhgctBzGiuh-sX1wfd36HlckQEaQ1U3k8rlVTYPU2vHK0fYUHeZKpvANdEZ0Y0s_fHX-YlAz1rr7tk0BZYF2-qYB_MBtp8bhrdDnNPPgDeUrbPF0Ow2hEYnYhiLm9?authuser=0&nonce=t0vkqcsfq608e&user=110209733636068532482&hash=9ckphlkqrvig75uleqg3b931o1ft9r2p' // error message below:
The name is too long, 428 chars total.
Trying to shorten...
New name is ADt3v-NmPxhenWuLgjH2m5c8emE66pjdExmgep47BAdKTrsso2Vu8Ke6GEY5W51wwPPMqKZJowXQCea0f7Y2ef0oWZN1GV9Jm2u7rmsCe65wKzPTw5jtS38n2tVEGiTDSVDAsZOS2VM8r39rCpZvMmSw7e1cM7M013RuxVt5ixo9ZaBeRpN5iSQnbbchwr-KXlnb5eOOsKsMRgODhgctBzGiuh-sX1wfd36HlckQEaQ1.
--2020-09-09 17:47:39-- https://doc-8s-68-drive-data-export.googleusercontent.com/download/8ms8b89eqn0kfkoe2asvf6kn35pv2835/5bjm43l1uvq11mghfs876f196ug1g3rp/1599664500000/e97bd50e-8abd-4462-86b8-d28c67b5a33d/110209733636068532482/ADt3v-NmPxhenWuLgjH2m5c8emE66pjdExmgep47BAdKTrsso2Vu8Ke6GEY5W51wwPPMqKZJowXQCea0f7Y2ef0oWZN1GV9Jm2u7rmsCe65wKzPTw5jtS38n2tVEGiTDSVDAsZOS2VM8r39rCpZvMmSw7e1cM7M013RuxVt5ixo9ZaBeRpN5iSQnbbchwr-KXlnb5eOOsKsMRgODhgctBzGiuh-sX1wfd36HlckQEaQ1U3k8rlVTYPU2vHK0fYUHeZKpvANdEZ0Y0s_fHX-YlAz1rr7tk0BZYF2-qYB_MBtp8bhrdDnNPPgDeUrbPF0Ow2hEYnYhiLm9?authuser=0&nonce=t0vkqcsfq608e&user=110209733636068532482&hash=9ckphlkqrvig75uleqg3b931o1ft9r2p
Resolving doc-8s-68-drive-data-export.googleusercontent.com (doc-8s-68-drive-data-export.googleusercontent.com)... 108.177.112.132, 2607:f8b0:4001:c12::84
Connecting to doc-8s-68-drive-data-export.googleusercontent.com (doc-8s-68-drive-data-export.googleusercontent.com)|108.177.112.132|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2020-09-09 17:47:39 ERROR 500: Internal Server Error.
答案 0 :(得分:0)
您到文件的链接不正确。它应该短得多。 它应该类似于:
https://drive.google.com/file/d/rAndomlEtt3r5andNumb3rs/view?usp=sharing
文件ID是链接的rAndomlEtt3r5andNumb3rs部分
假设作者已对“具有链接的任何人”启用了共享,并且不限于某些用户,则可以下载文件(在此示例中为exampledata.csv)
您可以通过以下方式下载文件:
!gdown --id rAndomlEtt3r5andNumb3rs
> Downloading...
> From: https://drive.google.com/uc?id=rAndomlEtt3r5andNumb3rs
> To: /content/exampledata.csv
> 0.00B [00:00, ?B/s]
它将保存到Colab会话中的临时文件夹/ content /中。您可以使用左侧的文件夹图标导航到该文件夹。 要访问它,请在您的工作空间中将文件加载到
/content/exampledata.csv
我不确定那里有什么存储限制,但是我定期向其中下载10GB的文件。但是请记住,会话结束后,所有保存在那里的东西都会被删除。
如果您没有下载文件的权限,则会得到:
Permission denied: https://drive.google.com/uc?id=8ms8b89eqn0kfkoe2asvf6kn35pv2835
Maybe you need to change permission over 'Anyone with the link'?