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

SNR calculation #2

Open
auggiemarignier opened this issue Mar 21, 2022 · 0 comments
Open

SNR calculation #2

auggiemarignier opened this issue Mar 21, 2022 · 0 comments

Comments

@auggiemarignier
Copy link

In darkmappy.validation the snr is calculated as

return 10.0 * np.log(l2_true / l2_diff)

but it should use
return 20.0 * np.log10(l2_true / l2_diff)

Need to be careful with the np.linalg.norm(x, ord=2) calls to calculate L2 norms as this behaves slightly differently for arrays (images) or flattened vectors. Also it doesn't return the squared norm, hence the new factor of 2.

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