Png mask to yolov8 segmentation annotation conversion

I currently have the png masks of respective images used for training sfnet and segformer model.
But the issue here is that I want to convert thsese annotations to yolov8 format. As yolov8 takes the text inputs as annotation I am facing a lot of trouble in converting them.

Does roboflow provide a way to do this, or any suggestion would be welcomed.

2 Likes

were you able to solve, this, you could use cv2.contour to detect contour, but not sure how accurate it would be, in any case let me know were you able to solve this or not?>

Hi @Aaditya_Darakh,

You can’t really go from semantic segmentation masks to instance segmentation polygons, as information is lost when you flatten them.

Depending on how many there are it may be better to just relabel them. But you can do some heuristics to parse them with a script (though, unfortunately we don’t have a relevant script written to share).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.