You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking through the code and thinking I should probably use multi_class_dice_loss with softmax after a quick look but then it wasn't an option - so, I added it. But, then I wondered why it wasn't an option so I did more comparing of multi_class_dice_loss and avg_dice_loss. Below I summarize what I'm interpreting the main difference between them to be.
My general take is that I'd be inclined to use avg_dice_loss because it would be less likely to wash out a few bad results on segments with only a few pixels (e.g., if one image in a batch has thick healthy patellar cartilage and the other has barely any, multi_class would be skewed more towards the healthy, I think?). I'm curious on the original rationale/distinction between them and if I might be missing something.
A bunch of these were legacy names that we preserved because a few different projects were using them. I'd stick to using medsegpy.loss.DiceLoss, which defaults to the same functionality as avg_dice_loss but will be more stable long term
Perfect - for anyone else reading this, medsegpy.loss.DiceLoss is currently specified as: LOSS: ("avg_dice_no_reduce", "sigmoid") in the yaml here and here
More versions of DiceLoss (different reductions weightings, etc.) can be added in the code near those references.
I want to try working with softmax, so I will add a softmax option that works with DiceLoss and make a pull request eventually.
sounds good - i think long term we should have a way of configuring this dynamically. maybe in the config the user can specify the loss class they want to instantiate and with what parameters
I was looking through the code and thinking I should probably use
multi_class_dice_loss
withsoftmax
after a quick look but then it wasn't an option - so, I added it. But, then I wondered why it wasn't an option so I did more comparing ofmulti_class_dice_loss
andavg_dice_loss
. Below I summarize what I'm interpreting the main difference between them to be.My general take is that I'd be inclined to use
avg_dice_loss
because it would be less likely to wash out a few bad results on segments with only a few pixels (e.g., if one image in a batch has thick healthy patellar cartilage and the other has barely any, multi_class would be skewed more towards the healthy, I think?). I'm curious on the original rationale/distinction between them and if I might be missing something.My take is:
multi_class_dice_loss
avg_dice_loss
The text was updated successfully, but these errors were encountered: