waspinator / pycococreator

Helper functions to create COCO datasets
Apache License 2.0
765 stars 179 forks source link

TypeError: Expected bytes, got list #40

Open z3742705z opened 3 years ago

z3742705z commented 3 years ago

Hey @waspinator , thanks for this work. I have a problem about the decoding of RLE. I set 'is_crowd' to 1 to make RLE format in shapes_to_coco.py. But I use MaskRCNN from facebookresearch and have a bug related to your program.

File "C:\Users\DTMLLUAdminUser\Anaconda3\envs\detectron2\lib\site-packages\pycocotools\mask.py", line 91, in decode return _mask.decode([rleObjs])[:,:,0] File "pycocotools_mask.pyx", line 146, in pycocotools._mask.decode File "pycocotools_mask.pyx", line 128, in pycocotools._mask._frString TypeError: Expected bytes, got list

do you have any idea or what should I do to finish this bug. Thank you.