WenbinLee / DN4

Pytorch code of "Revisiting Local Descriptor based Image-to-Class Measure for Few-shot Learning", CVPR 2019.
Other
191 stars 43 forks source link

A question about k-nearest neighbors #4

Closed cute-Ww closed 5 years ago

cute-Ww commented 5 years ago

您好!看了您的论文有一个地方不太明白。您在文中说“For each descriptor xi, we find its k-nearest neighbors”。有441个local descriptors,在5way 5shot5的情况下,假设现在计算support set中与query image第n个descriptor最近的k个descriptors,请问是只在support set的5个对应的第n个descriptor找k个最近邻的还是在所有5*441 descriptor上找k个最近邻。另外实验设置,我看您在table1中写的k=3,shot为1的时候k也是3吗? 谢谢您

WenbinLee commented 5 years ago

一个query image包含441个local descriptors x_i (i=1,...,441),我们分别对每一个x_i在一个support class里查找k个最近邻。在5-shot情况下,一个support class里包含5*441个local descriptors,也就是说x_i要在这2205个local descriptors里面查找k个近邻,也就是说这2205个descriptors放在一起考虑,看成一个整体。

是的,1-shot的时候,k仍然取值为3,因为一个support class里有441个local descriptors.

谢谢