NUST-Machine-Intelligence-Laboratory / HFAN

31 stars 3 forks source link

question #5

Open xubangwu opened 2 years ago

xubangwu commented 2 years ago

Hello, I have a problem about the CSS module. In the 260 line of hfan_vos.py, the shape of probs is (batch_size,num_classes,h*w), why the softmax function normalizes the third dimension rather than the second dimension?

CODE4UVOS commented 2 years ago

Thanks for your attention.

Please excuse me for not responding sooner.

probs = F.softmax(self.scale * probs, dim=2) is spatial softmax, designed to normalize the foreground/background region.

You can refer to Equation 1 of the paper, which may help you.