You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to convert the bdd100k instance segmentation using this command: python3 -m bdd100k.label.to_coco -m ins_seg --only-mask -i ./bdd100k/labels/ins_seg/bitmasks/val -o ./ins_seg_val_cocofmt_v2.json
The line I have mentioned above is supposed to do the conversion but I am getting an error from the pycocotools that it's not expecting a string in the mask.
So, I am unsure where the problem is? Is the conversion correct to coco then the loader should work?
Note: I tried to convert the detections and they worked fine.
Thank you for any help you can provide.
The text was updated successfully, but these errors were encountered:
sfarkya04
changed the title
Issue in converting the instance segmentation mask from bdd100k to coco
Issue in converting the instance segmentation mask encoding from bdd100k to coco
Jan 7, 2022
Hello,
I am trying to convert the bdd100k instance segmentation using this command:
python3 -m bdd100k.label.to_coco -m ins_seg --only-mask -i ./bdd100k/labels/ins_seg/bitmasks/val -o ./ins_seg_val_cocofmt_v2.json
Also, tried this:
python3 -m bdd100k.label.to_coco -m ins_seg -i ./bdd100k/labels/ins_seg/polygons/ins_seg_val.json -o ./ins_seg_val_cocofmt_v3.json -mb ./bdd100k/labels/ins_seg/bitmasks/val
The conversion is successful in both cases and the annotation looks like this
** that's not how coco annotations are.
Now, if you see the segmentation field above there's string encoding of the masks. Now, I am unsure if that's expected or not.
Further, assuming it's correct, I tried to load the annotations using loader from DETR https://github.com/facebookresearch/detr/blob/091a817eca74b8b97e35e4531c1c39f89fbe38eb/datasets/coco.py#L36
The line I have mentioned above is supposed to do the conversion but I am getting an error from the pycocotools that it's not expecting a string in the mask.
So, I am unsure where the problem is? Is the conversion correct to coco then the loader should work?
Note: I tried to convert the detections and they worked fine.
Thank you for any help you can provide.
The text was updated successfully, but these errors were encountered: