tf_unet icon indicating copy to clipboard operation
tf_unet copied to clipboard

Questions about UNet architecture and Dice loss

Open haichaoyu opened this issue 8 years ago • 3 comments

Hello,

I have two questions about the UNet architecture and Dice loss function:

  1. In the UNet paper, there is no Relu layer after the final conv. In experiments of my implemented version of UNet, such a Relu doesn't help. I don't whether the Relu in Line 136, unet.py helps or not.
  2. IMHO, Dice loss can be regarded as # of True Positives / (# of Positives + # of False Positives), but the Dice loss in Line 231, unet.py count both positives and negatives if I understand the code correctly.

Please correct me if I am wrong. Thanks.

haichaoyu avatar Jun 06 '17 05:06 haichaoyu

Hi @haichaoyu thanks for reporting this.

  1. I think you're right. The code diverges from the paper architecture. There is no particular reason why I added this. ATM I'm not sure how it affects the performance.

  2. Someone send a PR addressing this. Would love to hear your thoughts on this.

jakeret avatar Jun 07 '17 19:06 jakeret

@jakeret Hi, I added a new version of dice loss but did not test them. Sorry about that.

haichaoyu avatar Jun 07 '17 23:06 haichaoyu

Thanks I'll have a look

jakeret avatar Jun 12 '17 18:06 jakeret