willard-yuan / hashing-baseline-for-image-retrieval

:octocat:Various hashing methods for image retrieval and serves as the baselines
http://yongyuan.name/habir/
615 stars 255 forks source link

groundtruth问题 #11

Closed Sunwzh closed 6 years ago

Sunwzh commented 6 years ago

% threshold to define ground truth DtrueTestTraining = distMat(test_data, train_data); WtrueTestTraining = DtrueTestTraining < Dball; clear DtrueTestTraining; 如果我想使用真实的标签作为ground truth,是不是就要把这个WtrueTestTraining矩阵中相应行列属于同一个标签的元素值赋值为1,不同的赋值为0?

willard-yuan commented 6 years ago

@Sunwzh 不能这么简单的处理,这个里面的ground truth计算的是它的K近邻作为它的ground truth,所以你不能这么简单的处理,用label作为ground truth的评估,你可以参照这个K近邻作为ground truth的方式来。

Sunwzh commented 6 years ago

sorry..没看到您的回答... 有点不太明白您的意思,您提供的代码里面的WtrueTestTraining = DtrueTestTraining < Dball;是将欧式距离小于Dball的值作为ground truth, 然后小于这个Dball的WtrueTestTraining 中的对应行列的值赋值为1,如果使用真实标签作为groun truth的话,不是也应该将相同标签的行列的值赋值为1么?

willard-yuan commented 6 years ago

是的,这个地方要调整了真实标签的groun truth的话,需要做一些简单的更改,如果你改好了这种采用真实标签作为groun truth的,可以给我提交一个这样的版本。