Bounding box from instance annotation

Hey :slight_smile:

I want to create bounding boxes from from instance annotations and export them. Is that possible?

Cheers,

Lucca

Hey Lucca,

I assume that you’re doing polygons, not masks, right? In the JSON for masks, you should have the bounding box as well.

But also for polygons, it’s easy to do this programmatically during post-processing of the annotations. You basically just need to find the bottom-left (maxX, minY) and top-right corner (minX, maxY) for each annotation. Out of those two points you can build the whole bounding box.

I hope this helps,
Tobias