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
It is clear from this that the count value is being stored as an encoded RLE rather than a normal RLE, as ice vision seems to be assuming.
Best Solution
I think the best solution to this problem is to add a check in the COCODatasetParser that determines whether the data being passed in is in the encoded RLE format or just normal RLE format. I understand right now that iscrowd is used to determine whether it is RLE information or just polygon information. I also think this approach is slightly hacky because plenty of COCODatasets arent necessarily storing crowd segmentation data but still use RLE due to the data size advantages. It would be great if this could be detected automatically which I think is pretty reasonable.
For Polygons you can check wether segmentation is a dict of information or just an array. If it is just an array then that means it is stored as polygon data.
For RLE data you can check if it is a dict and if the count's value contains a list of ints then you know it is standard RLE.
For Encoded RLE Data you can check if the information in counts is a String and if it is then you can just immediately provide the Encoded RLE.
Alternative Solutions
I can most likely modify this before going into icevision by decoding the dataset and using just normal RLEs but that seems like a roundabout way.
I can also change to simply using polygons rather than RLE.
Both of these solutions require modifying my existing dataset rather than just adding support.
The text was updated successfully, but these errors were encountered:
I wrote a pull request for this issue. #1166
It may also be worth the effort to write some COCOParser test cases for the various formats COCODatasets can take on.
🚀 Feature
Current problem
I have a COCO Dataset that is storing segmentation data in the following format.
It is clear from this that the count value is being stored as an encoded RLE rather than a normal RLE, as ice vision seems to be assuming.
Best Solution
I think the best solution to this problem is to add a check in the COCODatasetParser that determines whether the data being passed in is in the encoded RLE format or just normal RLE format. I understand right now that
iscrowd
is used to determine whether it is RLE information or just polygon information. I also think this approach is slightly hacky because plenty of COCODatasets arent necessarily storing crowd segmentation data but still use RLE due to the data size advantages. It would be great if this could be detected automatically which I think is pretty reasonable.For Polygons you can check wether segmentation is a dict of information or just an array. If it is just an array then that means it is stored as polygon data.
For RLE data you can check if it is a dict and if the count's value contains a list of ints then you know it is standard RLE.
For Encoded RLE Data you can check if the information in counts is a String and if it is then you can just immediately provide the Encoded RLE.
Alternative Solutions
Both of these solutions require modifying my existing dataset rather than just adding support.
The text was updated successfully, but these errors were encountered: