geo-deep-learning icon indicating copy to clipboard operation
geo-deep-learning copied to clipboard

Inference: review padding interface (config and variables)

Open remtav opened this issue 3 years ago • 0 comments

It can be confusing to understand where and how padding is done in inference. For example, pad and dist_samples are duplicate variables. Also, the padding value is currently hardcoded.

It inference transforms, sample passed to model are padded by 'chunk_size' all around original sample with mode=reflect (mode reflect is used to improve segmentation at the border of samples). This should be softcoded and documented.

Also, _pad_diff and _pad should be used as transforms rather than directly in gen_img_samples() who's role is to sample the image, not preprocess/augment/pad it. An example of padding as transforms at test time can be found in torchgeo.

remtav avatar Feb 23 '22 21:02 remtav