voc转coco出现bug
收藏
Traceback (most recent call last):File "tools/x2coco.py", line 448, in main()File "tools/x2coco.py", line 344, in mainoutput_file=args.voc_out_name)File "tools/x2coco.py", line 268, in voc_xmls_to_cocojsonann = voc_get_coco_annotation(obj=obj, label2id=label2id)File "tools/x2coco.py", line 229, in voc_get_coco_annotationassert label in label2id, "label is not in label2id."
AssertionError: label is not in label2id
转成train.json报上述错误,但转val.json是成功的,路径都按demo里的配置的,没做修改,只修改了自己的标签类型
Start converting !100%|██████████████████████████████████████| 717/717 [00:00 00:00, 13538.85it/s]
0
收藏
请登录后评论
弄个git地址发来看看
label2id 是把你的标签转换为 0,1,2。。。这样的数字标签,所以在数据集下有个label.txt,存放数据集的所有标签,一般需要根据你自己的数据集进行修改。应该是你没改这个文件,导致在转换数字标签的过程中,在label.txt中找不到。
已经很明确了,label is not in label2Id,这个需要你看源码,把你修改的label适用到所有地方。出现这个问题的原因是,你修改了A处却没有修改B处
感觉配置有问题把,某些参数没改,追一下源码就能确认
谢谢,已解决
谢谢,已解决
谢谢,已解决
Generating dataset from: /home/aistudio/data/SolarCellString/labelme_annos/2019-01-26-22-30-52.json
Traceback (most recent call last):
File "tools/x2coco.py", line 542, in
main()
File "tools/x2coco.py", line 509, in main
args.json_input_dir)
File "tools/x2coco.py", line 145, in deal_json
images_list.append(images_labelme(data, image_num))
File "tools/x2coco.py", line 49, in images_labelme
image['height'] = data['imageHeight']
KeyError: 'imageHeight'
这是啥错?