NLRN_v0 icon indicating copy to clipboard operation
NLRN_v0 copied to clipboard

about implement of non-local module

Open qibao77 opened this issue 6 years ago • 5 comments

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!

qibao77 avatar Jan 20 '19 04:01 qibao77

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.

Ding-Liu avatar Jan 21 '19 00:01 Ding-Liu

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!

qibao77 avatar Jan 21 '19 08:01 qibao77

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.

wenbihan avatar Jan 21 '19 08:01 wenbihan

I get it, thank you!

qibao77 avatar Jan 21 '19 08:01 qibao77

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!

qibao77 avatar Jan 21 '19 09:01 qibao77