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

Possible bug in k reciprocal computation #15

Open
bdalal opened this issue Jul 10, 2020 · 1 comment
Open

Possible bug in k reciprocal computation #15

bdalal opened this issue Jul 10, 2020 · 1 comment

Comments

@bdalal
Copy link

bdalal commented Jul 10, 2020

Hi,
I think I may have found a bug in the k reciprocal computation.

Based on the implementation from the original author https://github.com/zhunzhong07/person-re-ranking/blob/c11b3514114cbffc70588decda48c958fc965f5a/python-version/re_ranking_feature#L49 the re ranking function expects the actual distance which is then squared to get squared distance.

In your implementation, the _cal_dis function returns the squared distance not the actual distance.


In this case, I don't believe that there's a need to square it again here
original_dist = np.power(original_dist, 2).astype(np.float32)

In my own implementation, I removed this line and it improved my performance by 1% pts across all my metrics.

Thank you for the great work!

P.S. Implementing my suggestion in #14 can fix this issue without having to remove the squaring operation

@hby96
Copy link
Contributor

hby96 commented Jan 21, 2021

Thanks for you suggestions! I will fix it in the next version.

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

2 participants