UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
在复现 Unsupervised monocular depth and ego-motion learning with structure and semantics 这篇文章时,作者提供的代码在直接Running depth/egomotion inference on an image folder时会提示:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
经过查询,这个问题一般出现在读取文件的步骤;
但是通过搜索“0x89”这个关键词,发现这个好像是tf.gfile特有的一个问题,只需将文件读取模式改为“rb”即可
目前版本:tensorflow=1.15, python=3.7
此外,在命令行运行带参数的py文件时,给的文件夹地址最好是绝对地址,否着可能提示找不到chekpoint
而且模型生成的checkpoint文件有三个,在提供模型地址时要精确到三个文件的共同前缀,不要只提供一个文件夹地址就不管了!
最后,复现成功的结果,深度图

项目网站
https://sites.google.com/view/struct2depth
代码
https://github.com/tensorflow/models/tree/archive/research/struct2depth
运行在KITTI的模型下载
https://drive.google.com/file/d/1mjb4ioDRH8ViGbui52stSUDwhkGrDXy8/view?usp=sharing
运行在Cityscapes的模型下载
https://drive.google.com/file/d/1-BNr_jlOmhu39z1Un9zEZ63eFncZ8lzH/view?usp=sharing

浙公网安备 33010602011771号