Hello Everyone,
I am facing a problem of semantic segmentation of 2D data. I would like to apply 5 classes.
The dataset is sparsely labelled, in each image just a small portion of it is labelled, usually with just one class. It is common that in the same image more regions should have that label, and other parts of the image should have one of the other labels as well (which is not done).
I have tried naively applying CrossEntropy loss with 5 classes but without success. It seems that I should probably use weighting for every class depending on the amount of data that is annotated. Simple weight per class would not do the job here. Is there a way that I could do that with the loss functions that are already implemented in PyTorch, or should I rather look at implementing my own loss function?