segment-anything
segment-anything copied to clipboard
Coco rle to polygon
Hello,I am trying to train the YOLOv8-SEG model using SA-1b. Yolov8 requires a Polygon type like x1, y1, x2, y2 ············
I use mask = mask_utils.decode(annotation["segmentation"])
How to convert a mask to a polygon type? Using cv2.findContours will result in excessive data
Why insist on polygon?
1 In SA-1B dataset, many mask have holes, and polygon fails to work well. 2 A better way is to customize yolov8's dataloader for RLE format input.