MutterCorp
MutterCorpNotice · Notícias
Programação·

Turning COCO Polygons into Masks and Catching Broken Annotations in Python

Polygon annotations look clean in the labeling tool. Once you rasterize them into masks for training, problems show up: self-intersecting shapes, slivers a few pixels wide, polygons that spill past the image edge, and objects labeled twice. A short validation pass before training catches most of these. Rasterizing a COCO polygon COCO stores each polygon as a flat list [x1, y1, x2, y2, ...]. pycocotools handles the conversion: from pycocotools import mask as mask_utils import numpy as np def pol…

Publicado no Notice. Categoria: Programação.

Notícias sobre o mesmo assunto em outras fontes