geo-deep-learning
geo-deep-learning copied to clipboard
Inference: review padding interface (config and variables)
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.