qAp / sartorius_cell_instance_segmentation_kaggle

Solution for Sartorius Cell Instance Segmentation Kaggle
0 stars 0 forks source link

What training target for the semantic segmentation stage? #4

Closed qAp closed 2 years ago

qAp commented 2 years ago

Have tried:

  1. 1-channel target, cells with overlap removed.
  2. 2-channel target. Channel 0 contains cells but with annotation overlap and touching borders removed. Channel 1 contains those regions removed in channel 0. See example.

It seems that the above target choices are geared towards separating the cells.

In the deep watershed transform approach, the semantic segmentation stage seems to be only about separating the different classes. The separation of instances begins with the Direction Net.

In Fig.4 of the deep watershed transform paper, it's seen that the semantic segmentation makes no attempt at separating the two cars. They are merged together under one mask. It's only in the next stage that the direction net is required to predict the direction vectors, which do mark out the boundary between the two cars. The direction loss is maximum when vectors on either side of a boundary point in the same direction.

It therefore looks like the training target should simply be just a 1-channel boolean mask, where it's True if the pixel comes under at least one cell, and False if it comes under no cells.

qAp commented 2 years ago

1-channel semantic segmentation masks saved as png. All 3 channels identical.

https://github.com/qAp/sartorius_cell_instance_segmentation_kaggle/commit/a4439493ce658e07962c42957cecc9d7d86e9b3f

qAp commented 2 years ago

Going with 2+ channels approach: https://github.com/qAp/sartorius_cell_instance_segmentation_kaggle/issues/7#issuecomment-992607141