Skip to content

KeyError: 'BrushLabels' Conversion to RLE Format Masks #186

@moyue358

Description

@moyue358

在LS中导出json格式标注,使用convert_to_rle_mask_coco.py转换出现错误

(rtmdet-sam) qin@user-Super-Server:~/Projects/playground/label_anything$ python tools/convert_to_rle_mask_coco.py --json_file_path ./transform-json/627test1.json --out_dir ./transform-json/rle-mask
  0%|                                                                                                           | 0/1 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/qin/Projects/playground/label_anything/tools/convert_to_rle_mask_coco.py", line 113, in format_to_coco
    category = label_rel['value']['brushlabels'][0]
KeyError: 'brushlabels'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/qin/Projects/playground/label_anything/tools/convert_to_rle_mask_coco.py", line 201, in <module>
    classes_output,args=format_to_coco(args)
  File "/home/qin/Projects/playground/label_anything/tools/convert_to_rle_mask_coco.py", line 115, in format_to_coco
    category = label_rel['value']['rectanglelabels'][0]
KeyError: 'rectanglelabels'

有人知道要如何解决吗?感谢!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions