Reference between objects when annotating images

Hello there,

I'm searching for an annotation tool to annotate a dataset of receipts. The receipts are images and I want to be able to mark the line items. Each line item has a description and total amount. From the demo, I see that I can easily mark individual objects with a category – description or total amount, but I need to be able to mark that each description and total amount are part of one line item.

Like in the example above I need to know that description and total amount are part of one line item.

Does Prodigy support something that can achieve this?

Hi! I think one way this type of annotation is commonly done is with two overlapping bounding box types: so you have one bounding box that labels the line items and then smaller boxes for the individual elements. Given the pixel coordinates, you can then very easily calculate what's part of a given line item (other boxes inside it), so there's usually no need to label this explicitly.

Also, it obviously depends on the use case and document types, but from looking at your example, I wonder if you need the extra work of labelling line items at all? If you have a bounding box category for things like description or amount, you could just assume that amounts and descriptions with roughly the same Y pixel offsets are part of the same line, right? This will save you a lot of work and you can calculate the references all automatically in a postprocess based on the pixel coordinates.