Relative Content

Tag Archive for pytorchyolov8ultralytics

Sort segmentation model masks in top-down fashion (HTR predict)

I trained a segmentation model of YOLOv8 as HTR, to segment lines of text in an image (manuscript, book). When predicting, I get the masks sorted by confidence (torch.argsort(scores, descending=True). Is there a way to sort the masks top-down and left-to-right/right-to-left, I mean, like how a book is read?