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
{{ message }}
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
I was looking into tools/cityscapes/convert_cityscapes_to_coco.py implementation, and found out that in L167 it is loading a json of already computed polygons to read the metadata and find the binary mask of the corresponding entry to convert them to polygons AGAIN, in tools/cityscapes/instances2dict_with_polygons.py.
Why is it necessary to recompute the polygons?
The text was updated successfully, but these errors were encountered:
That file was taken as is from Detectron in #232 by @henrywang1 , and I didn't actually reviewed that part of the PR, given that it was taken from Detectron.
If you see optimization opportunities there, feel free to send a PR!
Hello @botcs as I understood from the code it is used to read the height and width of the image. You can replace that step by cv2.imread or lycon.load to get the height and width of the desired image.
Hope this helps 🙂
I am currently refactoring the structures/segmentation_mask.py and once it is done, it should be a choice whether the user wants to use the binary masks or the polygons from CityScapes.
If you see optimization opportunities there, feel free to send a PR!
Let me clarify: we download the masks and polygons both with the original dataset - and then we take the masks to generate polygons again. One possibility for this could be that this was some legacy code, maybe the polygon annotation feature was just added later. But that would contradict that the author of this piece of code already knew about the polygon annotation since it reads in the whole file just to check the width and height of the image. Thankfully this stuff goes offline but still its existence is intimidating
I was looking into
tools/cityscapes/convert_cityscapes_to_coco.py
implementation, and found out that in L167 it is loading a json of already computed polygons to read the metadata and find the binary mask of the corresponding entry to convert them to polygons AGAIN, intools/cityscapes/instances2dict_with_polygons.py
.Why is it necessary to recompute the polygons?
The text was updated successfully, but these errors were encountered: