【问题标题】:Expecting value: line 1 column 1 (char 0) problem期望值:第 1 行第 1 列(字符 0)问题
【发布时间】:2022-11-15 10:26:19
【问题描述】:

我想打开 json 文件进行对象检测(yolo v5 或 yolo v7)

所以我有51万张图片和json标签数据

enter image description here

但我没有解决这个问题(我尝试用谷歌搜索但是......)

jupyter notebook 打印不出来这个问题

我认为是主要原因

  1. json文件问题

    或者

    1. enter image description here

    colab内存问题

    那我怎么解决这个问题呢?

    请帮我

【问题讨论】:

    标签: json google-colaboratory


    【解决方案1】:

    您可能错误地使用了 open 函数。现在不要引用我的话,但是如果你想从 JSON 文件中读取数据,你需要像这样使用关键字“r”:

    with open(filename, 'r') as f:
        data = json.load(f)
    

    'r' 代表读取。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-10
      • 2019-02-25
      • 2023-03-25
      • 2018-06-28
      • 2020-11-11
      • 1970-01-01
      • 2017-05-09
      相关资源
      最近更新 更多