Skip to content

Computation of PSNR differs from definition on Wikipedia #367

Closed Answered by zakajd
bojobo asked this question in Q&A
Discussion options

You must be logged in to vote

Good catch! Initially we only supported tensors in [0, 1] range and left part of log10(MAX_i) were equal to zero for MAX_i = 1.0.
We added support for arbitrary ranged tensors later on, but didn't change that part of PSNR implementation.
I'll open a bug report

upd: We scale tensors to [0, 1] range in this line, so left part in equation is always equal to zero. Implementation is correct.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by zakajd
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants