Google colaboratory ValueError:具有DeepLab demo.ipynb的未知url类型
我正在使用Google Colab运行Demo DeepLab.ipnyb。演示提供的图像效果良好。当我尝试添加自己的图像时,收到一个错误“ValueError:unknown url type:”/content/harshu-06032019.png”。我看到该文件已上载到Colab 感谢您对我为什么会出现此错误的任何帮助 我试着把这个文件放进谷歌硬盘,并通过安装谷歌硬盘来授予对Colab的访问权,但效果并不理想 但如果文件上传到谷歌硬盘,我会得到错误“无法检索图像”。请检查url“ 这是DeepLabv3提供的代码+Google colaboratory ValueError:具有DeepLab demo.ipynb的未知url类型,google-colaboratory,Google Colaboratory,我正在使用Google Colab运行Demo DeepLab.ipnyb。演示提供的图像效果良好。当我尝试添加自己的图像时,收到一个错误“ValueError:unknown url type:”/content/harshu-06032019.png”。我看到该文件已上载到Colab 感谢您对我为什么会出现此错误的任何帮助 我试着把这个文件放进谷歌硬盘,并通过安装谷歌硬盘来授予对Colab的访问权,但效果并不理想 但如果文件上传到谷歌硬盘,我会得到错误“无法检索图像”。请检查url“ 这是D
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-5-ba1edc5ae51a> in <module>()
24
25 image_url = IMAGE_URL or _SAMPLE_URL % SAMPLE_IMAGE
---> 26 run_visualization(image_url)
5 frames
/usr/lib/python3.6/urllib/request.py in _parse(self)
382 self.type, rest = splittype(self._full_url)
383 if self.type is None:
--> 384 raise ValueError("unknown url type: %r" % self.full_url)
385 self.host, self.selector = splithost(rest)
386 if self.host:
ValueError: unknown url type: '/content/harshu-06032019.png'
---------------------------------------------------------------------------
ValueError回溯(最近一次调用上次)
在()
24
25 image\u url=image\u url或_SAMPLE\u url%SAMPLE\u image
--->26运行可视化(图像url)
5帧
/解析中的usr/lib/python3.6/urllib/request.py(self)
382 self.type,rest=splittype(self.\u full\u url)
383如果self.type为无:
-->384提升值错误(“未知url类型:%r”%self.full\u url)
385 self.host,self.selector=splithost(rest)
386如果self.host:
ValueError:未知的url类型:'/content/harshu-06032019.png'
要修复此“ValueError:未知url类型:'/content/harshu-06032019.png',请执行以下步骤:
内容
harshu-06032019.png
!ls
查看图像文件是否存在