Skip to content
New issue

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

UTF8 decoding error #28

Open
discretecoder opened this issue Nov 21, 2019 · 1 comment
Open

UTF8 decoding error #28

discretecoder opened this issue Nov 21, 2019 · 1 comment

Comments

@discretecoder
Copy link

Hello,

I am using python 3 and i have some issues storing json files from panoptic to detection and panoptic to semantic segmentation conversion.

In panoptictosemantic conversion, the data from RLE is not gettiing decoded to utf 8 and it throws an error when it tries to save the data from 'count' on from RLE in the json as its bytes.

interestingly same code works in the panoptictodetection conversion but it converts the byte as it is to a string as in the image attached.

has anyone seen the same issue?

thanks
utf problem

@bliptrip
Copy link

I have also had this issue (not sure if you've resolved since you posted). I traced the problem down to line 81 of panoptic2semantic_segmentation.py. The issue seems to be with newer pycocotools library recasting the RLE list back to bytes type when doing the merge. If you simply recast by adding the expression RLE['counts'] = RLE['counts'].decode('utf-8') after line 81, the problem appears to go away (at least it works for me).

I would issue a PR on this, but it doesn't appear that this repository is being actively maintained (correct me if I'm wrong, or if there is a new location to go for an actively maintained repo.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants