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

Eval metric produces wrong result if both t and t_gt are zeros #44

Open
ducha-aiki opened this issue Apr 19, 2022 · 0 comments
Open

Eval metric produces wrong result if both t and t_gt are zeros #44

ducha-aiki opened this issue Apr 19, 2022 · 0 comments
Assignees

Comments

@ducha-aiki
Copy link
Collaborator

ducha-aiki commented Apr 19, 2022

I understand that it is an artificial thing, which likely would never happen in practice, but it is good to know anyway.
https://github.com/ubc-vision/image-matching-benchmark/blob/master/utils/eval_helper.py#L99

Code to reproduce:

import numpy as np
t = np.zeros((3,1))
t_gt = np.zeros((3,1))
eps = 1e-15
loss_t = np.maximum(eps, (1.0 - np.sum(t * t_gt)**2))
err_t = np.arccos(np.sqrt(1 - loss_t))
print (err_t)

Out[11]: 1.5707963267948966

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