google-research/deeplab2

Should instance IDs be globally unique or only unique per semantic class?

ilaripih opened this issue · 2 comments

I've trained a couple of panoptic models using my own TFRecord dataset (https://github.com/google-research/deeplab2/blob/main/g3doc/setup/your_own_dataset.md) where the instance IDs always begin at 1 for each semantic class, meaning that I could have "car" objects with instance IDs [1, 2, 3, 4] and "person" objects with instance IDs [1, 2, 3] in the same image. The panoptic IDs will of course be unique for each object because they are generated by also using the semantic ID and the label divisor.

The question is, is this the correct way to encode the instance IDs in the training data, or should I have a unique instance ID for each object, meaning I'd have "car" objects [1, 2, 3, 4] and "person" objects [5, 6, 7]?

Hi @ilaripih,

As long as the panoptic label is unique, you are good to go.

Cheers,

That's good to hear, thank you!