I am training a deep learning model for semantic segmentation. I am using the cityscapes dataset for training/evaluation.
In cityscapes, there are 34 classes, and of which, we consider only 19 classes and the rest of the classes are ignored. For training, I have assigned the 19 classes with 0-19 traid_ids.
Now, since the rest of the classes are ignored, I have ignored them when computing the loss using cross enropy with ignore_index=255.
But, the above effect can also be achieved by assigning a background class, i.e 20 as bg class and assign all the ignored classes to it.
Now my question is, which method would be better to achieve a high mIoU in cityscapes? And what would be your intuition in choosing the approach?