playground icon indicating copy to clipboard operation
playground copied to clipboard

error: Label Studio Output Conversion to RLE Format Masks

Open TonyMacedonia opened this issue 2 years ago • 2 comments

(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

TonyMacedonia avatar May 16 '23 09:05 TonyMacedonia

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?

TonyMacedonia avatar May 16 '23 09:05 TonyMacedonia

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

JimmyMa99 avatar May 18 '23 01:05 JimmyMa99