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

about implement of non-local module #1

Open
qibao77 opened this issue Jan 20, 2019 · 5 comments
Open

about implement of non-local module #1

qibao77 opened this issue Jan 20, 2019 · 5 comments

Comments

@qibao77
Copy link

qibao77 commented Jan 20, 2019

I find that the output of this non-local module on each location only depends on its q × q neighborhood, as descripted in your paper, but I can not find it's implement in your code. Can you provide more detailes about it? Thank you very much!

@Ding-Liu
Copy link
Owner

The training is conducted in the patch level. For non-local module, we use circular padding for the neighborhood outside input patches. Therefore, each training sample is of size q x q pixels spatially, which equals the size of neighborhood.

@qibao77
Copy link
Author

qibao77 commented Jan 21, 2019

Thank you for your response! But I think that because the testing is also conducted in the patch level, the boundary effect will damage the results. And I can not understand circular padding well. Can you explain it? Thank you!

@wenbihan
Copy link

Thank you for your response! But I think that because the testing is also conducted in the patch level, the boundary effect will damage the results. And I can not understand circular padding well. Can you explain it? Thank you!

Image padding is a standard image processing operation, for introducing new pixel outside the boundary. Check out the description (for Matlab padding function) of padding here: https://www.mathworks.com/help/images/imfilter-boundary-padding-options.html

For the purpose of reducing the boundary effect, aggregating the overlapping patches is typically applied. This is also standard in image restoration algorithms.

@qibao77
Copy link
Author

qibao77 commented Jan 21, 2019

I get it, thank you!

@qibao77
Copy link
Author

qibao77 commented Jan 21, 2019

What's more, I can understand the implementation of non-local module with embedded gaussian, but I don't know how to implement non-local module with euclidean distance. Can you provide more detailes about it? Thank you very much!

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

3 participants