We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在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'
有人知道要如何解决吗?感谢!
The text was updated successfully, but these errors were encountered:
我将114-117行修改了一下,可以正常使用了,不过我不明白这其中的原理。
# try: # category = label_rel['value']['brushlabels'][0] # except: # category = label_rel['value']['rectanglelabels'][0] if 'brushlabels' in label_rel['value']: category = label_rel['value']['brushlabels'][0] else: # 处理没有 brushlabels 键的情况,例如跳过或设置默认值 continue
Sorry, something went wrong.
No branches or pull requests
在LS中导出json格式标注,使用convert_to_rle_mask_coco.py转换出现错误
有人知道要如何解决吗?感谢!
The text was updated successfully, but these errors were encountered: