dvlab-research/PFENet

similarity matrix

ily666666 opened this issue · 2 comments

For each xq ∈ XQ, we take the maximum similarity among
all support pixels as the correspondence value cq
By writing calculation process on the paper, I think It means that take maximum on each column
But in code ,I find that it is converse

similarity = similarity.max(1)[0].view(bsize, sp_sz*sp_sz)
I think it should be max(0)[0]
What's your opinion?
Thanks for your reply

The original similarity matrix has the size of (bsize, sp_sz X sp_size, sp_sz X sp_sz). The 1st dimension denotes the support sample and the 2nd dimension denotes the query sample. Therefore we take the maximum value among the 1st dimension (the max correspondence value among all support pixels). Hope this answers your question.

The original similarity matrix has the size of (bsize, sp_sz X sp_size, sp_sz X sp_sz). The 1st dimension denotes the support sample and the 2nd dimension denotes the query sample. Therefore we take the maximum value among the 1st dimension (the max correspondence value among all support pixels). Hope this answers your question.

thank you ,get it!