I’d like to retrieve a 1:1 mapping of segment IDs to labels created by the Interactive Annotator node.
What I have looks like this:
That is: three nested segments, two of which are labeled with the same class (Class 2).
From these, I’d like to get the following information:
Segment ID Label ---------- ------- Segment: 0 Class 1 Segment: 1 Class 2 Segment: 2 Class 2
Is there an easy way to get this information?
Using the Segment Features node, I can extract the overlap information (allowing partial overlap or not):
But I didn’t find a good way to get a one-to-one mapping because of the nested hierarchy of the segments. Also comparing their size doesn’t work, as
Class 2 is the sum of
Segment: 1 and
Here’s the workflow I used for testing:
Nested Annotations.knwf (43.4 KB)