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

Is it correct how to compute the variance? #34

Open
taikiinoue45 opened this issue Jan 19, 2021 · 4 comments
Open

Is it correct how to compute the variance? #34

taikiinoue45 opened this issue Jan 19, 2021 · 4 comments

Comments

@taikiinoue45
Copy link

taikiinoue45 commented Jan 19, 2021

I have a question about how to compute the variance.

sigma1_sq = F.conv2d(img1*img1, window, padding = window_size//2, groups = channel) - mu1_sq

@taikiinoue45 taikiinoue45 changed the title Is it correct how to compute the sigma? Is it correct how to compute the variance? Jan 19, 2021
@taikiinoue45
Copy link
Author

taikiinoue45 commented Jan 19, 2021

Here is the definition of the variance.

image

@taikiinoue45
Copy link
Author

To me, your implementation looks like the following.

image

@taikiinoue45
Copy link
Author

I think this is a correct implementation. What do you think about this?

sigma1_sq = F.conv2d(img1 - mu1, window, padding = window_size//2, groups = channel).pow(2)

@taikiinoue45
Copy link
Author

Sorry, it's my bad. Your implementation is correct.

image

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