Skip to content
Discussion options

You must be logged in to vote

Okay that makes sense. Since an image with all constants will have a zero variance, the LNCC will be undefined so we have to add a small smoothing constant. In my case, the image had a lot of background pixels that were constant and so this was ending up affecting the LNCC. If I compute the loss with reduction="none" and mask out the background pixels, the LNCC is indeed $-1$. Thanks for your help in understanding this :)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wyli
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