Unity-Technologies/pysolotools

Converting instance segmentation SOLO to COCO - IndexError

mark1ng123 opened this issue · 6 comments

Hey,
I created a synthetic dataset using unity perception labelled only with instance segmentation,
When i was trying to convert it to COCO format i received an error of list index out of range:

Screenshot from 2022-12-08 13-16-55

Tried to dig in the code and figure it out by myself, had no success there.
Anyone as a clue why is it happening ?
When i tried to modify the code i received different errors because i couldnt recreate the data wanted by myself in this parameter.

Screenshot from 2022-12-08 13-20-24

Tnx in advance,
Mark

Found a fix or workaround by any chance?

I managed to get a workaround but again stumbled upon another issue.

I disable line 373 in solo2coco.py
# "categories": self._categories(),

This was important because there were no categories in the dataset apparently without bbox labelers. So, disabling this made sense. However, now I am getting a non-stopping loop of error logs from the python multiprocessing:
error_log2.txt

Hey to both of you @LukasTrost @aryansaurav ,
i did something simillar to @aryansaurav i just added 2d bbox labeler in my perception camera game object using the same labels and it fixed my issue, i agree this needs to be solved in this library i keep this issue open for someone who might want to fork this and create a pull req that fixes it or anyone will stumble apon this and would want to fix it :)

@mark1ng123 much better workaround. I tried it and confirm that it doesn't throw the error if there is a boundingbox2d for each of the labels present in the scene. But, still the generated dataset doesn't have keypoints nor the segmentation masks. Is that the case for you as well?

@aryansaurav when i use a labler that is working for instance seg and also for 2d bbox everything works fine :)

@aryansaurav @mark1ng123 I wasn't able to generate coco keypoint annotations either, even with the workaround to add 2d bbox labeler in my perception camera game object. Do you have any more details on how you got it working?