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.
Leia também
Notícias sobre o mesmo assunto em outras fontes
ProgramaçãoDev.toIs P-256 broken? What the December advisory actually establishes
- ProgramaçãoHacker News
Silence at NIST, Panic on X: Who Gets to Tell Us Our Encryption Is Broken?
MundoThe Guardian WorldCity of broken glass: Kharkiv’s clear-up becomes daily toil amid Russian bombs