LovaszSoftmax icon indicating copy to clipboard operation
LovaszSoftmax copied to clipboard

how to combine lovasz hinge and bce in binary segmentaion task appropriately?

Open yu-Mas opened this issue 4 years ago • 1 comments

Dear BermanMaxin, Thanks for your great work,it has helped me a lot! I got a confusion that how to combine lovasz hinge and bce in binary segmentaion task appropriately. As we all know,lovasz hinge expects logits(without sigmoid),but bce need relust after sigmoid.What confuses me is that whether these two different types(with/without sigmoid) losses can get along well. Other combo loss,e.g. bce+lovasz softmax,bce+dice, all need sigmoid so in my mind there is no problem. Could you give me some advice about this,thanks! In addition,if 'per_image=False' can bring a faster convergence when batch size is big. Thanks.

yu-Mas avatar Dec 09 '20 07:12 yu-Mas

You can use function lovasz_softmax(), and set the classes=[1].

mingqizhang avatar Feb 04 '21 14:02 mingqizhang