Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于re-ranking代码的疑问 #27

Open
zhxun00cn opened this issue Nov 22, 2019 · 0 comments
Open

关于re-ranking代码的疑问 #27

zhxun00cn opened this issue Nov 22, 2019 · 0 comments

Comments

@zhxun00cn
Copy link

你好,感谢作者的算法思想,但我对您的算法实现有些疑问
(最开始我用的是罗浩的python版本,他告诉我完全按您的matlab版本复现的)
https://github.com/zhunzhong07/person-re-ranking/blob/master/evaluation/utils/re_ranking.m

  1. 代码第10行
    original_dist = original_dist./ repmat(max(original_dist, [], 2), 1, size(original_dist, 2));
    对距离矩阵如此处理的目的是什么?处理后,距离矩阵已经不是对称的了,并且转置后每一行的元素放缩的scale都不同

  2. 代码6行
    [~, initial_rank] = sort(original_dist, 2, 'ascend');
    对整个query和gallery进行排序,会出现查询样本的k1互近邻中出现查询集样本,这和论文并不一致
    另外我试了一下按论文思想,每次只传入1个query进行reranking的方法,这样可能会影响了query expansion,但结果似乎大部分情况都会比现在稍好一些(只是太慢)

  3. 代码第31行
    V(i, k_reciprocal_expansion_index) = weight/sum(weight);
    求每个样本的reci-feature, 最终除以了负指数的和,这和论文中也不相同

  4. 代码第63行
    jaccard_dist(i, :) = bsxfun(@minus, 1, temp_min./(2 - temp_min));
    这个距离的计算,好似和论文中计算方法并不等价?

想问一下,这几个地方算法实现的思路是什么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant