Hi,
I try to segment images with the
DeepLab method but with a different dataset.
In my case, I have only three labels. 0 is background, object A is label 1 and object B is label 2.
Object A (if in the image) takes roughly 15-25% of the image (label 0 pixels vs. label 1 pixels). For this label the segmentation works very well.
Object B, in contrast, are always small objects and take only 1-3% of the image (images can't be cropped to the size of object B).
This label learns very bad. Looking at the output score map, the prediction probabilities are close to 0 and also the location (if there is a small probability) is not aligned with the label 2 ground truth.
Now let's assume most of the pictures I have for training consist of 75% label 0 pixels, 22% label 1 pixels and 3% label 2 pixels.
My assumption is, that it might be cheaper at each iteration for the cost function, to fully ignore label 2 and only optimize filters for label 0 and label 1, because label 2 affects only a tiny fraction of the image and thus has only a small impact on the loss.
Does that make sense? And did anybody of you have similar problems?
And is there a way to adjust the loss function in caffe, so that an error with label 2 is punished more heavily as errors with label 1 or 0?
Thanks
Marc