Open TonyMacedonia opened 1 year ago
When I use the conversion script to convert the json format of label-studio output to COCO format, this error has occurred. How can I solve it?
There are two possible reasons for this error: 1. The LS exported JSON is not fully annotated. 2. JSON in a format other that LS is used Maybe you used the result of the previous step to COCO as input to the script, but the script only supports using LS exported JSON input
(rtmdet-sam) F:\playground\label_anything>python F:\playground\label_anything\tools\convert_to_rle_mask_coco.py --json_file_path D:/Desktop/4cats/result.json --out_dir F:\images Traceback (most recent call last): File "F:\playground\label_anything\tools\convert_to_rle_mask_coco.py", line 165, in
format_to_coco(args)
File "F:\playground\label_anything\tools\convert_to_rle_mask_coco.py", line 65, in format_to_coco
image_path_from=os.path.join('~/AppData/Local/label-studio/label-studio/media/upload/',os.path.dirname(contents[0]['data']['image']).split('/')[-1])
KeyError: 0