labelme2voc.py无法读取window下生成的json文件

labelme2voc.py无法读取window下生成的json文件


在windows系统下,利用labelme标注图像生成的json文件,图像的路径是反斜杠的,例如:“imagePath”: “…\imgs\28.9_3.jpg”;如果在linunx系统下,运行 python labelme2voc.py --input_dir jsons --output_dir data_dataset_voc --labels labels.txt时,会提示错误:
Failed opening image file: jsons_win/…\stage_first\54_561_f.jpg
Traceback (most recent call last):
File “/home/zhangdeshan/.local/lib/python3.7/site-packages/labelme/label_file.py”, line 117, in load
base64.b64encode(imageData).decode(“utf-8”),
File “/data/envs/conda/lib/python3.7/base64.py”, line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
TypeError: a bytes-like object is required, not ‘NoneType’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “labelme2voc.py”, line 106, in
main(args)
File “labelme2voc.py”, line 52, in main
label_f

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值