Overlapping objects for multi class image segmentation

Hello All,

I would like to build a multi-class image segmentation model with FastAI. I am currently annotating objects on my own dataset, which objects sometimes are overlapping.
If a pixel belongs to two objects, what is the best way to label it? Just decide what of the two objects should always take this pixel?

Thanks in advance.

1 Like

How are they overlapping ? Is one object transparent ? Or is there one in the foreground ? Because it is very rare that you need to be able to predict overlapping objects, especially if you are doing multiclass.

Well, my images are on a fixed background where all the objects are also placed on fixed positions and they have fixed shapes.

When an object is in the foreground, it could sightly overlap one small part of another object, which is already placed somewhere behind it. My goal is to detect the existence (or not) of each object.

  • How should I annotate these objects? Is it better to annotate only the non-overlapping (foreground) parts of my objects?

  • If this doesn’t work, is it recommended to build separate models to detect one object each time?

In my opinion you should focus on detecting the foreground. If necessary, you can add a channel with background objects (if there are at most 2 objects overlapping at the same time) and train on it as well or something similar (not sure it will work though, never tried that).
You could also have one channel per class and a sigmoid activation, which would allow overlapping contrary to softmax.
Building separate models is not necessary, just use multiple channels. I am just not sure it will perform that well, but it is worth the try.