seoungwugoh / RGMP

Fast Video Object Segmentation by Reference-Guided Mask Propagation
192 stars 37 forks source link

why should we use "softmax" twice in "run.py"? #16

Open 9p15p opened 4 years ago

9p15p commented 4 years ago
  1. in 71 line: msv_E2[sc] = F.softmax(e2[0], dim=1)[:,1].data.cpu()

  2. in 116 line: all_E[:,:,f+1] = F.softmax(Variable(all_E[:,:,f+1]), dim=1).data

Why should we use "softmax" twice?

seoungwugoh commented 4 years ago

Hi @9p15p, For multi-object inference, we first estimate the probability map for each object. Then, we combine them with the soft aggregation.
The first softmax (L71) is for the estimation of each object, and the second softmax (L116) is for implementing the soft aggregation operation.

ryancll commented 4 years ago

Hi Seoung,

I'm very interested in your soft aggregation approach for multi-object task and I can understand your mindset after reading your paper. I'm wondering how this approach improve the performance compared with winner-take-all approach?

Thank you!

seoungwugoh commented 4 years ago

Hi @ryancll,

It is because maintaining uncertainty is important during propagation. After Soft aggregation the results is a probability map, while, with winner-take-all approach, it is a binary map. I think soft probability map gives the network more information to address challenges during propagation.