jis478 / Tensorflow

14 stars 3 forks source link

how to deal distance_weight? d1(x) and d2(x) #1

Open lucy3589 opened 5 years ago

lucy3589 commented 5 years ago

The separation border is computed using morphological operations. The weight map is then computed as w(x) = wc(x) + w0 · exp −(d1(x) + d2(x))2 2σ2 ! (2) where wc : Ω ! R is the weight map to balance the class frequencies, d1 : Ω ! R denotes the distance to the border of the nearest cell and d2 : Ω ! R the distance to the border of the second nearest cell. In our experiments we set w0 = 10 and σ ≈ 5 pixels.

jis478 commented 5 years ago

Hi Lucy,

I think you'd better ask to the original code author (https://github.com/jakeret/tf_unet). I haven't used the cross-entropy loss for my problems as they seem to vulnerable to imbalanced ones.

lucy3589 commented 5 years ago

ok,thanks very much!