idiap / attention-sampling

This Python package enables the training and inference of deep learning models for very large data, such as megapixel images, using attention-sampling
Other
97 stars 18 forks source link

What is the role of "receptive field"? #9

Closed timqqt closed 4 years ago

timqqt commented 4 years ago

Hi guys,

I am working on developing your algorithm. I am wondering what is the role of "receptive field" in your code? Why we need this to shift our sampling offset? Could you tell me your intuition about tuning this parameters? Thanks.

angeloskath commented 4 years ago

Hi,

The receptive field is used to map correctly the locations of the image to the locations of the sampling distribution. So imagine a network with a receptive field of 5, stride 1 and no padding. We feed a downsampled image 100x100 which results in 96x96 positions to sample from. The first position corresponds to the pixel at indices 2,2 and not 0,0 . This is why we need the receptive field. So we can properly map the indices to the downsampled first and the original image afterwards.

Let me know if you need more information.

Cheers, Angelos

angeloskath commented 4 years ago

I am closing the issue but feel free to reopen it if you have further questions.

Angelos