EdwardTyantov / ultrasound-nerve-segmentation

Kaggle Ultrasound Nerve Segmentation competition [Keras]
181 stars 61 forks source link

regarding the dice_loss and the image shape #5

Closed huaiyanggongzi closed 7 years ago

huaiyanggongzi commented 7 years ago

Hi Edward,

When reading the code, I can see you use dice_coef for the performance metric. But I am not very clear why you need to setup dice_loss as -dice_coef. Is that because the higher dice_coef is, the better is performance. As a result, you try to minimize its opposite, dice_loss. Is my understanding correct?

Secondly, why you setup IMG_ROWS, IMG_COLS = 80, 112. It seems to me the training set has rows=480,and cols=520.

Thanks,

EdwardTyantov commented 7 years ago

Hi huaiyanggongzi, 1) The higher dice_coeff is - the better. Usually we need to minimize a loss function, which is in this case "-dice coeff" (so it's minimum is -1.0). 2) to fit neural network in memory (with considerable batch_size) and reduce the computations. I simply resize the input images.

huaiyanggongzi commented 7 years ago

Thanks.