mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

Binary segmentation may only output zeros

Open wptoux opened this issue 3 years ago • 4 comments

Describe the bug The EncoderDecoder Segmentor seems not to take into account the binary segmentation case. The argmax linked below may only return 0 when num_classes=1 and using sigmoid as loss fuction.

https://github.com/open-mmlab/mmsegmentation/blob/0e37281884193838417a43802bb7a4c854d2067e/mmseg/models/segmentors/encoder_decoder.py#L263

https://github.com/open-mmlab/mmsegmentation/blob/0e37281884193838417a43802bb7a4c854d2067e/mmseg/models/segmentors/encoder_decoder.py#L286

wptoux avatar Jul 14 '22 04:07 wptoux

Thanks for your bug reporting. We will fix it asap.

@xiexinch please have a look.

MeowZheng avatar Jul 14 '22 13:07 MeowZheng

Hi @wptoux, We are working on fixing this bug, but it takes some time.

xiexinch avatar Jul 18 '22 03:07 xiexinch

Me too, we alter code to make a multi-label binary segmentation, but the per pixel in binary preds has the same values.

GuardSkill avatar Jul 19 '22 01:07 GuardSkill

Hi @wptoux, @GuardSkill, We create PR #2016 to fix the bug, could you try it and feedback to us?

xiexinch avatar Sep 02 '22 03:09 xiexinch