Class Imbalance in Segmentation Training

This is the distribution of my data:

image

I have questions:

  • I know such distribution would need balancing in Classification tasks. Is this the same for Segmentation? Do I have to balance these classes or I can just train the model as is?
  • Is there a preferred way to handle the balancing? In classification, we have oversampling of the smaller class as the preferred method. Does it work too for segmentation?

I have googled around and found two papers that claim to solve the imbalance. Here are the links
http://ceur-ws.org/Vol-2744/short19.pdf
http://cs.uccs.edu/~jkalita/work/reu/REU2017/16Small.pdf

I am asking for the community’s understanding of the above issue before I have to go through papers.

Thank You

The first thing you need to try without thinking is the approach of oversampling.
Oversampling > Undersampling.
You might miss out on crucial data points if you undersample data points from the majority.

Once that is done, use the model tag untagged data.
Keep in mind nothing helps a model more than “more data”

1 Like

And using a loss function that deals with class imbalance helps, too. For example I successfully worked with FocalLossFlat(). Use search here and on Google

1 Like

Thank you both for your responses.

That’s what I thought too, I’ll try training it without fixing anything and then training it with the fixed suggested here and see what happens. After all, Deep Learning is all about the experiments.

I’ll report back on how it goes