Open qAp opened 2 years ago
Should padding be with 0 or 'symmetric'?
Should the semg into WN be just cells, or cells + touching walls? And should it be dilated?
After the Unet, before the WN, several ways of processing semseg
into semg
have been tried. Looking at the output wngy
, at a glance, it appears that simply using semseg[..., 0]
as semg
resolves more instances than other ways, such as using semseg[.., 0] + semseg[..., 1]
, or the binary dilation of that.
This kind of makes sense, because when the overlap walls, semseg[..., 1]
, are added, or when things are dilated, cells that are originally separate in semseg[..., 0]
may merge together, making it more difficult for the WN to separate them.
After some rough experimentation:
Including the background in the watershed energy loss has improved the submission score from 0.211 to 0.221
Changing selem
from 2 to 3 increases score from 0.221 to 0.235
Following https://github.com/qAp/sartorius_cell_instance_segmentation_kaggle/issues/2#issuecomment-1002644193, the background has been treated as another class in addition to the 'cell' class.
This improved the submission score from 0.235 to 0.237.
When the watershed energy map is cut at a higher level, more instances are obtained. This is helpful in resolving cells that are lengthy and that tend to tangle together with each other.
However, cutting at higher level means that cells become smaller, and selecting a higher binary dilation selem
might help compensate for this.
It helps to compare the number of ground truth cells and the number of predicted cells, when selecting the energy level at which to cut. The amount of dilation can be sort of be eyeballed. (Obviously a better way is to compute the competition metric, but at this stage, there's not enough time.)
Trying this to see how the submission fares.
Cutting at level > 1 reduces the score by too much, so not going with this. Perhaps even though more instances are resolved, their shapes have deformed by so much that the IOU suffers. e.g. elongated shapes become nearly square or circular.
For the final submissions, the highest scoring submission, one from background-inclusive and one from background-exclusive workflow, is selected.